/* Rubik MD landing — Figma cartesia + second-pass visual/human polish */
:root {
  --ink: #1a1a1a;
  --ink-deep: #161616;
  --soft: #2e2e2e;
  --muted: #5c5752;
  --hair: #e0e0e0;
  --hair-soft: #ebebeb;
  --ground: #ffffff;
  --pane: #f7f7f5;
  --cream: #f5f1eb;
  --cta-dark: #2a2523;
  --high-bg: #fee2e2;
  --high-text: #991b1b;
  --mod-bg: #fef9c3;
  --mod-text: #92400e;
  --ok-bg: #dcfce7;
  --ok-text: #166534;
  --accent: #1a1a1a;
  --font: "Inter", system-ui, sans-serif;
  --display: "Source Serif Pro", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 80px;
  --topbar-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --hero-art-vh: 48dvh;
  --hero-art-max: 400px;
  --hero-art-min: 300px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + var(--safe-top));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  margin: 0;
  overflow-x: clip;
}
body {
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.nav-open,
body.demo-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}
body.nav-open .nav {
  touch-action: pan-y;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
img { max-width: 100%; display: block; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  z-index: 100;
  font: 600 13px var(--font);
}
.skip:focus,
.skip:focus-visible {
  left: max(12px, var(--safe-left));
  top: calc(12px + var(--safe-top));
}

.frame {
  width: 100%;
  background: var(--ground);
}

/* —— Nav (Figma: 56px, ink rule, 4 links) —— */
.topbar {
  min-height: calc(var(--topbar-h) + var(--safe-top));
  height: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: var(--safe-top) 32px 0;
  border-bottom: 1px solid var(--ink);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0;
  flex: none;
}
.brand-logo {
  display: block;
  height: 28px;
  width: auto;
  flex: none;
}
.mark {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  display: block;
  object-fit: contain;
  flex: none;
}
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}
.nav-item {
  display: inline-flex;
  align-items: center;
  font: 600 11px/1 var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: left;
  transition: color 160ms var(--ease);
}
.nav-item:hover { color: var(--ink); }
.nav-item-mobile-only { display: none; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.nav-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 -6px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  flex: none;
}
.nav-menu-bars,
.nav-menu-bars::before,
.nav-menu-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}
.nav-menu-bars {
  position: relative;
}
.nav-menu-bars::before,
.nav-menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-menu-bars::before { top: -6px; }
.nav-menu-bars::after { top: 6px; }
body.nav-open .nav-menu-bars {
  background: transparent;
}
body.nav-open .nav-menu-bars::before {
  top: 0;
  transform: rotate(45deg);
}
body.nav-open .nav-menu-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 20px;
  border-radius: 0;
  font: 600 12px/1 var(--font);
  border: 1px solid transparent;
  transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
  white-space: nowrap;
}
.btn-solid {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn-solid:hover { background: #000; }
.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-lg { height: 40px; padding: 0 20px; font-size: 12px; }
.btn-on-dark {
  background: #fff;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-on-dark:hover { background: var(--cream); }
/* Hero art CTAs: Figma white fill + ink border (readable on dither) */
.btn-solid-on-dark {
  background: #fff;
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: none;
}
.btn-solid-on-dark:hover { background: var(--cream); }
.btn-ghost-on-dark {
  background: #fff;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost-on-dark:hover { background: var(--cream); }

/* —— Hero: production composition with current local content —— */
.hero {
  display: grid;
  grid-template-columns: minmax(300px, 560px) minmax(0, 1fr);
  height: 720px;
  max-height: min(720px, calc(100dvh - var(--topbar-h) - var(--safe-top)));
  border-bottom: 1px solid var(--ink);
}
@supports not (height: 100dvh) {
  .hero { max-height: min(720px, calc(100vh - var(--topbar-h))); }
}
.hero-copy {
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  background: #fff;
  min-height: 0;
}
.hero-copy-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  max-width: none;
  padding-top: 8px;
}
.eyebrow {
  margin: 0 0 32px;
  font: 700 12px/1.35 var(--font);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero h1 {
  margin: 0;
  font: 400 clamp(2.75rem, 4.2vw, 3.875rem)/1.03 var(--display);
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: none;
}
.lead {
  margin: 28px 0 0;
  font: 400 13px/1.65 var(--font);
  color: var(--ink);
  max-width: 28rem;
}
.hero-badges {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-badges li {
  font: 500 13px/1.4 var(--font);
  color: var(--soft);
}
.hero-badges strong {
  color: var(--ink);
  font-weight: 700;
}
.hero-proof {
  flex: none;
  padding-top: 0;
  padding-bottom: 0;
}
.proof-label {
  margin: 0 0 10px;
  font: 600 9px/1 var(--font);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
}
.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font: 700 11px/1.35 var(--font);
  color: var(--ink);
  opacity: 0.7;
}
.proof-row span {
  white-space: nowrap;
}

.hero-art {
  position: relative;
  min-height: 0;
  height: 100%;
  background: #1a1a1a;
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  opacity: 1;
  filter: none;
}
.hero-art-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.02) 40%, rgba(0, 0, 0, 0.35) 100%);
}
.hero-art-credit {
  position: absolute;
  left: 32px;
  bottom: 32px;
  z-index: 2;
  max-width: 190px;
  color: #fff;
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.72);
}
.hero-art-credit-title {
  margin: 0;
  font: 400 13px/1.18 var(--display);
  letter-spacing: -0.01em;
}
.hero-art-credit-meta {
  margin: 4px 0 0;
  font: 500 9px/1.3 var(--font);
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.02em;
}
.hero-art-actions {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  max-width: calc(100% - 48px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-art img { filter: none; }
}

/* —— Stats (Figma 81:1108): section pad 56px so column rules never touch horizontals —— */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  padding: 56px var(--gutter);
  border-bottom: 1px solid var(--ink);
  background: #fff;
}
.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 0 40px;
  border-right: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.stats-4 .stat { padding: 0 28px; }
.stat:first-child { padding-left: 0; }
.stat:last-child {
  border-right: 0;
  padding-right: 0;
}
.stat strong {
  display: block;
  font: 400 52px/1.05 var(--display);
  letter-spacing: -0.01em;
  margin: 0;
  white-space: nowrap;
}
/* Keep sourced figures prominent; allow the turnaround phrase to wrap cleanly. */
.stats .stat-value {
  font-size: clamp(2.3rem, 3.4vw, 3.25rem);
  line-height: 1.05;
  white-space: nowrap;
  max-width: 100%;
}
.stats .stat-value-wide {
  font-size: clamp(1.65rem, 2.2vw, 2.15rem);
  line-height: 1.08;
  white-space: normal;
}
.stat p {
  margin: 0;
  font: 400 13px/1.5 var(--font);
  color: var(--ink);
  max-width: none;
}
.stat-cite {
  margin: 12px 0 0 !important;
  max-width: none !important;
  font: 400 11px/1.4 var(--font) !important;
  color: var(--muted) !important;
}
.stat-cite a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(92, 87, 82, 0.45);
}
.stat-cite a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

/* —— Sections —— */
.section {
  padding: 96px var(--gutter);
  border-bottom: 1px solid var(--ink);
  background: #fff;
}
.section-muted { background: var(--pane); }
.section-label {
  margin: 0 0 16px;
  font: 600 11px/1 var(--font);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.section h2 {
  margin: 0;
  font: 400 clamp(2rem, 3.2vw, 2.75rem)/1.1 var(--display);
  letter-spacing: -0.01em;
}
.section-lead {
  margin: 24px 0 0;
  font: 400 15px/1.6 var(--font);
  color: var(--ink);
  max-width: 40rem;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: end;
}
.split-copy h2 { max-width: 16ch; }

.queue-card {
  border: 1px solid var(--ink);
  background: #fff;
  padding: 32px;
  max-width: 320px;
  margin-left: auto;
  width: 100%;
}
.queue-card h3 {
  margin: 0 0 18px;
  font: 600 11px/1 var(--font);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.queue-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font: 400 14px/1.4 var(--font);
}
.queue-list svg {
  flex: none;
  margin-top: 1px;
  color: var(--muted);
}
.queue-foot {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
  font: 400 12px/1.45 var(--font);
  color: var(--muted);
}

.cards-head { margin-bottom: 56px; }
.cards-head h2 { max-width: none; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card-grid-4 {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 1100px) {
  .card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
  .card-grid-4 .feature-card {
    min-height: 320px;
    padding: 40px;
  }
  .card-grid-4 .feature-card h3 { font-size: 18px; }
  .card-grid-4 .feature-card p { font-size: 14px; }
}
.feature-card {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  padding: 40px;
  display: flex;
  flex-direction: column;
  min-height: 290px;
  gap: 0;
}
.feature-card.is-accent { background: #efefef; }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.1);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  color: var(--ink);
}
.feature-card.is-accent .feature-icon { background: #fff; }
.feature-card h3 {
  margin: 0 0 12px;
  font: 700 16.5px/1.3 var(--font);
}
.feature-card p {
  margin: 0;
  font: 400 14px/1.55 var(--font);
  color: var(--soft);
  flex: 1;
}
.feature-tag {
  margin-top: 20px;
  align-self: flex-start;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font: 600 12px/1 var(--font);
  background: #fff;
}

.flags-split {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 64px;
  align-items: start;
}
.check-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.check-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font: 400 14px/1.45 var(--font);
}
.check-list svg {
  flex: none;
  margin-top: 2px;
}

.flag-panel {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr;
  border: 1px solid var(--ink);
  border-radius: 2px;
  min-height: 268px;
  overflow: hidden;
}
.flag-nav {
  background: var(--ink-deep);
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
}
.flag-nav button {
  text-align: left;
  padding: 15px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font: 500 12px/1.35 var(--font);
  color: inherit;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}
.flag-nav button:last-child { border-bottom: 0; }
.flag-nav button:hover,
.flag-nav button[aria-selected="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.flag-body {
  background: #ececec;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flag-body h4 {
  margin: 0 0 10px;
  font: 700 16px/1.3 var(--font);
}
.flag-body p {
  margin: 0;
  font: 400 14px/1.55 var(--font);
  color: var(--soft);
}

.walk-head { margin-bottom: 8px; }
.walk-kicker {
  display: inline-block;
  margin: 22px 0 0;
  padding-bottom: 10px;
  font: 600 14px/1 var(--font);
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
}
.walk-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 36px;
  align-items: start;
  margin-top: 28px;
}
.walk-shot {
  margin: 0;
  border: 1px solid var(--hair);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}
.walk-shot img { width: 100%; height: auto; }
.walk-aside h3 {
  margin: 0 0 14px;
  font: 400 1.5rem/1.2 var(--display);
  max-width: 18ch;
}
.walk-aside > p {
  margin: 0 0 22px;
  font: 400 14px/1.55 var(--font);
  color: var(--soft);
}
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.prac-table-wrap + .section-actions { margin-top: 24px; }
.prac-table {
  width: 100%;
  border-collapse: collapse;
  font: 400 13px/1.3 var(--font);
}
.prac-table thead th {
  background: var(--ink);
  color: #fff;
  text-align: left;
  font: 600 10px/1 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 14px;
}
.prac-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--hair);
  vertical-align: middle;
  background: #fff;
}
.prac-table tbody tr:last-child td { border-bottom: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font: 600 10px/1 var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-high { background: var(--high-bg); color: var(--high-text); }
.pill-mod { background: var(--mod-bg); color: var(--mod-text); }
.pill-ok { background: var(--ok-bg); color: var(--ok-text); }

.alert-sec {
  padding: 96px var(--gutter);
  text-align: center;
  border-bottom: 1px solid var(--ink);
  background: #fff;
}
.alert-sec .section-label { color: var(--muted); }
.alert-sec h2 {
  margin: 12px auto 32px;
  max-width: 18ch;
}
.alert-card {
  margin: 0 auto;
  max-width: 420px;
  text-align: left;
  border: 1px solid var(--ink);
  background: #fff;
  padding: 20px 22px 18px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}
.alert-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.alert-card-top strong {
  flex: 1;
  font: 700 14px/1.3 var(--font);
}
.alert-card p {
  margin: 0 0 14px;
  font: 400 13.5px/1.5 var(--font);
  color: var(--soft);
}
.alert-card .src {
  margin: 0;
  font: 400 12.5px/1.4 var(--font);
  color: var(--soft);
}
.alert-card .src a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* —— Without vs with (Kevin / research-grounded) —— */
.compare-sec {
  padding: 96px var(--gutter);
  background: #fff;
  border-bottom: 1px solid var(--ink);
}
.compare-head {
  max-width: 40rem;
  margin: 0 0 40px;
}
.compare-lead {
  margin: 16px 0 0;
  font: 400 15px/1.6 var(--font);
  color: var(--soft);
  max-width: 38rem;
}
.compare-frame {
  border: 1px solid var(--ink);
  overflow: hidden;
  background: #fff;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.compare-table thead th {
  padding: 18px 22px;
  text-align: left;
  font: 600 11px/1.2 var(--font);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  vertical-align: middle;
}
.compare-table thead .compare-dim {
  width: 18%;
  background: #fff;
  color: var(--muted);
}
.compare-table thead .compare-without {
  width: 41%;
  background: #f4f3f1;
  color: var(--muted);
}
.compare-table thead .compare-with {
  width: 41%;
  background: var(--ink);
  color: #fff;
}
.compare-col-label { display: block; }
.compare-table tbody th {
  padding: 20px 22px;
  text-align: left;
  font: 400 15px/1.25 var(--display);
  color: var(--ink);
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
  background: #fff;
}
.compare-table tbody td {
  padding: 20px 22px;
  font: 400 14px/1.5 var(--font);
  color: var(--soft);
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}
.compare-table tbody td:nth-child(2) {
  background: #faf9f7;
  color: #5a5550;
}
.compare-table tbody td:nth-child(3) {
  background: color-mix(in srgb, var(--cream) 55%, #fff);
  color: var(--ink);
  font-weight: 500;
}
@media (hover: hover) and (pointer: fine) {
  .compare-table tbody tr:hover td:nth-child(3) {
    background: color-mix(in srgb, var(--cream) 80%, #fff);
  }
}
.compare-note {
  margin: 22px 0 0;
  max-width: 46rem;
  font: 400 12.5px/1.5 var(--font);
  color: var(--muted);
}

.prac-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.stat-cite a,
.alert-card .src a,
a[href^="http"],
a[href^="mailto:"] {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.nav-menu-btn,
.flag-nav button {
  touch-action: manipulation;
}

/* —— FAQ (keep live light accordion — do not use Figma dark Carbon accordion) —— */
.faq-sec {
  padding: 96px var(--gutter);
  border-bottom: 1px solid var(--ink);
  background: var(--cream);
}
.faq-head {
  max-width: 40rem;
  margin-bottom: 48px;
}
.faq-head h2 {
  margin: 0;
  font: 400 clamp(2.05rem, 3.2vw, 2.75rem)/1.1 var(--display);
  letter-spacing: -0.02em;
  max-width: 18ch;
  color: var(--ink);
}
.faq-lead {
  margin: 18px 0 0;
  font: 400 15px/1.65 var(--font);
  color: var(--soft);
  max-width: 38rem;
}
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 56rem;
  align-items: start;
}
.faq-body {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--ink);
}
.faq-group + .faq-group {
  border-top: 1px solid var(--hair);
}
.faq-group-title {
  margin: 0;
  padding: 28px 28px 14px;
  font: 400 clamp(1.35rem, 2vw, 1.55rem)/1.2 var(--display);
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--ink);
}
.faq-item {
  border-top: 1px solid var(--hair-soft);
}
.faq-group > .faq-item:first-of-type {
  border-top: 1px solid var(--hair);
}
.faq-item summary {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  cursor: pointer;
  font: 600 16.5px/1.4 var(--font);
  letter-spacing: -0.012em;
  color: var(--ink);
  transition: background 160ms var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
.faq-item summary:hover { background: var(--pane); }
.faq-item summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.faq-item summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 200ms var(--ease);
  flex: none;
  opacity: 0.7;
}
.faq-item[open] summary {
  background: var(--pane);
}
.faq-item[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
  opacity: 1;
}
.faq-answer {
  padding: 0 28px 24px;
  max-width: 42rem;
}
.faq-answer p,
.faq-answer li {
  margin: 0 0 12px;
  font: 400 14.5px/1.65 var(--font);
  color: var(--soft);
}
.faq-answer p:last-child,
.faq-answer ul:last-child { margin-bottom: 0; }
.faq-answer ul {
  margin: 0 0 12px;
  padding: 0 0 0 1.15em;
}
.faq-answer li { padding-left: 2px; }
.faq-answer li::marker { color: var(--muted); }
.faq-answer strong { color: var(--ink); font-weight: 600; }

.cta-band {
  background: var(--cta-dark);
  color: #fff;
  text-align: center;
  padding: 96px var(--gutter);
}
.cta-band h2 {
  margin: 0 0 14px;
  font: 400 clamp(2rem, 3.2vw, 2.75rem)/1.15 var(--display);
  letter-spacing: -0.015em;
}
.cta-band p {
  margin: 0 auto 28px;
  max-width: 34rem;
  font: 400 15px/1.5 var(--font);
  color: rgba(255, 255, 255, 0.8);
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.footer {
  padding: 56px var(--gutter) 28px;
  background: #fff;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand p {
  margin: 14px 0 0;
  max-width: 28rem;
  font: 400 13.5px/1.5 var(--font);
  color: var(--soft);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.footer-cols h4 {
  margin: 0 0 14px;
  font: 600 11px/1 var(--font);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-cols a,
.footer-demo-trigger {
  display: block;
  margin-bottom: 11px;
  font: 400 13.5px/1.3 var(--font);
  color: var(--soft);
  text-align: left;
}
.footer-cols a:hover,
.footer-demo-trigger:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  font: 400 12px/1.3 var(--font);
  color: var(--muted);
}

/* —— Demo request modal —— */
.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding:
    max(20px, var(--safe-top))
    max(20px, var(--safe-right))
    max(20px, var(--safe-bottom))
    max(20px, var(--safe-left));
  background: rgba(22, 22, 22, 0.76);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.demo-modal[hidden] { display: none; }
.demo-modal-panel {
  position: relative;
  width: min(100%, 660px);
  max-height: calc(100dvh - 40px - var(--safe-top) - var(--safe-bottom));
  padding: 34px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--cream);
  color: var(--ink);
  overflow-y: auto;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}
@supports not (height: 100dvh) {
  .demo-modal-panel {
    max-height: calc(100vh - 40px - var(--safe-top) - var(--safe-bottom));
  }
}
.demo-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  font: 400 28px/1 var(--display);
}
.demo-modal-close:hover { border-color: var(--ink); }
.demo-modal-kicker {
  margin: 0 48px 12px 0;
  font: 700 10px/1 var(--font);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.demo-modal-panel h2 {
  margin: 0 48px 12px 0;
  font: 400 clamp(2rem, 5vw, 2.65rem)/1.04 var(--display);
  letter-spacing: -0.015em;
}
.demo-modal-description {
  margin: 0;
  max-width: 34rem;
  font: 400 14px/1.55 var(--font);
  color: var(--soft);
}
.demo-modal-privacy {
  margin: 14px 0 24px;
  padding: 11px 12px;
  border: 1px solid var(--ink);
  background: #fff;
  font: 600 12px/1.45 var(--font);
}
.demo-form {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.demo-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
}
.demo-field-wide { grid-column: 1 / -1; }
.demo-field label {
  font: 600 12px/1.2 var(--font);
}
.demo-field label span {
  font-weight: 400;
  color: var(--muted);
}
.demo-field input,
.demo-field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.3 var(--font);
}
.demo-field input:focus,
.demo-field select:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.demo-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.demo-form-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}
.demo-submit {
  min-height: 46px;
}
.demo-form-status {
  min-height: 1.4em;
  margin: 0;
  font: 600 12px/1.4 var(--font);
  color: var(--soft);
}
.demo-form-status[data-state="success"] { color: var(--ok-text); }
.demo-form-status[data-state="error"] { color: var(--high-text); }

/* —— Tablet + phone: collapse nav, stack layout, card-compare —— */
@media (max-width: 980px) {
  :root { --gutter: clamp(22px, 4vw, 36px); }

  .topbar {
    gap: 12px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    min-width: 0;
  }
  .brand { min-height: 44px; padding-right: 4px; }
  /* Nav is display:none when closed, so its margin-left:auto no longer
     pushes chrome right — pin actions (hamburger) to the trailing edge. */
  .nav-actions { margin-left: auto; }
  .nav-menu-btn { display: inline-flex; }
  .nav-open-demo { display: none; }
  .nav {
    display: none;
    position: fixed;
    top: calc(var(--topbar-h) + var(--safe-top));
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 calc(20px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    z-index: 39;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  body.nav-open .nav { display: flex; }
  .nav-item {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 max(22px, env(safe-area-inset-left));
    font-size: 12px;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--hair);
  }
  .nav-item:last-child { border-bottom: 0; }
  .nav-item-mobile-only {
    display: flex;
    margin-top: 4px;
    border-top: 1px solid var(--ink);
    font-weight: 700;
    color: var(--ink);
  }
  .hero {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }
  .hero-copy {
    padding: 40px max(22px, env(safe-area-inset-left)) 28px max(22px, env(safe-area-inset-right));
    gap: 28px;
    min-height: 0;
  }
  .hero-copy-main { max-width: none; }
  .hero-art img { object-position: 50% 28%; }
  .hero-art {
    height: min(var(--hero-art-vh), var(--hero-art-max));
    min-height: var(--hero-art-min);
  }
  @supports not (height: 100dvh) {
    .hero-art { height: min(48vh, var(--hero-art-max)); }
  }
  .hero-art img { object-position: 50% 28%; }
  .hero-art-credit {
    top: 18px;
    bottom: auto;
    left: max(18px, env(safe-area-inset-left));
    max-width: min(250px, calc(100% - 36px));
  }
  .hero-art-actions {
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    max-width: none;
    flex-direction: column;
  }
  .hero-art-actions .btn {
    flex: 1 1 auto;
    width: 100%;
    min-height: 46px;
    white-space: normal;
    text-align: center;
  }

  .split,
  .flags-split,
  .walk-grid,
  .footer-top,
  .flag-panel { grid-template-columns: 1fr; }
  .queue-card { margin: 0; max-width: none; }
  .card-grid,
  .card-grid-4 { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; }

  .split-copy h2,
  .cards-head h2,
  .walk-aside h3,
  .alert-sec h2 { max-width: none; }

  .stats,
  .stats-4 {
    padding: 40px max(22px, env(safe-area-inset-left)) 40px max(22px, env(safe-area-inset-right));
  }
  .stats-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-4 .stat { padding: 0 20px; }
  .stats-4 .stat:nth-child(odd) { padding-left: 0; }
  .stats-4 .stat:nth-child(even) {
    border-right: 0;
    padding-right: 0;
  }
  .stats-4 .stat:nth-child(n + 3) {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--hair);
  }

  .section,
  .alert-sec,
  .compare-sec,
  .faq-sec,
  .cta-band,
  .footer {
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }

  .faq-layout {
    grid-template-columns: 1fr;
  }
  .faq-head h2 { max-width: none; }
  .faq-group-title,
  .faq-item summary,
  .faq-answer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .faq-item summary {
    font-size: 15px;
    gap: 14px;
    min-height: 52px;
  }

  /* Compare → stacked cards (phones + landscape + tablets) */
  .compare-frame { border: 0; overflow: visible; }
  .compare-table,
  .compare-table thead,
  .compare-table tbody,
  .compare-table th,
  .compare-table td,
  .compare-table tr {
    display: block;
    width: 100%;
  }
  .compare-table thead { display: none; }
  .compare-table tbody th {
    padding: 22px 0 8px;
    border: 0;
    font-size: clamp(1.05rem, 3.6vw, 1.15rem);
  }
  .compare-table tbody td {
    border: 1px solid var(--hair);
    margin: 0 0 8px;
    padding: 14px 16px;
    font-size: 14px;
  }
  .compare-table tbody td:nth-child(2)::before,
  .compare-table tbody td:nth-child(3)::before {
    display: block;
    font: 600 10px/1 var(--font);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--muted);
  }
  .compare-table tbody td:nth-child(2)::before { content: "Without Rubik MD"; }
  .compare-table tbody td:nth-child(3)::before {
    content: "With Rubik MD";
    color: var(--ink);
  }
  .compare-table tbody td:nth-child(3) {
    border-color: var(--ink);
    margin-bottom: 18px;
  }

}

@media (max-width: 720px) {
  :root {
    --hero-art-vh: 52dvh;
    --hero-art-max: 380px;
  }
  .hero-copy {
    padding: 32px max(22px, var(--safe-left)) 24px max(22px, var(--safe-right));
  }
  .hero h1 {
    font-size: clamp(2.05rem, 8.2vw, 2.55rem);
  }
  .lead { font-size: 14.5px; }
  .hero-art {
    height: min(var(--hero-art-vh), var(--hero-art-max));
    min-height: var(--hero-art-min);
  }
  @supports not (height: 100dvh) {
    .hero-art { height: min(52vh, var(--hero-art-max)); }
  }
  .proof-row {
    gap: 6px 12px;
    font-size: 12px;
  }
  .proof-row span { white-space: normal; }

  .stats,
  .stats-4 {
    grid-template-columns: 1fr;
    padding: 28px max(22px, env(safe-area-inset-left)) 28px max(22px, env(safe-area-inset-right));
  }
  .stat,
  .stats-4 .stat {
    border-right: 0;
    border-top: 0;
    margin-top: 0;
    padding: 0 0 24px;
    border-bottom: 1px solid var(--hair);
  }
  .stats-4 .stat:nth-child(n + 3) {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
  .stat:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .stats-4 .stat strong {
    font-size: clamp(1.55rem, 7vw, 2rem);
    white-space: normal;
  }
  .stat p,
  .stats-4 .stat p { max-width: none; }
  .stat-cite a {
    display: inline-block;
    padding: 8px 2px;
    font-size: 12px;
    min-height: 36px;
  }

  .flag-nav {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .flag-nav button {
    flex: 0 0 auto;
    min-height: 44px;
    min-width: 7.5rem;
    white-space: nowrap;
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }

  .section,
  .alert-sec,
  .compare-sec,
  .faq-sec,
  .cta-band {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .footer { padding-top: 40px; }

  .footer-cols { grid-template-columns: 1fr; }
  .footer-cols a {
    min-height: 44px;
    display: flex;
    align-items: center;
    margin-bottom: 0;
  }
  .footer-demo-trigger {
    min-height: 44px;
    display: flex;
    align-items: center;
    margin-bottom: 0;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .alert-card .src a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 22rem;
    margin: 0 auto;
  }
  .cta-band .btn {
    min-height: 48px;
    width: 100%;
  }

  .section-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .section-actions .btn {
    min-height: 48px;
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .prac-table {
    min-width: 280px;
  }
  .prac-table thead th,
  .prac-table tbody td {
    padding: 10px 10px;
    font-size: 12px;
  }

  .demo-modal {
    place-items: start center;
    padding:
      max(12px, var(--safe-top))
      max(12px, var(--safe-right))
      max(12px, var(--safe-bottom))
      max(12px, var(--safe-left));
  }
  .demo-modal-panel {
    max-height: calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom));
    padding: 26px 20px 22px;
  }
  .demo-modal-panel h2 {
    margin-right: 40px;
    font-size: clamp(1.9rem, 8vw, 2.4rem);
  }
  .demo-form {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .demo-field-wide { grid-column: auto; }
  .demo-form-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .demo-submit {
    width: 100%;
    min-height: 48px;
  }
}

@media (max-width: 420px) {
  .brand-logo { height: 24px; }
  .hero-art { min-height: 300px; }
  .hero-art-credit {
    top: 14px;
    left: max(16px, var(--safe-left));
  }
  .hero-art-credit-title { font-size: 12px; }
  .hero-art-credit-meta { font-size: 8.5px; }
}

/* Short landscape phones: compact hero + sections */
@media (max-height: 520px) and (orientation: landscape) {
  :root {
    --hero-art-vh: 42dvh;
    --hero-art-max: 220px;
    --hero-art-min: 180px;
  }
  .hero-copy {
    padding-top: 20px;
    padding-bottom: 16px;
    gap: 14px;
  }
  .hero-art {
    height: min(var(--hero-art-vh), var(--hero-art-max));
    min-height: var(--hero-art-min);
  }
  .hero-art-credit {
    top: 12px;
    left: max(14px, var(--safe-left));
  }
  .hero-art-credit-title { font-size: 13px; }
  .hero-art-credit-meta {
    margin-top: 3px;
    font-size: 9px;
  }
  @supports not (height: 100dvh) {
    .hero-art { height: min(42vh, var(--hero-art-max)); }
  }
  .hero-art-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hero-art-actions .btn {
    width: auto;
    flex: 1 1 calc(50% - 6px);
  }
  .section,
  .alert-sec,
  .compare-sec,
  .faq-sec,
  .cta-band {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .stats-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Five nav items: slightly tighter gap before hamburger breakpoint */
@media (min-width: 981px) and (max-width: 1180px) {
  .nav { gap: 18px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  .hero-art-credit {
    left: 18px;
    bottom: 24px;
    max-width: 90px;
  }
  .hero-art-credit-title { font-size: 11px; line-height: 1.12; }
  .hero-art-credit-meta { margin-top: 4px; font-size: 8px; line-height: 1.2; }
}
