/* Inter (variable, latin subset incl. ä ö å), self-hosted: see fonts/INTER-LICENSE.txt */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); }

:root { --blue: #1558b8; --navy: #0b1f5c; --gold: #f5b800; --ink: #14213d; --muted: #5b6785;
        --line: #dde3ee; --bg: #f3f6fb; --green: #1b7f3b; --amber: #8a6500; --red: #b3261e; }
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink); padding-bottom: 76px; -webkit-font-smoothing: antialiased; }
main { max-width: 480px; margin: 0 auto; padding: 14px 14px 24px; }
h1 { font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; margin: 6px 0 14px; }
h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; margin: 0; }
a { color: var(--blue); }

.top { background: var(--navy); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 5; }
.brand { max-width: 480px; margin: 0 auto; padding: 8px 14px; display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 750; letter-spacing: -.01em; }
.brand img { background: #fff; border-radius: 50%; padding: 2px; }
.logo { display: block; margin: 28px auto 0; }

.flash { background: #fff6d6; border: 1px solid #ecce6b; border-radius: 10px; padding: 10px 12px; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #fff; border-top: 1px solid var(--line);
  z-index: 5; padding-bottom: env(safe-area-inset-bottom); }
.nav a { flex: 1; text-align: center; padding: 14px 4px 12px; min-height: 52px; text-decoration: none; font-weight: 600;
  font-size: .95rem; color: var(--muted); border-top: 3px solid transparent; }
.nav a[aria-current] { color: var(--blue); border-top-color: var(--gold); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 0 0 14px;
  box-shadow: 0 1px 2px rgba(11, 31, 92, .06); }
a.card { display: block; text-decoration: none; color: inherit; }
.muted { color: var(--muted); font-size: .9rem; }
.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; min-height: 46px; padding: 8px 12px; border: 1px solid #b8c2d6; border-radius: 10px;
  width: 100%; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 3px solid rgba(21, 88, 184, .35); outline-offset: 1px; }
input[type=checkbox] { width: 24px; min-height: 24px; accent-color: var(--blue); }
label.check { flex-direction: row; align-items: center; gap: 10px; }

.btn { font: inherit; font-weight: 650; min-height: 46px; padding: 8px 18px; border-radius: 10px; border: 1.5px solid var(--blue);
  background: #fff; color: var(--blue); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.small { font-size: .9rem; padding: 6px 14px; }

.duty { border-top: 1px solid var(--line); padding: 12px 0 4px; margin-top: 12px; }
.duty.open { background: #fffbe8; margin-inline: -14px; padding-inline: 14px; border-left: 4px solid var(--gold); }
.duty.done { margin-inline: -14px; padding-inline: 14px; border-left: 4px solid var(--green); }
.duty .row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.count { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.open .count { color: var(--amber); }
.done .count { color: var(--green); }
.people { margin: 6px 0 10px; padding: 0; list-style: none; }
.people li { padding: 3px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.err { color: var(--red); font-weight: 600; }
.linkbox { font: .8rem ui-monospace, monospace; word-break: break-all; background: #eaf0ff; padding: 10px; border-radius: 8px; user-select: all; }
.duty-pick { display: flex; gap: 10px; align-items: center; }
.duty-pick label { flex: 1; }
.duty-pick input[type=number] { width: 76px; flex: none; }
.signup-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Events: collapsible, clearly outlined */
.card.event { padding: 0; border: 2px solid var(--navy); margin-bottom: 20px; overflow: hidden; }
.event > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 14px;
  background: #e6edfb; cursor: pointer; }
.event > summary::-webkit-details-marker { display: none; }
.event > summary::after { content: "\25BE"; color: var(--navy); font-size: 1.2rem; transition: transform .15s; }
.event:not([open]) > summary::after { transform: rotate(-90deg); }
.event[open] > summary { border-bottom: 2px solid var(--navy); }
.event > summary:focus-visible { outline: 3px solid rgba(21, 88, 184, .5); outline-offset: -3px; }
.sum-main { flex: 1; min-width: 0; }
.pill { background: var(--gold); color: var(--navy); font-weight: 700; font-size: .85rem; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.event .body { padding: 0 14px 14px; }
.event .body > .muted:first-child { margin-top: 10px; }

/* Bottom bar: dividers between items */
.nav { border-top: 2px solid var(--navy); }
.nav a + a { border-left: 1px solid #c5cde0; }
.nav a[aria-current] { background: #e6edfb; }
