/* Matches veryonlineman.com (Anthracite). Light mode follows the OS. */
:root {
  color-scheme: dark;
  --ground: #101117; --surface: #181a22; --raise: #1d2029; --inset: #0b0c10;
  --text: #e9eaf1; --text-2: #a4a7b8; --text-3: #8d90a2;
  --line: #262936; --line-2: #343849;
  --signal: #4a3aa8; --signal-b: #6d5ce0; --cta: #6353d6; --cta-hover: #5344bc;
  --accent: #aca5dd; --accent-b: #cfc9f5; --wash: rgba(109,92,224,.13);
  --warn: #d9b26a;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Inter, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16,1,.3,1);
  --r: 2px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ground: #f2f5f9; --surface: #ffffff; --raise: #fafbfd; --inset: #e7edf5;
    --text: #0e1117; --text-2: #4a5563; --text-3: #5d6876;
    --line: #dbe2ec; --line-2: #c3ccd9;
    --signal: #4a3aa8; --signal-b: #5b4bd0; --cta: #4a3aa8; --cta-hover: #3c2e8a;
    --accent: #4a3aa8; --accent-b: #3c2e8a; --wash: rgba(74,58,168,.09);
    --warn: #8a5a00;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--signal); color: #fff; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

/* small-caps label voice, as on the homepage */
.tabs button, .energy-bar, .section-label, .chip, .btn, .stats, .focus-label,
dialog label, .login-card label, .hint, .next-step {
  font-family: var(--sans); letter-spacing: .18em; text-transform: uppercase; }

.wrap { max-width: 720px; margin: 0 auto; padding: clamp(28px, 6vh, 64px) clamp(18px, 5vw, 40px) 80px; }

/* ---------- buttons */
.btn { font-size: 10px; font-weight: 700; line-height: 1; color: var(--text-2);
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 11px 15px; cursor: pointer; transition: color .25s, border-color .25s, background-color .25s, transform .2s var(--ease); }
.btn:hover { color: var(--accent); border-color: var(--accent); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--cta); border-color: var(--cta); color: #fff; }
.btn.primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: #fff; }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { border-color: var(--line-2); }
.btn.small { padding: 8px 11px; }
.btn.wide { width: 100%; padding: 15px; }
.btn.danger { color: var(--text-3); }
.btn.danger:hover { color: #e5675a; border-color: #e5675a; }

/* ---------- header */
.top { display: flex; align-items: center; gap: 22px; padding-bottom: 22px; margin-bottom: 36px;
  border-bottom: 1px solid var(--line); }
.top h1 { margin: 0 auto 0 0; font: 700 11px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; }
.top h1::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal-b); margin-right: 11px; vertical-align: 1px; animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
.top form { margin: 0; }
.stats { display: flex; gap: 18px; font-size: 10px; font-weight: 700; color: var(--text-3); }
.stats b { color: var(--accent); font-variant-numeric: tabular-nums; margin-left: 6px; }
.pill { white-space: nowrap; }

/* ---------- capture */
.capture { display: flex; align-items: center; gap: 10px; margin-bottom: 34px;
  border-bottom: 1px solid var(--line-2); transition: border-color .3s; }
.capture:focus-within { border-color: var(--accent); }
.capture input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text);
  font: 400 clamp(20px, 3.4vw, 26px)/1.3 var(--sans); letter-spacing: -.02em; padding: 14px 0; }
.capture input::placeholder { color: var(--text-3); opacity: .7; }
.capture .btn { border-color: transparent; }

/* ---------- tabs */
.tabs { display: flex; gap: clamp(16px, 4vw, 30px); overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; background: none; border: 0; padding: 6px 0; cursor: pointer;
  font-size: 10.5px; font-weight: 700; color: var(--text-3); white-space: nowrap; transition: color .3s; }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease); }
.tabs button:hover, .tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.tabs span:not(:empty) { color: var(--accent); margin-left: 5px; font-variant-numeric: tabular-nums; }

.energy-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 18px;
  font-size: 9.5px; font-weight: 700; color: var(--text-3); }
.energy-bar[hidden] { display: none; }
.energy-bar span { margin-right: 8px; }
.energy-bar button { background: none; border: 1px solid transparent; border-radius: var(--r); color: var(--text-3);
  font: inherit; letter-spacing: inherit; text-transform: inherit; padding: 7px 10px; cursor: pointer; transition: color .25s, border-color .25s; }
.energy-bar button:hover { color: var(--text); }
.energy-bar button[aria-pressed="true"] { color: var(--text); border-color: var(--line-2); background: var(--surface); }

.banner { border-left: 2px solid var(--signal-b); background: var(--wash); color: var(--text-2);
  padding: 13px 16px; margin-bottom: 18px; font-size: 14.5px; line-height: 1.6; }
.banner b { color: var(--text); font-weight: 600; }
.banner-actions { display: flex; gap: 6px; margin-top: 10px; }

/* ---------- list */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.task { display: grid; grid-template-columns: 22px 1fr auto; gap: 16px; align-items: start;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  transition: background-color .45s var(--ease), padding .45s var(--ease); }
.task:hover { background: var(--surface); padding-left: 12px; padding-right: 12px; }
.task.is-done { opacity: .42; }
.task.is-done > .body > .title { text-decoration: line-through; text-decoration-color: var(--text-3); }

.check { width: 20px; height: 20px; margin-top: 3px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--line-2); background: none; display: grid; place-items: center;
  transition: border-color .25s, background-color .25s; }
.check:hover { border-color: var(--accent); }
.is-done > .check { background: var(--signal-b); border-color: var(--signal-b); }
.is-done > .check::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 1.5px 1.5px 0;
  transform: translateY(-1px) rotate(45deg); }

.body { min-width: 0; }
.title { display: block; width: 100%; padding: 0; background: none; border: 0; text-align: left; cursor: pointer;
  font: 500 17px/1.45 var(--sans); letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 0; margin-top: 4px; }
.meta:empty { display: none; }
.chip { font-size: 9px; font-weight: 700; color: var(--text-3); }
.chip + .chip::before { content: "·"; margin: 0 9px; color: var(--line-2); }
.chip.prio { color: var(--text); }
.chip.low, .chip.med, .chip.high { color: var(--accent); }

.actions { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; opacity: .35;
  transition: opacity .3s; }
.task:hover .actions, .task:focus-within .actions { opacity: 1; }
@media (pointer: coarse) { .actions { opacity: 1; } }
.actions .btn { border-color: transparent; padding: 8px 10px; font-size: 9.5px; }
.actions .btn:hover { border-color: var(--line-2); }

/* steps */
.steps { list-style: none; margin: 12px 0 0; padding: 0 0 0 2px; display: grid; gap: 2px; }
.step { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.step .check { width: 15px; height: 15px; margin: 0; border-width: 1.5px; }
.step.is-done > .check { background: var(--signal-b); border-color: var(--signal-b); }
.step.is-done > .check::after { content: ""; width: 4px; height: 7px; border: solid #fff; border-width: 0 1.5px 1.5px 0;
  transform: translateY(-1px) rotate(45deg); }
.step-title { flex: 1; font-size: 14.5px; color: var(--text-2); overflow-wrap: anywhere; }
.step.is-done .step-title { text-decoration: line-through; color: var(--text-3); }
.step .x { background: none; border: 0; padding: 0 4px; cursor: pointer; color: var(--text-3); opacity: 0;
  font-size: 16px; line-height: 1; transition: opacity .2s, color .2s; }
.step:hover .x, .step .x:focus-visible { opacity: 1; }
.step .x:hover { color: var(--text); }
@media (pointer: coarse) { .step .x { opacity: .6; } }
.add-step input { width: 100%; margin-top: 6px; padding: 6px 0 6px 27px; border: 0; outline: 0;
  border-bottom: 1px solid transparent; background: transparent; color: var(--text);
  font: 400 14px/1.4 var(--sans); transition: border-color .3s; }
.add-step input::placeholder { color: var(--text-3); opacity: .75; }
.add-step input:focus { border-bottom-color: var(--line-2); }

.section-label { padding: 30px 0 10px; border-bottom: 1px solid var(--line);
  font-size: 9.5px; font-weight: 700; color: var(--text-3); }
.empty { padding: clamp(48px, 10vh, 96px) 0; color: var(--text-3); font-size: 15px; border-bottom: 1px solid var(--line); }
.empty .big { font: 700 clamp(26px, 4.6vw, 38px)/1.05 var(--sans); letter-spacing: -.035em; color: var(--text); margin-bottom: 10px; }
.hint { margin-top: 48px; font-size: 9px; font-weight: 700; color: var(--text-3); opacity: .8; }
kbd { font: 600 9.5px/1 var(--mono); letter-spacing: 0; color: var(--text-2); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 2px 5px; }
@media (pointer: coarse) { .hint { display: none; } }

/* ---------- focus mode */
.focus { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow-y: auto;
  padding: 72px 22px 40px; background: var(--ground); animation: fade .35s var(--ease); }
.focus[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.focus .close { position: absolute; top: 20px; left: 20px; color: var(--text); border-color: var(--line-2); }
.focus-inner { width: 100%; max-width: 600px; text-align: center; }
.focus-label { font-size: 10px; font-weight: 700; color: var(--accent); }
.focus-title { margin: 18px 0 30px; font: 700 clamp(34px, 7vw, 64px)/1 var(--sans); letter-spacing: -.045em;
  text-wrap: balance; overflow-wrap: anywhere; }
.next-step { display: inline-block; min-width: min(380px, 100%); margin: 0 auto 30px; padding: 16px 20px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface);
  font-size: 9.5px; font-weight: 700; color: var(--text-3); }
.next-step b { display: block; margin-top: 9px; font: 500 18px/1.4 var(--sans); letter-spacing: -.01em;
  text-transform: none; color: var(--text); }
.ring { --p: 0; width: 200px; height: 200px; margin: 0 auto 28px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--signal-b) calc(var(--p) * 1turn), var(--line) 0); }
.ring > div { width: 196px; height: 196px; border-radius: 50%; background: var(--ground); display: grid; place-items: center; }
.ring .time { font: 300 46px/1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.focus-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.park { max-width: 420px; margin: 26px auto 0; }
.park input { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line-2); outline: 0;
  background: transparent; color: var(--text); text-align: center; font: 400 14.5px/1.4 var(--sans); transition: border-color .3s; }
.park input::placeholder { color: var(--text-3); }
.park input:focus { border-bottom-color: var(--accent); }
.focus-note { min-height: 1.5em; margin-top: 18px; color: var(--text-3); font-size: 14.5px; }
.focus-note a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--line-2); }

/* ---------- edit dialog */
dialog { width: min(560px, calc(100vw - 28px)); padding: 26px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(5,6,9,.7); backdrop-filter: blur(6px); }
dialog label, .login-card label { display: grid; gap: 9px; flex: 1; margin-bottom: 18px;
  font-size: 9.5px; font-weight: 700; color: var(--text-3); }
dialog label[hidden] { display: none; }
dialog input, dialog select, dialog textarea, .login-card input:not([type=checkbox]) {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--inset); color: var(--text); outline: 0; transition: border-color .3s, box-shadow .3s;
  font: 400 15.5px/1.4 var(--sans); letter-spacing: normal; text-transform: none; }
dialog input:focus, dialog select:focus, dialog textarea:focus, .login-card input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--wash); }
dialog textarea { resize: vertical; }
dialog select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row label { min-width: 130px; }
.dialog-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 8px;
  border-top: 1px solid var(--line); margin-top: 4px; padding-top: 18px; }
.grow { flex: 1; }

/* ---------- toast + confetti */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; max-width: calc(100vw - 32px);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; text-align: center;
  padding: 13px 18px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--raise); color: var(--text); font-size: 14px;
  transition: opacity .35s var(--ease), transform .45s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; z-index: 90; width: 5px; height: 5px; border-radius: 50%; pointer-events: none;
  animation: fall .9s var(--ease) forwards; }
@keyframes fall { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }

/* ---------- login */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card { width: min(360px, 100%); }
.login-card h1 { margin: 0; font: 700 clamp(44px, 9vw, 64px)/.9 var(--sans); letter-spacing: -.05em; }
.login-card .sub { margin: 14px 0 38px; color: var(--text-3); font-size: 15px; }
.login-card .check-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 26px; }
.login-card .check-row input { accent-color: var(--signal-b); width: 14px; height: 14px; margin: 0; }
.login-card .error { margin: 0 0 22px; padding: 12px 14px; border-left: 2px solid var(--signal-b);
  background: var(--wash); color: var(--text); font-size: 14px; }
.login-card .back { display: inline-block; margin-top: 30px; color: var(--text-3); text-decoration: none;
  font: 700 9.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; transition: color .3s; }
.login-card .back:hover { color: var(--accent); }

@media (max-width: 560px) {
  .top { flex-wrap: wrap; gap: 14px 18px; }
  .stats { order: 3; width: 100%; }
  .energy-bar { gap: 0; }
  .energy-bar span { margin-right: 4px; }
  .energy-bar button { padding: 7px 8px; }
  .task { grid-template-columns: 20px 1fr; gap: 14px; }
  .actions { grid-column: 2; justify-content: flex-start; margin-left: -10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .confetti { display: none; }
}

/* done tab */
.done-head { display: flex; justify-content: flex-end; padding: 0 0 6px; border-bottom: 1px solid var(--line); margin-top: -1px; }
.list:has(.done-head) { border-top: 0; }
.done-row { opacity: 1; }
.done-row .title { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-2); cursor: default; }
.done-row > .check { opacity: .55; }
.done-row .actions, .task.is-done .actions { opacity: .7; }
.done-row:hover .actions, .task.is-done:hover .actions { opacity: 1; }
.task.is-done:hover { opacity: .8; }

/* idle screensaver (always dark, like a screen at rest) */
.idle { position: fixed; inset: 0; z-index: 100; background: #08090d; color: #e9eaf1; opacity: 0;
  transition: opacity 1.6s cubic-bezier(.16,1,.3,1); cursor: none; }
.idle.on { opacity: 1; }
.idle:not(.on) { transition-duration: .25s; }
.idle[hidden] { display: none; }
.idle canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.idle canvas.aura { mix-blend-mode: screen; pointer-events: none; }
.idle-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.idle-num { font: 200 clamp(56px, 11vmin, 132px)/1 var(--sans); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.idle-num .of { color: #5c6275; }
.idle-label { margin-top: 18px; font: 700 10px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: #aca5dd; }
.idle-foot { position: absolute; left: 0; right: 0; bottom: 30px; text-align: center; pointer-events: none;
  font: 700 9.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #5c6275; }
.idle-foot .sep { margin: 0 12px; }
.idle-toggle { position: fixed; left: 22px; bottom: 20px; z-index: 5; background: none; border: 0; cursor: pointer; padding: 6px 0;
  font: 700 9px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); opacity: .6; transition: opacity .3s, color .3s; }
.idle-toggle:hover { opacity: 1; color: var(--accent); }
@media (pointer: coarse) { .idle-toggle { display: none; } }

/* focus: full subtask checklist — start anywhere */
.focus-steps { width: min(460px, 100%); margin: 0 auto 30px; text-align: left; border: 1px solid var(--line-2);
  border-radius: var(--r); background: var(--surface); padding: 6px 0 10px; }
.fs-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 8px;
  font: 700 9.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); }
.fs-mode { background: none; border: 0; padding: 2px 0; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--accent); }
.fs-mode:hover { color: var(--text); }
.fs-hint { margin: 0; padding: 2px 16px 8px; color: var(--text-3); font-size: 13.5px; line-height: 1.5; }
.fs-empty .fs-hint { padding-top: 12px; color: var(--text-2); font-size: 15px; }
.focus-steps ul { list-style: none; margin: 0; padding: 0; max-height: 34vh; overflow-y: auto; }
li.fs { display: flex; align-items: center; gap: 12px; padding: 0 16px; transition: background-color .25s; }
li.fs:hover { background: var(--raise); }
.fs-dot { flex: none; width: 17px; height: 17px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line-2);
  background: none; cursor: pointer; display: grid; place-items: center; transition: border-color .2s; }
.fs-dot:hover { border-color: var(--accent); }
.fs-title { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: none; cursor: pointer; text-align: left;
  color: var(--text-2); font: 400 15px/1.4 var(--sans); overflow-wrap: anywhere; }
.fs-title:disabled { cursor: default; }
li.fs.next .fs-title { color: var(--text); font-weight: 500; }
li.fs.next .fs-dot { border-color: var(--accent); }
.fs-tag { flex: none; font: 700 9px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
li.fs.done .fs-title { color: var(--text-3); text-decoration: line-through; }
li.fs.done .fs-dot { background: var(--signal-b); border-color: var(--signal-b); }
li.fs.done .fs-dot::after { content: ""; width: 4px; height: 7px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: translateY(-1px) rotate(45deg); }
.fs-add { padding: 6px 16px 0 45px; }
.fs-empty .fs-add { padding-left: 16px; }
.fs-add input { width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid transparent; outline: 0; background: transparent;
  color: var(--text); font: 400 14px/1.4 var(--sans); transition: border-color .3s; }
.fs-add input::placeholder { color: var(--text-3); }
.fs-add input:focus { border-bottom-color: var(--accent); }
.fs-empty .fs-add input { border-bottom-color: var(--line-2); }
.chip-fold { background: none; border: 0; padding: 0; cursor: pointer; font: 700 9px/1.6 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); }
.chip-fold:hover { color: var(--accent); }
