/* ==========================================================================
   ShiftKit — shared design system
   base.css  ·  tokens, themes, layout utilities, components, device mockups
   Theme mechanism: <html data-theme="dark"> (default) | data-theme="light"
   ========================================================================== */

/* Satoshi is self-hosted so the site makes no third-party requests.
   Licensed under the ITF Free Font Licence. Files in assets/fonts/. */
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* brand palette (fixed, theme-independent) */
  --slate: #29333f;
  --slate-deep: #1b222b;
  --signal: #d9781f;
  --signal-dim: #b05f13;
  --indigo: #3d4f85;
  --teal: #1c789a;
  --green: #21705a;
  --caution: #b4453a;
  --canvas: #f4f1ec;
  --surface-white: #ffffff;
  --ink: #171c22;

  /* type */
  --font-sans: "Satoshi", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: clamp(1.6rem, 1.1rem + 1.8vw, 2.25rem);
  --text-3xl: clamp(2rem, 1.2rem + 3vw, 3rem);
  --text-display: clamp(2.35rem, 1.1rem + 5.4vw, 5.1rem);

  --leading-tight: 1.04;
  --leading-snug: 1.22;
  --leading-body: 1.62;
  --track-tight: -0.03em;

  /* spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 140px;

  --maxw: 1200px;
  --maxw-prose: 68ch;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 400ms;

  --nav-h: 64px;
}

/* dark theme (default) */
:root,
[data-theme="dark"] {
  --bg: var(--slate-deep);
  --bg-alt: #202832;
  --bg-band: #161c24;
  --surface: #232c37;
  --surface-2: #2b3542;
  --fg: #eef1f4;
  --fg-muted: #a8b3bf;
  --fg-faint: #7b8794;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --hairline: rgba(255, 255, 255, 0.07);
  --accent: #e5893a;
  --accent-ink: #17110a;
  --shadow-lg: 0 40px 120px -20px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --overlay-hero: linear-gradient(180deg, rgba(27, 34, 43, 0.72) 0%, rgba(27, 34, 43, 0.86) 55%, rgba(27, 34, 43, 0.97) 100%);
  --tint-info: rgba(28, 120, 154, 0.14);
  --tint-caution: rgba(180, 69, 58, 0.16);
  --tint-signal: rgba(217, 120, 31, 0.14);
  color-scheme: dark;
}

/* light theme */
[data-theme="light"] {
  --bg: var(--canvas);
  --bg-alt: #ebe7e0;
  --bg-band: #e4dfd6;
  --surface: var(--surface-white);
  --surface-2: #f7f5f1;
  --fg: var(--ink);
  --fg-muted: #4d5865;
  --fg-faint: #6d7885;
  --line: rgba(23, 28, 34, 0.13);
  --line-strong: rgba(23, 28, 34, 0.24);
  --hairline: rgba(23, 28, 34, 0.09);
  --accent: #a95c11;
  --accent-ink: #ffffff;
  --shadow-lg: 0 30px 80px -24px rgba(23, 28, 34, 0.35);
  --shadow-sm: 0 1px 3px rgba(23, 28, 34, 0.12);
  --overlay-hero: linear-gradient(180deg, rgba(27, 34, 43, 0.68) 0%, rgba(27, 34, 43, 0.8) 55%, rgba(27, 34, 43, 0.92) 100%);
  --tint-info: rgba(28, 120, 154, 0.1);
  --tint-caution: rgba(180, 69, 58, 0.09);
  --tint-signal: rgba(217, 120, 31, 0.1);
  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}

img, svg, picture, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: var(--track-tight);
  line-height: var(--leading-snug);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); }

p, li { overflow-wrap: break-word; }

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

.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;
}

/* --------------------------------------------------------------------------
   3. Layout utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.section { padding-block: clamp(56px, 9vw, 112px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--lg { padding-block: clamp(72px, 11vw, 140px); }
.section--alt { background: var(--bg-alt); }
.section--band {
  background: var(--bg-band);
  border-block: 1px solid var(--line);
}
.section--dark {
  background: var(--slate-deep);
  color: #eef1f4;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}
.section--dark .eyebrow { color: var(--signal); }
.section--dark .lede,
.section--dark .muted { color: #a8b3bf; }

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
}
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 640px) and (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* alternating feature rows */
.grid-2--flip > :first-child { order: 2; }
.grid-2--top { align-items: start; }
.grid-2--wide-right { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.grid-2--wide-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 900px) {
  .grid-2--wide-right, .grid-2--wide-left { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .grid-2--flip > :first-child { order: 0; }
}

.center { text-align: center; }
.center .lede { margin-inline: auto; }
.narrow { max-width: var(--maxw-prose); }
.narrow-center { max-width: 72ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   4. Type utilities
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6em;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.4;
}
.eyebrow::before {
  content: "";
  margin-top: 0.42em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
}
.eyebrow--plain::before { display: none; }

.display {
  font-size: var(--text-display);
  font-weight: 900;
  letter-spacing: var(--track-tight);
  line-height: var(--leading-tight);
  text-wrap: balance;
}
.display--sm { font-size: var(--text-3xl); }

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem);
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 60ch;
  text-wrap: pretty;
}

.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); font-size: var(--text-sm); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.fine {
  font-size: var(--text-sm);
  color: var(--fg-faint);
  line-height: 1.55;
}

.rule { height: 1px; background: var(--line); border: 0; margin-block: var(--space-6); }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font: inherit;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease),
    border-color 180ms var(--ease), color 180ms var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--signal); color: #1a1004; border-color: var(--signal); }
.btn--primary:hover { background: #e8873a; }

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--on-dark { color: #eef1f4; border-color: rgba(255, 255, 255, 0.28); }
.btn--on-dark:hover { border-color: var(--signal); color: var(--signal); }

.btn--sm { font-size: var(--text-sm); padding: 9px 16px; }
.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.link-arrow:hover { border-bottom-color: currentColor; }

/* --------------------------------------------------------------------------
   6. Nav
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.0625rem;
  text-decoration: none;
  color: var(--fg);
  flex: none;
}
.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(128, 140, 160, 0.35);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  margin-left: auto;
  list-style: none;
  padding: 0;
}
.nav__links a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 6px 2px;
  border-bottom: 1.5px solid transparent;
  white-space: nowrap;
}
.nav__links a:hover { color: var(--fg); }
.nav__mobile-only { display: none; }
.nav__links a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--signal); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: none;
}

.theme-toggle {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  flex: none;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav__burger {
  display: none;
  width: 38px; height: 38px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.nav__burger svg { width: 18px; height: 18px; }

/* The nav carries eleven links since the big-feature pages were added, so the
   burger panel takes over earlier than it used to. */
@media (max-width: 1100px) {
  .nav__burger { display: grid; }
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--space-3) clamp(20px, 5vw, 40px) var(--space-5);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  }
  .nav__links a {
    display: block;
    padding: 13px 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--hairline);
  }
  .nav__links[data-open="true"] {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav__cta { display: none; }
  .nav__mobile-only { display: block; }
}

/* --------------------------------------------------------------------------
   7. Cards, chips, callouts, tables, kbd
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(20px, 2.6vw, 30px);
  box-shadow: var(--shadow-sm);
}
.card--flat { box-shadow: none; background: transparent; }
.card--pad-lg { padding: clamp(26px, 3.4vw, 42px); }
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--fg-muted); }
.card--accent { border-color: var(--signal); }

.card__badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--signal);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-3);
}

.claim {
  border-top: 2px solid var(--signal);
  padding-top: var(--space-3);
}
.claim strong { display: block; font-size: var(--text-base); font-weight: 700; }
.claim p { font-size: var(--text-sm); color: var(--fg-muted); margin-top: 4px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--fg);
  line-height: 1.3;
}
.chip--signal { border-color: var(--signal); color: var(--accent); }
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--fg-faint);
  border-radius: var(--radius);
  padding: clamp(16px, 2.2vw, 24px);
  background: var(--surface-2);
}
.callout > * + * { margin-top: var(--space-3); }
.callout__title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.callout p, .callout li { color: var(--fg-muted); font-size: var(--text-base); }
.callout--info {
  border-left-color: var(--teal);
  background: var(--tint-info);
}
.callout--info .callout__title { color: var(--teal); }
.callout--caution {
  border-left-color: var(--caution);
  background: var(--tint-caution);
}
.callout--caution .callout__title { color: var(--caution); }
[data-theme="dark"] .callout--caution .callout__title { color: #e07f74; }
.callout--signal {
  border-left-color: var(--signal);
  background: var(--tint-signal);
}
.callout--signal .callout__title { color: var(--accent); }

.list-check, .list-plain {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
.list-plain li { color: var(--fg-muted); }
.list-check li {
  position: relative;
  padding-left: 26px;
  color: var(--fg-muted);
}
.list-check li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.55em;
  width: 11px; height: 6px;
  border-left: 2px solid var(--signal);
  border-bottom: 2px solid var(--signal);
  transform: rotate(-45deg);
}
.list-check--muted li::before { border-color: var(--fg-faint); }

.list-x { list-style: none; padding: 0; display: grid; gap: 12px; }
.list-x li {
  position: relative;
  padding-left: 28px;
  color: var(--fg-muted);
}
.list-x li::before {
  content: "×";
  position: absolute;
  left: 4px; top: -1px;
  color: var(--caution);
  font-weight: 900;
  font-size: 1.15em;
}
[data-theme="dark"] .list-x li::before { color: #e07f74; }

/* definition / spec list */
.spec {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.spec dt, .spec dd {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.spec dt {
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding-right: var(--space-5);
}
.spec dd { color: var(--fg-muted); }
@media (max-width: 620px) {
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec dt { padding-bottom: 2px; border-bottom: 0; }
}

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}
.table caption {
  text-align: left;
  color: var(--fg-faint);
  font-size: var(--text-sm);
  padding-bottom: var(--space-3);
}
.table th, .table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  border-bottom-color: var(--line-strong);
  white-space: nowrap;
}
.table td { color: var(--fg-muted); }
.table tbody tr:last-child td { border-bottom: 0; }
.table--fixed { table-layout: auto; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }

/* kbd chips */
.kbd {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
  min-width: 26px;
  text-align: center;
  color: var(--fg);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.kbd-combo { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   8. Table of contents (help/privacy sidebars)
   -------------------------------------------------------------------------- */
.layout-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
@media (min-width: 1024px) {
  .layout-sidebar { grid-template-columns: 260px minmax(0, 1fr); }
  .layout-sidebar__aside {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    max-height: calc(100vh - var(--nav-h) - 48px);
    overflow-y: auto;
  }
}

.toc { font-size: 0.9375rem; }
.toc__title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: var(--space-3);
}
.toc ol, .toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2px;
}
.toc li + li { margin-top: 0; }
.toc a {
  display: block;
  text-decoration: none;
  color: var(--fg-muted);
  padding: 6px 10px;
  border-left: 2px solid var(--line);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.4;
}
.toc a:hover { color: var(--fg); background: var(--surface-2); }
.toc a.is-active,
.toc a[aria-current="true"] {
  color: var(--accent);
  border-left-color: var(--signal);
  background: var(--tint-signal);
  font-weight: 700;
}
.toc__group { margin-top: var(--space-4); }
.toc__group-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding: 6px 10px 4px;
}

/* help search */
.help-search { position: relative; }
.help-search__input {
  width: 100%;
  font: inherit;
  font-size: var(--text-base);
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 13px 20px 13px 46px;
  transition: border-color 180ms var(--ease);
}
.help-search__input::placeholder { color: var(--fg-faint); }
.help-search__input:focus { border-color: var(--accent); }
.help-search__icon {
  position: absolute;
  left: 17px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--fg-faint);
  pointer-events: none;
}
.help-search__count {
  font-size: var(--text-sm);
  color: var(--fg-faint);
  margin-top: var(--space-2);
}
.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  color: var(--fg-muted);
}
.empty-state h3 { margin-bottom: var(--space-2); color: var(--fg); }
[hidden] { display: none !important; }

/* long-form article */
.article { max-width: 74ch; }
.article + .article { margin-top: clamp(40px, 6vw, 64px); }
.article > * + * { margin-top: var(--space-4); }
.article h2 { margin-top: 0; }
.article h3 { font-size: var(--text-xl); }
.article h4 { font-size: var(--text-base); letter-spacing: 0.02em; }
.article p, .article li { color: var(--fg-muted); }
.article ul, .article ol { padding-left: 22px; display: grid; gap: 8px; }
.article strong { color: var(--fg); font-weight: 700; }
.article a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
.article__meta {
  font-size: var(--text-sm);
  color: var(--fg-faint);
  letter-spacing: 0.04em;
}
.anchor-offset { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* --------------------------------------------------------------------------
   9. Hero (image-backed)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(64px, 10vw, 132px) clamp(56px, 8vw, 104px);
  color: #f2f5f8;
  background: var(--slate-deep);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--overlay-hero);
}
.hero .lede, .hero .fine { color: #c4cdd6; }
.hero .display { color: #fff; }
.hero__copy { max-width: 21ch; }
.hero__inner { display: grid; gap: clamp(24px, 4vw, 40px); }
.hero__inner > * { min-width: 0; }
.hero--split { min-height: 58vh; align-content: center; }
.hero--split .hero__inner { max-width: 62ch; }

.plaque {
  /* Both dimensions are set from one value rather than leaning on
     aspect-ratio. As a flex item with a percentage-height child, WebKit
     resolved the height from content and stretched the icon into a
     portrait rectangle on iPhone. An explicit height cannot do that. */
  --plaque-size: clamp(184px, 24vw, 264px);
  width: var(--plaque-size);
  height: var(--plaque-size);
  border-radius: 26%;
  padding: clamp(20px, 2.4vw, 30px);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  flex: none;
}
.plaque img {
  display: block;
  width: 100%;
  height: 100%;
  /* Belt and braces: even if the box were ever wrong, object-fit crops
     rather than squashing the artwork. */
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22%;
}
.plaque-row {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  flex-wrap: wrap;
}
.plaque-row__text { max-width: 42ch; }
.plaque-row__text strong { display: block; color: #fff; font-size: var(--text-lg); }
.plaque-row__text p { color: #b9c3cd; font-size: var(--text-sm); }

/* --------------------------------------------------------------------------
   10. Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-band);
  border-top: 1px solid var(--line);
  padding-block: clamp(40px, 6vw, 72px) var(--space-6);
  font-size: 0.9375rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}
@media (max-width: 760px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
}
.footer h2 {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: var(--space-3);
}
.footer ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.footer a { color: var(--fg-muted); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer__bottom {
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  justify-content: space-between;
  color: var(--fg-faint);
  font-size: var(--text-sm);
}

/* ==========================================================================
   12. DEVICE CHROME
   ========================================================================== */
.device { --mock-scale: 1; max-width: 100%; }

/* --- Mac window --- */
.mac {
  border-radius: 12px;
  overflow: hidden;
  background: var(--slate);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.7);
  color: #e9edf1;
  font-size: 13px;
  line-height: 1.45;
}
.mac__bar {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 14px;
  background: #232c37;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.mac__dots { display: flex; gap: 8px; flex: none; }
.mac__dot { width: 12px; height: 12px; border-radius: 50%; }
.mac__dot--r { background: #ff5f57; }
.mac__dot--y { background: #febc2e; }
.mac__dot--g { background: #28c840; }
.mac__title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(233, 237, 241, 0.66);
  letter-spacing: 0.01em;
  padding-right: 44px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mac__body { background: var(--slate); }

/* horizontal-scroll shell so Mac mockups never squash on mobile */
.mock-scroll {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.mock-scroll > .mac { min-width: 0; }
@media (max-width: 900px) {
  .mock-scroll > .mac { min-width: 660px; }
  .mock-scroll--wide > .mac { min-width: 780px; }
}
.mock-hint {
  font-size: var(--text-xs);
  color: var(--fg-faint);
  margin-top: 10px;
  letter-spacing: 0.04em;
}
@media (min-width: 901px) { .mock-hint { display: none; } }

/* --- iPhone --- */
.iphone {
  width: 300px;
  max-width: 100%;
  border-radius: 44px;
  padding: 10px;
  background: #11161c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.7);
  margin-inline: auto;
}
.iphone__screen {
  position: relative;
  border-radius: 35px;
  overflow: hidden;
  background: var(--slate-deep);
  color: #e9edf1;
  font-size: 13px;
  min-height: 580px;
  display: flex;
  flex-direction: column;
}
.iphone__island {
  position: absolute;
  top: 9px; left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 24px;
  border-radius: 999px;
  background: #05080b;
  z-index: 3;
}

/* ==========================================================================
   13. APP UI (shared primitives inside device chrome)
   ========================================================================== */
.app {
  --app-bg: #29333f;
  --app-bg-deep: #1b222b;
  --app-card: #313c4a;
  --app-card-2: #37424f;
  --app-line: rgba(255, 255, 255, 0.07);
  --app-line-2: rgba(255, 255, 255, 0.12);
  --app-fg: #e9edf1;
  --app-fg-2: rgba(233, 237, 241, 0.62);
  --app-fg-3: rgba(233, 237, 241, 0.42);
  font-size: 13px;
  color: var(--app-fg);
}
.app *, .mac *, .iphone__screen * { letter-spacing: 0; }

.app-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 260px;
  min-height: 430px;
}
.app-shell--2col { grid-template-columns: 200px minmax(0, 1fr); }

/* sidebar */
.app-side {
  background: var(--app-bg-deep);
  border-right: 1px solid var(--app-line);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.app-side__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 10px;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--app-line);
  color: #fff;
}
.app-side__brand svg { width: 18px; height: 18px; color: var(--signal); flex: none; }
.app-nav { display: grid; gap: 1px; list-style: none; padding: 0; margin: 0; }
.app-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--app-fg-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.app-nav__item .dot {
  width: 6px; height: 6px; border-radius: 2px;
  background: currentColor; opacity: 0.55; flex: none;
}
.app-nav__item--active {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-weight: 700;
}
.app-nav__item--active::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: var(--signal);
}
.app-nav__item--active .dot { background: var(--signal); opacity: 1; }
.app-side__foot {
  margin-top: auto;
  font-size: 11px;
  color: var(--app-fg-3);
  padding: 8px;
  border-top: 1px solid var(--app-line);
}

/* workspace */
.app-main {
  padding: 20px 22px 24px;
  background: var(--app-bg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.app-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
}
.app-h1 {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  margin-top: 4px;
}
.app-h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--app-fg);
}
.app-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--app-fg-3);
}
.app-caption { font-size: 11px; color: var(--app-fg-3); line-height: 1.4; }

.app-card {
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: 12px;
  padding: 13px 14px;
}
.app-card--flat { background: transparent; }

.app-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.app-stat { display: flex; flex-direction: column; gap: 5px; }
.app-stat__head {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--app-fg-3);
}
.app-stat__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
}
.app-stat__num small { font-size: 13px; font-weight: 500; color: var(--app-fg-2); }
.app-stat__sub { font-size: 11px; color: var(--app-fg-2); }

.status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.status-dot--green { background: #35a37f; }
.status-dot--signal { background: var(--signal); }
.status-dot--teal { background: #2f9cc1; }
.status-dot--indigo { background: #6478b8; }

.app-bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.app-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--teal); }
.app-bar--signal > span { background: var(--signal); }

.shift-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(61, 79, 133, 0.42);
  border: 1px solid rgba(100, 120, 184, 0.55);
  color: #b8c4e6;
}
.shift-badge--day {
  background: rgba(217, 120, 31, 0.2);
  border-color: rgba(217, 120, 31, 0.55);
  color: #eda765;
}
.shift-badge--leave {
  background: rgba(33, 112, 90, 0.24);
  border-color: rgba(53, 163, 127, 0.5);
  color: #77c4a8;
}

.app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--app-line);
}
.app-row:last-child { border-bottom: 0; }
.app-row__label { font-size: 13px; color: var(--app-fg); }
.app-row__value {
  font-size: 13px;
  color: var(--app-fg-2);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* inspector / checklist */
.app-inspector {
  background: var(--app-bg-deep);
  border-left: 1px solid var(--app-line);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.app-check li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid var(--app-line);
  font-size: 13px;
  color: var(--app-fg-2);
}
.app-check li:last-child { border-bottom: 0; }
.app-check__box {
  width: 15px; height: 15px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  flex: none;
  position: relative;
}
.app-check li.is-done { color: var(--app-fg); }
.app-check li.is-done .app-check__box {
  background: var(--signal);
  border-color: var(--signal);
}
.app-check li.is-done .app-check__box::after {
  content: "";
  position: absolute;
  left: 3px; top: 4px;
  width: 7px; height: 3.5px;
  border-left: 1.6px solid #1a1004;
  border-bottom: 1.6px solid #1a1004;
  transform: rotate(-45deg);
}
.app-check__req {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
  flex: none;
}

/* --- Week planner grid --- */
.planner { padding: 16px 18px 20px; background: var(--app-bg); }
.planner__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.planner__grid {
  display: grid;
  grid-template-columns: 46px repeat(7, minmax(0, 1fr));
  border: 1px solid var(--app-line);
  border-radius: 10px;
  overflow: hidden;
}
.planner__cell {
  border-right: 1px solid var(--app-line);
  border-bottom: 1px solid var(--app-line);
  min-height: 0;
}
.planner__cell:nth-child(8n) { border-right: 0; }
.planner__dayhead {
  padding: 7px 8px;
  background: var(--app-bg-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-fg-2);
  text-align: center;
  white-space: nowrap;
}
.planner__dayhead small { display: block; font-size: 10px; font-weight: 500; color: var(--app-fg-3); letter-spacing: 0.02em; }
.planner__time {
  padding: 6px 6px;
  background: var(--app-bg-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--app-fg-3);
  text-align: right;
  height: 46px;
}
.planner__slot { position: relative; height: 46px; padding: 3px; }

.shift-block {
  border-radius: 7px;
  padding: 4px 6px;
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}
.shift-block small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shift-block--night { background: #3d4f85; border: 1px solid #55689f; }
.shift-block--day { background: #b8641a; border: 1px solid var(--signal); }
.shift-block--leave { background: #21705a; border: 1px solid #35a37f; }
.shift-block--shared {
  background: repeating-linear-gradient(
    -45deg,
    rgba(100, 120, 184, 0.36) 0 5px,
    rgba(100, 120, 184, 0.14) 5px 10px
  );
  border: 1px dashed rgba(140, 158, 214, 0.7);
  color: #c3cdea;
}
.shift-block--tall { grid-row: span 2; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--app-fg-2);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i {
  width: 11px; height: 11px;
  border-radius: 3px;
  display: inline-block;
  flex: none;
}
.legend i.night { background: #3d4f85; }
.legend i.day { background: #b8641a; }
.legend i.leave { background: #21705a; }
.legend i.shared {
  background: repeating-linear-gradient(-45deg, rgba(100,120,184,.5) 0 3px, rgba(100,120,184,.15) 3px 6px);
  border: 1px dashed rgba(140,158,214,.8);
}

/* --- iPhone app content --- */
.ios {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--app-bg-deep);
}
.ios__nav {
  padding: 42px 18px 10px;
  border-bottom: 1px solid var(--app-line);
  background: var(--app-bg-deep);
}
.ios__body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  background: var(--app-bg);
}
.ios__tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--app-line-2);
  background: #212a34;
  padding: 8px 4px 12px;
}
.ios__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--app-fg-3);
  letter-spacing: 0.01em;
}
.ios__tab i {
  width: 15px; height: 15px;
  border-radius: 4px;
  border: 1.6px solid currentColor;
  display: block;
}
.ios__tab--active { color: var(--signal); }

.ring { width: 118px; height: 118px; flex: none; }
.ring__track { stroke: rgba(255, 255, 255, 0.12); }
.ring__value { stroke: #35a37f; stroke-linecap: round; }
.ring-wrap { display: flex; align-items: center; gap: 14px; }
.ring-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.ring-holder { position: relative; flex: none; }
.ring-num strong {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.ring-num span { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--app-fg-2); }

/* --- Settings pane --- */
.settings { padding: 18px 22px 22px; background: var(--app-bg); }
.settings__group {
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: 12px;
  padding: 4px 14px;
  margin-top: 10px;
}
.settings__group .app-row:first-child { padding-top: 12px; }
.settings__group .app-row:last-child { padding-bottom: 12px; }

.toggle {
  width: 40px; height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
  flex: none;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 200ms var(--ease);
}
.toggle--on { background: #35a37f; }
.toggle--on::after { transform: translateX(16px); }

.segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  gap: 2px;
}
.segmented span {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  color: var(--app-fg-2);
  white-space: nowrap;
}
.segmented span.is-selected {
  background: var(--slate);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.stepper {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
  flex: none;
}
.stepper b {
  width: 26px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--app-fg);
  padding: 2px 0;
}
.stepper b + b { border-left: 1px solid rgba(255, 255, 255, 0.12); }

.picker-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  color: var(--app-fg-2);
}
.picker-row::after {
  content: "";
  width: 5px; height: 5px;
  border-right: 1.5px solid var(--app-fg-3);
  border-bottom: 1.5px solid var(--app-fg-3);
  transform: rotate(-45deg);
  display: inline-block;
}

/* --- decay curve figure --- */
.figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(18px, 2.4vw, 26px);
}
.figure svg { width: 100%; height: auto; }
.figure figcaption {
  font-size: var(--text-sm);
  color: var(--fg-faint);
  margin-top: var(--space-3);
  line-height: 1.5;
}
.curve-line { fill: none; stroke: var(--signal); stroke-width: 2.5; stroke-linecap: round; }
.curve-area { fill: rgba(217, 120, 31, 0.14); stroke: none; }
.curve-axis { stroke: var(--line-strong); stroke-width: 1; }
.curve-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.curve-cut { stroke: var(--caution); stroke-width: 1.5; stroke-dasharray: 5 4; }
.curve-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--fg-faint);
}
.curve-label--cut { fill: var(--caution); font-weight: 700; }

/* --- media / photo blocks --- */
.media {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: var(--slate-deep);
}
.media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.media--tall img { aspect-ratio: 3 / 4; }
.media--wide img { aspect-ratio: 16 / 9; }

.icon-strip {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: clamp(18px, 3vw, 34px);
}
.icon-strip img { width: 100%; }

/* --- pricing --- */
.price {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  height: 100%;
}
.price__amount {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 1.4rem + 1.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--fg);
}
.price__amount span {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--fg-faint);
  letter-spacing: 0;
  margin-left: 0.15em;
}
/* Currency label sitting ahead of the figure. Deliberately accent-coloured and
   raised to the cap height of the digits so it reads as a label rather than as
   part of the number. Two classes to outrank .price__amount span above. */
.price__amount .price__currency {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-left: 0;
  margin-right: 0.4em;
  vertical-align: 0.5em;
}

.price__note { font-size: var(--text-sm); color: var(--fg-faint); }
.card__badge--ghost { visibility: hidden; }

/* shortcut table two-column split */
.shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(28px, 5vw, 64px);
}
@media (max-width: 760px) {
  .shortcuts { grid-template-columns: minmax(0, 1fr); }
}
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.shortcut-row span { color: var(--fg-muted); font-size: 0.9375rem; }

/* --------------------------------------------------------------------------
   14. Responsive adjustments for app mockups
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 180px minmax(0, 1fr) 230px; }
  .app-shell--2col { grid-template-columns: 180px minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .app-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iphone { width: 288px; }
}

/* --------------------------------------------------------------------------
   Screenshots — strips on the feature pages, rows on the home page, and the
   gallery grid. Real captures from the shipping build, never mock-ups.
   -------------------------------------------------------------------------- */
.shots-section .shots-head { margin-bottom: var(--space-5); }
.shots-section .shots-head h3 { font-size: var(--text-xl); margin-top: var(--space-2); }
.shots-note { margin-top: var(--space-4); }
.shot-strip {
  display: flex; align-items: flex-end; gap: clamp(14px, 2vw, 24px);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  padding: 4px 4px var(--space-4); margin-inline: -4px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.shot-strip:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius); }
.shot { margin: 0; flex: 0 0 auto; scroll-snap-align: start; }
.shot img {
  display: block; width: 100%; height: auto; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.shot figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: var(--space-3); font-size: var(--text-sm); line-height: 1.4; }
.shot figcaption strong { color: var(--fg); font-weight: 600; }
.shot figcaption span { color: var(--fg-muted); }
.shot--iphone { width: clamp(150px, 19vw, 210px); }
.shot--iphone img { border-radius: clamp(18px, 2.4vw, 28px); }
.shot--ipad { width: clamp(210px, 26vw, 300px); }
.shot--ipad img { border-radius: clamp(10px, 1.4vw, 16px); }
.shot--mac { width: clamp(300px, 46vw, 540px); }
.shot--mac img { border-radius: 10px; }
.shot--watch { width: clamp(118px, 13vw, 150px); }
.shot--watch img { border-radius: 26%; border-color: var(--line-strong); background: #000; }
.shots-rows { display: grid; gap: clamp(28px, 4vw, 44px); margin-top: clamp(28px, 4vw, 44px); }
.shots-row__label { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-muted); margin-bottom: var(--space-3); }
.gallery-jump { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); list-style: none; padding: 0; margin-top: var(--space-5); }
.gallery-jump a { font-weight: 600; }
.shot-grid { display: grid; gap: clamp(22px, 3vw, 36px); margin-top: clamp(26px, 4vw, 40px); align-items: start; }
.shot-grid .shot { width: auto; }
.shot-grid--iphone { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.shot-grid--ipad { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.shot-grid--mac { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.shot-grid--watch { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.shot-grid--watch .shot { max-width: 200px; }
@media (max-width: 520px) {
  .shot-grid--iphone { grid-template-columns: repeat(2, 1fr); }
  .shot-grid--watch { grid-template-columns: repeat(2, 1fr); }
}
