/* One spacing and type scale for every routed page. */
/* The page's typeface, set once at the root, and controls take it. The body had no family at
   all (it computed to Times) and every unstyled <button>/<input>/<select> rendered in the browser
   default, Arial 13.33px -- about 58 controls, among them the story-sheet depth buttons on 7
   routes, the /concept toggle and the how-step buttons: a fourth font past the three-slot rule
   (docs/ux-audit/pages-ux-a.md cross-page 3; regressions: tests/a11y-chrome.cjs,
   tests/browser/site-fixes.mjs). One base rule, never per-page patches: :where() keeps it at zero
   specificity, so a component that sets its own font still wins. --font-sans is the brand slot
   (assets/kit/defxn-fonts.css). */
/* The type scale (docs/PRODUCT-DESIGN-LAWS.md laws 78-83): base 11px, ratio 1.618, each step rounded
   to whole px. Set once here; pages use these names and never write a raw px size. Roles: tertiary =
   captions, helper text, metadata, mono labels; secondary = body, lede, subheads, card titles; primary =
   section and panel headings; hero = a page hero; display = the one display headline of a page. micro is
   a last resort (law 81). A size between steps is a defect (law 82). */
:root {
  --fs-micro:7px; --fs-tertiary:11px; --fs-secondary:18px; --fs-primary:29px; --fs-hero:47px; --fs-display:76px;
}
:where(body) { font-family:var(--font-sans, system-ui, sans-serif); }
:where(button, input, select, textarea) { font:inherit; }
.hero-alive { --page-width:1080px; --page-gutter:clamp(20px,4cqw,56px); --page-top:clamp(32px,6cqh,64px); }
/* The notes index and the notes (/learnings, /learnings/<slug>) are pages of Ark blocks since
   2026-10-19 (W3-LEARN): their frame is css/block-page.css, so the learning-page / article-* rules
   that framed the hand-built reader are gone. */

.cta-arrow { display:inline-block; margin-left:.3em; transition:transform 220ms cubic-bezier(.2,.7,.2,1); }
/* Compact, living principle rows: number, title and link share one line; a line draws in on hover. */

/* Detail pages of the theory reuse the same rows, with a short paragraph and an onward link. */

.content-layer-path { display:flex; flex-wrap:wrap; gap:7px 18px; max-width:680px; margin:0 0 26px; }
.content-layer-path :is(a,span) { color:hsl(var(--text-faint)); font:600 9px/1.4 var(--font-mono,ui-monospace,monospace); letter-spacing:.08em; text-decoration:none; text-transform:uppercase; }
.content-layer-path a:hover,.content-layer-path a:focus-visible,.content-layer-path [aria-current="page"] { color:hsl(var(--text-strong)); }

/* One calm, resilient location control across inner pages. */
#scene .content-layer-path {
 display:inline-flex;
 flex:0 1 auto;
 flex-wrap:nowrap;
 align-items:stretch;
 align-self:flex-start;
 width:fit-content;
 max-width:100%;
 min-height:34px;
 gap:0;
 padding:3px;
 box-sizing:border-box;
 overflow:hidden;
 border:1px solid hsl(var(--border-subtle));
 border-radius:5px;
 background:hsl(var(--surface) / .52);
 box-shadow:inset 0 1px 0 hsl(var(--text-strong) / .025);
 backdrop-filter:blur(8px);
 -webkit-backdrop-filter:blur(8px);
}
#scene .content-layer-path > :is(a,span) {
 display:inline-flex;
 align-items:center;
 min-width:0;
 min-height:26px;
 padding:0 11px;
 box-sizing:border-box;
 overflow:hidden;
 color:hsl(var(--text-faint));
 font:550 9px/1 var(--font-mono,ui-monospace,monospace);
 letter-spacing:.075em;
 text-decoration:none;
 text-overflow:ellipsis;
 text-transform:uppercase;
 white-space:nowrap;
}
#scene .content-layer-path > :first-child {
 flex:0 0 auto;
 border-radius:3px;
 background:hsl(var(--reference-100));
 color:var(--signal-reference);
}
#scene .content-layer-path > :not(:first-child) {
 flex:0 1 auto;
 border-left:1px solid hsl(var(--border-subtle));
}
#scene .content-layer-path > [aria-current="page"] { color:hsl(var(--text-muted)); }
#scene .content-layer-path > a { transition:color 160ms ease,background-color 160ms ease; }
#scene .content-layer-path > a:hover,#scene .content-layer-path > a:focus-visible { background:hsl(var(--reference-200)); color:hsl(var(--text-strong)); }

@keyframes concept-rise { from { opacity:0; transform:translateY(8px); } }
:is(.concept-page,.theory-page) :is(.concept-deck,.concept-links,.theory-footer) { animation:concept-rise 520ms cubic-bezier(.2,.7,.2,1) both; }

:is(.concept-page,.theory-page) :is(.concept-links,.theory-footer) { animation-delay:560ms; }
@media(prefers-reduced-motion:reduce) {
 :is(.concept-page,.theory-page) * { animation:none !important; }
 .cta-arrow{ transition:none; }
}
@media(max-width:480px) {

 #scene .content-layer-path > :is(a,span) { padding-inline:9px; }
}
@media(max-width:620px) {
 #scene .content-layer-path { max-width:100%; }
 #scene .content-layer-path:has(> :nth-child(2)) { width:100%; }
 #scene .content-layer-path > :first-child:nth-last-child(n+3) { display:none; }
 #scene .content-layer-path > :first-child:nth-last-child(n+3) + * { border-left:0; border-radius:3px; background:hsl(var(--reference-100)); color:var(--signal-reference); }
}

.hero-atmosphere { opacity:.72; filter:blur(12px); }
.hero-alive { --mesh-opacity:.18; --mesh-blur:1.6px; }
.hero-alive[data-page="zero"] { --mesh-opacity:.22; --mesh-blur:1.35px; }
.hero-alive[data-page="concept"],.hero-alive[data-page^="concept/"],.hero-alive[data-page="about"],.hero-alive[data-page="learnings"] { --mesh-opacity:.17; --mesh-blur:1.7px; }
.hero-alive[data-page^="article/"] { --mesh-opacity:.24; --mesh-blur:1.2px; }
.hero-alive:not(.has-particle-shapes) .ark-layer-persistent > canvas[role="presentation"] { filter:blur(2px); opacity:.5; }

/* Theory pairs its explanation with a shared two-mesh iceberg, without a card. */

/* vh, not cqh: no ancestor anywhere in this project declares container-type, so cqh is invalid at
   computed-value time and height falls back to auto. That collapses to 0 on this element (an empty
   <figure>, no content to size from), which makes measureIceberg()'s bounds.height check fail and
   leaves the iceberg at its unanchored fallback placement instead of this anchor. vh needs no container. */

/* Generic version of the above for any other page that picks its own two
   shape images (admin.html -> a page's Shapes tab): same box, no concept-only
   inset variant. A page with unusual layout can still override this. */
.page-iceberg { position:absolute; right:0; top:40px; width:44%; height:min(68vh,640px); margin:0; pointer-events:none; }
@media(max-width:760px) { .page-iceberg { top:0; right:10%; width:80%; height:310px; } }
.hero-alive[data-page="concept"] { --mesh-opacity:.85; --mesh-blur:0px; }
/* With room in the left margin the onward links leave the copy and sit beside it, aligned with the studio mark.
   The page box spans the viewport so the margin is inside it; padding keeps the copy and iceberg where they were. */
@media(min-width:1400px) {

 @keyframes concept-fade { from { opacity:0; } }
}

/* Deploy (js/pages/deploy.js, a page of Ark blocks since 2026-10-19, W3-GUIDE): only its command
   card -- the figure of each step -- is the page's own. Real, copyable commands; a flat monospace
   panel, no syntax glow; labels at 12px or more. */
.deploy-command { position:relative; margin:0; padding:48px 16px 16px; background:hsl(var(--surface)); border:1px solid hsl(var(--border-default)); border-radius:10px; overflow-x:auto; }
.deploy-command::before { content:"RUN"; position:absolute; top:12px; left:16px; font:600 12px/1 var(--font-mono,monospace); letter-spacing:.24em; color:hsl(var(--text-muted)); }
.deploy-command code { font:400 13px/1.5 var(--font-mono,monospace); color:hsl(var(--text)); white-space:pre; }
/* Copy: the site's one (js/ark/page-kit.js ArkUI.copyCommand) is Ark's secondary button in an actions row, so it
   draws as every Ark button does; only where it sits is a page's choice. The status line says "copied", or when
   copying was refused what to do instead; a success is the button's own "Copied" (the line is for a screen reader), so nothing moves. */
.copy-command[hidden] { display:none; }
.copy-command-status { display:block; margin-top:8px; font:400 13px/1.5 var(--font-sans,sans-serif); color:hsl(var(--text-strong)); }
.copy-command-status:empty { display:none; }
.copy-command-status[data-state="done"] { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.deploy-command-card { position:relative; }
.deploy-command-card > .copy-command { position:absolute; top:4px; right:8px; }
