/* One stylesheet for the whole site.
   Light, plain and quiet on purpose: the page is a price table, and everything
   that is not a number or a label is in the way of one. */

:root {
  --bg: #ffffff;
  --sunk: #f7f8fa;
  --line: #e4e7ec;
  --line-soft: #eef0f3;
  --ink: #16191f;
  --ink-2: #444b56;
  --dim: #6b7280;
  --accent: #1552b8;
  --good: #0a7a4a;
  --warn: #9a5b00;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

/* Header ------------------------------------------------------------- */
header.site { border-bottom: 1px solid var(--line); background: var(--bg); }
header.site .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; min-height: 3.75rem; }
header.site a.brand { font-weight: 650; font-size: 1.0625rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
header.site nav { margin-left: auto; display: flex; gap: 1.25rem; }
header.site nav a { color: var(--ink-2); text-decoration: none; font-size: .9375rem; }
header.site nav a:hover { color: var(--accent); }

main { padding: 2rem 0 3.5rem; }

/* Type --------------------------------------------------------------- */
h1 { font-size: 1.875rem; line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; font-weight: 650; }
h2 { font-size: 1.125rem; margin: 2.5rem 0 .75rem; letter-spacing: -.01em; font-weight: 650; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.lede { color: var(--dim); font-size: 1.0625rem; margin-bottom: 1.5rem; max-width: 46rem; }
.dim { color: var(--dim); }
.small { font-size: .875rem; }

/* The numbers strip --------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; margin: 0 0 1.5rem; }
.card { background: var(--bg); padding: .875rem 1rem; }
.card .k { color: var(--dim); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .15rem; }
.card .v { font-size: 1.5rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.note { background: var(--sunk); border: 1px solid var(--line); border-radius: .5rem; padding: .875rem 1rem; color: var(--ink-2); font-size: .9375rem; margin: 0 0 1.75rem; }
.note b { color: var(--ink); }
.note p:last-child { margin-bottom: 0; }

/* Filters ------------------------------------------------------------- */
.facets { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .625rem; }
.facets-k { color: var(--dim); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; width: 4.5rem; flex: none; }
a.facet { display: inline-flex; gap: .4rem; align-items: baseline; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 2rem; color: var(--ink-2); font-size: .875rem; background: var(--bg); }
a.facet:hover { border-color: var(--dim); text-decoration: none; }
a.facet.on { background: var(--ink); border-color: var(--ink); color: #fff; }
a.facet .n { color: var(--dim); font-size: .75rem; font-variant-numeric: tabular-nums; }
a.facet.on .n { color: rgba(255,255,255,.65); }

.find { margin: 1.25rem 0 .75rem; }
.find label { display: block; color: var(--dim); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }
.find input { width: 100%; max-width: 20rem; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--bg); color: var(--ink); font: inherit; font-size: .9375rem; }
.find input::placeholder { color: #9aa1ac; }
.find input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21,82,184,.12); }

/* Table --------------------------------------------------------------- */
.scroll-x { overflow-x: auto; border: 1px solid var(--line); border-radius: .5rem; }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
th, td { text-align: left; padding: .6875rem .875rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
thead th { background: var(--sunk); color: var(--dim); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--sunk); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.price { font-family: var(--mono); font-weight: 600; color: var(--ink); }
tr.best td.price { color: var(--good); }
td a { font-weight: 550; }

.tag { display: inline-block; font-size: .6875rem; padding: .05rem .4rem; border: 1px solid var(--line); border-radius: 2rem; color: var(--dim); margin-left: .45rem; white-space: nowrap; vertical-align: 1px; }
.tag.best { color: var(--good); border-color: #b7e0cb; background: #f0faf5; }
.tag.stale { color: var(--warn); border-color: #ecd9b0; background: #fdf7ec; }
.tag.none { color: var(--dim); }

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th[aria-sort="ascending"]::after { content: " \2191"; color: var(--accent); }
th[aria-sort="descending"]::after { content: " \2193"; color: var(--accent); }

/* Detail pages -------------------------------------------------------- */
.kv { display: grid; grid-template-columns: minmax(7rem, auto) 1fr; gap: .5rem 1.5rem; margin: 0 0 2rem; padding: 1rem 1.125rem; background: var(--sunk); border: 1px solid var(--line); border-radius: .5rem; }
.kv dt { color: var(--dim); font-size: .875rem; }
.kv dd { margin: 0; font-size: .9375rem; }

.faq { margin: 0 0 2rem; max-width: 46rem; }
.faq dt { font-weight: 650; margin: 1.25rem 0 .25rem; }
.faq dd { margin: 0; color: var(--ink-2); }

/* Footer -------------------------------------------------------------- */
footer.site { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--dim); font-size: .875rem; background: var(--sunk); }
footer.site p { max-width: 46rem; }
footer.site a { color: var(--ink-2); }

/* The contact address is an image: a CDN rewrites it as text. ISSUE-090. */
img.mail { vertical-align: -5px; max-width: 100%; height: auto; }

@media (max-width: 40rem) {
  h1 { font-size: 1.5rem; }
  main { padding: 1.5rem 0 2.5rem; }
  .facets-k { width: 100%; margin-bottom: .1rem; }
  th, td { padding: .625rem .625rem; }
  .kv { grid-template-columns: 1fr; gap: .1rem 0; }
  .kv dd { margin-bottom: .75rem; }
  .card .v { font-size: 1.25rem; }
}

header.site a.brand { display: inline-flex; align-items: center; gap: .5rem; }
header.site a.brand img { display: block; border-radius: .3rem; }

/* The one outbound button. Every link that leaves this site is nofollow and
   opens in a new tab: the reader is comparing and should not lose the table. */
a.visit { display: inline-block; padding: .55rem 1.1rem; background: var(--ink); color: #fff; border-radius: .4rem; font-weight: 600; font-size: .9375rem; }
a.visit:hover { background: var(--accent); text-decoration: none; }
