/* Fixed token layer: pens, radii, the 24 px module, type, motion and every semantic colour. It is the same for every
   house, so meaning never moves. Line: three pen weights, solid exists, dashed proposed. Colour (UI v2): warm paper
   ground, graphite ink, blue for selection and a person's own edits, orange for aich alone. Shape: soft corners.
   Elevation: a hairline at rest, one soft shadow under what floats. */
:root {
  /* Materials. The neutral ground is warm paper on a drafting mat; hardware is quiet white. */
  --concrete-1: #f4f2ed;
  --concrete-2: #e6e3db;
  --concrete-3: #ddd9cf;
  --concrete-4: #cfcac0;     /* a joint: the 1 m grid */
  --alu-1: #f8f7f3;
  --alu-2: #eeebe4;          /* bars, wells and tracks */
  --alu-3: #d6d2c8;
  --alu-4: #a8a39a;
  --alu-5: #5f5b55;
  /* Ground, from back to front. --mat, --paper and --panel follow the project layer (project.css). */
  --mat-line: var(--concrete-4);
  --well: var(--alu-2);
  --face: linear-gradient(var(--surface), var(--surface));
  --surface: #ffffff;        /* cards, bars, fields, dialogs */
  --people: var(--surface);
  --people-ink: var(--ink);
  /* Ink */
  --ink: #1b1e20;
  --ink-2: #4a4f53;
  --ink-3: #63686c;          /* notes and help; 5.0:1 on the page */
  --muted: var(--ink-3);
  /* Pens: fine for dividers and grid, medium for a component's outline, heavy for the cut (selection, focus) */
  --pen-fine: #1b1e2021;
  --pen-medium: #1b1e2038;
  --pen-heavy: var(--ink);
  --lw-fine: 1px;
  --lw-medium: 1px;
  --lw-heavy: 2px;
  --line: var(--pen-fine);
  --line-2: var(--pen-medium);
  --draft: #1b1e208c;        /* the pen for symbols and dimension lines */
  /* Fills are ink at low alpha: tracks, wells, hover and pressed */
  --fill: #1b1e200a;
  --fill-2: #1b1e2012;
  --fill-3: #1b1e201c;
  /* Accent: selection and a person's own edits. Not the primary button. */
  --accent: #2f5bea;
  --accent-strong: #1e3fae;
  --accent-soft: #e6ecfd;
  --accent-ink: #ffffff;
  /* Agent: aich alone, when it asks, answers or works. Never a selection. */
  --agent: #c2410c;
  --agent-strong: #9a330a;
  --agent-soft: #fbe6d8;
  --agent-line: #e9b99b;
  --agent-ink: #ffffff;
  /* Mark: something a person pinned */
  --mark: var(--ink);
  --mark-ink: #ffffff;
  --mark-soft: #eeebe4;
  --mark-text: var(--ink);
  /* States only. Redline is markup between rounds; nothing else is red except a failure. */
  --redline: #c8281e;
  --ok: #1f7a4d;
  --ok-soft: #e3f1e8;
  --warn: #8a5a00;
  --warn-soft: #fbefd3;
  --bad: #b42318;
  --bad-strong: #8f1e18;
  --bad-soft: #fde7e4;
  --ai: #6d3fd0;             /* an AI illustration, never the design */
  --ai-soft: #f0eafd;
  --sent: #63686c;            /* sent or declined: white text reads at 5:1 */
  /* Structure members by kind: a discussion palette, apart from the state colours */
  --structure-column: #1f5fa8;
  --structure-beam: #c08a1e;
  --structure-wall: #5b6770;
  --structure-slab: #8a9aa3;
  --structure-footing: #7a5a40;
  --structure-pile: #4a3628;
  /* Electrical points by kind, distribution boards, and the marks a pick sets on the model */
  --systems-light: #c98a00; --systems-switch: #1f5fa8; --systems-socket: #2e8b57;
  --systems-double-socket: #1d6b43; --systems-outdoor-socket: #0f7c84; --systems-spur: #a94087;
  --systems-equipment: #863112; --systems-data: #711eb5; --systems-floor-box: #5b6770;
  --systems-board: #26262a; --systems-mark: #e0442a;
  --water-cold: #1f6fd1; --water-hot: #c4372b; --water-waste: #7a5a2e; --water-soil: #4a3a22;
  --water-rain: #0f8a8c; --water-effluent: #6b7a2a; --water-vent: #8a8f96; --water-fixture: #26262a;
  --water-tank: #5b6770;
  /* A structure check's utilisation: green to 0.5, amber below 1.0, red from 1.0, grey not checked */
  --structure-use-ok: #2e8b57;
  --structure-use-warn: #d99a1e;
  --structure-use-bad: #c62f25;
  --structure-use-none: #a3a3a8;
  --scrim: #14181a4d;        /* the sheet behind a dialog or drawer is dimmed */
  --veil: #f4f2edf0;         /* caption band over the stage */
  /* The primary button is ink */
  --btn-top: var(--ink);
  --btn-bottom: var(--ink);
  --btn-top-hover: var(--ink-2);
  --btn-bottom-hover: var(--ink-2);
  --btn-edge: transparent;
  --btn-ring: var(--ink);
  --btn-ink: #ffffff;
  /* Focus */
  --focus: var(--ink);
  --focus-soft: #1b1e2014;
  /* Type: a grotesque for reading, its mono for measures and state, a serif for display. Chinese and Thai fall back
     per script (scripts.css). Instrument Serif has one weight: display text sets on --weight-display. */
  --font-body: "Geist Variable", "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;   /* page titles, round names, figures */
  --font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;   /* measures, state */
  --weight-display: 400;
  --text-figure: 12px;
  /* Charts: every colour an alias of a frozen token (team-ui/TEAM.md §8). */
  --chart-mark: var(--ink);
  --chart-context: var(--sent);
  --chart-pick: var(--accent);
  --chart-wash: var(--fill-2);
  --chart-pick-wash: var(--accent-soft);
  --chart-grid: var(--pen-fine);
  --chart-tick: 11px;
  --chart-line-w: 2px;
  --chart-bar: 12px;
  /* Type scale: six steps. A label or heading sets one line on --line-tight; prose (note, control, body)
     wraps on --line-body; a figure alone in a control sets on --line-flat. */
  --text-note: 12px;         /* meta, captions, counts */
  --text-control: 13px;      /* buttons, fields, list rows */
  --text-body: 14px;         /* reading text */
  --text-title: 15px;        /* the name of a project, card or panel */
  --text-heading: 18px;      /* a section of a page or dialog */
  --text-page: 28px;         /* one per page, display family */
  /* Outside the scale: display figures, the touch field size iOS does not zoom, and lettering in symbols. */
  --text-clock: 32px;
  --text-hero: 44px;
  --text-input-touch: 16px;
  --text-letter: 11px;
  --track-letter: 0.07em;
  /* Three weights: regular reads, medium is a control or label, strong is a name or the chosen item. */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-strong: 600;
  --track-tight: -0.022em;
  --line-body: 1.5;
  --line-tight: 1.25;
  --line-flat: 1;
  /* Space: one 4 px step; --space-half is the gap inside a segmented group or between a mark and its text. */
  --space-half: 2px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --gutter: 24px;
  /* Shape */
  --radius-badge: 999px;
  --radius-inner: 7px;
  --radius-control: 9px;
  --radius-chip: 9px;
  --radius-card: 12px;
  --radius-dialog: 14px;
  --radius-sheet: 18px;
  --radius-round: 999px;
  --radius-pin: 999px 999px 999px 3px;   /* a pin's tail sits at its anchor, bottom left */
  /* Borders */
  --border: 1px solid var(--pen-fine);
  --border-control: 1px solid var(--pen-medium);
  --border-selected: 2px solid var(--accent);
  --focus-ring: 2px solid var(--ink);
  --focus-offset: 2px;
  /* Elevation: a hairline at rest; one soft shadow under what floats (a card over the stage, a menu, a sheet).
     Component sheets read these tokens and never write a shadow of their own. */
  --shade: #14181a1f;
  --shadow-edge: 0 0 0 1px var(--pen-fine);
  --shadow-1: 0 0 0 1px var(--pen-medium), 0 1px 0 #1b1e200a;
  --shadow-card: 0 0 0 1px var(--pen-fine);
  --shadow-lift: 0 0 0 2px var(--pen-heavy);
  --shadow-2: 0 0 0 1px var(--pen-fine), 0 8px 22px var(--shade);
  --shadow-3: 0 0 0 1px var(--pen-medium), 0 16px 36px #14181a2e;
  --well-inset: inset 0 0 0 1px var(--pen-fine);
  --edge-alu: 0 0 0 1px var(--pen-medium);
  --brush: none;
  --reveal-lit: #ffffff80;
  /* Layers */
  --z-stage-overlay: 1;      /* notices and legends on the stage */
  --z-stage-raised: 2;       /* stage editors above those notices */
  --z-stage-control: 3;
  --z-pin: 4;
  --z-card: 5;
  --z-sheet: 20;
  --z-drawer: 30;
  --z-dialog: 40;
  --z-toast: 50;
  /* v6 layers: member kinds (structure, later systems), utilisation steps, the ghosted architecture and the
     width of an open stage row. Fixed layer: construction styles never set these. */
  --kind-1: #3f71c0; --kind-2: #a94087; --kind-3: #711eb5; --kind-4: #497b11; --kind-5: #863112;
  --use-1: #c9c6bd; --use-2: #8f8c84; --use-3: #45433f;
  /* Build phases: one swatch per phase of the indicative construction sequence, ground to finishes. */
  --build-site: #8a7a5c; --build-foundations: #6b4f3a; --build-frame: #3f71c0; --build-slab: #5d8fd6;
  --build-walls: #8f8c84; --build-roof: #863112; --build-openings: #a9c4d6; --build-finishes-outside: #497b11;
  --build-finishes-inside: #a94087; --build-services: #711eb5; --build-external: #6f8f4a;
  /* 3D print kit: a colour per part kind (alternate floors take the second), and what is not printed. */
  --kit-tray: #d9d5c9; --kit-tray-alt: #b9b4a6; --kit-lid: #b4532e; --kit-stand: #5d8fd6;
  --kit-detached: #8f8c84; --kit-mark: #b3261e;
  /* Site progress against the sequence: done, behind the plan, under way, not started. */
  --site-done: #17734a; --site-behind: #b3261e; --site-under-way: #c08a1e; --site-not-started: #c9c6bd;
  --ghost-fill: #ffffff59; --ghost-line: #1b1e2047;
  --layer-w: 288px;
  /* Sizes from the module M = 24 px */
  --control-h: 36px;
  --control-h-touch: 48px;
  --segment-h: 30px;
  --bar-h: 48px;
  --bar-h-phone: 48px;
  --panel-w: 360px;
  --drawer-w: 384px;
  --dialog-w: 432px;
  --content-w: 1200px;
  /* Model colours: lit the same in every project */
  --model-card: #f6f5f1;
  --model-edge: #26262a;
  --model-glass: #a9c4d6;
  /* Motion: short, eased out, entrances and state changes only */
  --motion-fast: 160ms;
  --motion-base: 220ms;
  --motion-slow: 300ms;
  --motion-draw: 360ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-drop: cubic-bezier(0.3, 1.25, 0.55, 1);
  --loop-brick: 1600ms;
  --stagger-brick: 120ms;
  --loop-plan: 3200ms;
  --stagger-plan: 190ms;
  --loop-dougong: 4400ms;
  --stagger-dougong: 260ms;
  --loop-spin: 800ms;
  --loop-pulse: 1600ms;
  --loop-sheen: 1800ms;
  --toast-life: 5000ms;
}

/* Project token layer: the --p-* tokens are the only values a construction style may set. This file holds the neutral
   set (UI v2 warm paper): before a construction is chosen, on the home page, and inside dialogs and toasts. --paper,
   --mat and --panel are re-declared wherever --p-* changes, because a custom property resolves where it is declared. */
:root {
  --p-ground: #f4f2ed;
  --p-ground-tex: none;
  --p-stage: #e6e3db;
  --p-stage-tex: none;
  --p-plane: #f4f2ed;
  --p-plane-tex: none;
  --p-note: #ffffff;
  --p-note-tex: none;
  --p-metal: #eeebe4;
  --p-joint: transparent;
  --p-joint-w: 0px;
  --p-display: var(--font-body);
}
:root, [data-construction] {
  --paper: var(--p-ground);
  --mat: var(--p-stage);
  --panel: var(--p-plane);
}
/* Fixed layer: money and decisions reset the project tokens inside dialogs and confirmations. */
:is(dialog, .comment-confirm, .project-settings, .toast-region) {
  --p-ground: #f4f2ed; --p-ground-tex: none; --p-stage: #e6e3db; --p-stage-tex: none;
  --p-plane: #f4f2ed; --p-plane-tex: none; --p-note: #ffffff; --p-note-tex: none; --p-metal: #eeebe4;
  --p-joint: transparent; --p-joint-w: 0px; --p-display: var(--font-body);
}

/* Construction styles: a project's construction system sets the --p-* tokens and nothing else (tokens.test.ts).
   Shipped first: concrete and glass, timber frame. Textures are generated gradients and inline SVG, never bitmaps. */
:root {
  --tex-concrete: 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='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --tex-mottle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='480'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .012' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .12 -.03'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .3' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36  0 0 0 0 .22  0 0 0 0 .08  0 0 0 .55 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --joint: #0000001c;
  --joint-lit: #ffffff4d;
  --tie: #00000030;
  /* Board-formed concrete: panel joints and tie holes over a fine grain and a broad mottle */
  --surf-concrete:
    radial-gradient(circle at 40px 30px, var(--tie) 0 2.8px, var(--joint-lit) 2.8px 3.8px, transparent 4.2px) 0 0 / 240px 120px,
    radial-gradient(circle at 200px 30px, var(--tie) 0 2.8px, var(--joint-lit) 2.8px 3.8px, transparent 4.2px) 0 0 / 240px 120px,
    radial-gradient(circle at 40px 90px, var(--tie) 0 2.8px, var(--joint-lit) 2.8px 3.8px, transparent 4.2px) 0 0 / 240px 120px,
    radial-gradient(circle at 200px 90px, var(--tie) 0 2.8px, var(--joint-lit) 2.8px 3.8px, transparent 4.2px) 0 0 / 240px 120px,
    linear-gradient(var(--joint) 0 1px, var(--joint-lit) 1px 2px, transparent 2px) 0 0 / 240px 120px,
    linear-gradient(90deg, var(--joint) 0 1px, var(--joint-lit) 1px 2px, transparent 2px) 0 0 / 240px 120px,
    var(--tex-concrete), var(--tex-mottle);
  --tex-boards: linear-gradient(#0000001f 0 1px, transparent 1px) 0 0 / 100% 48px, var(--tex-grain);
  --tex-brick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='48'%3E%3Cpath d='M0 1H96M0 25H96M1 0V24M49 24V48' stroke='%23fff' stroke-opacity='.34' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"), var(--tex-concrete);
  --tex-strata: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='240'%3E%3Cfilter id='r' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.02 .09' numOctaves='2' seed='5' stitchTiles='stitch'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='7' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .16  0 0 0 0 .12  0 0 0 0 .08  0 0 0 2.6 -1.5'/%3E%3C/filter%3E%3Cg filter='url%28%23r%29'%3E%3Crect x='-10' y='0' width='500' height='25' fill='%23000' fill-opacity='0.0'/%3E%3Crect x='-10' y='24' width='500' height='49' fill='%23000' fill-opacity='0.13'/%3E%3Crect x='-10' y='72' width='500' height='25' fill='%23fff' fill-opacity='0.1'/%3E%3Crect x='-10' y='96' width='500' height='49' fill='%23000' fill-opacity='0.07'/%3E%3Crect x='-10' y='144' width='500' height='25' fill='%23000' fill-opacity='0.18'/%3E%3Crect x='-10' y='168' width='500' height='25' fill='%23fff' fill-opacity='0.06'/%3E%3Crect x='-10' y='192' width='500' height='49' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='-10' y='0' width='500' height='1.5' fill='%23000' fill-opacity='.16'/%3E%3Crect x='-10' y='24' width='500' height='1.5' fill='%23000' fill-opacity='.16'/%3E%3Crect x='-10' y='72' width='500' height='1.5' fill='%23000' fill-opacity='.16'/%3E%3Crect x='-10' y='96' width='500' height='1.5' fill='%23000' fill-opacity='.16'/%3E%3Crect x='-10' y='144' width='500' height='1.5' fill='%23000' fill-opacity='.16'/%3E%3Crect x='-10' y='168' width='500' height='1.5' fill='%23000' fill-opacity='.16'/%3E%3Crect x='-10' y='192' width='500' height='1.5' fill='%23000' fill-opacity='.16'/%3E%3C/g%3E%3Crect width='480' height='240' filter='url%28%23p%29'/%3E%3Ccircle cx='60' cy='72' r='2.2' fill='%23000' fill-opacity='.2'/%3E%3Ccircle cx='60' cy='168' r='2.2' fill='%23000' fill-opacity='.2'/%3E%3Ccircle cx='300' cy='72' r='2.2' fill='%23000' fill-opacity='.2'/%3E%3Ccircle cx='300' cy='168' r='2.2' fill='%23000' fill-opacity='.2'/%3E%3C/svg%3E"), var(--tex-concrete);
  --tex-glass: linear-gradient(115deg, transparent 0 38%, #ffffff73 38% 50%, transparent 50%) 0 0 / 100% 100% no-repeat;
}
/* Traditional timber frame: lime plaster between dark members, a boarded floor */
[data-construction="timber"] {
  --p-ground: #ece6d9; --p-ground-tex: var(--tex-concrete); --p-stage: #e6cf9c; --p-stage-tex: var(--tex-boards);
  --p-plane: #f3eee3; --p-plane-tex: none; --p-note: #f3eee3; --p-note-tex: none; --p-metal: #e4d8bd;
  --p-joint: #3f2a18; --p-joint-w: 4px; --p-display: "Noto Serif Variable", "Songti SC", "Noto Serif SC", serif;
}
/* Concrete and glass: board-formed concrete, a frosted pane beside it, dark mullions */
[data-construction="concrete"] {
  --p-ground: #dedcd6; --p-ground-tex: var(--surf-concrete); --p-stage: #d8d6cf; --p-stage-tex: var(--surf-concrete);
  --p-plane: #e6eeed; --p-plane-tex: var(--tex-glass); --p-note: #dfe9e8; --p-note-tex: var(--tex-glass);
  --p-metal: #dcdfe2; --p-joint: #121416; --p-joint-w: 3px; --p-display: "Chakra Petch", var(--font-body);
}
/* Masonry: buff brick in running bond with lime mortar */
[data-construction="masonry"] {
  --p-ground: #d8c6b0; --p-ground-tex: var(--tex-brick); --p-stage: #d8c6b0; --p-stage-tex: var(--tex-brick);
  --p-plane: #f2eee7; --p-plane-tex: none; --p-note: #e6c5ad; --p-note-tex: none; --p-metal: #d9d8d3;
  --p-joint: #7a4a36; --p-joint-w: 3px; --p-display: "Roboto Slab", "Songti SC", "Noto Serif SC", serif;
}
/* Rammed earth: stratified lifts of ochre earth, a clay note */
[data-construction="earth"] {
  --p-ground: #c7b39a; --p-ground-tex: var(--tex-strata); --p-stage: #c7b39a; --p-stage-tex: var(--tex-strata);
  --p-plane: #f3ede2; --p-plane-tex: none; --p-note: #e2d6c4; --p-note-tex: none; --p-metal: #dbd6cc;
  --p-joint: #5a4a3a; --p-joint-w: 3px; --p-display: "Zilla Slab", "Songti SC", "Noto Serif SC", serif;
}
/* What reads the project layer: the ground, the stage, the bar, the panel, the drawer and the project's name.
   Dialogs and toasts sit on the fixed layer, so money and decisions look the same in every project. */
[data-construction] .canvas-shell { background: var(--p-stage-tex) var(--p-stage); }
[data-construction] .canvas-heading { background: var(--p-plane-tex) var(--p-plane);
  border-block-end: var(--p-joint-w) solid var(--p-joint); }
[data-construction] .round-panel { background: var(--p-plane-tex) var(--p-plane);
  border-inline-start: var(--p-joint-w) solid var(--p-joint); }
[data-construction] .canvas-sheet.project-menu { background: var(--p-plane-tex) var(--p-plane);
  border-inline-end: var(--p-joint-w) solid var(--p-joint); }
/* No construction chosen (UI v2): a white bar and hairlines where a style draws its joint. */
[data-construction="none"] .canvas-heading { background: var(--surface); border-block-end: 1px solid var(--line); }
[data-construction="none"] .round-panel { border-inline-start: 1px solid var(--line); }
[data-construction="none"] .canvas-sheet.project-menu { border-inline-end: 1px solid var(--line); }
[data-construction]:not([data-construction="none"]) :is(.canvas-identity h1, .canvas-title,
  .canvas-heading .design-credit strong) { font-family: var(--p-display); }

/* Shared homepage components on the product tokens.
   The Latin typefaces are self-hosted alongside the page. */
@font-face { font-family: "Geist Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-display: swap; font-weight: 400;
  src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
*, *::before, *::after { box-sizing: border-box; }
.ui { font: var(--weight-regular) var(--text-body)/var(--line-body) var(--font-body); color: var(--ink);
  font-synthesis: none; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
:where(.ui) :is(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) { margin: 0; padding: 0; }
:where(.ui) :is(ul, ol) { list-style: none; }
:where(.ui) :is(button, input, textarea, select) { font: inherit; color: inherit; }
:where(.ui) button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
.ui :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: var(--focus-ring);
  outline-offset: var(--focus-offset); }
.ui [hidden] { display: none !important; }
.t-title { font: var(--weight-strong) var(--text-title)/var(--line-tight) var(--font-body); }
/* Notes sit on the page ground here, where --ink-3 is under AA; they take --ink-2. */
.t-label { font: 500 12px/1.4 var(--font-mono);
  color: var(--ink-2); }
.wordmark { display: inline-flex; align-items: center; gap: var(--space-2);
  font: var(--weight-strong) 20px/1 var(--font-body); letter-spacing: var(--track-tight);
  color: var(--ink); }
.wordmark > img { flex: none; inline-size: 30px; block-size: 30px; }

/* Buttons: a white key with a drawn edge; the one main action is ink. */
.ui .btn { position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2); min-block-size: 40px; padding: var(--space-1) 14px; border: 1px solid var(--home-edge);
  border-radius: var(--radius-control); background: var(--surface); color: var(--ink);
  font: 600 14px/var(--line-tight) var(--font-body); text-align: center;
  text-decoration: none; overflow-wrap: anywhere; overflow: hidden;
  transition: background var(--motion-fast) var(--ease-out), transform var(--motion-fast) var(--ease-out); }
.ui .btn:hover { background: var(--panel); }
.ui .btn:active { transform: scale(0.98); }
.btn svg { inline-size: 16px; block-size: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.ui .btn-primary { color: var(--btn-ink); background: var(--btn-top);
  border-color: transparent; }
.ui .btn-primary:hover { background: var(--btn-top-hover); }
.ui .btn-text { background: none; box-shadow: none; color: var(--ink-2); padding-inline: var(--space-2); }
.ui .btn-text:hover { background: var(--fill-2); color: var(--ink); }
.btn[aria-busy="true"] { pointer-events: none; opacity: 0.7; }
.ui .btn-lg { min-block-size: 46px; padding-inline: 20px; font-size: 15px; }

/* Segmented control */
.seg { position: relative; isolation: isolate; display: inline-flex; max-inline-size: 100%; gap: 8px; }
.ui .seg > button { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-block-size: 38px; min-inline-size: 38px; padding: 2px 14px;
  border: 1px solid var(--home-edge); border-radius: var(--radius-round); background: var(--surface);
  color: var(--ink-2); font: var(--weight-medium) var(--text-control)/var(--line-tight) var(--font-body); }
.ui .seg > button:hover { color: var(--ink); }
.ui .seg > button[aria-pressed="true"] { background: var(--ink); color: var(--btn-ink); }

/* Chips: a state or a fact, never an action */
.chip { display: inline-flex; align-items: center; gap: 5px; min-block-size: 20px; padding: 3px 10px;
  border-radius: var(--radius-badge); background: var(--fill-2); color: var(--ink-2);
  font: var(--weight-medium) 12px/var(--line-tight) var(--font-mono);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip[data-tone="ai"] { background: var(--ai-soft); color: var(--ai); }
.chip > .dot { flex: none; inline-size: 6px; block-size: 6px; border-radius: var(--radius-round);
  background: currentColor; }
/* Solid means it exists, dashed means it is pending: the studio's line rule. */
.chip[data-state="live"] { background: var(--home-live-fill); color: var(--home-live-ink); }
.chip[data-state="coming"] { background: none; color: var(--ink-2); outline: 1px dashed var(--home-edge);
  outline-offset: -1px; }

/* Title block: the one secondary note of a sheet */
.titleblock { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 12px 32px; padding: 18px 20px; }
.titleblock > * { display: grid; align-content: start; gap: 2px; min-inline-size: 0; }
.titleblock > .tb-span { grid-column: 1 / -1; }
.tb-cap, .tb-val { font: 400 12px/1.5 var(--font-mono); overflow-wrap: anywhere; }
.tb-cap { color: var(--ink-2); }
kbd { display: inline-grid; place-items: center; min-inline-size: 24px; block-size: 24px; padding-inline: 5px;
  font: var(--weight-medium) 12px/1 var(--font-mono); color: var(--ink); background: var(--surface);
  box-shadow: 0 0 0 1px var(--home-edge); border-radius: var(--radius-control); }

/* aich public homepage v2: the page frame, type, the bar and the Walk hero, on the product tokens.
   Fixed layer only (neutral construction); a template card carries its own construction.
   One breakpoint at 780 px, as in the product; 1100 only tightens columns (sections.css). */
html { scroll-behavior: smooth; scroll-padding-block-start: 12px; }
:root {
  --home-rule: #ddd9cf;
  --home-edge: #cfcac0;
  --home-card: #e1ddd3;
  --home-live-fill: #e3f1e8;
  --home-live-ink: #1f6b45;
  --home-band: #1b1e20;
  --home-band-ink: #f4f2ed;
  --home-band-text: #d8d5cd;
  --home-band-muted: #b9bdc0;
  --home-band-fine: #9ca2a6;
  --home-band-edge: #3a4044;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.ui { margin: 0; background: var(--paper); min-inline-size: 320px; container-type: inline-size;
  font-size: 16px; }
.ui a { color: inherit; }
.ui img, .ui svg { max-inline-size: 100%; }
.wrap { inline-size: min(100% - 2 * clamp(20px, 4cqi, 48px), 1144px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset: 8px auto auto 8px; z-index: 60; padding: 8px 12px; background: var(--surface);
  box-shadow: var(--shadow-2); }

/* ---- bar: left is the place, right is you ---- */
.home-bar { background: var(--paper); }
.home-bar > .wrap { display: flex; align-items: center; gap: 16px; min-block-size: 72px; flex-wrap: wrap; }
.home-bar .wordmark { text-decoration: none; min-block-size: 44px; }
.home-nav { flex: 1 1 auto; display: flex; justify-content: center; flex-wrap: wrap; gap: 0 20px; }
.home-nav a { display: inline-flex; align-items: center; min-block-size: 44px;
  font: 550 14px/1 var(--font-body); text-decoration: none; }
.home-nav a:hover { color: var(--ink-2); text-decoration: underline; }
.home-you { display: flex; align-items: center; gap: 8px; }

/* ---- type ---- */
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-4); font: 500 12px/1.4 var(--font-mono);
  color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.ui .eyebrow.flat { margin: 0; }
.eyebrow > .no { font-family: var(--font-mono); }
.display { font: 400 clamp(64px, 10cqi, 148px)/.9 var(--font-display); letter-spacing: -.025em; }
.h2 { font: 400 clamp(40px, 5.6cqi, 76px)/1 var(--font-display); letter-spacing: -.015em;
  text-wrap: balance; }
:is(.display, .h2) em { color: var(--ink-2); }
.h3 { font: 600 17px/1.3 var(--font-body); }
.lede { font-size: clamp(17px, 1.6cqi, 20px); line-height: 1.55; color: var(--ink);
  max-inline-size: 58ch; text-wrap: pretty; }
.txt { font-size: 15px; line-height: 1.6; color: var(--ink-2); max-inline-size: 62ch; text-wrap: pretty; }
.fine { font: 400 12px/1.5 var(--font-mono); color: var(--ink-2); }
.ui .after { margin-block-start: var(--space-4); }
.ui .after-sm { margin-block-start: var(--space-2); }
.ui .after-lg { margin-block-start: var(--space-6); }
.mono { font-family: var(--font-mono); font-size: var(--text-note); overflow-wrap: anywhere; }
.quote { padding-inline-start: var(--space-3); border-inline-start: var(--lw-heavy) solid var(--ink);
  font-weight: var(--weight-medium); color: var(--ink); }

/* ---- sections: a sheet edge between each ---- */
.sec { padding-block: clamp(56px, 8cqi, 112px); border-block-start: 1px solid var(--home-rule); }
.intro { display: grid; align-content: start; gap: 20px; min-inline-size: 0; }
.sec-head, .cols-2, .struct-grid { display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: clamp(32px, 5cqi, 64px); align-items: start; }
.sec-head { align-items: end; margin-block-end: 28px; }
.sec-head > div:last-child { display: grid; gap: 12px; justify-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.paper { background: var(--surface); border: 1px solid var(--home-card); border-radius: 14px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

/* ---- hero ---- */
.hero { padding-block: clamp(32px, 5cqi, 64px) clamp(56px, 8cqi, 96px); }
.hero-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  align-items: end; gap: clamp(28px, 4cqi, 56px); }
.hero-head .intro { gap: 22px; }
.hero-head > *, .sec-head > *, .cols-2 > *, .struct-grid > *, .cols-3 > * { min-inline-size: 0; }
.walk-stage { position: relative; aspect-ratio: 16 / 11; overflow: hidden; border-radius: 18px;
  background: var(--mat); border: 1px solid var(--home-rule); isolation: isolate; }
.hero-figure .walk-stage { box-shadow: var(--shadow-3); }
.walk-stage > .scene-host { position: absolute; inset: 0; }
.walk-stage > .scene-host canvas { display: block; inline-size: 100%; block-size: 100% !important;
  outline: none; }
.walk-stage > .poster { position: absolute; inset: 0; inline-size: 100%; block-size: 100%;
  object-fit: cover; }
.walk-stage:not([data-state="poster"]) > :is(.poster, .stage-start) { display: none; }
.walk-stage[data-state="poster"] > .poster { cursor: pointer; }
.stage-start { position: absolute; inset: auto 14px 18px; display: grid; justify-items: center;
  gap: 10px; }
.stage-tag { position: absolute; inset: 14px 14px auto; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 8px; }
.hero-figure .walk-stage:not([data-state="poster"]) > .stage-tag { display: none; }
.stage-tag .chip:not([data-state]) { background: var(--surface); color: var(--ink); border-radius: 9px; }
#walk-start { min-block-size: 52px; padding-inline: 24px; }
.keys { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px;
  padding: 6px 10px; border-radius: 9px; background: var(--surface);
  color: var(--ink-2); font-size: 12px; }
.keys > span { display: inline-flex; align-items: center; gap: 6px; }
.keys .touch { display: none; }
.stage-foot { display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  margin-block-start: var(--space-2); }
.walk-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1px; margin-block-start: clamp(28px, 4cqi, 48px); border: 1px solid var(--home-rule);
  background: var(--home-rule); border-radius: 14px; overflow: hidden; }
.walk-facts > li { display: grid; align-content: start; gap: 6px; padding: 18px; background: var(--paper);
  font-size: 14px; }
.walk-facts b { font-size: 15px; font-weight: 600; }
.walk-facts span { color: var(--ink-2); }

/* ---- the app's Walk chrome on this page: the app's classes, this page's buttons ---- */
.walk-stage :is(.projection-control, .site-backdrop-control) { display: none !important; }
.walk-stage .walk-button, .walk-stage :is(.walk-locator-pair, .walk-phone-actions, .walk-saved-list,
  .walk-phone-rooms, .walk-phone-saved) button { display: inline-flex; align-items: center;
  justify-content: center; gap: var(--space-2); min-block-size: var(--control-h);
  padding: var(--space-1) var(--space-3); border: 0; border-radius: var(--radius-control);
  font: var(--weight-medium) var(--text-control)/var(--line-tight) var(--font-body); color: var(--ink);
  background: var(--surface); box-shadow: var(--shadow-1); cursor: pointer; white-space: nowrap; }
.walk-stage .walk-button.primary { color: var(--btn-ink); background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink); }
.walk-stage .walk-enter { inset: var(--space-4) var(--space-4) auto auto; }
.walk-stage select.input { min-block-size: var(--control-h); padding-inline: var(--space-2); border: 0;
  border-radius: var(--radius-control); font: var(--weight-medium) var(--text-control)/1 var(--font-body);
  color: var(--ink); background: var(--surface); box-shadow: var(--shadow-1); }
.walk-stage .walk-truth { padding: 2px 6px; background: var(--veil); color: var(--ink); }
.walk-stage .walk-locator-card :is(p, [role="status"]) { margin: 0; font-size: var(--text-note); }

@media (max-width: 779px) {
  .home-bar > .wrap { justify-content: space-between; gap: 0 8px; padding-block: 8px; }
  .home-nav { order: 1; flex-basis: 100%; justify-content: start; gap: 0 14px; }
  .home-nav a { min-inline-size: 44px; }
  .ui .home-you .btn, .ui .seg > button, #structure-leave { min-block-size: 44px; min-inline-size: 44px; }
  .home-foot a { display: inline-flex; align-items: center; min-block-size: 44px; }
  /* A set height with the 16:11 ratio would widen the stage past a phone: the width fills instead. */
  .hero-figure .walk-stage:not([data-state="poster"]) { aspect-ratio: auto; inline-size: 100%;
    block-size: min(68svh, 520px); }
  .walk-stage :is(.walk-button, select.input, .walk-locator-pair button, .walk-phone-actions button,
    .walk-saved-list button, .walk-phone-rooms button, .walk-phone-saved button) { min-block-size: 44px; }
  .keys .desk { display: none; }
  .keys .touch { display: inline-flex; }
  .walk-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .ui .btn { transition: none; }
  .ui .btn:active { transform: none; }
}

/* aich public homepage v2: rounds, template cards, product captures, reference images, what is coming and
   the footer. Drawings are product output with fixed colours, so their frames keep a light ground in dark. */
:root { --sheet: #faf9f6; }

/* ---- rounds ---- */
.round-steps { counter-reset: round-step; margin-block-start: 8px; }
.round-steps > li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px;
  padding-block: 16px; border-block-start: 1px solid var(--home-rule); counter-increment: round-step; }
.round-steps > li::before { content: counter(round-step); display: grid; place-items: center;
  inline-size: 32px; block-size: 32px; border: 1px solid var(--ink); border-radius: 50%;
  font: 400 13px/1 var(--font-mono); }
.round-steps p { color: var(--ink-2); margin-block-start: 4px; font-size: 15px; }
.plan-sheet { display: grid; gap: 10px; padding: 16px; align-self: start; }
.sheet-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.plan-sheet > .drawing { display: grid; place-items: center; padding: 16px; border-radius: 10px;
  background: var(--sheet); }
.plan-sheet > .drawing img { inline-size: 100%; block-size: auto; max-block-size: 380px;
  object-fit: contain; }

/* ---- templates ---- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5);
  margin-block-end: var(--space-5); }
.filters > div { display: flex; align-items: center; gap: var(--space-2); }
.filters .tpl-count { margin-inline-start: auto; color: var(--ink-2); font: 400 12px/1.5 var(--font-mono); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 16px; }
.tpl { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto;
  background: var(--surface); border: 1px solid var(--home-card); border-radius: 14px; padding: 14px;
  gap: 10px; min-inline-size: 0;
  color: var(--ink); text-decoration: none; }
.tpl > .cover { position: relative; block-size: 150px; background: var(--sheet); border-radius: 10px; }
.tpl > .cover img { position: absolute; inset: var(--space-3); inline-size: calc(100% - 2 * var(--space-3));
  block-size: calc(100% - 2 * var(--space-3)); object-fit: contain; }
.tpl > .meta { display: grid; align-content: start; gap: var(--space-2);
  padding: 0; }
.tpl .name { font: 600 17px/1.3 var(--font-body); }
.tpl .sum { font-size: var(--text-control); color: var(--ink-2); }
.tpl .prog { font: 400 12px/1.5 var(--font-mono); color: var(--ink-2); }
.tpl .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tpl > .foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  font: 400 12px/1.5 var(--font-mono); color: var(--ink-2); }
.tpl-empty { padding: var(--space-5); color: var(--ink-2); }

/* Gallery images preserve their full camera frame at either viewport size. */
.gallery-views { margin-block: 0 var(--space-5); }
.tpl > .cover { display: block; block-size: auto; aspect-ratio: 4 / 3; overflow: hidden; }
.tpl > .cover img { inset: 0; inline-size: 100%; block-size: 100%; }
.tpl .name a { color: inherit; text-underline-offset: 0.2em; }
#tpl-inspector { box-sizing: border-box; width: min(92vw, 760px); max-height: 90dvh; overflow: auto;
  padding: var(--space-4); border: 1px solid var(--home-edge); border-radius: 12px;
  background: var(--surface); color: var(--ink); }
#tpl-inspector::backdrop { background: rgb(20 22 24 / 65%); }
#tpl-inspector form { display: flex; justify-content: end; }
#tpl-inspector img { display: block; width: 100%; height: min(55dvh, 440px); object-fit: contain; }
#tpl-inspector figcaption { margin-block: var(--space-3); }
#tpl-inspector a { color: inherit; }

/* ---- product captures: a frame with a caption strip ---- */
.capture { background: var(--surface); border: 1px solid var(--home-card); border-radius: 18px;
  min-inline-size: 0; }
.struct-side { margin-block-start: clamp(0px, 8cqi, 120px); }
/* The structure stage: the app's structure panel becomes one strip along its foot, so the frame stays
   in view; Leave takes the tag's place. */
.structure-stage { aspect-ratio: 16 / 10; }
.structure-stage[data-state="live"] { block-size: 520px; }
.structure-stage:not([data-state="live"]) #structure-leave,
.structure-stage[data-state="live"] > .stage-tag > .chip { display: none; }
.structure-stage .structure-panel { inset: auto 0 0; inline-size: auto; max-block-size: none;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4);
  padding: var(--space-2) var(--space-3); border: 0;
  border-block-start: var(--lw-fine) solid var(--pen-medium);
  border-radius: 0; box-shadow: none; background: color-mix(in srgb, var(--surface) 92%, transparent); }
.structure-stage .structure-kinds { flex: 0 1 auto; gap: 0 var(--space-3); }
.structure-stage .structure-kinds label { flex: none; }
.structure-stage .structure-kinds legend { position: absolute; inline-size: 1px; block-size: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.structure-stage .structure-card { flex: 1 1 200px; display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 0 var(--space-2); padding: 0; border: 0; background: none; }
.structure-stage .structure-card[data-empty] { color: var(--ink-2); }
.structure-stage .text-button { padding: 3px 0; color: var(--ink-2); text-decoration: underline; }
.structure-stage canvas:focus-visible { outline: var(--focus-ring); outline-offset: -4px; }
.chk { padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.chk .eyebrow, .soon .eyebrow { justify-content: space-between; }
.chk .h3 { font-size: 20px; color: var(--ink); text-transform: none; letter-spacing: normal; }
.chk:has([data-state="coming"]) { border-style: dashed; border-color: var(--home-edge); }
.check-scale { display: grid; }
.check-scale > li { display: grid; grid-template-columns: 28px 56px minmax(0, 1fr); align-items: center;
  gap: 12px; padding-block: 8px; font-size: 14px; border-block-start: 1px solid var(--home-rule); }
.check-scale i { block-size: 10px; border-radius: 3px; background: var(--ink-3); }
.check-scale > li:nth-child(1) i { background: var(--ok); }
.check-scale > li:nth-child(2) i { background: var(--warn); }
.check-scale > li:nth-child(3) i { background: var(--redline); }
.check-scale b { font: 400 13px/1.5 var(--font-mono); }
.check-scale span { color: var(--ink-2); }

/* ---- reference images: one camera, three frames ---- */
.render-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px; }
.render-row > figure { display: grid; align-content: start; gap: 10px; min-inline-size: 0; padding: 12px;
  border: 1px solid var(--home-card); border-radius: 14px; background: var(--surface); }
.render-row > .style-slot { border: 1px dashed var(--home-edge); background: transparent; }
.render-row img, .render-row .slot { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 8 / 5;
  object-fit: cover; border-radius: 9px; }
.render-row .slot { display: grid; place-items: center; padding: var(--space-4); text-align: center; }
.slot .fine { font: 400 14px/1.55 var(--font-body); }
.render-row figcaption { font-size: 14px; color: var(--ink-2); }
.render-row figcaption b { color: var(--ink); margin-inline-end: 4px; }
.receipt { margin-block-start: 28px; }

#next .sec-head { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.soon { display: grid; align-content: start; gap: 8px; padding: 20px; background: var(--surface);
  border: 1px solid var(--home-card); border-radius: 14px; }
.soon:has(.chip[data-state="coming"]) { border-style: dashed; border-color: var(--home-edge);
  background: transparent; }
.soon .txt { font-size: 14px; }
#boundary .cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.bound > div { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr);
  gap: 8px 32px; padding-block: 16px; border-block-start: 1px solid var(--home-rule); }
.bound dt { font-weight: 600; }
.bound dd { font: 400 13px/1.6 var(--font-mono); color: var(--ink-2); }
#invite { padding-block: clamp(72px, 10cqi, 140px); background: var(--mat); }
.closing { display: grid; gap: 24px; justify-items: start; }
.closing .h2 { font-size: clamp(52px, 8cqi, 120px); line-height: .92; letter-spacing: -.02em; }
.home-foot { --focus-ring: 2px solid var(--home-band-ink); padding-block: 48px;
  background: var(--home-band); color: var(--home-band-text); font-size: 13px; }
.home-foot > .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 24px 48px; }
.home-foot .wordmark, .home-foot a { color: var(--home-band-ink); }
.home-foot .fine { color: var(--home-band-muted); }

@media (max-width: 779px) {
  .structure-stage[data-state="live"] { block-size: min(68svh, 520px); }
  .structure-stage .structure-panel { flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    gap: var(--space-1); padding: var(--space-1) 0; overflow: hidden; }
  .structure-stage .structure-kinds { flex-wrap: nowrap; gap: 0 var(--space-3); min-inline-size: 0;
    max-inline-size: 100%; padding-inline: var(--space-3); overflow-x: auto; scrollbar-width: none; }
  .structure-stage .structure-kinds::-webkit-scrollbar { display: none; }
  .structure-stage .structure-kinds label { min-block-size: 44px; white-space: nowrap; }
  .structure-stage .text-button { min-inline-size: 44px; min-block-size: 44px; }
  .structure-stage .structure-kinds input[type="checkbox"] { inline-size: 16px; block-size: 16px; }
  .structure-stage .structure-card { flex: none; gap: 2px var(--space-2); padding-inline: var(--space-3); }
  .structure-stage .structure-card[data-empty] { display: none; }
  .struct-side { margin-block-start: 0; }
  .filters .tpl-count { margin-inline-start: 0; inline-size: 100%; }
  .filters > div { flex-wrap: wrap; max-inline-size: 100%; }
  .filters .seg { flex-wrap: wrap; }
  .bound > div { grid-template-columns: minmax(0, 1fr); }
}

/* The Assistants band pairs the connector instructions with the sample activity.
   The orange activity marker identifies aich's work awaiting confirmation. */
#assistant { background: var(--home-band); color: var(--home-band-ink); border-block-start: 0;
  --home-live-fill: #1f3a2c; --home-live-ink: #9fe0bc; --agent: #f08a4b; }
#assistant .cols { align-items: center; }
#assistant :is(.eyebrow, .fine, em, .connector p) { color: var(--home-band-muted); }
#assistant .lede { color: var(--home-band-text); }
#assistant [data-state="coming"] { color: var(--home-band-muted); outline-color: currentColor; }
.connector { display: grid; gap: 8px; max-inline-size: 520px; font-size: 14px; }
.connector code { padding: 12px 14px; border-radius: 10px; background: #2a2f32;
  border: 1px solid var(--home-band-edge); font-size: 14px; }
.activity { padding: 20px; border: 1px solid var(--home-band-edge); border-radius: 18px;
  background: #24292c; }
.activity figcaption { padding-block-end: 8px; }
.activity li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 2px 12px;
  padding-block: 12px; border-block-start: 1px solid var(--home-band-edge); font-size: 15px; }
.activity li::before { content: ""; inline-size: 10px; block-size: 10px; margin-block-start: 6px;
  background: #62d19c; border-radius: 50%; }
.activity .working::before { background: var(--agent); }
.activity small { grid-column: 2; color: var(--home-band-fine); font: 400 12px/1.5 var(--font-mono); }

/* Dark values for this page only: the product ships none (apps/web/src/tokens has no dark layer), so the
   specified dark values of the design foundation follow the system setting here. No script, no switch.
   Drawings and captures keep their own light ground (--sheet stays as it is). */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --concrete-1: #1b1b1c; --concrete-2: #232322; --concrete-3: #2a2a29; --concrete-4: #3a3a38;
    --alu-1: #222326; --alu-2: #2a2c30; --alu-3: #3f4248; --alu-4: #7d828b; --alu-5: #b4b9c2;
    --face: var(--surface);
    --home-rule: #3a3833; --home-edge: #615e55; --home-card: #45413a;
    --home-live-fill: #1f3a2c; --home-live-ink: #9fe0bc; --home-band: #141719;
    --surface: #242628; --ink: #f4f2ed; --ink-2: #c3c0b8; --ink-3: #8c8c92;
    --pen-fine: #ffffff26; --pen-medium: #ffffff8c; --draft: #ffffff99;
    --fill: #ffffff0d; --fill-2: #ffffff17; --fill-3: #ffffff24;
    --accent: #8ea6ff; --accent-strong: #a9bbff; --accent-soft: #1f2a52; --accent-ink: #0b1230;
    --mark-soft: #3a3110; --mark-text: #f5c531;
    --redline: #ff6a5e; --ok: #62d19c; --ok-soft: #12301f; --warn: #f2a765; --warn-soft: #38240f;
    --bad: #ff8f86; --bad-strong: #ffaaa3; --bad-soft: #3b1817; --ai: #b79cff; --ai-soft: #2a2148;
    --sent: #6e6e74; --scrim: #232322d1; --veil: #0e0e0ff0; --btn-ink: #121213;
    --focus-soft: #ffffff1f; --shade: #00000080;
    --p-ground: #1b1e20; --p-stage: #292b2c; --p-plane: #1b1e20; --p-note: #242628; --p-metal: #2a2c30;
    --p-joint: #000000b3;
  }
  [data-construction="timber"] { --p-ground: #26221c; --p-stage: #3a2c1e; --p-plane: #1f1c18;
    --p-note: #1f1c18;
    --p-metal: #3a3327; --p-joint: #000000cc; }
  [data-construction="masonry"] { --p-ground: #33291f; --p-stage: #33291f; --p-plane: #1c1a18;
    --p-note: #3a2a21;
    --p-metal: #2e2e2c; --p-joint: #000000cc; }
  [data-construction="concrete"] { --p-ground: #232322; --p-stage: #2a2a29; --p-plane: #18201f;
    --p-note: #1c2625;
    --p-metal: #2a2c30; --p-joint: #000000e6;
    --p-plane-tex: linear-gradient(115deg, transparent 0 38%, #ffffff0d 38% 50%,
      transparent 50%) 0 0 / 100% 100%
      no-repeat; }
  [data-construction="earth"] { --p-ground: #38322b; --p-stage: #38322b; --p-plane: #1e1b17;
    --p-note: #302b25;
    --p-metal: #322e27; --p-joint: #000000cc; }
  /* Product output keeps its light sheet; its caption text stays dark ink on it. */
  .tpl > .cover, .plan-sheet > .drawing { color: #0a0a0a; }
}
