/* ==========================================================================
   Orrery — SaaS website template (Flagship)
   --------------------------------------------------------------------------
   1. Design tokens            9. Footer
   2. Fonts                   10. Shared components (chips, notes, details, forms, tables)
   3. Base                    11. Product interface pieces (window, orbit, charts, chains…)
   4. Layout                  12. Home page
   5. Typography              13. Inner page heroes and sub-navigation
   6. Buttons and links       14. Page-specific layouts
   7. Announcement and header 15. Interactive demo
   8. Phone menu              16. Utilities, motion, print
   Colours, type and spacing all come from section 1: change them there.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. DESIGN TOKENS */
:root {
  /* Brand */
  --color-primary: #0E7C6B;          /* verdigris: buttons, links, "on track" */
  --color-primary-hover: #0A6658;
  --color-primary-text: #0B6E5F;     /* small primary text on light backgrounds (AA) */
  --color-primary-soft: #DDEFEA;
  --color-brass: #C9973A;            /* brass: orbits, highlights, "waiting" (non-text) */
  --color-brass-text: #85621B;       /* small brass text on light backgrounds (AA) */
  --color-brass-soft: #F4EAD5;
  --color-danger: #B63A28;           /* exceptions and form errors */
  --color-danger-soft: #F7E1DC;

  /* Neutrals (cool, ink-blue) */
  --color-ink: #0F1B2D;              /* text, dark sections */
  --color-ink-2: #1A2940;            /* raised surfaces on dark */
  --color-ink-3: #2A3B55;            /* lines on dark */
  --color-text: #0F1B2D;
  --color-muted: #4E5A6B;            /* secondary text (AA on all light surfaces) */
  --color-paper: #F2F4F5;            /* page background */
  --color-surface: #FFFFFF;          /* panels, windows */
  --color-surface-2: #E8ECEF;        /* quiet panels */
  --color-line: #DAE0E5;
  --color-line-strong: #BFC8D1;
  --color-on-dark: #E9EEF3;
  --color-on-dark-muted: #A7B3C2;

  /* Type */
  --font-display: 'Poppins', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 0.8125rem;   /* 13 */
  --text-sm: 0.875rem;    /* 14 */
  --text-base: 1rem;      /* 16 */
  --text-md: 1.0625rem;   /* 17: body copy */
  --text-lg: 1.25rem;     /* 20 */
  --text-xl: 1.5rem;      /* 24 */
  --text-2xl: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  --text-3xl: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  --text-4xl: clamp(2.6rem, 1.6rem + 4.4vw, 5.25rem);
  --leading-tight: 1.06;
  --leading-snug: 1.25;
  --leading-body: 1.6;

  /* Space (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section-y: clamp(72px, 9vw, 128px);

  /* Layout */
  --container: 1240px;
  --container-narrow: 780px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;

  /* Shape */
  --radius-sm: 6px;       /* buttons, fields, chips */
  --radius-md: 10px;      /* panels and cards */
  --radius-lg: 16px;      /* product windows */
  --radius-pill: 999px;   /* status labels only */
  --border: 1px solid var(--color-line);

  /* Depth: one shadow for floating product windows, one for menus */
  --shadow-window: 0 1px 2px rgba(15, 27, 45, .06), 0 28px 56px -24px rgba(15, 27, 45, .28);
  --shadow-pop: 0 18px 40px -12px rgba(15, 27, 45, .28);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 150ms;
  --base: 240ms;

  /* Focus */
  --focus: 0 0 0 2px var(--color-paper), 0 0 0 4px var(--color-primary);
}

/* ---------------------------------------------------------------- 2. FONTS (self-hosted, SIL Open Font License) */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 300; font-display: swap; src: url('../assets/fonts/poppins-300.woff') format('woff'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/poppins-400.woff') format('woff'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/poppins-500.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/inter-400.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/inter-500.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/inter-600.woff') format('woff'); }

/* ---------------------------------------------------------------- 3. BASE */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--color-paper); color: var(--color-text);
  font-family: var(--font-body); font-size: var(--text-md); line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11' 1;
}
html.menu-open body { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
:where(ul, ol)[role="list"] { list-style: none; margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--color-primary-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--color-primary-hover); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
::selection { background: var(--color-primary-soft); color: var(--color-ink); }
[hidden] { display: none !important; }
hr { border: 0; border-top: var(--border); margin: var(--s-7) 0; }
.ph { width: 1.25em; height: 1.25em; flex: none; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--color-ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 4. LAYOUT */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }
.section { padding: var(--section-y) 0; }
.section--tight { padding: calc(var(--section-y) * .6) 0; }
.section--white { background: var(--color-surface); }
.section--quiet { background: var(--color-surface-2); }
.section--ink { background: var(--color-ink); color: var(--color-on-dark); }
.section--ink a:not(.btn) { color: var(--color-on-dark); }
.section--ink :focus-visible { box-shadow: 0 0 0 2px var(--color-ink), 0 0 0 4px var(--color-brass); }
.section--line { border-top: var(--border); }
.section-head { display: grid; gap: var(--s-4); max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--split { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; column-gap: var(--s-8); }
.section-head > p:not(.demo-note) { margin: 0; color: var(--color-muted); font-size: var(--text-lg); line-height: 1.5; }
.section-head > .demo-note { margin: 0; }
.section--ink .section-head > p:not(.demo-note) { color: var(--color-on-dark-muted); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--wide-right { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split--wide-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--top { align-items: start; }
.stack > * + * { margin-top: var(--s-4); }
@media (max-width: 900px) {
  .split, .split--wide-right, .split--wide-left { grid-template-columns: minmax(0, 1fr); }
  .section-head--split { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- 5. TYPOGRAPHY */
h1, h2, h3, h4 { margin: 0; color: inherit; text-wrap: balance; }
h1, h2, .display { font-family: var(--font-display); font-weight: 300; letter-spacing: -0.03em; line-height: var(--leading-tight); }
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-xl); line-height: var(--leading-snug); letter-spacing: -0.015em; }
h4 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-md); line-height: var(--leading-snug); }
.h-sm { font-size: var(--text-2xl); }
p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }
.lead { font-size: clamp(1.125rem, 1.02rem + .45vw, 1.3125rem); line-height: 1.55; color: var(--color-muted); max-width: 40em; }
.section--ink .lead { color: var(--color-on-dark-muted); }
.muted { color: var(--color-muted); }
.small { font-size: var(--text-sm); }
.label { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); letter-spacing: 0; }
.section--ink .label { color: var(--color-on-dark-muted); }
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--text-2xl); margin: var(--s-8) 0 var(--s-4); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { margin: var(--s-6) 0 var(--s-3); }
.prose ul { padding-left: 1.2em; margin: 0 0 var(--s-4); }
.prose li + li { margin-top: var(--s-2); }

/* ---------------------------------------------------------------- 6. BUTTONS AND LINKS */
.btn {
  --btn-bg: var(--color-ink); --btn-fg: #fff; --btn-line: var(--btn-bg);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 11px 20px; border-radius: var(--radius-sm);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-line);
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); line-height: 1.2;
  text-decoration: none; white-space: nowrap; transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.btn:hover { color: var(--btn-fg); }
.btn .ph { width: 18px; height: 18px; }
.btn-primary { --btn-bg: var(--color-primary); }
.btn-primary:hover { --btn-bg: var(--color-primary-hover); }
.btn-secondary { --btn-bg: transparent; --btn-fg: var(--color-ink); --btn-line: var(--color-line-strong); }
.btn-secondary:hover { --btn-bg: var(--color-surface); --btn-fg: var(--color-ink); --btn-line: var(--color-ink); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--color-ink); --btn-line: transparent; padding-inline: 12px; }
.btn-ghost:hover { --btn-bg: var(--color-surface-2); --btn-fg: var(--color-ink); }
.btn-light { --btn-bg: var(--color-on-dark); --btn-fg: var(--color-ink); }
.btn-light:hover { --btn-bg: #fff; --btn-fg: var(--color-ink); }
.btn-outline-light { --btn-bg: transparent; --btn-fg: var(--color-on-dark); --btn-line: rgba(233, 238, 243, .4); }
.btn-outline-light:hover { --btn-bg: rgba(233, 238, 243, .08); --btn-fg: #fff; --btn-line: var(--color-on-dark); }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: var(--text-sm); }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: var(--text-md); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.btn-row--center { justify-content: center; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--color-primary-text); }
.text-link:hover { text-decoration: underline; }
.text-link .ph { width: 18px; height: 18px; transition: transform var(--fast) var(--ease); }
.text-link:hover .ph { transform: translateX(2px); }
.section--ink .text-link { color: #8FD6C8; }

/* ---------------------------------------------------------------- 7. ANNOUNCEMENT AND HEADER */
.announce { background: var(--color-ink); color: var(--color-on-dark); font-size: var(--text-sm); }
.announce-inner { display: flex; align-items: center; justify-content: center; gap: var(--s-3); min-height: 44px; position: relative; padding-right: calc(var(--gutter) + 40px); padding-left: calc(var(--gutter) + 40px); }
.announce p { margin: 0; text-align: center; }
.announce-tag { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--color-brass); color: var(--color-ink); font-weight: 600; font-size: var(--text-xs); }
.announce a { color: #fff; font-weight: 500; }
.announce-close { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-on-dark); }
.announce-close:hover { background: var(--color-ink-2); }
.announce :focus-visible { box-shadow: 0 0 0 2px var(--color-brass); }
html:not(.js) .announce-close { display: none; }
@media (max-width: 480px) { .announce { font-size: var(--text-xs); } .announce-tag { display: none; } }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(242, 244, 245, .94); border-bottom: 1px solid transparent; transition: border-color var(--base) var(--ease); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(242, 244, 245, .86); backdrop-filter: saturate(140%) blur(8px); } }
.site-header.is-stuck { border-bottom-color: var(--color-line); }
.header-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }
.header-inner { display: flex; align-items: center; gap: var(--s-6); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; border-radius: var(--radius-sm); }
.brand img { width: 114px; height: 32px; }
.nav { flex: 1; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-trigger, .nav-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 12px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--color-ink); font-size: var(--text-base); font-weight: 500; text-decoration: none;
}
.nav-trigger .ph { width: 14px; height: 14px; transition: transform var(--fast) var(--ease); }
.nav-trigger:hover, .nav-link:hover, .has-menu.is-open .nav-trigger { background: var(--color-surface-2); color: var(--color-ink); }
.has-menu.is-open .nav-trigger .ph { transform: rotate(180deg); }
.nav-link[aria-current="page"], .nav-trigger.is-current { box-shadow: inset 0 -2px 0 var(--color-primary); border-radius: 0; }
.nav-link[aria-current="page"]:focus-visible, .nav-trigger.is-current:focus-visible { box-shadow: var(--focus); border-radius: 4px; }
.nav-menu {
  display: none; position: absolute; top: calc(100% + 10px); left: -12px; z-index: 60; width: 560px;
  padding: var(--s-3); background: var(--color-surface); border: var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
}
.has-menu.is-open .nav-menu { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: var(--s-3); }
.nav-menu--single { width: 360px; }
.has-menu.is-open .nav-menu--single { grid-template-columns: minmax(0, 1fr); }
html:not(.js) .has-menu:hover .nav-menu, html:not(.js) .has-menu:focus-within .nav-menu { display: grid; grid-template-columns: minmax(0, 1fr); }
.menu-links { display: grid; gap: 2px; }
.menu-link { display: flex; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--color-ink); text-decoration: none; }
.menu-link:hover { background: var(--color-paper); color: var(--color-ink); }
.menu-link .ph { width: 22px; height: 22px; margin-top: 1px; color: var(--color-primary); }
.menu-link strong { display: block; font-weight: 600; font-size: var(--text-base); line-height: 1.3; }
.menu-link span span { display: block; font-size: var(--text-sm); color: var(--color-muted); line-height: 1.4; margin-top: 2px; }
.menu-link[aria-current="page"] { background: var(--color-primary-soft); }
.menu-aside { padding: var(--s-4); border-radius: var(--radius-sm); background: var(--color-ink); color: var(--color-on-dark); display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--text-sm); }
.menu-aside strong { font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); line-height: 1.25; }
.menu-aside p { color: var(--color-on-dark-muted); margin: 0; flex: 1; }
.menu-aside a { color: #8FD6C8; font-weight: 600; }
.menu-aside :focus-visible { box-shadow: 0 0 0 2px var(--color-brass); }
.header-actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.header-signin { padding: 8px 12px; color: var(--color-ink); font-weight: 500; text-decoration: none; border-radius: var(--radius-sm); font-size: var(--text-base); }
.header-signin:hover { background: var(--color-surface-2); color: var(--color-ink); }
.menu-toggle { display: none; place-items: center; width: 44px; height: 44px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-ink); }
.menu-toggle .ph { width: 22px; height: 22px; }
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
@media (max-width: 1080px) {
  .nav, .header-signin { display: none; }
  .menu-toggle { display: grid; }
  html:not(.js) .menu-toggle { display: none; }
}
@media (max-width: 420px) {
  .header-actions .btn { padding-inline: 12px; }
  .brand img { width: 100px; height: 28px; }
}

/* ---------------------------------------------------------------- 8. PHONE MENU */
.mobile-menu { display: none; }
@media (max-width: 1080px) {
  .mobile-menu.is-open { display: block; position: fixed; inset: var(--header-h) 0 0; z-index: 49; overflow-y: auto; background: var(--color-paper); border-top: var(--border); padding: var(--s-5) 0 var(--s-8); }
  html:not(.js) .mobile-menu { display: block; position: static; border-top: var(--border); padding: var(--s-4) 0; }
}
.mm-groups { display: grid; gap: var(--s-6); }
.mm-title { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); margin-bottom: var(--s-2); }
.mm-links a { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: var(--border); color: var(--color-ink); text-decoration: none; font-size: var(--text-lg); font-family: var(--font-display); }
.mm-links a .ph { color: var(--color-primary); width: 22px; height: 22px; }
.mm-links a[aria-current="page"] { color: var(--color-primary-text); }
.mm-actions { display: grid; gap: var(--s-3); margin-top: var(--s-6); }
@media (min-width: 640px) { .mm-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-7); } }

/* ---------------------------------------------------------------- 9. FOOTER */
.site-footer { background: var(--color-ink); color: var(--color-on-dark-muted); font-size: var(--text-sm); padding: var(--s-9) 0 var(--s-6); }
.site-footer a { color: var(--color-on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer :focus-visible { box-shadow: 0 0 0 2px var(--color-ink), 0 0 0 4px var(--color-brass); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 3fr); gap: var(--s-8); }
.footer-brand p { max-width: 30ch; margin-top: var(--s-4); }
.footer-brand img { width: 114px; height: 32px; }
.footer-contact { margin-top: var(--s-5); display: grid; gap: 2px; }
.footer-contact a { display: inline-flex; gap: 8px; align-items: center; padding: 3px 0; justify-self: start; }
.footer-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-6); }
.footer-col h2 { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0; color: var(--color-on-dark); margin-bottom: var(--s-3); }
.footer-col li + li { margin-top: 4px; }
.footer-col a { display: inline-block; padding: 4px 0; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--color-ink-3); }
.footer-bottom p { margin: 0; }
.social { display: flex; gap: 6px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); }
.social a:hover { background: var(--color-ink-2); }
.social .ph { width: 20px; height: 20px; }
@media (max-width: 1080px) { .footer-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- 10. SHARED COMPONENTS */
/* Status labels (the only pill shape in the system) */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 500; white-space: nowrap; background: var(--color-surface-2); color: var(--color-ink); }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--open { background: var(--color-primary-soft); color: #075548; }
.status--overdue { background: var(--color-brass-soft); color: #6E4F12; }
.status--exception { background: var(--color-danger-soft); color: #8E2B1C; }
.status--exception::before { border-radius: 1px; transform: rotate(45deg); }
.status--done { background: var(--color-surface-2); color: #3E4958; }
.status--recovered { background: var(--color-surface-2); color: #3E4958; }

/* Tags for categories */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-sm); border: var(--border); background: var(--color-surface); font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); }
.tag--new { border-color: transparent; background: var(--color-primary-soft); color: #075548; }
.tag--improved { border-color: transparent; background: var(--color-brass-soft); color: #6E4F12; }
.tag--fixed { border-color: transparent; background: var(--color-surface-2); color: #3E4958; }

/* Demo / placeholder notes: say clearly what is sample content */
.demo-note { display: inline-flex; align-items: flex-start; gap: 8px; font-size: var(--text-sm); color: var(--color-muted); }
.demo-note .ph { width: 16px; height: 16px; margin-top: 3px; color: var(--color-brass-text); }
.section--ink .demo-note { color: var(--color-on-dark-muted); }
.section--ink .demo-note .ph { color: var(--color-brass); }

/* Accordions: native <details>, styled */
.qa { border-top: var(--border); }
.qa:last-child { border-bottom: var(--border); }
.qa summary { list-style: none; display: flex; justify-content: space-between; gap: var(--s-4); align-items: flex-start; padding: 20px 0; cursor: pointer; font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.35; border-radius: 4px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .ph { width: 22px; height: 22px; margin-top: 2px; color: var(--color-primary); transition: transform var(--base) var(--ease); }
.qa[open] summary .ph { transform: rotate(45deg); }
.qa summary:hover { color: var(--color-primary-text); }
.qa-body { padding: 0 var(--s-8) var(--s-5) 0; color: var(--color-muted); max-width: 70ch; }
.qa-body p:last-child { margin: 0; }
@media (max-width: 640px) { .qa-body { padding-right: 0; } }

/* Segmented control (radio buttons) */
.seg { display: inline-flex; padding: 3px; gap: 2px; border: var(--border); border-radius: calc(var(--radius-sm) + 3px); background: var(--color-surface); margin: 0; min-width: 0; }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); white-space: nowrap; }
.seg input:checked + span { background: var(--color-ink); color: #fff; }
.seg input:focus-visible + span { box-shadow: var(--focus); }
.seg input:not(:checked):hover + span { color: var(--color-ink); background: var(--color-paper); }
.seg .seg-save { font-size: var(--text-xs); padding: 1px 6px; border-radius: 4px; background: var(--color-brass-soft); color: #6E4F12; }
.seg input:checked + span .seg-save { background: var(--color-brass); color: var(--color-ink); }

/* Chips (filter buttons) */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { min-height: 38px; padding: 6px 14px; border: var(--border); border-radius: var(--radius-sm); background: var(--color-surface); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); }
.chip:hover { border-color: var(--color-ink); }
.chip[aria-pressed="true"] { background: var(--color-ink); border-color: var(--color-ink); color: #fff; }

/* Search field */
.search { position: relative; display: block; }
.search .ph { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--color-muted); pointer-events: none; }
.search input { padding-left: 42px; }

/* Forms */
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--color-ink); font-size: var(--text-base); transition: border-color var(--fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: #6B7685; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--color-muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(14, 124, 107, .22); border-radius: var(--radius-sm); }
.select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%234E5A6B' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink); }
.field .optional { font-weight: 400; color: var(--color-muted); }
.field-hint { font-size: var(--text-sm); color: var(--color-muted); margin: 0; }
.field-error { font-size: var(--text-sm); color: var(--color-danger); margin: 0; font-weight: 500; }
.field-error:empty { display: none; }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--color-danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-sm); line-height: 1.5; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--color-primary); flex: none; }
.field > label.check { font-weight: 400; font-size: var(--text-sm); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: var(--text-sm); }
.form-status:empty { display: none; }
.form-status.is-error { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--color-danger-soft); color: #7A2416; }

/* Tables */
.table-wrap { position: relative; overflow-x: auto; border: var(--border); border-radius: var(--radius-md); background: var(--color-surface); }
.table-wrap:focus-visible { box-shadow: var(--focus); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td { text-align: left; padding: 12px 16px; border-bottom: var(--border); vertical-align: middle; }
thead th { font-weight: 600; color: var(--color-muted); background: var(--color-paper); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
td.num, th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Panels: three variants by role */
.panel { background: var(--color-surface); border: var(--border); border-radius: var(--radius-md); padding: clamp(20px, 3vw, 32px); }
.panel--quiet { background: var(--color-surface-2); border-color: transparent; }
.panel--ink { background: var(--color-ink); color: var(--color-on-dark); border-color: transparent; }

/* Placeholder customer logos (replace with logos you have permission to show) */
.logo-ph { display: flex; align-items: center; justify-content: center; gap: 10px; height: 64px; border: 1px dashed var(--color-line-strong); border-radius: var(--radius-sm); color: #59667A; font-size: var(--text-sm); font-weight: 500; }
.logo-ph svg { width: 26px; height: 26px; color: #8793A3; }

/* ---------------------------------------------------------------- 11. PRODUCT INTERFACE PIECES
   Original HTML/CSS drawings of the product. They use fixed sizes in em so they scale together. */
.app { background: var(--color-surface); border: 1px solid #CBD3DB; border-radius: var(--radius-lg); box-shadow: var(--shadow-window); overflow: hidden; color: var(--color-ink); font-size: 14px; line-height: 1.45; text-align: left; }
.app-top { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px; border-bottom: var(--border); background: #FAFBFC; }
.app-ws { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.app-ws i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--color-ink); color: #fff; font-style: normal; font-size: 11px; font-weight: 600; }
.app-search { flex: 1; max-width: 320px; margin-left: 16px; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: var(--border); border-radius: 6px; background: #fff; color: #687485; font-size: 12.5px; }
.app-search .ph { width: 14px; height: 14px; }
.app-who { margin-left: auto; display: flex; align-items: center; gap: 10px; color: #687485; font-size: 12.5px; }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--color-brass-soft); color: #6E4F12; font-size: 11px; font-weight: 600; flex: none; }
.avatar--b { background: var(--color-primary-soft); color: #075548; }
.avatar--c { background: #E3E8F4; color: #2D3F6B; }
.app-body { display: grid; grid-template-columns: 200px minmax(0, 1fr) 236px; min-height: 0; }
.app-side { border-right: var(--border); padding: 14px 10px; background: #FAFBFC; font-size: 13px; }
.side-label { padding: 0 8px; margin: 14px 0 6px; font-size: 11.5px; color: #687485; font-weight: 500; }
.side-label:first-child { margin-top: 0; }
.side-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: #2D3A4C; white-space: nowrap; }
.side-item .ph { width: 16px; height: 16px; color: #687485; }
.side-item.is-active { background: var(--color-primary-soft); color: #075548; font-weight: 600; }
.side-item.is-active .ph { color: var(--color-primary); }
.side-item b { margin-left: auto; font-weight: 600; font-size: 11.5px; color: #687485; font-variant-numeric: tabular-nums; }
.side-item .count-x { color: #8E2B1C; }
.side-item.is-active b { color: #075548; }
.app-main { padding: 18px 22px 22px; min-width: 0; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-head h3, .app-title { font-family: var(--font-body); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.app-head p { margin: 2px 0 0; color: #687485; font-size: 12.5px; }
.app-tabs { display: flex; gap: 4px; margin: 14px 0 6px; border-bottom: var(--border); font-size: 13px; }
.app-tabs span { padding: 8px 10px; color: #687485; }
.app-tabs .is-active { color: var(--color-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--color-primary); }
.app-rail { border-left: var(--border); padding: 18px; display: grid; align-content: start; gap: 16px; background: #FCFCFD; }
.rail-stat dt { font-size: 12px; color: #687485; }
.rail-stat dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rail-stat dd small { display: block; font-family: var(--font-body); font-size: 12px; color: #687485; letter-spacing: 0; }
.rail-callout { padding: 12px; border-radius: 8px; background: var(--color-brass-soft); font-size: 12.5px; color: #4A3810; }
.rail-callout strong { display: block; color: var(--color-ink); font-size: 13px; margin-bottom: 2px; }
.rail-people { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.rail-people .avatar { width: 24px; height: 24px; font-size: 10px; border: 2px solid var(--color-brass-soft); margin-left: -8px; }
.rail-people .avatar:first-child { margin-left: 0; }

/* Orbit view */
.orbit-area { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 18px; align-items: center; margin-top: 8px; }
.orbit { width: 100%; height: auto; overflow: visible; }
.orb-ring { fill: none; stroke: #D6DDE3; stroke-width: 1.2; }
.orb-step.is-person .orb-ring { stroke: #C9D1D9; stroke-dasharray: 2 4; stroke-width: 1.4; }
.orb-dot { stroke: #fff; stroke-width: 1.5; }
.orb-dot.is-open { fill: var(--color-primary); }
.orb-dot.is-overdue { fill: var(--color-brass); }
.orb-dot.is-exception { fill: var(--color-danger); }
.orb-badge { fill: #fff; stroke: #C2CBD4; stroke-width: 1; }
.orb-num { font: 600 11px var(--font-body); fill: #3E4958; }
.orb-sun { fill: var(--color-ink); }
.orb-sun-num { font: 400 30px var(--font-display); fill: #fff; letter-spacing: -0.02em; }
.orb-sun-label { font: 500 11px var(--font-body); fill: #B8C3D0; }
.orbit.has-focus .orb-step:not(.is-focus) { opacity: .22; }
.orbit.has-focus .orb-step.is-focus .orb-ring { stroke: var(--color-ink); stroke-dasharray: none; }
.orb-step { transition: opacity var(--base) var(--ease); }
.orbit-legend { display: grid; gap: 2px; font-size: 12.5px; counter-reset: none; }
.orbit-legend li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 4px; border-radius: 6px; }
.legend-num { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #C2CBD4; font-size: 10.5px; font-weight: 600; color: #3E4958; background: #fff; }
.legend-name { display: block; min-width: 0; color: var(--color-ink); line-height: 1.3; }
.legend-type { display: flex; align-items: center; gap: 4px; color: #687485; font-size: 11.5px; }
.legend-type .ph { width: 12px; height: 12px; }
.legend-count { font-variant-numeric: tabular-nums; color: #687485; white-space: nowrap; }
.legend-count strong { color: var(--color-ink); font-weight: 600; }
.legend-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: #4E5A6B; }
.legend-key span { display: inline-flex; align-items: center; gap: 6px; }
.legend-key i { width: 9px; height: 9px; border-radius: 50%; background: var(--color-primary); }
.legend-key .k-overdue { background: var(--color-brass); }
.legend-key .k-exception { background: var(--color-danger); border-radius: 1px; transform: rotate(45deg); width: 8px; height: 8px; }
.legend-key .k-person { width: 16px; height: 0; border-radius: 0; border-top: 1.5px dashed #9AA6B4; background: none; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--color-line); border: var(--border); border-radius: var(--radius-md); overflow: hidden; }
.kpi { background: var(--color-surface); padding: 16px 18px; min-width: 0; }
.kpi dt { font-size: var(--text-sm); color: var(--color-muted); font-weight: 500; }
.kpi dd { margin: 4px 0 0; }
.kpi-value { display: block; font-family: var(--font-display); font-weight: 300; font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); line-height: 1.1; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.kpi-note { display: block; margin-top: 4px; font-size: var(--text-xs); color: var(--color-muted); }

/* Horizontal bars: time per step (waiting + working) */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 6.5em; gap: 12px; align-items: center; font-size: var(--text-sm); }
.bar-label { color: var(--color-ink); line-height: 1.3; }
.bar-track { display: flex; height: 12px; border-radius: 3px; background: var(--color-paper); overflow: hidden; }
.bar-wait { background: #E2C792; }
.bar-work { background: var(--color-primary); }
.bar-row.is-slowest .bar-wait { background: var(--color-brass); }
.bar-row.is-slowest .bar-label { font-weight: 600; }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--color-muted); white-space: nowrap; }
.bar-key { display: flex; gap: 16px; font-size: var(--text-xs); color: var(--color-muted); margin-top: 12px; }
.bar-key span { display: inline-flex; align-items: center; gap: 6px; }
.bar-key i { width: 12px; height: 8px; border-radius: 2px; background: #E2C792; }
.bar-key .k-work { background: var(--color-primary); }

/* Column chart: completed runs over time */
.cols { position: relative; display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); align-items: end; gap: clamp(2px, .4vw, 6px); height: 150px; padding-top: 20px; border-bottom: 1px solid var(--color-line-strong); }
.col { height: var(--h); min-height: 2px; background: #9ED3C8; border-radius: 2px 2px 0 0; }
.col.is-top { background: var(--color-primary); }
.cols-max { position: absolute; top: 0; left: 0; font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.cols-max::after { content: ' runs'; }
.cols-note { margin-top: 8px; font-size: var(--text-xs); color: var(--color-muted); }

/* Process chain: steps across tools */
.chain { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; align-items: stretch; counter-reset: none; }
.chain-step { position: relative; display: grid; gap: 6px; align-content: start; padding: 12px; margin-right: 14px; border: var(--border); border-radius: 8px; background: #fff; font-size: 13px; }
.chain-step:last-child { margin-right: 0; }
.chain-step:not(:last-child)::after { content: ''; position: absolute; top: 50%; right: -15px; width: 14px; border-top: 1.5px solid var(--color-line-strong); }
.chain-step strong { font-weight: 600; line-height: 1.3; }
.chain-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #687485; }
.chain-kind .ph { width: 13px; height: 13px; }
.chain-step.is-person { border-style: dashed; border-color: #AEB9C5; background: #FCFCFD; }
.chain-step.is-hot { border-color: var(--color-brass); box-shadow: 0 0 0 3px var(--color-brass-soft); }
.chain-tool { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 1.3; color: #3E4958; padding: 2px 8px; border-radius: 4px; background: var(--color-paper); justify-self: start; }
.chain-tool .ph { width: 13px; height: 13px; color: var(--color-muted); }
.chain-meta { font-size: 11.5px; color: #6E4F12; font-weight: 500; }
/* The chain adapts to the width of its card: one row, rows of three, or a column */
.ui-card { container-type: inline-size; }
@container (max-width: 740px) {
  .chain { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .chain-step:nth-child(3n) { margin-right: 0; }
  .chain-step:nth-child(3n)::after { display: none; }
}
@container (max-width: 480px) {
  .chain { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .chain-step { margin-right: 0; }
  .chain-step:not(:last-child)::after { display: block; top: auto; bottom: -15px; right: auto; left: 22px; width: 0; height: 14px; border-top: 0; border-left: 1.5px solid var(--color-line-strong); }
}

/* Rule builder */
.rule { display: grid; gap: 10px; font-size: 13.5px; }
.rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border: var(--border); border-radius: 8px; background: #fff; }
.rule-word { font-weight: 600; color: var(--color-muted); min-width: 4.5em; }
.rule-token { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 5px; border: 1px solid var(--color-line-strong); background: var(--color-paper); max-width: 100%; }
.rule-token .ph { width: 14px; height: 14px; color: var(--color-primary); }
.rule-token--value { background: var(--color-brass-soft); border-color: #E6CF9D; color: #4A3810; font-variant-numeric: tabular-nums; }
.rule-branch { margin-left: 22px; position: relative; }
.rule-branch::before { content: ''; position: absolute; left: -14px; top: -10px; bottom: 50%; width: 10px; border-left: 1.5px solid var(--color-line-strong); border-bottom: 1.5px solid var(--color-line-strong); border-bottom-left-radius: 6px; }

/* Approval message card (how an approval looks in a chat tool) */
.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; font-size: 13.5px; }
.msg-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--color-ink); }
.msg-icon img { width: 24px; height: 24px; }
.msg-name { font-weight: 600; }
.msg-name span { font-weight: 400; color: #687485; font-size: 12px; margin-left: 6px; }
.msg-card { margin-top: 6px; border: var(--border); border-left: 3px solid var(--color-brass); border-radius: 6px; padding: 12px 14px; background: #fff; }
.msg-card dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 8px 0 12px; }
.msg-card dt { color: #687485; }
.msg-card dd { margin: 0; font-variant-numeric: tabular-nums; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-actions span { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border-radius: 5px; border: 1px solid var(--color-line-strong); font-weight: 600; font-size: 12.5px; }
.msg-actions .is-go { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Exceptions list */
.xlist { display: grid; font-size: 13px; }
.xrow { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: var(--border); }
.xrow:last-child { border-bottom: 0; }
.xrow code { font-family: var(--font-body); font-weight: 600; font-variant-numeric: tabular-nums; }
.xrow p { margin: 0; color: #3E4958; line-height: 1.35; }
.xrow p span { display: block; color: #687485; font-size: 12px; }

/* Framed product illustration on a section */
.ui-frame { padding: clamp(14px, 2.5vw, 28px); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.ui-frame--ink { background: var(--color-ink-2); }
.ui-card { background: var(--color-surface); border: 1px solid #CBD3DB; border-radius: var(--radius-md); box-shadow: var(--shadow-window); padding: 18px; color: var(--color-ink); font-size: 14px; }
.ui-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.ui-card-head strong { font-size: 14px; }
.ui-card-head span:not(.status) { font-size: 12px; color: #687485; }

/* ---------------------------------------------------------------- 12. HOME PAGE */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 0; overflow: hidden; }
.hero-rings { position: absolute; left: 50%; top: 0; width: 1500px; height: 1500px; transform: translate(-50%, -38%); pointer-events: none; color: #DCE2E7; }
.hero-copy { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s-8); row-gap: var(--s-5); align-items: end; }
.hero h1 { max-width: 12em; }
.hero-side { display: grid; gap: var(--s-5); padding-bottom: 10px; }
.hero-side .lead { font-size: var(--text-lg); }
.hero-product { position: relative; margin: clamp(40px, 6vw, 72px) 0 0; }
.hero-product .app { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.hero-caption { margin-top: 14px; }
.hero-base { height: clamp(48px, 6vw, 80px); background: var(--color-surface); border-top: var(--border); }
@media (max-width: 1080px) {
  .hero-copy { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 14em; }
  .app-body { grid-template-columns: minmax(0, 1fr) 220px; }
  .app-side { display: none; }
}
@media (max-width: 760px) {
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .app-rail { border-left: 0; border-top: var(--border); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-callout { grid-column: 1 / -1; }
  .orbit-area { grid-template-columns: minmax(0, 1fr); }
  .hero .orbit-legend { display: none; }
  .app-search { display: none; }
  .app-main { padding: 16px; }
}

/* Trust band (placeholder logos) */
.trust { padding: var(--s-7) 0; background: var(--color-surface); border-bottom: var(--border); }
.trust-inner { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: var(--s-6); align-items: center; }
.trust-inner > p { margin: 0; color: var(--color-muted); font-size: var(--text-base); }
.logo-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); }
.trust .demo-note { margin-top: var(--s-4); }
@media (max-width: 900px) { .trust-inner { grid-template-columns: minmax(0, 1fr); } .logo-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .logo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Value proposition: concentric rings */
.rings-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.rings-figure { position: relative; margin: 0; }
.rings-figure svg { width: 100%; height: auto; }
.rings-list { display: grid; gap: var(--s-6); margin-top: var(--s-7); }
.rings-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-4); }
.ring-mark { width: 44px; height: 44px; }
.rings-list h3 { margin-bottom: 6px; }
.rings-list p { color: var(--color-on-dark-muted); margin: 0; }
@media (max-width: 900px) { .rings-wrap { grid-template-columns: minmax(0, 1fr); } .rings-wrap > div { order: -1; } .rings-figure { max-width: 440px; } }

/* Capabilities: vertical tabs with a product view */
.caps { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.caps-tabs { display: grid; gap: 4px; border-left: 1px solid var(--color-line); }
.caps-tab { display: grid; gap: 4px; padding: 14px 18px; margin-left: -1px; border: 0; border-left: 2px solid transparent; background: transparent; text-align: left; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.caps-tab strong { font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); line-height: 1.3; color: var(--color-ink); }
.caps-tab span { font-size: var(--text-sm); color: var(--color-muted); }
.caps-tab:hover { background: var(--color-surface); }
.caps-tab[aria-selected="true"] { border-left-color: var(--color-primary); background: var(--color-surface); }
.caps-tab[aria-selected="true"] strong { color: var(--color-primary-text); }
.caps-panel { min-width: 0; }
.caps-panel .ui-frame { min-height: 360px; display: grid; align-content: center; }
.caps-panel > p { margin-top: var(--s-4); color: var(--color-muted); max-width: 60ch; }
.caps-panel .text-link { margin-top: var(--s-2); }
html:not(.js) .caps-tabs { display: none; }
html:not(.js) .caps-panel[hidden] { display: block !important; margin-bottom: var(--s-7); }
html:not(.js) .caps { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) {
  .caps { grid-template-columns: minmax(0, 1fr); }
  .caps-tabs { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--color-line); gap: 0; scrollbar-width: thin; }
  .caps-tab { border-left: 0; border-bottom: 2px solid transparent; margin: 0 0 -1px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; padding: 10px 14px; }
  .caps-tab span { display: none; }
  .caps-tab strong { font-size: var(--text-base); font-family: var(--font-body); font-weight: 500; }
  .caps-tab[aria-selected="true"] { border-bottom-color: var(--color-primary); }
  .caps-panel .ui-frame { min-height: 0; }
}

/* How it works: a real sequence, so it is numbered */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); counter-reset: flow; }
.flow-step { position: relative; padding-top: 56px; }
.flow-step::before { counter-increment: flow; content: counter(flow); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--color-ink); font-family: var(--font-display); font-size: var(--text-base); background: var(--color-paper); z-index: 1; }
.flow-step:not(:last-child)::after { content: ''; position: absolute; top: 18px; left: 44px; right: calc(-1 * var(--s-5) + 8px); border-top: 1.5px solid var(--color-line-strong); }
.flow-step h3 { margin-bottom: 8px; }
.flow-step p { color: var(--color-muted); }
.flow-detail { margin-top: var(--s-4); font-size: var(--text-sm); color: var(--color-ink); display: flex; gap: 8px; align-items: center; }
.flow-detail .ph { color: var(--color-primary); width: 18px; height: 18px; }
@media (max-width: 900px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .flow-step { padding: 0 0 0 56px; }
  .flow-step:not(:last-child)::after { top: 44px; bottom: calc(-1 * var(--s-6) + 8px); left: 18px; right: auto; border-top: 0; border-left: 1.5px solid var(--color-line-strong); }
}

/* Use cases: editorial rows */
.uses { border-top: 1px solid var(--color-ink); }
.use { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 3fr); gap: var(--s-6); padding: var(--s-6) 0; border-bottom: var(--border); align-items: start; }
.use h3 { display: flex; align-items: center; gap: 12px; }
.use h3 .ph { width: 26px; height: 26px; color: var(--color-primary); }
.use p { margin: 0; color: var(--color-muted); }
.use ul { display: flex; flex-wrap: wrap; gap: 8px; }
.use li { padding: 4px 10px; border-radius: var(--radius-sm); background: var(--color-surface); border: var(--border); font-size: var(--text-sm); }
.use .text-link { justify-self: end; }
@media (max-width: 900px) { .use { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); } .use .text-link { justify-self: start; } }

/* Integration tiles */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--s-3); }
.int-tile { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px; border: var(--border); border-radius: var(--radius-md); background: var(--color-surface); }
.int-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--color-paper); border: var(--border); color: var(--color-ink); }
.int-icon .ph { width: 22px; height: 22px; }
.int-tile h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); letter-spacing: 0; }
.int-tile p { margin: 4px 0 0; font-size: var(--text-sm); color: var(--color-muted); line-height: 1.5; }
.int-tile .tag { margin-top: 10px; }
.int-more { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); margin-top: var(--s-6); }

/* Testimonial (sample) */
.quote { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--s-8); align-items: end; }
.quote blockquote { margin: 0; }
.quote blockquote p { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); line-height: 1.25; letter-spacing: -0.02em; }
.quote figcaption { display: flex; align-items: center; gap: 14px; }
.quote figcaption .avatar { width: 48px; height: 48px; font-size: 15px; }
.quote figcaption strong { display: block; }
.quote figcaption span { color: var(--color-muted); font-size: var(--text-sm); }
@media (max-width: 900px) { .quote { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); } }

/* Pricing plans (shared by the home preview and pricing.html) */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); align-items: stretch; }
.js .plans:empty { min-height: 560px; }
.plan { position: relative; display: flex; flex-direction: column; padding: clamp(22px, 2.5vw, 32px); border: var(--border); border-radius: var(--radius-md); background: var(--color-surface); }
.plan--recommended { border: 1.5px solid var(--color-ink); }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan-flag { font-size: var(--text-xs); font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--color-ink); color: #fff; }
.plan-desc { color: var(--color-muted); font-size: var(--text-base); margin: 8px 0 var(--s-5); min-height: 3.2em; }
.plan-price { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.plan-amount { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.5rem, 2rem + 1.6vw, 3.25rem); letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-unit { color: var(--color-muted); font-size: var(--text-sm); }
.plan-billing { font-size: var(--text-sm); color: var(--color-muted); margin: 10px 0 var(--s-5); min-height: 2.9em; }
.plan-list { display: grid; gap: 10px; margin-top: var(--s-5); padding-top: var(--s-5); border-top: var(--border); font-size: var(--text-sm); }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; }
.plan-list .ph { width: 18px; height: 18px; color: var(--color-primary); margin-top: 1px; }
.billing-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); margin-bottom: var(--s-6); }
@media (max-width: 960px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 560px; } .js .plans:empty { min-height: 1500px; } .plan-desc, .plan-billing { min-height: 0; } }

/* Final call to action */
.cta-final { position: relative; overflow: hidden; }
.cta-final .container { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-7); align-items: center; }
.cta-final h2 { max-width: 12em; }
.cta-final .lead { margin-top: var(--s-4); }
.cta-final .btn-row { margin-top: var(--s-6); }
.cta-orbit { color: var(--color-ink-3); justify-self: end; width: min(100%, 420px); }
@media (max-width: 900px) { .cta-final .container { grid-template-columns: minmax(0, 1fr); } .cta-orbit { display: none; } }

/* ---------------------------------------------------------------- 13. INNER PAGE HEROES AND SUB-NAVIGATION */
.page-hero { padding: clamp(48px, 7vw, 104px) 0 clamp(40px, 5vw, 72px); }
.page-hero h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.5rem); max-width: 14em; }
.page-hero .lead { margin-top: var(--s-5); }
.page-hero .btn-row { margin-top: var(--s-6); }
.page-hero--split h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); }
.page-hero--split .container { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s-8); align-items: center; }
@media (max-width: 960px) { .page-hero--split .container { grid-template-columns: minmax(0, 1fr); } }
.crumbs { font-size: var(--text-sm); color: var(--color-muted); margin-bottom: var(--s-5); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--color-line-strong); }
.crumbs a { color: var(--color-muted); display: inline-block; padding: 4px 0; }
.crumbs [aria-current] { color: var(--color-ink); }
.subnav { position: sticky; top: var(--header-h); z-index: 30; background: rgba(242, 244, 245, .96); border-top: var(--border); border-bottom: var(--border); }
.subnav ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.subnav a { display: block; padding: 14px 14px; white-space: nowrap; color: var(--color-muted); font-weight: 500; font-size: var(--text-sm); text-decoration: none; }
.subnav a:hover { color: var(--color-ink); }

/* ---------------------------------------------------------------- 14. PAGE-SPECIFIC LAYOUTS */
/* Platform: architecture layers */
.arch { display: grid; gap: 10px; }
.arch-layer { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px; border-radius: var(--radius-md); background: var(--color-surface); border: var(--border); }
.arch-layer h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); letter-spacing: 0; display: flex; gap: 10px; align-items: center; }
.arch-layer h3 .ph { color: var(--color-primary); }
.arch-items { display: flex; flex-wrap: wrap; gap: 6px; }
.arch-items span { padding: 4px 10px; border-radius: 5px; background: var(--color-paper); font-size: var(--text-sm); }
.arch-layer--core { background: var(--color-ink); color: var(--color-on-dark); border-color: transparent; }
.arch-layer--core h3 .ph { color: var(--color-brass); }
.arch-layer--core .arch-items span { background: var(--color-ink-2); color: var(--color-on-dark); }
.arch-link { display: flex; justify-content: center; color: var(--color-line-strong); }
.arch-link .ph { width: 20px; height: 20px; }
@media (max-width: 560px) { .arch-layer { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

/* Timeline of one run (a real sequence) */
.timeline { display: grid; gap: 0; border-left: 1.5px solid var(--color-line-strong); margin-left: 8px; }
.tl-item { position: relative; display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: var(--s-4); padding: 0 0 var(--s-5) var(--s-5); }
.tl-item::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--color-primary); border: 2px solid var(--color-paper); }
.tl-item.is-person::before { background: var(--color-paper); border: 2px solid var(--color-brass); }
.tl-item:last-child { padding-bottom: 0; }
.tl-time { font-variant-numeric: tabular-nums; color: var(--color-muted); font-size: var(--text-sm); padding-top: 1px; }
.tl-item h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); letter-spacing: 0; }
.tl-item p { margin: 2px 0 0; color: var(--color-muted); font-size: var(--text-sm); }
@media (max-width: 520px) { .tl-item { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Feature detail blocks */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; scroll-margin-top: calc(var(--header-h) + 64px); }
.feature--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature--flip .feature-copy { order: 2; }
.feature--wide { grid-template-columns: minmax(0, 1fr); }
.feature--wide .feature-copy { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-7); align-items: start; }
.feature + .feature { margin-top: clamp(80px, 10vw, 144px); }
.feature-copy h2 { font-size: var(--text-2xl); margin-bottom: var(--s-4); }
.feature-copy > p { color: var(--color-muted); }
.points { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.points li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; }
.points .ph { width: 22px; height: 22px; color: var(--color-primary); margin-top: 2px; }
.points strong { display: block; font-weight: 600; }
.points span { color: var(--color-muted); font-size: var(--text-base); }
.used-for { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--s-5); font-size: var(--text-sm); }
.used-for > span { color: var(--color-muted); }
.used-for a { padding: 3px 10px; border-radius: var(--radius-sm); border: var(--border); background: var(--color-surface); text-decoration: none; color: var(--color-ink); }
.used-for a:hover { border-color: var(--color-ink); }
@media (max-width: 900px) {
  .feature, .feature--flip, .feature--wide .feature-copy { grid-template-columns: minmax(0, 1fr); }
  .feature--flip .feature-copy { order: 0; }
}
.feature-index { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--color-line); border: var(--border); border-radius: var(--radius-md); overflow: hidden; }
.feature-index a { display: grid; gap: 6px; align-content: start; padding: 20px; background: var(--color-surface); text-decoration: none; color: var(--color-ink); min-height: 100%; }
.feature-index a:hover { background: var(--color-paper); }
.feature-index .ph { width: 24px; height: 24px; color: var(--color-primary); }
.feature-index strong { font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); }
.feature-index span { font-size: var(--text-sm); color: var(--color-muted); }
@media (max-width: 960px) { .feature-index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .feature-index { grid-template-columns: minmax(0, 1fr); } }
.admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6) var(--s-7); }
.admin-grid h3 { font-family: var(--font-body); font-size: var(--text-md); font-weight: 600; letter-spacing: 0; display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.admin-grid h3 .ph { color: var(--color-brass); }
.admin-grid p { color: var(--color-on-dark-muted); margin: 0; font-size: var(--text-base); }
@media (max-width: 900px) { .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }

/* Solutions */
.solution { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); scroll-margin-top: calc(var(--header-h) + 64px); }
.solution + .solution { margin-top: clamp(72px, 9vw, 128px); padding-top: clamp(72px, 9vw, 128px); border-top: var(--border); }
.solution-head h2 { font-size: var(--text-2xl); margin: var(--s-3) 0 var(--s-4); }
.solution-head > p { color: var(--color-muted); }
.solution-team { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--color-primary-text); }
.solution-team .ph { width: 24px; height: 24px; }
.solution-body { display: grid; gap: var(--s-6); min-width: 0; }
.measure-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.measure-list li { padding: 16px; border-radius: var(--radius-md); background: var(--color-surface); border: var(--border); }
.measure-list strong { display: block; font-weight: 600; margin-bottom: 4px; }
.measure-list span { font-size: var(--text-sm); color: var(--color-muted); }
.templates { display: flex; flex-wrap: wrap; gap: 8px; }
.templates li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-sm); background: var(--color-surface-2); font-size: var(--text-sm); }
.templates .ph { width: 16px; height: 16px; color: var(--color-primary); }
@media (max-width: 960px) { .solution { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .measure-list { grid-template-columns: minmax(0, 1fr); } }

/* Filter toolbar (integrations, changelog, FAQ) */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; margin-bottom: var(--s-6); }
.toolbar .search { flex: 0 1 340px; }
.empty { padding: var(--s-8) var(--s-5); text-align: center; border: 1px dashed var(--color-line-strong); border-radius: var(--radius-md); background: var(--color-surface); }
.empty h2, .empty h3 { font-size: var(--text-xl); margin-bottom: 8px; }
.empty p { color: var(--color-muted); max-width: 46ch; margin: 0 auto var(--s-4); }
.build-own { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.build-own .panel h3 { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.build-own .panel h3 .ph { color: var(--color-primary); }
.build-own .panel p { color: var(--color-muted); }
@media (max-width: 760px) { .build-own { grid-template-columns: minmax(0, 1fr); } }

/* Pricing page */
.enterprise { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5); align-items: center; margin-top: var(--s-4); padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-md); background: var(--color-ink); color: var(--color-on-dark); }
.enterprise h3 { margin-bottom: 4px; }
.enterprise p { margin: 0; color: var(--color-on-dark-muted); }
.enterprise :focus-visible { box-shadow: 0 0 0 2px var(--color-ink), 0 0 0 4px var(--color-brass); }
@media (max-width: 640px) { .enterprise { grid-template-columns: minmax(0, 1fr); } }
.cmp { margin-top: var(--s-4); }
.cmp-table { min-width: 760px; font-size: var(--text-sm); }
.cmp-table thead th { position: sticky; top: 0; background: var(--color-surface); color: var(--color-ink); font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); padding-top: 18px; padding-bottom: 18px; }
.cmp-table th[scope="row"] { font-weight: 500; color: var(--color-ink); }
.cmp-table td { text-align: center; color: var(--color-ink); }
.cmp-table thead th:not(:first-child) { text-align: center; }
.cmp-table td .ph { width: 18px; height: 18px; color: var(--color-primary); margin: 0 auto; }
.cmp-table .dash { color: #5C6878; }
.cmp-group th { background: var(--color-paper); font-weight: 600; color: var(--color-muted); padding-top: 10px; padding-bottom: 10px; }
.cmp-table th:first-child { width: 30%; }
.js .cmp:empty { min-height: 1100px; }
.price-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); margin-top: var(--s-6); }
.price-notes p { font-size: var(--text-sm); color: var(--color-muted); margin: 0; }
.price-notes strong { display: block; color: var(--color-ink); margin-bottom: 4px; font-size: var(--text-base); }
@media (max-width: 760px) { .price-notes { grid-template-columns: minmax(0, 1fr); } }

/* Changelog */
.releases { display: grid; gap: 0; }
.release { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--s-6); padding: var(--s-7) 0; border-top: var(--border); scroll-margin-top: calc(var(--header-h) + 24px); }
.release-meta { display: grid; gap: 6px; align-content: start; }
.release-meta time { color: var(--color-muted); font-size: var(--text-sm); }
.release-meta strong { font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); }
.release h2 { font-size: var(--text-2xl); margin-bottom: var(--s-4); }
.release-items { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.release-items li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: var(--s-3); align-items: baseline; }
.release-items .tag { justify-self: start; }
@media (max-width: 760px) { .release { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); } .release-items li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* About */
.story { columns: 2; column-gap: var(--s-7); }
.story p { break-inside: avoid; }
@media (max-width: 760px) { .story { columns: 1; } }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--color-on-dark-muted); }
.principles li { padding: var(--s-6) var(--s-6) var(--s-6) 0; border-bottom: 1px solid var(--color-ink-3); }
.principles li:nth-child(odd) { border-right: 1px solid var(--color-ink-3); }
.principles li:nth-child(even) { padding-left: var(--s-6); }
.principles h3 { margin-bottom: 8px; }
.principles p { color: var(--color-on-dark-muted); margin: 0; }
@media (max-width: 760px) { .principles { grid-template-columns: minmax(0, 1fr); } .principles li:nth-child(odd) { border-right: 0; } .principles li:nth-child(even) { padding-left: 0; } }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--color-line); border: var(--border); border-radius: var(--radius-md); overflow: hidden; margin: 0; }
.facts div { background: var(--color-surface); padding: 20px; }
.facts dt { font-size: var(--text-sm); color: var(--color-muted); }
.facts dd { margin: 6px 0 0; font-family: var(--font-display); font-size: var(--text-lg); }
.facts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* FAQ page */
.faq-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--s-8); align-items: start; }
.faq-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: var(--s-4); }
.faq-side .chips { flex-direction: column; align-items: stretch; }
.faq-side .chip { text-align: left; }
.faq-group + .faq-group { margin-top: var(--s-7); }
.faq-group h2 { font-size: var(--text-xl); font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; margin-bottom: var(--s-3); }
@media (max-width: 900px) { .faq-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); } .faq-side { position: static; } .faq-side .chips { flex-direction: row; } }

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact-aside { display: grid; gap: var(--s-6); }
.next-steps { display: grid; gap: var(--s-4); counter-reset: next; }
.next-steps li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.next-steps li::before { counter-increment: next; content: counter(next); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--color-ink); font-size: var(--text-sm); font-weight: 600; }
.next-steps strong { display: block; }
.next-steps span { color: var(--color-muted); font-size: var(--text-base); }
.contact-ways { display: grid; gap: var(--s-3); }
.contact-ways a, .contact-ways p { display: flex; gap: 12px; align-items: flex-start; margin: 0; color: var(--color-ink); text-decoration: none; }
.contact-ways .ph { color: var(--color-primary); margin-top: 3px; }
.contact-ways a:hover span { text-decoration: underline; }
.contact-ways small { display: block; color: var(--color-muted); font-size: var(--text-sm); }
.form-card { padding: clamp(22px, 4vw, 40px); background: var(--color-surface); border: var(--border); border-radius: var(--radius-md); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }
.form-grid .span-2 { grid-column: 1 / -1; }
.interest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin-top: 8px; }
.form-foot { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; margin-top: var(--s-6); }
.form-foot p { font-size: var(--text-sm); color: var(--color-muted); margin: 0; max-width: 38ch; }
.error-summary { margin-bottom: var(--s-5); padding: 16px 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-danger); background: var(--color-danger-soft); }
.error-summary h2 { font-family: var(--font-body); font-size: var(--text-base); font-weight: 600; letter-spacing: 0; color: #7A2416; margin-bottom: 6px; }
.error-summary ul { margin: 0; padding-left: 1.2em; font-size: var(--text-sm); }
.error-summary a { color: #7A2416; }
.done { padding: clamp(28px, 4vw, 48px); background: var(--color-surface); border: var(--border); border-radius: var(--radius-md); text-align: left; }
.done .ph { width: 40px; height: 40px; color: var(--color-primary); margin-bottom: var(--s-4); }
.done.is-demo .ph { color: var(--color-brass-text); }
.done h2 { font-size: var(--text-2xl); margin-bottom: var(--s-3); }
.done p { color: var(--color-muted); max-width: 52ch; }
@media (max-width: 960px) { .contact-layout { grid-template-columns: minmax(0, 1fr); } .contact-layout > div { order: -1; } }
@media (max-width: 560px) { .form-grid, .interest { grid-template-columns: minmax(0, 1fr); } }

/* Legal */
.legal-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--s-8); align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: var(--text-sm); }
.legal-toc li + li { margin-top: 2px; }
.legal-toc a { color: var(--color-muted); display: inline-block; padding: 4px 0; }
.legal-note { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--color-brass-soft); color: #4A3810; font-size: var(--text-sm); margin-bottom: var(--s-6); }
@media (max-width: 900px) { .legal-layout { grid-template-columns: minmax(0, 1fr); } .legal-toc { position: static; } }

/* 404 */
.lost { min-height: 70vh; display: grid; align-items: center; padding: var(--s-9) 0; }
.lost .container { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s-8); align-items: center; }
.lost h1 { font-size: var(--text-3xl); }
.lost-orbit { color: var(--color-line-strong); max-width: 380px; justify-self: center; width: 100%; }
@media (max-width: 760px) { .lost .container { grid-template-columns: minmax(0, 1fr); } .lost-orbit { max-width: 240px; justify-self: start; } }

/* ---------------------------------------------------------------- 15. INTERACTIVE DEMO */
.demo-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s-4); margin-bottom: var(--s-5); }
.demo-flag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-sm); background: var(--color-brass-soft); color: #4A3810; font-size: var(--text-sm); font-weight: 500; }
.demo-flag .ph { width: 16px; height: 16px; }
.demo { font-size: var(--text-base); }
.demo-bar { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; padding: 14px 18px; border-bottom: var(--border); background: #FAFBFC; }
.demo-bar .field { grid-auto-flow: column; align-items: center; gap: 10px; }
.demo-bar .select { min-height: 40px; width: auto; min-width: 15em; font-size: var(--text-sm); }
.demo-body { padding: clamp(14px, 2.4vw, 24px); display: grid; gap: clamp(14px, 2.4vw, 24px); }
.demo-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(14px, 2.4vw, 24px); align-items: start; }
.demo-side { display: grid; gap: clamp(14px, 2.4vw, 24px); min-width: 0; }
.demo-card { border: var(--border); border-radius: var(--radius-md); padding: clamp(16px, 2vw, 22px); background: var(--color-surface); min-width: 0; }
.demo-card h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); letter-spacing: 0; }
.demo-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.demo-card-head p { margin: 0; font-size: var(--text-xs); color: var(--color-muted); }
.demo-orbit-area { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15em); gap: 18px; align-items: center; }
.demo .orbit-legend { font-size: var(--text-sm); }
.demo .orbit-legend button { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 6px 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; }
.demo .orbit-legend button:hover { background: var(--color-paper); }
.demo .orbit-legend button[aria-pressed="true"] { background: var(--color-paper); border-color: var(--color-ink); }
.demo .orbit-legend li { display: block; padding: 0; }
.insight { margin: 0 0 14px; font-size: var(--text-sm); color: var(--color-ink); }
.demo-table-bar { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: space-between; margin-bottom: 12px; }
.demo-table-bar .search { flex: 1 1 240px; max-width: 340px; }
.demo-table-bar .input, .demo-table-bar .select { min-height: 40px; font-size: var(--text-sm); }
.demo-table-bar .select { width: auto; }
.demo-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.step-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: var(--radius-sm); background: var(--color-ink); color: #fff; font-size: var(--text-sm); }
.step-chip button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 4px; background: transparent; color: #fff; }
.step-chip button:hover { background: var(--color-ink-3); }
.step-chip button:focus-visible { box-shadow: 0 0 0 2px var(--color-brass); }
.step-chip .ph { width: 14px; height: 14px; }
.runs-table th button { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0; border: 0; background: none; font-weight: 600; color: inherit; border-radius: 4px; }
.runs-table th button .ph { width: 14px; height: 14px; opacity: .5; }
.runs-table th[aria-sort="ascending"] button .ph, .runs-table th[aria-sort="descending"] button .ph { opacity: 1; color: var(--color-ink); }
.runs-table th[aria-sort="ascending"] button .ph { transform: rotate(180deg); }
.runs-table tbody th { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.runs-table td:nth-child(2), .runs-table td:nth-child(3) { white-space: nowrap; }
.runs-table { min-width: 760px; }
.demo-more { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); margin-top: 12px; font-size: var(--text-sm); color: var(--color-muted); }
.demo-more p { margin: 0; }
.js .demo [data-demo-kpis]:empty { min-height: 116px; }
.js .demo [data-demo-orbit]:empty { aspect-ratio: 1; }
.js .demo [data-demo-legend]:empty { min-height: 230px; }
.js .demo [data-demo-bars]:empty { min-height: 190px; }
.js .demo [data-demo-rows]:empty { height: 380px; display: block; }
html:not(.js) .demo-live-only { display: none; }
.demo-noscript { padding: var(--s-6); text-align: center; color: var(--color-muted); }
@media (max-width: 1080px) { .demo-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-orbit-area { grid-template-columns: minmax(0, 1fr); }
  .demo-bar .field { grid-auto-flow: row; width: 100%; }
  .demo-bar .select { width: 100%; min-width: 0; }
  .bar-row { grid-template-columns: minmax(0, 1fr) 5.5em; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
}
/* compact demo on the home page */
.demo--compact .demo-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 1080px) { .demo--compact .demo-grid { grid-template-columns: minmax(0, 1fr); } }
.demo-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); }

/* ---------------------------------------------------------------- 16. UTILITIES, MOTION, PRINT */
.mt-0 { margin-top: 0; } .mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); } .mt-7 { margin-top: var(--s-7); }
.center { text-align: center; }

/* One orchestrated moment: the runs in the hero settle onto their orbits once */
@media (prefers-reduced-motion: no-preference) {
  .hero .orb-dots { transform-box: view-box; transform-origin: 50% 50%; animation: settle 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
  @keyframes settle { from { transform: rotate(-28deg); opacity: 0; } to { transform: rotate(0); opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  .site-header, .announce, .mobile-menu, .site-footer, .subnav, .btn { display: none !important; }
  body { background: #fff; }
}
