/* Nordprix — site styles. No external fonts or assets. */

:root {
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --text: #1b1a17;
  --muted: #5c5950;
  --border: #dedad0;
  --accent: #1d5c4b;
  --accent-hover: #164a3c;
  --accent-ink: #ffffff;
  --accent-soft: #e2efe9;
  --focus: #2563eb;
  --code-bg: #eeebe3;
  --pass: #17683c;
  --pass-bg: #dff1e6;
  --warn: #7a4f00;
  --warn-bg: #f9ecce;
  --fail: #a32117;
  --fail-bg: #f9e0dd;
  --skip: #5c5950;
  --skip-bg: #ebe8e1;
  --shadow: 0 1px 2px rgba(27, 26, 23, 0.06), 0 8px 24px rgba(27, 26, 23, 0.05);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131311;
    --surface: #1b1a18;
    --surface-2: #23221f;
    --text: #ecebe6;
    --muted: #a8a59b;
    --border: #34322c;
    --accent: #7fc9ae;
    --accent-hover: #9ad8c1;
    --accent-ink: #0c1f19;
    --accent-soft: #1b2e27;
    --focus: #8ab4ff;
    --code-bg: #2a2925;
    --pass: #7fd39f;
    --pass-bg: #173222;
    --warn: #f0c35a;
    --warn-bg: #362b12;
    --fail: #ff948a;
    --fail-bg: #3b1916;
    --skip: #a8a59b;
    --skip-bg: #282724;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
  overflow-wrap: anywhere;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

code, pre, textarea.mono { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 5.5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 3.5vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -48px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Header ------------------------------------------------------------------ */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand span { font-size: 1.1rem; }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--text); }

/* Sections ---------------------------------------------------------------- */
section { padding: 48px 0; }
section + section { border-top: 1px solid var(--border); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 42em; }

.hero { padding-top: 40px; padding-bottom: 8px; border-top: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-primary[disabled] { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* Checker ----------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.checker { margin-top: 28px; }
.mode { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.mode label {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 40px;
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-weight: 500; background: var(--surface);
}
.mode input { accent-color: var(--accent); margin: 0; }
.mode label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.field-label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="url"], input[type="text"], textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font: 400 1rem/1.4 var(--font);
}
textarea { min-height: 180px; resize: vertical; font-family: var(--mono); font-size: 0.88rem; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.8; }
.hint { font-size: 0.9rem; color: var(--muted); margin: 6px 0 16px; }
.form-row { display: flex; flex-direction: column; gap: 12px; }
.fineprint { font-size: 0.85rem; color: var(--muted); margin: 14px 0 0; }

.status { margin-top: 16px; min-height: 1.6em; color: var(--muted); }
.status.is-error { color: var(--fail); font-weight: 500; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* Report ------------------------------------------------------------------ */
.report { margin-top: 24px; }
.report-head { display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.report-target { font-family: var(--mono); font-size: 0.9rem; color: var(--muted); }
.tally { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tally li { font-weight: 600; font-size: 0.9rem; padding: 4px 10px; border-radius: 999px; }
.report-verdict { margin: 0; font-weight: 600; }
#report-title:focus { outline: none; }
.toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.93rem; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.report:not(.show-all) .group:not(.has-problems) { display: none; }
.report:not(.show-all) .check--pass,
.report:not(.show-all) .check--skip { display: none; }
.group-title { margin: 22px 0 8px; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check { border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.check--pass { border-left-color: var(--pass); }
.check--warn { border-left-color: var(--warn); }
.check--fail { border-left-color: var(--fail); }
.check--skip { border-left-color: var(--border); }
.check-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.check-title { font-weight: 600; }
.check--skip .check-title { color: var(--muted); font-weight: 500; }
.check p { margin: 6px 0 0; font-size: 0.93rem; }
.check .evidence { color: var(--text); }
.check--skip .evidence { color: var(--muted); }
.check .fix strong { font-weight: 600; }
.check .doc { display: inline-block; margin-top: 6px; font-size: 0.85rem; }

.badge { display: inline-block; min-width: 3.4em; text-align: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.badge--pass, .tally .t-pass { color: var(--pass); background: var(--pass-bg); }
.badge--warn, .tally .t-warn { color: var(--warn); background: var(--warn-bg); }
.badge--fail, .tally .t-fail { color: var(--fail); background: var(--fail-bg); }
.badge--skip, .tally .t-skip { color: var(--skip); background: var(--skip-bg); }

.requests { margin-top: 20px; font-size: 0.88rem; color: var(--muted); }
.requests summary { cursor: pointer; font-weight: 600; color: var(--text); }
.requests ol { padding-left: 1.4em; margin: 10px 0 0; }
.requests li { font-family: var(--mono); font-size: 0.82rem; margin-bottom: 4px; }
.report-cta { margin-top: 24px; padding: 18px; border-radius: 10px; background: var(--accent-soft); }
.report-cta p { margin-bottom: 12px; }

/* What we check ------------------------------------------------------------ */
.check-groups { display: grid; gap: 20px; margin-top: 24px; }
.check-groups h3 { margin-bottom: 8px; }
.check-groups ul { margin: 0; padding-left: 1.2em; }
.check-groups li { margin-bottom: 8px; }
.check-groups li span { color: var(--muted); }
.sources { font-size: 0.9rem; color: var(--muted); margin-top: 24px; }

/* Offers ------------------------------------------------------------------ */
.offers { display: grid; gap: 16px; margin-top: 24px; }
.offer { display: flex; flex-direction: column; }
.offer h3 { font-size: 1.25rem; margin-bottom: 4px; }
.price { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 0; }
.price-note { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.offer ul { padding-left: 1.2em; margin: 0 0 16px; }
.offer li { margin-bottom: 6px; }
.offer .btn { margin-top: auto; align-self: flex-start; }
.offer--main { border-color: var(--accent); }
.payment-note { margin-top: 16px; color: var(--muted); font-size: 0.95rem; }

/* Steps ------------------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; padding-left: 52px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent);
}
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--muted); margin: 0; }

/* FAQ --------------------------------------------------------------------- */
.faq { margin-top: 20px; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style-position: outside; }
.faq details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.faq details p, .faq details ul { color: var(--text); }
.faq details ul { padding-left: 1.2em; }

/* Contact ----------------------------------------------------------------- */
.contact .card { display: grid; gap: 12px; }
.contact-row { display: flex; flex-direction: column; gap: 12px; }
.contact-email { font-weight: 600; }

/* Legal pages ------------------------------------------------------------- */
.legal { padding-top: 36px; }
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.updated { color: var(--muted); font-size: 0.95rem; }

/* Footer ------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0 0 10px; max-width: 48em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); }

@media (min-width: 720px) {
  section { padding: 64px 0; }
  .hero { padding-top: 56px; }
  .card { padding: 28px; }
  .form-row { flex-direction: row; align-items: flex-start; }
  .form-row .grow { flex: 1; }
  .offers { grid-template-columns: 1fr 1.25fr; }
  .check-groups { grid-template-columns: 1fr 1fr; }
  .contact-row { flex-direction: row; align-items: flex-end; }
  .contact-row .grow { flex: 1; }
  .report-head { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
}
