/* atlas.geosensor.tech — one stylesheet for the human-facing pages.
 *
 * 🔴 NO EXTERNAL REQUESTS. No CDN, no web fonts, no analytics, no JavaScript. A site that
 * measures what others expose to machines has no business leaking its own visitors to a third
 * party, and a stylesheet that depends on somebody else's uptime is a page that breaks when they
 * do. System fonts render instantly and cost nothing.
 *
 * ⚠️ The findings page's table rows are matched byte-for-byte by tools/check_findings_page.py
 * (`<tr...><td>…</td>` with NO attributes on the cells). Style those through selectors here —
 * never by adding classes to a <td>.
 */

:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f4f3f1;
  --fg: #16181d;
  --fg-2: #4a4f58;
  --mut: #6b7280;
  --rule: #e3e1dd;
  --accent: #1f4d8f;
  --accent-fg: #ffffff;
  --accent-soft: #eaf0f9;
  --warn-bg: #fdf6e7;
  --warn-rule: #e8d9ae;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 18, 23, .04), 0 4px 16px rgba(16, 18, 23, .05);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --measure: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a;
    --surface: #191c23;
    --surface-2: #1f232b;
    --fg: #e8e8e6;
    --fg-2: #bdc1c8;
    --mut: #8e949e;
    --rule: #2b303a;
    --accent: #7aa7e8;
    --accent-fg: #11151c;
    --accent-soft: #1b2430;
    --warn-bg: #241f12;
    --warn-rule: #4a3f21;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 18px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16.5px/1.65 var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* ---- header and navigation -------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-head > nav {
  max-width: var(--measure);
  margin: 0 auto;
  padding: .7rem 16px;
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 650;
  letter-spacing: -.015em;
  font-size: 1.05rem;
  color: var(--fg);
  text-decoration: none;
  margin-right: auto;
}
.brand span { color: var(--mut); font-weight: 400; font-size: .84rem; margin-left: .5rem; }

.site-head a:not(.brand) {
  color: var(--fg-2);
  text-decoration: none;
  font-size: .93rem;
  padding: .15rem 0;
  border-bottom: 2px solid transparent;
}
.site-head a:not(.brand):hover { color: var(--fg); border-bottom-color: var(--rule); }
.site-head a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

/* ---- page frame ------------------------------------------------------------------------- */

main { max-width: var(--measure); margin: 0 auto; padding: 2.4rem 16px 4rem; }

h1 {
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -.022em;
  font-weight: 680;
  margin: 0 0 .4rem;
}
.sub { color: var(--mut); font-size: 1.03rem; margin: 0 0 2.2rem; }

h2 {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -.01em;
  margin: 2.6rem 0 .7rem;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
}
h3 { font-size: .99rem; font-weight: 650; margin: 1.7rem 0 .4rem; }

p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .15em; }
strong { font-weight: 640; }
ul, ol { padding-left: 1.15rem; margin: 0 0 1rem; }
li { margin: .4rem 0; }

code {
  font: .86em var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  padding: .08em .33em;
  border-radius: var(--radius-sm);
}
pre {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  overflow-x: auto;
  font-size: .84rem;
  line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; }

/* ---- the boxes --------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  margin: 0 0 1.1rem;
}
.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-top: 0; border-top: 0; padding-top: 0; }

.lede {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--rule));
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  font-size: 1.05rem;
  margin: 0 0 1.4rem;
}
.lede > :last-child { margin-bottom: 0; }

.note, .warn {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--mut);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: .8rem 1rem;
  font-size: .94rem;
  color: var(--fg-2);
  margin: 0 0 1.1rem;
}
.warn { background: var(--warn-bg); border-color: var(--warn-rule); border-left-color: #c79a2b; }
.note > :last-child, .warn > :last-child { margin-bottom: 0; }

.grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
       padding: .9rem 1rem; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 1.5rem; letter-spacing: -.02em; font-weight: 680;
         font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi span { display: block; color: var(--mut); font-size: .84rem; margin-top: .2rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  padding: .6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--rule); }

/* an inline qualifier beside a figure — NOT a callout. `.note` is a box, and using it inside a
   table cell rendered a floating card in the price column. */
.per { color: var(--mut); font-weight: 450; font-size: .8rem; }

.pill {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--fg-2);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .12rem .6rem;
}

/* ---- tables ------------------------------------------------------------------------------ */

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius);
              background: var(--surface); box-shadow: var(--shadow); margin: 0 0 1.2rem; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--rule);
         vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
           color: var(--mut); font-weight: 650; background: var(--surface-2); }
/* numeric columns: the data tables are number-first after their label column */
table.num td:not(:first-child), table.num th:not(:first-child) {
  text-align: right; font-variant-numeric: tabular-nums;
}
table.num tr.zero td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
td.p { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
       font-weight: 620; }

blockquote { margin: 1.1rem 0; padding: .1rem 0 .1rem 1rem; border-left: 3px solid var(--rule);
             color: var(--fg-2); }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4rem 0 1.4rem; }

/* ---- footer ------------------------------------------------------------------------------ */

.site-foot { border-top: 1px solid var(--rule); background: var(--surface-2); }
.site-foot > div {
  max-width: var(--measure); margin: 0 auto; padding: 1.5rem 16px 2.5rem;
  color: var(--mut); font-size: .88rem;
  display: flex; gap: 1rem 1.6rem; flex-wrap: wrap; align-items: baseline;
}
.site-foot a { color: var(--fg-2); }

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

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
  .site-head, .site-foot { display: none; }
  body { background: #fff; color: #000; }
  .card, .lede, .table-wrap { box-shadow: none; }
}
