/* The home page. style.css stays the site's shared sheet (legal, help, thanks); this sheet is the
   home page's only, loaded after it. Light or dark follows the visitor's device. Classes are
   h- prefixed so the shared sheet's older rules never reach the new sections; the live editor,
   the task demo and the tour panel keep their style.css classes and only take colours from here. */
:root {
  --bg: #f5f8fb;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #eef3f8;
  --line: #dce4ee;
  --text: #0e1520;
  --muted: #46566b;
  --faint: #5f7084;
  --accent: #0b7c8d;
  --lime: #0b7c8d;
  --accent-ink: #ffffff;
  --accent-soft: rgb(13 133 151 / 0.09);
  --glow: rgb(67 200 217 / 0.2);
  --step: #ffffff;
  --step-ink: #1d2a3c;
  --step-line: #d8e1ec;
  --chip: #e3f5f8;
  --chip-ink: #0b6a78;
  --edit: #fff1c2;
  --edit-ink: #6b4b00;
  --edit-line: #f2c94c;
  --rec: #c93b54;
  --ok: #1b7a4f;
  --no: #7d8b9b;
  --shadow: 0 30px 70px rgb(14 21 32 / 0.13), 0 2px 6px rgb(14 21 32 / 0.05);
  --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b121c;
    --bg-2: #0f1925;
    --panel: #132132;
    --panel-2: #192a3e;
    --line: #253a52;
    --text: #eef4fa;
    --muted: #aec0d0;
    --faint: #8ea4b8;
    --accent: #43c8d9;
    --lime: #43c8d9;
    --accent-ink: #062634;
    --accent-soft: rgb(67 200 217 / 0.12);
    --glow: rgb(67 200 217 / 0.22);
    --step: #f7f9fc;
    --step-ink: #1d2a3c;
    --step-line: #d3dce8;
    --rec: #f0697f;
    --ok: #4fd18f;
    --no: #6f8499;
    --shadow: 0 30px 80px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}

body.home { background: var(--bg); color: var(--text); font: 17px/1.6 var(--body); }
.home h1, .home h2, .home h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -0.03em; font-weight: 700; }
.home p { margin: 0; }
.home em { font-style: normal; color: var(--accent); }
.h-wrap { max-width: 1140px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.h-section { padding-block: 84px; }
.h-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.h-head { display: grid; gap: 12px; max-width: 700px; margin-bottom: 38px; }
.home .h-head h2 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.04; }
.h-head p { color: var(--muted); font-size: 19px; }
.h-eyebrow { font: 700 12px/1.2 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.h-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home a:focus-visible, .home button:focus-visible, .home summary:focus-visible, .home input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Buttons */
.h-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 700 16px/1 var(--body); padding: 15px 22px; border-radius: 11px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform 0.15s, background 0.15s; }
.h-btn:hover { transform: translateY(-1px); }
.h-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px var(--glow); }
.h-ghost { border-color: var(--line); color: var(--text); background: var(--panel); }

/* The one-K wordmark: the logo is the K, centred on the line, its foot level with y and p. */
.h-brand { display: inline-flex; align-items: center; font: 700 22px/1 var(--display); letter-spacing: -0.045em; color: var(--text); }
.h-brand img { height: 1.09em; width: auto; margin-right: 0.06em; }
.h-dot { color: var(--accent); }

/* Hero */
.h-hero { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding-block: 44px 84px; scroll-margin-top: 20px; }
@media (max-width: 980px) { .h-hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 26px; } }
.h-hero-copy { display: grid; gap: 22px; align-content: start; }
.home .h-hero h1 { font-size: clamp(42px, 6.2vw, 74px); line-height: 0.98; letter-spacing: -0.05em; }
.h-lede { font-size: 20px; color: var(--muted); max-width: 34ch; }
.h-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.h-reassure { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 14px; color: var(--faint); }
.h-reassure > span::before { content: '✓ '; color: var(--ok); font-weight: 700; }

/* The app, doing the job */
.h-stage { position: relative; min-width: 0; }
.h-stage::before { content: ''; position: absolute; inset: 8% -4% -6% 8%; background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(10px); z-index: 0; pointer-events: none; }
.h-app { position: relative; z-index: 1; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.h-app-top { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.h-dots { display: flex; gap: 6px; }
.h-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.h-title { font-weight: 700; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-state { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; padding: 5px 11px; border-radius: 8px; background: var(--panel-2); color: var(--text); min-width: 112px; flex: none; }
.h-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.h-state[data-kind='rec'] i { background: var(--rec); }
.h-state[data-kind='run'] { background: var(--accent); color: var(--accent-ink); }
.h-state[data-kind='run'] i { background: var(--accent-ink); }
.h-state[data-kind='done'] i { background: var(--ok); }
.h-list { padding: 22px clamp(12px, 3vw, 30px); display: grid; gap: 8px; background: var(--panel-2); min-height: 370px; align-content: start; }
.h-step { background: var(--step); color: var(--step-ink); border: 1px solid var(--step-line); border-radius: 12px; padding: 10px 12px; font-size: 15px; line-height: 1.5; display: flex; gap: 10px; align-items: center; outline: 2px solid transparent; outline-offset: 2px; transition: opacity 0.35s, transform 0.35s, box-shadow 0.3s, outline-color 0.3s; }
.h-step.h-hidden { opacity: 0; transform: translateY(8px); }
.h-step.h-now { outline-color: var(--accent); box-shadow: 0 6px 20px var(--glow); }
.h-step.h-did .h-ico { background: #e3f6ec; color: #1b7a4f; }
.h-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; flex: none; background: #edf1f6; color: #3a4c63; font-weight: 700; }
.h-chip { background: var(--chip); color: var(--chip-ink); border-radius: 6px; padding: 1px 7px; font-weight: 600; transition: background 0.3s; }
.h-chip.h-edit { background: var(--edit); color: var(--edit-ink); box-shadow: 0 0 0 2px var(--edit-line); }
.h-caption { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.h-caption button { background: var(--panel); color: var(--faint); border: 0; border-right: 1px solid var(--line); padding: 12px 10px; text-align: left; cursor: pointer; display: grid; gap: 2px; font: 13px/1.35 var(--body); }
.h-caption button:last-child { border-right: 0; }
.h-caption b { font: 600 15px/1.3 var(--display); color: var(--muted); }
.h-caption button[aria-current='step'] { color: var(--muted); box-shadow: inset 0 3px 0 var(--accent); }
.h-caption button[aria-current='step'] b { color: var(--text); }
.h-toast { position: absolute; z-index: 2; left: 50%; bottom: 84px; translate: -50% 0; white-space: nowrap; background: var(--text); color: var(--bg); padding: 9px 13px; border-radius: 10px; font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; pointer-events: none; }
.h-toast.h-on { opacity: 1; transform: none; }
.h-keys { position: absolute; z-index: 2; right: 18px; top: -20px; display: flex; gap: 6px; align-items: center; color: var(--muted); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.h-keys.h-on { opacity: 1; }
.h-kc { font: 700 13px/1 var(--body); padding: 9px 11px; border-radius: 8px; background: var(--step); color: var(--step-ink); border: 1px solid var(--step-line); box-shadow: 0 4px 0 var(--step-line), 0 10px 24px rgb(0 0 0 / 0.15); transition: transform 0.15s, box-shadow 0.15s; }
.h-keys.h-press .h-kc { transform: translateY(3px); box-shadow: 0 1px 0 var(--step-line); }

/* What people hand over */
.h-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.h-tabs button { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 600 15px/1.2 var(--body); cursor: pointer; }
.h-tabs button[aria-selected='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
.h-case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 34px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 34px); }
.h-case[hidden] { display: none; }
@media (max-width: 860px) { .h-case { grid-template-columns: minmax(0, 1fr); } }
.home .h-case h3 { font-size: 30px; line-height: 1.15; margin-bottom: 10px; }
.h-case p { color: var(--muted); }
.h-saves { margin-top: 18px; display: inline-flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); }
.h-saves b { font: 700 26px/1 var(--display); color: var(--accent); }
.h-saves span { color: var(--muted); font-size: 15px; }
.h-mini { display: grid; gap: 8px; padding: 16px; border-radius: 14px; background: var(--panel-2); min-width: 0; }
.h-mini .h-step { font-size: 14px; }

/* The live editor keeps its markup and behaviour; its surroundings take this page's colours. */
.home .playground-section { padding-block: 84px; position: relative; }
.home .editor-shell { border-color: var(--line); background: var(--panel-2); box-shadow: var(--shadow); }
.home .editor-shell::before { content: none; }
.home .editor-intro { background: var(--panel); color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.home .editor-intro b { color: var(--accent); }
.home .editor-intro a { color: var(--accent); }
.home .under-demo { color: var(--muted); font-size: 14px; }
.home .under-demo > span:first-child { color: var(--faint); }
.home .under-demo .text-link { color: var(--accent); font-size: 14px; }
.home .editor-boundary { color: var(--muted); font-size: 15px; line-height: 1.7; }
.home .browser-coverage { border-color: var(--line); background: var(--panel); color: var(--muted); font-size: 15px; }
.home .browser-coverage summary { color: var(--text); font-size: 15px; }
.home .browser-coverage summary::after { border-color: var(--accent); }
.home .browser-coverage p { color: var(--muted); }
.home .automation-lab { padding-block: 0 84px; }
.home .automation-lab .section-top { margin-bottom: 0; }
.home .automation-lab .section-top h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; }
.home .automation-lab .section-top > p { color: var(--muted); font-size: 16px; }
.home .automation-lab .eyebrow, .home .result-label, .home .lab-form label { color: var(--accent); }
.home .lab-form, .home .lab-result { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }
.home .composer-heading { color: var(--text); border-color: var(--line); }
.home .demo-pill { color: var(--muted); border-color: var(--line); }
.home .lab-form input, .home .lab-form textarea, .home .reply-composer input { background: var(--bg); color: var(--text); border-color: var(--line); }
.home .lab-form textarea::placeholder, .home .lab-form input::placeholder { color: var(--faint); }
.home .lab-form p, .home .lab-result p, .home .reply-composer .composer-note { color: var(--muted); }
.home .lab-result > strong { color: var(--accent); }
.home .lab-tools button, .home .lab-navigation button { color: var(--text); background: var(--panel-2); border-color: var(--line); font-size: 13px; }
.home .lab-tools #reply-save { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.home .lab-navigation > span { color: var(--faint); }
.home .draft-preview { background: var(--accent-soft); border-color: var(--line); }
.home .draft-preview dt, .home .draft-caption { color: var(--faint); }
.home .draft-preview dd, .home .draft-preview #draft-message { color: var(--text); }
.home .tour-panel { background: var(--panel); border-color: var(--accent); color: var(--text); box-shadow: var(--shadow); }
.home .tour-panel p { color: var(--muted); }
.home .tour-control { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.home .tour-dismiss { color: var(--muted); }
.home .guided-tour { border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: var(--accent-ink); padding: 7px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.home .guided-tour:hover { filter: brightness(1.08); }
.home .guided-tour:focus-visible, .home .older-copy button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.home .older-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.home .older-copy[hidden] { display: none; }
.home .older-copy button { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.home .tour-highlight { outline: 2px solid var(--accent); outline-offset: -2px; box-shadow: inset 0 0 80px var(--accent-soft); }
#how-it-works, #features, #targeting, #time-back, #compare, #price, #questions, #download { scroll-margin-top: 20px; }

/* Why it keeps working */
.h-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .h-why { grid-template-columns: minmax(0, 1fr); } }
.h-why article { display: grid; gap: 12px; align-content: start; padding: 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.home .h-why h3 { font-size: 22px; line-height: 1.2; }
.h-why p { color: var(--muted); font-size: 16px; }
.h-vis { padding: 12px; border-radius: 12px; background: var(--panel-2); display: grid; gap: 6px; font-size: 14px; }
.h-vis > div:not(.h-step) { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--panel); color: var(--faint); }
.h-vis > div.h-hit { color: var(--text); outline: 1.5px solid var(--accent); }
.h-vis > div.h-hit b { color: var(--accent); }
.h-vis .h-step { font-size: 14px; padding: 7px 9px; }

/* Time back */
.h-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; align-items: center; padding: clamp(22px, 4vw, 44px); border-radius: 22px; background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--panel); border: 1px solid var(--line); }
@media (max-width: 860px) { .h-calc { grid-template-columns: minmax(0, 1fr); } }
.h-calc .h-head { margin-bottom: 22px; }
.h-calc label { display: grid; gap: 8px; font-weight: 600; margin-bottom: 18px; }
.h-calc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.h-calc-fields label { margin: 0; font-size: 14px; }
.h-calc-fields input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 10px; font: inherit; font-size: 16px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.h-calc-fields input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.h-calc-help { margin-top: 16px; color: var(--muted); font-size: 14px; }
@media (max-width: 520px) { .h-calc-fields { grid-template-columns: minmax(0, 1fr); } }
.h-result { display: grid; gap: 6px; }
.h-result b { font: 700 clamp(28px, 4vw, 52px)/1.1 var(--display); letter-spacing: -0.04em; color: var(--accent); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.h-result span { font-size: 20px; color: var(--muted); }
.h-result small { color: var(--faint); font-size: 14px; }
.h-result dl { display: grid; gap: 16px; margin: 16px 0; }
.h-result dt { color: var(--muted); font-size: 14px; }
.h-result dd { margin: 4px 0 0; font: 600 24px/1.2 var(--display); overflow-wrap: anywhere; }
.h-result[hidden], #calc-error[hidden] { display: none; }

/* How it compares */
.h-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.h-tablewrap table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: 16px; }
.h-tablewrap th, .h-tablewrap td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.h-tablewrap tbody tr:last-child th, .h-tablewrap tbody tr:last-child td { border-bottom: 0; }
.h-tablewrap thead th { font: 600 15px/1.2 var(--display); color: var(--muted); }
.h-tablewrap tbody th { font-weight: 500; }
.h-tablewrap thead th.h-us { color: var(--accent); }
.h-tablewrap td.h-us { background: var(--accent-soft); font-weight: 600; }
.h-y { color: var(--ok); font-weight: 700; }
.h-n { color: var(--no); }

/* Price */
.h-price { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 900px) { .h-price { grid-template-columns: minmax(0, 1fr); } }
.h-plan { padding: 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; position: relative; }
.h-plan.h-pick { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 18px 40px var(--glow); }
.h-flag { position: absolute; top: -12px; left: 22px; background: var(--accent); color: var(--accent-ink); font: 700 12px/1 var(--body); padding: 6px 10px; border-radius: 999px; }
.h-what { font: 700 13px/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.h-amount { font: 700 44px/1 var(--display); letter-spacing: -0.03em; }
.h-amount small { font: 500 16px/1.3 var(--body); color: var(--muted); letter-spacing: 0; }
.h-plan ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 16px; display: grid; gap: 6px; }
.h-plan li::before { content: '✓  '; color: var(--ok); font-weight: 700; }
.h-plan .h-btn { margin-top: 6px; }
.h-after { margin-top: 18px; color: var(--muted); font-size: 16px; }

/* For teams: a plain panel under the plans */
.h-teams { margin-top: 32px; padding: 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.h-teams h3 { margin: 0; font: 700 26px/1.15 var(--display); letter-spacing: -0.02em; }
.h-teams p { margin: 0; color: var(--muted); font-size: 16px; max-width: 70ch; }
.h-teams ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 16px; display: grid; gap: 6px; max-width: 70ch; }
.h-teams li::before { content: '✓  '; color: var(--ok); font-weight: 700; }

/* Questions */
.h-qa { max-width: 780px; }
.h-qa details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.h-qa summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.h-qa summary::-webkit-details-marker { display: none; }
.h-qa summary::after { content: '+'; color: var(--accent); font-weight: 700; }
.h-qa details[open] summary::after { content: '–'; }
.h-qa p { color: var(--muted); padding-top: 10px; }

/* Last call and footer */
.h-last { text-align: center; padding-block: 100px; display: grid; justify-items: center; gap: 20px; border-top: 1px solid var(--line); }
.home .h-last h2 { font-size: clamp(38px, 6.5vw, 72px); line-height: 1; letter-spacing: -0.05em; }
.h-last .h-reassure { justify-content: center; }
.home .h-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-block: 26px 40px; }
.home .h-footer > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-size: 14px; color: var(--faint); }
.home .h-footer a { color: var(--muted); }
.home .h-footer a:hover { color: var(--accent); }
.home .h-footer .h-brand { color: var(--text); font-size: 20px; }

/* Decorative motion pauses with the footer switch, a reduced-motion setting or a hidden tab. */
.motion-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: var(--faint); font: inherit; cursor: pointer; white-space: nowrap; }
.motion-toggle:hover { color: var(--accent); }
.motion-indicator { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.motion-toggle[aria-pressed='true'] .motion-indicator { background: var(--no); }
@media (prefers-reduced-motion: reduce) {
  .h-step, .h-chip, .h-toast, .h-keys, .h-kc, .h-btn { transition: none; }
  .motion-toggle { display: none; }
}
@media (max-width: 560px) {
  .h-section { padding-block: 60px; }
  .h-head p, .h-lede { font-size: 18px; }
  .h-list { min-height: 0; }
  .h-step { font-size: 14px; }
  .h-caption button { padding: 10px 8px; font-size: 12px; }
  .h-caption b { font-size: 14px; }
}
