/* Space Grotesk + Inter, served from /fonts (SIL OFL 1.1, see fonts/OFL-*.txt) */
@font-face{font-family:"Space Grotesk";font-weight:500;font-display:swap;src:url(/fonts/space-grotesk-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Space Grotesk";font-weight:500;font-display:swap;src:url(/fonts/space-grotesk-latin-ext-500-normal.woff2) format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"Space Grotesk";font-weight:700;font-display:swap;src:url(/fonts/space-grotesk-latin-700-normal.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Space Grotesk";font-weight:700;font-display:swap;src:url(/fonts/space-grotesk-latin-ext-700-normal.woff2) format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"Inter";font-weight:400;font-display:swap;src:url(/fonts/inter-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Inter";font-weight:400;font-display:swap;src:url(/fonts/inter-latin-ext-400-normal.woff2) format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"Inter";font-weight:500;font-display:swap;src:url(/fonts/inter-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Inter";font-weight:500;font-display:swap;src:url(/fonts/inter-latin-ext-500-normal.woff2) format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"Inter";font-weight:600;font-display:swap;src:url(/fonts/inter-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Inter";font-weight:600;font-display:swap;src:url(/fonts/inter-latin-ext-600-normal.woff2) format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}

/* Kontaktbogen: an editorial contact sheet. Square corners, heavy black rules,
   big dates, one green for actions, burnt orange for "too long ago". */
:root {
  color-scheme: light dark;
  --bg: #fafaf8; --paper: #ffffff; --ink: #111111; --mute: #5e5e5e; --rule: #d6d6d2; --heavy: #111111;
  --accent: #0f7b5f; --accent-ink: #ffffff; --warn: #a4460a;
  --inv-bg: #111111; --inv-ink: #fafaf8; --inv-mute: #bdbdbd; --inv-rule: #333333; --inv-warn: #f0a070; --inv-accent: #3fbf99;
  --head: "Space Grotesk", Inter, system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
  --nav-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212; --paper: #1b1b1b; --ink: #f2f2ee; --mute: #a8a8a2; --rule: #34342f; --heavy: #f2f2ee;
    --accent: #3fbf99; --accent-ink: #0b1a15; --warn: #f0a070;
    --inv-bg: #f2f2ee; --inv-ink: #111111; --inv-mute: #555555; --inv-rule: #cfcfca; --inv-warn: #a4460a; --inv-accent: #0f7b5f;
  }
}

*, *::before, *::after { box-sizing: border-box; min-width: 0 }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); overflow-x: clip }
a { color: var(--accent) }
button, input, select, textarea { font: inherit; color: inherit }
h1, h2, h3 { margin: 0 }
[hidden] { display: none !important }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
.skip { position: absolute; left: -999px; top: 8px; z-index: 20; background: var(--ink); color: var(--bg); padding: 8px 12px }
.skip:focus { left: 8px }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }

/* phone vs. laptop chrome */
@media (min-width: 820px) { .phone { display: none !important } }
@media (max-width: 819.98px) { .wide { display: none !important } }

/* ---------- top bar (laptop) ---------- */
.top { display: flex; align-items: center; gap: 12px 28px; padding: 12px 32px; border-bottom: 3px solid var(--heavy); background: var(--bg); position: sticky; top: 0; z-index: 4 }
.brand { flex: none; font: 700 20px/1 var(--head); color: var(--ink); text-decoration: none; white-space: nowrap }
.topnav { display: flex; gap: 20px; flex: 1 0 auto }
.topnav a, .tabs a { flex: none }
.topnav a, .tabs a { padding: 8px 0; color: var(--mute); text-decoration: none; font-weight: 500; white-space: nowrap }
.topnav a[aria-current], .tabs a[aria-current] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--accent) }
.topsearch { flex: 0 1 220px; text-decoration: none; color: var(--mute) }
.top .btn, .top .link { flex: none }
.topsearch span { flex: 1 }
kbd { font: 500 11px/1 var(--body); border: 1px solid var(--rule); padding: 3px 5px }

/* ---------- bottom bar (phone) ---------- */
body:has(.bot) { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)) }
.bot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; align-items: stretch; background: var(--bg); border-top: 3px solid var(--heavy); padding-bottom: env(safe-area-inset-bottom) }
.bot a { flex: 1; display: grid; place-items: center; min-height: var(--nav-h); font-size: 13px; font-weight: 500; color: var(--mute); text-decoration: none }
.bot a[aria-current] { color: var(--ink); font-weight: 700; box-shadow: inset 0 3px 0 var(--accent) }
.bot .plus { flex: 0 0 68px; background: var(--accent); color: var(--accent-ink) }

/* ---------- page frame ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 16px 16px 32px }
.page.narrow { max-width: 760px }
@media (min-width: 820px) { .page { padding: 28px 32px 56px } }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 3px solid var(--heavy) }
.ph h1, .dhead h1 { font: 700 34px/1 var(--head); letter-spacing: -.02em }
@media (min-width: 820px) { .ph h1, .dhead h1 { font-size: 44px } }
.eyebrow, .lbl { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute) }
.lbl { margin: 0 0 6px }
.lbl.sec { margin-top: 22px }
.note, .quiet { color: var(--mute); font-size: 15px; margin: 0 0 12px }
.more { display: inline-block; margin-top: 10px; font-weight: 600; text-decoration: none; padding: 6px 0 }
.who { margin-top: 28px; font-size: 14px; color: var(--mute) }
.link { background: none; border: 0; padding: 10px 2px; color: var(--accent); text-decoration: underline; cursor: pointer; font-weight: 600 }
.top .link { color: var(--mute); text-decoration: none; font-weight: 500 }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 2px solid var(--heavy); background: transparent; color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap }
.btn svg { width: 18px; height: 18px }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.btn.danger { margin-left: auto; border-color: var(--rule); color: var(--mute) }
.btn.danger.armed { border-color: var(--warn); background: var(--warn); color: var(--bg) }
.sq { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--heavy); background: transparent; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; text-decoration: none }

/* ---------- search, tabs, chips ---------- */
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px }
.bar.tight { margin-top: -6px }
.search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 2px solid var(--heavy); background: var(--paper) }
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 16px; min-height: 40px }
.sel { min-height: 44px; border: 2px solid var(--heavy); background: var(--paper); padding: 0 10px; font-size: 15px }
.tabs { display: flex; gap: 4px 20px; overflow-x: auto; scrollbar-width: none; margin: -4px 0 14px; border-bottom: 1px solid var(--rule) }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chips:empty { display: none }
.pchip { display: inline-flex; align-items: baseline; gap: 6px; min-height: 40px; padding: 8px 12px; border: 2px solid var(--rule); background: var(--paper); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; text-align: left }
.pchip small { font-weight: 400; color: var(--mute); font-size: 12px }
.pchip.on { border-color: var(--heavy); background: var(--ink); color: var(--bg) }
.pchip.new { border-style: dashed; color: var(--accent) }
.pchip.sm { min-height: 34px; padding: 4px 10px; font-size: 13px }
.tag { padding: 6px 10px; border: 2px solid var(--heavy); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px }

/* ---------- overview ---------- */
.ov { display: grid; gap: 22px }
@media (min-width: 820px) {
  .ov { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: "fu stale" "tl stale"; align-items: start; gap: 28px 36px }
  .ov-fu { grid-area: fu } .ov-stale { grid-area: stale } .ov-tl { grid-area: tl }
  .ov-stale .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible }
}
.inv { background: var(--inv-bg); color: var(--inv-ink); padding: 12px 16px 6px; margin: 0 -16px }
@media (min-width: 820px) { .inv { margin: 0 } }
.inv .lbl, .inv .quiet { color: var(--inv-mute) }
.inv .fu { border-color: var(--inv-rule) }
.inv .fu a, .inv .fu a b { color: var(--inv-ink) }
.inv .fu small { color: var(--inv-mute) }
.inv .due { color: var(--inv-mute) }
.inv .due.late { color: var(--inv-warn) }
.inv input { accent-color: var(--inv-accent) }

.fu { display: flex; gap: 12px; align-items: center; min-height: 52px; border-top: 1px solid var(--rule) }
.fu input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent) }
.fu a { flex: 1; display: flex; flex-direction: column; padding: 8px 0; color: var(--ink); text-decoration: none }
.fu small { color: var(--mute); font-size: 13px }
.due { flex: none; font-size: 13px; font-weight: 600; color: var(--mute) }
.due.late { color: var(--warn) }

.cards { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; margin: 0 -2px }
.card { flex: 0 0 148px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 2px solid var(--heavy); background: var(--paper); color: var(--ink); text-decoration: none }
.card b { margin-top: 6px; font-size: 15px }
.card small { color: var(--mute); font-size: 13px }
.big { font: 700 28px/1 var(--head) }
.warn { color: var(--warn) }

/* ---------- timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0 }
.tle { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none }
@media (min-width: 820px) { .tle { grid-template-columns: 76px minmax(0, 1fr); gap: 16px } }
.dd { font: 700 26px/1 var(--head) }
@media (min-width: 820px) { .dd { font-size: 30px } }
.dd small { display: block; margin-top: 4px; font: 600 11px/1.2 var(--body); color: var(--mute) }
.tb { display: flex; flex-direction: column; gap: 1px }
.ty { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent) }
.tb b { font-weight: 600; font-size: 16px }
.tb .pl { font-weight: 400; color: var(--mute) }
.sn { color: var(--mute); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }

/* ---------- lists ---------- */
.rows { border-bottom: 1px solid var(--rule) }
.row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 0; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none }
.rt { flex: 1; display: flex; flex-direction: column }
.rt b { font-weight: 600 }
.rt small { color: var(--mute); font-size: 14px }
.rv { flex: none; font-weight: 600; font-size: 14px; color: var(--mute) }
.rv.warn { color: var(--warn) }
@media (min-width: 820px) { .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; border-bottom: 0 } .row { border-bottom: 0 } }
.empty { padding: 24px; border: 2px dashed var(--rule); color: var(--mute); text-align: center }
.empty p { margin: 0 0 12px }
.empty p:last-child { margin: 0 }

/* ---------- detail ---------- */
.backlink { display: inline-block; padding: 6px 0; font-size: 14px; font-weight: 600; text-decoration: none }
.dhead { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: flex-end; justify-content: space-between; margin: 4px 0 20px }
.dhead .sub { margin: 6px 0 0; color: var(--mute) }
.acts { display: flex; flex-wrap: wrap; gap: 8px }
.dgrid { display: flex; flex-wrap: wrap-reverse; gap: 28px 40px; border-top: 3px solid var(--heavy); padding-top: 18px }
.dmain { flex: 2 1 440px }
.dside { flex: 1 1 260px; display: flex; flex-direction: column; gap: 22px }
.since { display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--heavy); background: var(--paper); padding: 14px 16px; color: var(--mute) }
.since .big { font-size: 38px; color: var(--ink) }
.since.warn .big { color: var(--warn) }
.notes { margin: 0; white-space: pre-wrap }

/* ---------- matrix ---------- */
.mx-wrap { overflow-x: auto; border-top: 3px solid var(--heavy) }
.mx { border-collapse: collapse }
.mx th { font: 700 14px/1.1 var(--head); padding: 10px 6px; text-align: center; white-space: nowrap; border-bottom: 2px solid var(--heavy) }
.mx th.rh { text-align: left; padding-right: 18px; position: sticky; left: 0; background: var(--bg); font: 600 15px var(--body); border-bottom: 1px solid var(--rule) }
.mx th.rh a { color: var(--ink); text-decoration: none }
.mx th.rh small { margin-left: 8px; color: var(--mute); font-weight: 400; font-size: 13px }
.mx thead th.rh { border-bottom: 2px solid var(--heavy) }
.mx td { border-bottom: 1px solid var(--rule); text-align: center; padding: 0 }
.cell { width: 48px; height: 44px; border: 0; background: none; cursor: pointer; display: inline-grid; place-items: center }
.cell i { display: block; width: 14px; height: 14px; border: 2px solid var(--rule) }
.cell.on i { width: 18px; height: 18px; background: var(--accent); border-color: var(--accent) }
.cell:hover i { border-color: var(--heavy) }
.mx-list section { padding: 12px 0; border-top: 1px solid var(--rule) }
.mx-list h2 { font-size: 16px; font-weight: 600; margin-bottom: 8px }
.mx-list h2 a { color: var(--ink); text-decoration: none }
.mx-list h2 small { color: var(--mute); font-weight: 400; font-size: 13px }

/* ---------- forms ---------- */
.f { display: grid; gap: 6px; margin-bottom: 16px }
.f label, .flabel { font-size: 14px; font-weight: 600 }
.f input:not([type=checkbox]), .f select, .f textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 2px solid var(--rule); border-radius: 0; background: var(--paper); font-size: 16px }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--heavy); outline: none }
.f textarea { min-height: 100px; resize: vertical }
.f textarea.tall { min-height: 180px }
.f .chips { margin-top: 2px }
.sug { margin-top: 2px }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
@media (max-width: 559.98px) { .row2 { grid-template-columns: minmax(0, 1fr); gap: 0 } }
.types { margin-bottom: 18px }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; margin: -4px 0 12px; font-weight: 600 }
.check input { width: 22px; height: 22px; accent-color: var(--accent) }
.foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 3px solid var(--heavy) }

/* ---------- overlays ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9; max-width: calc(100vw - 32px); padding: 10px 16px; background: var(--ink); color: var(--bg); font-weight: 500 }
@media (min-width: 820px) { .toast { bottom: 24px } }
.banner { position: sticky; top: 0; z-index: 8; padding: 10px 16px; background: var(--warn); color: var(--bg); font-weight: 600 }
.gate { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: var(--inv-bg); color: var(--inv-ink); text-align: center }
.gate h1 { font: 700 40px/1 var(--head); letter-spacing: -.02em }
.gate p { color: var(--inv-mute); margin: 12px 0 24px }
