/* Delta Age — design system
   Concept: the Δ is the gap between who you are and how old you've actually
   become. The delta scale (green = younger, amber = older) is the brand. */

:root {
  color-scheme: dark;

  --ink:      #080C11;
  --ink-2:    #0D141B;
  --ink-3:    #121C25;
  --line:     #1D2A36;
  --line-2:   #2A3B4A;
  --fg:       #E9EFF4;
  --fg-dim:   #8698A8;
  --fg-mute:  #5C6D7C;

  --accent:   #3DDC97;
  --accent-2: #4CC9F0;
  --amber:    #F2A65A;
  --coral:    #E5675E;

  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;

  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --maxw: 1140px;

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

img, svg, video, canvas { max-width: 100%; height: auto; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.95rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.45rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 1.1em; text-wrap: pretty; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.narrow { max-width: 760px; }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--fg-dim); }
.dim { color: var(--fg-dim); }
.mute { color: var(--fg-mute); }
.mono { font-family: var(--font-mono); font-size: 0.86em; overflow-wrap: anywhere; }
.kit-pending {
  color: var(--fg-mute); font-style: italic; font-weight: 400;
  font-size: 0.86em; letter-spacing: 0.01em;
}
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.stack > * + * { margin-top: 1rem; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 2rem;
  min-height: 68px; position: relative;
}
.logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: -0.03em; color: var(--fg); text-decoration: none;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo svg { display: block; }
.logo b { font-weight: 700; }
.logo span { color: var(--fg-mute); font-weight: 500; }

.site-nav { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; flex-wrap: nowrap; }
.site-nav a { color: var(--fg-dim); font-size: 0.94rem; font-weight: 500; white-space: nowrap; }

.site-nav a:hover, .site-nav a.on { color: var(--fg); text-decoration: none; }
.site-nav a.on { color: var(--accent); }
/* Between the mobile menu breakpoint and a comfortable desktop width the nav
   runs out of room; tighten the spacing instead of letting the CTA squeeze. */
@media (min-width: 901px) and (max-width: 1120px) {
  .site-header .wrap { gap: 1.25rem; }
  .site-nav { gap: 1.05rem; }
}


/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: -0.01em; cursor: pointer; white-space: nowrap;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #06120C; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #FFF); opacity: 1; }
.btn-ghost { border-color: var(--line-2); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg-mute); background: var(--ink-2); }
.btn-sm { padding: 0.5rem 1.05rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
}

/* ---------- hero ---------- */

.hero { position: relative; padding: clamp(4rem, 11vw, 8rem) 0 clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% 30% auto -20%; height: 620px;
  background: radial-gradient(ellipse at center, rgba(61,220,151,0.13), transparent 62%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset: -20% -25% auto 45%; height: 560px;
  background: radial-gradient(ellipse at center, rgba(76,201,240,0.10), transparent 62%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  padding: 0.32rem 0.85rem; border-radius: 999px; margin-bottom: 1.5rem;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-cta { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-note { margin-top: 1.5rem; font-size: 0.88rem; color: var(--fg-mute); }

/* ---------- the delta dial ---------- */

.dial { display: grid; place-items: center; }
.dial-card {
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 2rem; width: 100%; max-width: 400px;
  box-shadow: 0 24px 70px -30px rgba(0,0,0,0.9);
}
.dial-label { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-mute); font-weight: 600; }
.dial-value {
  font-family: var(--font-display); font-size: clamp(3rem, 13vw, 4.2rem); font-weight: 700;
  letter-spacing: -0.05em; line-height: 1; margin: 0.35rem 0 0.15rem;
}
.dial-value.good { color: var(--accent); }
.dial-value.bad { color: var(--amber); }
.dial-unit { font-size: 1.4rem; color: var(--fg-mute); font-weight: 500; letter-spacing: -0.02em; }
.dial-scale { height: 6px; border-radius: 999px; margin: 1.5rem 0 0.6rem;
  background: linear-gradient(90deg, var(--accent) 0%, #A8D97A 35%, var(--amber) 70%, var(--coral) 100%); }
.dial-ticks { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--fg-mute); }
.dial-rows { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: 0.6rem; }
.dial-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; flex-wrap: wrap; }
.dial-row span:first-child { color: var(--fg-dim); }
.dial-row span:last-child { font-family: var(--font-mono); font-size: 0.88rem; }

/* ---------- sections & cards ---------- */

section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
section.tight { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.section-head { max-width: 680px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.6rem;
}
.card.raised { background: linear-gradient(160deg, var(--ink-3), var(--ink-2)); }
.card h3 { margin-bottom: 0.4rem; }
.card p:last-child { margin-bottom: 0; }

.step-n {
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
  color: var(--accent); letter-spacing: 0.1em; margin-bottom: 0.9rem;
}

/* ---------- pricing ---------- */

.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }
.price-card.featured::before {
  content: 'Most complete'; position: absolute; top: -1px; right: 1.4rem;
  transform: translateY(-50%); background: var(--grad); color: #06120C;
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 0.22rem 0.7rem; border-radius: 999px;
}
.price { font-family: var(--font-display); font-size: clamp(2.1rem, 8vw, 2.6rem); font-weight: 700; letter-spacing: -0.04em; margin: 0.6rem 0 0.2rem; }
.price small { font-size: 0.9rem; font-weight: 500; color: var(--fg-mute); letter-spacing: 0; }
.feature-list { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: 0.7rem; }
.feature-list li { display: flex; gap: 0.65rem; font-size: 0.93rem; color: var(--fg-dim); line-height: 1.5; }
.feature-list li::before {
  content: ''; flex: 0 0 auto; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%233DDC97' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.price-card .btn { margin-top: auto; }

/* ---------- journey / progress ---------- */

.journey { display: grid; gap: 0; margin: 1.5rem 0; }
.jstep { display: grid; grid-template-columns: 32px 1fr; gap: 1rem; position: relative; padding-bottom: 1.4rem; }
.jstep:last-child { padding-bottom: 0; }
.jstep::before {
  content: ''; position: absolute; left: 15px; top: 30px; bottom: 0; width: 2px; background: var(--line);
}
.jstep:last-child::before { display: none; }
.jdot {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line); background: var(--ink-2);
  font-size: 0.78rem; font-weight: 700; font-family: var(--font-display); color: var(--fg-mute);
  position: relative; z-index: 1;
}
.jstep.done .jdot { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--ink-2)); color: var(--accent); }
.jstep.done::before { background: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.jstep.now .jdot { border-color: var(--accent); background: var(--grad); color: #06120C; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent); }
.jstep h4 { margin: 0.25rem 0 0.15rem; font-size: 1rem; }
.jstep.todo h4 { color: var(--fg-mute); }
.jstep p { margin: 0; font-size: 0.88rem; color: var(--fg-dim); }
.jstep.todo p { color: var(--fg-mute); }

/* ---------- demo notice ---------- */
/* Sitewide bar for the sandbox reference integration. Amber, not accent green:
   it must read as a caveat, never as part of the product's own voice. */
.demo-bar {
  background: color-mix(in srgb, var(--amber) 12%, var(--ink));
  border-bottom: 1px solid color-mix(in srgb, var(--amber) 38%, transparent);
  color: var(--amber);
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 0.6rem 0;
}
.demo-bar strong { color: color-mix(in srgb, var(--amber) 55%, #FFF); font-weight: 600; }

/* Block-level version for the places a purchase is actually decided. */
.demo-note {
  border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  background: color-mix(in srgb, var(--amber) 9%, transparent);
  border-radius: var(--r);
  padding: 1.1rem 1.3rem;
  color: var(--amber);
  font-size: 0.9rem;
  line-height: 1.6;
}
.demo-note h3 { color: color-mix(in srgb, var(--amber) 55%, #FFF); font-size: 1rem; margin: 0 0 0.4rem; }
.demo-note p { margin: 0.4rem 0 0; color: color-mix(in srgb, var(--amber) 75%, var(--fg)); }
.demo-note code {
  background: color-mix(in srgb, var(--amber) 14%, transparent);
  border-radius: 4px; padding: 0.1rem 0.35rem; font-size: 0.85em;
}

/* ---------- badges & tables ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; font-weight: 600; font-family: var(--font-display);
  letter-spacing: 0.04em; padding: 0.24rem 0.68rem; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--fg-dim); background: var(--ink-3);
  white-space: nowrap;
}
.badge.ok    { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.badge.warn  { color: var(--amber);  border-color: color-mix(in srgb, var(--amber) 40%, transparent);  background: color-mix(in srgb, var(--amber) 10%, transparent); }
.badge.bad   { color: var(--coral);  border-color: color-mix(in srgb, var(--coral) 40%, transparent);  background: color-mix(in srgb, var(--coral) 10%, transparent); }
.badge.info  { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); background: color-mix(in srgb, var(--accent-2) 10%, transparent); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 520px; }
th, td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-family: var(--font-display); font-size: 0.76rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--fg-mute); font-weight: 600; background: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--ink-3) 60%, transparent); }

/* ---------- forms ---------- */

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.84rem; font-weight: 600; font-family: var(--font-display); letter-spacing: 0.01em; color: var(--fg-dim); }
.field .hint { font-size: 0.79rem; color: var(--fg-mute); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], select, textarea {
  width: 100%; padding: 0.7rem 0.9rem;
  background: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--fg); font-family: var(--font-body); font-size: max(16px, 0.97rem);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
input::placeholder { color: var(--fg-mute); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238698A8' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 6.5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 16px; padding-right: 2.4rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

.alert { padding: 0.85rem 1.1rem; border-radius: var(--r-sm); font-size: 0.9rem; border: 1px solid; }
.alert-error { color: var(--coral); border-color: color-mix(in srgb, var(--coral) 40%, transparent); background: color-mix(in srgb, var(--coral) 9%, transparent); }
.alert-ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.alert-info { color: var(--fg-dim); border-color: var(--line-2); background: var(--ink-2); }
.alert-warn { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 9%, transparent); }

/* ---------- auth / narrow pages ---------- */

.pane { max-width: 460px; margin: clamp(2.5rem, 8vw, 5rem) auto; padding-inline: var(--pad); }
.pane .card { padding: 2rem; }
.pane h1 { font-size: 1.9rem; margin-bottom: 0.3rem; }

/* ---------- portal ---------- */

.portal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.portal-head > div { min-width: 0; }
.portal-head h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 0.2rem; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stat { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.3rem; }
.stat .k { font-size: 0.74rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--fg-mute); font-weight: 600; }
.stat .v { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 0.2rem; }

.item-row {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  padding: 1.15rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--ink-2); margin-bottom: 0.85rem;
}
.item-row .grow { flex: 1 1 220px; min-width: 0; }
.item-row .t { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; }
.item-row .s { font-size: 0.84rem; color: var(--fg-mute); }

.empty {
  border: 1px dashed var(--line-2); border-radius: var(--r);
  padding: 2.5rem 1.5rem; text-align: center; color: var(--fg-dim);
}

/* ---------- results ---------- */

.result-hero {
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: 1.5rem;
}
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.25rem; }
.metric .k { font-size: 0.74rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--fg-mute); font-weight: 600; }
.metric .v { font-family: var(--font-display); font-size: clamp(1.9rem, 7vw, 2.4rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; margin-top: 0.25rem; }
.metric .v small { font-size: 0.95rem; color: var(--fg-mute); font-weight: 500; letter-spacing: 0; margin-left: 0.15rem; }
.metric.hero-metric .v { font-size: clamp(2.6rem, 11vw, 3.4rem); }
.metric.good .v { color: var(--accent); }
.metric.bad .v { color: var(--amber); }
.metric.small .v { font-size: clamp(1.4rem, 5vw, 1.7rem); }
.m-note { margin-top: 0.3rem; font-size: 0.8rem; line-height: 1.4; color: var(--fg-mute); }

.metric-group { margin-bottom: 1.25rem; }
.metric-group .metric-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.1rem 1.5rem; }

.report-list { display: grid; gap: 0.75rem; }
.report-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2);
  padding: 1rem 1.15rem;
}
.report-item .btn { flex: 0 0 auto; }

pre.payload {
  background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 1.1rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--fg-dim); line-height: 1.55; max-height: 520px;
}

details.raw { border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2); padding: 1rem 1.3rem; }
details.raw summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; }
details.raw[open] summary { margin-bottom: 1rem; }

/* ---------- portal focus ---------- */

.focus {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: clamp(1.6rem, 3.5vw, 2.5rem); margin-bottom: 2.5rem;
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.focus.ready, .focus.action { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.focus.ready::before, .focus.action::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad);
}
.focus h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; margin: 0.35rem 0 0.6rem; }
.focus p { color: var(--fg-dim); margin: 0; max-width: 46ch; }
.focus-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; }
.focus-actions a.quiet { color: var(--fg-dim); font-size: 0.9rem; }
.focus-side { justify-self: end; width: 100%; max-width: 300px; }

@media (max-width: 780px) {
  .focus { grid-template-columns: 1fr; }
  .focus-side { justify-self: stretch; max-width: none; }
}

/* compact six-step progress, for use where the full journey is too tall */
.jmini { display: grid; gap: 0.55rem; }
.jmini-track { display: flex; align-items: center; gap: 0.35rem; }
.jmini-seg { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.jmini-seg.done { background: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.jmini-seg.now { background: var(--grad); }
.jmini-label { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.78rem; }
.jmini-label .now { color: var(--fg); font-weight: 600; }
.jmini-label .of { color: var(--fg-mute); font-variant-numeric: tabular-nums; }

/* one card per kit, so kits read side by side instead of as a stack of rows */
.kit-card {
  display: flex; flex-direction: column; gap: 0.9rem;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.3rem 1.4rem;
}
.kit-card .kit-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.kit-card .kit-top > div:first-child { min-width: 0; flex: 1 1 auto; }
.kit-card .kit-name { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; }
.kit-card .kit-sub { font-size: 0.82rem; color: var(--fg-mute); margin-top: 0.15rem; }
.kit-card .kit-foot { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 0.2rem; }
.kit-card .kit-foot a { font-size: 0.88rem; }

/* secondary navigation: things worth reaching, not worth a button */
.quiet-nav {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center;
  border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.25rem;
  font-size: 0.9rem;
}
.quiet-nav a { color: var(--fg-dim); }
.quiet-nav a:hover { color: var(--fg); }
.quiet-nav .sep { color: var(--fg-mute); }
.quiet-nav .push { margin-left: auto; color: var(--fg-mute); }

.sub-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin: 2.75rem 0 1rem;
}
.sub-head h2 { font-size: 1.25rem; margin: 0; }
.sub-head a { font-size: 0.88rem; color: var(--fg-dim); }

/* ---------- faq ---------- */

.qa { border-bottom: 1px solid var(--line); padding: 1.4rem 0; }
.qa:last-child { border-bottom: 0; }
.qa h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.qa p { margin-bottom: 0; color: var(--fg-dim); font-size: 0.95rem; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 4rem; margin-top: 3rem; color: var(--fg-mute); font-size: 0.88rem; }
.footer-grid { display: flex; gap: 2.5rem; flex-wrap: wrap; justify-content: space-between; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--fg-dim); }
.disclaimer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.8rem; line-height: 1.6; max-width: 720px; }

/* ---------- mobile ----------
   The site is built desktop-first above; everything below narrows it. The nav
   is a CSS-only disclosure (a hidden checkbox drives it) because the site ships
   no JavaScript and a menu that needs a script is a menu that can fail. */

.nav-check { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav-btn { display: none; }
.nav-btn .i-close { display: none; }

@media (max-width: 900px) {
  .nav-btn {
    display: inline-grid; place-items: center; margin-left: auto;
    width: 44px; height: 44px; flex: 0 0 auto;
    border: 1px solid var(--line-2); border-radius: var(--r-sm);
    color: var(--fg); cursor: pointer; background: transparent;
  }
  .nav-check:focus-visible + .nav-btn { outline: 2px solid var(--accent); outline-offset: 2px; }
  .nav-check:checked + .nav-btn .i-menu { display: none; }
  .nav-check:checked + .nav-btn .i-close { display: block; }

  .site-nav {
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%; margin-left: 0;
    padding: 0.25rem var(--pad) 1.1rem;
    background: color-mix(in srgb, var(--ink) 97%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 40px -26px rgba(0,0,0,0.95);
    max-height: calc(100dvh - 68px); overflow-y: auto;
  }
  .nav-check:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 0.9rem 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .site-nav a.btn { border-bottom: 0; }
  .site-nav form { display: block; margin-top: 0.9rem; }
  .site-nav .btn { width: 100%; margin-top: 0.9rem; }
  .site-nav form .btn { margin-top: 0; }
}

@media (max-width: 760px) {
  section { padding: clamp(2.25rem, 7vw, 3.25rem) 0; }
  .card { padding: 1.2rem 1.15rem; }
  .dial-card { padding: 1.4rem; }
  .pane .card { padding: 1.4rem 1.2rem; }
  .focus { padding: 1.35rem 1.2rem; margin-bottom: 1.75rem; }
  .result-hero { padding: 1.4rem 1.2rem; }

  /* stop side-by-side pairs from squeezing into unreadable columns */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-row, .metric-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .footer-grid { flex-direction: column; gap: 1.75rem; }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 1.25rem; }
  .portal-head { align-items: flex-start; margin-bottom: 1.5rem; }
  .portal-head > div:last-child .btn { flex: 1 1 auto; }
  .sub-head { margin: 2rem 0 0.85rem; }

  /* the trailing "push" item stops being a right-hand column and just stacks */
  .quiet-nav { gap: 0.75rem 1.25rem; margin-top: 2.25rem; }
  .quiet-nav .push { margin-left: 0; flex-basis: 100%; }
  .quiet-nav .sep { display: none; }
  .quiet-nav a { padding: 0.15rem 0; }

  .focus-actions { gap: 0.9rem; }
  .focus-actions .btn { width: 100%; }
  .item-row { padding: 1rem 1.1rem; }
  .jmini-label { font-size: 0.75rem; }
}

/* Tables stop being tables. Each row becomes a labelled card, so nothing
   depends on horizontal scrolling to be read. Labels come from data-label. */
@media (max-width: 640px) {
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  table { min-width: 0; display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody, tr, td { display: block; width: 100%; }
  tr {
    border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2);
    padding: 0.25rem 1rem; margin-bottom: 0.8rem;
  }
  tbody tr:last-child { margin-bottom: 0; }
  tbody tr:hover { background: var(--ink-2); }
  td {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.65rem 0; border-bottom: 1px solid var(--line); text-align: right;
  }
  tr td:last-child { border-bottom: 0; }
  td::before {
    content: attr(data-label); flex: 0 0 auto; text-align: left;
    font-family: var(--font-display); font-size: 0.71rem; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--fg-mute); font-weight: 600;
  }
  td[data-label=""] { justify-content: flex-start; text-align: left; }
  td[data-label=""]::before { display: none; }
  td:empty { display: none; }
}

@media (max-width: 420px) {
  .site-header .wrap { gap: 0.75rem; }
  .logo { font-size: 1.05rem; }
  .kit-card { padding: 1.1rem 1rem; }
  .badge { font-size: 0.7rem; padding: 0.2rem 0.55rem; }
  .jstep { grid-template-columns: 26px 1fr; gap: 0.8rem; }
  .jdot { width: 26px; height: 26px; font-size: 0.7rem; }
  .jstep::before { left: 12px; top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .btn:hover { transform: none; }
}

/* ---------- admin portal ---------- */

.admin-nav {
  display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap;
  margin-bottom: 2rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line);
}
.admin-nav a {
  font-family: var(--font-display); font-size: 0.86rem; font-weight: 600;
  color: var(--fg-dim); text-decoration: none; padding: 0.4rem 0.75rem; border-radius: var(--r-sm);
}
.admin-nav a:hover { color: var(--fg); background: var(--ink-2); }
.admin-nav a.on { color: var(--fg); background: var(--ink-3); }
.admin-nav .pip {
  display: inline-block; min-width: 1.15rem; padding: 0 0.32rem; margin-left: 0.2rem;
  border-radius: 999px; background: var(--amber); color: var(--ink);
  font-size: 0.72rem; font-weight: 700; text-align: center;
}
.admin-search { display: flex; gap: 0.4rem; margin-left: auto; flex: 1 1 260px; max-width: 420px; }
.admin-search input { padding: 0.45rem 0.7rem; font-size: 0.9rem; }

.filter-bar {
  display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem;
}
.filter-bar input[type=text] { flex: 1 1 220px; padding: 0.5rem 0.8rem; }
.filter-bar select { width: auto; min-width: 150px; padding: 0.5rem 2.4rem 0.5rem 0.8rem; }

.check { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; color: var(--fg-dim); }
.check input { width: auto; }

.sub-head { font-size: 1.35rem; margin: 2.5rem 0 1rem; }

.stack { display: block; }
.thread-row { text-decoration: none; color: inherit; }
.thread-row.awaiting { border-color: color-mix(in srgb, var(--amber) 40%, var(--line)); }
.thread-row .s {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; color: var(--fg-mute);
}
.thread-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* The conversation, with the customer's record beside it — support answers
   faster when the facts are on the same screen as the reply box. */
.thread-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .thread-layout { grid-template-columns: 1fr; } }

.thread-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.thread-actions select { width: auto; min-width: 170px; padding: 0.45rem 2.4rem 0.45rem 0.7rem; font-size: 0.86rem; }

.msg {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.1rem 1.3rem; margin-bottom: 1rem; background: var(--ink-2);
}
.msg.outbound { background: color-mix(in srgb, var(--accent) 7%, var(--ink-2)); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.msg header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.msg .who { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; }
.msg .when { color: var(--fg-mute); font-size: 0.8rem; }
.msg .body { white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; }

.draft-card {
  border: 1px dashed color-mix(in srgb, var(--accent-2) 45%, var(--line-2));
  border-radius: var(--r); padding: 1rem 1.2rem; margin-bottom: 1rem;
  background: color-mix(in srgb, var(--accent-2) 6%, transparent);
}
.draft-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

.reply-form { margin-top: 1.5rem; }
.reply-form textarea { font-family: var(--font-body); line-height: 1.6; }
.reply-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.9rem; }

.thread-side {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.2rem 1.3rem; background: var(--ink-2); position: sticky; top: 1.5rem;
}
.thread-side h3 {
  font-size: 0.74rem; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--fg-mute); font-weight: 600; margin: 0 0 0.8rem;
}
.side-item { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.side-item:last-of-type { border-bottom: 0; }
.side-item .t { font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; }
.side-item .s { font-size: 0.8rem; color: var(--fg-mute); }

.payload {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.2rem; overflow-x: auto; font-family: var(--font-mono);
  font-size: 0.82rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
