/* Bethany — application shell. Colour comes from tokens.css. */

/* Padding must not add to the 100vh body height, or the page always scrolls. */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2.75rem;
  max-width: 34rem;
  width: 100%;
}
.card--narrow { max-width: 24rem; text-align: center; }

h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.rule {
  width: 3.25rem;
  height: 3px;
  background: var(--accent-primary);
  margin: .6rem 0 .5rem;
}
.card--narrow .rule { margin-left: auto; margin-right: auto; }

.tag { color: var(--muted); font-size: .95rem; margin: 0 0 2rem; }
.card--narrow .tag { margin-bottom: 1.25rem; }

/* Accents fail AA as text on the light canvases — links use the -text variant. */
a { color: var(--accent-primary-text); }

.diag {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .55rem 1.25rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: .8rem;
}
.diag dt { color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.diag dd { margin: 0; color: var(--ink); }
.diag .up   { color: var(--accent-done-text);   font-weight: 700; }
.diag .down { color: var(--danger); font-weight: 700; }

/* --- forms ---------------------------------------------------------------- */

.card--form { max-width: 26rem; }

.field { display: block; margin-bottom: 1.15rem; }
.label {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: .35rem;
}

.input {
  width: 100%;
  padding: .6rem .7rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.input:focus { border-color: var(--accent-primary); }
.input--bad  { border-color: var(--danger); }

.hint { display: block; font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.err  { display: block; font-size: .78rem; color: var(--danger); margin-top: .3rem; }

.alert {
  background: var(--surface-locked);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: .65rem .8rem;
  margin: 0 0 1.25rem;
  font-size: .9rem;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: .7rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.btn:hover { opacity: .92; }
.btn--quiet {
  width: auto;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border-color: var(--border);
}

.alt { font-size: .9rem; color: var(--muted); margin: 1.35rem 0 0; }
.who { font-size: .95rem; margin: 0 0 1.1rem; }

.check {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.15rem;
  font-size: .88rem;
  color: var(--muted);
  cursor: pointer;
}
.check input { accent-color: var(--accent-primary); }

/* --- the day ------------------------------------------------------------- */
/* Single narrow column: journaling wants a reading measure, not a dashboard.
   A continuous rule runs down the left of all three zones — the thread the
   reflection travels along to become tomorrow's goal. */

body.is-day { display: block; align-items: initial; padding: 0; }

.day {
  max-width: 38rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.day-head { margin-bottom: 2.5rem; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin: 0 0 .3rem;
}
.day-date {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
}

.zone {
  position: relative;
  padding: 1.5rem 0 1.75rem 1.75rem;
  border-left: 2px solid var(--border);
}
/* The thread is continuous; only the node marking each zone changes colour. */
.zone::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 1.9rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--canvas);
  border: 2px solid var(--border);
}
.zone--yesterday::before { border-color: var(--accent-done); }
.zone--today::before     { border-color: var(--accent-primary); }
.zone--tomorrow::before  { border-color: var(--accent-improve); }
.zone--tomorrow { border-left-color: transparent; }

.zone-title {
  font-family: var(--font-mono);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 400;
  margin: 0 0 1rem;
}
.zone-empty { color: var(--muted); font-size: .95rem; margin: 0; }

.goals { list-style: none; margin: 0 0 1rem; padding: 0; }
.goal {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  padding: .45rem 0;
  font-size: 1rem;
}
.goal-mark {
  flex: 0 0 auto;
  width: .85rem;
  height: .85rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  transform: translateY(.12rem);
}
.goal--done .goal-mark { background: var(--accent-done); border-color: var(--accent-done); }
.goal--done .goal-text { color: var(--muted); text-decoration: line-through; }
.goal--void .goal-text { color: var(--muted); text-decoration: line-through; }
.goal-text { flex: 1 1 auto; }
.goal-age {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--accent-improve-text);
  white-space: nowrap;
}

.reflect { display: block; margin-bottom: 1.25rem; }
.reflect-label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .4rem;
}
.reflect-label--improve { color: var(--accent-improve-text); }
.reflect-field {
  width: 100%;
  padding: .7rem .8rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
}
.reflect-field:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

/* Sits on the thread, pointing down into Tomorrow. */
.thread-action {
  position: relative;
  margin-left: -1.75rem;
  padding: .5rem .85rem;
  font-family: var(--font-body);
  font-size: .88rem;
  color: var(--accent-improve-text);
  background: var(--surface);
  border: 1px dashed var(--accent-improve);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.thread-action:hover { background: var(--surface-locked); }

.add-goal { display: flex; gap: .5rem; margin-top: .5rem; }
.add-goal-field {
  flex: 1 1 auto;
  padding: .6rem .7rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.add-goal-field:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.add-goal-btn {
  flex: 0 0 auto;
  padding: .6rem 1rem;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--on-accent);
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.day-foot { margin-top: 2.5rem; padding-left: 1.75rem; }
.btn--seal { width: auto; padding: .65rem 1.5rem; }
.seal-note { font-size: .8rem; color: var(--muted); margin: .6rem 0 0; }

@media (max-width: 30rem) {
  .day { padding: 2rem 1rem 4rem; }
  .day-date { font-size: 1.7rem; }
  .zone-title {
    position: sticky;
    top: 0;
    background: var(--canvas);
    padding: .5rem 0;
    z-index: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- day: state and actions ---------------------------------------------- */

.notice {
  background: var(--surface-locked);
  border-left: 3px solid var(--accent-done);
  border-radius: var(--radius-sm);
  padding: .6rem .8rem;
  margin: 0 0 1.5rem;
  font-size: .9rem;
}
.err--block { margin: .5rem 0 .75rem; }

/* Resolution controls. Three neutral verbs — none of them is the "right"
   answer, so none of them is styled as the primary action. */
.goal-acts { display: flex; gap: .3rem; flex: 0 0 auto; }
.goal-acts form { display: inline; margin: 0; }
.act {
  padding: .2rem .5rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
}
.act:hover           { color: var(--ink); }
.act--done:hover     { border-color: var(--accent-done);    color: var(--accent-done-text); }
.act--missed:hover   { border-color: var(--accent-improve); color: var(--accent-improve-text); }
.act--released:hover { border-color: var(--border);         color: var(--muted); }

/* A sealed day reads as a record, not a form. */
.sealed {
  background: var(--surface-locked);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
}
.sealed-mark {
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 0 0 .9rem;
}
.sealed-label {
  font-size: .8rem;
  color: var(--muted);
  margin: 0 0 .2rem;
}
.sealed-text { margin: 0 0 1rem; line-height: 1.6; }
.sealed-text:last-child { margin-bottom: 0; }

/* The add-goal form now carries a reframing label above the input. */
.add-goal { display: block; margin-top: .5rem; }
.add-goal-row { display: flex; gap: .5rem; }
.add-goal-frame {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-improve-text);
  margin-bottom: .4rem;
}

@media (max-width: 30rem) {
  .goal { flex-wrap: wrap; }
  .goal-acts { width: 100%; padding-left: 1.5rem; margin-top: .3rem; }
}

/* --- returning after a gap ----------------------------------------------- */
/* A door held open, not a bill. Quiet surface, no warning colour, and the
   number that leads is days elapsed — a fact, not a judgement. */

.gap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-done);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 0 0 2rem;
}
.gap-lead {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 .4rem;
}
.gap-body { font-size: .92rem; margin: 0 0 .3rem; }
.gap-body:last-child { margin-bottom: 0; }
.gap-body--muted { color: var(--muted); }

/* --- miss note ------------------------------------------------------------ */
/* "Didn't" is the only resolution with a follow-up worth asking, so it is the
   only one that expands. Native <details> — no JS. */

.miss { display: inline-block; position: relative; }
.miss > summary {
  list-style: none;
  display: inline-block;
}
.miss > summary::-webkit-details-marker { display: none; }
.miss[open] > summary { border-color: var(--accent-improve); color: var(--accent-improve-text); }

.miss-form {
  position: absolute;
  right: 0;
  z-index: 5;
  width: 17rem;
  margin-top: .4rem;
  padding: .85rem;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--accent-improve);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.miss-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .3rem;
}
.miss-note, .miss-retry {
  width: 100%;
  padding: .45rem .5rem;
  margin-bottom: .7rem;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.miss-save {
  width: 100%;
  padding: .45rem;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--on-accent);
  background: var(--accent-improve);
  border: 1px solid var(--accent-improve);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.goal-note {
  flex: 1 0 100%;
  padding-left: 1.5rem;
  font-size: .82rem;
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 30rem) {
  .miss-form { position: static; width: 100%; }
}

/* --- history -------------------------------------------------------------- */

.day-nav { margin: .5rem 0 0; font-size: .85rem; }
.day-nav a { color: var(--accent-primary-text); }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  padding: 1.1rem 0 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat-n { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.stat-l {
  font-family: var(--font-mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.ledger { list-style: none; margin: 0; padding: 0; }
.led {
  padding: 0 0 1.75rem 1.5rem;
  border-left: 2px solid var(--border);
  position: relative;
}
.led::before {
  content: "";
  position: absolute;
  left: -5px;
  top: .45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.led-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .7rem;
}
.led-date {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}
.led-tally {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
}
.led-label {
  font-family: var(--font-mono);
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: .8rem 0 .2rem;
}
.led-label--improve { color: var(--accent-improve-text); }
.led-text { margin: 0; font-size: .95rem; line-height: 1.6; }

.led-goals { list-style: none; margin: 1rem 0 0; padding: 0; }
.led-goal {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem;
  padding: .3rem 0;
  font-size: .92rem;
}
.led-goal-text { flex: 1 1 auto; }
.led-goal--done .led-goal-text     { color: var(--muted); text-decoration: line-through; }
.led-goal--released .led-goal-text { color: var(--muted); }
.led-goal-state {
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .1rem .35rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
}
.led-goal--done .led-goal-state   { border-color: var(--accent-done);    color: var(--accent-done-text); }
.led-goal--missed .led-goal-state { border-color: var(--accent-improve); color: var(--accent-improve-text); }
.led-goal-from {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--accent-improve-text);
}
.led-goal-note {
  flex: 1 0 100%;
  font-size: .82rem;
  font-style: italic;
  color: var(--muted);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}
.pager-link { color: var(--accent-primary-text); font-size: .9rem; }
.pager-at { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); }

/* --- verification banner --------------------------------------------------- */
/* Persistent but quiet. It is a reminder, not an error — the account works
   perfectly well until the grace window closes. */

.verify-banner {
  background: var(--surface-locked);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .85rem;
  margin: 0 0 1.5rem;
  font-size: .88rem;
  color: var(--muted);
}
.verify-banner a { color: var(--accent-primary-text); }

/* --- settings ------------------------------------------------------------- */

.set {
  padding: 1.25rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}
.set:last-of-type { border-bottom: none; }
.set-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0 0 .3rem;
}
.set-note { font-size: .88rem; color: var(--muted); margin: 0 0 1rem; }
.set-note--warn { color: var(--accent-improve-text); margin: .6rem 0 0; }
select.input { appearance: none; background-image: none; }

/* --- help / prose --------------------------------------------------------- */
/* Narrower measure than the day view: this is the only screen anyone reads
   continuously rather than scans. */

.day--prose { max-width: 34rem; }

.prose { margin-bottom: 2.25rem; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 .6rem;
}
.prose p { margin: 0 0 .9rem; line-height: 1.65; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--accent-primary-text); }
.prose em { color: var(--muted); font-style: italic; }

.lede {
  font-size: 1.05rem;
  color: var(--muted);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.deflist { margin: 0 0 .9rem; }
.deflist dt {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-primary-text);
  margin-top: .9rem;
}
.deflist dd { margin: .25rem 0 0; line-height: 1.6; }

.firstrun {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}
.firstrun .zone-empty { margin-bottom: .6rem; }
.firstrun-note { font-size: .85rem; color: var(--muted); margin: 0; }
.firstrun-note a { color: var(--accent-primary-text); }

/* --- site footer ---------------------------------------------------------- */
/* Present on every page. The card layouts centre their content with flex, so
   body becomes a column and the footer sits below rather than beside. */

body { flex-direction: column; }
body.is-day .sitefoot { max-width: 38rem; margin: 0 auto; }

.sitefoot {
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
}
.sitefoot-links { margin: 0 0 .4rem; }
.sitefoot-links a { color: var(--muted); }
.sitefoot-links a:hover { color: var(--ink); }
.sitefoot-mark { margin: 0; }

.prose-meta {
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-top: -.4rem;
}

.bullets { margin: 0 0 .9rem; padding-left: 1.2rem; }
.bullets li { margin-bottom: .45rem; line-height: 1.6; }

/* --- staged onboarding ----------------------------------------------------- */
/* Each piece appears when the thing it describes is on screen, and is tied to
   a state transition rather than a date — so none of it can go stale. */

.milestone {
  background: var(--surface);
  border: 1px solid var(--accent-done);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  margin: 0 0 2rem;
}
.milestone-lead {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 .45rem;
}
.milestone-body { font-size: .92rem; line-height: 1.6; margin: 0; color: var(--muted); }

.payoff {
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent-improve-text);
  margin: 0 0 .7rem;
}

.add-goal-hint {
  font-size: .82rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 .55rem;
}
.add-goal-hint em { font-style: italic; }

/* --- destructive ---------------------------------------------------------- */
/* Behind a disclosure so it cannot be hit by a stray tap, and visually set
   apart so it never reads as part of the ordinary settings above it. */

.danger { border-top: 1px solid var(--danger); margin-top: 2rem; }
.danger .set-title { color: var(--danger); }
.danger-open > summary { display: inline-block; cursor: pointer; list-style: none; }
.danger-open > summary::-webkit-details-marker { display: none; }
.danger-form {
  margin-top: 1.1rem;
  padding: 1.1rem;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
}
.btn--danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

/* --- fixes from the first real screenshots -------------------------------- */

/* The hidden attribute must beat any display we set on the same element.
   Without this, .add-goal-frame's display:block made "So tomorrow you'll —"
   visible before anything had been prefilled. */
[hidden] { display: none !important; }

/* Goal rows wrap at every width, not only on mobile. On desktop the miss note
   (flex-basis 100%) was trying to sit inline and crushed the goal text to one
   word per line. */
.goal { flex-wrap: wrap; }
.goal-text { min-width: 12rem; }

/* A missed goal was visually identical to a pending one — same empty box —
   so the only signal it had been resolved was the note underneath. */
.goal--missed .goal-mark {
  border-color: var(--accent-improve);
  background: linear-gradient(
    to bottom,
    transparent calc(50% - 1px),
    var(--accent-improve) calc(50% - 1px),
    var(--accent-improve) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}
.goal--missed .goal-text { color: var(--muted); }

/* A released goal reads as set down, not struck out. */
.goal--released .goal-mark { border-style: dashed; }
.goal--released .goal-text { color: var(--muted); }

/* --- landing -------------------------------------------------------------- */
/* Wider than the app itself: this is the only page with images to place. */

.lp { max-width: 62rem; margin: 0 auto; padding: 4rem 1.5rem 2rem; }

.lp-hero { max-width: 34rem; margin: 0 auto 5rem; text-align: center; }
.lp-mark {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--muted);
  margin: 0 0 1rem;
}
.lp-head {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}
.lp-sub { font-size: 1.08rem; line-height: 1.6; color: var(--muted); margin: 0 0 2rem; }

.lp-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.lp-cta form { margin: 0; }
.lp-btn {
  width: auto;
  padding: .75rem 1.6rem;
  text-decoration: none;
  display: inline-block;
}
.lp-link { font-size: .95rem; color: var(--accent-primary-text); }
.lp-note { font-size: .82rem; color: var(--muted); margin: 1rem 0 0; }

.lp-sec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 5rem;
}
.lp-sec--flip .lp-copy { order: 2; }
.lp-sec--pair { grid-template-columns: 1fr 1.15fr; }

.lp-copy h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 .9rem;
}
.lp-copy p { line-height: 1.65; margin: 0 0 .9rem; }
.lp-copy p:last-child { margin-bottom: 0; }
.lp-copy em { font-style: italic; color: var(--muted); }

.lp-fig { margin: 0; }
.lp-fig img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lp-pair { display: flex; align-items: flex-end; gap: 1.25rem; }
.lp-fig--sm { flex: 1 1 60%; }
.lp-fig--phone { flex: 0 0 34%; }
.lp-fig--phone img { border-radius: 1.1rem; }

.lp-close {
  max-width: 32rem;
  margin: 0 auto;
  padding: 3.5rem 0 1rem;
  text-align: center;
  border-top: 1px solid var(--border);
}
.lp-close h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  margin: 0 0 .7rem;
}
.lp-close p { color: var(--muted); margin: 0 0 1.75rem; }

@media (max-width: 46rem) {
  .lp { padding: 2.5rem 1.25rem 1rem; }
  .lp-hero { margin-bottom: 3.5rem; }
  .lp-sec, .lp-sec--pair { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 3.5rem; }
  .lp-sec--flip .lp-copy { order: 0; }
  .lp-pair { flex-direction: column; align-items: stretch; }
  .lp-fig--phone { max-width: 15rem; margin: 0 auto; }
}

/* --- accessibility pass ---------------------------------------------------- */

/* One visible focus ring on every interactive element. The browser default is
   nearly invisible on the cream canvas, and only the textareas had an explicit
   one — so keyboard users lost their place everywhere else. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
details > summary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* The disclosure marker was stripped for looks, leaving no affordance that
   "Didn't" expands. A caret restores it without reinstating the default
   triangle. */
.miss > summary::after {
  content: "";
  display: inline-block;
  width: .32rem;
  height: .32rem;
  margin-left: .35rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}
.miss[open] > summary::after { transform: translateY(1px) rotate(-135deg); }

/* Status as text, so it does not depend on distinguishing sage from coral. */
.goal-state {
  font-family: var(--font-mono);
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .08rem .3rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  white-space: nowrap;
}
.goal-state--done     { border-color: var(--accent-done);    color: var(--accent-done-text); }
.goal-state--missed   { border-color: var(--accent-improve); color: var(--accent-improve-text); }
.goal-state--released { border-style: dashed; }

/* Never remove an outline without replacing it. */
:focus:not(:focus-visible) { outline: none; }

/* --- printable export ------------------------------------------------------ */

.pr { max-width: 44rem; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.pr-head { margin-bottom: 2.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.pr-title { font-family: var(--font-display); font-size: 2rem; font-weight: 500; margin: 0; }
.pr-sub { color: var(--muted); margin: .2rem 0 .5rem; }
.pr-stats { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); margin: 0; }

.pr-day { margin-bottom: 2rem; break-inside: avoid; page-break-inside: avoid; }
.pr-date { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; margin: 0 0 .6rem; }
.pr-open { font-family: var(--font-mono); font-size: .62rem; text-transform: uppercase;
           letter-spacing: .07em; color: var(--muted); margin-left: .5rem; }
.pr-label { font-family: var(--font-mono); font-size: .62rem; text-transform: uppercase;
            letter-spacing: .08em; color: var(--muted); margin: .7rem 0 .15rem; }
.pr-text { margin: 0; line-height: 1.6; }
.pr-goals { list-style: none; margin: .8rem 0 0; padding: 0; }
.pr-goals li { margin-bottom: .3rem; line-height: 1.5; }
.pr-status { font-family: var(--font-mono); font-size: .68rem; color: var(--muted); }
.pr-from { font-family: var(--font-mono); font-size: .62rem; color: var(--accent-improve-text); }
.pr-note { display: block; font-size: .85rem; font-style: italic; color: var(--muted); padding-left: 1rem; }
.pr-foot { margin-top: 2rem; }

@media print {
  /* Paper does not need the app around it. */
  .sitefoot, .no-print { display: none !important; }
  body { background: #fff !important; }
  .pr { max-width: none; padding: 0; }
  .pr-day { margin-bottom: 1.4rem; }
  a { text-decoration: none; color: inherit; }
  @page { margin: 18mm; }
}
