
:root {
  color-scheme: light dark;
  --page: #f9f9f7; --surface: #fcfcfb; --ink: #0b0b0b; --ink-2: #52514e; --muted: #898781;
  --line: #e1e0d9; --border: rgba(11, 11, 11, .10); --accent: #2a78d6;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d0d0d; --surface: #1a1a19; --ink: #f0efec; --ink-2: #c3c2b7;
    --line: #2c2c2a; --border: rgba(255, 255, 255, .10); --accent: #3987e5;
  }
}
.c-blue { --c: #2a78d6 } .c-orange { --c: #eb6834 } .c-aqua { --c: #1baf7a } .c-yellow { --c: #eda100 }
.c-magenta { --c: #e87ba4 } .c-green { --c: #008300 } .c-violet { --c: #6250d6 } .c-red { --c: #e34948 }
@media (prefers-color-scheme: dark) {
  .c-blue { --c: #3987e5 } .c-orange { --c: #d95926 } .c-aqua { --c: #199e70 } .c-yellow { --c: #c98500 }
  .c-magenta { --c: #d55181 } .c-violet { --c: #9085e9 } .c-red { --c: #e66767 }
}

* { box-sizing: border-box }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif }
a { color: var(--accent) }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px }
.muted { color: var(--ink-2) }

header.top { background: var(--surface); border-bottom: 1px solid var(--line) }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-block: 12px }
.brand { font-weight: 700; color: var(--ink); text-decoration: none }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 16px }
nav.main a { color: var(--ink-2); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent }
nav.main a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent) }
.today { margin-left: auto; color: var(--muted); font-size: 14px }
main { padding-block: 24px 48px }
footer { color: var(--muted); font-size: 13px; padding-bottom: 24px }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 16px }
h2 { font-size: 20px; line-height: 1.3; margin: 32px 0 12px }
h3 { font-size: 17px; margin: 0 0 8px }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface) }
.flash.err { border-color: var(--critical) }
.empty { padding: 24px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; color: var(--ink-2) }
.lead { margin: 0 0 16px }

.button, button { font: inherit; font-size: 15px; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block }
.primary { background: var(--accent); border-color: var(--accent); color: #fff }
.danger { color: var(--critical); border-color: currentColor }
button.link { border: 0; background: none; padding: 0; color: var(--accent); font-size: 14px; font-weight: 400; text-decoration: underline }
label { display: block; font-size: 14px; color: var(--ink-2); margin: 8px 0 }
.login { max-width: 360px; margin: 48px auto }
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: start }
.column { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px }
.column h2 { font-size: 15px; margin: 0 0 8px }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
.card-mini { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--page); font-size: 14px }
header.top form { margin: 0 }
textarea, input[type=url], input[type=number], input[type=date], input[type=datetime-local], input[type=password] {
  display: block; font: inherit; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--page); color: var(--ink) }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px }
.card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c); border-radius: 12px; padding: 16px }
.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px }
.tag { display: inline-flex; align-items: center; font-size: 14px; color: var(--ink-2); white-space: nowrap }
.card h3 { display: flex; align-items: center }
.promise { color: var(--ink-2); margin: 0 0 8px; font-style: italic }
.stage { margin: 0 0 12px; font-weight: 600 }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 15px }
.meter-head b { font-size: 22px }
.value, td.num { font-variant-numeric: tabular-nums; white-space: nowrap }
progress.meter { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; margin: 6px 0; border: 0;
  border-radius: 4px; overflow: hidden; background: color-mix(in oklab, var(--c) 18%, var(--surface)) }
progress.meter::-webkit-progress-bar { background: color-mix(in oklab, var(--c) 18%, var(--surface)); border-radius: 4px }
progress.meter::-webkit-progress-value { background: var(--c); border-radius: 4px }
progress.meter::-moz-progress-bar { background: var(--c); border-radius: 4px }
.notes { font-size: 14px; color: var(--ink-2); margin: 0 }
.flags { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px }
.i-good { color: var(--good) } .i-warning { color: var(--warning) } .i-serious { color: var(--serious) } .i-critical { color: var(--critical) }
.channels { list-style: none; padding: 0; margin: 12px 0; font-size: 14px; border-top: 1px solid var(--line) }
.channels li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line) }
.bank, .next { font-size: 14px; margin: 8px 0 0 }

.decisions { list-style: none; padding: 0; margin: 0 }
.decision { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px }
.decision summary { cursor: pointer; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline }
.decision summary .title { font-weight: 600; flex: 1 1 280px }
.decision .body { padding: 0 16px 16px }
.decision.done { padding: 8px 16px; color: var(--ink-2) }
.due { font-size: 14px; color: var(--ink-2); white-space: nowrap }
details.closed > summary { cursor: pointer; color: var(--ink-2); margin: 12px 0 8px }

.post-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 12px; padding: 16px; margin-bottom: 16px }
.post-card h2 { margin: 8px 0 }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--ink-2) }
.preview { background: var(--page); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; max-width: 640px; overflow-wrap: anywhere }
.preview p { margin: 0 0 12px }
.preview p:last-child { margin-bottom: 0 }
.preview blockquote { margin: 0 0 12px; padding-left: 12px; border-left: 3px solid var(--line); color: var(--ink-2) }
.preview pre { background: var(--surface); padding: 8px; border-radius: 6px; overflow-x: auto; font-size: 14px }
.post-foot { font-size: 14px; color: var(--ink-2); margin: 8px 0 }
.notice { margin: 8px 0 }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-top: 12px }
.actions details { flex: 1 1 240px }
.actions summary { cursor: pointer; padding: 8px 0; color: var(--accent) }
.badge { display: inline-block; font-size: 13px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--ink-2); white-space: nowrap }
.badge.s-review { border-color: var(--accent); color: var(--ink); font-weight: 600 }
.badge.s-returned, .badge.s-rejected { border-style: dashed }
.plain { list-style: none; padding: 0; margin: 0 }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line) }

.pager { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px }
.week h2 { font-size: 16px; color: var(--ink-2); margin: 24px 0 8px }
.days { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px }
.day { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line) }
.day:last-child { border-bottom: 0 }
.day.today { background: color-mix(in oklab, var(--accent) 8%, var(--surface)) }
.day.past { color: var(--ink-2) }
.day .date { font-size: 14px; font-weight: 600 }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px }
.item { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline }
.gap { color: var(--ink-2); font-style: italic }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px; background: var(--surface) }
table { border-collapse: collapse; width: 100%; font-size: 15px }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top }
tr:last-child td { border-bottom: 0 }
th { font-size: 13px; color: var(--ink-2); font-weight: 600 }
fieldset { border: 1px solid var(--border); border-radius: 12px; margin: 0 0 12px; padding: 8px 16px; background: var(--surface) }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px }
.date-field { max-width: 220px }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 15px }
dl.facts dt { color: var(--ink-2) }
dl.facts dd { margin: 0; overflow-wrap: anywhere }
.delivery { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px }
.forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px }
.history { font-size: 14px; color: var(--ink-2); padding-left: 20px }
.problems li { white-space: pre-wrap; margin-bottom: 8px }

@media (max-width: 600px) {
  h1 { font-size: 24px }
  .today { margin-left: 0; width: 100% }
  .day { grid-template-columns: 1fr; gap: 4px }
}
