/* Tetarian Lab · site layer v3
   Sits on the Imaginarium Codex design system (tokens.css + bundle.css) and the Tetarian Lab charter.
   One grid for every page: 12 columns, 24px gutters, max 1360px, side margins from 16 to 48px.
   The signature device: each section opens like a binder divider, its tab in the colour of its series
   (kraft = the Lab, sage = the Field, blue = the Eye, red = the Hand), stepping across the columns. */

:root {
  /* Tetarian Lab charter */
  --lab-paper: #ece9e1;
  --lab-sheet: #f6f3ec;
  --lab-ink: #2e2d2c;
  --lab-ink-soft: #57534c;   /* 6.6:1 on paper */
  --lab-hair: #bfb8aa;
  --t-kraft: #cbb894;
  --t-field: #9dbba3;
  --t-eye: #93a6ff;
  --t-hand: #ff7452;
  --link: #2440c0;           /* Codex eye ink: 7.1:1 on paper */
  --mark: #b8361a;           /* Codex signal: underlines, stamps */

  /* grid */
  --max: 1360px;
  --side: max(16px, min(4vw, 48px));
  --gut: 24px;
  --sec: clamp(72px, 9vw, 128px);

  color-scheme: light;
}
@media (max-width: 819px) { :root { --gut: 16px; } }

html { background: var(--lab-paper); color: var(--lab-ink); -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--lab-paper); color: var(--lab-ink); font-family: var(--font-serif); font-size: 18px; line-height: 29px; font-optical-sizing: auto; }
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--lab-ink); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
::selection { background: var(--t-eye); color: var(--lab-ink); }

/* ── the grid ─────────────────────────────────────────── */
.frame { width: 100%; max-width: calc(var(--max) + 2 * var(--side)); margin: 0 auto; padding-left: max(var(--side), env(safe-area-inset-left, 0px)); padding-right: max(var(--side), env(safe-area-inset-right, 0px)); }
.g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); }
.g > * { min-width: 0; }
@media (max-width: 819px) { .g { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 28px; } .g > * { grid-column: 1 / -1 !important; } }

/* ── type scale (Bringhurst-ish, ratio ~1.333 from 18px) ── */
.display { margin: 0; font-family: var(--font-grotesk); font-weight: 800; letter-spacing: -.022em; line-height: .9; text-wrap: balance; }
.h2 { margin: 0; font-family: var(--font-grotesk); font-weight: 800; font-size: clamp(34px, 4.6vw, 64px); line-height: .96; letter-spacing: -.018em; text-wrap: balance; }
.h3 { margin: 0; font-family: var(--font-grotesk); font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -.01em; }
.lede { font-size: clamp(21px, 1.9vw, 25px); line-height: 1.42; }
.prose { max-width: 62ch; }
.prose > * + * { margin-top: 16px; }
.soft { color: var(--lab-ink-soft); }
.code { font-family: var(--font-mono); font-size: 13px; line-height: 18px; letter-spacing: .02em; }
.under { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ── header ───────────────────────────────────────────── */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--lab-paper); border-bottom: 1px solid var(--lab-ink); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--lab-paper); z-index: 21; }
.site-head .g { align-items: center; min-height: 68px; }
.logo { grid-column: 1 / span 3; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--lab-ink); justify-self: start; padding: 8px 0; }
.logo img { width: 112px; height: auto; }
.nav { grid-column: 4 / -1; display: flex; justify-content: flex-end; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nav a:not(.btn) { font-family: var(--font-grotesk); font-weight: 400; font-size: 15px; line-height: 1; color: var(--lab-ink); text-decoration: none; padding: 14px 0; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 819px) { .site-head .g { grid-template-columns: auto minmax(0, 1fr); } .site-head .g > * { grid-column: auto !important; } .nav .hide-sm { display: none; } .logo img { width: 96px; } }

/* ── buttons ──────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 24px; border: 1.5px solid var(--lab-ink); border-radius: 0; background: var(--lab-ink); color: var(--lab-paper); font-family: var(--font-grotesk); font-weight: 800; font-size: 16px; line-height: 1; letter-spacing: 0; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, color .15s ease, transform .16s cubic-bezier(.23,1,.32,1); }
.btn:hover { background: var(--link); border-color: var(--link); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.line { background: transparent; color: var(--lab-ink); }
.btn.line:hover { background: var(--lab-sheet); color: var(--link); border-color: var(--link); }
.btn.small { min-height: 42px; padding: 10px 16px; font-size: 14px; }
.btn[aria-disabled="true"] { background: transparent; color: var(--lab-ink); cursor: default; }
.btn[aria-disabled="true"]:hover { background: var(--lab-sheet); color: var(--lab-ink); border-color: var(--lab-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (max-width: 420px) { .actions .btn { width: 100%; white-space: normal; } }

/* ── binder dividers: the section tabs ────────────────── */
.sec { padding-block: var(--sec); }
.sec + .sec { padding-top: 0; }
.divider { position: relative; margin-bottom: clamp(36px, 4.5vw, 64px); }
.divider .g { align-items: end; }
.divider::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--lab-ink); }
.tab { grid-column: var(--c, 1) / span 3; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 16px 11px; background: var(--tab, var(--t-kraft)); border: 1.5px solid var(--lab-ink); border-bottom: 0; border-radius: 10px 10px 0 0; position: relative; z-index: 1; color: var(--lab-ink); }
.tab b { font-family: var(--font-grotesk); font-weight: 400; font-size: 17px; line-height: 1.1; }
.tab .code { font-size: 12px; }
.tab-kraft { --tab: var(--t-kraft); } .tab-field { --tab: var(--t-field); } .tab-eye { --tab: var(--t-eye); } .tab-hand { --tab: var(--t-hand); }
@media (max-width: 819px) { .tab { grid-column: var(--m, 1) / span 3 !important; } }

/* ── hero ─────────────────────────────────────────────── */
.hero { padding-block: clamp(40px, 6vw, 88px) var(--sec); }
.hero + .sec, .band + .sec { padding-top: 0; }
.hero .g { row-gap: 40px; align-items: start; }
.hero-copy { grid-column: 1 / span 7; display: grid; gap: 28px; align-content: start; }
.hero h1 { font-size: clamp(46px, 6.1vw, 90px); }
.hero h1 span { display: block; }
.hero .kicker { font-style: italic; font-size: clamp(23px, 2.2vw, 30px); line-height: 1.3; max-width: 26ch; }
.hero .lede { max-width: 34ch; }
.hero-shot { grid-column: 8 / span 5; margin: 0; position: relative; }
.hero-shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 42%; background: #2c3a33; }
.hero-shot figcaption { margin-top: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; color: var(--lab-ink-soft); font-size: 16px; line-height: 24px; }
.hero-shot figcaption .code { white-space: nowrap; }
.kraft-tag { background: var(--t-kraft); color: var(--lab-ink); border: 1.5px solid var(--lab-ink); transform: rotate(-1.4deg); width: max-content; max-width: 100%; display: grid; }
.kraft-tag > div { display: grid; grid-template-columns: 84px auto; }
.kraft-tag > div + div { border-top: 1px solid var(--lab-ink); }
.kraft-tag span { padding: 7px 10px; }
.kraft-tag span + span { border-left: 1px solid var(--lab-ink); font-family: var(--font-grotesk); font-weight: 800; font-size: 14px; line-height: 18px; }
.kraft-tag .code { font-size: 12px; }
@media (min-width: 820px) { .hero-shot .kraft-tag { position: absolute; left: -48px; bottom: 64px; } }

/* ── recognition ─────────────────────────────────────── */
.sign-head { grid-column: 1 / span 4; display: grid; gap: 20px; align-content: start; }
.signs { grid-column: 6 / span 7; list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--lab-ink); }
.signs li { display: grid; grid-template-columns: 40px minmax(0, 1fr); padding: 20px 0; border-bottom: 1px solid var(--lab-hair); font-size: clamp(20px, 1.8vw, 24px); line-height: 1.4; }
.signs li::before { content: "◆"; font-size: 12px; color: var(--link); line-height: 2.6; }
.signs-after { grid-column: 6 / span 7; margin-top: 32px; display: grid; gap: 24px; }


/* ── three layers: three folders ─────────────────────── */
.method-head { grid-column: 1 / span 6; display: grid; gap: 20px; }
.method-note { grid-column: 8 / span 5; align-self: end; }
.layers { margin-top: clamp(40px, 5vw, 72px); row-gap: 40px; }
.folder { grid-column: span 4; display: grid; align-content: start; }
.folder-tab { width: 62%; padding: 10px 14px 8px; border: 1.5px solid var(--lab-ink); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--tab); display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-grotesk); font-size: 15px; }
.folder:nth-child(2) .folder-tab { margin-left: 19%; }
.folder:nth-child(3) .folder-tab { margin-left: 38%; }
.folder-body { border: 1.5px solid var(--lab-ink); background: var(--lab-sheet); display: grid; }
.folder-body img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #fff; border-bottom: 1.5px solid var(--lab-ink); filter: grayscale(1) contrast(1.06); }
.folder-body .in { padding: 22px 22px 26px; display: grid; gap: 12px; }
.folder-body p { font-size: 17px; line-height: 27px; }

/* ── contents ─────────────────────────────────────────── */
.toc-wrap { grid-column: 1 / span 6; }
.toc { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1.5px solid var(--lab-ink); }
.toc li { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--lab-hair); font-size: 18px; line-height: 25px; }
.toc li .code { color: var(--lab-ink-soft); }
.toc li.bx .code { color: var(--mark); }
.inside-side { grid-column: 8 / span 5; display: grid; gap: 32px; align-content: start; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--lab-ink); }
.facts > div { padding: 14px 0 16px; border-bottom: 1px solid var(--lab-hair); display: grid; gap: 4px; }
.facts > div:nth-child(odd) { padding-right: 12px; }
.facts > div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--lab-hair); }
.facts > div { min-width: 0; }
.facts b { font-family: var(--font-grotesk); font-weight: 800; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.1; }
.facts .code { color: var(--lab-ink-soft); }
.plate { margin: 0; display: grid; gap: 10px; }
.plate img { background: #fff; padding: 12px; border: 1px solid var(--lab-hair); }
.plate figcaption { color: var(--lab-ink-soft); }

/* ── sample practice ─────────────────────────────────── */
.sample-win { grid-column: 1 / span 7; }
.sample-win .cx-win { max-width: none; }
.sample-side { grid-column: 9 / span 4; display: grid; gap: 20px; align-content: start; }

@media (max-width: 520px) { .cx-win__menu { display: none; } .cx-win .cx-code { font-size: 12px; } }

/* ── ink band: the transmission ──────────────────────── */
.band { background: var(--lab-ink); color: var(--lab-paper); padding-block: clamp(80px, 10vw, 144px); margin-block: 0 var(--sec); }
.band blockquote { grid-column: 2 / span 10; margin: 0; display: grid; gap: 28px; }
.band blockquote p { font-style: italic; font-size: clamp(30px, 3.7vw, 52px); line-height: 1.22; letter-spacing: -.005em; text-wrap: balance; }
.band footer { display: flex; align-items: center; gap: 16px; color: #c9c4b8; }
.band footer img { width: 72px; }

/* ── origin ───────────────────────────────────────────── */
.origin-file { grid-column: 1 / span 5; display: grid; gap: 24px; align-content: start; }
.idcard { border: 1.5px solid var(--lab-ink); background: var(--lab-sheet); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.idcard > div { min-width: 0; overflow-wrap: anywhere; padding: 12px 14px 14px; display: grid; gap: 6px; border-top: 1px solid var(--lab-ink); }
.idcard > div:nth-child(-n+2) { border-top: 0; }
.idcard > div:nth-child(even) { border-left: 1px solid var(--lab-ink); }
.idcard > div.full { grid-column: 1 / -1; border-left: 0; }
.idcard .code { color: var(--lab-ink-soft); font-size: 12px; }
.idcard b { font-family: var(--font-grotesk); font-weight: 800; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.2; }
.idcard .full b { font-family: var(--font-serif); font-weight: 400; font-style: italic; font-size: 21px; line-height: 1.4; }
.origin-text { grid-column: 7 / span 6; }


/* ── plates ───────────────────────────────────────────── */
.received { grid-column: 1 / span 5; margin: 0; display: grid; gap: 12px; }
.received__frame { position: relative; background: #fff; padding: 16px; border: 1px solid var(--lab-hair); overflow: hidden; }
.received__frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; transition: opacity .18s ease-out; }
.received.swapping img { opacity: 0; }
.received__stamp { position: absolute; right: 20px; bottom: 24px; transform: rotate(-8deg); color: var(--mark); background: rgba(255,255,255,.85); }
.received__cap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rx-btn { min-height: 44px; padding: 8px 14px; background: transparent; border: 1.5px solid var(--lab-ink); color: var(--lab-ink); font-family: var(--font-grotesk); font-size: 15px; cursor: pointer; }
.rx-btn:hover { color: var(--link); border-color: var(--link); }
.plates-side { grid-column: 7 / span 6; display: grid; gap: 28px; align-content: start; }
.dossier-link { display: grid; gap: 14px; text-decoration: none; color: var(--lab-ink); }
.fan { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--t-kraft); border: 1.5px solid var(--lab-ink); overflow: hidden; }
.fan img { position: absolute; top: 14%; width: 30%; padding: 6px; background: #fff; transition: transform .35s cubic-bezier(.23,1,.32,1); }
.fan img:nth-child(1) { left: 12%; transform: rotate(-7deg); }
.fan img:nth-child(2) { left: 35%; top: 9%; transform: rotate(1deg); z-index: 1; }
.fan img:nth-child(3) { left: 58%; transform: rotate(6deg); }
@media (hover: hover) {
  .dossier-link:hover .fan img:nth-child(1) { transform: rotate(-11deg) translate(-10px, -6px); }
  .dossier-link:hover .fan img:nth-child(2) { transform: translateY(-12px); }
  .dossier-link:hover .fan img:nth-child(3) { transform: rotate(10deg) translate(10px, -6px); }
}
.dossier-link .row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.dossier-link .h3 { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; text-decoration-thickness: 2px; transition: text-decoration-color .15s ease; }
.dossier-link:hover .h3 { text-decoration-color: var(--mark); }


/* ── offer ────────────────────────────────────────────── */
.offer { grid-column: 1 / span 6; align-self: start; border: 1.5px solid var(--lab-ink); background: var(--lab-sheet); }
.offer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1.5px solid var(--lab-ink); background: var(--t-kraft); }
.offer-head b { font-family: var(--font-grotesk); font-weight: 800; font-size: 17px; }
.offer-body { padding: 28px 20px 24px; display: grid; gap: 24px; }
@media (min-width: 820px) { .offer-body { padding: 36px 32px 28px; } }
.price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.price b { font-family: var(--font-grotesk); font-weight: 800; font-size: clamp(72px, 7vw, 104px); line-height: .85; letter-spacing: -.03em; }
.offer ul { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--lab-hair); }
.offer li { display: grid; grid-template-columns: 28px minmax(0, 1fr); padding: 12px 0; border-bottom: 1px solid var(--lab-hair); font-size: 17px; line-height: 26px; }
.offer li::before { content: "◆"; font-size: 11px; color: var(--link); }
.offer .btn { width: 100%; }
.offer .fine { color: var(--lab-ink-soft); font-size: 15px; line-height: 23px; }
.offer-cover { grid-column: 8 / span 5; margin: 0; display: grid; gap: 10px; align-content: start; }
.offer-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.offer-cover figcaption { color: var(--lab-ink-soft); }
.offer-after { grid-column: 1 / span 6; margin-top: 24px; }
@media (max-width: 819px) { .offer-cover { margin-top: 12px; max-width: 420px; } .signs-after { margin-top: 0; } }

/* ── faq ──────────────────────────────────────────────── */
.faq { grid-column: 1 / span 7; }
.faq details:first-of-type { border-top: 1.5px solid var(--lab-ink); }
.faq details { border-bottom: 1px solid var(--lab-hair); }
.faq summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 16px; padding: 22px 0; font-family: var(--font-grotesk); font-weight: 800; font-size: 21px; line-height: 1.2; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-weight: 400; text-align: right; color: var(--lab-ink-soft); }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--link); }
.faq details p { padding: 0 44px 24px 0; max-width: 62ch; }
.faq-side { grid-column: 9 / span 4; align-self: start; position: relative; }
.faq-side .card { border: 1.5px solid var(--lab-ink); background: var(--t-kraft); padding: 28px 24px; display: grid; gap: 16px; transform: rotate(-1deg); }
@media (max-width: 819px) { .faq-side { margin-top: 12px; } }

/* ── footer ───────────────────────────────────────────── */
.site-foot { background: var(--lab-ink); color: var(--lab-paper); padding-block: 72px 48px; }
.site-foot .g { row-gap: 40px; }
.foot-brand { grid-column: 1 / span 4; display: grid; gap: 18px; align-content: start; }
.foot-brand img { width: 168px; }
.foot-brand p { color: #c9c4b8; font-style: italic; font-size: 20px; line-height: 1.4; }
.foot-links { grid-column: 7 / span 6; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; align-content: start; }
.foot-links a { color: var(--lab-paper); text-decoration: none; font-family: var(--font-grotesk); font-size: 16px; padding: 6px 0; justify-self: start; }
.foot-links a:hover { text-decoration: underline; text-decoration-color: var(--t-hand); text-underline-offset: 5px; }
.foot-meta { grid-column: 1 / -1; border-top: 1px solid #57534c; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: #c9c4b8; }

/* ── legal ────────────────────────────────────────────── */
.legal-main { padding-block: clamp(40px, 6vw, 88px) var(--sec); }
.legal-toc { grid-column: 1 / span 3; align-self: start; position: sticky; top: 100px; display: grid; gap: 10px; }
.legal-toc a { font-family: var(--font-grotesk); font-size: 16px; color: var(--lab-ink); text-decoration: none; }
.legal-toc a:hover { color: var(--link); }
.legal-body { grid-column: 5 / span 7; }
.legal-body h1 { font-size: clamp(44px, 5.6vw, 80px); }
.legal-body h2 { margin: 56px 0 14px; font-family: var(--font-grotesk); font-weight: 800; font-size: 30px; line-height: 1.05; scroll-margin-top: 100px; }
.legal-body p + p, .legal-body ul + p { margin-top: 14px; }
.legal-body ul { margin: 14px 0; padding-left: 22px; display: grid; gap: 10px; }
@media (max-width: 819px) { .legal-toc { position: static; margin-bottom: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* hero on kraft (the Lab's own colour) */
.hero { background: var(--t-kraft); border-bottom: 1.5px solid var(--lab-ink); }
.hero + .sec { padding-top: var(--sec); }
.hero .kraft-tag { background: var(--lab-paper); }
.hero-shot figcaption { color: var(--lab-ink); }
.hero .btn.line:hover { background: var(--lab-paper); }

/* home: the LAB tab of the logo is the tab of the kraft hero folder */
.site-head.on-kraft { border-bottom: 0; }
.site-head.on-kraft::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--lab-ink); z-index: 0; pointer-events: none; }
.site-head.on-kraft .logo { position: relative; z-index: 1; align-self: end; padding: 14px 0 0; }
.site-head.on-kraft .logo img { display: block; }
.site-head.on-kraft.past-hero::after { z-index: 2; }
.site-head.on-kraft + main .hero { border-top: 0; }

/* the first divider sits right on the kraft hero: its tab rises into the kraft, its rule is the hero's edge */
.tab { height: 44px; padding-block: 0; align-items: center; }
.hero { border-bottom: 0; }
.hero + .sec { padding-top: 0; }
.hero + .sec > .divider:first-child { margin-top: -44px; z-index: 1; }

/* the three layer folders: every tab sits on the left edge of its own folder */
.folder:nth-child(2) .folder-tab, .folder:nth-child(3) .folder-tab { margin-left: 0; }

/* The Hand folder: frame the lower part of plate 06, where the hands draw */
.folder-body img.focus-low { object-position: 50% 80%; }

/* contents: three plates side by side */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trio img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; padding: 8px; }

/* free practice: the window runs the full height of the text beside it */
@media (min-width: 820px) {
  .sample-win { display: flex; align-self: stretch; }
  .sample-win .cx-win { flex: 1; display: flex; flex-direction: column; }
  .sample-win .cx-win__body { flex: 1; display: flex; flex-direction: column; }
  .sample-win .cx-code { flex: 1; }
}

/* contents: the three plates lie on the desk like loose sheets, filling the bottom right of the section */
.inside-side { display: flex; flex-direction: column; gap: 32px; }
.plate-trio { margin-top: auto; }
.trio { display: block; position: relative; aspect-ratio: 1 / 1.08; }
.trio img { position: absolute; width: 54%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; padding: 10px; background: #fff; border: 1px solid var(--lab-hair); transition: transform .3s cubic-bezier(.23,1,.32,1); }
.trio img:nth-child(1) { left: 1%; top: 1%; transform: rotate(-4deg); }
.trio img:nth-child(2) { right: 1.5%; top: 7%; transform: rotate(3deg); }
.trio img:nth-child(3) { left: 21%; top: 31%; transform: rotate(-1.5deg); z-index: 1; }
@media (hover: hover) { .trio img:hover { transform: rotate(0deg) translateY(-6px); z-index: 2; } }
.plate-trio figcaption { margin-top: 8px; }

/* transmission band: the full Tetarian Lab mark, light wordmark on ink */
.band footer img.band-logo { width: 132px; height: auto; }
.band footer { gap: 24px; }

/* the loose plates: true black and white, like the photocopy plates of the Codex */
.trio img { filter: grayscale(1) contrast(1.2) brightness(1.06); }

/* the divider after the ink band sits right on it, like the one under the hero */
.band { margin-bottom: 0; }
.band + .sec { padding-top: 0; }
.band + .sec > .divider:first-child { margin-top: -44px; z-index: 1; }

/* transmission band: the signature alone, left-aligned, in Neue Machina */
.band footer { justify-content: flex-start; font-family: var(--font-grotesk); font-weight: 800; font-size: 17px; line-height: 1.3; color: #ece9e1; }

/* sections alternate between the paper and a lighter sheet of the same paper;
   every divider sits on the edge between two sections, its tab rising into the one above */
:root { --lab-paper-light: #f6f4ef; }
.sec { background: var(--lab-paper); }
.sec.sec-light { background: var(--lab-paper-light); }
.sec + .sec > .divider:first-child { margin-top: -44px; z-index: 1; }

/* the RECEIVED stamp: red ink pressed onto the plate (multiply), no white backing */
.received__stamp { background: transparent; color: #c22a14; border-color: currentColor; mix-blend-mode: multiply; opacity: .92; }
.received__frame { isolation: isolate; }

/* equal heights inside a section (desktop): the two columns of Plates and of the offer end on the same line */
@media (min-width: 820px) {
  .plates-side { display: flex; flex-direction: column; }
  .plates-side .dossier-link { flex: 1; display: flex; flex-direction: column; }
  .plates-side .fan { flex: 1; aspect-ratio: auto; min-height: 300px; }
  .received { align-self: start; }
  .received__frame img { display: block; }
  .offer { align-self: stretch; display: flex; flex-direction: column; }
  .offer-body { flex: 1; display: flex; flex-direction: column; }
  .offer .btn { margin-top: auto; }
  .offer-cover { position: relative; align-self: start; }
  .offer-cover figcaption { position: absolute; top: 100%; left: 0; right: 0; padding-top: 10px; }
}

/* keep each divider's negative margin inside its own section, so the tab rises into the section above
   instead of dragging the whole section (and its background) up over it */
.sec { display: flow-root; }

/* home: the whole file is kraft. Sections alternate between kraft and a lighter kraft;
   muted text and hairlines are darkened so they still read on kraft */
:root { --lab-kraft-light: #ddd2bb; }
.sec { background: var(--lab-kraft-light); }
.sec.sec-kraft { background: var(--t-kraft); }
.sec { --lab-ink-soft: #46423c; --lab-hair: #9d8f72; }
.sec .soft, .sec .fine, .sec figcaption, .sec .toc li .code, .sec .facts .code, .sec .idcard .code { color: var(--lab-ink-soft); }

/* offer card: dark header bar */
.offer-head { background: var(--lab-ink); color: var(--lab-paper); }
.offer-head .code { color: #c9c4b8; }

/* the confidential file preview: plates on the dark desk, like the gallery */
.fan { background: var(--lab-ink); }

/* other pages: the logo rests on the header's bottom rule, its tabs closed by that rule */
.site-head:not(.on-kraft) .logo { align-self: end; position: relative; top: 1px; padding: 14px 0 0; }
.site-head:not(.on-kraft) .logo img { display: block; }

/* nav hover: a red rubber stamp pressed onto the link, with a subtle settling rotation */
.nav { gap: clamp(4px, 1vw, 14px); }
.nav a:not(.btn) { position: relative; padding: 7px 10px 6px; border: 2px solid transparent; text-decoration: none !important; transition: color .12s ease; }
.nav a:not(.btn):hover, .nav a:not(.btn):focus-visible, .nav a[aria-current="page"] { color: #c22a14; border-color: currentColor; mix-blend-mode: multiply; transform: rotate(-3deg); }
.nav a:not(.btn):hover, .nav a:not(.btn):focus-visible { animation: nav-stamp .34s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes nav-stamp {
  0%   { transform: scale(1.22) rotate(4deg); opacity: .35; }
  60%  { transform: scale(.97) rotate(-4deg); opacity: 1; }
  100% { transform: scale(1) rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) { .nav a:not(.btn):hover, .nav a:not(.btn):focus-visible { animation: none; } }

/* the three layer folders share one height: the body of each folder stretches to the tallest */
.layers { align-items: stretch; }
.folder { display: flex; flex-direction: column; }
.folder-body { flex: 1; display: flex; flex-direction: column; }
.folder-body .in { flex: 1; align-content: start; }

/* diagnostic: the one dark section of the home page */
.sec.sec-dark { background: var(--lab-ink); color: var(--lab-paper); --lab-ink-soft: #c9c4b8; --lab-hair: #57534c; }
.sec-dark .divider::after { background: var(--lab-paper); }
.sec-dark .h2, .sec-dark .lede { color: var(--lab-paper); }
.sec-dark .signs { border-top-color: var(--lab-paper); }
.sec-dark .signs li::before { color: var(--t-eye); }
.sec-dark .btn.line { color: var(--lab-paper); border-color: var(--lab-paper); }
.sec-dark .btn.line:hover { background: var(--t-eye); color: var(--lab-ink); border-color: var(--t-eye); }
.sec-dark a:not(.btn) { color: var(--t-eye); }
.sec-dark :focus-visible { outline-color: var(--t-eye); }

/* footer: social links as icons, followed by the handle */
.foot-social { display: flex; align-items: center; gap: 4px; }
.foot-social a { display: inline-grid; place-items: center; width: 40px; height: 44px; padding: 0; color: var(--lab-paper); transition: color .15s ease, transform .16s cubic-bezier(.23,1,.32,1); }
.foot-social a:first-child { justify-items: start; width: 32px; }
.foot-social a:hover, .foot-social a:focus-visible { color: var(--t-hand); text-decoration: none; transform: rotate(-6deg); }
.foot-handle { margin-left: 8px; font-family: var(--font-grotesk); font-size: 16px; color: var(--lab-paper); }
@media (prefers-reduced-motion: reduce) { .foot-social a:hover { transform: none; } }

/* footer: the contact address sits on the same line as the social row, at the bottom of the column */
.foot-links { align-self: stretch; grid-template-rows: repeat(3, auto) 1fr; }
.foot-links a[data-contact] { grid-column: 1 / -1; align-self: end; display: inline-flex; align-items: center; min-height: 44px; padding: 0; }

/* footer: copyright line in the mono face, like the file codes */
.foot-meta > span:first-child { font-family: var(--font-mono); font-size: 13px; line-height: 18px; letter-spacing: .02em; }
