/* chain — solid content only (glass belongs to the platform's floating layer). Scoped under .zn for the screens;
 * the sheets live in the overlay layer, so their classes carry the zn- prefix (.zn-sheet).
 * Tones: ok = the accent · warn (no margin) = amber · bad (won't make it, as the river's overdue) = a quiet red ·
 * muted = past or not part of the plan right now. */

.zn .zn-hero { text-align: center; padding: 22px 16px 18px; }
.zn .zn-big {
  font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.zn .zn-big.is-word, .zn .zn-big.is-past { font-size: 30px; line-height: 1.15; }
.zn .zn-big.is-past { color: var(--subtitle); }
.zn .zn-unit { margin-top: 6px; font-size: 17px; font-weight: 600; color: var(--subtitle); }
.zn .zn-status {
  display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; max-width: 100%;
  font-size: 15px; line-height: 1.35; font-weight: 600; color: var(--text); text-align: left;
}
.zn .zn-next { margin: 8px 0 0; font-size: 15px; line-height: 1.35; color: var(--subtitle); }

.zn-pip, .zn .zn-pip { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.zn-pip.tone-warn, .zn .zn-pip.tone-warn { background: #ff9500; }
.zn-pip.tone-bad, .zn .zn-pip.tone-bad { background: var(--destructive); }
.zn-pip.tone-muted, .zn .zn-pip.tone-muted { background: var(--hint); }

/* the timeline: one calm rail, a dot per step, Today as a line across it */
.zn .zn-line-box { padding: 6px 0; }
.zn .zn-line { list-style: none; margin: 0; padding: 0; }
.zn .zn-line > li { position: relative; display: flex; align-items: stretch; min-height: 52px; }
.zn .zn-rail { position: relative; flex: none; width: 40px; }
.zn .zn-rail::before {
  content: ""; position: absolute; left: 19px; top: 0; bottom: 0; width: 2px;
  background: rgb(var(--accent-rgb) / 0.22);
}
.zn .zn-line > li:first-child .zn-rail::before { top: 24px; }
.zn .zn-line > li:last-child .zn-rail::before { bottom: calc(100% - 24px); }
.zn .zn-dot {
  position: absolute; left: 13px; top: 18px; width: 14px; height: 14px; box-sizing: border-box; border-radius: 50%;
  background: var(--bg2); border: 2.5px solid var(--accent);
}
.zn .zn-step.kind-goal .zn-dot { left: 11px; top: 16px; width: 18px; height: 18px; background: var(--accent); }
.zn .zn-step.kind-window .zn-dot { border-style: dashed; }
.zn .zn-step.tone-warn .zn-dot { border-color: #ff9500; }
.zn .zn-step.tone-bad .zn-dot { border-color: var(--destructive); }
.zn .zn-step.tone-done .zn-dot { background: var(--accent); }
.zn .zn-step.is-past .zn-dot, .zn .zn-step.is-optional .zn-dot, .zn .zn-step.tone-muted .zn-dot { border-color: var(--hint); }
.zn .zn-step.is-past.tone-done .zn-dot { background: var(--hint); }

.zn .zn-step-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 16px 10px 2px; border: 0; background: none; color: var(--text); font: inherit; text-align: left;
  cursor: pointer;
}
.zn .zn-step-main:active { background: rgb(var(--text-rgb) / 0.05); }
.zn .zn-when { font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.zn .zn-name { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.zn .zn-sub { font-size: 13px; line-height: 1.3; color: var(--hint); }
.zn .zn-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.zn .zn-step.kind-goal .zn-name { font-size: 17px; font-weight: 600; }
.zn .zn-step.tone-warn .zn-when { color: #b25000; }
.zn .zn-step.tone-bad .zn-when { color: var(--destructive); }
.zn .zn-step.is-past .zn-when, .zn .zn-step.is-optional .zn-when, .zn .zn-step.tone-muted .zn-when { color: var(--hint); }
.zn .zn-step.is-past .zn-name, .zn .zn-step.is-optional .zn-name { color: var(--subtitle); }

.zn .zn-today { min-height: 34px; align-items: center; }
.zn .zn-today .zn-dot { top: 50%; left: 15px; width: 10px; height: 10px; margin-top: -5px; border: 0; background: var(--text); }
.zn .zn-today-label {
  flex: 1; display: flex; align-items: center; gap: 10px; padding-right: 16px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text);
}
.zn .zn-today-label::after { content: ""; flex: 1; border-top: 1px solid rgb(var(--text-rgb) / 0.25); }

/* "what if…" */
.zn .zn-if { display: grid; gap: 8px; }
.zn .zn-if-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.zn .zn-if-label { font-size: 15px; color: var(--subtitle); }
.zn .zn-if-date { flex: none; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.zn .zn-slider { width: 100%; margin: 4px 0 0; min-height: 44px; accent-color: var(--accent); }
.zn .zn-if-scale { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--hint); }
.zn .zn-if-text, .zn-if-text { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--text); }
.zn-if-actions, .zn .zn-if-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zn .zn-sessions .chip { max-width: 100%; }
.zn .zn-foot { margin: 18px 4px 0; }
.zn .zn-examples .chip { max-width: 100%; }
.zn .zn-examples .chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sheets */
.zn-form { display: grid; gap: 10px; }
.zn-stack { display: grid; gap: 8px; }
.zn-types { display: grid; gap: 12px; }
.zn-label { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--section-header); margin-top: 6px; }
.zn-sublabel { font-size: 12px; color: var(--hint); }
.zn-hint { margin: 0; font-size: 13px; line-height: 1.35; color: var(--hint); }
.zn-error { margin: 0; font-size: 14px; line-height: 1.35; color: var(--destructive); }
.zn-input {
  width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 12px; box-sizing: border-box;
  background: var(--bg2); color: var(--text); font: inherit; font-size: 16px;
  -webkit-user-select: text; user-select: text;
}
.zn-input:focus { outline: 2px solid rgb(var(--accent-rgb) / 0.5); outline-offset: 0; }
.zn-s-head { display: grid; gap: 4px; }
.zn-adjust { display: grid; gap: 10px; }
.zn-s-when { margin: 0; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.zn-s-state { margin: 0; font-size: 15px; line-height: 1.4; }
.zn-s-state.tone-warn { color: #b25000; }
.zn-s-state.tone-bad { color: var(--destructive); }
.zn-s-line, .zn-s-note { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text); }
.zn-s-note { color: var(--subtitle); }
.zn-check { display: grid; gap: 8px; justify-items: start; padding: 12px; border-radius: 12px; background: rgb(255 149 0 / 0.1); }
.zn-gap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.zn-gap + .zn-gap { border-top: .5px solid var(--sep); }
.zn-gap-main { min-width: 0; display: grid; gap: 2px; }
.zn-gap-text { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.zn-gap-note { font-size: 12px; color: var(--hint); }
.zn-gap .stepper { flex: none; }

:root[data-scheme="dark"] .zn .zn-step.tone-warn .zn-when, :root[data-scheme="dark"] .zn-s-state.tone-warn { color: #ffb340; }
@media (prefers-contrast: more) {
  .zn-input { box-shadow: inset 0 0 0 1px var(--text); }
  .zn .zn-rail::before { background: var(--text); }
  .zn .zn-when, .zn .zn-step.tone-warn .zn-when { color: var(--text); }
}
@media (max-width: 340px) {
  .zn .zn-big { font-size: 48px; }
  .zn-gap { flex-wrap: wrap; }
}
