/* ==========================================================================
   Mediara Vault — website styles
   One stylesheet, no framework, no runtime dependencies.

   Order: tokens → reset → base type → layout → components → utilities.
   Brand values are taken from the app itself (lib/app/theme.dart:
   Trust Blue #1657A6, seed #1A5FB4) and from the Play feature graphic's
   sampled gradient (#2964D2 → #1747B9), so the site and the app read as
   the same product.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts — Inter, self-hosted. The app bundles the same typeface (SIL OFL);
   nothing is fetched from a third-party font CDN, which would be an odd
   request for a site about not phoning home.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-700.woff2') format('woff2');
}

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

  /* Brand */
  --brand: #1657a6;
  --brand-strong: #12488b;
  --brand-soft: #e7effb;
  --brand-softer: #f2f7fe;
  --grad-a: #2964d2;
  --grad-b: #1747b9;
  --grad-c: #0f3a95;
  --on-dark-accent: #9dbcf5;

  /* Surfaces & ink */
  --bg: #ffffff;
  --bg-subtle: #f5f8fd;
  --bg-tint: #eaf1fb;
  --surface: #ffffff;
  --ink: #0d1b2e;
  --ink-2: #33455e;
  --muted: #5c6e88;
  --line: #dde6f2;
  --line-strong: #c6d4e8;

  /* Semantic — mirrors AppSemanticColors in the app */
  --ok: #1b5e20;
  --ok-bg: #e6f4e7;
  --ok-line: #bfdec2;
  --warn: #a93000;
  --warn-bg: #fff1e0;
  --warn-line: #f2d3ae;
  --alert: #b71c1c;
  --alert-bg: #fdeceb;
  --alert-line: #f2c5c2;
  --info: #0d47a1;
  --info-bg: #eaf1fd;
  --info-line: #c8daf6;

  /* Shape & depth */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(13 27 46 / 0.06), 0 1px 3px rgb(13 27 46 / 0.05);
  --shadow-md: 0 4px 12px rgb(13 27 46 / 0.07), 0 2px 4px rgb(13 27 46 / 0.04);
  --shadow-lg: 0 18px 48px rgb(9 26 56 / 0.18);

  /* Rhythm */
  --container: 72rem;
  --gutter: clamp(1.1rem, 4vw, 2rem);
  --section-y: clamp(3.25rem, 7vw, 6rem);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --brand: #8fb4f2;
    --brand-strong: #b0cbf8;
    --brand-soft: #16263c;
    --brand-softer: #121e2e;

    --bg: #0b131f;
    --bg-subtle: #101b2a;
    --bg-tint: #142338;
    --surface: #101b2a;
    --ink: #e9eff8;
    --ink-2: #c2cfe1;
    --muted: #94a5bd;
    --line: #23334a;
    --line-strong: #2f4360;

    --ok: #93d39a;
    --ok-bg: #12261a;
    --ok-line: #234a2c;
    --warn: #f0b183;
    --warn-bg: #2a1a10;
    --warn-line: #4d3320;
    --alert: #f2a6a1;
    --alert-bg: #2b1416;
    --alert-line: #522527;
    --info: #9dbcf5;
    --info-bg: #10203a;
    --info-line: #223a5e;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 14px rgb(0 0 0 / 0.45);
    --shadow-lg: 0 18px 48px rgb(0 0 0 / 0.55);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

svg {
  flex: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

/* --------------------------------------------------------------------------
   Base typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.15rem, 1.45rem + 3vw, 3.5rem);
}

h2 {
  font-size: clamp(1.65rem, 1.25rem + 1.7vw, 2.4rem);
}

h3 {
  font-size: clamp(1.2rem, 1.06rem + 0.6vw, 1.45rem);
  letter-spacing: -0.01em;
}

h4 {
  font-size: 1.0625rem;
  letter-spacing: 0;
}

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-strong);
}

strong,
b {
  font-weight: 600;
}

small {
  font-size: 0.875rem;
}

code,
kbd {
  font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-tint);
  border-radius: 5px;
  padding: 0.1em 0.36em;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.4em;
}

li::marker {
  color: var(--muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

blockquote {
  margin: 0 0 1.1em;
  padding-left: 1.1rem;
  border-left: 3px solid var(--line-strong);
  color: var(--ink-2);
}

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

::selection {
  background: var(--brand);
  color: #fff;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -10rem;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-md);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.75rem;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 48rem;
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(2.25rem, 4.5vw, 3.5rem);
}

.section--subtle {
  background: var(--bg-subtle);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head p {
  color: var(--ink-2);
  font-size: 1.125rem;
}

.eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.6rem;
}

.lede {
  font-size: clamp(1.075rem, 1rem + 0.35vw, 1.25rem);
  color: var(--ink-2);
}

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header[data-scrolled='true'] {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  flex: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav a {
  display: inline-block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  background: var(--bg-tint);
  color: var(--ink);
}

.nav a[aria-current='page'] {
  color: var(--brand);
  font-weight: 600;
}

.header-cta {
  flex: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 62rem) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-header__nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 0.75rem var(--gutter) 1.25rem;
  }

  .site-header__nav[data-open='true'] {
    display: block;
  }

  .site-header__nav .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
  }

  .site-header__nav .nav a {
    padding: 0.7rem 0.75rem;
    font-size: 1rem;
  }

  .site-header__nav .btn {
    width: 100%;
    margin-top: 0.75rem;
  }

  /* Two classes, not one: `.btn { display: inline-flex }` is defined later in
     this file, so a single-class rule here would lose the cascade on equal
     specificity and leave a 128px button hanging off the right edge of every
     page. */
  .btn.header-cta--desktop {
    display: none;
  }
}

@media (min-width: 62.01rem) {
  .site-header__nav {
    display: contents;
  }

  .site-header__nav .btn {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.25rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: 0.9688rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease, color 0.15s ease;
}

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

.btn--primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn--primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #fff;
}

.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--secondary:hover {
  background: var(--bg-tint);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--brand);
  border-color: transparent;
  padding-inline: 0.35rem;
}

.btn--ghost:hover {
  background: var(--bg-tint);
}

/* On the dark hero */
.btn--on-dark {
  background: #fff;
  color: #10305e;
  border-color: #fff;
}

.btn--on-dark:hover {
  background: #eaf1fd;
  color: #10305e;
}

.btn--outline-on-dark {
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  border-color: rgb(255 255 255 / 0.42);
}

.btn--outline-on-dark:hover {
  background: rgb(255 255 255 / 0.16);
  color: #fff;
}

.btn--lg {
  padding: 0.9rem 1.6rem;
  font-size: 1.0313rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Google Play badge-style button, drawn rather than using Google's PNG */
.btn--play {
  padding: 0.6rem 1.35rem 0.6rem 1.05rem;
  text-align: left;
  gap: 0.7rem;
}

.btn--play .btn__stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.btn--play .btn__stack span:first-child {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.btn--play .btn__stack span:last-child {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--grad-a) 0%, var(--grad-b) 52%, var(--grad-c) 100%);
  color: #fff;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem);
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto -10% -55% 40%;
  height: 90%;
  background: radial-gradient(closest-side, rgb(255 255 255 / 0.16), transparent 70%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 56rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.25rem, 1.35rem + 3.6vw, 3.6rem);
}

.hero .eyebrow {
  color: var(--on-dark-accent);
}

.hero__lede {
  font-size: clamp(1.075rem, 1rem + 0.5vw, 1.25rem);
  color: #d8e4f9;
  max-width: 34rem;
}

.hero__note {
  margin-top: 1.35rem;
  font-size: 0.9063rem;
  color: #bed0ee;
}

.hero__note a {
  color: #fff;
}

.hero__device {
  display: flex;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Device frame — the app screenshot in a phone shell, matching the shape
   used by the Play marketing frames.
   -------------------------------------------------------------------------- */
.phone {
  --phone-w: 17.5rem;
  width: var(--phone-w);
  max-width: 100%;
  flex: none;
  padding: 0.55rem;
  border-radius: 2.1rem;
  background: linear-gradient(160deg, #2b3648, #131a26 60%, #0a0f18);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgb(255 255 255 / 0.09);
}

.phone--sm {
  --phone-w: 15rem;
}

.phone__screen {
  position: relative;
  border-radius: 1.65rem;
  overflow: hidden;
  background: #f6f8fb;
  aspect-ratio: 1080 / 2085;
}

.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.phone-pair {
  display: flex;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Trust bar
   -------------------------------------------------------------------------- */
.trustbar {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  padding-block: 1.1rem;
}

.trustbar ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem clamp(1rem, 3vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.trustbar li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.9063rem;
  font-weight: 500;
  color: var(--ink-2);
}

.trustbar svg {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 2.2vw, 1.6rem);
}

.card h3 {
  margin-bottom: 0.4rem;
}

/* A card whose heading is an <h2> for document outline reasons still reads at
   card scale — the outline level and the type size are separate decisions. */
.card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.card ol,
.card ul {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.card p {
  color: var(--ink-2);
  font-size: 0.9688rem;
  margin-bottom: 0.75em;
}

.card--link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
}

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

.card--link .card__more {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9375rem;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 0.9rem;
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card--flat {
  border: 0;
  background: var(--bg-subtle);
}

/* Compact "what you can keep" tiles */
.tile-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tile-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
}

.tile-list svg {
  width: 19px;
  height: 19px;
  color: var(--brand);
  margin-top: 0.15rem;
}

.tile-list strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.tile-list span {
  color: var(--muted);
  font-size: 0.8438rem;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Feature rows — screenshot beside prose, alternating
   -------------------------------------------------------------------------- */
.feature {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
  padding-block: clamp(2rem, 4vw, 3rem);
}

.feature + .feature {
  border-top: 1px solid var(--line);
}

@media (min-width: 54rem) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .feature--flip .feature__media {
    order: -1;
  }
}

.feature__media {
  display: flex;
  justify-content: center;
}

.feature__body h3 {
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem);
}

.feature__body p {
  color: var(--ink-2);
}

.checklist {
  list-style: none;
  margin: 0 0 1.1em;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.55rem;
  color: var(--ink-2);
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.7rem;
  height: 0.38rem;
  border-left: 2.5px solid var(--brand);
  border-bottom: 2.5px solid var(--brand);
  transform: rotate(-45deg);
}

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

/* --------------------------------------------------------------------------
   Notes / callouts
   -------------------------------------------------------------------------- */
.note {
  border: 1px solid var(--info-line);
  background: var(--info-bg);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  font-size: 0.9688rem;
  color: var(--ink-2);
}

.note > :first-child {
  margin-top: 0;
}

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

.note--warn {
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.note--alert {
  border-color: var(--alert-line);
  background: var(--alert-bg);
}

.note--ok {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.note__title {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

/* Medical disclaimer band */
.disclaimer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--line);
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
}

.disclaimer p {
  max-width: 58rem;
  margin-inline: auto;
  text-align: center;
  color: var(--ink-2);
  font-size: 0.9688rem;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 1.75rem;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 34rem;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 0.9rem 1.1rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}

th,
td {
  text-align: left;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  background: var(--bg-subtle);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: 0;
}

tbody th {
  font-weight: 600;
  color: var(--ink);
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.yes {
  color: var(--ok);
  font-weight: 600;
}

.no {
  color: var(--alert);
  font-weight: 600;
}

.table-wrap--plain {
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
}

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

.faq summary::after {
  content: '';
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.42rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
}

.faq summary:hover {
  color: var(--brand);
}

.faq__answer {
  padding-bottom: 1.35rem;
  max-width: 52rem;
  color: var(--ink-2);
  font-size: 1rem;
}

.faq__answer > :first-child {
  margin-top: 0;
}

.faq-group + .faq-group {
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
}

.faq-group h2 {
  margin-bottom: 0.75rem;
}

/* Jump nav */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 2.25rem;
  padding: 0;
}

.jump-nav li {
  margin: 0;
}

.jump-nav a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
  background: var(--surface);
}

.jump-nav a:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-softer);
}

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.steps li {
  position: relative;
  counter-increment: step;
  padding: 1.1rem 1.25rem 1.1rem 3.65rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9688rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.15rem;
  top: 1.05rem;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}

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

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */
.plans {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  align-items: start;
}

.plan {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  background: var(--surface);
}

.plan--featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.plan__name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.plan__name h2,
.plan__name h3 {
  font-size: 1.45rem;
  margin: 0;
}

.plan__price {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.plan__sub {
  color: var(--muted);
  font-size: 0.9063rem;
  margin-bottom: 1.15rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--brand-soft);
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   Legal document layout
   -------------------------------------------------------------------------- */
.doc-header {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
}

.doc-header h1 {
  font-size: clamp(1.9rem, 1.35rem + 2.2vw, 2.85rem);
  margin-bottom: 0.35rem;
}

/* A full section's worth of padding under the tinted header reads as a hole,
   because the header has already done the work of separating the title from
   the content. */
.doc-header + .section,
.doc-header + .doc-layout {
  padding-top: clamp(2rem, 4vw, 3rem);
}

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

.doc-layout {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
  padding-block: var(--section-y);
}

/* A grid item's automatic minimum size is its min-content width, and .prose
   contains tables with a min-width. Without this, the single mobile column is
   sized by the widest table on the page and everything — including the table
   of contents — grows with it. The tables still scroll inside .table-wrap. */
.doc-layout > *,
.feature > * {
  min-width: 0;
}

@media (min-width: 62rem) {
  .doc-layout {
    grid-template-columns: 15.5rem minmax(0, 1fr);
  }
}

.toc {
  align-self: start;
}

@media (min-width: 62rem) {
  .toc {
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
  }
}

.toc h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 0.34rem 0 0.34rem 0.85rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 0.9063rem;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.4;
}

.toc a:hover {
  color: var(--brand);
}

.toc a.is-active {
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 600;
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
  margin-top: 2.5rem;
  padding-top: 0.25rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.125rem;
  margin-top: 1.85rem;
}

.prose table {
  min-width: 30rem;
}

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

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(150deg, var(--grad-a), var(--grad-c));
  color: #fff;
  padding-block: clamp(2.75rem, 6vw, 4.25rem);
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  max-width: 30rem;
  margin-inline: auto;
}

.cta-band p {
  color: #d8e4f9;
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

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

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 3.75rem) 2rem;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 2rem clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  margin-bottom: 2.25rem;
}

.footer-brand {
  grid-column: 1 / -1;
  max-width: 22rem;
}

@media (min-width: 48rem) {
  .footer-brand {
    grid-column: auto;
  }
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9063rem;
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.site-footer h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-bottom p {
  margin: 0;
}

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

.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-lg {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

.mb-lg {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

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

.text-sm {
  font-size: 0.9375rem;
}

/* The eyebrow above a legal document's title is a breadcrumb back to the
   index. It should read as the eyebrow — an underlined run of tracked
   uppercase looks like a mistake — while still being obviously clickable
   on hover and focus. */
.eyebrow a {
  color: inherit;
  text-decoration: none;
}

.eyebrow a:hover,
.eyebrow a:focus-visible {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.stack > * + * {
  margin-top: 1.1rem;
}
