:root {
  color-scheme: light;
  --paper: #eff1eb; --panel: #fff; --text: #1b2820; --sub: #4c5c51;
  --accent: #244e38; --soft: #dce9db; --line: #d9e0d8; --warn: #8b392f;
  font: 16px/1.55 system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme]) {
  color-scheme: dark;
  --paper: #1c2420; --panel: #243029; --text: #eef4eb; --sub: #becdc1;
  --accent: #b7d8b4; --soft: #324638; --line: #43554a; --warn: #ffb9aa;
} }
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1c2420; --panel: #243029; --text: #eef4eb; --sub: #becdc1;
  --accent: #b7d8b4; --soft: #324638; --line: #43554a; --warn: #ffb9aa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--text); }
.frame { max-width: 76rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem); }
main.frame { padding-bottom: 3rem; }
.masthead { border-bottom: 1px solid var(--line); background: var(--panel); }
.header-inner, .panel-head, .hero, .row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.header-inner { min-height: 4.5rem; flex-wrap: wrap; padding-block: .6rem; }
.brand { display: inline-flex; gap: .65rem; align-items: center; color: var(--text); text-decoration: none; font-size: 1.25rem; font-weight: 750; }
.brand img { border-radius: .6rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: -.065em; line-height: 1.02; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; overflow-wrap: anywhere; }
.eyebrow { color: var(--accent); font-weight: 750; letter-spacing: .11em; font-size: .72rem; text-transform: uppercase; margin-bottom: .5rem; }
.muted, small, .date-label { color: var(--sub); }
.tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1.45rem 0 0; }
.tabs button { border-color: transparent; background: transparent; }
.tabs button[aria-pressed="true"] { background: var(--soft); color: var(--accent); }
.hero { align-items: end; flex-wrap: wrap; margin: 1.8rem 0 1.3rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(.95rem, 3vw, 1.4rem); min-width: 0; }
.login { max-width: 30rem; margin: clamp(2rem, 10vh, 7rem) auto; }
.login h1 { margin-bottom: .7rem; }
.login form { margin-top: 1.25rem; }
form { display: grid; gap: .8rem; }
label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 600; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; padding: .55rem .7rem; min-height: 44px; border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); }
button { font-weight: 680; cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .55; cursor: wait; }
button.primary { background: var(--accent); color: var(--panel); border-color: var(--accent); }
button.quiet { background: transparent; }
button.danger, #editor-error { color: var(--warn); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
textarea { resize: vertical; }
.fields, .cards, .metrics { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metrics { margin-bottom: .85rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric strong { display: block; font-size: clamp(1.35rem, 5vw, 2.45rem); letter-spacing: -.06em; line-height: 1.12; }
.metric small { display: block; margin-top: .45rem; }
.stack { display: grid; gap: .8rem; }
.items { list-style: none; margin: .6rem 0 0; padding: 0; }
.items li { border-top: 1px solid var(--line); padding: .65rem 0; }
.row > div:first-child { flex: 1; min-width: 0; }
.row p { white-space: pre-wrap; overflow-wrap: anywhere; }
.row .actions { flex-shrink: 0; }
.check { min-width: 45px; }
.check[aria-pressed="true"] { background: var(--soft); color: var(--accent); }
.empty { margin-top: .5rem; color: var(--sub); }
progress { display: block; accent-color: var(--accent); width: 100%; height: .85rem; margin-top: .25rem; }
dialog { width: min(34rem, calc(100% - 1.25rem)); max-height: 90dvh; overflow: auto; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.15rem; }
dialog::backdrop { background: #101812ba; }
#message { margin: .8rem 0; background: var(--soft); border: 1px solid var(--line); padding: .7rem; border-radius: .55rem; }
.chart { display: grid; gap: .45rem; margin-top: .7rem; }
.chart-row { display: grid; gap: .6rem; grid-template-columns: 3rem 1fr minmax(3.6rem,auto); align-items: center; }
.chart-row progress { margin: 0; }
@media (max-width: 650px) {
  .cards { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero { align-items: start; }
  .header-inner { gap: .3rem; }
  .actions { gap: .3rem; }
  .date-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

.overview { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(0, 2.4fr); gap: .8rem; margin-bottom: .85rem; }
.overview .metrics { margin-bottom: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); }
.task-completion { display: flex; align-items: center; gap: 1rem; }
.task-completion h2 { line-height: 1.2; margin-bottom: .3rem; }
.task-ring { position: relative; display: grid; place-items: center; flex: 0 0 5.5rem; aspect-ratio: 1; color: var(--accent); }
.task-ring svg { width: 100%; position: absolute; inset: 0; transform: rotate(-90deg); }
.task-ring circle { fill: none; stroke-width: 10; }
.task-ring-track { stroke: var(--line); }
.task-ring-value { stroke: var(--accent); }
.task-ring strong { font-size: 1.35rem; letter-spacing: -.05em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 780px) {
  .overview { grid-template-columns: 1fr; }
  .overview .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
