/* The site around the hero. Tokens come from /hero/hero.css (loaded first on every page): cobalt is the brand and what
   you press, yellow is the install button only, ink on paper for reading. The extension's own colours live inside its
   screenshots and the hero demo, never here. */

:root {
  --text-h2: clamp(1.625rem, 1.9vw + 1rem, 2.625rem);
  --text-h3: 1.1875rem;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --band-y: clamp(64px, 9vw, 136px);
  --rule: var(--color-paper-2);
  --rule-strong: #c9cde3;
  --radius-shot: 18px;
}

/* light sections get an ink focus ring; the cobalt plates keep hero.css's white one */
main :focus-visible, .foot :focus-visible { outline-color: var(--color-accent); }
.closer :focus-visible, .masthead :focus-visible { outline-color: var(--color-focus-on-accent); }

.skip { position: absolute; left: var(--space-md); top: -100px; z-index: 10; padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-accent-ink); border-radius: var(--space-xs); font-weight: 700; }
.skip:focus { top: var(--space-md); border: 3px solid var(--color-signal); }
.skip:focus-visible { outline: 3px solid var(--color-ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
/* main .band only: the hero demo has its own .band (a strip of the capture) */
main .band { padding-block: var(--band-y) 0; }

h2 { margin: 0 0 var(--space-md); font-family: var(--font-display); font-synthesis: none; font-stretch: 125%; font-weight: 900; font-size: var(--text-h2); line-height: 1.06; letter-spacing: -0.015em; text-wrap: balance; max-width: 22ch; }
h3 { text-wrap: balance; margin: var(--space-lg) 0 var(--space-2xs); font-size: var(--text-h3); line-height: 1.3; font-weight: 700; }
.lead { font-size: var(--text-lead); line-height: 1.5; color: var(--color-ink-2); max-width: 60ch; }
.narrow { max-width: 52ch; }
.fine { margin-top: var(--space-md); font-size: var(--text-xs); line-height: 1.5; color: var(--color-muted); max-width: 70ch; }
.split-text .more { display: inline-block; margin-top: var(--space-md); }
.more { font-weight: 700; color: var(--color-accent); text-decoration-thickness: 2px; }
.more:hover { color: var(--color-accent-deep); }

/* ---------- the film ---------- */
.film-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: var(--space-xl); align-items: start; }
.film { margin: 0; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--color-accent); border-radius: var(--radius-shot); }
.transcript { margin-top: var(--space-lg); border-top: 1px solid var(--rule-strong); padding-top: var(--space-sm); }
.transcript summary { cursor: pointer; font-weight: 700; color: var(--color-accent); min-height: 44px; display: flex; align-items: center; }
.transcript ol { margin: var(--space-xs) 0 0; padding-left: 1.25em; display: grid; gap: var(--space-2xs); font-size: var(--text-sm); color: var(--color-ink-2); }

/* ---------- a text column beside one screenshot ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-xl) clamp(32px, 6vw, 96px); align-items: center; }
.split.flip .split-text { order: 2; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-shot); border: 1px solid var(--rule-strong); background: var(--color-ct-page); }
.split .shot img { max-width: 520px; margin-inline: auto; }

/* the trade: one offer out, one in, ruled like a receipt */
.trade { margin-top: var(--space-lg); width: 100%; max-width: 30rem; border-collapse: collapse; font-size: var(--text-sm); }
.trade caption { text-align: left; font-weight: 700; padding-bottom: var(--space-xs); }
.trade thead th { text-align: left; font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); padding-bottom: var(--space-2xs); border-bottom: 2px solid var(--color-ink); }
.trade thead th:last-child, .trade td { text-align: right; }
.trade tbody th { text-align: left; }
.trade tbody th, .trade td { padding: var(--space-sm) 0; border-bottom: 1px solid var(--rule-strong); font-weight: 700; vertical-align: bottom; }
.trade td { font-size: var(--text-xl); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: var(--space-md); color: var(--color-muted); }
.trade .win td { color: var(--color-ink); }
.trade .tag { display: block; font-size: var(--text-xs); font-weight: 400; color: var(--color-muted); }

/* ---------- where it shows ---------- */
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-lg); margin-top: var(--space-s32); }
.shots figcaption { margin-top: var(--space-sm); font-size: var(--text-sm); line-height: 1.45; color: var(--color-ink-2); }
.shots figcaption strong { color: var(--color-ink); }

/* ---------- the comparison ---------- */
.table-scroll { margin-top: var(--space-s32); overflow-x: auto; }
.compare { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: var(--text-md); }
.compare th, .compare td { text-align: left; vertical-align: top; padding: var(--space-md) var(--space-md) var(--space-md) 0; border-bottom: 1px solid var(--rule-strong); }
.compare thead th { font-size: var(--text-sm); font-weight: 700; border-bottom: 2px solid var(--color-ink); padding-top: 0; }
.compare thead th:last-child { color: var(--color-accent); }
.compare tbody th { font-weight: 700; width: 24%; }
.compare td:nth-child(2) { color: var(--color-muted); width: 32%; }
.compare td:last-child { font-weight: 700; }

/* ---------- private ---------- */
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--color-ink); }
.facts li { padding: var(--space-md) 0; border-bottom: 1px solid var(--rule-strong); font-family: var(--font-display); font-stretch: 112%; font-weight: 900; font-size: clamp(1.25rem, 1.2vw + 0.9rem, 1.75rem); line-height: 1.2; }

/* ---------- questions ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr); gap: var(--space-lg) var(--space-xl); align-items: start; }
.faq h2 { position: sticky; top: var(--space-lg); }
.faq-list { min-width: 0; }
.faq details { border-bottom: 1px solid var(--rule-strong); }
.faq-list details:first-child { border-top: 2px solid var(--color-ink); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--space-md); align-items: center; min-height: 56px; padding: var(--space-sm) 0; font-weight: 700; font-size: var(--text-md); line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: var(--text-xl); font-weight: 400; color: var(--color-accent); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: var(--space-lg); color: var(--color-ink-2); max-width: 68ch; }

/* ---------- the closing plate (cobalt, like the hero) ---------- */
.closer { margin: var(--band-y) auto 0; width: calc(100% - 2 * var(--space-md)); max-width: calc(var(--container) - 2 * var(--space-md)); background: var(--color-accent); color: var(--color-accent-ink); border-radius: var(--radius-plate); padding: var(--space-s48) var(--space-lg); }
@media (min-width: 64rem) { .closer { padding: 88px var(--space-s48); } }
.closer-in { max-width: var(--wrap); margin-inline: auto; display: grid; gap: var(--space-md); justify-items: start; }
.closer h2 { margin: 0; font-size: var(--text-display); max-width: 16ch; }
.closer p { font-size: var(--text-lead); max-width: 52ch; }
.closer .terms { font-size: var(--text-xs); }

/* ---------- the masthead on the inner pages ---------- */
.masthead { margin: var(--space-md) auto 0; width: calc(100% - 2 * var(--space-md)); max-width: calc(var(--container) - 2 * var(--space-md)); background: var(--color-accent); color: var(--color-accent-ink); border-radius: var(--radius-plate); padding: var(--space-md) var(--gutter) clamp(40px, 6vw, 80px); }
.mast-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); min-height: 44px; }
.mast-title { max-width: var(--wrap); margin: clamp(32px, 5vw, 72px) auto 0; padding-inline: 0; }
.mast-title h1 { margin: 0 0 var(--space-md); font-family: var(--font-display); font-synthesis: none; font-stretch: 125%; font-weight: 900; font-size: var(--text-display); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.mast-title .lead { color: var(--color-accent-ink); max-width: 46ch; }
.mast-title a { color: inherit; font-weight: 700; }
.cta.small { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); }

/* ---------- inner pages ---------- */
.doc-main { padding: var(--band-y) var(--gutter); }
.prose { max-width: 700px; margin-inline: auto; }
.prose h2 { font-size: var(--text-xl); font-stretch: 112%; margin: var(--space-s48) 0 var(--space-sm); max-width: none; }
.prose p + p { margin-top: var(--space-sm); }
.prose p, .prose li { max-width: 58ch; text-wrap: pretty; }
.prose ul + p { margin-top: var(--space-sm); }
.prose ul { margin: var(--space-sm) 0 0; padding-left: 1.25em; display: grid; gap: var(--space-xs); }
.prose a:not(.more) { color: var(--color-accent); }
.prose .meta { color: var(--color-muted); font-size: var(--text-sm); margin-bottom: var(--space-lg); }
.prose .lead { margin-bottom: var(--space-sm); }
.lost .more { display: inline-block; }

/* ---------- footer ---------- */
.foot { margin-top: var(--band-y); border-top: 1px solid var(--rule-strong); }
.foot-in { max-width: var(--wrap); margin-inline: auto; padding: var(--space-xl) var(--gutter) var(--space-lg); display: grid; grid-template-columns: auto 1fr; gap: var(--space-md) var(--space-xl); align-items: center; }
.foot .wordmark { font-size: var(--text-md); color: var(--color-accent); }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2xs) var(--space-lg); }
.foot-nav a { font-size: var(--text-sm); font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-nav a:hover { color: var(--color-accent); text-decoration: underline; }
.foot-legal { grid-column: 1 / -1; font-size: var(--text-xs); line-height: 1.55; color: var(--color-muted); max-width: 90ch; }
.home .foot { margin-top: var(--space-s48); }

/* ---------- narrower screens ---------- */
@media (max-width: 64rem) {
  .film-wrap, .faq { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .faq h2 { position: static; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 48rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.flip .split-text { order: 0; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .foot-nav { justify-content: flex-start; }
}
@media (max-width: 40rem) {
  .shots { grid-template-columns: minmax(0, 1fr); gap: var(--space-s32); }
  .closer, .masthead { width: calc(100% - 2 * var(--space-xs)); margin-top: var(--space-xs); }
  .closer .install { flex-wrap: wrap; }
  .compare { min-width: 0; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tr { padding: var(--space-md) 0; border-bottom: 1px solid var(--rule-strong); }
  .compare tr:first-child { border-top: 2px solid var(--color-ink); }
  .compare th, .compare td { border: 0; padding: 0; }
  .compare tbody th, .compare td:nth-child(2) { width: auto; }
  .compare tbody th { margin-bottom: var(--space-xs); }
  .compare td + td { margin-top: var(--space-xs); }
  .compare td::before { content: attr(data-label) / ""; display: block; font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
  .compare td:last-child::before { color: var(--color-accent); }
  .masthead { padding: var(--space-sm) var(--space-md); }
  .masthead .wordmark { font-size: 1.125rem; }
  .cta.small { padding: 0 var(--space-sm); }
  @media (orientation: portrait) {
    .film video { aspect-ratio: 9 / 16; max-height: 85svh; margin-inline: auto; width: auto; max-width: 100%; }
  }
}
