/* ============================================================
   COMPONENTS
   Reusable pieces. Each block is one component.
   ============================================================ */

/* --- Buttons -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-min);
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  text-decoration: none;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.btn--primary {
  background: var(--brand);
  color: var(--ink-inverse);
}

.btn--primary:hover { background: var(--brand-hover); }

.btn--accent {
  background: var(--accent);
  color: var(--ink-inverse);
}

.btn--accent:hover { filter: brightness(1.08); }

.btn--quiet {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: var(--weight-normal);
}

.btn--quiet:hover { background: var(--surface-hover); }

.btn--plain {
  color: var(--ink-secondary);
  font-weight: var(--weight-normal);
  padding: 0 var(--space-2);
}

.btn--plain:hover { color: var(--ink); }

.btn--small {
  min-height: 34px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --- Icon-only button ---------------------------------------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-secondary);
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.icon-btn svg { width: 20px; height: 20px; }

/* --- The agenda spine ----------------------------------------
   A hairline runs down the left of the day's content with a small
   marker at each section. This groups the page without wrapping
   every section in its own box.                                  */
.spine {
  position: relative;
  padding-left: var(--space-5);
}

.spine::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.spine-section {
  position: relative;
  margin-bottom: var(--space-6);
}

.spine-section::before {
  content: "";
  position: absolute;
  left: calc(var(--space-5) * -1);
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.spine-section--now::before {
  background: var(--accent);
  border-color: var(--accent);
}

.section-heading {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--ink-secondary);
  margin-bottom: var(--space-3);
  letter-spacing: 0;
}

.section-heading__count {
  font-weight: var(--weight-normal);
  color: var(--ink-muted);
}

/* --- Start Here: the one bold element on the page ------------- */
.start-here {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  padding: var(--space-5);
}

.start-here__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.start-here__task {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.start-here__meta {
  font-size: var(--text-sm);
  color: var(--ink-secondary);
  margin-bottom: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.start-here__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.start-here--empty .start-here__task {
  font-size: var(--text-lg);
  color: var(--ink-secondary);
  font-weight: var(--weight-normal);
}

/* --- Day bar: where you are in the DAY, not in your task list ---
   Labelled at the top and at both ends so it can never be mistaken
   for a measure of how much work is finished.                      */
.day-bar {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.day-bar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.day-bar__title {
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}

.day-bar__value {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.day-bar__track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
}

/* The hours already spent, drawn quietly: this is information, not a score. */
.day-bar__fill {
  height: 100%;
  border-radius: 2px 0 0 2px;
  background: var(--line-strong);
  transition: width 400ms var(--ease);
}

/* Where "now" sits between the two ends. */
.day-bar__now {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 10px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--brand);
  transition: left 400ms var(--ease);
}

.day-bar__ends {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* --- Quick capture -------------------------------------------- */
.capture {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}

.capture__input {
  flex: 1;
  min-width: 0;
  min-height: var(--touch-min);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.capture__input::placeholder { color: var(--ink-muted); }

.capture__input:focus-visible {
  outline: 2px solid var(--brand-ring);
  outline-offset: 0;
  border-color: var(--brand);
}

.capture__hint {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

/* --- Task row -------------------------------------------------- */
.task-list { border-top: 1px solid var(--line); }

.task {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}

.task__check {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease);
}

/* The tap area is larger than the box that is drawn. */
.task__check::after {
  content: "";
  position: absolute;
  width: var(--touch-min);
  height: var(--touch-min);
  margin: -10px;
}

.task__check { position: relative; }

.task__check:hover { border-color: var(--brand); }

.task__check[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink-inverse);
}

.task__check svg { width: 14px; height: 14px; }

.task__body { flex: 1; min-width: 0; }

.task__title {
  font-size: var(--text-base);
  color: var(--ink);
}

.task--done .task__title {
  color: var(--ink-muted);
  text-decoration: line-through;
}

.task__meta {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.task__flag--overdue { color: var(--warning); }
.task__flag--carried { color: var(--ink-muted); }

.task__star {
  flex: none;
  width: var(--touch-min);
  height: var(--touch-min);
  margin-top: -9px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task__star:hover { background: var(--surface-hover); color: var(--ink); }
.task__star[aria-pressed="true"] { color: var(--accent); }
.task__star svg { width: 18px; height: 18px; }

/* --- Top 3 ----------------------------------------------------- */
.top3 { display: grid; gap: var(--space-2); }

.top3__item {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.top3__rank {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  flex: none;
}

.top3__title { font-size: var(--text-base); }
.top3__item--done .top3__title { color: var(--ink-muted); text-decoration: line-through; }

/* --- Empty state: an invitation, not an apology --------------- */
.empty {
  padding: var(--space-4) 0;
  color: var(--ink-secondary);
  font-size: var(--text-base);
}

/* --- Notice (used for storage problems, demo banner, phase note) */
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}

.notice svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--ink-muted);
}

.notice__text { flex: 1; min-width: 0; }

.notice--warning {
  background: var(--warning-soft);
  border-color: var(--accent-line);
  color: var(--ink);
}

/* --- Toast (undo) ---------------------------------------------- */
.toast-region {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--bottom-nav-height) + var(--space-3) + env(safe-area-inset-bottom));
  z-index: 60;
  width: min(30rem, calc(100vw - var(--space-4) * 2));
  display: grid;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  font-size: var(--text-sm);
}

.toast__action {
  border: none;
  background: transparent;
  color: var(--brand);
  font-weight: var(--weight-bold);
  min-height: 34px;
  padding: 0 var(--space-2);
}

/* --- Placeholder screens for phases not yet built -------------- */
.placeholder {
  max-width: var(--reading-width);
}

.placeholder__note {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  font-size: var(--text-sm);
}

/* Trailing control on an inbox row: moves it onto today's list. */
.task__move { flex: none; margin-top: -4px; }

/* A quiet count of the day's tasks. Deliberately plain text. */
.day-summary {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}

/* --- A task title that opens the editor ------------------------ */
.task__title--open {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
}

.task__title--open:hover { color: var(--brand); }

/* --- Form fields ------------------------------------------------ */
.field { margin-bottom: var(--space-4); }

.field__label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--ink-secondary);
}

.field__input {
  width: 100%;
  min-height: var(--touch-min);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
}

.field__input--area { min-height: 5rem; resize: vertical; line-height: var(--leading-normal); }
.field__input--number { max-width: 8rem; }

.field__input:focus-visible { outline: 2px solid var(--brand-ring); border-color: var(--brand); }

.field__help {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

/* --- Segmented choice ------------------------------------------- */
.segmented {
  display: flex;
  gap: var(--space-1);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

.segmented__option {
  flex: 1;
  min-height: 38px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-secondary);
  font-size: var(--text-sm);
}

.segmented__option[aria-checked="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: var(--weight-bold);
  box-shadow: var(--shadow-panel);
}

/* --- Editor ------------------------------------------------------ */
.editor__group {
  margin-bottom: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.editor__stack { display: grid; gap: var(--space-2); }

.editor__footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.editor__delete { color: var(--danger); }

/* --- Small steps -------------------------------------------------- */
.steps { margin: var(--space-3) 0; display: grid; gap: var(--space-1); }

.steps__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1) 0;
}

.steps__title { flex: 1; min-width: 0; font-size: var(--text-sm); }
.steps__item--done .steps__title { color: var(--ink-muted); text-decoration: line-through; }

/* --- Filter tabs -------------------------------------------------- */
.tabs {
  display: flex;
  gap: var(--space-1);
  margin: var(--space-5) 0 var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.tabs::-webkit-scrollbar { display: none; }

.tabs__tab {
  flex: none;
  min-height: var(--touch-min);
  padding: 0 var(--space-3);
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.tabs__tab[aria-selected="true"] {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: var(--weight-bold);
}

.tasks__pick { margin-top: var(--space-4); }

/* --- Plan screen ---------------------------------------------------- */
.plan-section {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
}

/* The one thing gets its own weight without becoming a shouty banner. */
.plan-section--one .field__input {
  font-size: var(--text-md);
  border-left: 3px solid var(--accent);
}

.day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.day-nav__title {
  font-size: var(--text-lg);
  text-align: center;
  flex: 1;
  min-width: 0;
}

.dump { margin-top: var(--space-3); border-top: 1px solid var(--line); }

.dump__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
}

.dump__text { flex: 1; min-width: 0; font-size: var(--text-base); }

.blocks { margin: var(--space-3) 0; }

.blocks__item {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) 0 var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
}

.blocks__item--break { border-left-color: var(--success); }
.blocks__item--focus { border-left-color: var(--accent); }

.blocks__time {
  flex: none;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--ink-secondary);
}

.blocks__body { flex: 1; min-width: 0; display: block; }
.blocks__label { display: block; }
.blocks__meta { display: block; font-size: var(--text-sm); color: var(--ink-muted); }

.tasks__pick-button { width: 100%; }

/* --- Cards: projects, goals, habits, routines ------------------- */
.cards { display: grid; gap: var(--space-3); margin-top: var(--space-5); }

.card {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.card--paused { opacity: 0.66; }

.card__title {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--ink);
}

.card__title:hover { color: var(--brand); }

.card__meta {
  margin-top: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* The next step is what a project card is for, so it is set apart. */
.next-action {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.next-action__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--accent);
  margin-bottom: var(--space-1);
}

.next-action__task { font-size: var(--text-base); }

/* --- A plain progress meter, no ring, no animation ------------- */
.meter {
  margin-top: var(--space-3);
  height: 5px;
  border-radius: 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  overflow: hidden;
}

.meter__fill { height: 100%; background: var(--brand); transition: width 300ms var(--ease); }

/* --- Choosing one item from a list ------------------------------ */
.pick-list { display: grid; gap: var(--space-1); margin-top: var(--space-2); }

.pick-list__item {
  width: 100%;
  min-height: var(--touch-min);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  font-size: var(--text-sm);
}

.pick-list__item[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: var(--weight-bold);
}

/* --- The week of a habit -----------------------------------------
   A missed day is a blank square, never a red one.                */
.strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-1);
  margin-top: var(--space-4);
}

.strip__cell { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }

.strip__label { font-size: var(--text-xs); color: var(--ink-muted); }

.strip__day {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink-inverse);
  font-size: var(--text-sm);
}

.strip__day--done { background: var(--brand); border-color: var(--brand); }
.strip__day--off { background: var(--surface-sunken); border-style: dashed; }
.strip__day--today { border-color: var(--accent-line); border-width: 2px; }
.strip__day[disabled] { opacity: 0.45; }

/* --- Picking weekdays -------------------------------------------- */
.day-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-1); }

.day-picker__day {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}

.day-picker__day[aria-pressed="true"] {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
  font-weight: var(--weight-bold);
}

.goal-level { margin-top: var(--space-5); }

.weekly-reset { width: 100%; }

.routine-shortcuts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.routine-shortcut { flex: 1 1 auto; min-width: 12rem; justify-content: flex-start; }

/* --- Card header: title plus a visible way in -------------------- */
.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.card__edit { flex: none; }

/* --- Focus panel -------------------------------------------------
   The numbers are the only thing that moves. No ring, no pulse. */
.focus-panel {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.focus-panel__phase {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--accent);
}

.focus-panel__clock {
  margin: var(--space-2) 0;
  font-size: 3.25rem;
  font-weight: var(--weight-bold);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.focus-panel__task { color: var(--ink-secondary); font-size: var(--text-base); }

.focus-panel__actions {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.custom-times { display: flex; gap: var(--space-4); margin-top: var(--space-4); }

/* --- Focus mode: everything else goes away ----------------------- */
.focus-mode {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

.focus-mode__inner { width: min(30rem, 100%); text-align: center; }

.focus-mode__phase {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.focus-mode__task {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

.focus-mode__clock {
  margin: var(--space-5) 0;
  font-size: clamp(3.5rem, 18vw, 6rem);
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.focus-mode__actions {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

.focus-mode__leave { margin-top: var(--space-5); }

.focus-mode__note {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

/* The bottom bar must not sit on top of focus mode. */
body.is-focus-mode .bottom-nav { display: none; }
body.is-focus-mode { overflow: hidden; }

/* --- Reset my day ------------------------------------------------- */
.reset-day { margin-top: var(--space-3); }

.reset-day__prompt {
  font-size: var(--text-sm);
  color: var(--ink-secondary);
  margin-bottom: var(--space-2);
}

/* --- Figures on the progress screen -------------------------------- */
.figures {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2) var(--space-4);
  align-items: baseline;
}

.figures__label { font-size: var(--text-sm); color: var(--ink-secondary); }

.figures__value {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chart { width: 100%; height: auto; max-width: 22rem; margin-top: var(--space-3); }

/* --- Notes ----------------------------------------------------------- */
.card--pinned { border-left: 3px solid var(--accent); }
.card__title--note { font-weight: var(--weight-normal); font-size: var(--text-base); }

/* --- Settings ------------------------------------------------------ */
.settings__wide {
  width: 100%;
  margin-bottom: var(--space-2);
  justify-content: center;
}

/* --- First run ------------------------------------------------------ */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--canvas);
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

body.is-welcome { overflow: hidden; }

.welcome__panel { width: min(34rem, 100%); }

.welcome__step {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
}

.welcome__title {
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.welcome__body {
  font-size: var(--text-md);
  color: var(--ink-secondary);
  line-height: var(--leading-loose);
}

.welcome__actions {
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.welcome__choices { margin-top: var(--space-5); display: grid; gap: var(--space-3); }

.welcome__choice {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.welcome__choice-title { font-size: var(--text-md); margin-bottom: var(--space-2); }

.welcome__choice-body {
  font-size: var(--text-sm);
  color: var(--ink-secondary);
  margin-bottom: var(--space-3);
}

.welcome__error { color: var(--danger); }

/* --- A new version is ready -------------------------------------
   A bar at the top, not a dialog in the way. Refreshing reloads the
   page, so it only ever happens when asked for.                   */
.update-bar {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  padding-top: calc(var(--space-2) + env(safe-area-inset-top));
  background: var(--brand-soft);
  border-bottom: 1px solid var(--brand);
  font-size: var(--text-sm);
  color: var(--ink);
}

.update-bar__text { flex: 1; min-width: 0; }
