:root {
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f7f7f5;
  --card: #ffffff;
  --accent: #1f6f50;
  --accent-ink: #ffffff;
  --accent-soft: #e6f1ec;
  --error: #b42318;
  --error-soft: #fdecea;
  --warn: #8a5a00;
  --warn-soft: #fdf3dc;
  --info-soft: #eef2f6;
  --radius: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
p { margin: 0 0 .75rem; }
ul, ol { padding-left: 1.25rem; margin: 0 0 .75rem; }
li { margin-bottom: .25rem; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: 1320px; margin: 0 auto; padding: 0 1.25rem; }
.main { padding: 2rem 1.25rem 4rem; }

.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--accent); }

.lead { font-size: 1.075rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.right { text-align: right; }
.crumb { margin-bottom: .5rem; font-size: .9rem; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.card-quiet { background: transparent; }
.card-danger { border-color: #f1c7c2; }
.card > :last-child { margin-bottom: 0; }

/* Formularer */
label { display: block; font-weight: 600; margin: 1rem 0 .35rem; }
label:first-child { margin-top: 0; }
input[type=text], input[type=password], input[type=search], select {
  width: 100%; padding: .6rem .7rem; font: inherit; color: inherit;
  border: 1px solid #cfd4da; border-radius: 6px; background: #fff;
}
input:focus, select:focus, button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #7fb69d; outline-offset: 2px;
}
input[readonly] { background: #f3f4f6; }
fieldset { border: 0; padding: 0; margin: 1.25rem 0 0; }
legend { font-weight: 600; margin-bottom: .35rem; padding: 0; }
.radio, .check-row { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin: .5rem 0; cursor: pointer; }
.radio input, .check-row input { margin-top: .3rem; }
.help { color: var(--muted); font-size: .875rem; margin-top: .35rem; }
.field-error { color: var(--error); font-size: .9rem; margin: .35rem 0 0; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row input, .row select { flex: 1 1 240px; width: auto; }
.prefix-input { display: flex; border: 1px solid #cfd4da; border-radius: 6px; overflow: hidden; background: #fff; }
.prefix-input span { padding: .6rem .5rem .6rem .7rem; color: var(--muted); background: #f3f4f6; white-space: nowrap; font-size: .9rem; display: flex; align-items: center; }
.prefix-input input { border: 0; border-radius: 0; }
form.inline { display: inline; margin: 0; }

button, .button {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: .55rem 1rem; border-radius: 6px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); margin-top: 1rem;
}
.row button, .row .button, .page-head .button, .wheel-actions button, .year-nav button, .nav button { margin-top: 0; }
button:hover, .button:hover { filter: brightness(1.08); }
button:disabled { opacity: .4; cursor: default; filter: none; }
.button-quiet { background: #fff; color: var(--ink-2); border-color: #cfd4da; }
.button-danger { background: var(--error); border-color: var(--error); }
button.link { background: none; border: 0; padding: 0; color: var(--ink-2); font-weight: 400; margin: 0; }
button.link:hover { color: var(--accent); }

/* Beskeder */
.notice { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; background: var(--info-soft); }
.notice-ok { background: var(--accent-soft); }
.notice-error { background: var(--error-soft); color: #7a1a12; }
.notice-info { background: var(--info-soft); }

/* Tabeller og lister */
table.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.list th, table.list td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .85rem; color: var(--muted); font-weight: 600; background: #fafafa; }
table.list tr:last-child td { border-bottom: 0; }
.pick-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.pick-list li { display: flex; gap: .6rem; align-items: baseline; padding: .45rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.pick-list li:last-child { border-bottom: 0; }
.tag { font-size: .75rem; background: #f3f4f6; border-radius: 4px; padding: .05rem .4rem; color: var(--muted); }
.wheel-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; }
.wheel-grid a { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.wheel-grid a:hover { border-color: var(--accent); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.intro { margin-bottom: 1rem; }

.checks { list-style: none; padding: 0; margin: 0 0 .75rem; }
.check { display: flex; gap: .6rem; padding: .4rem 0; margin: 0; align-items: flex-start; }
.check-mark { flex: 0 0 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.check-ok .check-mark { background: var(--accent-soft); color: var(--accent); }
.check-warn .check-mark { background: var(--warn-soft); color: var(--warn); }
.check-error .check-mark { background: var(--error-soft); color: var(--error); }
.check-info .check-mark { background: var(--info-soft); color: var(--ink-2); }
.ring-list dt { font-weight: 600; margin-top: .6rem; }
.ring-list dd { margin: .1rem 0 0; color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Årshjulet ---------- */
.wheel-page { background: #fff; }
.wheel-main { padding-top: 1.5rem; padding-bottom: 3rem; }
.wheel-head { margin-bottom: 1rem; }
.wheel-head h1 { margin-bottom: .2rem; }
.wheel-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 2rem; align-items: start; }
.wheel-col { min-width: 0; }
.wheel-svg svg { width: 100%; height: auto; display: block; }
.wheel-svg .cell { cursor: pointer; outline: none; }
.wheel-svg .cell:hover path { filter: brightness(.97); }
.wheel-svg .cell:focus-visible path { stroke: #7fb69d; }
.wheel-svg .dot:hover { stroke: #111827; }

.year-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: .5rem; }
.year-nav button { width: 2.4rem; padding: .3rem 0; font-size: 1.2rem; line-height: 1; }
.year-label { font-size: 1.15rem; min-width: 5rem; text-align: center; }

.month-tabs { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: .75rem; }
.month-tab { margin: 0; padding: .35rem 0; font-size: .8rem; font-weight: 500; background: #f3f4f6; color: var(--ink-2); border: 1px solid transparent; }
.month-tab[aria-selected=true] { background: var(--accent); color: #fff; }
.wheel-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }

.detail { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.detail h2 { font-size: 1.4rem; margin-bottom: .25rem; }
.ring-head { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin: 1.25rem 0 .5rem; }
.ring-chip { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 4px; color: var(--ink-2); }
.ring-chip.ring-0 { background: #d9e2ec; }
.ring-chip.ring-1 { background: #e9e0cf; }
.ring-chip.ring-2 { background: #d6e6d9; }

.items { list-style: none; padding: 0; margin: 0; }
.item { display: flex; gap: .65rem; padding: .55rem .5rem; margin: 0 -.5rem; border-radius: 6px; }
.item + .item { border-top: 1px solid #f0f1f3; }
.item.is-focus { background: #fff8e1; }
.item.is-done .item-title { color: var(--muted); text-decoration: line-through; }
.item-body { min-width: 0; }
.item-title a { color: var(--ink); text-decoration: none; font-weight: 600; }
.item-title a:hover { color: var(--accent); text-decoration: underline; }
.item-title span { font-weight: 600; }
.item-meta { font-size: .85rem; color: var(--muted); }
.item-notes { font-size: .875rem; color: var(--ink-2); margin: .3rem 0 0; white-space: pre-wrap; overflow-wrap: break-word; }
.item-notes summary { cursor: pointer; }
.swatch { flex: 0 0 .8rem; width: .8rem; height: .8rem; border-radius: 50%; margin-top: .35rem; display: inline-block; }

.year-list, .ideas { margin-top: 2.5rem; }
.year-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.year-table th, .year-table td { border-bottom: 1px solid var(--line); padding: .5rem .6rem; text-align: left; vertical-align: top; }
.year-table thead th { font-size: .8rem; color: var(--muted); }
.year-table tbody th { white-space: nowrap; font-weight: 600; }
.compact { list-style: none; padding: 0; margin: 0; }
.compact li { display: flex; gap: .4rem; align-items: baseline; margin-bottom: .2rem; }
.compact .swatch { flex-basis: .6rem; width: .6rem; height: .6rem; margin-top: 0; }

.embed .wheel-main { padding-top: .75rem; }

@media (max-width: 900px) {
  .wheel-layout { grid-template-columns: 1fr; }
  .detail { position: static; max-height: none; }
  .month-tabs { grid-template-columns: repeat(6, 1fr); }
}

@media print {
  .no-print { display: none !important; }
  body, .wheel-page { background: #fff; }
  .wheel-main { padding: 0; max-width: none; }
  .wheel-layout { display: block; }
  .wheel-svg { max-width: 17cm; margin: 0 auto; }
  .detail { display: none; }
  .year-list { display: block !important; page-break-before: always; margin-top: 0; }
  .ideas { page-break-before: always; }
  .item-title a { color: #000; }
  .swatch, .compact .swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
