/* hostnavn.dk - one stylesheet, no build step. Light is the default; dark (Solarized with brighter
   text) applies when the visitor picks it with the menu button (data-theme, set by theme.js). */
:root {
  --bg: #ffffff; --soft: #f5f7fa; --panel: #ffffff;
  --text: #1a2233; --muted: #5d6779; --line: #e3e7ee; --line-strong: #cdd3dd;
  --accent: #2563eb; --accent-ink: #ffffff; --accent-soft: #eaf1ff;
  --ok: #16803c; --ok-bg: #e8f6ed; --warn: #a15c00; --warn-bg: #fff4e0;
  --bad: #c62828; --bad-bg: #fdecec; --info: #4a5f8c; --info-bg: #edf1f8;
  --code: #f2f4f7; --shadow: 0 1px 2px rgba(20,30,50,.05), 0 4px 16px rgba(20,30,50,.05);
}
:root[data-theme="dark"] {
  --bg: #002b36; --soft: #073642; --panel: #073642;
  --text: #eee8d5; --muted: #a3b1b1; --line: #0f4655; --line-strong: #586e75;
  --accent: #4ea6e6; --accent-ink: #002b36; --accent-soft: #0d4560;
  --ok: #a8bd1f; --ok-bg: #18413a; --warn: #d9a514; --warn-bg: #2a4135;
  --bad: #ff8a85; --bad-bg: #2d3640; --info: #a9adf0; --info-bg: #17395a;
  --code: #0a3d4a; --shadow: none;
}
* { box-sizing: border-box; }
/* Keep room for the scrollbar on every page, so short and long pages line up;
   on desktops show it always, as some browsers draw nothing in a reserved gutter. */
html { scrollbar-gutter: stable; }
@media (hover: hover) and (pointer: fine) { html { overflow-y: scroll; } }
body { margin: 0; background: var(--bg); color: var(--text); display: flex; flex-direction: column; min-height: 100vh;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
main { flex: 1; }
a { color: var(--accent); }
.mono, code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .87em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Top menu (from D) */
header { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; }
header .wrap { display: flex; align-items: center; height: 64px; gap: 36px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; flex: none; }
.logo svg { display: block; }
.logo em { font-style: normal; color: var(--accent); }
#nav { display: flex; gap: 2px; flex: 1; }
#nav a, .right a { color: var(--muted); text-decoration: none; font-size: .94rem; padding: 8px 12px; border-radius: 6px; }
#nav a:hover, .right a:hover { color: var(--text); background: var(--soft); }
#nav a.on, .right a.on { color: var(--accent); font-weight: 600; }
/* Reserve each link's bold width up front, so the active link can turn bold without moving its neighbours. */
#nav a, .right a { display: inline-flex; flex-direction: column; align-items: center; }
#nav a::after, .right a::after { content: attr(data-label); font-weight: 600; height: 0; overflow: hidden; visibility: hidden; }
.right { display: flex; align-items: center; gap: 4px; }
.iconbtn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.iconbtn:hover { color: var(--text); }
.burger { display: none; }

/* Footer (from E) */
footer { padding: 32px 0 40px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: var(--muted); text-decoration: none; margin-left: 18px; }
footer a:hover { color: var(--text); }

/* Controls */
.btn { height: 50px; padding: 0 26px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { cursor: default; filter: none; }
.input { flex: 1; min-width: 0; height: 50px; padding: 0 16px; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; }
:root[data-theme="dark"] .band .input { background: var(--bg); }
.input:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.search { display: flex; gap: 8px; }
.search-space { height: 50px; } /* a page without a form keeps the band's height */
.loading { padding: 64px 0; text-align: center; color: var(--muted); }
.chip { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip.ok { color: var(--ok); background: var(--ok-bg); } .chip.warn { color: var(--warn); background: var(--warn-bg); }
.chip.bad { color: var(--bad); background: var(--bad-bg); } .chip.info { color: var(--info); background: var(--info-bg); }
pre .k { color: var(--accent); }


@media (max-width: 900px) {
  .burger { display: grid; }
  header .wrap { justify-content: space-between; }
  #nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--panel); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px 14px; z-index: 5; box-shadow: var(--shadow); }
  body.menu-open #nav { display: flex; }
  #nav a { align-items: flex-start; }
  .right a { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .search { flex-direction: column; }
  .search .input { flex: none; }
  .search-space { height: 108px; }
  footer a { margin: 0 16px 0 0; }
}

/* Page content */
/* The band: identical on every page, only the headline and the line under it change. */
.band { background: var(--soft); border-bottom: 1px solid var(--line); padding: 44px 0 40px; }
.band h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 3.6vw, 2.25rem); letter-spacing: -.025em; line-height: 1.2; }
.band p { margin: 0 0 22px; color: var(--muted); font-size: 1.05rem; }
.band .btn { width: 160px; padding: 0; }
@media (max-width: 600px) { .band .btn { width: auto; } }
#content { padding-top: 36px; padding-bottom: 80px; }

/* Front page tool list (from G) */
#content h2 { font-size: 1.15rem; margin: 0 0 16px; }
.rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.rows a { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.rows a:hover b { color: var(--accent); }
.rows .ic { width: 40px; height: 40px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.rows b { display: block; }
.rows span { color: var(--muted); font-size: .92rem; }
.rows small { font-size: .72rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; margin-left: 6px; font-weight: 500; }

/* Report (from I) */
.stats { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.stats > div { padding: 16px 20px; border-left: 1px solid var(--line); min-width: 0; }
.stats > div:first-child { border-left: 0; display: flex; gap: 16px; align-items: center; }
.grade { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; color: var(--warn); background: var(--warn-bg); flex: none; }
.stats .k { color: var(--muted); font-size: .8rem; }
.stats .v { font-weight: 700; font-size: 1.15rem; word-break: break-all; }
.stats .v small { color: var(--muted); font-weight: 500; font-size: .85rem; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 28px 0 0; }
.filters button { border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: inherit; font-size: .88rem; padding: 5px 14px; border-radius: 999px; cursor: pointer; }
.filters button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.sec { margin-top: 28px; }
.sec h3 { font-size: 1.1rem; margin: 0; padding-bottom: 8px; border-bottom: 2px solid var(--text); display: flex; justify-content: space-between; align-items: baseline; }
.sec h3 small { color: var(--muted); font-weight: 400; font-size: .85rem; }
.item { display: grid; grid-template-columns: 26px minmax(0, 220px) minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sym { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.sym svg { display: block; }
.sym.ok { color: var(--ok); background: var(--ok-bg); } .sym.warn { color: var(--warn); background: var(--warn-bg); }
.sym.bad { color: var(--bad); background: var(--bad-bg); } .sym.info { color: var(--info); background: var(--info-bg); }
.item b { font-size: .97rem; padding-top: 1px; }
.item .v { min-width: 0; }
.item .v code { background: var(--code); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.item .v i { color: var(--muted); }
.item p { margin: 4px 0 0; color: var(--muted); font-size: .93rem; }
.item pre { margin: 8px 0 0; padding: 9px 12px; background: var(--code); border-radius: 6px; overflow-x: auto; font-size: .8rem; }
details.raw { margin-top: 36px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
details.raw summary { padding: 14px 20px; cursor: pointer; font-weight: 600; }
details.raw pre { margin: 0; padding: 0 20px 18px; overflow-x: auto; font-size: .8rem; line-height: 1.75; }

/* Placeholder and text pages */
.note { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 22px 24px; color: var(--muted); }
.note b { color: var(--text); display: block; margin-bottom: 2px; }
.prose { max-width: 680px; }
.prose p { margin: 0 0 14px; }

@media (max-width: 900px) {
  .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:first-child { grid-column: 1 / -1; border-top: 0; }
  .stats > div { border-top: 1px solid var(--line); }
  .stats > div:nth-child(2), .stats > div:nth-child(4) { border-left: 0; }
  .item { grid-template-columns: 26px minmax(0, 1fr); }
  .item .v { grid-column: 2; }
}
@media (max-width: 600px) {
  .band { padding: 32px 0 28px; }
  .rows { grid-template-columns: minmax(0, 1fr); }
}

/* Results page details not in the mockup */
.who { min-width: 0; }
.stats .v.bad { color: var(--bad); }
.grade.ok { color: var(--ok); background: var(--ok-bg); }
.grade.bad { color: var(--bad); background: var(--bad-bg); }
.filters { display: none; }
.js .filters { display: flex; }
.item[hidden], .sec[hidden] { display: none; }
.note.error { border-style: solid; border-color: var(--bad); }
.note.error b { color: var(--bad); }
.note code { background: var(--code); padding: 1px 6px; border-radius: 4px; word-break: break-all; }
.intro { max-width: 760px; }
.intro p { margin: 0 0 14px; }
.intro ul { margin: 0 0 14px; padding-left: 20px; }
.intro li { margin: 4px 0; }
.chain { list-style: none; margin: 0; padding: 0 20px 18px; font-size: .86rem; }
.chain li { padding: 2px 0; word-break: break-all; }
.chain b { display: inline-block; min-width: 2.6em; }
details.raw h4 { margin: 0; padding: 0 20px 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Redirects: the chain, step by step */
.hops-title { font-size: 1.15rem; margin: 36px 0 0; }
.hops { list-style: none; margin: 0 0 8px; padding: 0; counter-reset: hop; }
.hops li { position: relative; margin-top: 10px; padding: 14px 20px 14px 58px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.hops li::before { counter-increment: hop; content: counter(hop); position: absolute; left: 18px; top: 13px; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); color: var(--muted); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.hops li.end::before { content: "!"; color: var(--bad); background: var(--bad-bg); }
.hops .u { font-size: .9rem; word-break: break-all; }
.hops .to { margin-top: 6px; font-size: .85rem; word-break: break-all; }
.hops .meta { margin-top: 4px; color: var(--muted); font-size: .8rem; }
details.long summary { cursor: pointer; list-style: none; }
details.long summary::-webkit-details-marker { display: none; }
details.long summary span { color: var(--accent); font-size: .85rem; white-space: nowrap; }
details.long[open] summary code { display: none; }
details.long[open] summary span::after { content: " - skjul"; }
p.source { margin: 20px 0 0; color: var(--muted); font-size: .85rem; }

/* Stored result: when, a link to share, and a fresh check */
.resultbar { display: flex; gap: 16px 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.resultbar .sharebox { flex: 1; min-width: 0; }
.resultbar p { margin: 0 0 8px; color: var(--muted); font-size: .92rem; }
.resultbar .share { display: flex; gap: 8px; }
.resultbar .share .input { height: 42px; font-size: .85rem; }
.resultbar .btn { height: 42px; }
.btn.ghost { background: var(--panel); color: var(--accent); border: 1px solid var(--line-strong); }
.btn.ghost:hover { border-color: var(--accent); filter: none; }
.copy { display: none; }
.js .copy { display: inline-block; }
@media (max-width: 600px) {
  .resultbar form, .resultbar form .btn { width: 100%; }
}

/* How the grade came about, the way to A+, and configuration to copy */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.calc > div { padding: 16px 20px; min-width: 0; }
.calc > div + div { border-left: 1px solid var(--line); }
.calc h3 { margin: 0 0 8px; font-size: 1rem; }
.points { width: 100%; border-collapse: collapse; font-size: .92rem; }
.points th { text-align: left; font-weight: 400; padding: 3px 12px 3px 0; word-break: break-word; }
.points td { text-align: right; font-weight: 700; white-space: nowrap; padding: 3px 0; }
.points td small { color: var(--muted); font-weight: 400; }
.points td.ok, .points td.info { color: var(--ok); } .points td.warn { color: var(--warn); } .points td.bad { color: var(--bad); }
.points tr.sum th, .points tr.sum td { border-top: 1px solid var(--line-strong); padding-top: 6px; font-weight: 700; }
.steps { margin: 0; padding-left: 20px; font-size: .92rem; }
.steps li { margin: 3px 0; }
.steps span { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.calc .hint { margin: 10px 0 0; }
.hint { color: var(--muted); font-size: .88rem; }
details.config { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
details.config summary { padding: 14px 20px; cursor: pointer; font-weight: 600; }
details.config > .hint { margin: 0; padding: 0 20px 12px; }
.tabs { display: none; gap: 6px; flex-wrap: wrap; padding: 0 20px 12px; }
.js .tabs { display: flex; }
.tabs button { border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: inherit; font-size: .88rem; padding: 5px 14px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.cfg { padding: 0 20px 18px; }
.cfg[hidden] { display: none; }
.cfghead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 8px; }
.cfg h4 { margin: 0; font-size: .95rem; min-width: 0; }
.cfg h4 small { color: var(--muted); font-weight: 400; }
.cfg pre { margin: 0; padding: 12px 14px; background: var(--code); border-radius: 6px; overflow-x: auto; font-size: .8rem; line-height: 1.6; tab-size: 4; }
.cfg .copy { height: 32px; padding: 0 12px; font-size: .82rem; flex: none; }
@media (max-width: 900px) {
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* What changed since the check of the same address before */
.since { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); padding: 16px 20px; }
.since h3 { margin: 0 0 4px; font-size: 1rem; }
.since h3 small { color: var(--muted); font-weight: 400; font-size: .85rem; margin-left: 6px; }
.since p { margin: 0; font-size: .92rem; }
.since .hint { margin-top: 6px; }
.changes { list-style: none; margin: 10px 0 0; padding: 0; font-size: .92rem; }
.changes li { display: flex; align-items: center; gap: 10px; padding: 4px 0; flex-wrap: wrap; }
.changes .sym { width: 22px; height: 22px; flex: none; }
.changes .sym svg { width: 12px; height: 12px; }
.changes span { color: var(--muted); }

/* About page sections */
.intro h2 { margin: 32px 0 12px; }

/* TLS: the certificate chain */
dl.cert { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; padding: 0 20px 18px; font-size: .82rem; }
dl.cert dt { color: var(--muted); }
dl.cert dd { margin: 0; word-break: break-all; }
details.raw h4 + dl.cert { margin-top: 2px; }

/* TLS: accepted cipher suites */
.suites { list-style: none; margin: 0; padding: 0 20px 12px; font-size: .85rem; }
.suites li { display: flex; align-items: center; gap: 10px; padding: 3px 0; flex-wrap: wrap; }
.suites .sym { width: 20px; height: 20px; flex: none; }
.suites .sym svg { width: 11px; height: 11px; }
.suites code { word-break: break-all; }
.suites span { color: var(--muted); font-size: .82rem; }
details.raw > .hint { margin: 0; padding: 0 20px 14px; }

/* DNS records: type, value, then name and TTL. */
.records { list-style: none; margin: 0; padding: 0 20px 12px; font-size: .85rem; }
.records li { display: flex; align-items: baseline; gap: 10px; padding: 4px 0; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.records li:last-child { border-bottom: 0; }
.records code { word-break: break-all; }
.records .t { flex: none; min-width: 4.5em; font-weight: 600; }
.records span { color: var(--muted); font-size: .8rem; }
