/* Space Works design tokens — brand guidelines v1.
 Colours are space-separated sRGB triplets: use as rgb(var(--color-accent)) or rgb(var(--color-accent) / 0.5).
 Light is the default; add class "dark" on <html> for dark mode. */

@font-face {
  font-family: "Unbounded";
  src: url("/fonts/Unbounded-Variable.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

/* Gilroy: only the FREE weights ship (Light 300, ExtraBold 800; decision 299). Everything else is Outfit (OFL). */
@font-face {
  font-family: "Gilroy";
  src: url("/fonts/Gilroy-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("/fonts/Gilroy-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --font-display: "Gilroy", sans-serif;
  --font-sans: "Outfit", sans-serif;
  --font-accent: "Unbounded", "Outfit", sans-serif;
  --brand-deep-ink: #142C2A;
  --brand-maker-teal: #006E63;
  --brand-workshop-orange: #FF7447;
  --brand-citron: #DFFF8F;
  --brand-sky-blue: #B5CDFF;
  --brand-warm-yellow: #FFD447;
  --brand-warm-cream: #FFF4E8;

  --color-bg: 255 244 232;
  --color-surface: 246 236 224;
  --color-panel: 255 255 255;
  --color-hover: 239 230 219;
  --color-line: 213 208 198;
  --color-outline: 130 138 131;
  --color-ink: 20 44 42;
  --color-muted: 91 104 99;
  --color-focus: 0 110 99;
  --color-accent: 0 110 99;
  --color-accent-hover: 2 103 93;
  --color-accent-active: 4 97 88;
  --color-on-accent: 255 244 232;
  --color-accent-soft: 224 238 236;
  --color-accent-ink: 0 110 99;
  --color-brand: 0 110 99;
  --color-brand-hover: 2 103 93;
  --color-brand-active: 4 97 88;
  --color-on-brand: 255 244 232;
  --color-brand-soft: 224 238 236;
  --color-brand-ink: 0 110 99;
  --color-brand-boundary: 0 110 99;
  --color-emphasis: 255 116 71;
  --color-emphasis-hover: 255 129 87;
  --color-emphasis-active: 255 142 103;
  --color-on-emphasis: 20 44 42;
  --color-emphasis-soft: 255 238 233;
  --color-success: 223 255 143;
  --color-success-hover: 203 234 133;
  --color-success-active: 182 213 123;
  --color-on-success: 20 44 42;
  --color-success-soft: 251 255 242;
  --color-success-ink: 83 109 73;
  --color-warn: 255 212 71;
  --color-warn-hover: 232 195 68;
  --color-warn-active: 208 178 65;
  --color-on-warn: 20 44 42;
  --color-warn-soft: 255 250 233;
  --color-warn-ink: 105 104 52;
  --color-info: 181 205 255;
  --color-info-hover: 165 189 234;
  --color-info-active: 149 173 212;
  --color-on-info: 20 44 42;
  --color-info-soft: 246 249 255;
  --color-info-ink: 81 105 123;
  --color-danger: 185 28 28;
  --color-danger-hover: 153 27 27;
  --color-danger-active: 133 30 29;
  --color-on-danger: 255 244 232;
  --color-danger-line: 252 165 165;
  --color-sidebar: 223 255 143;
  --color-sidebar-hover: 242 255 210;
  --color-sidebar-active: 0 110 99;
  --color-scrim: 20 44 42; /* dims the page behind dialogs */
  --shadow-color: 20 44 42;
}

:root.dark {
  --color-bg: 0 0 0;
  --color-surface: 11 11 11;
  --color-panel: 20 20 20;
  --color-hover: 28 28 28;
  --color-line: 44 44 44;
  --color-outline: 120 120 120;
  --color-ink: 255 244 232;
  --color-muted: 172 172 172;
  --color-focus: 223 255 143;
  --color-accent: 0 110 99;
  --color-accent-hover: 2 103 93;
  --color-accent-active: 4 97 88;
  --color-on-accent: 255 244 232;
  --color-accent-soft: 18 29 28;
  --color-accent-ink: 128 177 166;
  --color-brand: 0 110 99;
  --color-brand-hover: 2 103 93;
  --color-brand-active: 4 97 88;
  --color-on-brand: 255 244 232;
  --color-brand-soft: 18 29 28;
  --color-brand-ink: 128 177 166;
  --color-brand-boundary: 128 177 166;
  --color-emphasis: 255 116 71;
  --color-emphasis-hover: 255 129 87;
  --color-emphasis-active: 255 142 103;
  --color-on-emphasis: 20 44 42;
  --color-emphasis-soft: 34 26 23;
  --color-success: 223 255 143;
  --color-success-hover: 203 234 133;
  --color-success-active: 182 213 123;
  --color-on-success: 20 44 42;
  --color-success-soft: 32 34 27;
  --color-success-ink: 233 252 170;
  --color-warn: 255 212 71;
  --color-warn-hover: 232 195 68;
  --color-warn-active: 208 178 65;
  --color-on-warn: 20 44 42;
  --color-warn-soft: 34 32 23;
  --color-warn-ink: 255 222 119;
  --color-info: 181 205 255;
  --color-info-hover: 165 189 234;
  --color-info-active: 149 173 212;
  --color-on-info: 20 44 42;
  --color-info-soft: 30 31 34;
  --color-info-ink: 203 217 248;
  --color-danger: 252 165 165;
  --color-danger-hover: 253 185 182;
  --color-danger-active: 253 201 195;
  --color-on-danger: 20 44 42;
  --color-danger-line: 124 98 97;
  --color-sidebar: 11 11 11;
  --color-sidebar-hover: 28 28 28;
  --color-sidebar-active: 0 110 99;
  --color-scrim: 0 0 0; /* ink is Cream in dark and would lighten the page, so the scrim is black */
  --shadow-color: 0 0 0;
}

/* Motion tokens (SpaceWorks 0.12.0, mirrors frontend/src/styles/motionTokens.css).
   Durations: fast = press/hover/exit, base = overlays and indicators, slow = route settle.
   Curves: standard = most movement, enter = arrivals (decelerate), exit = departures (accelerate).
   Distances are tokens so kiosk and TV screens zero them and keep only the fade. */
:root {
  --sw-dur-fast: 120ms;
  --sw-dur-base: 180ms;
  --sw-dur-slow: 240ms;
  --sw-ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --sw-ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --sw-ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --sw-enter-y: 8px;
  --sw-pop-scale: 0.98;
  --sw-pop-offset: 4px;
  --sw-slide-x: 100%;
}
.sw-kiosk, .sw-tv { --sw-enter-y: 0px; --sw-pop-scale: 1; --sw-pop-offset: 0px; --sw-slide-x: 0%; }
@media (prefers-reduced-motion: reduce) {
  :root { --sw-dur-fast: 0ms; --sw-dur-base: 0ms; --sw-dur-slow: 0ms; --sw-enter-y: 0px; --sw-pop-scale: 1; --sw-pop-offset: 0px; --sw-slide-x: 0%; }
}

/* Chart tokens (Design System v2.0, SW-380; mirrors frontend/src/styles/chrome.css). RGB triplets like the colour
   tokens: use rgb(var(--chart-1)). Series 1-5 are the five bright brand colours, identical in light and dark;
   --chart-edge (a 1px mark edge / 4px line casing) carries the 3:1 contrast. Danger is not a series colour. */
:root {
  --chart-1: 0 110 99;
  --chart-2: 255 116 71;
  --chart-3: 223 255 143;
  --chart-4: 181 205 255;
  --chart-5: 255 212 71;
  --chart-edge: 20 44 42;
  --chart-danger: var(--color-danger);
}
:root.dark {
  --chart-edge: 255 244 232;
}

/* Local token-derived steps; see README.md flow addendum and docs/motion-flow.md. */
:root {
  --sw-local-duration-640: calc(var(--sw-dur-slow) * 2.66666667);
}
/* The landing page's scroll story: the pinned hero sequence (useScrollSequence), the handover steps
   beside a pinned record (HandoverScrolly) and reveal-on-scroll (useRevealOnScroll). Tokens only.
   Motion is transform and opacity; will-change is set only while the sequence moves ([data-moving]).
   The default rules are the static page: it is what reduced motion, phones, short screens and
   browsers without JavaScript get, and it reads top to bottom in DOM order. */

.sw-hub { --sw-hub-bar: 89px; } /* the hub header: 72px bar + 16px padding + hairline */
.sw-hub section[tabindex="-1"]:focus { outline: none; }
.sw-hub section[id] { scroll-margin-top: var(--sw-hub-bar); }

/* ── Hero sequence, static ─────────────────────────────────────────────────────────────── */
.sw-hub-seq { position: relative; }
.sw-hub-seq-backdrop { display: none; }
.sw-hub-seq-copy { padding-block: 56px 48px; }
@media (min-width: 768px) { .sw-hub-seq-copy { padding-block: 104px 80px; } }
.sw-hub-seq-stage { padding-top: 40px; background: linear-gradient(rgb(var(--color-bg)) 0 40%, rgb(var(--color-surface)) 40% 100%); }
@media (min-width: 768px) { .sw-hub-seq-stage { padding-top: 0; } }
.sw-hub-seq-reveal { background: rgb(var(--color-surface)); border-bottom: 1px solid rgb(var(--color-line)); }

/* ── Hero sequence, pinned (set by the hook only when it fits) ─────────────────────────── */
.sw-hub-seq[data-animated] { height: calc(300svh - var(--sw-hub-header-h, 89px)); }
.sw-hub-seq[data-animated] .sw-hub-seq-scene { position: sticky; top: var(--sw-hub-header-h, 89px); overflow: clip;
  height: calc(100svh - var(--sw-hub-header-h, 89px)); }
.sw-hub-seq[data-animated] .sw-hub-seq-backdrop { display: block; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: rgb(var(--color-surface)); }
.sw-hub-seq[data-animated] .sw-hub-seq-copy { position: absolute; inset-inline: 0; top: var(--sw-seq-copy-top, 0px); padding: 0; }
.sw-hub-seq[data-animated] .sw-hub-seq-stage { position: absolute; top: 0; left: 0; width: 100%; padding: 0; background: none;
  transform: translate3d(0, var(--sw-seq-start, 100%), 0); }
.sw-hub-seq[data-animated] .sw-hub-seq-frame { transform-origin: 50% 50%; }
.sw-hub-seq[data-animated] .sw-hub-seq-reveal { position: absolute; inset: 0; z-index: 1; display: grid; align-content: center;
  border: 0; background: none; opacity: 0; transform-origin: 50% 40%; }
.sw-hub-seq[data-animated] .sw-hub-intro { padding-block: 32px; }
.sw-hub-seq[data-moving] :is(.sw-hub-seq-copy, .sw-hub-seq-stage, .sw-hub-seq-frame, .sw-hub-seq-reveal) {  }

/* ── Handover steps beside the pinned record ───────────────────────────────────────────── */
.sw-hub-scrolly { display: grid; gap: 48px; margin-top: 48px; }
.sw-hub-scrolly-steps { display: grid; gap: 32px; }
.sw-hub-scrolly-step { display: grid; align-content: start; gap: 8px; padding-left: 20px; border-left: 2px solid rgb(var(--color-line)); }
.sw-hub-scrolly-index { font-family: "Gilroy", "Outfit", sans-serif; font-weight: 300; font-size: 1.125rem; line-height: 1;
  font-variant-numeric: tabular-nums; color: rgb(var(--color-muted)); }
.sw-hub-scrolly-state { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(var(--color-accent-ink)); }
.sw-hub-scrolly-title { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.015em; color: rgb(var(--color-ink)); text-wrap: balance; }
.sw-hub-scrolly-body { max-width: 30rem; line-height: 1.7; color: rgb(var(--color-muted)); text-wrap: pretty; }
@media (min-width: 1024px) and (min-height: 640px) {
  .sw-hub-scrolly { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 96px; margin-top: 0; }
  .sw-hub-scrolly-steps { gap: 0; padding-block: 8svh 22svh; }
  .sw-hub-scrolly-step { min-height: 62svh; align-content: center; padding-left: 28px; transition: none; }
  .sw-hub-scrolly-step :is(.sw-hub-scrolly-title, .sw-hub-scrolly-index) { transition: none; }
  .sw-hub-scrolly-step:not([aria-current]) .sw-hub-scrolly-title { color: rgb(var(--color-muted)); }
  .sw-hub-scrolly-step[aria-current] { border-left-color: rgb(var(--color-accent-ink)); }
  .sw-hub-scrolly-step[aria-current] .sw-hub-scrolly-index { color: rgb(var(--color-accent-ink)); }
  .sw-hub-scrolly-title { font-size: 2rem; }
  .sw-hub-scrolly-pin { position: sticky; top: var(--sw-hub-bar); display: grid; align-content: center;
    height: calc(100svh - var(--sw-hub-bar)); }
}

/* ── Reveal on scroll: once, only after the hook marks the page ready ──────────────────── */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal-ready] [data-reveal] { transition: opacity var(--sw-local-duration-640) var(--sw-ease-standard), transform var(--sw-local-duration-640) var(--sw-ease-standard); }
  [data-reveal-ready] [data-reveal]:not([data-revealed]) { opacity: 0; transform: translate3d(0, 24px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .sw-hub-scrolly-step, .sw-hub-scrolly-step * { transition: none; }
}

@media print {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .sw-hub-seq[data-animated] { height: auto; }
  .sw-hub-seq[data-animated] :is(.sw-hub-seq-scene, .sw-hub-seq-copy, .sw-hub-seq-stage, .sw-hub-seq-reveal) { position: static; height: auto;
    opacity: 1 !important; transform: none !important; }
}

/* Decision 399: reduced motion reaches the identical state immediately. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

:root { --sw-theme-duration: calc(var(--sw-dur-slow) * 3); }
/* Local token-derived steps; see README.md flow addendum and docs/motion-flow.md. */
:root {
  --sw-local-duration-420: calc(var(--sw-dur-slow) * 1.75000000);
}
/* Space Works theme switch: the new theme grows from the toggle as a circle (720 ms, set in theme-reveal.js).
   Mirror of frontend/src/lib/themeTransition.css in the SpaceWorks app. Only active while the transition
   classes are on <html>, so other view transitions keep their own animation. */
@property --sw-reveal {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

.sw-theme-reveal::view-transition-old(root),
.sw-theme-reveal::view-transition-new(root),
.sw-theme-reveal-soft::view-transition-old(root),
.sw-theme-reveal-soft::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

.sw-theme-reveal::view-transition-new(root),
.sw-theme-reveal-soft::view-transition-new(root) {
  z-index: 1;
}

/* Soft edge: a 160 px feather. Used where a registered custom property can animate inside a mask. */
.sw-theme-reveal-soft::view-transition-new(root) {
  -webkit-mask-image: radial-gradient(circle at var(--sw-reveal-x) var(--sw-reveal-y), #000 calc(var(--sw-reveal) - 160px), transparent var(--sw-reveal));
  mask-image: radial-gradient(circle at var(--sw-reveal-x) var(--sw-reveal-y), #000 calc(var(--sw-reveal) - 160px), transparent var(--sw-reveal));
}

/* Fallback without View Transitions: every colour cross-fades together. */
.sw-theme-fade,
.sw-theme-fade *,
.sw-theme-fade *::before,
.sw-theme-fade *::after {
  transition-property: ;
  transition-duration: var(--sw-local-duration-420) !important;
  transition-timing-function: var(--sw-ease-standard) !important;
}

@media (prefers-reduced-motion: reduce) {
  .sw-theme-fade, .sw-theme-fade *, .sw-theme-fade *::before, .sw-theme-fade *::after { transition: none; }
}

/* Decision 399: reduced motion reaches the identical state immediately. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Local token-derived steps; see README.md flow addendum and docs/motion-flow.md. */
:root {
  --sw-local-duration-150: calc(var(--sw-dur-fast) * 1.25000000);
  --sw-local-duration-200: calc(var(--sw-dur-base) * 1.11111111);
  --sw-local-duration-210: calc(var(--sw-dur-base) * 1.16666667);
  --sw-local-duration-30: calc(var(--sw-dur-fast) * 0.25000000);
  --sw-local-duration-360: calc(var(--sw-dur-slow) * 1.50000000);
  --sw-local-duration-480: calc(var(--sw-dur-slow) * 2.00000000);
  --sw-local-duration-60: calc(var(--sw-dur-fast) * 0.50000000);
  --sw-local-duration-640: calc(var(--sw-dur-slow) * 2.66666667);
  --sw-local-duration-90: calc(var(--sw-dur-fast) * 0.75000000);
}
/* Space Works motion kit. Values are copied unchanged from the app (SpaceWorks 0.12.0), `components/layouts/layouts.css`, `styles/fields.css`, `features/hub/hub.css`.
   Tokens (--sw-dur-*, --sw-ease-*, --sw-enter-y, --sw-pop-*, --sw-slide-x) come from ../../tokens/tokens.css. */
/* First-load stagger (StaggerGroup): the first eight children fade and rise, 30 ms apart. */
@media (prefers-reduced-motion: no-preference) {
  .sw-stagger > :nth-child(-n+8) { animation: sw-stagger-rise var(--sw-local-duration-200) var(--sw-ease-enter) both; }
  .sw-stagger > :nth-child(2) { animation-delay: var(--sw-local-duration-30); }
  .sw-stagger > :nth-child(3) { animation-delay: var(--sw-local-duration-60); }
  .sw-stagger > :nth-child(4) { animation-delay: var(--sw-local-duration-90); }
  .sw-stagger > :nth-child(5) { animation-delay: calc(var(--sw-dur-fast) / 4); }
  .sw-stagger > :nth-child(6) { animation-delay: var(--sw-local-duration-150); }
  .sw-stagger > :nth-child(7) { animation-delay: var(--sw-dur-base); }
  .sw-stagger > :nth-child(8) { animation-delay: var(--sw-local-duration-210); }
}
@keyframes sw-stagger-rise { from { opacity: 0; transform: translateY(6px); } }

/* Entrance motion: once, page-level, never on hover (spec §2.5). Facets open along their own edge
   slope; showcase cards rise. The individual translate property keeps the cards' existing tilt. */
@keyframes sw-facet-in { from { opacity: 0; translate: 8px 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes sw-rise { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: no-preference) {
  .sw-facets path { transform-box: fill-box; animation: sw-facet-in var(--sw-local-duration-640) var(--sw-ease-enter) var(--sw-dur-fast) both; }
  .sw-facets path:nth-of-type(2) { animation-delay: var(--sw-local-duration-200); }
  .sw-auth-showcase > * { animation: sw-rise var(--sw-local-duration-480) var(--sw-ease-enter) both; }
  .sw-auth-showcase > :nth-child(2) { animation-delay: calc(var(--sw-dur-fast) / 4); }
  .sw-auth-showcase > :nth-child(3) { animation-delay: calc(var(--sw-dur-fast) / 2); }
}

/* Panel swap: the areas explorer panel wipes in; a handover-story row's proof rises in. */
@keyframes sw-hub-step-in { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes sw-hub-proof-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .sw-hub-story-step[data-new] .sw-hub-story-proof { animation: sw-hub-proof-in var(--sw-local-duration-360) var(--sw-ease-enter) both; }
}
@media (prefers-reduced-motion: no-preference) { .sw-hub-area-panel { animation: sw-hub-step-in var(--sw-local-duration-360) var(--sw-ease-enter) both; } }

/* Decision 399: reduced motion reaches the identical state immediately. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Local token-derived steps; see README.md flow addendum and docs/motion-flow.md. */
:root {
  --sw-local-duration-70: calc(var(--sw-dur-fast) * 0.58333333);
  --sw-local-duration-90: calc(var(--sw-dur-fast) * 0.75000000);
}
/* Space Works motion kit. Values are copied unchanged from the app (SpaceWorks 0.12.0), `styles/motionRoute.css`.
   Tokens (--sw-dur-*, --sw-ease-*, --sw-enter-y, --sw-pop-*, --sw-slide-x) come from ../../tokens/tokens.css. */
/* Route changes. View Transitions (src/lib/motion/routeTransition.ts) name only the main content
   region while a route transition runs; the sidebar and top bar belong to the unanimated root
   layer and stay still. Where View Transitions are missing, `.sw-route-enter` replays a CSS
   fade-in on the same region. The old page leaves first (90 ms) and the new one starts at 70 ms, so the two
   are never visible together at meaningful opacity. Direction sets the settle distance; kiosk/TV screens use 0 (fade only). */
html[data-sw-nav="forward"], [data-sw-enter="forward"] { --sw-vt-y: 8px; }
html[data-sw-nav="lateral"], [data-sw-enter="lateral"] { --sw-vt-y: 6px; }
html[data-sw-nav="back"], [data-sw-enter="back"] { --sw-vt-y: -6px; }
html[data-sw-nav="fade"], [data-sw-enter="fade"] { --sw-vt-y: 0px; }

html[data-sw-vt="route"] [data-sw-main] { view-transition-name: sw-main; }
html[data-sw-vt="route"]::view-transition-group(root),
html[data-sw-vt="route"]::view-transition-old(root),
html[data-sw-vt="route"]::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html[data-sw-vt="route"]::view-transition-group(sw-main) { animation: none; }
html[data-sw-vt="route"]::view-transition-old(sw-main),
html[data-sw-vt="route"]::view-transition-new(sw-main) { mix-blend-mode: normal; }
html[data-sw-vt="route"]::view-transition-old(sw-main) { animation: sw-vt-out var(--sw-dur-base) var(--sw-ease-exit) both; }
html[data-sw-vt="route"]::view-transition-new(sw-main) { animation: sw-vt-in var(--sw-dur-slow) var(--sw-ease-enter) calc(var(--sw-dur-fast) / 4) both; }

@media (prefers-reduced-motion: no-preference) {
  .sw-route-enter { animation: sw-vt-in var(--sw-dur-slow) var(--sw-ease-enter) calc(var(--sw-dur-fast) / 4) backwards; }
}
@keyframes sw-vt-in { from { opacity: 0; transform: translateY(var(--sw-vt-y, 8px)); } }
@keyframes sw-vt-out { to { opacity: 0; transform: translateY(var(--sw-vt-y, 8px)); } }

/* Decision 399: reduced motion reaches the identical state immediately. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Space Works website. Colours, type and motion come only from design/tokens/tokens.css (prepended at build).
   Rules followed: design/docs/current-rules.md, product-rules.md §11–12, motion.md, ui-brand-spec.md.
   Cards are flat (radius 16), controls 44 px with radius 10, pills fully round with a word, hover is colour only. */

:root { --sw-hub-header-h: 72px; --sw-hub-bar: 73px; --gutter: 16px; --maxw: 1200px; color-scheme: light; }
:root.dark { color-scheme: dark; }
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--sw-hub-header-h) + 16px); }
body { margin: 0; background: rgb(var(--color-bg)); color: rgb(var(--color-ink)); font: 400 1.0625rem/1.65 var(--font-sans);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(2.25rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
a { color: rgb(var(--color-accent-ink)); text-underline-offset: 0.2em; text-decoration-thickness: 1px;
  transition: color var(--sw-dur-fast) var(--sw-ease-standard), background-color var(--sw-dur-fast) var(--sw-ease-standard), border-color var(--sw-dur-fast) var(--sw-ease-standard); }
a:hover { color: rgb(var(--color-ink)); }
:focus-visible { outline: 2px solid rgb(var(--color-focus)); outline-offset: 2px; border-radius: 4px; }
code, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.9em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -64px; z-index: 50; padding: 10px 16px; border-radius: 10px;
  background: rgb(var(--color-accent)); color: rgb(var(--color-on-accent)); font-weight: 600; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.icon { flex: none; vertical-align: middle; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 30; background: rgb(var(--color-bg)); border-bottom: 1px solid rgb(var(--color-line)); }
.bar { display: flex; align-items: center; gap: 24px; min-height: var(--sw-hub-header-h); }
.brand { display: inline-flex; align-items: center; min-height: 44px; border-radius: 10px; }
.sw-logo { position: relative; display: block; width: 180px; height: 29px; }
.sw-logo > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo-dk, .dark .logo-lt { display: none; }
.dark .logo-dk { display: block; }
.sw-logo-box { position: absolute; left: 0; top: 0; width: 17.27%; height: 99.31%; pointer-events: none; } /* 136 x 0.45714 of 360, 57.6 of 58 (AnimatedLogoMark SYMBOL_BOX) */
.sw-logo-box > .sw-box { display: block; width: 100%; height: 100%; }
[data-logo][data-logo-playing] .sw-logo-sym { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .sw-logo-box { display: none; } }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a, .mobile-nav a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: rgb(var(--color-ink)); text-decoration: none; font-weight: 500; }
.nav a:hover, .mobile-nav a:hover { background: rgb(var(--color-hover)); }
.nav a[aria-current] { color: rgb(var(--color-accent-ink)); box-shadow: inset 0 -2px 0 rgb(var(--color-accent-ink)); border-radius: 0; }
.bar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 1080px) { .nav { display: flex; } .bar-actions { margin-left: 8px; } .mobile-menu { display: none; } }
@media (max-width: 520px) { .bar-actions .btn-sm { display: none; } }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.mobile-menu { position: relative; }
.theme-toggle, .mobile-menu > summary { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid rgb(var(--color-line)); background: rgb(var(--color-panel)); color: rgb(var(--color-ink)); cursor: pointer; padding: 0; }
.theme-toggle:hover, .mobile-menu > summary:hover { background: rgb(var(--color-hover)); }
.only-dk, .dark .only-lt { display: none; }
.dark .only-dk { display: inline; }
.menu, .mobile-nav { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; display: grid; gap: 4px; min-width: 200px; padding: 8px;
  background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); border-radius: 12px;
  box-shadow: 0 12px 32px rgb(var(--shadow-color) / 0.16); }
.mobile-nav { min-width: 240px; }
.menu-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none;
  color: rgb(var(--color-ink)); font: inherit; text-align: left; cursor: pointer; }
.menu-item:hover { background: rgb(var(--color-hover)); }
.menu-item[aria-pressed="true"] { background: rgb(var(--color-accent-soft)); color: rgb(var(--color-accent-ink)); font-weight: 600; }

/* ── Buttons, links, pills ──────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px;
  border: 1px solid transparent; font: 600 1rem/1 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--sw-dur-fast) var(--sw-ease-standard), border-color var(--sw-dur-fast) var(--sw-ease-standard), color var(--sw-dur-fast) var(--sw-ease-standard); }
.btn-primary { background: rgb(var(--color-accent)); color: rgb(var(--color-on-accent)); }
.btn-primary:hover { background: rgb(var(--color-accent-hover)); color: rgb(var(--color-on-accent)); }
.btn-primary:active { background: rgb(var(--color-accent-active)); }
.btn-neutral { background: rgb(var(--color-panel)); color: rgb(var(--color-ink)); border-color: rgb(var(--color-outline)); }
.btn-neutral:hover { background: rgb(var(--color-hover)); color: rgb(var(--color-ink)); }
.btn-ghost { background: transparent; color: rgb(var(--color-ink)); }
.btn-ghost:hover { background: rgb(var(--color-hover)); color: rgb(var(--color-ink)); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 0.9375rem; }
.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 9999px; font-size: 0.75rem;
  font-weight: 600; line-height: 1.3; letter-spacing: 0.01em; white-space: nowrap; }
.pill-success { background: rgb(var(--color-success)); color: rgb(var(--color-on-success)); }
.pill-warn { background: rgb(var(--color-warn)); color: rgb(var(--color-on-warn)); }
.pill-info { background: rgb(var(--color-info)); color: rgb(var(--color-on-info)); }
.pill-accent { background: rgb(var(--color-accent-soft)); color: rgb(var(--color-accent-ink)); }
.pill-emphasis { background: rgb(var(--color-emphasis)); color: rgb(var(--color-on-emphasis)); }
.pill-neutral { background: rgb(var(--color-surface)); color: rgb(var(--color-ink)); border: 1px solid rgb(var(--color-line)); }

/* ── Type helpers ───────────────────────────────────────────────────────── */
.eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(var(--color-accent-ink)); margin-bottom: 14px; }
.lead { margin-top: 20px; max-width: 46rem; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: rgb(var(--color-ink)); }
.para { max-width: 44rem; color: rgb(var(--color-muted)); }
.para.wide { max-width: 60rem; }
.page-hero .para { margin-top: 16px; }
.note { color: rgb(var(--color-muted)); font-size: 0.9375rem; margin-top: 12px; }
.small-title { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(var(--color-muted)); margin: 0 0 10px; }
.accent-phrase { font-family: var(--font-accent); font-weight: 600; font-size: 0.9375rem; color: rgb(var(--color-accent-ink)); margin-bottom: 10px; }
.more { margin-top: 20px; }

/* ── Sections ───────────────────────────────────────────────────────────── */
.crumbs { padding-top: 20px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; color: rgb(var(--color-muted)); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: rgb(var(--color-outline)); }
.crumbs a { color: rgb(var(--color-muted)); }
.crumbs a:hover { color: rgb(var(--color-ink)); }
.page-hero { padding-block: 40px 56px; }
@media (min-width: 768px) { .page-hero { padding-block: 56px 80px; } }
.section { padding-block: 64px; }
@media (min-width: 768px) { .section { padding-block: 96px; } }
.section-tight { padding-block: 0 48px; }
.section-alt { background: rgb(var(--color-surface)); border-block: 1px solid rgb(var(--color-line)); }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 52rem; }
.two-col { display: grid; gap: 32px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; } }

/* ── Cards, tiles, panels ───────────────────────────────────────────────── */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; padding: 20px; min-height: 100%; border-radius: 16px;
  background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); color: rgb(var(--color-ink)); text-decoration: none; }
a.card:hover { border-color: rgb(var(--color-accent-ink)); background: rgb(var(--color-panel)); color: rgb(var(--color-ink)); }
.card p { color: rgb(var(--color-muted)); font-size: 0.9875rem; }
.card-top { display: flex; align-items: center; gap: 8px; min-height: 0; }
.card-top:empty { display: none; }
.card-meta { font-size: 0.8125rem; color: rgb(var(--color-muted)); }
.card-more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font-weight: 600; color: rgb(var(--color-accent-ink)); font-size: 0.9375rem; }
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tile, .panel { padding: 22px; border-radius: 16px; background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); }
.tile h3, .panel h3 { margin-bottom: 8px; }
.tile p, .panel p { color: rgb(var(--color-muted)); }
.tile-link { color: rgb(var(--color-ink)); text-decoration: none; }
.tile-link:hover { border-color: rgb(var(--color-accent-ink)); color: rgb(var(--color-ink)); }
.panels { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; margin-bottom: 8px; border-radius: 12px; border: 1px solid rgb(var(--color-line)); }
.callout-info { background: rgb(var(--color-info-soft)); }
.callout-warn { background: rgb(var(--color-warn-soft)); }
.callout-success { background: rgb(var(--color-success-soft)); }
.callout .icon { margin-top: 3px; color: rgb(var(--color-accent-ink)); }
.works-in { margin-bottom: -40px; color: rgb(var(--color-muted)); font-size: 0.9375rem; }

/* ── Lists, steps, facts, tables, chips ─────────────────────────────────── */
.checklist { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; max-width: 60rem; }
@media (min-width: 900px) { .checklist { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .tick { margin-top: 3px; color: rgb(var(--color-accent-ink)); }
.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: none; max-width: 56rem; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: baseline; padding: 18px 20px; border-radius: 16px;
  background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); }
.step-n { font-family: var(--font-display); font-weight: 300; font-size: 1.5rem; line-height: 1; color: rgb(var(--color-accent-ink)); font-variant-numeric: tabular-nums; }
.facts { display: grid; gap: 0; margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid rgb(var(--color-line)); background: rgb(var(--color-panel)); }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts > div { padding: 14px 20px; border-bottom: 1px solid rgb(var(--color-line)); }
.facts dt { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgb(var(--color-muted)); }
.facts dd { margin: 4px 0 0; }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid rgb(var(--color-line)); background: rgb(var(--color-panel)); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9875rem; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid rgb(var(--color-line)); }
.table thead th { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgb(var(--color-muted)); background: rgb(var(--color-surface)); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody th { font-weight: 600; min-width: 160px; }
.table code { font-size: 0.875rem; }
.chips, .code-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 9999px; background: rgb(var(--color-surface)); border: 1px solid rgb(var(--color-line)); font-size: 0.9375rem; }
.code-chips li code { display: inline-block; padding: 4px 10px; border-radius: 8px; background: rgb(var(--color-surface)); border: 1px solid rgb(var(--color-line)); font-size: 0.8125rem; }
.int-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.int-group h3 { margin-bottom: 12px; font-size: 1rem; }
.link-row { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq-list { display: grid; gap: 12px; max-width: 56rem; }
.faq { border-radius: 16px; background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); }
.faq > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 20px; border-radius: 16px; }
.faq > summary:hover { background: rgb(var(--color-hover)); }
.faq h3 { font-size: 1.0625rem; }
.faq .chev { color: rgb(var(--color-muted)); transition: transform var(--sw-dur-base) var(--sw-ease-standard); }
.faq[open] .chev { transform: rotate(180deg); }
.faq-a { padding: 0 20px 18px; color: rgb(var(--color-muted)); }

/* ── Terminal (code on deep ink in both themes) ─────────────────────────── */
.terminal { border-radius: 16px; overflow: hidden; background: var(--brand-deep-ink); color: var(--brand-warm-cream); border: 1px solid rgb(var(--color-line)); }
.dark .terminal { background: rgb(var(--color-panel)); }
.terminal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; font-size: 0.875rem;
  border-bottom: 1px solid rgb(var(--color-outline)); }
.copy { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgb(var(--color-outline));
  background: transparent; color: var(--brand-warm-cream); font: 600 0.875rem var(--font-sans); cursor: pointer; }
.copy:hover { background: rgb(var(--color-accent)); border-color: rgb(var(--color-accent)); color: rgb(var(--color-on-accent)); }
.copy.done { background: var(--brand-citron); color: var(--brand-deep-ink); border-color: var(--brand-citron); }
.transcript { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 0.875rem; line-height: 1.7; white-space: pre; }
.prompt { color: var(--brand-citron); }
.out { color: var(--brand-warm-cream); }
.terminal-prompt { display: flex; align-items: center; gap: 8px; padding: 0 20px 14px; }
.terminal-prompt input { flex: 1; min-height: 44px; padding: 0 10px; border-radius: 8px; border: 1px solid rgb(var(--color-outline));
  background: transparent; color: var(--brand-warm-cream); font: 0.875rem ui-monospace, Menlo, monospace; }
.terminal-response { padding: 0 20px 14px; font-size: 0.875rem; }
.terminal-response:empty { display: none; }
.install-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .install-grid { grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; } }
.install-alt { margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: rgb(var(--color-muted)); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.foot { margin-top: 0; background: rgb(var(--color-surface)); border-top: 1px solid rgb(var(--color-line)); }
.closing { display: grid; gap: 24px; padding-block: 64px; border-bottom: 1px solid rgb(var(--color-line)); }
@media (min-width: 900px) { .closing { grid-template-columns: 1fr auto; align-items: end; } .closing .actions { margin-top: 0; } }
.closing-title { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
.foot-grid { display: grid; gap: 32px; padding-block: 48px 40px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.foot-brand { grid-column: 1 / -1; display: grid; align-content: start; gap: 12px; max-width: 34rem; }
@media (min-width: 1100px) { .foot-grid { grid-template-columns: 2fr repeat(5, 1fr); } .foot-brand { grid-column: auto; } }
.foot-brand p { color: rgb(var(--color-muted)); font-size: 0.9375rem; }
.foot-meta { font-size: 0.875rem !important; }
.foot-col { display: grid; align-content: start; gap: 2px; }
.foot-title { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(var(--color-muted)); margin-bottom: 8px; }
.foot-col a { display: inline-flex; align-items: center; min-height: 32px; color: rgb(var(--color-ink)); text-decoration: none; font-size: 0.9375rem; }
.foot-col a:hover { color: rgb(var(--color-accent-ink)); text-decoration: underline; }

/* ── Home: the design-system scroll story (motion/scroll-reveal) ────────── */
.home .sw-hub-seq-copy { text-align: left; }
.home-hero { display: grid; justify-items: start; }
.home-hero h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); line-height: 0.98; }
.home-hero h1 span { color: rgb(var(--color-accent-ink)); }
.home-hero .lead { max-width: 40rem; }
.hero-note { margin-top: 18px; color: rgb(var(--color-muted)); font-size: 0.9375rem; }
.splash { width: 58px; height: 54px; margin-bottom: 20px; }
.splash .sw-box { width: 100%; height: 100%; display: block; }
.sw-hub-seq-frame { max-width: 1040px; margin-inline: auto; }
.reveal-title { font-size: clamp(1.75rem, 3.6vw, 3rem); max-width: 54rem; }
.sw-hub-intro { display: grid; justify-items: start; }
.preview { margin: 0; border-radius: 16px; overflow: hidden; background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line));
}
.preview figcaption { display: flex; justify-content: space-between; padding: 10px 16px; font-size: 0.8125rem; color: rgb(var(--color-muted));
  background: rgb(var(--color-surface)); border-bottom: 1px solid rgb(var(--color-line)); }
.preview-window { display: grid; grid-template-columns: 1fr; min-height: 300px; }
@media (min-width: 720px) { .preview-window { grid-template-columns: 200px 1fr; } }
.preview-side { display: none; flex-direction: column; gap: 4px; padding: 20px; background: rgb(var(--color-sidebar)); }
@media (min-width: 720px) { .preview-side { display: flex; } }
.preview-side span { padding: 10px 12px; border-radius: 10px; font-weight: 500; color: var(--brand-deep-ink); }
.dark .preview-side span { color: rgb(var(--color-ink)); }
.preview-side .active { background: rgb(var(--color-sidebar-active)); color: rgb(var(--color-on-accent)) !important; }
.preview-main { padding: 20px; overflow-x: auto; }
.preview-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.preview-head strong { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.preview-search { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; min-width: 240px; border-radius: 10px;
  border: 1px solid rgb(var(--color-line)); color: rgb(var(--color-muted)); font-size: 0.9375rem; }
.preview table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.preview th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgb(var(--color-muted)); padding: 8px; border-bottom: 1px solid rgb(var(--color-line)); }
.preview td { padding: 10px 8px; border-bottom: 1px solid rgb(var(--color-line)); vertical-align: middle; }
.preview td:first-child { display: flex; gap: 12px; align-items: center; }
.preview td small { display: block; color: rgb(var(--color-muted)); font-size: 0.8125rem; }
.item-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-weight: 700; font-size: 0.8125rem; color: var(--brand-deep-ink); }
.item-teal { background: var(--brand-citron); } .item-orange { background: var(--brand-workshop-orange); } .item-sky { background: var(--brand-sky-blue); }

.deployments { border-bottom: 1px solid rgb(var(--color-line)); }
.dep-inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .dep-inner { grid-template-columns: 5fr 5fr 2fr; } }
.dep-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .dep-list { grid-template-columns: 1fr 1fr; } }
.dep-list a { display: grid; gap: 4px; padding: 18px; border-radius: 16px; border: 1px solid rgb(var(--color-line)); background: rgb(var(--color-panel)); text-decoration: none; color: rgb(var(--color-ink)); }
.dep-list a:hover { border-color: rgb(var(--color-accent-ink)); color: rgb(var(--color-ink)); }
.dep-list img { width: 100%; max-width: 200px; margin-bottom: 8px; }
.dark .dep-list img { background: var(--brand-warm-cream); border-radius: 8px; padding: 6px; }
.dep-name { font-weight: 600; }
.dep-place { color: rgb(var(--color-muted)); font-size: 0.875rem; }
.dep-metric { display: grid; }
.dep-metric strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 5vw, 3.5rem); line-height: 1; color: rgb(var(--color-accent-ink)); }
.dep-metric span { color: rgb(var(--color-muted)); }

.ledger { border-radius: 16px; background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); overflow: hidden; }
.ledger header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid rgb(var(--color-line)); }
.ledger header span { color: rgb(var(--color-muted)); font-size: 0.9375rem; }
.ledger ol { margin: 0; padding: 0; list-style: none; }
.ledger li { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 14px 20px; border-bottom: 1px solid rgb(var(--color-line)); align-items: start; }
.ledger .rid { font-variant-numeric: tabular-nums; color: rgb(var(--color-muted)); font-size: 0.875rem; }
.ledger p { color: rgb(var(--color-muted)); font-size: 0.9375rem; }
.ledger .rwhen { color: rgb(var(--color-muted)); font-size: 0.8125rem; text-align: right; }
.ledger .evidence { display: flex; align-items: center; gap: 10px; }
.ledger .evidence svg { width: 40px; height: 40px; padding: 4px; border-radius: 6px; background: var(--brand-warm-cream); color: var(--brand-deep-ink); }
.ledger footer { display: flex; align-items: center; gap: 10px; padding: 14px 20px; color: rgb(var(--color-muted)); font-size: 0.9375rem; background: rgb(var(--color-surface)); }

.picker-grid { display: grid; gap: 32px; }
@media (min-width: 1000px) { .picker-grid { grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; } }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: rgb(var(--color-surface)); border: 1px solid rgb(var(--color-line)); margin-bottom: 20px; }
.segmented button { flex: 1 1 auto; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: rgb(var(--color-ink)); font: 600 0.9375rem var(--font-sans); cursor: pointer; }
.segmented button:hover { background: rgb(var(--color-hover)); }
.segmented button[aria-pressed="true"] { background: rgb(var(--color-accent)); color: rgb(var(--color-on-accent)); }
.areas { display: grid; gap: 8px; margin: 0 0 20px; padding: 0; border: 0; }
.area { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 12px 16px; border-radius: 12px;
  background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); cursor: pointer; }
.area:hover { background: rgb(var(--color-hover)); }
.area:has(input:checked) { border-color: rgb(var(--color-accent-ink)); }
.aname { display: grid; font-weight: 600; }
.aname small { font-weight: 400; color: rgb(var(--color-muted)); font-size: 0.875rem; }
.area input { width: 24px; height: 24px; accent-color: rgb(var(--color-accent)); flex: none; }

.eco-map { display: grid; gap: 16px; }
@media (min-width: 960px) { .eco-map { grid-template-columns: 2fr 1fr 1fr; } }
.eco-core, .eco-side { padding: 24px; border-radius: 16px; border: 1px solid rgb(var(--color-line)); background: rgb(var(--color-panel)); display: grid; gap: 10px; align-content: start; }
.eco-core { background: rgb(var(--color-accent-soft)); border-color: rgb(var(--color-accent-ink)); }
.eco-core p { color: rgb(var(--color-ink)); }
.eco-core .chips li { background: rgb(var(--color-panel)); }
.eco-side p { color: rgb(var(--color-muted)); }
.eco-side .eyebrow { color: rgb(var(--color-accent-ink)); }

/* ── Docs ───────────────────────────────────────────────────────────────── */
.docs-layout { display: grid; gap: 32px; padding-block: 24px 80px; }
@media (min-width: 900px) { .docs-layout { grid-template-columns: 260px minmax(0, 1fr); } }
@media (min-width: 1240px) { .docs-layout { grid-template-columns: 260px minmax(0, 1fr) 220px; } .docs-layout-index { grid-template-columns: 260px minmax(0, 1fr); } }
.docs-side { display: grid; align-content: start; gap: 6px; font-size: 0.9375rem; }
@media (min-width: 900px) { .docs-side { position: sticky; top: calc(var(--sw-hub-header-h) + 16px); max-height: calc(100vh - var(--sw-hub-header-h) - 32px); overflow-y: auto; padding-right: 8px; } }
.side-home { font-weight: 700; color: rgb(var(--color-ink)); text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.side-all { margin-top: 8px; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.side-group > summary { min-height: 40px; display: flex; align-items: center; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgb(var(--color-muted)); }
.side-group ul { margin: 0 0 8px; padding: 0; list-style: none; display: grid; }
.side-group a { display: block; padding: 7px 10px; border-radius: 8px; color: rgb(var(--color-ink)); text-decoration: none; line-height: 1.35; }
.side-group a:hover { background: rgb(var(--color-hover)); }
.side-group a[aria-current] { background: rgb(var(--color-accent)); color: rgb(var(--color-on-accent)); }
.docs-article { min-width: 0; }
.docs-article h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; }
.docs-toc { display: none; }
@media (min-width: 1240px) { .docs-toc { display: block; position: sticky; top: calc(var(--sw-hub-header-h) + 16px); align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 0.875rem; } }
.docs-toc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.docs-toc a { color: rgb(var(--color-muted)); text-decoration: none; }
.docs-toc a:hover { color: rgb(var(--color-ink)); }
.prose { max-width: 48rem; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.75rem; margin-top: 2em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.6em; }
.prose h4 { margin: 1.4em 0 0; font-size: 1.0625rem; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose code { padding: 1px 6px; border-radius: 6px; background: rgb(var(--color-surface)); border: 1px solid rgb(var(--color-line)); }
.prose pre { padding: 16px 18px; overflow-x: auto; border-radius: 12px; background: var(--brand-deep-ink); color: var(--brand-warm-cream); line-height: 1.6; }
.dark .prose pre { background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); }
.prose pre code { padding: 0; border: 0; background: none; color: inherit; }
.prose blockquote { margin-inline: 0; padding: 12px 18px; border-left: 3px solid rgb(var(--color-accent-ink)); background: rgb(var(--color-surface)); border-radius: 0 12px 12px 0; }
.prose img { border-radius: 12px; border: 1px solid rgb(var(--color-line)); }
.prose .table-wrap { margin-top: 1.2em; }
.prose hr { border: 0; border-top: 1px solid rgb(var(--color-line)); }
.doc-source { margin-top: 48px; padding-top: 16px; border-top: 1px solid rgb(var(--color-line)); color: rgb(var(--color-muted)); font-size: 0.875rem; }
.doc-source a { display: inline-flex; align-items: center; gap: 4px; }
.pager { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: grid; gap: 4px; padding: 14px 18px; border-radius: 12px; border: 1px solid rgb(var(--color-line)); background: rgb(var(--color-panel)); color: rgb(var(--color-ink)); text-decoration: none; font-weight: 600; }
.pager a:hover { border-color: rgb(var(--color-accent-ink)); color: rgb(var(--color-ink)); }
.pager span { font-size: 0.8125rem; font-weight: 400; color: rgb(var(--color-muted)); }
.pager-next { text-align: right; grid-column: -2; }
.docs-group { margin-top: 36px; }
.docs-group h2 { font-size: 1.5rem; margin-bottom: 12px; }
.doc-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.doc-list li { padding: 10px 0; border-bottom: 1px solid rgb(var(--color-line)); }
.doc-list a { font-weight: 600; }
.doc-list p { color: rgb(var(--color-muted)); font-size: 0.9375rem; }
.docs-search { display: flex; align-items: center; gap: 10px; max-width: 44rem; padding: 0 16px; border-radius: 12px; border: 1px solid rgb(var(--color-outline)); background: rgb(var(--color-panel)); }
.docs-search:focus-within { outline: 2px solid rgb(var(--color-focus)); outline-offset: 2px; }
.docs-search input { flex: 1; min-height: 52px; border: 0; background: transparent; color: rgb(var(--color-ink)); font: inherit; outline: none; }
.search-results { max-width: 44rem; margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.search-results a { display: grid; gap: 2px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgb(var(--color-line)); background: rgb(var(--color-panel)); text-decoration: none; color: rgb(var(--color-ink)); }
.search-results a:hover { border-color: rgb(var(--color-accent-ink)); color: rgb(var(--color-ink)); }
.search-results small { color: rgb(var(--color-muted)); }
.search-results .empty { color: rgb(var(--color-muted)); }

/* ── Guides, design system, 404 ─────────────────────────────────────────── */
.guide-body { display: grid; gap: 40px; padding-bottom: 80px; max-width: 56rem; }
.guide-sec h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 12px; }
.ds-motion { display: grid; place-items: center; width: 160px; height: 148px; margin-bottom: 24px; border-radius: 16px; background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); }
.ds-motion .sw-box { width: 102px; height: 94px; display: block; }
.not-found { text-align: center; padding-block: 80px 120px; }
.not-found .hero-inner { display: grid; justify-items: center; }
.not-found .lead { margin-inline: auto; }
.patch { margin-bottom: 20px; }
.more-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 24px; }

/* Reveal blocks wait for the design-system script; without it (or with reduced motion) everything is visible. */
@media print { .top, .foot, .docs-side, .docs-toc { display: none; } }
@media (forced-colors: active) { .btn, .card, .pill, .faq, .tile, .panel { border: 1px solid CanvasText; } }

.area-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; max-width: 60rem; }
.area-chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 9999px;
  background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); color: rgb(var(--color-ink)); text-decoration: none; font-weight: 500; }
.area-chips a:hover { border-color: rgb(var(--color-accent-ink)); color: rgb(var(--color-ink)); }
.dot { width: 10px; height: 10px; border-radius: 9999px; flex: none; }
.c-sky { background: var(--brand-sky-blue); } .c-citron { background: var(--brand-citron); border: 1px solid rgb(var(--color-outline)); }
.c-yellow { background: var(--brand-warm-yellow); } .c-orange { background: var(--brand-workshop-orange); } .c-teal { background: var(--brand-maker-teal); }
.picker-grid > *, .install-grid > *, .two-col > *, .dep-inner > *, .eco-map > *, .docs-layout > * { min-width: 0; }
.area .aname { min-width: 0; }
.sw-hub-seq:not([data-animated]) .sw-hub-intro { padding-block: 48px 56px; }

/* ── Brand palette as flat accents (brand/graphics: flap shapes and colour as quiet accents) ───────── */
.card[data-tone] { border-top-width: 6px; }
[data-tone="sky"] { border-top-color: var(--brand-sky-blue); }
[data-tone="citron"] { border-top-color: var(--brand-citron); }
[data-tone="yellow"] { border-top-color: var(--brand-warm-yellow); }
[data-tone="orange"] { border-top-color: var(--brand-workshop-orange); }
[data-tone="teal"] { border-top-color: var(--brand-maker-teal); }
a.card[data-tone]:hover { border-color: rgb(var(--color-accent-ink)); border-top-color: inherit; }
a.card[data-tone="sky"]:hover { border-top-color: var(--brand-sky-blue); } a.card[data-tone="citron"]:hover { border-top-color: var(--brand-citron); }
a.card[data-tone="yellow"]:hover { border-top-color: var(--brand-warm-yellow); } a.card[data-tone="orange"]:hover { border-top-color: var(--brand-workshop-orange); }
a.card[data-tone="teal"]:hover { border-top-color: var(--brand-maker-teal); }
.tone-band { display: flex; height: 6px; border-radius: 9999px; overflow: hidden; max-width: 220px; margin-top: 28px; }
.tone-band span { flex: 1; }
.tone-band span:nth-child(1) { background: var(--brand-maker-teal); } .tone-band span:nth-child(2) { background: var(--brand-citron); }
.tone-band span:nth-child(3) { background: var(--brand-sky-blue); } .tone-band span:nth-child(4) { background: var(--brand-warm-yellow); }
.tone-band span:nth-child(5) { background: var(--brand-workshop-orange); }


/* Stagger starts when its section is revealed, so the cards arrive as you reach them. */
[data-reveal-ready] [data-reveal]:not([data-revealed]) .sw-stagger > * { animation: none; }
.splash { cursor: default; }

/* One loader everywhere: the box that opens, with a status word (design/motion/box-open). */
.page-loader { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: rgb(var(--color-bg)); color: rgb(var(--color-muted)); font-weight: 600; }
.page-loader[hidden] { display: none; }
.page-loader .sw-box { width: 78px; height: 72px; display: block; }
@media (prefers-reduced-motion: no-preference) { .page-loader:not([hidden]) { animation: sw-vt-in var(--sw-dur-slow) var(--sw-ease-enter) both; } }
[data-search-spinner] { display: inline-block; width: 22px; height: 20px; vertical-align: middle; margin-right: 8px; }
.empty[role="status"] { display: flex; align-items: center; }
.foot-tagline { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem !important; color: rgb(var(--color-ink)) !important; }

/* About page */
.story { max-width: 46rem; margin: 0; padding: 0 0 0 24px; border-left: 3px solid rgb(var(--color-accent-ink)); display: grid; gap: 18px; }
.story p { font-size: 1.125rem; line-height: 1.7; }
.story footer { color: rgb(var(--color-muted)); font-weight: 600; }

/* Handover story: rows join the record as each step becomes current (only while the scrolly is live). */
@media (prefers-reduced-motion: no-preference) {
  [data-scrolly][data-live] .ledger li { transition: opacity var(--sw-dur-slow) var(--sw-ease-standard), transform var(--sw-dur-slow) var(--sw-ease-enter); }
  [data-scrolly][data-live] .ledger[data-at="1"] li:nth-child(n+2),
  [data-scrolly][data-live] .ledger[data-at="2"] li:nth-child(n+3),
  [data-scrolly][data-live] .ledger[data-at="3"] li:nth-child(n+4) { opacity: 0; transform: translate3d(0, 8px, 0); }
  [data-scrolly][data-live] .ledger:not([data-at="4"]) footer { opacity: 0; }
  [data-scrolly][data-live] .ledger footer { transition: opacity var(--sw-dur-slow) var(--sw-ease-standard); }
}
.sw-hub-scrolly-steps { margin: 0; padding: 0; list-style: none; }
.sw-hub-scrolly-title { font-family: var(--font-display); font-weight: 800; }

/* Areas explorer */
.explorer { display: grid; gap: 20px; }
.explorer-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.explorer-tabs [role="tab"] { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 9999px; cursor: pointer;
  border: 1px solid rgb(var(--color-line)); background: rgb(var(--color-panel)); color: rgb(var(--color-ink)); font: 500 0.9375rem var(--font-sans); }
.explorer-tabs [role="tab"]:hover { background: rgb(var(--color-hover)); }
.explorer-tabs [role="tab"][aria-selected="true"] { background: rgb(var(--color-accent)); border-color: rgb(var(--color-accent)); color: rgb(var(--color-on-accent)); }
.explorer:not([data-live]) .explorer-tabs { display: none; }
.area-panel { display: grid; gap: 28px; padding: 28px; border-radius: 16px; background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-line)); }
.explorer:not([data-live]) .area-panel + .area-panel { margin-top: 0; }
@media (min-width: 900px) { .area-panel { grid-template-columns: 3fr 2fr; } }
.area-panel h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; margin-bottom: 10px; }
.area-panel .checklist { grid-template-columns: 1fr; margin-top: 18px; }
.panel-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.panel-links a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: rgb(var(--color-ink)); text-decoration: none; border: 1px solid transparent; }
.panel-links a:hover { background: rgb(var(--color-hover)); border-color: rgb(var(--color-line)); }

.answer { max-width: 56rem; margin: 0 0 28px; }
.story-short p { font-size: 1.25rem; }
.table-matrix td { min-width: 132px; }
.matrix-wrap { max-width: 100%; }
.table-matrix th:first-child { position: sticky; left: 0; z-index: 1; min-width: 170px; background: rgb(var(--color-panel)); border-right: 1px solid rgb(var(--color-line)); }
.table-matrix thead th:first-child { background: rgb(var(--color-surface)); }
.table-matrix thead th:nth-child(2), .table-matrix td:nth-child(2) { background: rgb(var(--color-accent-soft)); }
.scroll-hint { margin-bottom: 10px; color: rgb(var(--color-muted)); font-size: 0.875rem; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; color: rgb(var(--color-muted)); font-size: 0.875rem; }
.cell-note { display: block; margin-top: 4px; color: rgb(var(--color-muted)); font-size: 0.8125rem; }
.source-list { margin: 16px 0 0; padding-left: 1.2em; color: rgb(var(--color-muted)); font-size: 0.875rem; word-break: break-all; }
.entries { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.entry { display: grid; gap: 10px; align-content: start; }
.entry-self { border-color: rgb(var(--color-accent-ink)); background: rgb(var(--color-accent-soft)); }
.entry-self p { color: rgb(var(--color-ink)); }
.mini { display: grid; gap: 8px; margin: 6px 0 0; }
.mini div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 0.9375rem; }
.mini dt { color: rgb(var(--color-muted)); font-weight: 600; }
.mini dd { margin: 0; }

/* The quiet symbol pattern from the design-system landing page (design/site/src/styles/landing.css .sw-land-pattern). */
.page-hero, .home .sw-hub-seq-copy { isolation: isolate; }
.sw-land-pattern { position: absolute; inset: 0; z-index: -1; pointer-events: none; background-color: rgb(var(--color-ink)); opacity: 0.045;
  -webkit-mask-image: url('/brand/symbol-one-colour-ink.svg'), linear-gradient(90deg, black, transparent 30%, transparent 70%, black);
  mask-image: url('/brand/symbol-one-colour-ink.svg'), linear-gradient(90deg, black, transparent 30%, transparent 70%, black);
  -webkit-mask-size: 172px 160px, 100% 100%; mask-size: 172px 160px, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat; mask-repeat: repeat, no-repeat; -webkit-mask-composite: source-in; mask-composite: intersect; }
:root.dark .sw-land-pattern { background-color: rgb(var(--color-muted)); opacity: 0.06; }
@media (max-width: 767px) { .sw-land-pattern { -webkit-mask-size: 120px 112px, 100% 100%; mask-size: 120px 112px, 100% 100%; opacity: 0.035; } }

/* Home hero, centred like the design-system landing: box, badge, title, lede, one orange action. */
.home .sw-hub-seq-copy { text-align: center; }
.home-hero { justify-items: center; }
.home-hero .lead { margin-inline: auto; }
.home-hero .actions { justify-content: center; }
.home-hero .splash { width: 116px; height: 108px; margin-bottom: 24px; }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; margin-bottom: 18px; border-radius: 9999px; font-size: 0.8125rem; font-weight: 600;
  background: rgb(var(--color-info)); color: rgb(var(--color-on-info)); }
.home-hero h1 { font-size: clamp(2.75rem, 1.35rem + 4.4vw, 5.25rem); letter-spacing: -0.035em; }
.btn-emphasis { background: rgb(var(--color-emphasis)); color: rgb(var(--color-on-emphasis)); }
.btn-emphasis:hover { background: rgb(var(--color-emphasis-hover)); color: rgb(var(--color-on-emphasis)); }
.btn-emphasis:active { background: rgb(var(--color-emphasis-active)); }
.home-hero .tone-band { margin-inline: auto; }
