/* Mobile-first UI, vanilla CSS, no framework and no build step. */

:root {
  --bg: #f7fbf9;
  --bg-elev: #ffffff;
  --bg-sunk: #edf5f0;
  --line: #dfebe4;
  --line-soft: #eef5f0;
  /* Every ink and accent below clears 4.6:1 on --bg-sunk, the dimmest surface. */

  --ink: #0a1210;
  --ink-2: #16211c;
  --ink-3: #22302a;

  --accent: #0a5c37;
  --accent-text: #08492c;   /* the accent as words, which needs to be far darker */
  --accent-ink: #ffffff;
  --accent-soft: #dcefe4;
  --accent-line: #7cc19f;

  --wash: linear-gradient(170deg, #fbfefc 0%, #f4faf6 55%, #eff7f2 100%);

  --focus: #0a5c37;
  --light: #0891b2;
  --physical: #059669;
  --rest: #9333ea;
  --meal: #d97706;
  --commit: #64748b;
  --break: #cbd5e1;

  --ok: #059669;
  --warn: #d97706;
  --danger: #dc2626;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(16, 16, 28, .06);
  --shadow: 0 2px 4px rgba(16, 16, 28, .04), 0 8px 24px rgba(16, 16, 28, .06);
  --shadow-lg: 0 8px 16px rgba(16, 16, 28, .08), 0 24px 48px rgba(16, 16, 28, .12);

  --ease: cubic-bezier(.32, .72, 0, 1);
  --minute: 1.15px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a120e;
    --bg-elev: #101b15;
    --bg-sunk: #16241c;
    --line: #23342a;
    --line-soft: #1b2a22;

    --ink: #f2f8f4;
    --ink-2: #dce8e1;
    --ink-3: #c6d5cc;

    --accent: #3ddc91;
    --accent-text: #6cf0b0;
    --accent-ink: #0a120e;
    --accent-soft: #14301f;
    --accent-line: #27573c;

    --wash: linear-gradient(170deg, #0c1611 0%, #0a120e 55%, #091310 100%);

    --focus: #3ddc91;
    --light: #22b8d6;
    --physical: #10b981;
    --rest: #a855f7;
    --meal: #f59e0b;
    --commit: #7d8da3;
    --break: #33333f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, .4), 0 24px 48px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 0 5.5rem;
  background: var(--bg) var(--wash) fixed;
  min-height: 100vh;
  color: var(--ink);
  font: 420 17px/1.55 ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 0 1.15rem; }
.tnum { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ header */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}

.head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 0 .7rem;
}
.head-text { flex: 1; min-width: 0; }
.greet {
  font-size: 1.3rem;
  font-weight: 640;
  letter-spacing: -.021em;
  margin: 0;
  line-height: 1.2;
}
.subline {
  font-size: .92rem;
  color: var(--ink-2);
  margin-top: .15rem;
}

.ring { flex: 0 0 auto; width: 50px; height: 50px; position: relative; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 4.5; stroke-linecap: round; }
.ring .track { stroke: var(--bg-sunk); }
.ring .bar { stroke: var(--accent); transition: stroke-dashoffset .6s var(--ease); }
.ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .92rem;
  font-weight: 620;
  letter-spacing: -.02em;
}

.week { display: flex; gap: .34rem; padding-bottom: .7rem; }
.week button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .28rem;
  padding: .42rem .1rem .38rem;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: transparent;
  font: inherit;
  color: var(--ink-3);
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.week button:hover { background: var(--bg-sunk); }
.week button.on { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.week .dow { font-size: .92rem; font-weight: 620; letter-spacing: .05em; text-transform: uppercase; }
.week .dom { font-size: .92rem; font-weight: 600; color: var(--ink); }
.week button.on .dom { color: var(--accent-text); }
.week .meter { width: 62%; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.week .meter i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.jump { display: flex; align-items: center; gap: .5rem; padding-bottom: .7rem; }
.jump input { flex: 1; }
.week .step { flex: 0 0 1.6rem; font-size: 1.1rem; line-height: 1; color: var(--ink-3); padding: .42rem 0; }
.week .step:hover { background: var(--bg-sunk); color: var(--ink); }

/* ------------------------------------------------------------------ fields */
input[type="text"], input[type="time"], input[type="date"], input[type="number"], select {
  font: inherit;
  font-size: .92rem;
  line-height: 1.2;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0 .6rem;
  /* A fixed height, because time and number inputs size themselves differently. */
  height: 2.5rem;
  box-sizing: border-box;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
}
/* The native pickers add their own chrome, which breaks the shared height. */
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator { margin: 0; opacity: .55; }
input[type="number"]::-webkit-inner-spin-button { appearance: none; margin: 0; }
label.field + input[type="text"] { width: 100%; }
select {
  padding-right: 1.7rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: right 0.85rem center, right 0.6rem center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="number"] { text-align: center; }

/* ----------------------------------------------------------------- buttons */
.btn {
  font: inherit;
  font-weight: 560;
  font-size: .92rem;
  border: 1px solid transparent;
  border-radius: var(--r);
  padding: .62rem 1.05rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s var(--ease), background .18s var(--ease), opacity .18s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: var(--bg-elev); color: var(--ink); border-color: var(--line); }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--bg-sunk); }

/* ----------------------------------------------------------------- capture */
.capture {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: .8rem .85rem .7rem;
  margin: 1rem 0 1.15rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.capture:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.capture textarea {
  width: 100%;
  min-height: 3rem;
  max-height: 12rem;
  resize: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  padding: 0;
  outline: none;
}
.capture textarea::placeholder { color: var(--ink-3); }
.capture-foot { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; }
.capture-hint { flex: 1; font-size: .92rem; color: var(--ink-2); min-width: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .92rem;
  font-weight: 620;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .18rem .45rem;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* ---------------------------------------------------------------- proposal */
.proposal {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: var(--r-lg);
  padding: .9rem 1rem;
  margin-bottom: 1.15rem;
  animation: rise .3s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.proposal h3 {
  margin: 0 0 .1rem;
  font-size: .95rem;
  font-weight: 620;
  letter-spacing: -.01em;
}
.proposal .lead { font-size: .92rem; color: var(--ink-2); margin-bottom: .7rem; }
.change {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-size: .92rem;
  padding: .3rem 0;
  border-top: 1px solid color-mix(in srgb, var(--accent-line) 45%, transparent);
}
.change .tag {
  flex: 0 0 4.6rem;
  font-size: .92rem;
  font-weight: 660;
  letter-spacing: .045em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.change .what { flex: 1; min-width: 0; }
.change .when { color: var(--ink-2); font-size: .92rem; }
.change s { color: var(--ink-3); text-decoration-thickness: 1px; }
.proposal .row { display: flex; gap: .5rem; margin-top: .8rem; }

/* ---------------------------------------------------------------- timeline */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 1.5rem 0 .6rem;
}
.sec-head h2 {
  font-size: .92rem;
  font-weight: 640;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}
.sec-head .aside { font-size: .92rem; color: var(--ink-2); }

.timeline {
  position: relative;
  padding-left: 3.1rem;
  margin-bottom: 1rem;
}
.hour {
  position: absolute;
  left: 0;
  width: 100%;
  border-top: 1px solid var(--line-soft);
  pointer-events: none;
}
.hour span {
  position: absolute;
  left: 0;
  top: -.52rem;
  width: 2.5rem;
  text-align: right;
  font-size: .92rem;
  color: var(--ink-3);
  background: var(--bg);
  padding-right: .1rem;
}

.tblock {
  position: absolute;
  left: 3.1rem;
  right: 0;
  border-radius: var(--r);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--commit);
  box-shadow: var(--shadow-sm);
  padding: .32rem .6rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: default;
  transition: transform .14s var(--ease), box-shadow .18s var(--ease);
}
.tblock[data-load="focus"] { border-left-color: var(--focus); }
.tblock[data-load="light"] { border-left-color: var(--light); }
.tblock[data-load="physical"] { border-left-color: var(--physical); }
.tblock[data-load="rest"] { border-left-color: var(--rest); }
.tblock[data-load="meal"] { border-left-color: var(--meal); }
.tblock[data-kind="break"] { border-left-color: var(--break); background: var(--bg-sunk); box-shadow: none; }
.tblock[data-kind="commitment"] { background: var(--bg-sunk); border-style: dashed; }
.tblock[data-kind="task"] { cursor: pointer; }
.tblock[data-kind="task"]:hover { transform: translateX(2px); box-shadow: var(--shadow); }

.tblock .name {
  font-size: .92rem;
  font-weight: 540;
  letter-spacing: -.008em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tblock .meta {
  font-size: .92rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tblock.tight { padding: .1rem .6rem; }
.tblock.tight .meta { display: none; }
.tblock.tight .name { font-size: .92rem; }

.tblock.done { opacity: .55; }
.tblock.done .name { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.tblock.live { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.pill {
  align-self: flex-start;
  font-size: .92rem;
  font-weight: 640;
  padding: .08rem .34rem;
  border-radius: 4px;
  background: var(--bg-sunk);
  color: var(--ink-2);
}
.pill.good { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.mid { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

.nowbar { position: absolute; left: 0; width: 100%; z-index: 5; pointer-events: none; }
.nowbar::before {
  content: "";
  position: absolute;
  left: 2.85rem;
  right: 0;
  top: 0;
  border-top: 2px solid var(--accent);
}
.nowbar::after {
  content: "";
  position: absolute;
  left: 2.7rem;
  top: -3.5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.nowbar span {
  position: absolute;
  left: 0;
  top: -.55rem;
  width: 2.4rem;
  text-align: right;
  font-size: .92rem;
  font-weight: 660;
  color: var(--accent-text);
  background: var(--bg);
}

/* ------------------------------------------------------------------ pieces */
.empty {
  text-align: center;
  color: var(--ink-3);
  font-size: .92rem;
  padding: 2.2rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty > div:first-child { color: var(--ink); font-size: 1rem; font-weight: 560; }
.empty .sub { margin-top: .25rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 1.1rem; }
.suggest {
  font: inherit;
  font-size: .92rem;
  padding: .38rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease), transform .12s var(--ease);
}
.suggest:hover { border-color: var(--accent-line); color: var(--accent-text); }
.suggest:active { transform: scale(.96); }

.switch { display: flex; align-items: center; gap: .65rem; cursor: pointer; font-size: .92rem; }
.switch input {
  appearance: none;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .2s var(--ease);
}
.switch input::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease);
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(17px); }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: .85rem 1rem;
  margin-bottom: .55rem;
  box-shadow: var(--shadow-sm);
}
.card b { display: block; font-size: .92rem; font-weight: 600; letter-spacing: -.008em; }
.card span { font-size: .92rem; color: var(--ink-2); }

.rowitem {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: .6rem .5rem .6rem .8rem;
  margin-bottom: .4rem;
}
.rowitem .grow { flex: 1; min-width: 0; }
.rowitem .grow b { display: block; font-size: .92rem; font-weight: 520; }
.rowitem .grow span { font-size: .92rem; color: var(--ink-2); }
.goalbar { margin-top: .4rem; height: 5px; border-radius: 3px; background: var(--bg-sunk); overflow: hidden; }
.goalbar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s var(--ease); }
.iconbtn {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  padding: .35rem;
  border-radius: var(--r-sm);
  line-height: 0;
}
.iconbtn:hover { background: var(--bg-sunk); color: var(--danger); }
.iconbtn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ------------------------------------------------------------------- curve */
.curve { display: flex; align-items: flex-end; gap: 2px; height: 92px; margin-top: .2rem; }
.curve div {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent));
  min-height: 3px;
  transition: height .4s var(--ease);
}
.curve div.void { background: var(--line); }
.axis { display: flex; justify-content: space-between; font-size: .92rem; color: var(--ink-3); margin-top: .3rem; }

.legend { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .92rem; color: var(--ink-2); margin-top: .7rem; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: .3rem; }

/* ------------------------------------------------------------------ fields */
label.field {
  display: block;
  font-size: .92rem;
  font-weight: 560;
  color: var(--ink-2);
  margin: .85rem 0 .3rem;
}
.inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tickbtn {
  flex: 0 0 auto;
  font: inherit;
  font-size: .92rem;
  font-weight: 560;
  min-width: 2.2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-2);
  cursor: pointer;
}
.tickbtn.plus { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.notetext {
  width: 100%;
  font: inherit;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: .6rem .7rem;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}
.notetext:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }

/* One row per note, each editable where it sits, with its own way out. */
.noterow { display: flex; align-items: flex-start; gap: .4rem; margin-bottom: .4rem; }
.noterow .notetext { flex: 1; min-width: 0; }
.noterow .iconbtn { margin-top: .45rem; }
.noteadd { display: flex; align-items: flex-start; gap: .4rem; margin-top: .55rem; }
.noteadd .notetext { flex: 1; min-width: 0; }
.noteadd .btn { margin-top: .1rem; }

.daypick { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .4rem; }
.daypick .day {
  font: inherit;
  font-size: .92rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-2);
  cursor: pointer;
}
.daypick .day.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.inline .btn { height: 2.5rem; padding: 0 1.05rem; }
.inline span { color: var(--ink-3); font-size: .92rem; }

/* Small print leans on weight too, for families that ship a medium. */
.capture-hint, .sec-head .aside, .tblock .meta, .rowitem .grow span, .change .when,
.axis, .legend, .card span, .subline, .proposal .lead, .empty { font-weight: 560; }

/* ----------------------------------------------------------------- dialogs */
dialog {
  border: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 1.15rem 1.15rem calc(1.15rem + env(safe-area-inset-bottom));
  background: var(--bg-elev);
  color: var(--ink);
  width: 100%;
  max-width: 680px;
  margin: auto auto 0;
  box-shadow: var(--shadow-lg);
  animation: sheet .28s var(--ease);
}
@keyframes sheet { from { transform: translateY(100%); } }
dialog::backdrop { background: rgba(10, 10, 18, .5); backdrop-filter: blur(2px); }
dialog h3 { margin: 0 0 .15rem; font-size: 1.05rem; font-weight: 620; letter-spacing: -.015em; }
dialog .lead { margin: 0 0 1rem; color: var(--ink-2); font-size: .92rem; }

.grabber { width: 34px; height: 4px; border-radius: 2px; background: var(--line); margin: -.4rem auto .8rem; }

.pcts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pcts button {
  font: inherit;
  font-size: .92rem;
  font-weight: 540;
  padding: .85rem .3rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: transform .12s var(--ease), border-color .18s;
}
.pcts button:active { transform: scale(.96); }
.pcts button:hover { border-color: var(--accent-line); }
.pcts button.wide { grid-column: span 3; background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }

/* ------------------------------------------------------------------- toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 5.2rem;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--bg);
  padding: .62rem 1.05rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 520;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------- nav */
.tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  flex: 1;
  border: 0;
  background: none;
  font: inherit;
  font-size: .92rem;
  font-weight: 560;
  color: var(--ink-3);
  padding: .5rem .2rem .55rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .18rem;
  transition: color .18s var(--ease);
}
.tabs button.on { color: var(--accent-text); }
.tabs svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.view { display: none; animation: fade .22s var(--ease); }
.view.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } }

.brand { display: none; }

/* Desktop: the bottom bar becomes a sidebar, so nothing spans the full width alone. */
@media (min-width: 900px) {
  body { padding: 0 0 3rem 232px; }

  .tabs {
    top: 0;
    bottom: 0;
    right: auto;
    width: 232px;
    flex-direction: column;
    justify-content: flex-start;
    gap: .15rem;
    padding: 1.4rem .7rem;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: var(--bg-elev);
  }
  .tabs button {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: .75rem;
    width: 100%;
    padding: .62rem .8rem;
    border-radius: var(--r);
    font-size: .92rem;
    font-weight: 520;
  }
  .tabs button:hover { background: var(--bg-sunk); }
  .tabs button.on { background: var(--accent-soft); }

  .brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0 .8rem 1.1rem;
    font-size: 1.05rem;
    font-weight: 640;
    letter-spacing: -.02em;
    color: var(--ink);
  }
  .brand i {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--accent);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
  }
  .brand svg { width: 15px; height: 15px; stroke: var(--accent-ink); fill: none; stroke-width: 2.2; }

  header { padding-top: 1.4rem; }
  .wrap { max-width: 760px; padding: 0 2rem; }
  .toast { left: calc(232px + (100vw - 232px) / 2); bottom: 1.5rem; }
  dialog { max-width: 460px; border-radius: var(--r-xl); margin: auto; }
  @keyframes sheet { from { transform: translateY(16px); opacity: 0; } }
}

/* ----------------------------------------------------------------- welcome */
/* No nav rail on this page, so drop the space body reserves for one and centre. */
body.signed-out {
  padding: 1.5rem;
  min-height: 100dvh;
  display: grid;
  place-items: center;
}
.welcome {
  width: 100%;
  max-width: 27rem;
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
}
.welcome p + p { margin-top: 1.1rem; }
.welcome .mark {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: var(--accent);
  display: grid;
  place-items: center;
  margin: 0 auto 1.3rem;
  box-shadow: var(--shadow);
}
.welcome .mark svg { width: 30px; height: 30px; stroke: var(--accent-ink); fill: none; stroke-width: 2; stroke-linecap: round; }
.welcome h1 { font-size: 1.9rem; font-weight: 660; letter-spacing: -.03em; margin: 0 0 .5rem; }
.welcome p { color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.welcome code { background: var(--bg-sunk); padding: .12rem .4rem; border-radius: 5px; font-size: .86em; }
.welcome .fine { font-size: .92rem; color: var(--ink-3); margin-top: 2.5rem; }
