:root {
  --bg: #ffffff;
  --text: #1c2430;
  --muted: #5b6573;
  --accent: #0b5cad;
  --box: #f2f5f9;
  --border: #d9dfe7;
  --warn: #fff6e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --text: #e6e9ee;
    --muted: #a3acb8;
    --accent: #7db4ff;
    --box: #1c232c;
    --border: #2f3946;
    --warn: #2e2716;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  padding: 0.8rem 16px;
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.top nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.95rem; }
.top nav a { text-decoration: none; }
.top nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; }
main { max-width: 760px; margin: 0 auto; padding: 1rem 16px 2rem; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: 0.8rem 0 1rem; }
h2 { font-size: 1.35rem; margin-top: 2rem; }
.lead { font-size: 1.1rem; }
.box, .checked, .note {
  background: var(--box);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin: 1.2rem 0;
}
.note { background: var(--warn); }
.checked { font-size: 0.9rem; color: var(--muted); }
.checked p { margin: 0.3rem 0; }
ol.steps { padding-left: 1.3rem; }
ol.steps li { margin-bottom: 0.5rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--border); padding: 0.45rem 0.6rem; text-align: left; vertical-align: top; }
th { background: var(--box); }

/* Kalender */
:root { --rod: #c8432b; --nu: #fff3c4; }
@media (prefers-color-scheme: dark) { :root { --rod: #ff7a5c; --nu: #3a3315; } }
.nyt { font-size: 1.25rem; background: var(--box); border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem 1rem; }
.nyt strong { font-size: 2rem; display: inline-block; margin: 0 0.2rem; }
.nyt span { color: var(--muted); font-size: 1rem; display: block; }
.rod { color: var(--rod); }
tr.nu td, tr.nu th, td.nu { background: var(--nu); }
.ar { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
table.manad { display: table; font-size: 0.85rem; text-align: center; }
table.manad caption { font-weight: 700; text-align: left; padding: 0.2rem 0; }
table.manad th, table.manad td { padding: 0.2rem; text-align: center; }
table.manad tbody th { color: var(--muted); font-weight: 400; }
table.manad td.rod { font-weight: 700; }
table.manad td.flagg { outline: 2px solid var(--accent); outline-offset: -2px; }
@media print { .top, footer, .checked, nav { display: none; } .ar { grid-template-columns: repeat(3, 1fr); } }

/* Flo og fjære */
svg.kurve { width: 100%; height: auto; display: block; font-size: 16px; fill: var(--muted); }
svg.kurve text.dag { font-weight: 700; fill: var(--text); }

/* Klockan i världen */
p.stor { margin: 0.5rem 0 0.8rem; }
.klocka { font-size: 3.2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.tid { font-variant-numeric: tabular-nums; }
