/* ==========================================================================
   Sheet Format Pro — design system
   Tokens first, then primitives, then components. Every surface/spacing/radius
   value below comes from a token so light and dark stay in lockstep.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Neutrals + brand */
  --ink: #0d1424;
  --ink-2: #384357;
  --muted: #5d6a80;
  --line: #e3e7ef;
  --line-strong: #cdd4e1;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --accent: #2b50f6;
  --accent-hover: #1c3ee0;
  --accent-soft: #eaefff;
  --accent-ink: #1a34b8;
  /* 5.1:1 on --success-soft (pills and badges); #0f8a5f was 3.9:1. */
  --success: #0a7550;
  --success-soft: #e6f6ef;
  --error: #b3261e;
  --on-accent: #ffffff;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(13, 20, 36, 0.06);
  --shadow-md: 0 4px 12px rgba(13, 20, 36, 0.08);
  --shadow-lg: 0 16px 40px rgba(13, 20, 36, 0.12);
  --ring: 0 0 0 3px rgba(43, 80, 246, 0.35);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  /* Spacing scale (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;

  --content: 1120px;
  --measure: 62ch;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Aptos, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'Cascadia Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --ink: #eef1f8;
    --ink-2: #c3cbdb;
    --muted: #96a1b8;
    --line: #232b3b;
    --line-strong: #323c50;
    --bg: #0b0f18;
    --bg-soft: #111725;
    --surface: #121927;
    --surface-2: #171f30;
    --accent: #7d97ff;
    --accent-hover: #93a9ff;
    --accent-soft: #1a2340;
    --accent-ink: #b8c6ff;
    --success: #4ecb97;
    --success-soft: #122a20;
    --error: #ff8b82;
    --on-accent: #08101f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.6);
    --ring: 0 0 0 3px rgba(125, 151, 255, 0.45);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #eef1f8;
  --ink-2: #c3cbdb;
  --muted: #96a1b8;
  --line: #232b3b;
  --line-strong: #323c50;
  --bg: #0b0f18;
  --bg-soft: #111725;
  --surface: #121927;
  --surface-2: #171f30;
  --accent: #7d97ff;
  --accent-hover: #93a9ff;
  --accent-soft: #1a2340;
  --accent-ink: #b8c6ff;
  --success: #4ecb97;
  --success-soft: #122a20;
  --error: #ff8b82;
  --on-accent: #08101f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 3px rgba(125, 151, 255, 0.45);
}

/* --------------------------------------------------------------- base --- */

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

/* Component display rules (for example, inline-flex footer links) must never
   override the semantic HTML hidden attribute. This is relied on by
   theme and inline-status controls before their client code makes them visible. */
[hidden] {
  display: none !important;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-3);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
}
h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 var(--s-4);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 1px 6px;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-2);
  transform: translateY(-160%);
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm);
  text-decoration: none;
  z-index: 100;
  transition: transform 0.15s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--on-accent);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--s-3) var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.brand__logo {
  width: 30px;
  height: 30px;
  flex: none;
  display: block;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.nav-link--active {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-cta {
  flex: none;
  margin-left: var(--s-2);
}

/* Menu button: shown by nav.js only when the links do not fit in the header. */
.nav-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 34px;
  padding: 0 var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}
.nav-toggle[hidden] {
  display: none;
}
.nav-toggle svg {
  width: 18px;
  height: 18px;
}
.nav-toggle:hover {
  background: var(--surface-2);
}

/* Collapsed: the links leave the header row and open as a list beneath it. */
.nav-collapsed .nav {
  display: none;
}
.nav-collapsed .theme-toggle {
  margin-left: auto;
}
.nav-collapsed.nav-open .nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  margin: 0;
  width: auto;
  max-height: calc(100vh - 100%);
  overflow-y: auto;
  padding: var(--s-2) max(var(--s-4), calc((100% - var(--content)) / 2 + var(--s-4))) var(--s-3);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.nav-collapsed.nav-open .nav-link {
  padding: var(--s-3);
}

.theme-toggle {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  margin-left: var(--s-2);
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  display: block;
}

/* The visible glyph is the theme you'd switch TO, so it has to track both the
   explicit data-theme override and the OS setting when there is none. */
.theme-toggle__sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle__moon {
    display: none;
  }
  :root:not([data-theme='light']) .theme-toggle__sun {
    display: block;
  }
}

:root[data-theme='dark'] .theme-toggle__moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle__sun {
  display: block;
}

:root[data-theme='light'] .theme-toggle__moon {
  display: block;
}

:root[data-theme='light'] .theme-toggle__sun {
  display: none;
}

/* --------------------------------------------------------------- page --- */

.page {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--s-7) var(--s-4) var(--s-9);
}

.page--narrow {
  max-width: 780px;
}

/* Long legal documents need a wider reading area than short forms. */
.page--legal {
  max-width: 960px;
}

.page-head {
  margin-bottom: var(--s-6);
}

.page-head h1 {
  margin-bottom: var(--s-3);
}

.lead {
  color: var(--muted);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  max-width: var(--measure);
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--r-full);
  padding: 5px var(--s-3);
  margin-bottom: var(--s-4);
}

.eyebrow svg {
  width: 13px;
  height: 13px;
  flex: none;
}

/* inline-flex + min-height keeps the breadcrumb a 24px tap target; as a bare
   block link it measured 19px tall, under the WCAG 2.2 AA minimum. */
.eyebrow a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: inherit;
  text-decoration: none;
}

.eyebrow a:hover {
  color: inherit;
  text-decoration: underline;
}

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

.section {
  margin-top: var(--s-9);
}

.section__head {
  max-width: var(--measure);
  margin-bottom: var(--s-6);
}

.section__head p {
  color: var(--muted);
  margin: 0;
}

.section--center .section__head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 11px var(--s-5);
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
}

.button:hover {
  background: var(--surface-2);
  border-color: var(--muted);
  color: var(--ink);
}

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

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}

.button--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
  box-shadow: var(--shadow-md);
}

.button--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
}

.button--ghost:hover {
  background: var(--accent-soft);
  border-color: transparent;
}

.button--sm {
  padding: 7px var(--s-4);
  font-size: 0.875rem;
}

.button--block {
  width: 100%;
}

.button[disabled],
.button[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}

.cta-row {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-6);
  flex-wrap: wrap;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--s-8);
  align-items: center;
  padding: var(--s-6) 0 var(--s-5);
}

.hero__copy {
  max-width: 34rem;
}

.hero__title {
  margin-bottom: var(--s-4);
}

.hero__lead {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: var(--muted);
  margin: 0;
}

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-6);
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.875rem;
}

.hero__proof li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero__proof svg {
  width: 15px;
  height: 15px;
  color: var(--success);
  flex: none;
}

/* Hero stage: a Sheets window (raw data cut diagonally into the formatted
   result) with the add-on sidebar and two status chips floating over it.
   Built from markup and tokens — no screenshot to go stale, no image weight,
   and it follows light/dark with everything else. */
.stage {
  position: relative;
  isolation: isolate;
  padding: 30px 0 60px 22px;
}

.stage__glow {
  position: absolute;
  inset: -14% 0 -8% -10%;
  z-index: -1;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent);
  mask-image: radial-gradient(closest-side, #000 72%, transparent);
  background:
    radial-gradient(60% 55% at 80% 14%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 72%),
    radial-gradient(48% 48% at 10% 92%, color-mix(in srgb, #10b981 28%, transparent), transparent 72%),
    radial-gradient(90% 80% at 50% 50%, color-mix(in srgb, var(--accent) 12%, var(--accent-soft)), transparent 80%);
}

.preview {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.stage__window {
  margin-right: 44px;
  transform: perspective(1600px) rotateY(-5deg) rotateX(1.5deg);
  transform-origin: 20% 50%;
  box-shadow:
    0 2px 4px rgba(13, 20, 36, 0.06),
    0 36px 70px -24px color-mix(in srgb, var(--accent) 45%, rgba(13, 20, 36, 0.5));
}

.preview__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px var(--s-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.preview__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.preview__label {
  margin-left: var(--s-2);
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.preview__sheet {
  padding: 30px var(--s-4) 0;
  overflow: hidden;
}

/* Raw layer sets the height; the formatted layer sits over it, clipped to a
   diagonal. Same grid, same padding, same border widths — so rows line up. */
.split {
  position: relative;
}

.split__after {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--surface);
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.split::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  clip-path: polygon(calc(50% - 1px) 0, calc(50% + 1px) 0, calc(50% + 1px) 100%, calc(50% - 1px) 100%);
  filter: drop-shadow(0 0 5px var(--accent));
  pointer-events: none;
}

.split__tag {
  position: absolute;
  top: -24px;
  padding: 2px 9px;
  border-radius: var(--r-full);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.split__tag--before {
  left: 0;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.split__tag--after {
  right: 0;
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
}

/* Empty sheet rows under the data, fading out, so the window reads as a real grid. */
.preview__empty {
  height: 170px;
  background:
    linear-gradient(to right, transparent calc(100% - 1px), var(--line) 0) 0 0 / 25% 100%,
    repeating-linear-gradient(to bottom, transparent 0 28px, var(--line) 28px 29px);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
}

.sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  table-layout: fixed;
}

.sheet th,
.sheet td {
  border: 1px solid var(--line);
  padding: 6px var(--s-2);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet thead th {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-color: var(--accent);
}

.sheet tbody tr:nth-child(even) td {
  background: var(--accent-soft);
}

.sheet td.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sheet td.is-good {
  background: var(--success-soft);
  color: var(--success);
  font-weight: 600;
}

.sheet td.is-bad {
  background: color-mix(in srgb, var(--error) 14%, transparent);
  color: var(--error);
  font-weight: 600;
}

.sheet tfoot td {
  font-weight: 700;
  background: var(--surface-2);
  border-top: 2px solid var(--line-strong);
}

.sheet--raw thead th,
.sheet--raw tbody td,
.sheet--raw tfoot td {
  background: none;
  color: var(--ink-2);
  font-weight: 400;
  text-align: left;
  border-color: var(--line);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
  margin: var(--s-6) 0 0;
  padding: var(--s-4) 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.hero__stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__stats strong {
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
}

.hero__stats span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.hero__stats + .hero__proof {
  margin-top: var(--s-4);
}

.analyzer {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: 12px 164px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 0.75rem;
}

.analyzer__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.analyzer__icon svg {
  width: 14px;
  height: 14px;
}

.analyzer__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.25;
}

.analyzer__text strong {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.analyzer__text small {
  color: var(--muted);
  font-size: 0.6875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analyzer__btn {
  flex: none;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.palettes {
  display: flex;
  gap: 6px;
}

.palette {
  width: 24px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(to bottom, var(--pal) 0 38%, var(--pal-soft) 38% 100%);
}

.palette.is-on {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

.palette--blue {
  --pal: #2b50f6;
  --pal-soft: #dfe6ff;
}
.palette--slate {
  --pal: #475569;
  --pal-soft: #e2e8f0;
}
.palette--teal {
  --pal: #0f766e;
  --pal-soft: #d5f1ec;
}
.palette--navy {
  --pal: #0d1636;
  --pal-soft: #dde2f1;
}
.palette--amber {
  --pal: #b45309;
  --pal-soft: #fdebc8;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  /* The pills wrap onto a second line at wide widths; 5px above one another
     read as a single stacked box, so the row gap carries the separation. */
  column-gap: var(--s-2);
  row-gap: 10px;
}

.tag {
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}

.stage__panel {
  position: absolute;
  right: 0;
  bottom: -16px;
  width: 196px;
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.stage__chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.stage__chip svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.stage__chip--a {
  top: 2px;
  left: 56px;
}

.stage__chip--a svg {
  color: var(--success);
}

.stage__chip--b {
  bottom: 22px;
  left: 92px;
}

.stage__chip--b svg {
  color: var(--accent);
}

.stage__tile {
  position: absolute;
  left: 0;
  bottom: 0;
  line-height: 0;
}

.stage__tile .brand__logo {
  width: 64px;
  height: 64px;
  border-radius: 17px;
  box-shadow: var(--shadow-lg);
}

@media (prefers-reduced-motion: no-preference) {
  .stage__chip,
  .stage__tile {
    animation: stage-float 7s ease-in-out infinite;
  }
  .stage__chip--b {
    animation-delay: -2.5s;
  }
  .stage__tile {
    animation-delay: -4.5s;
  }
}

@keyframes stage-float {
  50% {
    transform: translateY(-5px);
  }
}

.preview__panel-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.swatch {
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  font-size: 0.625rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: var(--surface);
}

.swatch--head {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.swatch--good {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}
.swatch--bad {
  background: color-mix(in srgb, var(--error) 16%, transparent);
  border-color: var(--error);
  color: var(--error);
}

.preview__row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.75rem;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  padding: 7px var(--s-2);
}

.preview__row svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex: none;
}

/* ----------------------------------------------------------- features --- */

.grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-5);
}

.card,
.feature-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.feature-card {
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.feature-card h3 {
  margin: 0 0 var(--s-2);
}

.feature-card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.9375rem;
}

.card h3 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.icon-tile {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  margin-bottom: var(--s-4);
}

.icon-tile svg {
  width: 20px;
  height: 20px;
}

/* -------------------------------------------------------------- steps --- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-5);
}

.steps li {
  position: relative;
  padding-top: var(--s-5);
  border-top: 2px solid var(--line);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: calc(-1 * var(--s-4));
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 3px solid var(--bg);
}

.steps h3 {
  margin: 0 0 var(--s-2);
  font-size: 1rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

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

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-5);
  align-items: stretch;
  margin-top: var(--s-6);
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.plan-card--featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.plan-card__badge {
  position: absolute;
  top: calc(-1 * var(--s-3));
  left: var(--s-5);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px var(--s-3);
  border-radius: var(--r-full);
}

.plan-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 600;
}

.plan-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: var(--s-2) 0 var(--s-1);
}

.plan-card__price span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.plan-card__savings {
  display: inline-block;
  align-self: flex-start;
  color: var(--success);
  background: var(--success-soft);
  border-radius: var(--r-full);
  padding: 3px var(--s-3);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--s-4);
}

/* Keeps the feature lists on a shared baseline when a plan has no savings
   line — without it the cards' ticks sit at three different heights. */
.plan-card__savings--none {
  visibility: hidden;
}

.plan-card__features {
  list-style: none;
  padding: 0;
  margin: var(--s-4) 0 var(--s-5);
  display: grid;
  gap: var(--s-2);
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.plan-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
}

.plan-card__features svg {
  width: 16px;
  height: 16px;
  color: var(--success);
  flex: none;
  margin-top: 4px;
}

.plan-card .button {
  margin-top: auto;
}

.featured-offer {
  background: var(--accent);
  color: var(--on-accent);
}

.featured-offer__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 2px var(--s-5);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.featured-offer__copy {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
}

.featured-offer__headline {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
}

.featured-offer__headline strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.featured-offer__detail {
  font-size: 0.8125rem;
  color: inherit;
  overflow-wrap: anywhere;
}

.featured-offer__tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid currentColor;
  border-radius: var(--r-full);
  padding: 4px var(--s-3);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.featured-offer__tag svg {
  width: 14px;
  height: 14px;
}

.featured-offer__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  flex: none;
  min-height: 44px;
  padding: var(--s-2) var(--s-4);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--on-accent);
  background: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.featured-offer__cta:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.featured-offer__cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

#plans {
  scroll-margin-top: 96px;
}

@media (max-width: 600px) {
  .featured-offer__inner {
    flex-wrap: wrap;
    gap: var(--s-2) var(--s-3);
    padding: var(--s-2) var(--s-4);
  }
  .featured-offer__copy {
    display: contents;
  }
  .featured-offer__headline {
    width: 100%;
  }
  .featured-offer__detail {
    flex: 1;
    min-width: 100px;
  }
  .featured-offer__cta {
    padding-inline: var(--s-3);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .featured-offer:not([hidden]) .featured-offer__inner {
    animation: campaign-entrance 220ms ease-out;
  }
}

@keyframes campaign-entrance {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* A featured sale on a plan card: the regular price struck through beside
   the sale price, and how long the sale price lasts right under it. */
.plan-card__price .plan-card__was {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.02em;
  text-decoration-thickness: 2px;
}

.plan-card__offer {
  margin: 0 0 var(--s-2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-ink);
}

/* Free vs Pro comparison. position: relative makes the wrapper the
   containing block of the absolutely positioned .sr-only "Included" labels in
   its cells; without it they were placed against the page, outside this
   scroll box, and made the whole page scroll sideways on phones. */
.compare-wrap {
  position: relative;
  max-width: 860px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 520px;
}

.compare th,
.compare td {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
}

.compare thead th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
}

/* The header stays solid so the column still announces itself; only the body
   cells below it are tinted. */
.compare thead .compare__pro {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: none;
  padding-top: var(--s-4);
  padding-bottom: var(--s-4);
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
  border-bottom: none;
}

.compare td:not(:first-child),
.compare th:not(:first-child) {
  text-align: center;
  width: 120px;
}

.compare tbody th {
  font-weight: 500;
  color: var(--ink-2);
}

/* Tinted rather than a solid accent slab. Solid blue shouted, but every cell
   in it was a white tick on blue — loud and uninformative. A tint keeps the
   column reading as one highlighted block while leaving the values and the
   +N chips legible, so the emphasis lands on the content. */
.compare .compare__pro {
  background: var(--accent-soft);
  box-shadow:
    inset 1px 0 0 var(--accent),
    inset -1px 0 0 var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  width: 160px;
}

.compare tbody tr:last-child .compare__pro {
  box-shadow:
    inset 1px 0 0 var(--accent),
    inset -1px 0 0 var(--accent),
    inset 0 -1px 0 var(--accent);
}

.compare .compare__pro .tick {
  color: var(--accent);
}

.compare .compare__pro .cross {
  color: var(--accent-ink);
  opacity: 0.5;
}

/* The single most important number in the row: how many more you get. */
.compare__gain {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 7px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  vertical-align: 1px;
}

/* Section breaks inside a long list. They span the whole table so the Free and
   Pro columns are not interrupted by a heading that means nothing in them. */
.compare__group th {
  background: var(--surface-2);
  border-top: 1px solid var(--line-strong);
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.compare__group th > span:first-child {
  margin-right: var(--s-3);
}

.compare__group-count {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
}

.compare tbody .compare__group + tr th,
.compare tbody .compare__group + tr td {
  border-top: none;
}

.compare__heading {
  margin: var(--s-7) 0 var(--s-4);
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------- pro gains --- */

.gain-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-4);
}

.gain {
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}

.gain__delta {
  display: block;
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.gain__title {
  margin: var(--s-2) 0 var(--s-2);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.gain__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.compare__pro-badge {
  display: block;
  width: max-content;
  margin: var(--s-1) auto 0;
  padding: 2px 6px;
  background: var(--on-accent);
  border: 1px solid var(--on-accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.compare__pro-callout {
  max-width: 860px;
  margin-top: var(--s-4);
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-left: 5px solid var(--accent);
  border-radius: var(--r-lg);
  background: var(--accent-soft);
  box-shadow: var(--shadow-sm);
}

.compare__pro-callout div {
  display: grid;
  gap: var(--s-1);
}

.compare__pro-callout strong {
  color: var(--ink);
}

.compare__pro-callout span {
  color: var(--muted);
  font-size: 0.875rem;
}

.compare svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.tick {
  color: var(--success);
}
.cross {
  color: var(--muted);
  opacity: 0.6;
}

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

.faq {
  display: grid;
  gap: var(--s-3);
  max-width: 820px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}

.faq details[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: var(--s-4) var(--s-5);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
}

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

.faq summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--muted);
  flex: none;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq details > p {
  margin: 0;
  padding: 0 var(--s-5) var(--s-5);
  color: var(--muted);
  max-width: var(--measure);
}

/* ----------------------------------------------------------- cta band --- */

.cta-band {
  margin-top: var(--s-9);
  border-radius: var(--r-xl);
  padding: var(--s-8) var(--s-6);
  text-align: center;
  background:
    radial-gradient(
      90% 140% at 50% 0%,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent 70%
    ),
    var(--surface-2);
  border: 1px solid var(--line);
}

.cta-band h2 {
  margin-bottom: var(--s-3);
}

.cta-band p {
  color: var(--muted);
  max-width: 48ch;
  margin: 0 auto;
}

.cta-band .cta-row {
  justify-content: center;
}

/* -------------------------------------------------------- help/guides --- */

.help-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-6);
}

.help-topic-card {
  display: flex;
  flex-direction: column;
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.help-topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  color: var(--ink);
}

.help-topic-card h3 {
  margin: 0 0 var(--s-2);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  font-size: 1rem;
}

.help-topic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.help-topic-card__more {
  margin-top: auto;
  padding-top: var(--s-4);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.pro-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--r-full);
  padding: 1px var(--s-2);
  vertical-align: middle;
}

.guide-steps {
  list-style: none;
  padding: 0;
  margin: var(--s-6) 0 0;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

/* Number | text | screenshot. The sidebar captures are only ~320px wide, so
   stacking text above them left two thirds of every step card empty. */
.guide-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--s-4);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}

.guide-step__body {
  min-width: 0;
  padding-top: 5px;
}

.guide-step__shot {
  min-width: 0;
  max-width: 320px;
}

.guide-step h3 {
  margin: 0 0 var(--s-2);
  font-size: 1rem;
}

.guide-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.guide-step__number {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.guide-step__shot .guide-step__image {
  margin-top: 0;
}

.guide-step__image {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-top: var(--s-3);
  display: block;
  box-shadow: var(--shadow-sm);
}

.guide-shot-trigger {
  display: inline-block;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: var(--r-md);
  max-width: 100%;
}

.guide-shot-trigger:focus-visible {
  box-shadow: var(--ring);
}

.guide-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.78);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
  z-index: 60;
}

/* Fit the viewport rather than the capture: the sidebar screenshots are only
   ~320px wide, so "max-width" alone left them at their small natural size.
   Height fills the window and object-fit keeps the aspect ratio when the
   window is too narrow for that height. */
.guide-lightbox__image {
  width: auto;
  height: calc(100vh - 2 * var(--s-7));
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  background: #fff;
}

.guide-lightbox__close {
  position: fixed;
  top: var(--s-4);
  right: var(--s-4);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #0d1424;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

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

.form {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  max-width: 520px;
  margin-top: var(--s-6);
  padding: var(--s-6);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.form label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: var(--s-3);
  color: var(--ink-2);
}

.form input,
.form textarea {
  padding: 11px var(--s-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  width: 100%;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.form input::placeholder,
.form textarea::placeholder {
  color: var(--muted);
}

.form input:focus-visible,
.form textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.form textarea {
  resize: vertical;
  min-height: 140px;
}

.form button {
  margin-top: var(--s-5);
  align-self: flex-start;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
}

.error {
  color: var(--error);
  font-weight: 500;
}

/* A field's own problem, directly under it (tied by aria-describedby). */
.field-error {
  margin: 0;
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 500;
}

.form [aria-invalid='true'] {
  border-color: var(--error);
}

.form-status:empty {
  display: none;
}

/* Customer-typed values (emails, keys) can be one unbroken run wider than a
   phone. */
.break-anywhere {
  overflow-wrap: anywhere;
}

/* A note under a card or a list of cards: without this it sat flush against
   the card's border. */
.page-note {
  margin-top: var(--s-5);
}

.muted {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------- manage --- */

.device-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-5);
  display: grid;
  gap: var(--s-2);
}

.device-row__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.device-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: var(--s-3) var(--s-4);
  font-size: 0.9375rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------- prose --- */

.prose {
  max-width: var(--measure);
}

.prose h2 {
  margin-top: var(--s-7);
  font-size: 1.375rem;
}

.prose h3 {
  margin-top: var(--s-5);
}

.prose p,
.prose li {
  color: var(--ink-2);
}

.prose ul,
.prose ol {
  padding-left: var(--s-5);
}

.prose li {
  margin-bottom: var(--s-2);
}

.legal-head,
.changelog-head {
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}

.legal-head {
  margin-bottom: var(--s-5);
}

.legal-prose {
  max-width: none;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.release-list {
  display: grid;
  gap: var(--s-3);
}

.release-entry {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: clip;
}

.release-entry summary {
  display: grid;
  grid-template-columns: minmax(125px, 0.35fr) 1fr auto;
  gap: var(--s-4);
  align-items: start;
  padding: var(--s-5);
  cursor: pointer;
  list-style: none;
}

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

.release-meta {
  display: grid;
  gap: var(--s-1);
  color: var(--muted);
  font-size: 0.8125rem;
}

.release-meta strong {
  color: var(--accent);
  font-size: 0.9375rem;
}

.release-copy {
  display: grid;
  gap: var(--s-1);
}

.release-title {
  color: var(--ink);
  font-weight: 650;
}

.release-summary {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.release-toggle::before {
  content: '+';
  color: var(--muted);
  font-size: 1.25rem;
}

.release-entry[open] .release-toggle::before {
  content: '−';
}

.release-details {
  border-top: 1px solid var(--line);
  padding: var(--s-5);
}

.release-details h2 {
  margin: 0 0 var(--s-3);
  font-size: 1rem;
}

.release-details ul {
  margin: 0;
  padding-left: var(--s-5);
  color: var(--muted);
}

.release-details li + li {
  margin-top: var(--s-2);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  margin-top: var(--s-9);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--s-7) var(--s-4);
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(140px, 1fr));
  gap: var(--s-6);
}

.site-footer h2 {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 var(--s-3);
}

.footer-brand p {
  margin: var(--s-3) 0 0;
  max-width: 34ch;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--s-2);
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer__bottom {
  border-top: 1px solid var(--line);
}

.site-footer__bottom p {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--s-4);
  font-size: 0.8125rem;
  text-align: right;
}

.site-footer__bottom a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.site-footer__bottom a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------- responsive --- */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--s-6);
    padding-top: var(--s-4);
  }
  .hero__copy {
    max-width: 100%;
  }
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Below this the text column beside a 320px screenshot gets too narrow to
   read, so the shot drops to its own full-width row under the step text. */
@media (max-width: 840px) {
  .guide-step {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .guide-step__shot {
    grid-column: 2 / -1;
    max-width: 100%;
    margin-top: var(--s-2);
  }
}

@media (max-width: 720px) {
  .page {
    padding: var(--s-6) var(--s-4) var(--s-8);
  }
  .section {
    margin-top: var(--s-8);
  }
  .stage {
    padding: 0;
  }
  .stage__glow {
    inset: -8% 0;
  }
  .stage__window {
    margin-right: 0;
    transform: none;
  }
  .stage__panel {
    position: static;
    width: auto;
    margin-top: var(--s-3);
  }
  .stage__chip,
  .stage__tile {
    display: none;
  }
  .analyzer {
    margin-right: 0;
  }
  .cta-band {
    padding: var(--s-7) var(--s-5);
  }
  .form {
    padding: var(--s-5);
  }
  .release-entry summary {
    grid-template-columns: 1fr auto;
    gap: var(--s-2) var(--s-4);
  }
  .release-meta {
    grid-column: 1;
  }
  .release-copy {
    grid-column: 1 / -1;
  }
  .release-toggle {
    grid-column: 2;
    grid-row: 1;
  }
  .release-details {
    padding: var(--s-5);
  }
  .compare__pro-callout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  /* Brand keeps its own row so the nav can scroll horizontally underneath it
     instead of squeezing the product name off the screen. */
  .site-header__inner {
    flex-wrap: wrap;
    gap: var(--s-2);
    padding: var(--s-3);
  }
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-bottom: 2px;
  }
  .theme-toggle {
    margin-left: auto;
  }
  .cta-row .button {
    width: 100%;
  }
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .site-footer__bottom p {
    text-align: center;
  }
  .guide-step {
    padding: var(--s-4);
  }
}

/* Phones: the collapsed menu leaves room for Get Pro, the main action, on one
   row. The Menu button drops its label first; only the narrowest phones drop
   Get Pro (Pricing is in the menu). */
@media (max-width: 480px) {
  .nav-toggle {
    width: 34px;
    padding: 0;
    justify-content: center;
  }
  .nav-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
@media (max-width: 380px) {
  .header-cta {
    display: none;
  }
}

/* A problem the customer needs to act on (e.g. a failed payment). */
.notice--warn {
  padding: var(--s-3) var(--s-4);
  border: 1px solid color-mix(in srgb, var(--warn, #b06000) 40%, transparent);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--warn, #b06000) 10%, var(--bg));
  color: var(--ink);
}

/* A neutral statement about the license (ended, revoked). */
.notice {
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  margin: 0;
}

/* ------------------------------------------------------- manage session --- */

.manage-summary {
  margin: 0;
  display: grid;
  gap: var(--s-3);
}

.manage-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-2);
}

.manage-summary dt {
  font-weight: 700;
}

.manage-summary dt::after {
  content: ':';
}

.manage-summary dd {
  margin: 0;
  min-width: 0;
}

/* Every block below the summary card starts the same distance down, so
   "Google accounts" and "Subscription" read as siblings. */
.manage-section {
  margin-top: var(--s-6);
}

.manage-section h2 {
  margin: 0 0 var(--s-3);
}

.manage-section > p + .manage-actions,
.manage-section > .notice + .manage-actions,
.manage-section > .notice + p {
  margin-top: var(--s-4);
}

/* Buttons wrap with a gap between them: stacked at phone width they used to
   touch. */
.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.manage-expired {
  margin-top: 0;
}

/* ------------------------------------------------------ confirm dialogs --- */

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  z-index: 70;
}

.confirm-dialog {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  width: 100%;
  padding: var(--s-5);
}

.confirm-dialog h2 {
  margin: 0 0 var(--s-3);
  font-size: 1.25rem;
}

.confirm-dialog p {
  margin: 0;
  color: var(--ink-2);
}

.confirm-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: flex-end;
  margin-top: var(--s-5);
}

/* ------------------------------------------------- comparison on phones --- */

/* Phones get all three columns at once instead of a table wider than the
   screen with Pro scrolled out of sight: the value columns shrink to fit and
   feature names wrap. */
@media (max-width: 600px) {
  .compare {
    min-width: 0;
    font-size: 0.875rem;
  }
  .compare th,
  .compare td {
    padding: var(--s-2) var(--s-3);
  }
  .compare td:not(:first-child),
  .compare th:not(:first-child) {
    width: 76px;
  }
  .compare .compare__pro {
    width: 84px;
  }
  .compare thead th {
    letter-spacing: 0.04em;
  }
}

@media (max-width: 420px) {
  /* The column is already tinted as the recommended one; the pill does not
     fit an 84px column. */
  .compare__pro-badge {
    display: none;
  }
  .compare th,
  .compare td {
    padding: var(--s-2);
  }
  .compare td:not(:first-child),
  .compare th:not(:first-child) {
    width: 68px;
  }
  .compare .compare__pro {
    width: 72px;
  }
}

/* No sideways scroll is left on phones, so the wrapper can let the column
   headings stick under the site header while a reader works down the 40-row
   list; "Free" and "Pro" stay in view the whole way. */
@media (max-width: 600px) {
  .compare-wrap {
    overflow: visible;
  }
  .compare thead th {
    position: sticky;
    top: 58px;
    z-index: 1;
  }
}
