/* =========================================================================
   Everyday Finds | Tech & Home — public site
   Direction: editorial catalogue. Warm paper, ink-black type, two "shelf"
   colours (cobalt = Tech, terracotta = Home), a marker-yellow highlight.
   Type: Gloock (display) · Instrument Serif Italic (accent) · Instrument Sans (text) · DM Mono (labels)
   ========================================================================= */

@font-face { font-family: "Gloock"; src: url("/static/fonts/Gloock-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; font-style: italic; src: url("/static/fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Sans"; font-weight: 400; src: url("/static/fonts/InstrumentSans-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: italic; src: url("/static/fonts/InstrumentSans-Italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Sans"; font-weight: 700; src: url("/static/fonts/InstrumentSans-Bold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("/static/fonts/DMMono-Regular.woff2") format("woff2"); font-display: swap; }

:root {
  --paper: #f3ede2;
  --paper-2: #eae2d3;
  --paper-3: #e0d6c3;
  --ink: #161310;
  --ink-2: #3b352e;
  --muted: #655c50;
  --tech: #2540ff;
  --tech-soft: #dde2ff;
  --home: #d9531e;
  --home-ink: #a63a10;
  --home-soft: #f6d9c9;
  --sun: #f4d03f;
  --moss: #2f5d3a;

  --f-display: "Gloock", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-accent: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1240px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --r: 18px;
  --line: 1.5px solid var(--ink);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* paper grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .55; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .07 0 0 0 0 .06 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--home); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; line-height: 1.02; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
em, .accent { font-family: var(--f-accent); font-style: italic; font-weight: 400; letter-spacing: 0; }
:focus-visible { outline: 3px solid var(--tech); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--sun); color: var(--ink); }

.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 200; border-radius: 8px; }
.skip:focus { left: .5rem; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* ------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.2rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand svg { width: 2.4rem; height: 2.4rem; transition: transform .6s var(--ease); }
.brand:hover svg { transform: rotate(180deg); }
.brand-name { font-family: var(--f-display); font-size: 1.45rem; line-height: 1; }
.brand-sub { display: block; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: .25rem; }
.nav { display: flex; align-items: center; gap: .3rem; }
.nav a { text-decoration: none; padding: .45rem .8rem; border-radius: 999px; font-size: .95rem; transition: background .2s; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; background: none; border: var(--line); border-radius: 999px; padding: .45rem .9rem; font: inherit; cursor: pointer; }

/* ------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.4rem; border-radius: 999px; border: var(--line); background: var(--paper); color: var(--ink); font: 700 .98rem var(--f-text); text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink); box-shadow: 4px 4px 0 var(--home); }
.btn-small { padding: .5rem .95rem; font-size: .85rem; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translate(3px, -3px); }

/* ------------------------------------------------------------- hero */
.hero { position: relative; padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .85fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.4rem; }
.eyebrow .dot { width: .7rem; height: .7rem; border-radius: 50%; background: linear-gradient(90deg, var(--tech) 50%, var(--home) 50%); border: 1.5px solid var(--ink); }
.display { font-size: clamp(3rem, 7.6vw, 7.2rem); line-height: .94; letter-spacing: -.03em; margin-bottom: .35em; }
.display .line { display: block; white-space: nowrap; }
.display em { color: var(--home); font-size: 1.04em; }
.display .hl { background: linear-gradient(transparent 62%, var(--sun) 62% 92%, transparent 92%); padding: 0 .08em; }
.lead { font-size: clamp(1.12rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--ink-2); max-width: 36ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2.2rem; }
.facts { list-style: none; margin: 0; padding: 1.1rem 0 0; border-top: var(--line); display: grid; grid-template-columns: repeat(3, auto); gap: 1.2rem; justify-content: start; }
.facts li { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; display: flex; gap: .5rem; align-items: baseline; }
.facts li::before { content: "✺"; color: var(--home); }

/* hero collage */
.collage { position: relative; aspect-ratio: 1 / 1.08; width: 100%; max-width: 560px; margin-inline: auto; }
.art { position: absolute; border: var(--line); border-radius: 26px; overflow: hidden; box-shadow: 8px 8px 0 var(--ink); transition: transform .6s var(--ease); }
.art svg { width: 100%; height: 100%; }
.art-tech { width: 58%; left: 2%; top: 0; transform: rotate(-4deg); }
.art-home { width: 52%; right: 0; bottom: 0; transform: rotate(3.5deg); border-radius: 999px 999px 26px 26px; }
.collage:hover .art-tech { transform: rotate(-7deg) translate(-6px, -4px); }
.collage:hover .art-home { transform: rotate(6deg) translate(6px, 4px); }
.sticker { position: absolute; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: .35rem .8rem; border: var(--line); border-radius: 999px; background: var(--paper); z-index: 3; }
.sticker.s-tech { left: -2%; bottom: 20%; background: var(--tech); color: #fff; transform: rotate(-8deg); }
.sticker.s-home { right: 4%; top: 6%; background: var(--sun); transform: rotate(6deg); }
.badge { position: absolute; width: 8.2rem; left: 40%; bottom: -2%; z-index: 4; animation: spin 24s linear infinite; }
.badge text { font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em; fill: var(--ink); text-transform: uppercase; }
.badge .disc { fill: var(--sun); stroke: var(--ink); stroke-width: 1.5; }
@keyframes spin { to { transform: rotate(360deg); } }

/* load-in choreography */
.hero .rise { opacity: 0; transform: translateY(22px); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.collage .art-tech { animation: drop-a 1s var(--ease) .25s both; }
.collage .art-home { animation: drop-b 1s var(--ease) .4s both; }
@keyframes drop-a { from { opacity: 0; transform: translateY(-40px) rotate(-14deg); } }
@keyframes drop-b { from { opacity: 0; transform: translateY(40px) rotate(12deg); } }

/* ------------------------------------------------------------- marquee */
.ticker { background: var(--ink); color: var(--paper); overflow: hidden; border-block: var(--line); }
.ticker-track { display: flex; width: max-content; animation: scroll 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { font-family: var(--f-display); font-size: clamp(1.2rem, 2.4vw, 1.9rem); padding: .85rem 1.4rem; white-space: nowrap; }
.ticker span:nth-child(even) { font-family: var(--f-accent); font-style: italic; color: var(--sun); }
.ticker i { font-style: normal; color: var(--home); padding-inline: .2rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------- sections */
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.sec-head { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem 2rem; align-items: end; margin-bottom: clamp(1.8rem, 4vw, 3.2rem); }
.sec-no { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .1em; border: var(--line); border-radius: 999px; padding: .3rem .8rem; align-self: start; }
.sec-head h2 { font-size: clamp(2.3rem, 5.6vw, 4.6rem); margin: 0; }
.sec-head p { grid-column: 2; max-width: 52ch; color: var(--ink-2); margin: 0; }

/* principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--line); border-radius: var(--r); background: var(--paper-2); overflow: hidden; }
.principle { padding: clamp(1.4rem, 3vw, 2.2rem); border-right: var(--line); position: relative; transition: background .3s; }
.principle:last-child { border-right: 0; }
.principle:hover { background: var(--sun); }
.principle .n { font-family: var(--f-display); font-size: 4.2rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.principle h3 { font-size: 1.7rem; margin: .6rem 0 .4rem; }
.principle p { margin: 0; color: var(--ink-2); }

/* shelves */
.shelves { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.5vw, 1.8rem); }
.shelf { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 22rem; padding: clamp(1.4rem, 3vw, 2.2rem); border: var(--line); border-radius: 28px; text-decoration: none; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.shelf:hover { transform: translate(-4px, -4px); box-shadow: 10px 10px 0 var(--ink); }
.shelf-tech { background: var(--tech); color: #fff; }
.shelf-home { background: var(--home); color: var(--ink); border-radius: 28px 28px 28px 200px; }
.shelf h3 { font-size: clamp(2.4rem, 5vw, 4rem); margin: 0; }
.shelf p { max-width: 30ch; margin: .6rem 0 0; }
.shelf .go { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; gap: .5rem; align-items: center; }
.shelf .ring { position: absolute; right: -4rem; top: -4rem; width: 16rem; aspect-ratio: 1; border-radius: 50%; border: 2px solid currentColor; opacity: .35; box-shadow: 0 0 0 1.6rem transparent, inset 0 0 0 1.6rem transparent; }
.shelf .ring::before, .shelf .ring::after { content: ""; position: absolute; inset: 2.2rem; border-radius: 50%; border: 2px solid currentColor; }
.shelf .ring::after { inset: 4.4rem; }
.shelf-home .ring { border-radius: 999px 999px 0 0; width: 11rem; aspect-ratio: .7; right: 2rem; top: -1rem; }
.shelf-home .ring::before { inset: 1.6rem; border-radius: 999px 999px 0 0; }
.shelf-home .ring::after { inset: 3.2rem; border-radius: 999px 999px 0 0; }

/* finds grid */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.chip { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: .45rem .95rem; border: var(--line); border-radius: 999px; transition: background .2s, color .2s; }
.chip:hover { background: var(--paper-3); }
.chip[aria-current="true"] { background: var(--ink); color: var(--paper); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); gap: clamp(1rem, 2.2vw, 1.6rem); }
.find { display: flex; flex-direction: column; border: var(--line); border-radius: var(--r); background: #fbf8f1; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.find:hover { transform: translate(-3px, -3px) rotate(-.4deg); box-shadow: 7px 7px 0 var(--ink); }
.find-media { display: block; aspect-ratio: 1; overflow: hidden; border-bottom: var(--line); background: var(--paper-2); }
.find-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.find:hover .find-media img { transform: scale(1.05); }
.ph { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--f-display); font-size: 6rem; color: rgb(255 255 255 / .92); background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / .1) 0 12px, transparent 12px 24px); }
.ph-tech_gadgets { background-color: var(--tech); }
.ph-home_living { background-color: var(--home); }
.ph-other { background-color: var(--moss); }
.find-body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.tag { align-self: flex-start; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; margin: 0; }
.tag-tech_gadgets { background: var(--tech-soft); color: var(--tech); }
.tag-home_living { background: var(--home-soft); color: var(--home-ink); }
.tag-other { background: #d8e6d9; color: var(--moss); }
.find h3 { font-size: 1.4rem; margin: 0; line-height: 1.1; }
.find-desc { font-size: .95rem; color: var(--ink-2); margin: 0; }
.find-foot { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.price { font-family: var(--f-mono); font-size: .86rem; }
.empty { border: 1.5px dashed var(--ink); border-radius: var(--r); padding: clamp(2rem, 6vw, 4rem); text-align: center; background: var(--paper-2); }
.empty h3 { font-size: 2rem; }
.fine { font-size: .86rem; color: var(--muted); margin-top: 1.4rem; max-width: 70ch; }

/* process strip */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: var(--line); }
.step { padding: 1.4rem 1.4rem 0 0; position: relative; }
.step::before { counter-increment: s; content: "0" counter(s); font-family: var(--f-mono); font-size: .8rem; display: inline-block; background: var(--ink); color: var(--paper); padding: .15rem .6rem; border-radius: 999px; margin-bottom: .9rem; }
.step h3 { font-size: 1.6rem; margin-bottom: .3rem; }
.step p { color: var(--ink-2); font-size: .98rem; }

/* callout */
.callout { border: var(--line); border-radius: 28px; background: var(--sun); padding: clamp(1.6rem, 4vw, 3rem); display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.callout h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin: 0; }
.callout p { margin: 0; }

/* ------------------------------------------------------------- prose pages */
.page-hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem); border-bottom: var(--line); }
.page-hero h1 { font-size: clamp(3rem, 8vw, 6.8rem); line-height: .95; margin: .3em 0 0; }
.page-hero .lead { margin-top: 1.2rem; max-width: 52ch; }
.crumbs { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.prose-wrap { display: grid; grid-template-columns: 14rem minmax(0, 44rem); gap: clamp(1.5rem, 5vw, 4.5rem); padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 7vw, 6rem); }
.toc { position: sticky; top: 6rem; align-self: start; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.toc ol { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .4rem; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.prose h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 2.2em 0 .5em; scroll-margin-top: 6rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.note { border: var(--line); border-left-width: 8px; border-radius: 12px; padding: 1rem 1.2rem; background: var(--paper-2); margin: 1.4rem 0; }
.note strong { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: .3rem; }

/* contact form */
.form { display: grid; gap: 1.1rem; max-width: 40rem; }
.field label { display: block; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .4rem; }
.field input, .field textarea { width: 100%; font: inherit; color: inherit; background: #fbf8f1; border: var(--line); border-radius: 12px; padding: .8rem 1rem; transition: box-shadow .2s; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--tech); }
.field textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.alert { border: var(--line); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1.2rem; }
.alert-ok { background: #d8e6d9; }
.alert-err { background: var(--home-soft); }

/* ------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: var(--paper); padding: clamp(3rem, 6vw, 5rem) 0 2rem; position: relative; overflow: hidden; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 2rem; padding-bottom: 2.5rem; }
.site-footer h4 { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sun); margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer a { text-decoration: none; opacity: .9; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--sun); opacity: 1; }
.disclose { border: 1px solid rgb(243 237 226 / .35); border-radius: 12px; padding: .9rem 1.1rem; font-size: .9rem; max-width: 34rem; opacity: .95; }
.mega { font-family: var(--f-display); font-size: clamp(3.5rem, 15.5vw, 15rem); line-height: .8; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px rgb(243 237 226 / .5); white-space: nowrap; margin: 1.5rem 0 1rem -.04em; user-select: none; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; border-top: 1px solid rgb(243 237 226 / .25); padding-top: 1.1rem; font-size: .84rem; color: rgb(243 237 226 / .75); }

/* error page */
.err { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.err .code { font-family: var(--f-display); font-size: clamp(7rem, 24vw, 18rem); line-height: .85; color: transparent; -webkit-text-stroke: 2px var(--ink); }

/* ------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .collage { max-width: 440px; order: -1; margin-bottom: 1rem; }
  .principles, .shelves, .steps, .callout { grid-template-columns: 1fr; }
  .principle { border-right: 0; border-bottom: var(--line); }
  .principle:last-child { border-bottom: 0; }
  .steps { border-top: 0; }
  .step { border-top: var(--line); padding-bottom: 1rem; }
  .facts { grid-template-columns: 1fr; }
  .prose-wrap { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > :first-child { grid-column: 1 / -1; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head p { grid-column: 1; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: var(--line); padding: .6rem var(--gutter) 1rem; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 1rem; border-radius: 12px; }
  .site-header .bar { position: relative; }
  .badge { width: 6.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .hero .rise { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
}
@media print { body::before, .site-header, .ticker, .site-footer .mega { display: none; } body { background: #fff; } }

/* =========================================================================
   Journal (blog)
   ========================================================================= */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.journal-search { display: flex; gap: .6rem; margin-top: 1.6rem; max-width: 30rem; }
.journal-search input { flex: 1; min-width: 0; font: inherit; padding: .65rem 1.1rem; border: var(--line); border-radius: 999px; background: #fbf8f1; color: var(--ink); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .7rem; }
.post-meta.big { font-size: .78rem; margin-top: 1.4rem; }
.post-meta .tag { margin: 0; }
.tag-cat { background: var(--tech-soft); color: var(--tech); text-decoration: none; }
.tag-new { background: var(--sun); color: var(--ink); border: 1.5px solid var(--ink); }

.featured { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.2rem, 4vw, 3.2rem); align-items: center; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.featured-media { display: block; aspect-ratio: 16 / 10; border: var(--line); border-radius: 26px; overflow: hidden; box-shadow: 9px 9px 0 var(--ink); background: var(--paper-2); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.featured-media:hover { transform: translate(-3px, -3px); box-shadow: 12px 12px 0 var(--ink); }
.featured-media img, .post-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-copy h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1; }
.featured-copy h2 a, .post-body-card h3 a { text-decoration: none; }
.featured-copy h2 a:hover, .post-body-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--home); }
.featured-copy .lead { font-size: 1.1rem; max-width: 42ch; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: clamp(1rem, 2.4vw, 1.8rem); }
.post-card { display: flex; flex-direction: column; border: var(--line); border-radius: var(--r); background: #fbf8f1; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.post-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.post-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: var(--line); background: var(--paper-2); }
.post-body-card { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.post-body-card h3 { font-size: 1.55rem; margin: 0 0 .4rem; line-height: 1.08; }
.post-excerpt { font-size: .96rem; color: var(--ink-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: 2.6rem; }

.post-head { padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(1.4rem, 3vw, 2.2rem); }
.post-title { font-size: clamp(2.5rem, 6.4vw, 5.4rem); line-height: .98; letter-spacing: -.025em; margin: .35em 0 .3em; max-width: 18ch; }
.post-head .lead { max-width: 52ch; font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
.post-cover { margin: 0 0 clamp(1.5rem, 4vw, 3rem); border: var(--line); border-radius: 26px; overflow: hidden; box-shadow: 9px 9px 0 var(--ink); background: var(--paper-2); }
.post-cover img { width: 100%; height: auto; max-height: 34rem; object-fit: cover; }
.post-layout { padding-top: 0; }
.post-layout.no-toc { grid-template-columns: minmax(0, 44rem); justify-content: center; }
.post-main { min-width: 0; }

.post-body { font-size: 1.12rem; line-height: 1.75; }
.post-body > :first-child { margin-top: 0; }
.post-body h2 { margin: 2em 0 .5em; }
.post-body h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: 1.8em 0 .4em; scroll-margin-top: 6rem; }
.post-body p, .post-body li { color: var(--ink); }
.post-body a { text-decoration-color: var(--home); font-weight: 700; }
.post-body ol { padding-left: 1.3em; }
.post-body blockquote { margin: 1.8em 0; padding: .4em 0 .4em 1.3em; border-left: 8px solid var(--sun); font-family: var(--f-accent); font-style: italic; font-size: 1.5rem; line-height: 1.35; }
.post-body blockquote p { color: var(--ink); margin: 0; }
.post-body img { border: var(--line); border-radius: 16px; margin: 1.6em auto; height: auto; box-shadow: 6px 6px 0 var(--ink); }
.post-body code { font-family: var(--f-mono); font-size: .88em; background: var(--paper-3); padding: .12em .4em; border-radius: 6px; }
.post-body pre { background: var(--ink); color: var(--paper); padding: 1.1rem 1.2rem; border-radius: 14px; overflow-x: auto; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .98rem; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: var(--line); padding: .55rem .8rem; text-align: left; }
.post-body th { background: var(--paper-2); font-family: var(--f-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.post-body hr { border: 0; border-top: var(--line); margin: 2.4em 0; }

.faq { margin-top: 3rem; }
.faq h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); scroll-margin-top: 6rem; }
.faq details { border: var(--line); border-radius: 14px; background: #fbf8f1; padding: .9rem 1.2rem; margin-bottom: .7rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details[open] summary { margin-bottom: .5rem; }
.faq details p { margin: 0; color: var(--ink-2); }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.4rem; }
.preview-bar { background: var(--sun); border-bottom: var(--line); text-align: center; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; padding: .6rem 1rem; }
.latest-strip { display: grid; gap: clamp(1rem, 2.4vw, 1.8rem); }

@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .post-layout, .post-layout.no-toc { grid-template-columns: minmax(0, 1fr); }
  .post-layout .toc { position: static; border: var(--line); border-radius: 12px; padding: .9rem 1.1rem; background: var(--paper-2); }
}
.featured-h { font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1; }
.featured-h a { text-decoration: none; }
.featured-h a:hover { text-decoration: underline; text-decoration-color: var(--home); }
.more { text-align: center; margin-top: 2.2rem; }
.featured + .post-grid { margin-top: 0; }
.shelves:has(> :only-child) { grid-template-columns: 1fr; }
