/* Écrits: reading pages. Same stage identity as the site, tuned for long text: three low-glare themes, 50–75 characters a line */
@font-face { font-family: "Allo"; src: url("../fonts/AlloVariableFriendly.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Allo"; src: url("../fonts/Allo-ExtraLightOblique.woff2") format("woff2"); font-weight: 200; font-style: italic; font-display: swap; }
:root {
  --bg: #141216; --raised: #1c191f; --ink: #e6dfd3; --dim: #9a9184; --accent: #ffb45c; --line: #ffffff1a; --glow: #ffb45c22;
  --f-body: "Allo", "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --fs: 1.1875rem;  /* reading size, changed by the A− / A+ buttons */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  color-scheme: dark;
}
/* Warm dark (default), sepia and light: never pure black on pure white */
:root[data-theme="sepia"] { --bg: #f3ead6; --raised: #ebe0c8; --ink: #3a2f22; --dim: #76664f; --accent: #a4520c; --line: #3a2f221f; --glow: #a4520c14; color-scheme: light; }
:root[data-theme="light"] { --bg: #faf8f4; --raised: #f0ece5; --ink: #1f1c19; --dim: #686158; --accent: #a8550a; --line: #1f1c191a; --glow: #a8550a12; color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--f-body); transition: background-color 250ms ease, color 250ms ease; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1240px; margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }  /* same frame as the other pages */
.mono { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }

/* Header: the site's pages, kept small */
/* Same header geometry as the other pages: name at the edge, pages centred on the screen */
.top.wrap { max-width: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); }
.brand { justify-self: start; display: block; line-height: 0; border-radius: 10px; transition: transform 160ms var(--ease-out); }
.brand img { display: block; width: 40px; height: 40px; }
.brand:active { transform: scale(.95); }
.top nav { display: flex; gap: 22px; }
.top nav a { text-decoration: none; color: var(--dim); white-space: nowrap; transition: color 150ms ease; }
.top nav a[aria-current="page"] { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .top nav a:hover { color: var(--ink); } }
@media (max-width: 720px) { .top.wrap { grid-template-columns: 1fr; row-gap: 10px; } .top nav { justify-content: space-between; gap: 14px; font-size: .92rem; overflow-x: auto; scrollbar-width: none; } }

/* ——— List ——— */
.intro { padding-block: calc(clamp(80px, 12vw, 160px) - 53px) clamp(32px, 5vw, 56px); max-width: 680px; }  /* the cue lands where it does on the other pages, under their fixed 68 px header */
/* Micro heading, as on the other pages: cue number, section, detail */
.kicker { display: flex; flex-wrap: wrap; gap: .9em; margin: 0 0 30px; color: var(--accent); font: 400 .75rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.kicker b { font-weight: 500; }
.kicker a { text-decoration: none; }
h1 { font-weight: 300; font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.05; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.intro p:not(.kicker) { color: var(--dim); font-size: 1.2rem; margin: 18px 0 0; }
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 8px 32px; padding: 28px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.post time, .post .len { color: var(--dim); padding-top: .35em; }
.post h2 { font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 8px; text-wrap: balance; }
.post p { margin: 0; color: var(--dim); max-width: 60ch; }
.post .tag { color: var(--accent); }
a.post h2 { transition: color 150ms ease; }
.post.soon { opacity: .55; }
.post.featured { grid-template-columns: minmax(0, 1fr); padding: clamp(28px, 4vw, 44px); margin: 0 0 32px; border: 1px solid var(--line); border-radius: 10px;
  background: radial-gradient(600px circle at 85% 0%, var(--glow), transparent 70%), var(--raised); }
.post.featured h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 300; }
.post.featured .meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; color: var(--dim); }
.post.featured .meta time { padding-top: 0; }  /* on the tag's line, not offset like the list column */
.post time, .post .meta > *, .byline > * { white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { a.post:hover h2 { color: var(--accent); } }
@media (max-width: 720px) { .post { grid-template-columns: 1fr; gap: 6px; } .post .len { display: none; } }

/* ——— Article ——— */
.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 10; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.sample { margin: 0 auto; max-width: 680px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 6px; color: var(--dim); font-size: .85rem; text-align: center; }
.article { max-width: 680px; margin-inline: auto; padding-block: clamp(40px, 8vw, 96px) 40px; }  /* ~68 characters a line at the default size */
.article header { margin-bottom: clamp(40px, 6vw, 64px); }
.article h1 { font-size: clamp(2.4rem, 6.4vw, 4rem); }
.dek { font-size: 1.3rem; line-height: 1.5; color: var(--dim); margin: 22px 0 0; text-wrap: pretty; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--dim); }
.byline b { color: var(--ink); font-weight: 500; }
.prose { font-size: var(--fs); line-height: 1.7; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; text-wrap: pretty; }
.prose h2 { font-weight: 400; font-size: 1.6em; line-height: 1.2; letter-spacing: -.015em; margin: 2em 0 .6em; text-wrap: balance; }
.prose h3 { font-weight: 600; font-size: 1.05em; margin: 1.6em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; padding-left: .2em; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.pull { margin: 1.8em 0; padding: 0; border: 0; font: italic 200 1.75em/1.3 var(--f-body); letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.pull::before { content: ""; display: block; width: 48px; height: 2px; background: var(--accent); margin-bottom: .6em; }
.pull cite { display: block; margin-top: .7em; font: 500 .75rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: var(--dim); }
.figure { margin: 2.2em 0; }
.figure svg { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--raised); }
.figure figcaption { margin-top: 10px; color: var(--dim); font-size: .9rem; line-height: 1.5; }
.prose hr { border: 0; margin: 2.2em 0; text-align: center; color: var(--accent); }
.prose hr::before { content: "* * *"; letter-spacing: .6em; }
.prose a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.steps { list-style: none; padding: 0 !important; font: 500 .95em var(--f-mono); letter-spacing: .04em; color: var(--accent); }
.works { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.works li { display: grid; gap: 2px; margin: 0; padding: .9em 0; border-bottom: 1px solid var(--line); }
.works b { font-style: italic; font-weight: 400; color: var(--accent); }
.works small { color: var(--dim); font-size: .82em; }
.works small a { color: inherit; }
.video { margin: 2.2em 0; }
.video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px #000c, 0 8px 16px -8px #0006; }
.video figcaption { margin-top: 10px; color: var(--dim); font-size: .9rem; }
.note { margin: 2em 0; padding: 18px 20px; border-left: 2px solid var(--accent); background: var(--raised); border-radius: 0 6px 6px 0; font-size: .95em; }
.end { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 3em; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); }
.end a { text-decoration: none; }

/* Reading controls: one quiet pill, fully visible on hover or focus */
.reader { position: fixed; z-index: 10; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px;
  background: color-mix(in srgb, var(--raised) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 10px 30px -12px #0008; opacity: .72; transition: opacity 200ms ease, transform 300ms var(--ease-out); }
.reader:hover, .reader:focus-within { opacity: 1; }
.reader.away { transform: translate(-50%, calc(100% + 24px)); }  /* hidden with ×, back on the next scroll up */
.reader button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 999px; color: var(--ink); font: 500 .8rem var(--f-mono); transition: background-color 150ms ease, transform 160ms var(--ease-out); }
.reader button:active { transform: scale(.95); }
.reader button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.reader .sep { width: 1px; height: 20px; background: var(--line); margin-inline: 4px; }
.reader .sw { width: 18px; height: 18px; min-width: 0; padding: 0; margin: 0 5px; border-radius: 50%; border: 1px solid var(--line); }
.reader .sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }
.reader [data-theme="dark"] { background: #141216; }
.reader [data-theme="sepia"] { background: #f3ead6; }
.reader [data-theme="light"] { background: #faf8f4; }
.reader .toast { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 6px 12px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: .85rem; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .reader button:not(.sw):hover { background: var(--line); } }

/* Call to action, as on the other pages */
.cta { text-align: center; padding-block: clamp(80px, 12vw, 160px) 40px; margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); background: radial-gradient(ellipse 55% 70% at 50% 0%, var(--glow), transparent 75%); }
.cta .kicker { justify-content: center; }
.reader ~ .cta { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }  /* articles: the © clears the reading controls pinned at the bottom */
.cta h2 { font-weight: 300; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -.025em; margin: 14px auto 0; max-width: 16ch; text-wrap: balance; }
.cta p { color: var(--dim); max-width: 52ch; margin: 18px auto 0; font-size: 1.1rem; }
.cta-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 500; font-size: 1.05rem; overflow-wrap: anywhere; transition: transform 160ms var(--ease-out); }
.btn:active { transform: scale(.97); }
.cta-link { color: var(--dim); text-decoration: none; }
.cta-link span { color: var(--accent); }
.copy { margin: clamp(56px, 8vw, 96px) 0 0; color: var(--dim); font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0ms !important; } }
a[x-apple-data-detectors] { color: inherit !important; text-decoration: none !important; pointer-events: none; }  /* no map links on place names */
