@font-face { font-family: Inter; src: url(inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: light;
  --ink: #0b1f33; --muted: #52657a; --line: #dbe4ec; --bg: #f4f7fa; --card: #fff;
  --blue: #0067b1; --blue-2: #12a0d7; --fill: #0f8a5f; --warn: #a14a00; --unk: #f2c14e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 Inter, system-ui, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 8px 16px 96px; }
h1 { font-size: 1.4rem; line-height: 1.25; margin: 0 0 6px; }
h2 { font-size: 1.1rem; margin: 0 0 6px; }
h3 { font-size: 1rem; margin: 0; }
p { margin: 0 0 8px; }
a { color: var(--blue); }
code { font-size: .85em; background: var(--bg); padding: 2px 5px; border-radius: 6px; word-break: break-all; }
.top { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; }
.top nav { display: flex; gap: 4px; }
.top nav a { padding: 6px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .92rem; }
.top nav a[aria-current="page"] { background: #e6f1fa; color: var(--blue); font-weight: 600; }
.label { font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 10px; color: inherit; text-decoration: none; }
a.card:hover, .goal a:hover h3 { color: var(--blue); }
.card.narrow { max-width: 420px; margin: 24px auto; }
.card.quiet { opacity: .8; }
.card.hint { background: #eef7ff; border-color: #b9d9f2; }
.card.empty { background: #fff; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.warn { color: var(--warn); }
.error { color: #b00020; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; margin: 12px 0; }
.row.top-align { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.links { text-align: center; margin-top: 20px; }
.chip { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: #eef2f6; color: var(--muted); }
.pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.pct.big { font-size: 1.6rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 4px 0; }

button, select, input, textarea { font: inherit; color: inherit; }
button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 14px; min-height: 42px; cursor: pointer; }
button:hover { border-color: var(--blue); }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
button.link { border: 0; background: none; color: var(--blue); padding: 6px 0; min-height: 0; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #8cc4ec; outline-offset: 2px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
label.check input { width: 20px; height: 20px; flex: none; }

.bar { display: flex; height: 10px; gap: 3px; margin: 8px 0; }
.bar.big { height: 16px; }
.bar .known { background: #e7edf2; border-radius: 999px; overflow: hidden; }
.bar .fill { height: 100%; background: linear-gradient(90deg, var(--fill), #18a774); border-radius: 999px; min-width: 0; }
.bar .unk { flex: 1; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #6b4e00;
  background: repeating-linear-gradient(135deg, var(--unk) 0 5px, #fbe7a8 5px 10px); }
.bar.big .unk { font-size: 12px; }

.need { border-left: 4px solid var(--blue); }
.need-stale { border-left-color: var(--warn); }
.need-text { font-weight: 600; }
.need .row { flex-wrap: wrap; margin-top: 8px; }
.today li { display: flex; justify-content: space-between; gap: 8px; }
.unknowns { background: #fffaf0; border-color: #f0dca8; }
.preview { font-size: 1.3rem; }

.tasks { list-style: none; padding: 0; margin: 0 0 10px; }
.task { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 8px; }
.task-main { flex: 1; min-width: 0; }
.task-title { margin: 3px 0; overflow-wrap: anywhere; }
.task-side { display: flex; align-items: center; gap: 4px; }
.tick { width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 50%; border: 2px solid #9fb3c6; flex: none; margin-top: 2px; }
.tick:hover { border-color: var(--fill); background: #e9f7f0; }
.size select { width: auto; padding: 6px 8px; font-size: .85rem; border-radius: 999px; background: #eef2f6; border-color: transparent; }
.star { border: 0; background: none; font-size: 1.3rem; min-height: 36px; padding: 0 6px; color: #9fb3c6; }
.star.on { color: #e0a100; }
.steps summary { cursor: pointer; padding: 2px 0; }
.steps ul { margin: 4px 0; }
.addstep { margin-top: 4px; }
.addstep input { padding: 7px 10px; }
.addstep button { min-height: 36px; padding: 6px 12px; }
#addtask input { flex: 1; }
#addtask select { width: auto; }
.done-list li { color: var(--muted); }
details > summary { cursor: pointer; }
.log li { border-bottom: 1px solid var(--bg); }

dialog.sheet { border: 0; border-radius: 18px 18px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); width: 100%; max-width: 640px;
  margin: auto auto 0; box-shadow: 0 -10px 40px rgba(11,31,51,.2); }
dialog.sheet::backdrop { background: rgba(11,31,51,.35); }
@media (min-width: 700px) { dialog.sheet { border-radius: 18px; margin: auto; } }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 16px; display: flex; gap: 14px; align-items: center;
  max-width: calc(100% - 32px); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.toast button.link { color: #8cd0ff; font-weight: 600; }
.toast[hidden] { display: none; }
.card > .label:first-child { margin-top: 0; }
.toast span { white-space: nowrap; }
