/* DeviceDeck — launch page
   Palette: ink navy base, emerald accent, gold for the seam and status, ivory text.
   Dark is the default; light follows the system setting or data-theme="light". */

:root {
  --bg: #0B1426;          /* ink navy */
  --panel: #111D33;       /* raised cards */
  --panel-alt: #0B1426;   /* alternating section bands (same as bg in dark) */
  --about-bg: #081020;    /* About section: a shade deeper than the page */
  --ink: #F7F4EC;         /* ivory text */
  --muted: #9AA6BA;       /* secondary text, 7.5:1 */
  --line: #24324D;        /* dividers */
  --line-strong: #24324D; /* ghost-button and input borders */
  --accent: #10B981;      /* emerald: links, focus ring, inspect outlines, primary button, 7.3:1 */
  --accent-hover: #34D399;
  --accent-band: #10B981; /* accent on --panel-alt bands */
  --tab-bg: #0B1426;      /* selected framework tab */
  --chip-bg: transparent;
  --on-accent: #0B1426;   /* text on the primary button */
  --gold: #E0A526;        /* status LED, active highlight, seam */
  --gold-outline: transparent; /* 1px edge that keeps gold graphics visible on ivory */
  --gold-text: #E0A526;   /* gold used as small text, 8.4:1 */
  --ok: #34D399;          /* "device connected" dot */
  --error: #F87171;       /* form errors only */
  --code-bg: #060C18;
  --code-ink: #DCE2E7;
  --code-dim: #8190A8;
  --code-str: #F0C060;
  --data-bg: #111D33;     /* the "Nothing passes through us" band */
  --brand-device: #F7F4EC;
  --brand-deck: #10B981;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, .7);

  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F7F4EC;          /* ivory page */
    --panel: #FFFDF8;       /* cards */
    --panel-alt: #EFEADF;   /* alternating section bands */
    --about-bg: #EFEADF;    /* About section: deeper ivory, not a navy band */
    --ink: #0B1426;
    --muted: #4F5B70;       /* 6.2:1; 5.7:1 on panel-alt */
    --line: #D9D2C1;        /* dividers */
    --line-strong: #8A806A; /* ghost-button and input borders, 3.5:1 */
    --accent: #0A7A55;      /* 4.9:1 */
    --accent-hover: #08664A;
    --accent-band: #08664A; /* #0A7A55 is 4.46:1 on panel-alt */
    --tab-bg: #E3F1EA;
    --chip-bg: #E3F1EA;
    --on-accent: #F7F4EC;
    --gold: #E0A526;        /* graphics only */
    --gold-outline: #8C5E0A;
    --gold-text: #8C5E0A;   /* 5.1:1 */
    --ok: #0A7A55;
    --error: #C2410C;
    --code-bg: #0B1426;     /* terminal and install box in brand navy */
    --data-bg: #0B1426;     /* navy band in light too */
    --brand-device: #0B1426;
    --brand-deck: #0A7A55;
    --shadow: 0 30px 60px -40px rgba(11, 20, 38, .30);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F7F4EC;          /* ivory page */
  --panel: #FFFDF8;       /* cards */
  --panel-alt: #EFEADF;   /* alternating section bands */
  --about-bg: #EFEADF;    /* About section: deeper ivory, not a navy band */
  --ink: #0B1426;
  --muted: #4F5B70;       /* 6.2:1; 5.7:1 on panel-alt */
  --line: #D9D2C1;        /* dividers */
  --line-strong: #8A806A; /* ghost-button and input borders, 3.5:1 */
  --accent: #0A7A55;      /* 4.9:1 */
  --accent-hover: #08664A;
  --accent-band: #08664A; /* #0A7A55 is 4.46:1 on panel-alt */
  --tab-bg: #E3F1EA;
  --chip-bg: #E3F1EA;
  --on-accent: #F7F4EC;
  --gold: #E0A526;        /* graphics only */
  --gold-outline: #8C5E0A;
  --gold-text: #8C5E0A;   /* 5.1:1 */
  --ok: #0A7A55;
  --error: #C2410C;
  --code-bg: #0B1426;     /* terminal and install box in brand navy */
  --data-bg: #0B1426;     /* navy band in light too */
  --brand-device: #0B1426;
  --brand-deck: #0A7A55;
  --shadow: 0 30px 60px -40px rgba(11, 20, 38, .30);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--on-accent);
  border: 1px solid var(--accent); border-radius: 999px;
  font: 600 15px/1 var(--f-body); text-decoration: none; cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled, .btn:disabled:hover { opacity: .75; cursor: progress; transform: none; background: var(--accent); border-color: var(--accent); }
.btn--ghost, .btn--ghost:hover { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--small { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* Status LED */
.status {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
}
.led {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-outline), 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent), 0 0 12px var(--gold);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .45; } }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark__logo { width: 30px; height: 30px; flex: none; }
.mark__word { font: 600 17px/1 var(--f-display); letter-spacing: -.01em; }
.mark__device { color: var(--brand-device); }
.mark__deck { color: var(--brand-deck); }
.top__nav { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.top__nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.top__nav a:not(.btn):hover { color: var(--ink); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 {
  margin-top: 22px;
  font: 500 clamp(28px, 4vw, 52px)/1.08 var(--f-display);
  letter-spacing: -.03em;
  text-wrap: balance;
}
.hero h1 span { display: block; white-space: nowrap; }
.hero h1 .h1__last { color: var(--accent); }
.lede { margin-top: 22px; max-width: 34em; color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Signature demo */
.demo { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 14px; box-shadow: var(--shadow); min-width: 0; }
.demo__tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.demo__tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; padding: 8px 12px; border-radius: 999px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer;
  font: 500 11.5px/1 var(--f-mono);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--tab-bg); border-color: var(--line); }
.demo__body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; }
.demo__cap { margin-top: 12px; padding: 0 4px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* Phone mock: TestHive, the demo app DeviceDeck's docs and tests use (dev.devicelab.testhive).
   The app renders in its own light iOS UI in both page themes. */
.phone { background: #03070F; border-radius: 32px; padding: 7px; align-self: start; box-shadow: 0 0 0 1px var(--line); }
.phone__screen {
  position: relative; height: 430px; border-radius: 26px; overflow: hidden;
  background: #FFFFFF; color: #111316; font-family: -apple-system, "SF Pro Text", system-ui, var(--f-body);
}
.phone__status { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 0 20px; font: 600 11px/1 -apple-system, system-ui, var(--f-body); }
.phone__island { position: absolute; left: 50%; top: 7px; width: 58px; height: 17px; margin-left: -29px; border-radius: 10px; background: #000; }
.phone__dots { letter-spacing: 1px; font-size: 7px; }
.app { position: absolute; inset: 30px 0 0; padding: 12px 14px 0; display: flex; flex-direction: column; transition: opacity .35s ease, transform .35s ease; }
.app--login { align-items: center; text-align: center; gap: 6px; padding-top: 22px; }
.app--home { opacity: 0; transform: translateX(24px); pointer-events: none; gap: 9px; }
.phone.is-home .app--login { opacity: 0; transform: translateX(-24px); }
.phone.is-home .app--home { opacity: 1; transform: none; }
.th-logo { width: 56px; height: 56px; margin-bottom: 8px; }
.app__title { font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.app__sub { font-size: 10.5px; color: #8A8D93; margin-bottom: 12px; }
.app__hint { align-self: stretch; text-align: left; font-size: 8.5px; color: #6B6F76; margin: -2px 0 6px; }
.app__link { margin-top: 8px; font-size: 11px; color: #0A7AFF; }

.el { position: relative; border-radius: 8px; font-size: 12px; }
.el::after {
  content: ""; position: absolute; inset: -4px; border-radius: 10px;
  border: 1.5px dashed color-mix(in srgb, #0A7A55 55%, transparent);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.el__tag {
  position: absolute; top: -12px; right: 4px; z-index: 1;
  padding: 2px 5px; border-radius: 4px;
  background: #FFFFFF; color: #0A7A55; border: 1px solid color-mix(in srgb, #0A7A55 45%, transparent);
  font: 500 8px/1.2 var(--f-mono);
  transition: background .2s ease, color .2s ease;
}
.el__tag::before { content: "#"; opacity: .6; }
.el__tag--text::before { content: none; }
.el--field { align-self: stretch; text-align: left; padding: 8px 2px 6px; border-bottom: 1px solid #E3E4E8; border-radius: 0; }
.el__value { display: block; min-height: 15px; font-size: 12.5px; color: #111316; }
.el__value:empty::before { content: attr(data-placeholder); color: #B0B3B9; }
.el__value.is-typing::after { content: ""; display: inline-block; width: 1px; height: 12px; margin-left: 1px; background: #0A7AFF; vertical-align: -2px; animation: blink .8s steps(1) infinite; }
.el--button { align-self: stretch; margin-top: 8px; padding: 10px; border-radius: 9px; text-align: center; font-weight: 600; font-size: 12.5px; background: #0A7AFF; color: #FFFFFF; transition: transform .12s ease, filter .12s ease; }
.el--button.is-pressed { transform: scale(.97); filter: brightness(.9); }
.el--text { display: inline-block; white-space: nowrap; font-size: 9.5px; color: #6B6F76; padding: 1px 2px; }
.el--text .el__tag { top: auto; bottom: -15px; right: auto; left: 0; }
.el.is-active::after { border: 2px solid #E0A526; box-shadow: 0 0 0 4px color-mix(in srgb, #E0A526 22%, transparent); }
.el.is-active .el__tag { background: #E0A526; color: #111316; border-color: #E0A526; }

.th-head { display: flex; align-items: center; gap: 8px; }
.th-mark { width: 26px; height: 26px; flex: none; }
.th-head__text { flex: 1; min-width: 0; }
.th-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; line-height: 1.1; }
.th-icons { display: flex; gap: 8px; color: #111316; }
.th-icons svg { width: 16px; height: 16px; }
.th-search { padding: 8px 10px; border-radius: 9px; background: #F1F2F4; color: #9A9DA3; font-size: 10.5px; }
.th-chips { display: flex; gap: 5px; white-space: nowrap; overflow: hidden; }
.th-chips span { padding: 5px 9px; border-radius: 999px; background: #EDEEF0; font-size: 9.5px; font-weight: 500; }
.th-chips .is-on { background: #0A7AFF; color: #FFFFFF; }
.th-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-radius: 11px; background: #FFFFFF; box-shadow: 0 1px 4px rgba(17, 19, 22, .08); }
.th-card__name { font-weight: 600; font-size: 12px; }
.th-card__cat { font-size: 9.5px; color: #8A8D93; margin: 1px 0 3px; }
.th-card__price { font-weight: 700; font-size: 12.5px; color: #0A7AFF; }
.th-card__price span { font-weight: 500; font-size: 9px; color: #8A8D93; margin-left: 4px; }
.th-add { padding: 6px 13px; border-radius: 999px; background: #0A7AFF; color: #FFFFFF; font-weight: 600; font-size: 10.5px; }

/* Terminal / code */
.term { min-width: 0; display: flex; flex-direction: column; background: var(--code-bg); color: var(--code-ink); border-radius: 16px; padding: 14px 0 6px; overflow: hidden; }
.term__prompt { padding: 0 16px; font: 400 11.5px/1.55 var(--f-mono); }
.term__who { display: block; color: var(--code-dim); font-size: 10px; margin-bottom: 3px; }
.term__text::before { content: "› "; color: var(--gold); }
.term__device { margin: 10px 16px 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); font: 400 10px/1.4 var(--f-mono); color: var(--code-dim); }
.term__device::before { content: "● "; color: var(--ok); }
.term__code { margin: 0; flex: 1; overflow-x: auto; padding: 0 0 8px; font: 400 11px/1.75 var(--f-mono); tab-size: 2; }
.term__code code { display: block; min-width: max-content; }
.ln { display: block; padding: 0 16px; border-left: 2px solid transparent; transition: background .2s ease, border-color .2s ease; }
.ln.is-active { background: rgba(224, 165, 38, .16); border-left-color: var(--gold); }
.tok-str { color: var(--code-str); }
.tok-dim { color: var(--code-dim); }

/* Section heads */
.section-h { font: 500 clamp(26px, 3vw, 38px)/1.15 var(--f-display); letter-spacing: -.025em; text-wrap: balance; }

/* Pillars */
.pillars { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); background: var(--panel-alt); --accent: var(--accent-band); }
.section-intro { margin-top: 16px; max-width: 40em; color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); }
.pillar__tag { font: 600 13px/1 var(--f-mono); color: var(--accent); letter-spacing: .02em; }
.pillars__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.pillar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.pillar h3 { font: 600 20px/1.25 var(--f-body); letter-spacing: -.01em; }
.pillar p { color: var(--muted); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto !important; padding-top: 6px; }
.chips span { font: 500 11px/1 var(--f-mono); padding: 7px 9px; border-radius: 6px; border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); background: var(--chip-bg); color: var(--ink); }

/* Loop */
.loop { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.loop__steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.loop__steps li { counter-increment: step; position: relative; padding: 28px 24px 0 0; border-top: 2px solid var(--ink); }
.loop__steps li:last-child { border-top-color: var(--gold); }
.loop__steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: -11px; left: 0; padding-right: 10px; background: var(--bg);
  font: 500 12px/20px var(--f-mono); color: var(--muted);
}
.loop__steps li:last-child::after {
  content: "↺ back to Run"; display: block; margin-top: 14px;
  font: 500 11px/1 var(--f-mono); color: var(--gold-text);
}
.loop__steps h3 { font: 500 22px/1.2 var(--f-display); letter-spacing: -.02em; margin-bottom: 10px; }
.loop__steps p { color: var(--muted); font-size: 16px; }

/* Data path */
.data {
  --bg: #0B1426; --panel: #111D33; --ink: #F7F4EC; --muted: #9AA6BA; --line: #24324D;
  --accent: #10B981; --gold: #E0A526; --gold-outline: transparent;
  padding: clamp(56px, 8vw, 96px) 0; background: var(--data-bg); color: var(--ink);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.data__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.data__copy { display: flex; flex-direction: column; gap: 16px; }
.data__copy p { color: var(--muted); max-width: 32em; }
.data__copy .section-h { margin-bottom: 6px; }
.data__copy .data__proof { color: var(--ink); font: 500 clamp(19px, 1.8vw, 22px)/1.4 var(--f-display); letter-spacing: -.01em; }
.path { display: flex; flex-direction: column; align-items: center; }
.path__broker {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 20px; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--muted);
  font-size: 13px; text-align: center; position: relative;
}
.path__broker strong { font: 600 15px/1.2 var(--f-display); color: var(--ink); letter-spacing: -.01em; }
.path__broker span, .path__node span { font: 400 11px/1.4 var(--f-mono); }
.path__row { position: relative; margin-top: 48px; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; }
.path__row::before {
  /* dashed control links from broker to both ends */
  content: ""; position: absolute; left: 17%; right: 17%; top: -48px; height: 48px;
  border: 1.5px dashed var(--line); border-bottom: 0; border-radius: 12px 12px 0 0;
}
.path__node { position: relative; z-index: 1; background: var(--bg); border: 1px solid var(--ink); border-radius: 12px; padding: 16px 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.path__node strong { font: 600 15px/1.2 var(--f-body); }
.path__node span { color: var(--muted); }
.path__pipe { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 6px; text-align: center; }
.path__pipe::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: var(--accent); border-radius: 2px; z-index: 0; }
.path__pipe span, .path__pipe em { position: relative; z-index: 1; background: var(--data-bg); padding: 2px 6px; font: 500 10.5px/1.35 var(--f-mono); }
.path__pipe span { transform: translateY(-16px); }
.path__pipe em { font-style: normal; color: var(--accent); transform: translateY(12px); }
.path__pipe::after {
  content: ""; position: absolute; top: 50%; left: 0; width: 22px; height: 8px; margin-top: -4px; border-radius: 4px;
  background: var(--gold); box-shadow: 0 0 0 1px var(--gold-outline), 0 0 10px var(--gold); z-index: 0;
  animation: packet 2.8s ease-in-out infinite alternate;
}
@keyframes packet { to { left: calc(100% - 22px); } }

/* Open source */
.oss { padding: clamp(56px, 8vw, 96px) 0; background: var(--panel-alt); --accent: var(--accent-band); }
.oss__lede { margin-top: 18px; max-width: 40em; color: var(--muted); }
.install { margin-top: 28px; display: flex; align-items: stretch; max-width: 640px; background: var(--code-bg); border-radius: 12px; overflow: hidden; }
.install code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 16px 18px; color: var(--code-ink); font: 400 12.5px/1.4 var(--f-mono); }
.install code::before { content: "$ "; color: var(--code-dim); }
.install__copy { flex: none; border: 0; border-left: 1px solid rgba(255,255,255,.1); background: transparent; color: var(--code-ink); padding: 0 18px; font: 500 12px/1 var(--f-mono); cursor: pointer; }
.install__copy:hover { color: var(--gold); }
.oss__links { margin-top: 14px; }
.oss__links a { font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: 4px; }

.compare { margin-top: 48px; border-top: 1px solid var(--ink); }
.compare__row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.compare__row > span:first-child { font: 500 11.5px/1.9 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.compare__row > span:nth-child(2) { color: var(--muted); }
.compare__head { font: 600 16px/1.3 var(--f-body); }
.compare__head > span:nth-child(2) { color: var(--ink); }
.compare__head em { display: block; margin-top: 4px; font: 500 11px/1 var(--f-mono); font-style: normal; color: var(--muted); }
.compare__head > span:last-child em { color: var(--gold-text); }

/* Notify */
.notify { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.notify__box { }
.notify__box > * { max-width: 720px; }
.notify__box {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
}
.notify h2 { font: 500 clamp(30px, 4vw, 48px)/1.1 var(--f-display); letter-spacing: -.03em; }
.notify__box > p:not(.status):not(.notify__msg) { color: var(--muted); }
.notify__form { display: flex; gap: 10px; width: 100%; max-width: 520px; margin-top: 8px; }
.notify__form[hidden] { display: none; }
.notify__form input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--ink);
  font: 400 16px/1 var(--f-body);
}
.notify__form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.notify__decoy { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* a trap for bots; people never see it */
.notify__msg { min-height: 1.6em; font-size: 15px; color: var(--muted); }
.notify__msg.is-error { color: var(--error); }

/* Sending: a spinner inside the button; the text beside it is what screen readers hear */
.btn.is-busy { gap: 10px; }
.btn.is-busy::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* After sign-up the form gives way to this card. While sending, a gold packet travels the direct line
   from DeviceDeck to your inbox (the same line as the "Nothing passes through us" diagram); when it
   lands, the line fills, the envelope turns solid and a check draws itself. */
.notify__done:not([hidden]) {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  width: 100%; max-width: 560px; margin-top: 8px; padding: 24px;
  border-radius: 18px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow); animation: rise .4s cubic-bezier(.2, .8, .2, 1);
}
.notify__done:focus { outline: none; }
.notify__done:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.send { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 340px; margin-bottom: 14px; }
.send__end {
  position: relative; flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  transition: background .35s ease, color .35s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.send__end > * { grid-area: 1 / 1; }
.send__from img { width: 24px; height: 24px; }
.send__line {
  position: relative; flex: 1; height: 2px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
}
.send__line::after { /* the emerald fill that completes on arrival */
  content: ""; position: absolute; inset: 0; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.6, 0, .2, 1);
}
.send__packet {
  position: absolute; z-index: 1; top: 50%; left: 0; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 1px var(--gold-outline), 0 0 12px var(--gold);
  animation: travel 1.15s cubic-bezier(.5, 0, .5, 1) infinite;
}
@keyframes travel {
  0% { left: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: calc(100% - 10px); opacity: 0; }
}
.send__mail { width: 22px; height: 22px; transition: opacity .2s ease, transform .3s ease; }
.send__check { width: 22px; height: 22px; opacity: 0; }
.send__check path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.send__to::after { /* a ring that ripples out once when the email lands */
  content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--accent); opacity: 0;
}

.notify__done[data-state="sent"] .send__line::after,
.notify__done[data-state="listed"] .send__line::after { transform: scaleX(1); }
.notify__done[data-state="sent"] .send__packet,
.notify__done[data-state="listed"] .send__packet { animation: none; left: calc(100% - 10px); opacity: 0; transition: opacity .2s; }
.notify__done[data-state="sent"] .send__to,
.notify__done[data-state="listed"] .send__to { background: var(--accent); color: var(--on-accent); transform: scale(1.06); transition-delay: .3s; }
.notify__done[data-state="sent"] .send__to::after,
.notify__done[data-state="listed"] .send__to::after { animation: ripple .8s ease-out .35s; }
@keyframes ripple { from { opacity: .6; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }
.notify__done[data-state="sent"] .send__mail,
.notify__done[data-state="listed"] .send__mail { opacity: 0; transform: scale(.6); transition-delay: .3s; }
.notify__done[data-state="sent"] .send__check,
.notify__done[data-state="listed"] .send__check { opacity: 1; transition: opacity .1s .4s; }
.notify__done[data-state="sent"] .send__check path,
.notify__done[data-state="listed"] .send__check path { stroke-dashoffset: 0; transition: stroke-dashoffset .4s cubic-bezier(.6, 0, .2, 1) .45s; }

.notify__done-eyebrow { font: 600 11.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.notify__done-h { font: 600 clamp(22px, 2.6vw, 26px)/1.2 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
.notify__done-text { color: var(--ink); overflow-wrap: anywhere; }
.notify__done-text strong { font-weight: 600; }
.notify__done-fine { font-size: 14px; color: var(--muted); }
.notify__done-fine:empty { display: none; }
.notify__done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 10px; }
.notify__done-actions .btn { gap: 6px; }
.notify__inbox::after { content: "↗"; font-size: 13px; }
.notify__again {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 14px/1.5 var(--f-body); color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
}
.notify__done[data-state="sending"] .notify__done-actions,
.notify__done[data-state="sending"] .notify__done-fine { display: none; }
/* the words arrive after the check: eyebrow, heading, text, fine print, actions */
.notify__done.is-revealed > p, .notify__done.is-revealed > .notify__done-actions { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.notify__done.is-revealed > :nth-child(2) { animation-delay: .28s; }
.notify__done.is-revealed > :nth-child(3) { animation-delay: .34s; }
.notify__done.is-revealed > :nth-child(4) { animation-delay: .4s; }
.notify__done.is-revealed > :nth-child(5) { animation-delay: .46s; }
.notify__done.is-revealed > :nth-child(6) { animation-delay: .52s; }

/* Small pages: confirmation, expired link, 404 */
.page { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); }
.page__inner { max-width: 720px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.page h1 { font: 500 clamp(34px, 5vw, 56px)/1.08 var(--f-display); letter-spacing: -.03em; }
.page .lede { margin-top: 0; }
.page .lede strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.page__mark {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.page__mark svg { width: 28px; height: 28px; }
.page__mark--warn { color: var(--gold-text); background: color-mix(in srgb, var(--gold) 16%, transparent); }
.next { list-style: none; margin: 18px 0 0; padding: 0; width: 100%; display: grid; gap: 12px; counter-reset: next; }
.next li {
  counter-increment: next; position: relative; padding: 18px 20px 18px 60px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
}
.next li::before {
  content: counter(next); position: absolute; left: 20px; top: 18px;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font: 600 13px/1 var(--f-mono); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
}
.next h2 { font: 600 17px/1.3 var(--f-body); color: var(--ink); }
.next p { margin-top: 4px; color: var(--muted); font-size: 15.5px; }
.wait { margin-top: 18px; width: 100%; padding-top: 26px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.wait h2 { font: 500 22px/1.2 var(--f-display); letter-spacing: -.02em; }
.wait p { color: var(--muted); }
.wait .install { margin-top: 4px; max-width: 100%; }
.wait a { font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.page__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* About: the principle */
.about { padding: clamp(64px, 9vw, 112px) 0; background: var(--about-bg); border-top: 1px solid var(--line); }
.about__inner { max-width: 600px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.about__eyebrow { font: 500 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.about__rule { display: block; width: 40px; height: 2px; margin: 24px 0 28px; background: var(--gold); }
.about__sa { font: 400 clamp(34px, 5vw, 48px)/1.35 "Tiro Devanagari Sanskrit", serif; color: var(--ink); }
.about__tr { margin-top: 10px; font-style: italic; color: var(--muted); }
.about__en { margin-top: 14px; font: 500 clamp(20px, 2.2vw, 24px)/1.3 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.about__src { margin-top: 10px; font: 400 12px/1.4 var(--f-mono); color: var(--muted); }
.about__body { margin-top: 32px; color: var(--muted); text-wrap: pretty; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot a { color: var(--ink); text-underline-offset: 3px; }
.foot__links { display: flex; gap: 18px; }

/* Responsive */
@media (max-width: 980px) {
  .hero__grid, .data__grid { grid-template-columns: minmax(0, 1fr); }
  .pillars__grid { grid-template-columns: minmax(0, 1fr); }
  .loop__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .top__nav a:not(.btn) { display: none; }
  .demo { padding: 10px; border-radius: 18px; }
  .demo__body { grid-template-columns: minmax(0, 1fr); }
  .phone { width: 200px; justify-self: center; }
  .loop__steps { grid-template-columns: minmax(0, 1fr); }
  .loop__steps li { padding-right: 0; }
  .path__row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .path__row::before { left: 50%; right: auto; width: 0; border-radius: 0; border-left: 1.5px dashed var(--line); border-top: 0; border-right: 0; }
  .path__pipe { height: 110px; }
  .path__pipe::before { left: 50%; right: auto; top: 0; bottom: 0; width: 4px; height: auto; margin: 0 0 0 -2px; }
  .path__pipe::after { left: 50%; top: 0; width: 8px; height: 22px; margin: 0 0 0 -4px; animation-name: packet-v; }
  .path__pipe span, .path__pipe em { transform: none; }
  .compare__head > span:first-child { display: none; }
  .compare__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; }
  .compare__row > span:first-child { grid-column: 1 / -1; }
  .notify__form { flex-direction: column; }
}
@keyframes packet-v { to { top: calc(100% - 22px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.page { min-height: calc(100svh - 64px - 97px); }
.notify__inbox[hidden] { display: none; }
