/* Snapshot pages (site/snapshot/). Started as the Phase 1b Task 13 design; restyled for launch plan L6.
 * Three words: plain, exact, honest. It should read like a measurement report, not a sales page.
 * - Type: Schibsted Grotesk for headings, Public Sans for text (the locked Namova brand), self-hosted
 *   so no visitor IP goes to a font CDN. No mono: counts and dates use tabular figures.
 * - Color: Namova tokens (Ink #12223A, Signal Green #0F8A6C for actions and focus). A highlighter
 *   yellow marks the businesses named instead of you. Pass, fail and "couldn't check" always carry
 *   a word and a symbol, never color alone. Light and dark sets below.
 * - Density: normal. 8px scale. One reading column, 40rem wide. Radius 2px, no shadows, 1px rules.
 * - Motion: quiet. 150ms color transitions and one progress bar, all off under reduced motion.
 */

/* Launch plan L6: the snapshot pages now use the locked Namova brand (Schibsted Grotesk headings,
 * Public Sans text, Ink #12223A and Signal Green #0F8A6C), the same tokens as brand.css. No mono type:
 * counts and dates use tabular figures instead. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-var.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/assets/fonts/public-sans-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f6f8fa;
  --surface: #ffffff;
  --ink: #12223a;
  --ink-2: #3d4b5f;
  --rule: #e3e8ee;
  --rule-strong: #8e9aab;
  --brand: #0c7a5f;
  --brand-hover: #0a6550;
  --on-brand: #ffffff;
  --mark: #fff1b8;
  --on-mark: #12223a;
  --pass: #0c7a5f;
  --fail: #a12a1c;
  --unknown: #4f5a6b;
  --notice-bg: #fff4e5;
  --error-bg: #fdecea;
  --focus: #0f8a6c;

  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Public Sans", system-ui, sans-serif;

  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 3rem;
  --s6: 4rem;
  --radius: 2px;
  --measure: 40rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1726;
    --surface: #13203a;
    --ink: #f1f4f8;
    --ink-2: #c3ccd8;
    --rule: #243249;
    --rule-strong: #6b7a90;
    --brand: #3ccfa6;
    --brand-hover: #6fe0c0;
    --on-brand: #0d1726;
    --mark: #4d4210;
    --on-mark: #fff6cc;
    --pass: #3ccfa6;
    --fail: #ff9c8c;
    --unknown: #c3ccd8;
    --notice-bg: #3a2a10;
    --error-bg: #3a1a16;
    --focus: #3ccfa6;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.wrap {
  max-width: calc(var(--measure) + 2 * var(--s2));
  margin: 0 auto;
  padding: 0 var(--s2);
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 var(--s2);
  text-wrap: balance;
}
h1 {
  font-size: 1.875rem;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 1.375rem;
}
h3 {
  font-size: 1.125rem;
}
@media (min-width: 48rem) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 1.5rem;
  }
}
p {
  margin: 0 0 var(--s2);
}
.lede {
  font-size: 1.125rem;
  color: var(--ink-2);
}
.small {
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.mono {
  font-family: var(--mono);
}
a {
  color: var(--brand);
  text-underline-offset: 0.15em;
}
a:hover {
  color: var(--brand-hover);
}

/* ---------- focus ---------- */

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
/* Headings and main get focus from script (after a step changes) but are not controls. */
[tabindex="-1"]:focus {
  outline: none;
}
.skip {
  position: absolute;
  left: var(--s2);
  top: -4rem;
  background: var(--surface);
  color: var(--ink);
  padding: var(--s1) var(--s2);
  border: 1px solid var(--rule-strong);
  z-index: 10;
}
.skip:focus {
  top: var(--s1);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- chrome ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  gap: var(--s2);
}
.wordmark {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark span {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--ink-2);
  margin-left: var(--s1);
}
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: var(--s6);
  padding: var(--s3) 0 var(--s4);
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.site-footer p {
  margin: 0 0 var(--s1);
}

section.block {
  padding: var(--s4) 0 0;
}
.hero {
  padding: var(--s5) 0 var(--s2);
}

/* ---------- forms ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--s3) var(--s2);
  margin: 0 0 var(--s3);
}
@media (min-width: 48rem) {
  .panel {
    padding: var(--s3);
  }
}
/* Grid makes inputs and selects fill the column without a width rule. */
.field {
  display: grid;
  margin: 0 0 var(--s2);
}
label,
.label {
  display: block;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.hint {
  display: block;
  font-size: 0.9375rem;
  color: var(--ink-2);
  margin: 0 0 0.375rem;
}
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
select {
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}
input[aria-invalid="true"] {
  border-color: var(--fail);
}
.row {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
}
.row > .grow {
  flex: 1 1 14rem;
  min-width: 0;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
legend {
  font-weight: 600;
  font-size: 1.125rem;
  padding: 0;
  margin: 0 0 var(--s2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-height: 3rem;
  padding: 0.625rem 1.25rem;
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--brand);
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}
.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: var(--on-brand);
}
.btn-secondary {
  background: transparent;
  color: var(--brand);
}
.btn-secondary:hover {
  background: var(--paper);
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
.link-btn {
  background: none;
  border: 0;
  padding: 0.75rem 0;
  font: inherit;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
  min-height: 2.75rem;
}

.check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0 0 var(--s2);
}
.check input {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.125rem 0 0;
  flex: none;
  accent-color: var(--brand);
}
.check label {
  font-weight: 400;
  margin: 0;
}

.msg {
  border-left: 4px solid var(--fail);
  background: var(--error-bg);
  padding: 0.75rem var(--s2);
  margin: 0 0 var(--s2);
  border-radius: var(--radius);
}
.msg:empty {
  display: none;
}
.notice {
  border-left: 4px solid var(--rule-strong);
  background: var(--notice-bg);
  padding: 0.75rem var(--s2);
  margin: 0 0 var(--s2);
  border-radius: var(--radius);
}
.field-error {
  color: var(--fail);
  font-size: 0.9375rem;
  margin: 0.375rem 0 0;
}
.field-error:empty {
  display: none;
}

/* ---------- suggestions ---------- */

.suggestions {
  list-style: none;
  margin: 0 0 var(--s1);
  padding: 0;
  border-top: 1px solid var(--rule);
}
.suggestions li {
  display: grid;
  border-bottom: 1px solid var(--rule);
}
.suggestion {
  display: block;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0.75rem 0.5rem;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  min-height: 3rem;
}
.suggestion:hover {
  background: var(--paper);
}
.suggestion strong {
  display: block;
}
.suggestion span {
  display: block;
  font-size: 0.9375rem;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.attribution {
  font-size: 0.9375rem;
  color: var(--ink-2);
  margin: 0 0 var(--s2);
}
.attribution .gm {
  font-family: Roboto, var(--sans);
  white-space: nowrap;
  color: var(--ink);
}

/* ---------- progress ---------- */

.progress-track {
  height: 0.5rem;
  background: var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin: var(--s2) 0;
}
.progress-bar {
  height: 0.5rem;
  background: var(--brand);
  transform-origin: left center;
  transform: scaleX(0.02);
  transition: transform 1s linear;
}

/* ---------- result ---------- */

.finding-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s1) var(--s2);
  margin: 0 0 var(--s2);
}
.finding-head h2 {
  margin: 0;
}
.sample-label {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--ink-2);
  border: 1px solid var(--rule-strong);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius);
  white-space: nowrap;
}
.headline {
  font-size: 1.375rem;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 var(--s2);
}
@media (min-width: 48rem) {
  .headline {
    font-size: 1.625rem;
  }
}
mark {
  background: var(--mark);
  color: var(--on-mark);
  padding: 0 0.125em;
}
.counts {
  list-style: none;
  margin: 0 0 var(--s3);
  padding: 0;
}
.counts li {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
}
.counts .n {
  font-family: var(--mono);
  white-space: nowrap;
}
.quotes {
  list-style: none;
  margin: 0 0 var(--s3);
  padding: 0;
}
.quote {
  border-left: 3px solid var(--rule-strong);
  padding: 0 0 0 var(--s2);
  margin: 0 0 var(--s3);
}
.quote blockquote {
  margin: 0 0 0.375rem;
  overflow-wrap: anywhere;
}
.quote .who {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.9375rem;
  padding: 0 0.375rem;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  margin-left: 0.25rem;
  white-space: nowrap;
}
.tag-yes {
  color: var(--pass);
}
.tag-no {
  color: var(--ink-2);
}
.status-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s3);
}
.status-list li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
}
.status {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
  min-width: 9.5rem;
  white-space: nowrap;
}
.status-pass {
  color: var(--pass);
}
.status-fail {
  color: var(--fail);
}
.status-unknown {
  color: var(--unknown);
}
.fixes {
  padding-left: 1.25rem;
  margin: 0 0 var(--s3);
}
.fixes li {
  margin: 0 0 var(--s2);
}
.fixes strong {
  display: block;
}
.excluded {
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--s4) 0;
}

/* ---------- prose (privacy page) ---------- */

.prose h2 {
  margin-top: var(--s4);
}
.prose ul {
  padding-left: 1.25rem;
}
.prose li {
  margin: 0 0 var(--s1);
}
.prose table {
  border-collapse: collapse;
  margin: 0 0 var(--s2);
  font-size: 0.9375rem;
}
.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0.5rem 0.5rem 0;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* tabular figures where the old design used mono */
.sample-label, .count, time { font-variant-numeric: tabular-nums; }
.wl-done { padding: var(--s2); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
