/* The comparison tables (home page summary and /compare). Written by scripts/compare-build.mjs
   from compare/data.mjs. The first column and Rafe's column stay put while the others scroll. */
.vs, .stack { --yes: #2f7d4a; --part: #b5821c; --nomk: #b4ad9f; --c1: 206px; --c2: 176px; --cw: 126px; --row-bg: var(--paper); }
@media (prefers-color-scheme: dark) { .vs, .stack { --yes: #5fbf82; --part: #e0b053; --nomk: #6c6963; } }
.help .vs { --row-bg: var(--paper-2); }

.vs-home { max-width: 1420px; margin: clamp(44px, 7vh, 72px) auto 0; }
.vs-legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 20px; margin: 0 auto 22px; padding: 0 var(--pad); font-size: 14px; color: var(--muted); }
.vs-legend-note { flex-basis: 100%; text-align: center; font-size: 13.5px; }

.vs-n3 { --n: 3; --cw: 210px; }
.vs-n7 { --n: 7; }
.vs-n13 { --n: 13; }
.vs-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin; }
.vs-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vs-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: calc(var(--c1) + var(--c2) + var(--n, 7) * var(--cw)); min-width: 100%; font-size: 13.5px; line-height: 1.42; }
.vs-table th, .vs-table td { padding: 14px 12px; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--line); }
.vs-table td { color: var(--muted); }

.vs-table thead th { font-family: var(--serif); font-size: 19px; font-weight: 400; line-height: 1.2; color: var(--ink); vertical-align: baseline; padding-top: 18px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); background: var(--row-bg); }
.vs-table thead a { color: inherit; text-decoration: none; }
.vs-table thead a:hover { text-decoration: underline; text-underline-offset: 3px; }
.vs-kind { display: block; margin-top: 4px; text-wrap: balance; font-family: var(--sans); font-size: 12px; color: var(--muted); }

/* The two columns that stay */
.vs-table tbody th, .vs-table thead th:first-child { position: sticky; left: 0; z-index: 2; width: var(--c1); background: var(--row-bg); box-shadow: inset -1px 0 0 var(--line); }
.vs-table tbody th { font-size: 14.5px; font-weight: 500; color: var(--ink); text-wrap: balance; }
.vs-table .us { position: sticky; left: var(--c1); z-index: 1; width: var(--c2); background: var(--card); color: var(--ink); box-shadow: 10px 0 18px -16px rgba(40, 30, 10, .35); }
.vs-table thead th:first-child { z-index: 3; }
.vs-table thead .us { z-index: 3; color: var(--accent); font-size: 22px; border-radius: 18px 18px 0 0; }
.vs-table tbody tr:last-child .us { border-radius: 0 0 18px 18px; }

/* Status: a mark and a word, always both */
/* The status is inline text, so its word shares the row's baseline; the mark is centred on the word's x-height. */
.st { font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; margin-right: 2px; }
.mk { position: relative; display: inline-block; width: 15px; height: 15px; margin-right: 7px; vertical-align: calc(.273em - 7.5px); border-radius: 50%; box-sizing: border-box; }
.st-y .mk { background: var(--yes); }
.st-y .mk::after { content: ""; position: absolute; left: 4.6px; top: 2.2px; width: 3.6px; height: 7px; border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.st-p .mk { border: 1.6px solid var(--part); background: linear-gradient(90deg, var(--part) 50%, transparent 50%); }
.st-s .mk { border: 1.6px dashed var(--accent); }
.st-n .mk { border: 1.6px solid var(--nomk); }
.st-n .mk::after { content: ""; position: absolute; left: 3.2px; right: 3.2px; top: 5.1px; height: 1.6px; background: var(--nomk); }
.st-n .st { color: var(--muted); font-weight: 500; }
td.st-y { color: var(--ink); }
.vs-table td.us { color: var(--ink); }
.vs-table td.us .st { font-size: 14.5px; }
.vs-table td.us.st-n .st { color: var(--ink); }

/* Text rows and the price */
.vs-table td.tx { color: var(--ink); }
.vs-price th, .vs-price td { border-bottom: 0; padding-top: 20px; font-weight: 500; }
.vs-price td.us { color: var(--accent); font-weight: 600; }

.vs .compare-link { margin-top: 26px; padding: 0 var(--pad); text-align: center; text-wrap: balance; }

/* The full page */
.vs-full-wrap { max-width: none; padding: 0 0 clamp(60px, 10vh, 100px); }
.vs-full-wrap .vs-scroll { max-width: 1560px; margin: 0 auto; }
.vs-full { --c1: 236px; --c2: 196px; --cw: 152px; }
.vs-group th { position: static !important; box-shadow: none !important; background: var(--paper-2) !important; padding: 26px 0 10px !important; font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent) !important; }
.vs-group th span { position: sticky; left: 0; padding-left: 12px; }
.cmp-sources li { scroll-margin-top: 90px; }
.cmp-sources li:target { background: var(--accent-soft); border-radius: 8px; }
@media (min-width: 900px) {
  .vs-full-wrap .vs-scroll { max-height: calc(100vh - 120px); overflow-y: auto; border: 1px solid var(--line); border-radius: 22px; }
  .vs-full thead th { position: sticky; top: 0; z-index: 2; }
  .vs-full thead th:first-child, .vs-full thead .us { z-index: 4; }
}

@media (max-width: 700px) {
  .vs, .vs-full { --c1: 116px; --c2: 124px; --cw: 148px; }
  .help .vs-home { margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); }
  .vs-table { font-size: 13px; }
  .vs-table th, .vs-table td { padding: 12px 10px; }
  .vs-table tbody th { font-size: 13.5px; padding-left: 14px; }
  .vs-table thead th { font-size: 17px; }
  .vs-table thead .us { font-size: 19px; }
  .vs-legend { justify-content: flex-start; }
  .vs-legend-note { text-align: left; }
}

/* The home table: short words in each cell, the sentence in a note (vs.js) */
.vs-short { --c1: 196px; --c2: 158px; --cw: 122px; min-width: 0; margin: 0 auto; font-size: 13px; }
.vs-short th, .vs-short td { padding: 11px 12px; vertical-align: top; }
.vs-short .vs-w { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.vs-short td.us .vs-w, .vs-short td.st-y .vs-w { color: var(--ink); }
.vs-short td.us .vs-w { font-weight: 500; }
.vs-q { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: help; -webkit-tap-highlight-color: transparent; }
.vs-q .vs-w, .vs-q:not(:has(.vs-w)) .st, .vs-label { text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.vs-q:hover .vs-w, .vs-q:hover:not(:has(.vs-w)) .st, .vs-label:hover { text-decoration-color: currentColor; }
.vs-q:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.vs-short tbody th { font-size: 14px; line-height: 1.3; }
.vs-short .vs-label { font-weight: 500; color: var(--ink); text-wrap: balance; }
.vs-short .vs-group th { padding: 22px 0 8px !important; }
.vs-short .vs-price td { font-size: 13px; line-height: 1.35; }
/* The column bands: which kind of help each rival is */
.vs-short col.c-label { width: var(--c1); }
.vs-short col.c-us { width: var(--c2); }
.vs-short col.c-rival { width: var(--cw); }
.vs-short .vs-bands td, .vs-short .vs-bands th { padding: 0 12px 0; border-bottom: 0; background: var(--row-bg); }
.vs-short .vs-bands th { padding-top: 6px; text-align: center; font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vs-bands th span { display: block; padding-bottom: 7px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.vs-bands th + th span { margin-left: 14px; }
.vs-bands td:first-child { position: sticky; left: 0; z-index: 3; }
.vs-short thead .vs-bands .us { height: 18px; padding: 0; border-radius: 18px 18px 0 0; }
.vs-short thead tr:not(.vs-bands) .us { border-radius: 0; padding-top: 8px; }
/* The note */
.vs-pop { position: fixed; z-index: 60; max-width: min(300px, calc(100vw - 16px)); padding: 11px 13px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 13.5px; line-height: 1.45; box-shadow: 0 10px 30px -8px rgba(20, 15, 5, .45); pointer-events: none; }
.vs-pop[hidden] { display: none; }
@media (max-width: 700px) {
  .vs-short { --c1: 104px; --c2: 108px; --cw: 106px; font-size: 12.5px; }
  .vs-short th, .vs-short td { padding: 10px 8px; }
  .vs-short tbody th { font-size: 12.5px; padding-left: 12px; }
  .vs-short .vs-w { font-size: 12px; }
  .vs-short .st { font-size: 13px; }
  .vs-short td.us .st { font-size: 13.5px; }
  .vs-short .vs-bands th { font-size: 10.5px; letter-spacing: .06em; }
}

/* One job at a time: single-purpose tools and their prices, then Rafe for each job */
.stack { max-width: 1100px; margin: clamp(48px, 8vh, 80px) auto 0; padding: 0 var(--pad); }
.stack-title { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.2; text-align: center; text-wrap: balance; }
.stack-lede { max-width: 38em; margin: 14px auto 0; text-align: center; color: var(--muted); font-size: 15.5px; line-height: 1.5; text-wrap: pretty; }
.stack-lanes { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid var(--line); }
.lane { display: grid; grid-template-columns: 210px 1fr 300px; gap: 6px 26px; align-items: baseline; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.lane h4 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.lane-tools { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.lane-tools li { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; white-space: nowrap; }
.lane-tools a { color: var(--ink); text-decoration: none; }
.lane-tools a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lane-tools .t-price { color: var(--muted); font-variant-numeric: tabular-nums; }
.lane-rafe { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink); }
.lane-rafe .st { color: var(--accent); }
.stack-close { max-width: 40em; margin: 26px auto 0; text-align: center; font-size: 16.5px; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.stack-fine { margin: 12px auto 0; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 860px) {
  .stack-fine { text-align: left; }
  .lane { grid-template-columns: 1fr; gap: 9px; padding: 16px 0; }
  .stack-lede, .stack-close { text-align: left; }
  .stack-title { text-align: left; }
}

/* The recorders page: what the first twelve months cost */
.rec-cost { max-width: 980px; margin: 0 auto; padding: clamp(60px, 10vh, 100px) var(--pad); }
.rec-cost h2 { font-size: clamp(26px, 2.6vw, 38px); }
.rec-cost > p { margin-top: 18px; color: var(--muted); max-width: 40em; }
.rec-cost .vs-scroll { margin-top: 30px; }
.cost-table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 15px; line-height: 1.4; }
.cost-table th, .cost-table td { padding: 13px 12px; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--line); }
.cost-table thead th { font-size: 13px; font-weight: 600; color: var(--muted); }
.cost-table tbody th { font-weight: 500; color: var(--ink); }
.cost-table td { color: var(--muted); }
.cost-table td:nth-child(2) { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 700px) { .cost-table { min-width: 560px; font-size: 14px; } .cost-table th, .cost-table td { padding: 11px 9px; } }
.cost-table tr.us th, .cost-table tr.us td { background: var(--card); color: var(--ink); }
.cost-table tr.us th { color: var(--accent); font-family: var(--serif); font-size: 19px; font-weight: 400; }
.rec-cost .cost-note { font-size: 15.5px; margin-top: 22px; }
.cmp-hero .kicker a { color: inherit; text-decoration: none; }
.rec-table .vs-scroll { max-width: 1180px; }
@media (min-width: 900px) { .rec-table .vs-scroll { max-height: none; overflow-y: visible; } }
