:root {
  --bg: #f4f5f8; --card: #fff; --ink: #1b2233; --muted: #5d6578; --line: #e2e5ec;
  --brand: #2f4b7c; --brand-soft: #e6ecf6; --warn: #9a5b00; --warn-soft: #fdf1dc;
  --bad: #a32a22; --ok: #1d6b4a; --radius: 14px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11141b; --card: #1a1f2a; --ink: #e7eaf2; --muted: #9aa3b5; --line: #2a3140;
    --brand: #8fb0ea; --brand-soft: #22304a; --warn: #f0b45c; --warn-soft: #3a2d17; --bad: #f08a80; --ok: #6fcf9f; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; }
a { color: var(--brand); }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
header.top { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
header.top .brand { font-weight: 700; text-decoration: none; color: var(--ink); }
header.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
header.top nav a { padding: 6px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); }
header.top nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
h1 { font-size: 28px; margin: 8px 0 12px; }
h2 { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 24px 2px 8px; }
h3 { margin: 0; font-size: 17px; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.muted, .meta { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; }
.btn { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 7px 12px; cursor: pointer; min-height: 40px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #11141b; } }
.btn.ghost { background: transparent; }
input, select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); min-height: 40px; }
label { display: block; margin: 8px 0 4px; }
.login { max-width: 380px; margin: 10vh auto; }
.login input { width: 100%; }
.flash, .banner { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; }
.flash { background: var(--brand-soft); color: var(--brand); }
.error { color: var(--bad); }
.quick { display: flex; gap: 8px; margin: 8px 0 12px; }
.quick input { flex: 1; min-width: 0; }
.strip { list-style: none; padding: 0; margin: 0 0 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.strip li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 14px; }
.strip li.busy { border-color: var(--brand); }
ul.tasks { list-style: none; padding: 0; margin: 0; }
.task { display: grid; grid-template-columns: 76px 1fr; gap: 4px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; }
.task .when { display: flex; flex-direction: column; }
.task .time { font-weight: 700; }
.task .time.accepted { color: var(--ok); }
.task .time.conflict { color: var(--warn); text-decoration: line-through; }
.task .time.none { color: var(--muted); font-weight: 400; font-size: 14px; }
.task .effort, .task .src { color: var(--muted); font-size: 13px; }
.task .title { font-weight: 600; color: var(--ink); text-decoration: none; }
.task .why { margin: 2px 0; color: var(--muted); font-size: 14px; }
.task .why.warn { color: var(--warn); }
.task .src { margin: 0; text-transform: capitalize; }
.task .acts { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.task .acts form, .row form, form.inline { display: inline; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.empty { margin: 4px 2px; }
.factors, .slots, .plain { list-style: none; padding: 0; }
.factors li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.slots li { margin: 6px 0; }
.day .anchor { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 4px 0; }
.day .anchor.kind-custody { border-color: var(--brand); }
.prep { list-style: none; margin: 6px 0 0 8px; padding: 0; font-size: 14px; }
.due { padding: 4px 12px; }
.chip { font-size: 12px; background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 1px 8px; }
.status { font-size: 13px; border-radius: 999px; padding: 2px 10px; background: var(--brand-soft); color: var(--brand); text-transform: capitalize; }
.status.st-broken, .status.st-needs_link { background: var(--warn-soft); color: var(--warn); }
.source input[name=token] { flex: 1; min-width: 200px; }
table.spend { width: 100%; border-collapse: collapse; }
table.spend th, table.spend td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.caps { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.caps label { margin: 0; }
.caps input { width: 90px; }
blockquote { margin: 8px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); }
@media (max-width: 520px) { .task { grid-template-columns: 1fr; } .task .when { flex-direction: row; gap: 8px; } }

/* Version footer and What's new page */
.small { font-size: 14px; }
.foot { max-width: 860px; margin: 0 auto; padding: 16px; border-top: 1px solid var(--line); }
.foot a { color: inherit; }
.changelog h2 { font-size: 17px; margin: 18px 0 4px; }
.changelog h2:first-child { margin-top: 0; }
.changelog ul { margin: 4px 0 8px; padding-left: 20px; }
/* Why, consent, texts, review and AI pages (mock-ups 03, 07, 10, 11, 12) */
h2.split { display: flex; justify-content: space-between; }
.fct { padding: 8px 0; border-bottom: 1px solid var(--line); }
.fct:last-of-type { border-bottom: 0; }
.fct .h { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.fct .d { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.fct.total .h { font-size: 17px; }
.bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); width: 0; }
.bar.warn i { background: var(--warn); }
.fct.neg .bar i { background: var(--muted); }
.bar i.w5 { width: 5%; } .bar i.w10 { width: 10%; } .bar i.w15 { width: 15%; } .bar i.w20 { width: 20%; }
.bar i.w25 { width: 25%; } .bar i.w30 { width: 30%; } .bar i.w35 { width: 35%; } .bar i.w40 { width: 40%; }
.bar i.w45 { width: 45%; } .bar i.w50 { width: 50%; } .bar i.w55 { width: 55%; } .bar i.w60 { width: 60%; }
.bar i.w65 { width: 65%; } .bar i.w70 { width: 70%; } .bar i.w75 { width: 75%; } .bar i.w80 { width: 80%; }
.bar i.w85 { width: 85%; } .bar i.w90 { width: 90%; } .bar i.w95 { width: 95%; } .bar i.w100 { width: 100%; }
.card.list { padding: 4px 16px; }
.list .li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.list .li:last-child { border-bottom: 0; }
.list .li label { margin: 0; }
.list .li.icon { justify-content: flex-start; flex-wrap: nowrap; align-items: flex-start; }
.list .li .k { flex: 0 0 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.list .li p { margin: 2px 0 0; }
.link-card { display: flex; justify-content: space-between; align-items: center; color: var(--ink); text-decoration: none; }
.link-card p { margin: 2px 0 0; }
button.link { font: inherit; background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; }
.warnbox { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { min-height: auto; margin-top: 4px; }
label.inline { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.grow { flex: 1; min-width: 0; }
.row.end { justify-content: flex-end; padding: 10px 0; }
input.wide { width: 100%; }
.chip.soft { background: var(--brand-soft); color: var(--brand); }
.status.st-ok { background: var(--brand-soft); color: var(--ok); }
.warn { color: var(--warn); }
details > summary { list-style: none; display: inline-flex; align-items: center; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 8px; }
.status.plain { text-transform: none; white-space: nowrap; }
.list .li .check.grow { flex: 1 1 200px; }
