/* ==========================================================================
   Basic Tshuva! — screens
   Colour and type come from tokens.css. No literal hex belongs in this file
   except the sparkle/ink-wash gradients, which are decorative and derived
   from the token palette via colour-mix.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* A class with `display` outranks the UA rule for [hidden]; without this,
   hiding the top bar or the toast silently does nothing. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: var(--t-body);
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  translate: -50% -120%;
  z-index: 90;
  padding: var(--s-s) var(--s-m);
  border-radius: 0 0 var(--r-badge) var(--r-badge);
  background: var(--accent-text);
  color: var(--accent-on);
  font-family: var(--f-heading);
  font-weight: 700;
  text-decoration: none;
  transition: translate var(--t-fast) var(--ease);
}

.skip-link:focus {
  translate: -50% 0;
}

.noscript {
  padding: var(--s-xl);
  text-align: center;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--s-s);
  padding: max(var(--s-s), env(safe-area-inset-top)) var(--s-m) var(--s-s);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar__back,
.topbar__spacer {
  flex: 0 0 40px;
  height: 40px;
}

.topbar__back {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--accent-text);
}

.topbar__back:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.topbar__title {
  flex: 1;
  min-width: 0;
  font: 700 1.0625rem/1.2 var(--f-heading);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view {
  outline: 0;
}

.wrap {
  max-width: 34rem;
  margin-inline: auto;
  padding: var(--s-l) var(--s-m) calc(var(--s-xl) + env(safe-area-inset-bottom));
}

/* ---------- shared bits ---------- */

.eyebrow {
  font: 800 0.75rem/1 var(--f-heading);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--alt-text);
}

.prose > * + * {
  margin-top: 0.9em;
}

.prose p {
  font: var(--t-body);
}

.prose .lead {
  font: var(--t-lead);
}

.prose li {
  position: relative;
  padding-left: 1.4em;
  margin-top: 0.5em;
}

.prose li::before {
  content: '';
  position: absolute;
  left: 0.25em;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--accent);
}

.prose ol {
  counter-reset: n;
}

.prose ol li::before {
  counter-increment: n;
  content: counter(n) '.';
  inset-inline-start: 0;
  top: 0;
  width: auto;
  height: auto;
  background: none;
  color: var(--alt-text);
  font-family: var(--f-heading);
  font-weight: 700;
}

.hebrew {
  font-family: var(--f-hebrew);
  direction: rtl;
  unicode-bidi: isolate;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-s);
  min-height: 48px;
  padding: 0 var(--s-l);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--accent-text);
  color: var(--accent-on);
  font: 700 1.0625rem/1 var(--f-heading);
  box-shadow: var(--shadow);
  transition:
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--accent-text);
  box-shadow: none;
  border: 2px solid currentColor;
}

.btn--wide {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.card {
  padding: var(--s-l);
  border-radius: var(--r-card);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.card--tint {
  background: var(--surface);
  box-shadow: none;
  border: 1px solid var(--border);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--s-l) + env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: 80;
  max-width: min(30rem, calc(100vw - 2 * var(--s-m)));
  padding: var(--s-m) var(--s-l);
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--c-paper);
  font: var(--t-small);
  box-shadow: var(--shadow-lift);
  animation: rise var(--t-med) var(--ease);
}

@keyframes rise {
  from {
    opacity: 0;
    translate: -50% 12px;
  }
}

/* ==========================================================================
   The journey map
   ========================================================================== */

.map {
  position: relative;
  padding: var(--s-l) 0 var(--s-l);
}

.map__head {
  padding-inline: var(--s-m);
  text-align: center;
}

/* The printed chart sets this in bold sans, not the display face — the
   display face is the book's title voice and belongs to the hero. */
.map__title {
  margin-top: var(--s-xs);
  font: 800 clamp(1.6rem, 7vw, 2.1rem) / 1.12 var(--f-heading);
  color: var(--text);
}

.map__subtitle {
  margin-top: var(--s-s);
  font: var(--t-hand);
  color: var(--accent-text);
}

.map__progress {
  margin: var(--s-m) auto 0;
  font: var(--t-small);
  color: var(--text-soft);
}

.map__head > .btn {
  max-width: 26rem;
  margin: var(--s-m) auto 0;
}

.map__canvas {
  position: relative;
  margin-top: var(--s-m);
}

/* The whole trail has to be visible without scrolling. width:100% sets the
   natural size; max-height shrinks it to whatever is left under the header,
   and preserveAspectRatio (the default) keeps it undistorted. */
.map__svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 19rem);
  overflow: visible;
  /* It is a map, not a document — a click should never start a text
     selection or drop a caret into it. */
  user-select: none;
  -webkit-user-select: none;
}

.trail-bed {
  fill: none;
  stroke: var(--border);
  stroke-width: 10;
  stroke-linecap: round;
}

.trail-fill {
  fill: none;
  stroke: url(#trailGrad);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--t-walk) var(--ease);
}

.station {
  cursor: pointer;
}

.station__hit {
  fill: transparent;
}

.station__disc {
  fill: var(--surface-raised);
  stroke: var(--border);
  stroke-width: 3;
  transition:
    fill var(--t-med) var(--ease),
    stroke var(--t-med) var(--ease);
}

.station__num {
  font: 400 22px/1 var(--f-display);
  fill: var(--locked);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  transition: fill var(--t-med) var(--ease);
}

.station__label {
  font: 800 13px/1 var(--f-heading);
  fill: var(--text-soft);
  dominant-baseline: central;
  pointer-events: none;
}

/* The one station you are meant to tap, saying so without words. */
.station__pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  transform-origin: center;
  transform-box: fill-box;
  animation: station-pulse 2.4s var(--ease) infinite;
}

@keyframes station-pulse {
  0% {
    scale: 1;
    opacity: 0.7;
  }
  70%,
  100% {
    scale: 1.9;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .station__pulse {
    animation: none;
    opacity: 0.5;
  }
}

.station[data-status='done'] .station__disc {
  fill: var(--done);
  stroke: var(--c-gold-deep);
}

.station[data-status='done'] .station__num {
  fill: var(--done-on);
}

.station[data-status='done'] .station__label {
  fill: var(--text);
}

.station[data-status='current'] .station__disc {
  fill: var(--accent);
  stroke: var(--accent-text);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 55%, transparent));
}

.station[data-status='current'] .station__num {
  fill: var(--c-white);
}

.station[data-status='current'] .station__label {
  fill: var(--accent-text);
}

.station[data-status='locked'] {
  cursor: default;
}

.station[data-status='locked'] .station__disc {
  fill: var(--surface);
}

.map__endcap {
  font-size: 30px;
  text-anchor: middle;
  dominant-baseline: central;
}

.map__endcap--dim {
  opacity: 0.4;
}

/* ---- the rocket's exhaust ---- */

.launch {
  pointer-events: none;
}

/* Grow away from the nozzle, not from the middle of the flame. */
.flame {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  /* steps() rather than a smooth ease: fire flickers, it does not breathe. */
  animation: flame 260ms steps(2, end) infinite alternate;
}

/* Deep gold, not gold: the filled trail directly behind the rocket is already
   sunshine-to-gold, and a gold flame on it disappears. */
.flame--outer {
  fill: var(--c-gold-deep);
}

.flame--inner {
  fill: var(--c-sunshine);
  animation-duration: 170ms;
}

@keyframes flame {
  from {
    scale: 0.92 0.72;
    opacity: 0.72;
  }
  to {
    scale: 1.12 1.16;
    opacity: 1;
  }
}

.launch__puff {
  fill: color-mix(in srgb, var(--c-teal-light) 65%, transparent);
  opacity: 0;
  animation: launch-puff 1900ms linear infinite;
}

@keyframes launch-puff {
  0% {
    opacity: 0;
    translate: 0 0;
    scale: 0.5;
  }
  18% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    translate: var(--drift-x) var(--drift-y);
    scale: 1.9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flame {
    animation: none;
  }

  .launch__puff {
    animation: none;
  }
}

/* The handwritten lines the book prints beside the rocket and the rainbow. */
.map__endlabel {
  font: 400 19px/1 var(--f-hand);
  fill: var(--alt-text);
  text-anchor: middle;
  dominant-baseline: central;
}

.map__endlabel--lit {
  fill: var(--accent-text);
}

/* A sticky note, the way the printed chart carries its asides. */
.note {
  max-width: 22rem;
  margin: var(--s-l) auto 0;
  padding: var(--s-m) var(--s-l);
  border-radius: var(--r-badge);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  rotate: -1.2deg;
}

.note p {
  font: var(--t-hand);
  color: var(--text);
}

/* The walker sits exactly on top of the current station — the one disc a
   person is most likely to press. Without this it swallows that tap and the
   map feels broken precisely where it matters most.
   No transition here on purpose either: map.js drives the walker frame by
   frame along the path's own curve, and a CSS transition would fight it with
   a straight line between the same two points. */
.walker {
  pointer-events: none;
}

.walker__body {
  font-size: 26px;
  text-anchor: middle;
  dominant-baseline: central;
}

.walker__halo {
  fill: color-mix(in srgb, var(--c-sunshine) 55%, transparent);
  animation: breathe 3.2s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    r: 20;
    opacity: 0.45;
  }
  50% {
    r: 26;
    opacity: 0.18;
  }
}

@media (prefers-reduced-motion: reduce) {
  .walker__halo {
    animation: none;
  }
}

/* ---- the finale: confetti out of the rainbow ---- */

.burst {
  pointer-events: none;
}

.burst__bit {
  animation-name: confetti;
  animation-timing-function: cubic-bezier(0.15, 0.7, 0.35, 1);
  animation-fill-mode: forwards;
  opacity: 0;
}

@keyframes confetti {
  0% {
    opacity: 0;
    translate: 0 0;
    rotate: 0deg;
  }
  8% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    translate: var(--dx) var(--dy);
    rotate: var(--spin);
  }
}

.burst__glitter {
  animation: glitter 1800ms var(--ease) forwards;
  opacity: 0;
}

@keyframes glitter {
  0% {
    opacity: 0;
    translate: 0 0;
    scale: 0.4;
  }
  25% {
    opacity: 1;
    scale: 1.1;
  }
  100% {
    opacity: 0;
    translate: 0 -90px;
    scale: 0.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  .burst {
    display: none;
  }
}

.sparkle {
  pointer-events: none;
  animation: sparkle 900ms var(--ease) forwards;
}

@keyframes sparkle {
  from {
    opacity: 1;
    scale: 0.3;
  }
  to {
    opacity: 0;
    scale: 1.6;
  }
}

/* station peek sheet */

.peek {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: end;
  border: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  background: transparent;
}

.peek::backdrop {
  background: rgb(21 63 73 / 38%);
  backdrop-filter: blur(3px);
}

.peek__panel {
  margin-inline: auto;
  width: min(34rem, 100%);
  padding: var(--s-l) var(--s-l) calc(var(--s-l) + env(safe-area-inset-bottom));
  border-radius: var(--r-card) var(--r-card) 0 0;
  background: var(--bg);
  animation: sheet var(--t-med) var(--ease);
}

@keyframes sheet {
  from {
    translate: 0 30px;
    opacity: 0;
  }
}

.peek__kicker {
  font: var(--t-hand);
  color: var(--alt-text);
}

.peek__title {
  margin-top: var(--s-xs);
  font: 800 1.5rem/1.15 var(--f-heading);
}

.peek__points {
  margin-top: var(--s-m);
}

.peek__points li {
  padding: var(--s-s) 0;
  border-bottom: 1px solid var(--border);
  font: var(--t-small);
}

.peek__points li:last-child {
  border-bottom: 0;
}

.peek__actions {
  display: flex;
  gap: var(--s-s);
  margin-top: var(--s-l);
}

/* ==========================================================================
   Day screen
   ========================================================================== */

.day__head {
  text-align: center;
}

.day__num {
  font: 400 clamp(2.6rem, 14vw, 4rem) / 1 var(--f-display);
  color: var(--accent-text);
}

.day__title {
  margin-top: var(--s-xs);
  font: 800 clamp(1.4rem, 6vw, 1.9rem) / 1.15 var(--f-heading);
}

.day__meta {
  margin-top: var(--s-s);
  font: var(--t-small);
  color: var(--text-soft);
}

.day__points {
  display: grid;
  gap: var(--s-s);
  margin-top: var(--s-l);
  padding: var(--s-m);
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--border);
}

.day__points li {
  font: var(--t-small);
}

.day__section {
  margin-top: var(--s-xl);
}

.day__section > h2 {
  font: 800 1.125rem/1.2 var(--f-heading);
  color: var(--alt-text);
  margin-bottom: var(--s-m);
}

.tasks {
  display: grid;
  gap: var(--s-s);
}

.task {
  display: flex;
  align-items: flex-start;
  gap: var(--s-m);
  width: 100%;
  padding: var(--s-m);
  border: 1px solid var(--border);
  border-radius: var(--r-badge);
  background: var(--surface-raised);
  text-align: left;
  transition:
    border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}

.task:hover {
  border-color: var(--accent);
}

.task[aria-pressed='true'] {
  background: color-mix(in srgb, var(--done) 14%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--done) 60%, transparent);
}

.task__box {
  flex: 0 0 26px;
  height: 26px;
  margin-top: 2px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 8px;
  color: transparent;
  font-size: 15px;
  transition:
    background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.task[aria-pressed='true'] .task__box {
  background: var(--c-gold-deep);
  border-color: var(--c-gold-deep);
  color: var(--text); /* white on gold measures 2.68 — ink measures 4.26 */
}

.task__label {
  font: 700 1.0625rem/1.3 var(--f-heading);
}

.task[aria-pressed='true'] .task__label {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--text) 40%, transparent);
}

.task__hint {
  display: block;
  margin-top: 2px;
  font: var(--t-small);
  color: var(--text-soft);
  text-decoration: none;
}

.task__optional {
  display: inline-block;
  margin-left: var(--s-s);
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--alt-text);
  font: 800 0.6875rem/1.6 var(--f-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.video {
  margin-top: var(--s-m);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--text);
  aspect-ratio: 16 / 9;
}

.video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Solid, not a gradient: the note sat in the transparent half and the text
   underneath showed straight through it. The fade lives above the bar now. */
.finish {
  position: sticky;
  bottom: 0;
  margin-top: var(--s-xl);
  padding: var(--s-m) 0 calc(var(--s-m) + env(safe-area-inset-bottom));
  background: var(--bg);
}

.finish::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: var(--s-l);
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.finish__note {
  margin-bottom: var(--s-s);
  font: var(--t-small);
  color: var(--text-soft);
  text-align: center;
}

/* ==========================================================================
   Onboarding / finale
   ========================================================================== */

.hero {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: var(--s-l);
  padding: var(--s-xl) var(--s-l) calc(var(--s-xl) + env(safe-area-inset-bottom));
  text-align: center;
  background:
    radial-gradient(60% 40% at 12% 8%, color-mix(in srgb, var(--c-sunshine) 40%, transparent), transparent 70%),
    radial-gradient(55% 40% at 88% 16%, color-mix(in srgb, var(--c-pink-soft) 45%, transparent), transparent 70%),
    radial-gradient(70% 45% at 50% 100%, color-mix(in srgb, var(--c-teal-light) 40%, transparent), transparent 70%),
    var(--bg);
}

.hero__title {
  font: 400 clamp(2rem, 9vw, 3rem) / 1.02 var(--f-display);
}

.hero__sub {
  font: var(--t-hand);
  font-size: 1.5rem;
  color: var(--accent-text);
}

.hero__body {
  max-width: 30rem;
  margin-inline: auto;
  font: var(--t-lead);
}

.pillars {
  display: grid;
  gap: var(--s-s);
  max-width: 26rem;
  margin-inline: auto;
  text-align: left;
}

.pillars li {
  padding: var(--s-m);
  border-radius: var(--r-badge);
  background: color-mix(in srgb, var(--surface-raised) 82%, transparent);
  font: var(--t-small);
}

/* ==========================================================================
   Work-area widgets
   ========================================================================== */

.widget {
  margin: calc(var(--s-s) * -1) 0 var(--s-s);
  padding: var(--s-m) var(--s-m) var(--s-m) calc(var(--s-m) + 26px + var(--s-m));
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--r-badge) var(--r-badge);
  background: var(--surface);
}

.widget__label {
  font: 800 0.8125rem/1 var(--f-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--alt-text);
  margin-bottom: var(--s-s);
}

.widget__text {
  display: block;
  width: 100%;
  padding: var(--s-m);
  border: 1px solid var(--border);
  border-radius: var(--r-badge);
  background: var(--surface-raised);
  color: var(--text);
  font: var(--t-hand);
  resize: vertical;
}

.widget__text::placeholder {
  color: var(--text-soft);
  opacity: 0.75;
}

.choices {
  display: grid;
  gap: var(--s-s);
}

.choice {
  display: grid;
  gap: 2px;
  padding: var(--s-m);
  border: 2px solid var(--border);
  border-radius: var(--r-badge);
  background: var(--surface-raised);
  text-align: left;
  transition:
    border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}

.choice[aria-checked='true'] {
  border-color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-raised));
}

.choice__title {
  font: 700 1rem/1.2 var(--f-heading);
}

.choice__note {
  font: var(--t-small);
  color: var(--text-soft);
}

.prose .hand {
  font: var(--t-hand);
  color: var(--alt-text);
}

/* ==========================================================================
   Jump-links: Nili's own words, straight to the step she is asking for
   ========================================================================== */

.jump {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  /* An inline button must break across lines like the sentence around it. */
  text-align: inherit;
  transition: text-decoration-color var(--t-fast) var(--ease);
}

.jump:hover {
  text-decoration-color: currentColor;
}

.jump::after {
  content: ' ↓';
  font-family: var(--f-heading);
  font-size: 0.85em;
  text-decoration: none;
  opacity: 0.7;
}

/* Landing light: says "this one" without moving anything. */
.is-flashing,
.is-flashing > .task {
  animation: task-flash 1400ms var(--ease);
}

@keyframes task-flash {
  0%,
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
  15%,
  55% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-flashing,
  .is-flashing > .task {
    animation: none;
    outline: 3px solid var(--accent-text);
    outline-offset: 2px;
  }
}

/* ==========================================================================
   Tikkun cards — the lists (days 3 and 5)
   ========================================================================== */

.cardadd {
  display: flex;
  gap: var(--s-s);
}

/* Anything the person writes themselves is set in the hand — it is their
   notebook, not a form. Caveat runs small, so it gets a size bump.
   The date field is deliberately left out: it is a native control, and the
   browser's own picker will not follow the face anyway. */
.cardadd__input,
.tcard__input,
.act__when {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 var(--s-m);
  border: 1px solid var(--border);
  border-radius: var(--r-badge);
  background: var(--surface-raised);
  color: var(--text);
  font: var(--t-body);
}

.cardadd__input,
.tcard__input {
  font: var(--t-hand);
  font-size: 1.375rem;
}

.cardadd__input::placeholder,
.tcard__input::placeholder {
  color: var(--text-soft);
  opacity: 0.8;
}

.cardadd__btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 var(--s-m);
  border: 0;
  border-radius: var(--r-badge);
  background: var(--accent-text);
  color: var(--accent-on);
  font: 700 1rem/1 var(--f-heading);
}

.cardlist {
  display: grid;
  gap: var(--s-s);
  margin-top: var(--s-m);
}

.cardlist__empty,
.cardlist__count {
  margin-top: var(--s-s);
  font: var(--t-small);
  color: var(--text-soft);
}

.tcard {
  border: 1px solid var(--border);
  border-radius: var(--r-badge);
  background: var(--surface-raised);
  overflow: hidden;
}

.tcard[data-done='true'] {
  background: color-mix(in srgb, var(--done) 14%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--done) 60%, transparent);
}

.tcard__row {
  display: flex;
  align-items: stretch;
  gap: var(--s-s);
  padding: var(--s-s);
}

.tcard__tick {
  flex: 0 0 40px;
  align-self: center;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: transparent;
  color: transparent;
  font-size: 17px;
  transition:
    background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.tcard__tick[aria-pressed='true'] {
  background: var(--c-gold-deep);
  border-color: var(--c-gold-deep);
  color: var(--text); /* ink on gold, not white — see tokens.css */
}

.tcard__open {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: var(--s-s) 0;
  border: 0;
  background: transparent;
  text-align: left;
}

/* A name the person wrote stays in their hand when it is read back. */
.tcard__name {
  font: var(--t-hand);
  font-size: 1.375rem;
}

.tcard[data-done='true'] .tcard__name {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--text) 40%, transparent);
}

.tcard__sub {
  font: var(--t-small);
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tcard__sub--faint {
  font-style: italic;
  opacity: 0.85;
}

.tcard__del {
  flex: 0 0 40px;
  align-self: center;
  height: 40px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-soft);
  font-size: 22px;
  line-height: 1;
}

.tcard__del:hover {
  background: var(--surface);
  color: var(--accent-text);
}

.tcard__details {
  display: grid;
  gap: var(--s-s);
  padding: 0 var(--s-s) var(--s-m);
}

.tcard__contact {
  display: grid;
  gap: var(--s-xs);
}

.tcard__hint {
  font: var(--t-small);
  font-size: 0.875rem;
  color: var(--text-soft);
}

.widget__text--short {
  min-height: 3.2em;
}

/* ==========================================================================
   Tikkun cards — the action board (day 4)
   ========================================================================== */

.acts {
  display: grid;
  gap: var(--s-m);
  margin-top: var(--s-s);
}

.act {
  display: grid;
  gap: var(--s-s);
  padding: var(--s-m);
  border: 1px solid var(--border);
  border-radius: var(--r-badge);
  background: var(--surface-raised);
}

.act[data-done='true'] {
  background: color-mix(in srgb, var(--done) 14%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--done) 60%, transparent);
}

.act__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-s);
}

.act__name {
  font: var(--t-hand);
  font-size: 1.375rem;
}

.act__badge {
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--alt-text);
  font: 800 0.6875rem/1.6 var(--f-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.act__note {
  flex: 1 0 100%;
  font: var(--t-small);
  color: var(--text-soft);
}

.act__tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-s);
}

.act__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--s-m);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--accent-text);
  color: var(--accent-on);
  font: 700 0.9375rem/1 var(--f-heading);
  text-decoration: none;
}

.act__btn--ghost {
  background: transparent;
  color: var(--accent-text);
  border: 2px solid currentColor;
}

/* A date-and-time field needs its full width on a phone, or the browser
   truncates it to "/yyyy". Give it the row and let the button wrap under. */
.act__when {
  flex: 1 0 100%;
}

.act__missing {
  font: var(--t-small);
  color: var(--text-soft);
}

.act__done {
  justify-self: start;
  min-height: 40px;
  padding: 0 var(--s-m);
  border: 2px solid var(--border);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-soft);
  font: 700 0.9375rem/1 var(--f-heading);
}

/* Gold stays the border, not the fill: ink on solid gold-deep measures 4.26,
   which is fine for a tick glyph but short of 4.5 for a 15px bold label. */
.act__done[aria-pressed='true'] {
  border-color: var(--c-gold-deep);
  color: var(--text);
}
