/* ============================================================
   Kollegienet.dk — redesign
   A community-run, volunteer-operated ISP for dorms in Odense.
   Design language borrows from network status boards: mono
   data, signal dots, hairline dividers. Two accents only —
   signal green (OK) and signal red (problem) — everything
   else is ink on paper.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ink: #241C35;        /* headings, primary text — deep plum-black */
  --paper: #FFFFFF;      /* page background — matches kollegienet.dk's theme-color */
  --panel: #FFFFFF;      /* card / panel background */
  --wire: #7A3FB8;       /* links, brand accent — purple */
  --wire-soft: #F1E9F9;  /* pale purple wash for hovers/backgrounds */
  --green: #2E7D46;      /* status: OK — stays green, it's functional not brand */
  --red: #B5432C;        /* status: problem — stays red, functional */
  --line: #E0D6EA;       /* hairline rule, purple-tinted */
  --muted: #6B6578;      /* secondary text, purple-grey */

  --brand: #4E2355;        /* kollegienet.dk's background color — used on header/footer */
  --brand-line: #6B3E76;   /* hairline/gap color on top of --brand */
  --on-brand: #F5EEF8;     /* primary text/links on --brand */
  --on-brand-muted: #C9A9D6; /* secondary text on --brand */
  --on-brand-accent: #E7B9F5; /* hover/active accent on --brand */

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 3px;
  --max: 1080px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* clear the sticky .site-header (72px) on anchor jumps */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--wire);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--wire);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
h3 { font-size: 1.05rem; }
h4 { font-size: .92rem; }

.heading-link { color: inherit; text-decoration: none; }
.heading-link:hover { color: var(--wire); text-decoration: underline; text-underline-offset: 4px; }

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: .6em;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.hairline { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--brand-line);
  background: var(--brand);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  /* A little wider than the page text so the Danish menu has room to spare. */
  max-width: calc(var(--max) + 120px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--on-brand);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.15;
}
.wordmark-top {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
.wordmark .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--on-brand-accent);
  display: inline-block;
}
.wordmark small {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: .62rem;
  letter-spacing: .04em;
  color: var(--on-brand-muted);
}

nav.main-nav {
  display: flex;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: .78rem;
}
nav.main-nav a {
  white-space: nowrap;
  color: var(--on-brand);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] {
  color: var(--on-brand-accent);
  border-bottom-color: var(--on-brand-accent);
}

/* Language switch (DA | EN), next to the main nav; stays visible on mobile */
nav.main-nav { margin-left: auto; }
.lang-switch {
  display: flex;
  gap: 4px;
  margin-left: 24px;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
}
.lang-switch a, .lang-switch span {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  color: var(--on-brand);
  text-decoration: none;
  line-height: 1;
}
.lang-switch img { display: block; width: 18px; height: 12px; border-radius: 1px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.lang-switch a:hover { border-color: var(--on-brand-accent); color: var(--on-brand-accent); }
.lang-switch [aria-current] { background: var(--on-brand); border-color: var(--on-brand); color: var(--brand); }
/* Measured: the Danish menu fits on one line with room to spare above 1150px window width;
   at 1150px and below it collapses into the Menu button (see below). */

::selection {
  background: var(--wire-soft);
  color: var(--ink);
}

#nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  font-family: var(--font-mono);
  font-size: .8rem;
  cursor: pointer;
  color: var(--on-brand);
  border: 1px solid var(--brand-line);
  padding: 8px 12px;
  border-radius: var(--radius);
}

@media (max-width: 1150px) {
  nav.main-nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--brand);
    border-bottom: 1px solid var(--brand-line);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
  }
  nav.main-nav a { padding: 10px 0; border-bottom: 1px solid var(--brand-line); }
  #nav-toggle:checked ~ nav.main-nav { display: flex; }
  .nav-toggle-label { display: inline-block; order: 3; margin-left: 10px; }
  .lang-switch { order: 2; margin-left: auto; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 48px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
}
.hero h1 { max-width: 14ch; }
.hero .lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 46ch;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.6em; }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .85rem;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--wire); color: var(--paper); border-color: var(--wire); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { color: var(--wire); border-color: var(--wire); }

/* ---------- Status board (signature element) ---------- */

.board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.board-head {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.board-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 320px;
  overflow-y: auto;
}
.board-list.full { max-height: none; }
.board-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: .84rem;
}
.dot-ok, .dot-bad {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: none;
}
.dot-ok { background: var(--green); }
.dot-bad { background: var(--red); }
.board-list li.problem { color: var(--red); }
.board-list.stale { opacity: .55; }
.board-foot {
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: .78rem;
}
.board-foot a { color: var(--wire); }

/* ---------- Overall status indicator (single aggregate status) ---------- */

.status-overall {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 32px 22px;
}
.status-dot-lg {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
}
.status-dot-lg.ok { background: var(--green); box-shadow: 0 0 0 5px rgba(46,125,70,.12); }
.status-dot-lg.bad { background: var(--red); box-shadow: 0 0 0 5px rgba(181,67,44,.12); }
.status-dot-lg.unknown { background: var(--muted); box-shadow: 0 0 0 5px rgba(107,101,120,.12); }
.status-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}
.status-sub {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
  margin-top: 3px;
}
.status-overall.compact { padding: 22px 18px; gap: 14px; }
.status-overall.compact .status-dot-lg { width: 14px; height: 14px; }
.status-overall.compact .status-label { font-size: 1rem; }

/* ---------- Notice banner ---------- */

.notice {
  border: 1px solid var(--red);
  background: #FBEEEA;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: .95rem;
  color: var(--ink);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.notice .dot-bad { margin-top: 7px; }

/* ---------- Sections ---------- */

section { padding: 48px 0; }
section.tight { padding: 24px 0; }
.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
}
.page-hero .lede { color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.crumb {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.crumb a { color: var(--muted); }

/* ---------- Prose ---------- */

.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* ---------- Data table ---------- */

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
table.data th {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
table.data td.mono { font-family: var(--font-mono); }

/* ---------- Document list ---------- */

.doc-group { margin-bottom: 40px; }
.doc-group h3 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 4px;
}
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li {
  border-bottom: 1px solid var(--line);
}
.doc-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  text-decoration: none;
  color: var(--ink);
}
.doc-list a:hover { color: var(--wire); }
.doc-list a .ext {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  flex: none;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}
.year-grid a {
  display: block;
  text-align: center;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: .82rem;
  text-decoration: none;
  color: var(--ink);
}
.year-grid a:hover { border-color: var(--wire); color: var(--wire); }

/* ---------- Info panel (hours / contact — repeated block) ---------- */

.info-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--brand-line);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 760px) { .info-panels { grid-template-columns: 1fr; } }
.info-panel {
  background: var(--panel);
  padding: 22px 24px;
}
.info-panel h3 { margin-bottom: 12px; }
.info-panel .eyebrow { margin-bottom: 4px; }

table.hours { width: 100%; font-family: var(--font-mono); font-size: .82rem; border-collapse: collapse; }
table.hours td { padding: 4px 0; }
table.hours td:last-child { text-align: right; color: var(--muted); }
table.hours tr.closed td:last-child { color: var(--line); }

.contact-line { display: block; margin-bottom: 6px; font-size: .95rem; }
.contact-line .label { color: var(--muted); font-family: var(--font-mono); font-size: .72rem; display: block; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--brand);
  margin-top: 40px;
  padding: 40px 0 28px;
}
.site-footer .foot-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}
.site-footer .foot-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: .82rem;
}
.site-footer .foot-links a { color: var(--on-brand); text-decoration: none; }
.site-footer .foot-links a:hover { color: var(--on-brand-accent); }
.foot-bottom {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--on-brand-muted);
  border-top: 1px solid var(--brand-line);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.foot-bottom a { color: var(--on-brand); }
.foot-bottom a:hover { color: var(--on-brand-accent); }

/* ---------- Volunteer callout ---------- */

.callout {
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.callout h2 { color: var(--on-brand); margin-bottom: .2em; }
.callout p { color: var(--on-brand-muted); margin-bottom: 0; max-width: 52ch; }
.callout .btn-solid { background: var(--on-brand); color: var(--brand); border-color: var(--on-brand); }
.callout .btn-solid:hover { background: var(--green); color: var(--on-brand); border-color: var(--green); }

/* ---------- Trafikstatistik ---------- */

:root {
  --chart-down: #7A3FB8;   /* download — brand purple */
  --chart-up: #2B8A8A;     /* upload — teal, distinct from status green/red */
}
.stats-key .down, .stats-now .down, .stats-legend th.down { color: var(--chart-down); }
.stats-key .up, .stats-now .up, .stats-legend th.up { color: var(--chart-up); }
.stats-updated { display: block; font-family: var(--font-mono); font-size: .78rem; margin-top: 6px; }
.stats-updated.stale { color: var(--red); }
.stats-group { font-size: 1.1rem; margin: 28px 0 12px; }
.stats-group:first-child { margin-top: 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.stats-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px 14px 10px;
  color: var(--ink);
  text-decoration: none;
}
.stats-card:hover { border-color: var(--wire); }
.stats-card-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.stats-name { font-weight: 600; }
.stats-speed { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); white-space: nowrap; }
.stats-now { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .78rem; margin-top: 4px; }
.traffic-chart { display: block; height: auto; }
.traffic-chart .area.down { fill: var(--chart-down); fill-opacity: .75; }
.traffic-chart .area.up { fill: var(--chart-up); fill-opacity: .75; }
.traffic-chart .axis { stroke: var(--ink); stroke-width: 1; }
.traffic-chart .grid { stroke: var(--line); stroke-width: 1; }
.traffic-chart .tick { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); }
.stats-back { display: inline-block; font-family: var(--font-mono); font-size: .82rem; margin-bottom: 12px; }
.stats-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.stats-tabs a {
  font-family: var(--font-mono); font-size: .8rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 5px 12px; color: var(--ink); text-decoration: none;
}
.stats-tabs a.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stats-legend { border-collapse: collapse; margin-top: 16px; font-family: var(--font-mono); font-size: .8rem; width: 100%; }
.stats-legend th, .stats-legend td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.stats-legend th:first-child { text-align: left; }
.stats-legend tr:first-child th { color: var(--muted); font-weight: 500; }
[data-stats-detail] { overflow-x: auto; }

/* ---------- Front page: router help (most common support request) ---------- */

.help-band { padding-top: 0; }
.help-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
  background: var(--wire-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--wire);
  border-radius: var(--radius);
  padding: 32px;
}
.help-intro h2 { margin: .2em 0 .3em; }
.help-intro p { color: var(--ink); margin-bottom: 0; max-width: 46ch; }
.help-intro .cta-row { margin-top: 1.2em; }
.help-steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.help-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 12px;
  align-items: start;
}
.help-steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--wire);
  color: var(--paper);
  font-family: var(--font-mono);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.help-steps strong { font-family: var(--font-display); }
.help-steps span { color: var(--muted); font-size: .95rem; }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 760px) {
  .help-panel { grid-template-columns: 1fr; gap: 28px; padding: 24px; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Router guide (router-opsaetning.html) ---------- */

.guide-steps > li { margin-bottom: 1.4em; }
.guide-steps > li > p:first-child { margin-bottom: .3em; }
.guide-photo { margin: 12px 0; }
.guide-photo img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.guide-photo-wall-socket img { max-width: 300px; }
.guide-photo-input-port img { max-width: 460px; }
.guide-note { background: var(--wire-soft); border-left: 3px solid var(--wire); padding: 10px 14px; border-radius: var(--radius); }
.guide-pdf { color: var(--muted); font-size: .9rem; }
