/* =========================================================
   work5ai landing — styles
   Layout concept: a camera at work. Cool studio-grey paper,
   graphite "camera body" panels, REC red as the only accent,
   corner brackets of a camera frame, monospace for every figure.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Paper & ink (light theme) */
  --paper: #eceef1;
  --surface: #f8f9fb;
  --ink: #13161b;
  --ink-soft: #3f4752;
  --muted: #5b6470;
  --line: #d3d8de;

  /* Accent: REC red */
  --rec: #d92f28;          /* fills: buttons, dots */
  --rec-text: #c22a23;     /* red text on paper */
  --rec-ink: #ffffff;      /* text on red fills */
  --rec-soft: rgba(217, 47, 40, 0.12);

  /* Semantic */
  --ok: #1d7742;
  --on-ok: #ffffff;

  /* Camera body panels — dark in both themes */
  --cam: #171a1f;
  --cam-2: #20242b;
  --cam-3: #2b3038;
  --cam-ink: #eef0f3;
  --cam-muted: #9ba4af;
  --cam-line: #353b45;
  --cam-rec: #ff4a3f;
  --cam-ok: #3cc57a;

  /* Typography */
  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.15rem, 1.05rem + 0.45vw, 1.375rem);
  --fs-xl: clamp(1.65rem, 1.15rem + 2vw, 2.6rem);
  --fs-hero: clamp(1.7rem, 1rem + 2.6vw, 2.9rem);
  --fs-figure: clamp(2.4rem, 1.5rem + 3.6vw, 4.4rem);

  /* Shape & layout */
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --maxw: 1200px;
  --shadow: 0 30px 60px -32px rgba(10, 12, 16, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d0f12;
    --surface: #15181d;
    --ink: #eceff3;
    --ink-soft: #c2c8d0;
    --muted: #8d97a3;
    --line: #272c34;
    --rec: #d92f28;
    --rec-text: #ff6a5f;
    --rec-ink: #ffffff;
    --rec-soft: rgba(255, 74, 63, 0.16);
    --ok: #3cc57a;
    --on-ok: #0d0f12;
    --cam: #1a1d23;
    --cam-2: #22262d;
    --cam-3: #2d323a;
    --cam-line: #3a414b;
    --shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0d0f12;
  --surface: #15181d;
  --ink: #eceff3;
  --ink-soft: #c2c8d0;
  --muted: #8d97a3;
  --line: #272c34;
  --rec: #d92f28;
  --rec-text: #ff6a5f;
  --rec-ink: #ffffff;
  --rec-soft: rgba(255, 74, 63, 0.16);
  --ok: #3cc57a;
  --on-ok: #0d0f12;
  --cam: #1a1d23;
  --cam-2: #22262d;
  --cam-3: #2d323a;
  --cam-line: #3a414b;
  --shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Paints the band above the sticky header on phones with a notch */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--paper);
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: calc(env(safe-area-inset-top, 0px) + 8px);
}

.container {
  width: 100%;
  max-width: calc(var(--maxw) + 80px);
  margin-inline: auto;
  padding-left: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right, 0px));
}

/* ---------- Shared components ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.rec-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 0 4px var(--rec-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn--rec {
  background: var(--rec);
  color: var(--rec-ink);
}

.btn--rec:hover {
  background: color-mix(in srgb, var(--rec) 86%, #000);
}

.btn__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec-ink);
}

.btn--ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--sm {
  min-height: 40px;
  padding: 8px 18px;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.link-arrow {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rec);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.link-arrow:hover {
  color: var(--rec-text);
}

/* Corner brackets of a camera frame, used on framed blocks */
.corner-mark {
  position: absolute;
  width: clamp(14px, 4%, 28px);
  aspect-ratio: 1;
  border: 2px solid currentColor;
  pointer-events: none;
}

.corner-mark--tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.corner-mark--tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.corner-mark--bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.corner-mark--br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

.panel {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel--cam {
  border-color: var(--cam-line);
  background: var(--cam);
  color: var(--cam-ink);
}

.panel__title {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(56px, 8vw, 112px);
  scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

.section--tight-top {
  padding-top: 0;
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section__lead {
  margin: 0;
  max-width: 46ch;
  color: var(--ink-soft);
}

.section__lead a {
  font-weight: 700;
  text-decoration-color: var(--rec);
  text-underline-offset: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--paper); /* fallback for browsers without color-mix() */
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  border-bottom-color: var(--line);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 0 4px var(--rec-soft);
}

.site-nav__list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a:not(.btn) {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:not(.btn):hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.lang-switch__btn {
  min-width: 40px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switch__btn:hover {
  color: var(--ink);
}

.lang-switch__btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: inline-grid;
  place-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.site-header.is-open .nav-toggle__bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.site-header.is-open .nav-toggle__bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

@media (max-width: 1199.98px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding-block: 8px 20px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .site-header.is-open .site-nav {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 2px;
  }

  .site-nav a:not(.btn) {
    padding: 12px;
    font-size: var(--fs-md);
  }

  .site-nav__cta-item {
    margin-top: 12px;
  }

  .site-nav__cta-item .btn {
    width: 100%;
  }
}

@media (max-width: 599.98px) {
  .site-header__cta {
    display: none;
  }
}

@media (min-width: 1200px) {
  .site-nav {
    margin-right: 12px;
  }

  .nav-toggle,
  .site-nav__cta-item {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(28px, 5vw, 72px) clamp(56px, 7vw, 104px);
}

.hero__grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
}

.hero__copy {
  min-width: 0;
}

.hero__title {
  display: flex;
  flex-direction: column;
  gap: 0.22em;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.hero__line {
  display: block;
  text-wrap: balance;
}

.hero__line--soft {
  color: var(--ink-soft);
  font-weight: 500;
}

.hero__line em {
  font-style: normal;
  color: var(--rec-text);
  white-space: nowrap;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 40px);
}

/* Example video (muted loop, started by main.js) */
.hero-media {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
}

.hero-media__video {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--cam);
  box-shadow: var(--shadow);
}

.hero-media__caption {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

/* ---------- Benefits ---------- */
.benefits {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

@media (min-width: 640px) {
  .benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefit--feature {
    grid-column: span 2;
  }
}

@media (min-width: 1080px) {
  .benefits {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .benefit--feature {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.benefit {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--surface);
}

.benefit__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
}

.benefit__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefit__title {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.benefit p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.benefit a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--rec);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.benefit--feature {
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--cam);
  color: var(--cam-ink);
}

.benefit--feature .benefit__top {
  display: grid;
  gap: 8px;
}

.benefit--feature .benefit__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
}

.benefit--feature p {
  color: var(--cam-muted);
  font-size: var(--fs-base);
}

.rates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--cam-line);
}

.rates__item {
  min-width: 0;
  padding: clamp(16px, 2vw, 24px);
  background: var(--cam-2);
}

.rates dt {
  font-family: var(--font-display);
  font-size: var(--fs-figure);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.rates dt small {
  font-size: 0.38em;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: 0.9em;
  margin-right: 0.15em;
}

.rates__item--accent dt {
  color: var(--cam-rec);
}

.rates dd {
  margin: 10px 0 0;
  color: var(--cam-muted);
  font-size: var(--fs-sm);
}

.benefit--feature .benefit__note {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

/* ---------- What to film ---------- */
.directions {
  display: grid;
  gap: 16px;
}

@media (min-width: 820px) {
  .directions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.direction {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.direction__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.direction__title {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.rate-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.rate-badge--accent {
  background: var(--rec);
  color: var(--rec-ink);
}

.task-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.task-list li::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: 0.55em;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}

.direction--commercial .task-list li::before {
  border-color: var(--rec);
  background: var(--rec-soft);
}

.direction__link {
  margin-top: auto;
}

/* ---------- Calculator ---------- */
.calc {
  background: var(--cam);
  color: var(--cam-ink);
  scroll-margin-top: var(--header-h);
}

.calc .section__lead {
  color: var(--cam-muted);
}

.calc__grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .calc__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 32px;
  }
}

.calc__controls {
  display: grid;
  gap: 28px;
  align-content: start;
  min-width: 0;
}

.calc__fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.calc__label {
  display: block;
  margin-bottom: 10px;
  padding: 0;
  color: var(--cam-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--cam-line);
  border-radius: 14px;
  background: var(--cam-2);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--cam-muted);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.segmented label:hover {
  color: var(--cam-ink);
}

.segmented input:checked + label {
  background: var(--cam-ink);
  color: var(--cam);
}

.segmented input:focus-visible + label {
  outline: 2px solid var(--cam-rec);
  outline-offset: 2px;
}

.range-field__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.range-field__value {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.range-field input[type="range"] {
  --fill: 50%;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.range-field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--cam-rec) var(--fill), var(--cam-3) var(--fill));
}

.range-field input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--cam-rec) var(--fill), var(--cam-3) var(--fill));
}

.range-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border: 4px solid var(--cam);
  border-radius: 50%;
  background: var(--cam-ink);
  box-shadow: 0 0 0 1px var(--cam-line);
}

.range-field input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 4px solid var(--cam);
  border-radius: 50%;
  background: var(--cam-ink);
}

.range-field input[type="range"]:focus-visible {
  outline: 2px solid var(--cam-rec);
  outline-offset: 4px;
}

.calc__result {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--cam-line);
  border-radius: var(--radius);
  background: var(--cam-2);
  color: var(--cam-ink);
}

.calc__result .corner-mark {
  color: var(--cam-rec);
}

.calc__result-label {
  margin: 0;
  color: var(--cam-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.calc__total {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-figure);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.calc__rows {
  display: grid;
  margin: 0;
}

.calc__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--cam-line);
}

.calc__row dt {
  min-width: 0;
  color: var(--cam-muted);
  font-size: var(--fs-sm);
}

.calc__row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 28px;
}

.step::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 52px;
  bottom: 4px;
  width: 2px;
  background: var(--line);
}

.step:last-child {
  padding-bottom: 0;
}

.step:last-child::before {
  display: none;
}

.step__num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.step:first-child .step__num {
  border-color: var(--rec);
  background: var(--rec);
  color: var(--rec-ink);
}

.step__text {
  max-width: 60ch;
  margin: 0;
  padding-top: 11px;
  color: var(--ink-soft);
}

.step__text a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--rec);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

@media (min-width: 1080px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
  }

  .step {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 20px;
    padding-bottom: 0;
  }

  .step::before {
    left: 60px;
    right: -16px;
    top: 23px;
    bottom: auto;
    width: auto;
    height: 2px;
  }

  .step__text {
    padding-top: 0;
  }
}

/* ---------- Requirements ---------- */
.req {
  display: grid;
  gap: 16px;
}

@media (min-width: 980px) {
  /* Both columns stretch to the taller one so their bottom edges line up */
  .req {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

.req__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* The last panel on the right absorbs the height difference */
.req__side > .rejects {
  flex: 1 1 auto;
}

.phones__search {
  position: relative;
  margin: 18px 0 10px;
}

.phones__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.phones__search input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px 12px 44px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.phones__search input::placeholder {
  color: var(--muted);
}

.phones__search input:focus {
  border-color: var(--ink);
  outline: none;
}

.phones__result {
  min-height: 1.6em;
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.phones__result.is-ok {
  color: var(--ok);
}

.phones__result.is-no {
  color: var(--rec-text);
}

.phones__group + .phones__group {
  margin-top: 20px;
}

.phones__brand {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.4;
  transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip small {
  color: var(--muted);
  font-size: 0.92em;
}

/* Non-matching chips stay readable (WCAG contrast) but lose their fill */
.phones.is-filtering .chip {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
}

.phones.is-filtering .chip.is-match {
  border-style: solid;
  border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.phones.is-filtering .chip.is-exact {
  border-color: var(--ok);
  background: var(--ok);
  color: var(--on-ok);
}

.phones.is-filtering .chip.is-exact small {
  color: inherit;
}

.specs {
  display: grid;
  margin: 0;
}

.spec {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.spec:first-child {
  padding-top: 0;
  border-top: 0;
}

.spec:last-child {
  padding-bottom: 0;
}

.spec dt {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.spec dd {
  min-width: 0;
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 420px) {
  .spec {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

.rejects__lead {
  margin: 6px 0 16px;
  color: var(--cam-muted);
}

.rejects__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 380px) {
  .rejects__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.reject {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--cam-2);
  font-size: var(--fs-sm);
  line-height: 1.4;
}

.reject__bad,
.reject__good {
  display: grid;
  grid-template-columns: 1.1em minmax(0, 1fr);
  gap: 8px;
}

.reject__bad {
  color: var(--cam-muted);
}

.reject__bad::before {
  content: "✕";
  color: var(--cam-rec);
  font-weight: 700;
}

.reject__good {
  color: var(--cam-ink);
  font-weight: 700;
}

.reject__good::before {
  content: "✓";
  color: var(--cam-ok);
}

/* ---------- Partner program ---------- */
.partners {
  border-top: 1px solid var(--line);
}

.partners__grid {
  display: grid;
  gap: 32px;
}

/* Two columns only from 1200px: the text column must stay wide enough (≈660px+) for the levels image */
@media (min-width: 1200px) {
  .partners__grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 64px;
    align-items: start;
  }

  .partners__panel {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 20px);
  }

  .partners .prose {
    grid-column: 1;
    grid-row: 1;
  }
}

.partners__panel {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius);
  background: var(--cam);
  color: var(--cam-ink);
}

.ref-rate__value {
  margin: 0;
  color: var(--cam-rec);
  font-family: var(--font-display);
  font-size: var(--fs-figure);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.ref-rate__label {
  margin: 10px 0 0;
  color: var(--cam-muted);
  font-size: var(--fs-sm);
}

.ref-example {
  display: grid;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--cam-line);
}

.ref-example__formula {
  margin: 0;
  color: var(--cam-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

.ref-example__result {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ref-example__result span {
  color: var(--cam-muted);
  font-size: 0.75em;
  font-weight: 500;
}

.ref-levels {
  padding-top: 16px;
  border-top: 1px solid var(--cam-line);
}

.ref-levels__label {
  margin: 0 0 10px;
  color: var(--cam-muted);
  font-size: var(--fs-sm);
}

.ref-levels__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ref-levels__list li {
  padding: 6px 10px;
  border: 1px solid var(--cam-line);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.ref-levels__list li:nth-child(2) { border-color: color-mix(in srgb, var(--cam-rec) 35%, var(--cam-line)); }
.ref-levels__list li:nth-child(3) { border-color: color-mix(in srgb, var(--cam-rec) 65%, var(--cam-line)); }
.ref-levels__list li:nth-child(4) { border-color: var(--cam-rec); background: color-mix(in srgb, var(--cam-rec) 18%, transparent); }

/* Text keeps a readable line length; the levels image may use the full column */
.prose {
  min-width: 0;
}

.prose > :not(.levels) {
  max-width: 66ch;
}

.levels {
  margin: 0.4em 0 1.6em;
}

.levels__scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.levels__scroll:focus-visible {
  outline: 2px solid var(--rec);
  outline-offset: 3px;
}

.levels__img {
  display: block;
  width: 100%;
  max-width: none; /* the scroll box, not the page, absorbs the extra width */
  height: auto;
}

/* Below 720px the table text would be too small to read: keep it at 720px and scroll sideways */
@media (max-width: 759.98px) {
  .levels__img {
    width: 720px;
  }
}

.prose p {
  margin: 0 0 1.1em;
  color: var(--ink-soft);
}

.prose .prose__lead {
  color: var(--ink);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.45;
}

.prose strong {
  color: var(--ink);
  font-weight: 800;
}

.prose a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--rec);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.prose h3 {
  margin: 1.8em 0 0.6em;
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ---------- FAQ ---------- */
.faq-layout {
  display: grid;
  gap: 28px;
}

@media (min-width: 980px) {
  .faq-layout {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 64px;
    align-items: start;
  }

  .faq-layout__head {
    position: sticky;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 20px);
  }
}

.faq-layout__head {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.faq {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.faq__item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.faq__item[open] {
  border-color: var(--ink);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary:focus-visible {
  outline-offset: -2px;
  border-radius: 14px;
}

.faq__icon {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq__item[open] .faq__icon {
  transform: rotate(45deg);
  border-color: var(--rec);
  background: var(--rec);
}

.faq__item[open] .faq__icon::before,
.faq__item[open] .faq__icon::after {
  background: var(--rec-ink);
}

.faq__body {
  display: grid;
  gap: 12px;
  padding: 0 20px 20px;
  color: var(--ink-soft);
}

.faq__body p {
  margin: 0;
  max-width: 66ch;
}

.faq__body a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--rec);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Head-mount photo */
.holder {
  margin: 4px 0 0;
}

.holder__img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

/* ---------- Apply ---------- */
.apply {
  padding-top: 0;
}

.apply__frame {
  position: relative;
  display: grid;
  gap: 32px;
  padding: clamp(28px, 6vw, 72px) clamp(20px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--rec);
}

@media (min-width: 900px) {
  .apply__frame {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
  }
}

.apply__copy {
  min-width: 0;
  color: var(--ink);
}

.apply__copy .eyebrow {
  margin-bottom: 14px;
}

.apply__text {
  max-width: 44ch;
  margin: 16px 0 24px;
  color: var(--ink-soft);
}

.apply__links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.form {
  display: grid;
  gap: 16px;
  min-width: 0;
  color: var(--ink);
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: var(--fs-sm);
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s ease;
}

.field input::placeholder {
  color: var(--muted);
}

.field input:focus {
  border-color: var(--ink);
  outline: none;
}

.field input:focus-visible {
  outline: 2px solid var(--rec);
  outline-offset: 2px;
}

.field input[aria-invalid="true"] {
  border-color: var(--rec);
}

.field__hint,
.field__error {
  margin: 0;
  font-size: var(--fs-xs);
}

.field__hint {
  color: var(--muted);
}

.field__error {
  color: var(--rec-text);
  font-weight: 700;
}

/* Bot trap: clipped to nothing, never shown */
.form__extra {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Turnstile widget (flexible width, 65px tall) */
.form__captcha {
  min-height: 65px;
}

.form__submit {
  width: 100%;
  min-height: 56px;
  margin-top: 4px;
  font-size: var(--fs-md);
}

.form__status {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.form__status--ok {
  border-color: var(--ok);
  color: var(--ok);
}

.form__status--error,
.form__status--warn {
  border-color: var(--rec);
  color: var(--rec-text);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 32px 40px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}

.site-footer__brand {
  display: grid;
  gap: 6px;
}

.site-footer__tagline,
.site-footer__copy {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.site-footer__copy {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rec);
  text-underline-offset: 4px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
