/* TabCompass site. Tokens follow branding/BRAND.md. */
@font-face {
  font-family: 'Instrument Sans';
  src: url('/assets/fonts/instrument-sans-600-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --surface: #ffffff;
  --surface-soft: #f5f6fa;
  --ink: #141a33;
  --muted: #5d6475; /* 5.9:1 on white */
  --line: #e1e4ee;
  --accent: #2f55e4; /* 5.93:1 behind white text */
  --accent-fg: #ffffff;
  --night: #2638a8;
  --night-ink: #ffffff; /* 9.49:1 on night */
  --night-muted: #cdd5ff; /* 6.4:1 on night */
  --needle: #ff7a45; /* graphics only, never text */
  --yes: #1d7a4a; /* 5.5:1 on white */
  --radius: 14px;
  --display: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1b1d22;
    --surface-soft: #22252c;
    --ink: #e9ecf7;
    --muted: #a3aabb; /* 7.0:1 on #1b1d22 */
    --line: #343844;
    --accent: #7095ff; /* 5.97:1 on surface */
    --accent-fg: #0f1320; /* 6.55:1 on accent */
    --night: #1f2c86;
    --yes: #5fd39a;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(36px, 5.2vw, 56px);
}

h2 {
  font-size: clamp(28px, 3.4vw, 38px);
}

h3 {
  font-size: 20px;
  letter-spacing: -0.005em;
}

p {
  margin: 0 0 1em;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}

.skip:focus {
  left: 8px;
}

/* ----- header / footer ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--surface);
    backdrop-filter: none;
  }
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand img {
  display: block;
  height: 34px;
  width: auto;
}

.site-header nav {
  display: flex;
  gap: 4px;
}

.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
}

.site-header nav a:hover,
.site-header nav a[aria-current='page'] {
  background: var(--surface-soft);
}

@media (max-width: 640px) {
  .site-header nav a:not([href='/guide/']) {
    display: none;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding: 48px 0 32px;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-grid h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-family: var(--body);
  margin-bottom: 12px;
}

.footer-grid nav a {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  text-decoration: none;
  padding: 3px 0;
}

.footer-grid nav a:hover {
  color: var(--accent);
}

.legal {
  margin-top: 32px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ----- buttons, keycaps ----- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

/* Placeholder until the store listing exists: must not look pressable. */
.button.is-soon {
  cursor: default;
  background: var(--surface-soft);
  border: 1px dashed var(--muted);
  color: var(--ink);
  font-weight: 500;
}

.kbd {
  display: inline-flex;
  gap: 6px;
  vertical-align: middle;
}

.kbd kbd {
  font: 600 0.62em/1 var(--body);
  min-width: 1.9em;
  height: 1.9em;
  padding: 0 0.45em;
  display: inline-grid;
  place-items: center;
  border-radius: 0.38em;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 2px 0 var(--line);
  letter-spacing: 0;
}

/* ----- hero ----- */
.hero {
  padding: 72px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}

.hero h1 .kbd {
  margin-left: 0.15em;
}

.lede {
  font-size: 20px;
  color: var(--muted);
  max-width: 34em;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 28px 0 14px;
}

.fine {
  font-size: 14px;
  color: var(--muted);
}

.shot {
  margin: 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 1px 2px rgb(20 26 51 / 0.06),
    0 24px 48px -12px rgb(20 26 51 / 0.22);
}

.shot img {
  display: block;
  width: 100%;
}

.shot figcaption {
  font-size: 14px;
  color: var(--muted);
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
}

/* ----- sections ----- */
section.band {
  padding: 80px 0 0;
}

.section-head {
  max-width: 44em;
  margin-bottom: 36px;
}

.section-head p {
  color: var(--muted);
  font-size: 19px;
}

.problem {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.problem div,
.feature {
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 24px;
}

.problem strong {
  display: block;
  font: 600 32px/1.1 var(--display);
  margin-bottom: 6px;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.feature.wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 32px;
  align-items: center;
}

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

.feature ul {
  padding-left: 1.1em;
  margin: 0;
}

@media (max-width: 760px) {
  .problem,
  .features,
  .feature.wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.steps li {
  counter-increment: step;
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}

.steps li::before {
  content: 'Step ' counter(step);
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

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

/* ----- comparison ----- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 1080px;
}

.compare th,
.compare td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare thead th {
  font-size: 14px;
  background: var(--surface-soft);
  position: sticky;
  top: 0;
}

.compare tbody th {
  font-weight: 500;
  position: sticky;
  left: 0;
  background: var(--surface);
  min-width: 220px;
}

.compare thead .us,
.compare td.us {
  min-width: 150px;
}

.compare .us {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  font-weight: 600;
}

.compare tr:last-child > * {
  border-bottom: 0;
}

.yes::before {
  content: '✓ ';
  color: var(--yes);
  font-weight: 700;
}

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

.no::before {
  content: '— ';
}

.sources {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.sources ul {
  columns: 2;
  padding-left: 1.1em;
}

@media (max-width: 760px) {
  .sources ul {
    columns: 1;
  }
}

/* ----- privacy band (night) ----- */
.night {
  background: var(--night);
  color: var(--night-ink);
  border-radius: 24px;
  padding: 56px 48px;
  margin-top: 80px;
}

.night .section-head p,
.night p {
  color: var(--night-muted);
}

.night a {
  color: var(--night-ink);
}

.night-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 40px;
}

.night h3 {
  color: var(--night-ink);
}

@media (max-width: 760px) {
  .night {
    padding: 36px 22px;
  }
  .night-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ----- pricing ----- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.plan.featured {
  border: 2px solid var(--accent);
}

.plan .price {
  font: 600 34px/1.1 var(--display);
  margin: 4px 0 4px;
}

.plan ul {
  padding-left: 1.1em;
  margin: 12px 0 0;
}

.plan .tag {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  margin-bottom: 12px;
}

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

/* ----- FAQ ----- */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
}

.faq details p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* ----- long-form pages (guide, policies) ----- */
.doc-head {
  padding-top: 56px;
}

.doc-head p {
  max-width: 40em;
}

.doc {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  padding-top: 24px;
}

.doc-nav {
  position: sticky;
  top: 88px;
  align-self: start;
  font-size: 15px;
}

.doc-nav ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.doc-nav a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  text-decoration: none;
}

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

.prose {
  max-width: 44em;
}

.prose h2 {
  font-size: 28px;
  margin-top: 56px;
  padding-top: 8px;
  scroll-margin-top: 80px;
}

.prose h3 {
  margin-top: 28px;
  scroll-margin-top: 80px;
}

.prose li {
  margin-bottom: 6px;
}

.prose code {
  font:
    14px/1.4 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  background: var(--surface-soft);
  padding: 2px 6px;
  border-radius: 6px;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  margin: 12px 0 20px;
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.callout {
  border-left: 3px solid var(--accent);
  background: var(--surface-soft);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
}

@media (max-width: 860px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .doc-nav {
    position: static;
  }
}
