  :root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #15181d;
    --muted: #5b6370;
    --border: #e1e4e9;
    --blue: #02529C;
    --red: #DC1E35;
    --red-soft: #fdecee;
    --green: #127a3a;
    --green-soft: #e6f4ea;
    --amber: #8a5a00;
    --amber-soft: #fff4dc;
    --code-bg: #0f1720;
    --code-text: #e6edf3;
    --radius: 12px;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0d1117;
      --surface: #151b23;
      --text: #e6edf3;
      --muted: #9aa4b2;
      --border: #2a313c;
      --blue: #5aa2ff;
      --red: #ff5c6f;
      --red-soft: #3a1a20;
      --green: #4cc27a;
      --green-soft: #12301f;
      --amber: #f0b44c;
      --amber-soft: #33270f;
      --code-bg: #0a0e14;
      color-scheme: dark;
    }
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  }
  a { color: var(--blue); }
  code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

  /* Language switching: Icelandic is the default; without JS only Icelandic shows. */
  html[data-lang="is"] .en,
  html[data-lang="en"] .is { display: none !important; }

  .wrap { max-width: 960px; margin: 0 auto; padding-inline: 20px; }
  .wrap.wide { max-width: 1280px; }

  /* Header */
  header.top {
    position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
  }
  header.top .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding-block: 12px;
  }
  .brand { font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem; text-decoration: none; color: var(--text); }
  .brand span { color: var(--red); }
  nav.links { display: flex; gap: 18px; font-size: 0.92rem; }
  nav.links a { color: var(--muted); text-decoration: none; }
  nav.links a:hover { color: var(--text); }
  .lang-switch {
    display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px;
    background: var(--bg);
  }
  .lang-switch button {
    border: 0; background: transparent; color: var(--muted);
    font: inherit; font-weight: 700; font-size: 0.85rem;
    padding: 5px 12px; border-radius: 999px; cursor: pointer;
  }
  .lang-switch button[aria-pressed="true"] { background: var(--blue); color: #fff; }
  /* Phones: menu becomes a scrollable row under the logo and language switch */
  @media (max-width: 760px) {
    header.top .wrap { flex-wrap: wrap; row-gap: 6px; padding-block: 10px 6px; }
    nav.links {
      order: 3; width: 100%; overflow-x: auto; gap: 18px; white-space: nowrap;
      padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    nav.links::-webkit-scrollbar { display: none; }
  }

  /* Hero */
  .hero { padding-block: 56px 32px; }
  .badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--red-soft); color: var(--red);
    font-weight: 700; font-size: 0.85rem;
    padding: 5px 12px; border-radius: 999px;
  }
  .badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
  .hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -0.03em; margin: 18px 0 16px; }
  .hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0 0 24px; }
  .cta { display: flex; flex-wrap: wrap; gap: 12px; }
  .btn {
    display: inline-block; padding: 11px 18px; border-radius: 10px;
    font-weight: 700; text-decoration: none; border: 1px solid transparent;
  }
  .btn.primary { background: var(--red); color: #fff; }
  .btn.ghost { border-color: var(--border); color: var(--text); background: var(--surface); }

  .stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px; margin-top: 36px;
  }
  .stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
  .stat b { display: block; font-size: 1.6rem; letter-spacing: -0.02em; }
  .stat small { color: var(--muted); font-size: 0.9rem; }
  .stat.crit b { color: var(--red); }

  /* Sections */
  section { padding-block: 28px; }
  section h2 { font-size: 1.6rem; letter-spacing: -0.02em; margin: 0 0 14px; }
  .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
  .card p:first-child { margin-top: 0; }
  .card p:last-child { margin-bottom: 0; }
  .muted { color: var(--muted); }

  .grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
  .impact h3 { margin: 0 0 8px; font-size: 1.05rem; }
  .impact .icon {
    width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
    background: var(--red-soft); color: var(--red); font-weight: 800; margin-bottom: 12px;
  }

  .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  table { border-collapse: collapse; width: 100%; min-width: 560px; }
  table.compact { min-width: 0; }
  th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
  tr:last-child td { border-bottom: 0; }
  th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--bg); }
  td code { font-weight: 700; }
  .cve { font-weight: 700; white-space: nowrap; }
  .fixed { color: var(--green); font-weight: 700; }
  .vuln { color: var(--red); font-weight: 700; }

  /* Version checker */
  .checker { margin-top: 16px; }
  .checker form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
  .checker input {
    font: inherit; padding: 10px 12px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    width: 12em;
  }
  .checker button { font: inherit; cursor: pointer; }
  .result { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
  .result.bad { background: var(--red-soft); color: var(--red); }
  .result.good { background: var(--green-soft); color: var(--green); }
  .result.warn { background: var(--amber-soft); color: var(--amber); }

  /* Steps */
  ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 14px; }
  ol.steps > li { counter-increment: step; position: relative; padding-left: 56px; }
  ol.steps > li::before {
    content: counter(step);
    position: absolute; left: 0; top: 22px;
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--blue); color: #fff; font-weight: 800;
  }
  ol.steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
  pre.cmd {
    position: relative; background: var(--code-bg); color: var(--code-text);
    padding: 12px 14px; border-radius: 8px; overflow-x: auto; margin: 10px 0 0;
  }
  pre.cmd .copy {
    position: absolute; top: 6px; right: 6px;
    font: 600 0.75rem system-ui, sans-serif; color: var(--code-text);
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px; padding: 3px 8px; cursor: pointer;
  }

  .callout { border-left: 4px solid var(--red); background: var(--red-soft); padding: 14px 18px; border-radius: 8px; margin-top: 16px; }

  footer { border-top: 1px solid var(--border); margin-top: 32px; padding-block: 24px 40px; color: var(--muted); font-size: 0.9rem; }

  .callout.note { border-left-color: var(--blue); background: color-mix(in srgb, var(--blue) 9%, var(--surface)); }
  .small { font-size: 0.9rem; }
  .h3 { font-size: 1.15rem; margin: 0 0 12px; }
  .h4 { font-size: 0.95rem; margin: 16px 0 8px; color: var(--muted); }

  /* Site checker (/check/) */
  form.scan { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; max-width: 640px; }
  form.scan input {
    flex: 1 1 260px; min-width: 0;
    font: inherit; font-size: 1.05rem; padding: 12px 14px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
  }
  form.scan input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
  form.scan button { font: inherit; font-weight: 700; cursor: pointer; }
  form.scan button:disabled { opacity: 0.6; cursor: progress; }

  #out { display: grid; gap: 14px; }
  #out[hidden] { display: none; }
  .verdict { border-radius: var(--radius); padding: 18px 22px; border: 1px solid var(--border); background: var(--surface); }
  .verdict p { margin: 6px 0 0; }
  .verdict.bad { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
  .verdict.good { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
  .verdict.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
  .verdict-title { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
  .verdict .cdn-note { color: var(--muted); font-size: 0.92rem; }

  .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--muted); }
  .dot.bad { background: var(--red); }
  .dot.good { background: var(--green); }
  .dot.warn { background: var(--amber); }
  .dot.unknown { background: var(--muted); }

  dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
  dl.facts dt { color: var(--muted); }
  dl.facts dd { margin: 0; overflow-wrap: anywhere; }
  @media (max-width: 560px) {
    dl.facts { grid-template-columns: 1fr; gap: 2px; }
    dl.facts dd { margin-bottom: 10px; }
  }

  details.raw summary { cursor: pointer; font-weight: 700; }
  ol.hops { margin: 0; padding-left: 20px; overflow-wrap: anywhere; }
  ol.hops li { margin: 4px 0; }
  details.raw table { min-width: 0; }
  details.raw th { text-transform: none; letter-spacing: 0; font-size: 0.85rem; white-space: nowrap; width: 1%; }
  details.raw td code { font-weight: 400; overflow-wrap: anywhere; }

  ul.legend { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
  ul.legend li { display: flex; gap: 10px; align-items: baseline; }
  .guidance p { margin: 0 0 10px; }
  .guidance .links-row { margin: 12px 0 0; font-size: 0.92rem; }

  /* Distribution status table */
  .status-filter { margin: 0 0 10px; }
  .status-filter input {
    font: inherit; padding: 8px 12px; border-radius: 10px; width: min(320px, 100%);
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
  }
  table.distro-table td { font-size: 0.92rem; }
  table.distro-table tr.group-start td { border-top: 2px solid var(--border); }
  table.distro-table td code { font-weight: 400; font-size: 0.85rem; overflow-wrap: anywhere; }
  .pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 0.82rem; white-space: nowrap;
          background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
  .pill.good { background: var(--green-soft); color: var(--green); border-color: transparent; }
  .pill.warn { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
  .pill.bad  { background: var(--red-soft); color: var(--red); border-color: transparent; }

  /* Distribution table, desktop */
  table.distro-table { min-width: 0; table-layout: fixed; }
  table.distro-table th:nth-child(1) { width: 17%; }
  table.distro-table th:nth-child(2) { width: 12%; }
  table.distro-table th:nth-child(3) { width: 10%; }
  table.distro-table th:nth-child(4) { width: 22%; }
  table.distro-table th:nth-child(5) { width: 25%; }
  table.distro-table th:nth-child(6) { width: 15%; }
  table.distro-table tr.cont .c-distro strong { display: none; }
  table.distro-table .note { margin-top: 4px; }
  @media (max-width: 1100px) and (min-width: 761px) {
    table.distro-table { table-layout: auto; min-width: 820px; }
  }

  /* Tables marked .stack become one card per row on phones */
  @media (max-width: 760px) {
    .table-wrap:has(> table.stack) { border: 0; background: none; overflow: visible; }
    table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; min-width: 0; }
    table.stack { min-width: 0; table-layout: auto; }
    table.stack thead { display: none; }
    table.stack tr {
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 12px 16px; margin-bottom: 10px;
    }
    table.stack tr.group-start td, table.stack td { border: 0; }
    table.stack td { padding: 5px 0; display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 12px; align-items: baseline; }
    table.stack td::before { color: var(--muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
    html[data-lang="is"] table.stack td[data-is]::before { content: attr(data-is); }
    html[data-lang="en"] table.stack td[data-en]::before { content: attr(data-en); }
    table.stack tr td.card-title { display: block; font-size: 1.05rem; padding: 0 0 6px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
    table.stack td.empty, table.stack td.empty-m { display: none; }
    table.distro-table tr.cont .c-distro strong { display: inline; }
    table.stack td code { overflow-wrap: anywhere; }
  }
  @media (max-width: 380px) {
    table.stack td { grid-template-columns: 1fr; gap: 2px; }
  }
  @media (max-width: 760px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat b { font-size: 1.35rem; }
  }
  #ahrif > .muted > p { margin: 0 0 12px; }

  /* Tabs (fix status: operating systems / container images) */
  .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 4px 0 18px; overflow-x: auto; overflow-y: hidden; }
  .tabs [role="tab"] {
    font: inherit; font-weight: 700; color: var(--muted); background: none; cursor: pointer; white-space: nowrap;
    border: 0; border-bottom: 3px solid transparent; padding: 10px 16px; margin-bottom: -1px;
  }
  .tabs [role="tab"]:hover { color: var(--text); }
  .tabs [role="tab"][aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); }
  .tabs [role="tab"]:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 6px 6px 0 0; }

  /* Container image table */
  table.container-table { min-width: 0; table-layout: fixed; }
  table.container-table th:nth-child(1) { width: 34%; }
  table.container-table th:nth-child(2) { width: 11%; }
  table.container-table th:nth-child(3) { width: 27%; }
  table.container-table th:nth-child(4) { width: 18%; }
  table.container-table th:nth-child(5) { width: 10%; }
  table.container-table td code { font-weight: 600; overflow-wrap: anywhere; }
  table.container-table td a { text-decoration: none; }
  table.container-table .note { margin-top: 4px; }
  table.container-table tr.group-head th {
    background: var(--bg); color: var(--text); text-transform: none; letter-spacing: 0; font-size: 0.95rem; padding-top: 16px;
  }
  @media (max-width: 1100px) and (min-width: 761px) {
    table.container-table { table-layout: auto; min-width: 760px; }
  }
  @media (max-width: 760px) {
    table.stack tr.group-head { background: none; border: 0; padding: 10px 0 2px; margin: 0; }
    table.stack tr.group-head th { display: block; width: auto; background: none; padding: 0; font-size: 1rem; }
  }
