/* Wi-Fi Studio public site: one stylesheet for every page.
   Draft only. See DESIGN.md for the rules behind these values. */

/* Type: Host Grotesk, self-hosted variable font (one file per subset). */
@font-face {
  font-family: "Host Grotesk";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/host-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Host Grotesk";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/host-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  /* Ground and surfaces: exact live charcoal, not near-black */
  --bg: #1D2125;            /* --tw-charcoal */
  --surface-1: #23282D;     /* --ink2 */
  --surface-2: #262B30;     /* --tw-charcoal-2 */
  --surface-3: #2E3439;     /* --tw-charcoal-3 */
  --line: #3A4248;
  --line-strong: #4A535A;

  /* Text, retuned for charcoal grounds (AA on #2E3439 and #1D2125) */
  --text: #F1F3F4;          /* 14.6:1 on --bg */
  --text-2: #B8BDC2;        /* 8.6:1 on --bg, 6.7:1 on --surface-3 */
  --text-3: #9AA0A6;        /* 6.1:1 on --bg, 4.8:1 on --surface-3 */

  /* Exact live brand green and its live companion tokens only */
  --green: #47A343;         /* --tw-green / --w2g, primary buttons and marks */
  --green-hover: #5EC059;   /* --tw-green-hover */
  --green-light: #70C76B;   /* --tw-green-light, links and accents on dark */
  --green-press: color-mix(in srgb, var(--green) 88%, var(--bg));
  --green-ink: #1D2125;     /* charcoal text on brand green, as live */
  --green-wash: rgba(71, 163, 67, 0.12);
  --green-line: rgba(71, 163, 67, 0.45);

  /* Status, used only inside forms */
  --error: #ff8f80;

  /* Type */
  --font: "Host Grotesk", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-display: clamp(2.5rem, 1.35rem + 4.2vw, 4.75rem);   /* 40 to 76px */
  --fs-h1: clamp(2.125rem, 1.5rem + 2.4vw, 3.25rem);       /* 34 to 52px */
  --fs-h2: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);         /* 28 to 40px */
  --fs-h3: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);      /* 22 to 26px */
  --fs-lead: clamp(1.125rem, 1.03rem + 0.4vw, 1.3125rem);  /* 18 to 21px */
  --fs-body: 1.0625rem;  /* 17px */
  --fs-small: 0.9375rem; /* 15px */
  --fs-help: 0.875rem;   /* 14px, the floor */

  /* Spacing: 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 18px;

  --shadow-frame: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 12px 20px -12px rgba(0, 0, 0, 0.7);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --page: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --rail: clamp(0px, 8vw, 120px); /* off-centre registration rail on wide screens */
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green-light); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--green-hover); }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
strong { font-weight: 650; color: var(--text); }
code, kbd, samp { font-family: var(--mono); font-size: 0.9em; overflow-wrap: anywhere; word-break: break-word; }
time, .num { font-variant-numeric: tabular-nums; }

::selection { background: var(--green); color: var(--green-ink); }
* { caret-color: var(--green); }
html { scrollbar-color: var(--line-strong) var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--green); color: var(--green-ink); padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-s); font-weight: 600; text-decoration: none;
}
.skip-link:focus, .skip-link:hover { top: var(--s-3); color: var(--green-ink); }
input, button, select, textarea { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: -0.005em; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: var(--green-ink); }
.btn-primary:hover { background: var(--green-hover); color: var(--green-ink); }
.btn-primary:active { background: var(--green-press); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--text-3); color: var(--text); background: rgba(238, 241, 236, 0.04); }
.btn-small { min-height: 44px; padding: 0 var(--s-4); font-size: 0.9375rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-weight: 600; text-decoration: none; color: var(--green-light);
}
.text-link:hover { text-decoration: underline; }
.text-link svg { width: 16px; height: 16px; flex: none; transition: transform 160ms var(--ease-out); }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(29, 33, 37, 0.92);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; gap: var(--s-6);
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.brand img { height: 34px; width: auto; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; }
.primary-nav { display: flex; align-items: center; flex: 1; gap: var(--s-6); }
.primary-nav ul { display: flex; gap: var(--s-1); margin: 0; padding: 0; list-style: none; }
.primary-nav ul a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3);
  color: var(--text-2); font-size: var(--fs-small); font-weight: 500; text-decoration: none;
  border-radius: var(--radius-s);
}
.primary-nav ul a:hover { color: var(--text); }
.primary-nav ul a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
.nav-actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.nav-actions .signin {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3);
  color: var(--text-2); font-size: var(--fs-small); font-weight: 500; text-decoration: none;
}
.nav-actions .signin:hover { color: var(--text); }

@media (max-width: 960px) {
  .site-header .bar { gap: var(--s-4); }
  .nav-toggle-label {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-left: auto; margin-right: -10px;
    border-radius: var(--radius-s); color: var(--text); cursor: pointer;
  }
  .nav-toggle-label svg { width: 22px; height: 22px; }
  .nav-toggle-label .icon-close { display: none; }
  .nav-toggle:checked ~ .nav-toggle-label .icon-open { display: none; }
  .nav-toggle:checked ~ .nav-toggle-label .icon-close { display: block; }
  .nav-toggle:focus-visible ~ .nav-toggle-label { outline: 2px solid var(--green); outline-offset: 2px; }

  .primary-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: var(--s-5);
    padding: var(--s-4) var(--gutter) var(--s-6);
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -12px rgba(0, 0, 0, 0.6);
  }
  .nav-toggle:checked ~ .primary-nav { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav ul a {
    min-height: 52px; padding: 0; font-size: 1.125rem; color: var(--text);
    border-bottom: 1px solid var(--line); border-radius: 0; width: 100%;
  }
  .primary-nav ul a[aria-current="page"] { box-shadow: none; color: var(--green); }
  .nav-actions { margin-left: 0; flex-direction: column-reverse; align-items: stretch; gap: var(--s-3); }
  .nav-actions .btn { width: 100%; }
  .nav-actions .signin { justify-content: center; border: 1px solid var(--line-strong); border-radius: 999px; min-height: 48px; color: var(--text); }
}

/* ---------- Home: hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 104px); }
.hero-copy { padding-left: var(--rail); max-width: calc(var(--rail) + 900px); }
.hero h1 { font-size: var(--fs-display); letter-spacing: -0.035em; line-height: 1.02; font-weight: 680; max-width: 15ch; }
.hero .lead { margin-top: var(--s-5); font-size: var(--fs-lead); line-height: 1.5; color: var(--text-2); max-width: 40ch; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.support { margin-top: var(--s-4); font-size: var(--fs-small); color: var(--text-3); }

.proof { margin-top: clamp(48px, 6vw, 80px); }
.frame {
  position: relative; margin: 0;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-frame);
}
.frame img { width: 100%; }
.proof .frame { border-radius: var(--radius-l); }
.caption {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-6);
  margin-top: var(--s-4); padding-left: var(--rail);
  font-size: var(--fs-small); color: var(--text-3);
}
.caption p { max-width: 62ch; }
.caption strong { color: var(--text-2); font-weight: 600; }
.caption .text-link { min-height: 0; }

@media (prefers-reduced-motion: no-preference) {
  .proof .frame { animation: rise 1100ms var(--ease-out) 150ms both; }
  @keyframes rise {
    from { transform: translateY(28px) scale(0.985); opacity: 0.35; filter: blur(4px); }
    to { transform: none; opacity: 1; filter: none; }
  }
}

/* ---------- Home: product rows with sticky index ---------- */
.products {
  display: grid; grid-template-columns: var(--rail) 1fr; column-gap: 0;
  margin-top: clamp(96px, 10vw, 152px);
  timeline-scope: --t-design, --t-survey, --t-assure, --t-inspect;
}
.product-index { position: relative; }
.product-index ol {
  position: sticky; top: calc(var(--header-h) + 48px);
  margin: 0; padding: 0; list-style: none;
  border-left: 1px solid var(--line-strong);
}
.product-index a {
  position: relative; display: flex; align-items: center; min-height: 44px; padding-left: var(--s-4);
  color: var(--text-3); font-size: var(--fs-small); font-weight: 500; text-decoration: none;
}
.product-index a::before {
  content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 1px;
  background: var(--line-strong);
}
.product-index a:hover { color: var(--text); }
.product-rows { display: grid; gap: clamp(88px, 9vw, 136px); }

.row {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.row:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.row:nth-child(even) .row-media { order: 2; }
.row h2 { font-size: var(--fs-h2); letter-spacing: -0.028em; }
.row h2 .status { display: block; margin-top: var(--s-2); font-size: var(--fs-small); font-weight: 500; letter-spacing: 0; color: var(--text-3); }
.row .row-text p { margin-top: var(--s-4); color: var(--text-2); font-size: 1.0625rem; max-width: 42ch; }
.row .row-text p:first-of-type { margin-top: var(--s-5); }
.row .text-link { margin-top: var(--s-3); }
.row-media .frame { aspect-ratio: 16 / 10; }
.row-media .frame img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.row-media .frame.fit img { object-fit: contain; background: var(--surface-1); padding: 0; }

#design { view-timeline: --t-design block; }
#survey { view-timeline: --t-survey block; }
#assure { view-timeline: --t-assure block; }
#inspect-row { view-timeline: --t-inspect block; }

@supports (animation-timeline: view()) {
  .product-index a { animation: index-mark linear both; animation-range: contain 0% contain 100%; }
  .product-index a::before { animation: index-line linear both; animation-range: contain 0% contain 100%; }
  .product-index li:nth-child(1) a, .product-index li:nth-child(1) a::before { animation-timeline: --t-design; animation-range: cover 35% cover 65%; }
  .product-index li:nth-child(2) a, .product-index li:nth-child(2) a::before { animation-timeline: --t-survey; animation-range: cover 35% cover 65%; }
  .product-index li:nth-child(3) a, .product-index li:nth-child(3) a::before { animation-timeline: --t-assure; animation-range: cover 35% cover 65%; }
  .product-index li:nth-child(4) a, .product-index li:nth-child(4) a::before { animation-timeline: --t-inspect; animation-range: cover 35% cover 65%; }
  @keyframes index-mark { 0%, 100% { color: var(--text-3); } 1%, 99% { color: var(--text); } }
  @keyframes index-line { 0%, 100% { background: var(--line-strong); width: 1px; } 1%, 99% { background: var(--green); width: 2px; } }
}

/* ---------- Home: close ---------- */
.close {
  margin-top: clamp(112px, 11vw, 168px);
  padding-block: clamp(56px, 6vw, 88px);
  border-top: 1px solid var(--line);
}
.close-inner { padding-left: var(--rail); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-7); align-items: end; }
.close h2 { font-size: var(--fs-h1); letter-spacing: -0.03em; }
.close p { margin-top: var(--s-4); color: var(--text-2); max-width: 46ch; }
.close .actions { margin-top: 0; justify-content: flex-end; }

/* ---------- Page heads (inner pages) ---------- */
.page-head { padding-top: clamp(48px, 6vw, 96px); padding-bottom: clamp(32px, 4vw, 56px); }
.page-head h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; max-width: 20ch; }
.page-head .lead { margin-top: var(--s-4); font-size: var(--fs-lead); color: var(--text-2); max-width: 52ch; line-height: 1.5; }
.page-head .meta { margin-top: var(--s-4); font-size: var(--fs-small); color: var(--text-3); }

/* ---------- Inspect ---------- */
.inspect-hero { padding-top: clamp(48px, 7vw, 104px); }
.inspect-hero .hero-copy h1 { font-size: var(--fs-display); letter-spacing: -0.035em; line-height: 1.02; font-weight: 680; max-width: 14ch; }
.inspect-hero .lead { margin-top: var(--s-5); font-size: var(--fs-lead); color: var(--text-2); max-width: 46ch; line-height: 1.5; }

.split {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-left: var(--rail);
}
.split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.flip > :first-child { order: 2; }
.section { margin-top: clamp(96px, 10vw, 144px); }
.section h2 { font-size: var(--fs-h2); letter-spacing: -0.028em; }
.section .body > p { margin-top: var(--s-4); color: var(--text-2); max-width: 46ch; }
.section .body > h2 + p { margin-top: var(--s-5); }
.section-head { padding-left: var(--rail); max-width: calc(var(--rail) + 720px); }
.section-head p { margin-top: var(--s-4); color: var(--text-2); }

.list-plain { margin: var(--s-5) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); max-width: 46ch; }
.list-plain li { padding: 10px 0 10px 28px; border-bottom: 1px solid var(--line); color: var(--text-2); position: relative; font-size: 1rem; }
.list-plain li svg { position: absolute; left: 0; top: 14px; width: 16px; height: 16px; color: var(--green); }
.note { margin-top: var(--s-4); font-size: var(--fs-help); color: var(--text-3); max-width: 52ch; }

/* Feature table */
.table-wrap { margin-top: var(--s-6); margin-left: var(--rail); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface-1); }
.features { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.features th, .features td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.features thead th { background: var(--surface-2); font-weight: 600; color: var(--text); vertical-align: bottom; }
.features thead th small { display: block; font-weight: 400; color: var(--text-3); font-size: var(--fs-help); margin-top: 2px; }
.features td { text-align: center; color: var(--text-2); }
.features tbody th { font-weight: 500; color: var(--text); width: 34%; }
.features tr.group th { background: var(--bg); color: var(--text-3); font-weight: 600; font-size: var(--fs-help); padding-top: 18px; padding-bottom: 8px; }
.features tbody tr:last-child th, .features tbody tr:last-child td { border-bottom: 0; }
.features .yes svg { width: 18px; height: 18px; color: var(--green); display: inline-block; vertical-align: middle; }
.features .no { color: var(--text-3); }
.features .short { display: none; }

@media (max-width: 640px) {
  .table-wrap { margin-left: 0; margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; }
  .features { font-size: var(--fs-help); }
  .features th, .features td { padding: 10px 8px; }
  .features tbody th { padding-left: var(--gutter); width: 40%; }
  .features thead th:first-child, .features tr.group th { padding-left: var(--gutter); }
  .features td:last-child, .features thead th:last-child { padding-right: var(--gutter); }
  .features .long { display: none; }
  .features .short { display: inline; }
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  padding: clamp(24px, 4vw, 40px);
}
.form-card h2 { font-size: var(--fs-h3); letter-spacing: -0.02em; }
.form-card > p { margin-top: var(--s-2); color: var(--text-2); font-size: 1rem; }
.field { margin-top: var(--s-5); }
.field label, .fieldset legend { display: block; font-size: 1rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.field label .opt { font-weight: 400; color: var(--text-3); }
.field input[type="text"], .field input[type="email"] {
  display: block; width: 100%; min-height: 48px; margin-top: var(--s-2); padding: 0 14px;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.field input::placeholder { color: var(--text-3); }
.field input:hover { border-color: var(--text-3); }
.field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-wash); }
.field input:user-invalid { border-color: var(--error); }
.help { display: block; margin-top: var(--s-2); font-size: var(--fs-help); line-height: 1.5; color: var(--text-3); }
.fieldset { margin: var(--s-5) 0 0; padding: 0; border: 0; }
.choices { display: grid; gap: var(--s-2); margin-top: var(--s-2); }
.check {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 48px; padding: 10px 14px; width: 100%;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  font-size: 1rem; line-height: 1.4; color: var(--text); cursor: pointer;
  transition: border-color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}
.check:hover { border-color: var(--text-3); }
.check input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0;
  width: 20px; height: 20px; border-radius: 5px;
  border: 1.5px solid var(--text-3); background: transparent;
  display: grid; place-content: center; cursor: pointer;
}
.check input::after {
  content: ""; width: 11px; height: 6px; margin-top: -2px;
  border-left: 2px solid var(--green-ink); border-bottom: 2px solid var(--green-ink);
  transform: rotate(-45deg) scale(0); transition: transform 120ms var(--ease-out);
}
.check input:checked { background: var(--green); border-color: var(--green); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check:has(input:checked) { border-color: var(--green-line); background: var(--green-wash); }
.check:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.check.plain { background: transparent; border-color: transparent; padding-inline: 0; }
.check.plain:has(input:checked) { background: transparent; border-color: transparent; }
.form-card .btn-block { margin-top: var(--s-6); }
.form-foot { margin-top: var(--s-4); font-size: var(--fs-help); color: var(--text-3); line-height: 1.5; }
.form-foot + .form-foot { margin-top: var(--s-2); }
.callout {
  margin-top: var(--s-5); padding: 14px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--surface-2); font-size: var(--fs-help); color: var(--text-2); line-height: 1.5;
}

/* Inspect download section */
.download { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-left: var(--rail); }
.download .body p { margin-top: var(--s-4); color: var(--text-2); max-width: 44ch; }
.download .body h2 + p { margin-top: var(--s-5); }

/* ---------- Beta apply ---------- */
.apply { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; padding-top: clamp(48px, 6vw, 96px); padding-left: var(--rail); }
.apply h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; max-width: 14ch; }
.apply .lead { margin-top: var(--s-5); font-size: var(--fs-lead); color: var(--text-2); max-width: 40ch; line-height: 1.5; }
.steps { margin: var(--s-6) 0 0; padding: 0; list-style: none; max-width: 44ch; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.steps svg { width: 18px; height: 18px; margin-top: 4px; color: var(--green); }
.apply .frame { margin-top: var(--s-7); }
.apply .form-card { position: sticky; top: calc(var(--header-h) + 24px); }

/* ---------- Sign-in ---------- */
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.auth-top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.auth-top a.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); font-size: var(--fs-small); text-decoration: none; }
.auth-top a.back:hover { color: var(--text); }
.auth-main { display: grid; place-items: center; padding: var(--s-7) var(--gutter); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: clamp(1.875rem, 1.5rem + 1.2vw, 2.375rem); letter-spacing: -0.03em; }
.auth-card .lead { margin-top: var(--s-3); color: var(--text-2); }
.auth-card .form-card { margin-top: var(--s-6); }
.auth-card .form-card .btn-block { margin-top: var(--s-5); }
.divider { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-5); font-size: var(--fs-help); color: var(--text-3); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.auth-links { margin-top: var(--s-5); font-size: var(--fs-small); color: var(--text-3); text-align: center; }
.auth-foot { align-items: center; padding-block: var(--s-5); font-size: var(--fs-help); color: var(--text-3); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); justify-content: center; }
.auth-foot a { color: var(--text-3); display: inline-flex; align-items: center; min-height: 44px; }
.auth-foot a:hover { color: var(--text); }

/* ---------- Reading pages: legal and What's new ---------- */
.reading { padding-left: var(--rail); }
.prose { max-width: 68ch; font-size: 1.0625rem; line-height: 1.7; color: var(--text-2); }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 2.6em; margin-bottom: 0; font-size: 1.5rem; line-height: 1.25; color: var(--text); letter-spacing: -0.02em; }
.prose h3 { margin-top: 2.2em; margin-bottom: 0; font-size: 1.1875rem; line-height: 1.3; color: var(--text); letter-spacing: -0.01em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.75em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--text-3); }
.prose strong { color: var(--text); }
.prose a { overflow-wrap: anywhere; }
.prose .summary { padding: var(--s-5); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-1); }
.prose .summary ul { margin: 0; }
.legal-meta { font-size: var(--fs-small); color: var(--text-3); }
.toc { margin-top: var(--s-6); padding: var(--s-5) 0; border-block: 1px solid var(--line); max-width: 68ch; }
.toc p { font-size: var(--fs-small); color: var(--text-3); }
.toc ol { margin: var(--s-3) 0 0; padding: 0; list-style: none; columns: 2; column-gap: var(--s-6); }
.toc a { display: inline-flex; align-items: center; min-height: 36px; color: var(--text-2); font-size: var(--fs-small); text-decoration: none; }
.toc a:hover { color: var(--green); }
.pref-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.pref-table th, .pref-table td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.pref-table td { color: var(--text-3); text-align: right; }

/* What's new */
.changelog { list-style: none; margin: 0; padding: 0; max-width: 68ch; }
.entry { padding-block: var(--s-7); border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; padding-top: 0; }
.entry-meta { font-size: var(--fs-small); color: var(--text-3); }
.entry-meta time { color: var(--text-2); font-weight: 500; }
.entry h2 { font-size: var(--fs-h3); letter-spacing: -0.02em; }
.entry .entry-meta { margin-top: var(--s-2); }
@media (min-width: 1024px) {
  .changelog { max-width: calc(11rem + var(--s-6) + 68ch); }
  .entry { display: grid; grid-template-columns: 11rem minmax(0, 68ch); column-gap: var(--s-6); }
  .entry .entry-meta { grid-column: 1; grid-row: 1 / span 2; margin-top: 0.3em; }
  .entry .entry-meta time, .entry .entry-product { display: block; }
  .entry .entry-meta .sep { display: none; }
  .entry h2, .entry .prose { grid-column: 2; }
  .entry h2 { grid-row: 1; }
  .entry .prose { grid-row: 2; }
}
.entry .prose { margin-top: var(--s-4); }
.entry .prose h3 { margin-top: 1.6em; font-size: 1.0625rem; }
.entry .prose ul { padding-left: 1.1em; }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(96px, 10vw, 144px); border-top: 1px solid var(--line); background: var(--bg); }

.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--s-6); padding-block: var(--s-8) var(--s-7); }
.footer-brand img { height: 30px; width: auto; }
.footer-brand p { margin-top: var(--s-4); font-size: var(--fs-small); color: var(--text-3); max-width: 30ch; }
.footer-col h2 { font-size: var(--fs-small); font-weight: 600; letter-spacing: 0; color: var(--text); }
.footer-col ul { margin: var(--s-3) 0 0; padding: 0; list-style: none; }
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-3); font-size: var(--fs-small); text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-6); padding-block: var(--s-5); border-top: 1px solid var(--line); font-size: var(--fs-help); color: var(--text-3); }
.company-slot { min-height: 22px; flex-basis: 100%; }

/* ---------- Cookie bar ---------- */
.cookie-dismiss { position: absolute; opacity: 0; pointer-events: none; }
.cookie-bar {
  position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(calc(100% - 32px), 1200px);
  display: flex; align-items: center; gap: var(--s-5);
  padding: 10px 10px 10px 20px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.35);
  font-size: var(--fs-small); color: var(--text-2);
}
.cookie-bar p { flex: 1; min-width: 0; }
@media (min-width: 1180px) { .cookie-bar p { white-space: nowrap; } }
.cookie-bar .cookie-links { display: inline; margin-left: var(--s-2); white-space: nowrap; }
.cookie-bar .cookie-links a { color: var(--text-2); }
.cookie-bar .cookie-links a:hover { color: var(--text); }
.cookie-bar .cookie-actions { display: flex; align-items: center; gap: var(--s-2); flex: none; }
.cookie-bar .pref { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3); color: var(--text); font-weight: 500; }
.cookie-bar .btn { min-width: 96px; min-height: 44px; border-color: var(--line-strong); background: var(--surface-3); color: var(--text); }
.cookie-bar .btn:hover { background: var(--line-strong); border-color: var(--text-3); }
.cookie-dismiss:checked ~ .cookie-bar { display: none; }
.cookie-dismiss:focus-visible ~ .cookie-bar .btn { outline: 2px solid var(--green); outline-offset: 2px; }

@media (max-width: 760px) {
  .cookie-bar {
    left: 8px; right: 8px; bottom: 8px; transform: none; width: auto;
    flex-direction: column; align-items: stretch; gap: var(--s-2);
    padding: 12px 12px 10px; font-size: var(--fs-help); line-height: 1.45;
  }
  .cookie-bar .cookie-links { margin-left: 4px; }
  .cookie-bar .cookie-actions { display: grid; grid-template-columns: 1fr 1fr auto; }
  .cookie-bar .btn { min-width: 0; width: 100%; }
}

/* ---------- Responsive layout ---------- */
@media (max-width: 1100px) {
  :root { --rail: 0px; }
  .products { grid-template-columns: 1fr; }
  .product-index { display: none; }
}
@media (max-width: 860px) {
  .row, .row:nth-child(even), .split, .split.flip, .download, .apply, .close-inner { grid-template-columns: 1fr; }
  .row:nth-child(even) .row-media, .split.flip > :first-child { order: 0; }
  .row-media { order: 0; }
  .close .actions { justify-content: flex-start; }
  .apply .form-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .toc ol { columns: 1; }
}
@media (max-width: 520px) {
  :root { --header-h: 64px; }
  .brand img { height: 30px; }
  .hero h1 { font-size: 2.5rem; }
  .hero .lead { font-size: 1.0625rem; margin-top: var(--s-4); }
  .actions { margin-top: var(--s-5); flex-direction: column; align-items: stretch; gap: var(--s-2); }
  .actions .btn { width: 100%; }
  .support { margin-top: var(--s-3); font-size: var(--fs-help); }
  .proof .frame { border-radius: var(--radius); }
  .row-media .frame { aspect-ratio: auto; }
  .row-media .frame img { height: auto; object-fit: initial; }
  .caption { padding-left: 0; }
  .footer-grid { gap: var(--s-5); padding-block: var(--s-7) var(--s-5); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .cookie-bar, .site-footer, .product-index { display: none !important; }
  body { background: #fff; color: #000; }
  .prose { color: #000; }
}

/* Additions */
.site-footer.no-top { margin-top: 0; }
.prose pre {
  margin-top: 1em; padding: 14px 16px; border-radius: var(--radius-s);
  background: var(--surface-1); border: 1px solid var(--line-strong);
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
  font-size: 0.9375rem; line-height: 1.55; color: var(--text);
}
.prose pre code { font-size: inherit; }
.prose li code { color: var(--text); font-size: 0.875em; }
.prose .h4 { margin-top: 2em; font-size: 1.0625rem; }
.row-media .frame.stack { aspect-ratio: auto; display: grid; }
.row-media .frame.stack img { height: auto; object-fit: initial; }
.row-media .frame.stack img + img { border-top: 1px solid var(--line-strong); }
.nw { white-space: nowrap; }
.features thead th:not(:first-child) { width: 22%; }
.field .check { display: flex; font-weight: 400; }
.prose ul { list-style: disc; }
.changelog .prose ul { list-style: disc; }
.form-card { color: var(--text); }
.form-card h2 { color: var(--text); }
.prose .summary, .prose .summary li { color: var(--text-2); }
.features caption { color: var(--text); }
@media (max-width: 640px) {
  .features { table-layout: fixed; }
  .features thead th:first-child { width: 30%; }
  .features thead th:not(:first-child) { width: 23.33%; }
  .features td { overflow-wrap: normal; }
  .features th, .features td { padding-inline: 8px; }
  .features tbody th { width: 30%; }
}
.features .nw { white-space: normal; }
