/* VImplement EHF pages (www.vimplement.no/ehf and /ehf/regler).
   Brand tokens follow src/index.css. No external fonts or images. */
:root {
  --bg: #F6F8F9;
  --fg: #243746;
  --muted: #53636E;
  --card: #FFFFFF;
  --border: #DCE3E6;
  --border-strong: #C5D0D4;
  --brand: #35676B;
  --brand-hover: #285459;
  --brand-soft: #EDF2F3;
  --ok-bg: #E6F0EA;
  --ok-fg: #2E5743;
  --warn-bg: #F5EEE3;
  --warn-fg: #5C4527;
  --neutral-bg: #ECF0F2;
  --neutral-fg: #3B4A55;
  --bad-bg: #F7E8E6;
  --bad-fg: #8A3029;
  --radius: 12px;
  --shadow: 0 1px 3px rgb(20 43 69 / .05), 0 18px 40px -28px rgb(14 33 54 / .35);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid #6FA3A6; outline-offset: 2px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }
.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; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 34px; width: auto; }
.site-header nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: .95rem; }
.site-header nav a { color: var(--fg); text-decoration: none; font-weight: 500; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; }

/* Type */
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.1rem); letter-spacing: -.035em; max-width: 22ch; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.1rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: .75em; }
.lede { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); max-width: 62ch; color: var(--fg); }
.small { font-size: .875rem; color: var(--muted); }
.muted { color: var(--muted); }

/* Sections */
.hero { padding: clamp(40px, 6vw, 72px) 16px clamp(24px, 4vw, 40px); }
section + section { margin-top: clamp(32px, 5vw, 56px); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 28px); }

/* Checker */
.checker-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
label.field { display: block; font-weight: 600; margin-bottom: 4px; }
.hint { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
textarea {
  width: 100%; min-height: 220px; resize: vertical; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: #FBFCFC;
  font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--fg);
}
textarea:focus { border-color: var(--brand); background: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.button.primary { background: var(--brand); color: #fff; }
.button.primary:hover { background: var(--brand-hover); color: #fff; }
.button.secondary { background: var(--brand-soft); color: var(--fg); border-color: var(--border-strong); }
.button.secondary:hover { border-color: var(--brand); }
.button.quiet { background: transparent; color: var(--muted); }
.button.quiet:hover { color: var(--fg); text-decoration: underline; }
.button:disabled, .button.is-disabled { opacity: .6; cursor: not-allowed; }
.status { min-height: 1.6em; margin: 12px 0 0; font-size: .95rem; color: var(--muted); }
.status.is-error { color: var(--bad-fg); }

.notes { display: grid; gap: 16px; }
.note { background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.note h3 { margin-bottom: .4em; }
.note p { font-size: .95rem; }
.note p:last-child { margin-bottom: 0; }

/* Results */
.results { margin-top: 24px; }
.headline { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.counts { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.count { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 12px; border-radius: 10px; font-size: .92rem; }
.count strong { font-size: 1.15rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: #F1F4F5; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
td.orgnr { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.hint { color: var(--muted); min-width: 260px; margin: 0; font-size: .9rem; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.tone-ok { background: var(--ok-bg); color: var(--ok-fg); }
.tone-warn { background: var(--warn-bg); color: var(--warn-fg); }
.tone-neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.tone-bad { background: var(--bad-bg); color: var(--bad-fg); }

/* Timeline */
.timeline { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.timeline li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.timeline strong { display: block; color: var(--brand); font-size: 1.05rem; margin-bottom: 6px; }
.text-link { font-weight: 600; }

/* Kit */
.kit-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); }
.checks { padding-left: 0; list-style: none; margin: 0; }
.checks li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 7px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }
.price-box { background: var(--brand-soft); border-radius: var(--radius); padding: 20px; }
.price { margin-bottom: 6px; }
.price .amount { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.price-box .button { width: 100%; margin: 8px 0 12px; }

/* Guide page */
.guide { max-width: 820px; }
.guide h2 { margin-top: 1.6em; padding-top: .8em; border-top: 1px solid var(--border); }
.guide h2:first-of-type { border-top: 0; padding-top: 0; }
.guide li { margin-bottom: .6em; }
.guide .src { display: block; font-size: .85rem; color: var(--muted); margin-top: 2px; }
.facts { padding-left: 1.2em; }
.callout { background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; margin: 1em 0 1.4em; }
.callout p:last-child { margin-bottom: 0; }
.systems { width: 100%; }
.sources li { font-size: .92rem; }
.checked-stamp { display: inline-block; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: .85rem; color: var(--muted); }

/* Footer */
.site-footer { margin-top: clamp(48px, 7vw, 80px); padding: 28px 0 40px; border-top: 1px solid var(--border); background: var(--card); font-size: .9rem; color: var(--muted); }
.site-footer p { margin: 0 0 .5em; }
.site-footer strong { color: var(--fg); }

@media (max-width: 860px) {
  .checker-grid, .kit-card { grid-template-columns: minmax(0, 1fr); }
  .timeline { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .site-header nav { gap: 12px; font-size: .9rem; }
  .actions .button { flex: 1 1 auto; }
  td.hint { min-width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
