/* Koru Impact Task Board: the prototype's look (Koru_Impact_Task_Board_v1_1_27Oct2026.html),
   ported. Koru navy, gold and forest green; Noto Serif headings and Noto Sans body, served by
   the app from the Noto project's release (fonts/OFL.txt); light and dark themes; phone width.
   Additions for the app: sign-in, the person's bar, the backup's status line, "Prospect
   hidden", the Director's cleared list, the audit log, and the "What we keep" page. */

@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/NotoSans-Regular.ttf") format("truetype"); }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/NotoSans-Medium.ttf") format("truetype"); }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/NotoSans-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/NotoSans-Bold.ttf") format("truetype"); }
@font-face { font-family: "Noto Serif"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/NotoSerif-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Noto Serif"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/NotoSerif-Bold.ttf") format("truetype"); }

:root {
  --navy: #1B365D; --gold: #C9A227; --forest: #426B57; --ivory: #F8F5EE; --slate: #5A6672;
  --bg: #F8F5EE; --surface: #FFFFFF; --sunken: #F1ECE1; --ink: #172238; --muted: #5A6672; --line: #E2DCCF;
  --accent: #1B365D; --accent-ink: #FFFFFF; --band: #1B365D; --band-ink: #FFFFFF; --band-muted: #C7D2E3;
  --ok: #426B57; --ok-bg: #E4EEE8; --warn: #9A5B12; --warn-bg: #FBEFD9; --bad: #A3322B; --bad-bg: #F8E3E0;
  --focus: #C9A227; --focus-inner: #172238; --field-line: #5A6672;
  --k-disc: #1B365D; /* the agenda numbers' navy disc, light mode only (decision 3(d)) */
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans", Arial, "Helvetica Neue", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0F1623; --surface: #172131; --sunken: #121B29; --ink: #E7ECF4; --muted: #A2AEC0; --line: #2A3850;
  --accent: #A9C1E6; --accent-ink: #0F1623; --band: #13233D; --band-ink: #F2F5FA; --band-muted: #9FB0CA;
  --ok: #8CC3A4; --ok-bg: #1C3329; --warn: #E7B35E; --warn-bg: #3A2C14; --bad: #F0938A; --bad-bg: #3D1F1D;
  --gold: #D9B64E; --focus: #D9B64E; --focus-inner: #E7ECF4; --field-line: #A2AEC0; --k-disc: #172131; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0F1623; --surface: #172131; --sunken: #121B29; --ink: #E7ECF4; --muted: #A2AEC0; --line: #2A3850;
  --accent: #A9C1E6; --accent-ink: #0F1623; --band: #13233D; --band-ink: #F2F5FA; --band-muted: #9FB0CA;
  --ok: #8CC3A4; --ok-bg: #1C3329; --warn: #E7B35E; --warn-bg: #3A2C14; --bad: #F0938A; --bad-bg: #3D1F1D;
  --gold: #D9B64E; --focus: #D9B64E; --focus-inner: #E7ECF4; --field-line: #A2AEC0; --k-disc: #172131; color-scheme: dark; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
* { box-sizing: border-box; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--band); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
button, input, select, textarea { font: inherit; color: inherit; }
/* The gold ring is below 3:1 on the light surfaces (WCAG 2.1, 1.4.11), so a 2-pixel inner edge in the
   ink colour goes with it (tests/test_contrast.py). */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-inner); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
button.linkish { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.card button.t { width: 100%; }
a { color: var(--accent); }
[hidden] { display: none !important; }

/* masthead */
.mast { background: var(--band); color: var(--band-ink); }
.mast .wrap { padding-block: 18px 0; display: grid; gap: 14px; }
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-bottom: 14px; }
.brand > div:first-of-type { flex: 1 1 220px; min-width: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 50%; padding: 4px; flex: none; }
.brand h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(20px, 4.5vw, 26px); letter-spacing: .01em; text-wrap: balance; }
.brand p { margin: 2px 0 0; color: var(--band-muted); font-size: 13px; }
.userbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--band-muted); }
.userbar b { color: var(--band-ink); font-weight: 600; }
.userbar form { margin: 0; }
.userbar .btn { background: transparent; color: var(--band-ink); border-color: var(--band-muted); }
.tabs { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--band); border-bottom: 3px solid var(--gold); }
.tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 0; }
.tabs a { color: var(--band-muted); text-decoration: none; padding: 12px 14px 10px; font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.tabs a[aria-current="page"] { color: var(--band-ink); border-bottom-color: var(--band-ink); }
.tabs a .n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: rgba(255,255,255,.14); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.tabs-rule { border-bottom: 3px solid var(--gold); }

/* status banner, and the backup's status line */
.banner { margin: 16px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--sunken); color: var(--muted); font-size: 14px; border: 1px solid var(--line); overflow-wrap: anywhere; }
.banner.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.backup { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; font-size: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; overflow-wrap: anywhere; }
.backup.ok { border-color: var(--ok); }
.backup.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.backup b { font-weight: 600; }

main { padding-block: 20px 32px; }
.viewhead { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.viewhead h2 { margin: 0; font-family: var(--serif); font-size: 22px; text-wrap: balance; }
.viewhead p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 64ch; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* summary tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; text-align: left; cursor: pointer; display: grid; gap: 2px; min-width: 0; }
.tile .v { font-family: var(--serif); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .l { font-size: 13px; color: var(--muted); }
.tile.alert .v { color: var(--bad); }
.tile.watch .v { color: var(--warn); }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* agenda */
.agenda { display: grid; gap: 18px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; min-width: 0; }
.item h3 { margin: 0 0 2px; font-size: 16px; display: flex; gap: 10px; align-items: baseline; }
/* The agenda numbers: gold on a small navy disc in light mode, 5.01:1 (decision 3(d) of 8 November 2026);
   in dark mode the disc is the item's own surface, so they look as before (tests/test_contrast.py). */
.item h3 .k { color: var(--gold); background: var(--k-disc); font-family: var(--serif); font-weight: 700; font-variant-numeric: tabular-nums;
  display: inline-grid; place-items: center; min-width: 1.75em; height: 1.75em; padding: 0 .3em; border-radius: 999px; flex: none; line-height: 1; }
.item .why { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.rows { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; background: var(--sunken); cursor: pointer; border: 1px solid transparent; }
.row:hover { border-color: var(--line); }
.row .t { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.row .s { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 480px) { .row { grid-template-columns: minmax(0, 1fr); } .row .chips { justify-content: flex-start; } }
.none { color: var(--muted); font-size: 14px; padding: 6px 2px; margin: 0; }

/* chips */
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--sunken); color: var(--muted); border: 1px solid var(--line); }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip.hidden-prospect { border-style: dashed; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chips.start { justify-content: flex-start; }

/* lanes */
.lanes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 980px) { .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lanes { grid-template-columns: minmax(0, 1fr); } }
.lane { background: var(--sunken); border-radius: 10px; padding: 12px; display: grid; gap: 10px; min-width: 0; }
.lane h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 6px; cursor: pointer; min-width: 0; }
.card:hover { border-color: var(--accent); }
.card .t { font-weight: 600; overflow-wrap: anywhere; }
.card .m { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.card .foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
.card.example { border-style: dashed; cursor: default; opacity: .85; }

/* prospects */
.group { margin-bottom: 22px; }
.group h3 { font-family: var(--serif); font-size: 17px; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.group h3 span { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 400; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.pros { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 8px; cursor: pointer; min-width: 0; }
.pros:hover { border-color: var(--accent); }
.pros .t { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.pros .ns { font-size: 14px; overflow-wrap: anywhere; }
.pros .note { font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 5.4em; overflow: hidden; }

/* people, the cleared list and the audit log */
.totals { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.totals div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; }
.totals b { font-family: var(--serif); font-size: 22px; font-variant-numeric: tabular-nums; margin-right: 6px; }
.totals span { color: var(--muted); font-size: 13px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); max-width: 100%; }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--sunken); }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--sunken); }
td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
td .chip { white-space: normal; }
.note-box { margin-top: 16px; color: var(--muted); font-size: 13px; max-width: 80ch; }
.note-box p { margin: 0 0 6px; }
.audit { display: grid; gap: 8px; }
.audit .entry { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 4px; min-width: 0; }
.audit .entry .h { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: 14px; }
.audit .entry .h b { font-weight: 600; }
.audit .entry .when { color: var(--muted); font-size: 13px; }
.audit .entry .c { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.more { margin-top: 12px; }

/* empty state */
.empty { border: 1px dashed var(--line); border-radius: 10px; padding: 18px; background: var(--surface); display: grid; gap: 10px; }
.empty p { margin: 0; color: var(--muted); max-width: 70ch; }

/* sign-in, and the "What we keep" page */
.signin { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: grid; gap: 14px; max-width: 560px; }
.signin h2 { margin: 0; font-family: var(--serif); font-size: 22px; }
.signin p { margin: 0; color: var(--muted); }
.notice { padding-block: 24px 40px; max-width: 72ch; }
.notice h2 { font-family: var(--serif); font-size: 22px; margin: 0 0 12px; }
.foot-links { padding: 0 0 calc(32px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--muted); }

/* editor */
.scrim { position: fixed; inset: 0; background: rgba(10, 16, 28, .45); z-index: 20; display: flex; justify-content: flex-end; }
.panel { background: var(--surface); width: min(520px, 100%); height: 100%; overflow-y: auto; padding: calc(18px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) 18px; display: grid; gap: 14px; align-content: start; box-shadow: -8px 0 24px rgba(0,0,0,.18); margin: 0; }
.panel h2 { margin: 0; font-family: var(--serif); font-size: 20px; }
.panel .rule { margin: 0; font-size: 13px; color: var(--muted); }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-weight: 600; font-size: 13px; }
.field .help { font-size: 12px; color: var(--muted); }
.field .value { font-size: 14px; overflow-wrap: anywhere; }
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field input[type="email"], .field select, .field textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--bg); }
.field textarea { min-height: 92px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }
.err { background: var(--bad-bg); color: var(--bad); padding: 8px 12px; border-radius: 8px; font-size: 14px; }
/* A refusal shown beside its field, and the Türkiye view's plain line (docs/api.md, sections 6.1 and 7.2). */
.field-err { color: var(--bad); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.view-note { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; max-width: 72ch; overflow-wrap: anywhere; }
.panel .view-note { margin: 0; }
/* The erasure's list of mentions (docs/api.md, section 4). */
.steps .mentions, .steps .scrub { width: 100%; margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.steps .mentions li, .steps .scrub li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; min-width: 0; }
.mention-text { font-size: 13px; overflow-wrap: anywhere; }
.mention-text mark { background: var(--warn-bg); color: var(--warn); font-weight: 600; padding: 0 2px; border-radius: 3px; }
.mention-text .where { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; padding-top: 4px; }
.actions .group-right { display: flex; flex-wrap: wrap; gap: 8px; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: var(--sunken); border-radius: 8px; align-items: center; }
.steps .label { font-size: 13px; color: var(--muted); width: 100%; }
/* Removing a personal detail (docs/api.md, section 6.2), and the list of texts an erasure made too long. */
.steps .help { font-size: 12px; color: var(--muted); width: 100%; margin: 0; overflow-wrap: anywhere; }
.steps .field { width: 100%; }
.panel > .too-long { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.panel > .too-long li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 8px; font-size: 14px; z-index: 30; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: no-preference) { .card, .pros, .row, .tile { transition: border-color .15s ease; } }
