:root {
  --bg: #F6F4EE; --card: #FFFFFF; --ink: #1E2A23; --muted: #5B665F; --line: #E4E0D6; --line2: #F0ECE3;
  --green: #2F7D5B; --green-dark: #1F5A40; --green-tint: #E3F0E8;
  --orange: #E8833A; --orange-tint: #FCEBDD; --orange-ink: #7A3A0E;
  --blue-tint: #E2E8F6; --blue-ink: #24407F; --purple-tint: #EFE4F3; --purple-ink: #5E2F70;
  --red-tint: #F6E2DA; --red-ink: #7A2F17; --yellow-tint: #FFF1C7; --yellow-ink: #6B4E00;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-padding-bottom: 96px; scroll-padding-top: 64px; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; flex: none; display: block; }
.auth .brand-logo { width: 48px; height: 48px; border-radius: 12px; }
.brand small { font-weight: 700; font-size: 13px; color: var(--muted); }
main { flex: 1; padding: 16px 16px 96px; display: flex; flex-direction: column; gap: 14px; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; padding: 4px 4px calc(8px + env(safe-area-inset-bottom)); }
.nav-inner { display: flex; width: 100%; max-width: 560px; }
.nav a { flex: 1; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 800; }
.nav a[aria-current="page"] { color: var(--green); }

.eyebrow { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
h1 { margin: 2px 0 0; font-size: 28px; line-height: 1.15; }
h2 { margin: 4px 0 0; font-size: 17px; font-weight: 800; }
p { margin: 0; line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.bold { font-weight: 800; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.card.dashed { border: 1.5px dashed #C9C3B5; }
.card.dark { background: var(--ink); color: #fff; border: 0; }
.card.tint-orange { background: var(--orange-tint); border: 0; }
.card.tint-blue { background: var(--blue-tint); border: 0; color: var(--blue-ink); }
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line2); }
.list-row:first-child { border-top: 0; }

.btn { border: 0; border-radius: 999px; padding: 0 16px; min-height: 44px; font-weight: 800; font-size: 14px; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn.block { width: 100%; border-radius: 14px; min-height: 52px; font-size: 16px; }
.btn.orange { background: var(--orange); color: var(--ink); }
.btn.outline { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #C9C3B5; }
.btn.light { background: var(--green-tint); color: var(--green-dark); }
.btn.link { background: none; color: var(--green-dark); padding: 0; min-height: 44px; align-self: flex-start; }
.btn.danger { background: #fff; color: var(--red-ink); border: 1px solid #D8B5A8; }
.chip { flex: none; border: 1px solid #D9D4C8; background: #fff; color: var(--ink); border-radius: 999px; padding: 0 14px; min-height: 44px; font-weight: 800; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 8px; background: var(--line2); }
.badge { flex: none; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 3px 10px; }

.check { width: 44px; height: 44px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 0; background: #fff; border: 2px solid #9A9488; }
.check.on { background: var(--green); border-color: var(--green); }
.check.pending { background: var(--orange-tint); border-color: var(--orange); }
.box { width: 28px; height: 28px; flex: none; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 2px solid #9A9488; background: #fff; }
.box.on { background: var(--green); border-color: var(--green); }
.step-btn { width: 100%; display: flex; gap: 12px; align-items: center; border: 0; border-top: 1px solid var(--line2); background: #fff; padding: 10px 14px; min-height: 56px; text-align: left; }
.step-btn.done .step-text { color: var(--muted); text-decoration: line-through; }
.strike { text-decoration: line-through; color: var(--muted); }

.avatar { width: 28px; height: 28px; flex: none; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; }
.avatar.lg { width: 36px; height: 36px; font-size: 14px; }
.avatar.free { background: #fff; color: var(--muted); border: 1.5px dashed #9A9488; }
.bar { height: 10px; background: var(--green-tint); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--green); border-radius: 99px; }

.days { display: flex; gap: 5px; }
.day { flex: 1; min-width: 0; min-height: 60px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; padding: 0; background: #fff; border: 1px solid var(--line); }
.day b { font-size: 17px; }
.day[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.day.today:not([aria-pressed="true"]) { border: 2px solid var(--green); }
.time { width: 46px; flex: none; font-weight: 800; font-size: 13px; color: var(--muted); }

label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 800; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  border: 1px solid #C9C3B5; border-radius: 12px; padding: 0 12px; min-height: 46px; font-size: 16px; background: #fff; width: 100%; font-weight: 400;
}
textarea { padding: 10px 12px; min-height: 80px; resize: vertical; }
.form { display: flex; flex-direction: column; gap: 10px; }
.two { display: flex; gap: 8px; } .two > * { flex: 1; min-width: 0; }
.toggle { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; min-height: 48px; text-align: left; width: 100%; font-weight: 800; font-size: 14px; }
.track { width: 52px; height: 32px; flex: none; border-radius: 99px; padding: 3px; display: flex; background: #8F897C; }
.track::after { content: ""; width: 26px; height: 26px; border-radius: 99px; background: #fff; }
.toggle[aria-pressed="true"] .track { background: var(--green); justify-content: flex-end; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid #C9C3B5; background: #fff; font-size: 20px; font-weight: 800; }
.stepper output { min-width: 40px; text-align: center; font-weight: 800; }

.notice { border-radius: 14px; padding: 10px 12px; font-size: 14px; font-weight: 800; line-height: 1.4; }
.notice.blue { background: var(--blue-tint); color: var(--blue-ink); }
.notice.orange { background: var(--orange-tint); color: var(--orange-ink); }
.notice.red { background: var(--red-tint); color: var(--red-ink); }
.notice.green { background: var(--green-tint); color: var(--green-dark); }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 20; max-width: 90vw; }
.toast.error { background: var(--red-ink); }

.auth { max-width: 420px; margin: 0 auto; padding: 40px 20px; display: flex; flex-direction: column; gap: 18px; }
.auth .brand { font-size: 30px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { color: var(--muted); font-size: 14px; }
details.card summary { cursor: pointer; font-weight: 800; min-height: 32px; display: flex; align-items: center; }

/* flere personer på én opgave */
.avatars { display: inline-flex; flex: none; }
.avatars .avatar + .avatar { margin-left: -8px; box-shadow: 0 0 0 2px #fff; }
.slot-who summary { cursor: pointer; }
.slot-who[open] { flex-basis: 100%; }
