/* Benoît Saint-Moulin
   the website: graphite and ivory, amber only for links, the current page and the main button */

:root {
    --ground: #121618;
    --panel: #1a2023;
    --panel-2: #232a2e;
    --edge: #343d42;
    --ink: #eef2f0;
    --ink-2: #b3beb8;
    --accent: #e3a553;
    --accent-2: #c98a3a;
    --on-accent: #241808;
    --radius: 14px;
    --page: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--ground);
    color: var(--ink);
    font: 16px/1.62 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

p, li { text-align: justify; hyphens: auto; }
/* the footer, the notes, the tables, the narrow tiles and the lists of formats stay on the left, without hyphens */
.foot p, .aside, th, td, figcaption, .tile p, .matrix li, .actions { text-align: left; hyphens: manual; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.across img { width: 100%; }
.zoom { display: block; }
code, kbd { font-family: Consolas, "Cascadia Mono", monospace; font-size: .88em; }
code { background: none; padding: 0; }
kbd { background: none; border: 0; padding: 0; font-weight: 700; }
.page { max-width: var(--page); margin: 0 auto; padding: 0 22px; }

/* the bar at the top */
.top { position: sticky; top: 0; z-index: 20; background: rgba(18, 22, 24, .9); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--edge); }
.top .page { display: flex; align-items: center; gap: 28px; height: 60px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; letter-spacing: .01em; }
.mark svg { width: 30px; height: 30px; }
.mark:hover { text-decoration: none; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 24px; font-size: .95rem; }
.top nav a { color: var(--ink-2); padding: 4px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--ink); text-decoration: none; }
.top nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
.top nav a.get { padding: 6px 15px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.top nav a.get:hover { background: var(--accent-2); color: var(--on-accent); }

/* the first screen */
.opening { padding: 48px 0 30px; }
.wordmark { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font-size: 2.5rem; font-weight: 300; letter-spacing: -.02em;
    line-height: 1; color: #ece6da; text-align: left; }
.wordmark svg { width: 58px; height: 58px; flex: none; }
.wordmark b { font-weight: 300; color: var(--accent); }
.opening .page { display: grid; grid-template-columns: 1.02fr 1.18fr; gap: 44px; align-items: center; }
.opening h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; font-weight: 300; letter-spacing: -.02em; }
.opening h1 em { font-style: normal; font-weight: 600; }
.opening .lede { margin-top: 18px; color: var(--ink-2); font-size: 1.06rem; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 440px; margin-top: 26px; }
.actions .button { text-align: center; padding-left: 10px; padding-right: 10px; }
.button { display: inline-block; padding: 11px 24px; border-radius: 10px; font-weight: 600; color: var(--ink);
    background: var(--panel-2); border: 1px solid var(--edge); }
.button:hover { text-decoration: none; background: var(--edge); }
.button.main { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.main:hover { background: var(--accent-2); }
.aside { margin-top: 14px; font-size: .86rem; color: var(--ink-2); text-align: left; }
.frame img { border-radius: var(--radius); border: 1px solid var(--edge); box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }

/* the blocks of a page */
.block { padding: 34px 0; }
.block.tint { background: var(--panel); }
h2 { font-size: 1.95rem; font-weight: 300; letter-spacing: -.01em; margin-bottom: 12px; }
h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.intro { color: var(--ink-2); margin-bottom: 22px; }

.cards { display: grid; gap: 26px 40px; grid-template-columns: repeat(3, 1fr); }
.tile { border-top: 1px solid var(--edge); padding-top: 14px; }
.tile p { color: var(--ink-2); font-size: .95rem; }

.steps { display: grid; gap: 26px 40px; grid-template-columns: repeat(4, 1fr); counter-reset: n; list-style: none; }
.steps li { counter-increment: n; border-top: 1px solid var(--edge); padding-top: 14px; color: var(--ink-2); font-size: .95rem; }
.steps li::before { content: counter(n) "."; float: left; margin-right: .45em; color: var(--ink-2); font-size: 1.02rem; font-weight: 600; }
.steps li b { display: block; color: var(--ink); font-size: 1.02rem; }

.matrix { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.matrix > div { border-top: 1px solid var(--edge); padding-top: 14px; }
.matrix ul { list-style: none; }
.matrix li { padding: 5px 0 5px 22px; position: relative; color: var(--ink-2); }
.matrix li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--edge); }
.matrix li b { color: var(--ink); font-weight: 600; }
.matrix li small { color: var(--ink-2); }

.split { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: center; }
.split img { align-self: center; }
.split + .split { margin-top: 38px; }
.split p { color: var(--ink-2); margin-bottom: 12px; }
.split img { border-radius: var(--radius); border: 1px solid var(--edge); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }

.ticklist { list-style: none; }
.cards + h3 { margin-top: 34px; }
.cards + .aside { margin-top: 24px; }
.ticklist li { padding: 6px 0 6px 28px; position: relative; color: var(--ink-2); }
.ticklist li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--edge); }
.ticklist li b { color: var(--ink); }

.warning { border-left: 3px solid var(--edge); background: var(--panel); padding: 13px 17px; border-radius: 8px;
    color: var(--ink-2); margin: 16px 0; }
.warning b { color: var(--ink); }

table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 14px 0; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--edge); vertical-align: top; color: var(--ink-2); }
th { background: var(--panel); color: var(--ink); font-weight: 600; }
td b { color: var(--ink); }

/* the guide and the questions */
.manual { display: grid; grid-template-columns: 220px 1fr; gap: 42px; padding: 40px 22px 80px; }
/* the guide has no side menu: the text takes the whole width */
.manual.alone { grid-template-columns: 1fr; max-width: 800px; }
/* the cases of the guide, on top of it */
.text .jump ul { list-style: none; margin: 20px 0 0; padding: 14px 0 0; border-top: 1px solid var(--edge); columns: 2; column-gap: 40px; }
.text .jump li { margin: 0; padding: 4px 0; break-inside: avoid; text-align: left; hyphens: manual; }
.contents { position: sticky; top: 80px; align-self: start; font-size: .92rem; max-height: calc(100vh - 100px); overflow-y: auto; }
.contents a { display: block; padding: 4px 0; color: var(--ink-2); }
.contents a:hover { color: var(--ink); text-decoration: none; }
.contents b { display: block; margin: 16px 0 4px; font-size: .9rem; color: var(--ink); }
.text { min-width: 0; }
.text h2 { margin-top: 46px; padding-top: 14px; border-top: 1px solid var(--edge); }
.text h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.text h3 { margin-top: 24px; }
.text p, .text li { color: #d3dad6; }
.text p { margin: 10px 0; }
.text ul, .text ol { margin: 10px 0 10px 22px; }
.text li { margin: 4px 0; }
.text code { word-break: break-word; }
.text pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel); border: 0; border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 12px 0; }
.text pre code { background: none; padding: 0; }
.text h2, .text h3 { scroll-margin-top: 76px; }
.text h3 small { font-size: .7em; color: var(--ink-2); font-weight: 400; }
.text img.shot { margin: 14px 0; border-radius: var(--radius); border: 1px solid var(--edge); box-shadow: 0 14px 40px rgba(0, 0, 0, .4); }
.text img.shot.narrow { max-width: min(340px, 100%); }
.text img.shot.medium { max-width: min(600px, 100%); }
.tablewrap { overflow-x: auto; margin: 14px 0; }
.tablewrap table { margin: 0; }
.text td, .text th { overflow-wrap: break-word; }
.questions { max-width: 800px; padding: 40px 22px 80px; }
.questions h1 { font-size: 2.4rem; font-weight: 300; margin-bottom: 8px; }
.manual .text h1 { font-size: 2.4rem; font-weight: 300; margin: 0 0 14px; }
.questions h2 { font-size: 1.2rem; font-weight: 600; color: var(--ink); margin: 36px 0 10px; }
.questions p { color: #d3dad6; margin-bottom: 12px; }
/* the questions open and close, as on every site of mine */
.faq { border-bottom: 1px solid var(--edge); margin-top: 18px; }
.faq-item { border-top: 1px solid var(--edge); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: .7rem; padding: .8rem .2rem; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; flex: none; width: 1ch; font-family: Consolas, "Cascadia Mono", monospace; color: var(--ink-2); }
.faq-item[open] summary::before { content: "-"; }
.faq-item summary:hover { color: var(--accent); }
.faq-item p { padding: 0 .2rem 1rem calc(1ch + .9rem); margin-bottom: 0; }
.faq-item p + p { margin-top: -.4rem; }
.questions > p:last-child { margin-top: 28px; }

.foot { border-top: 1px solid var(--edge); padding: 38px 0; color: var(--ink-2); font-size: .9rem; }
.foot .page { display: grid; gap: 10px; }
.foot p { text-align: left; hyphens: manual; }

/* a tablet keeps two columns, with less room between them */
@media (max-width: 880px) {
    .manual { grid-template-columns: 1fr; }
    .opening .page { grid-template-columns: 1fr 1fr; gap: 28px; }
    .split { gap: 28px; }
    .cards { gap: 22px 26px; }
    .wordmark { font-size: 2.1rem; }
    .wordmark svg { width: 48px; height: 48px; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .contents { position: static; max-height: 12rem; border: 0; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); padding: 0 0 6px; }
    .top nav { gap: 16px; font-size: .9rem; }
}
/* under a tablet held upright: one column */
@media (max-width: 760px) {
    .opening .page, .split, .cards { grid-template-columns: 1fr; }
    .opening { padding: 30px 0 22px; }
    .split.flip .zoom { order: 2; }
    .text .jump ul { columns: 1; }
}
/* a phone: the captures are cut to their top left corner so that something of them can be read, the six tiles
   stand one under the other, the text is not justified (the lines are too short for it) */
@media (max-width: 560px) {
    .frame img, .split img { width: 100%; object-fit: cover; object-position: 0 0; }
    .frame img { aspect-ratio: 10 / 11; }
    .split img { aspect-ratio: 5 / 4; }
    .across img { max-width: 420px; margin: 0 auto; }
    p, li { text-align: left; hyphens: manual; }
    h2 { font-size: 1.6rem; }
    .actions { max-width: none; gap: 10px; }
    .mark span { display: none; }
    .top nav a.away { display: none; }
    .top nav { gap: 14px; }
    .block { padding: 26px 0; }
    .questions h1, .manual .text h1 { font-size: 2rem; }
}

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--edge) var(--panel); }

/* tables never scroll: a table of two columns keeps a readable first column, a wide one gets compact cells and
   becomes a stack of cards when the room is short */
.text table[data-cols="2"] td:first-child { width: 36%; }
.tablewrap { overflow-x: visible; }
.tablewrap.wide th, .tablewrap.wide td { padding: 7px 6px; font-size: .82rem; }
.tablewrap.wide td:first-child { white-space: nowrap; }
@media (max-width: 1180px) {
    .text table:not([data-cols="2"]):not([data-cols="1"]), .text table:not([data-cols="2"]):not([data-cols="1"]) tbody,
    .text table:not([data-cols="2"]):not([data-cols="1"]) tr, .text table:not([data-cols="2"]):not([data-cols="1"]) td { display: block; width: 100%; }
    .text table:not([data-cols="2"]):not([data-cols="1"]) tr:first-child:has(th) { display: none; }
    .text table:not([data-cols="2"]):not([data-cols="1"]) tr { border: 1px solid var(--edge); border-radius: 10px; margin: 0 0 12px; padding: 8px 14px; background: var(--panel); }
    .text table:not([data-cols="2"]):not([data-cols="1"]) td { display: flex; justify-content: space-between; gap: 16px; border: 0; padding: 4px 0; font-size: .92rem; white-space: normal; text-align: right; }
    .text table:not([data-cols="2"]):not([data-cols="1"]) td::before { content: attr(data-label); color: var(--ink-2); text-align: left; flex: 0 0 38%; }
    .text table:not([data-cols="2"]):not([data-cols="1"]) td:first-child { display: block; text-align: left; font-size: 1rem; padding: 2px 0 6px; white-space: normal; }
    .text table:not([data-cols="2"]):not([data-cols="1"]) td:first-child::before { content: none; }
}
@media (max-width: 640px) {
    .text table[data-cols="2"], .text table[data-cols="2"] tbody, .text table[data-cols="2"] tr, .text table[data-cols="2"] td { display: block; width: 100%; }
    .text table[data-cols="2"] tr:first-child:has(th) { display: none; }
    .text table[data-cols="2"] tr { border-bottom: 1px solid var(--edge); padding: 8px 0; }
    .text table[data-cols="2"] td { border: 0; padding: 2px 0; }
    .text table[data-cols="2"] td:first-child { width: 100%; color: var(--ink); font-weight: 600; }
}
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .matrix { grid-template-columns: 1fr; } }

/* phone (2026-11-26): less vertical space between the blocks */
@media (max-width: 560px) {
    .opening { padding: 20px 0 12px; }
    .block { padding: 18px 0; }
    .split + .split { margin-top: 22px; }
    .split { gap: 18px; }
    .manual, .questions { padding-top: 22px; padding-bottom: 28px; }
    .text h2 { margin-top: 26px; }
    .questions h2 { margin-top: 22px; }
    .foot { padding: 20px 0; }
}
/* the narrowest phones: the three entries and the button stay on one line, down to 320 px */
@media (max-width: 400px) {
    .top .page { gap: 10px; padding: 0 14px; }
    .top nav { gap: 11px; font-size: .85rem; }
    .top nav a.get { padding: 5px 10px; }
}

/* one width for the whole site (2026-11-26): the long pages and the 404 page share the frame of the home page; phones keep their rules */
@media (min-width: 561px) {
    .questions, .manual.alone { max-width: var(--page); margin-left: auto; margin-right: auto; }
    /* the buttons of a block take its whole width; those of the first screen stay in their column */
    .block .actions { max-width: none; }
}
