/* Thin dogfood UI (PLAN.md M3a). Throwaway: M6 replaces it. */
:root {
  --bg: #fbf9f4;
  --surface: #ffffff;
  --text: #1f1d1a;
  --muted: #6b665e;
  --line: #e4dfd6;
  --accent: #1d4e9e;
  --accent-text: #ffffff;
  --tint: #e8effa;
  --done: #1f7a46;
  --warn-bg: #fff4d6;
  --warn-text: #5b4300;
  --danger: #a63a2b;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand { font-weight: 700; color: var(--text); text-decoration: none; }
nav { display: flex; gap: 16px; flex-wrap: wrap; }
nav a, nav button { color: var(--accent); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: none; }
nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; }

main { max-width: 640px; margin: 0 auto; padding: 20px 16px 64px; }

h1 { font-size: 1.6rem; line-height: 1.2; margin: 8px 0 12px; }
h2 { font-size: 1.15rem; margin: 28px 0 8px; }
h3 { font-size: 1.05rem; margin: 0 0 4px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.card, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 16px;
}

.card.primary { border-color: var(--accent); border-width: 2px; }
.card .say { border-left: 3px solid var(--accent); padding-left: 12px; margin: 12px 0; font-style: italic; }
.card .kind { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; font-weight: 700; color: var(--accent); }
.icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: #e6edf8; color: var(--accent); }
.card.primary .kind .icon { background: var(--accent); color: #ffd23f; }
.panel.phase { border-left: 4px solid #ffd23f; }
.panel.checkin { border-left: 4px solid #ffd23f; }
.panel.repair { border-left: 4px solid #ffd23f; }
.today-head { margin: 8px 0 12px; }
.card.upcoming { border-style: dashed; }

[hidden] { display: none !important; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.stat { flex: 1 1 140px; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.stat b { display: block; font-size: 1.4rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat .stat-icon { flex: none; }
.stat.tap { cursor: pointer; }
.stat.tap:hover, .stat.tap[aria-expanded="true"] { border-color: var(--her); }
.stat.tap:focus-visible { outline: 2px solid var(--her); outline-offset: 2px; }
.icon.ph-stage { background: var(--her); color: #ffffff; }
.icon.st-day { background: #1d4e9e; color: #ffffff; }
.icon.st-next { background: #c27ab5; color: #ffffff; }
.problems li, .customer { padding: 10px 12px; margin: 6px 0; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); list-style: none; }
.problem.sev-high { border-left: 4px solid #c0392b; }
.problem.sev-medium { border-left: 4px solid #b7791f; }
.problem.sev-info { border-left: 4px solid #6b7280; }
.stat.bad { border-color: #c0392b; }
.customer.locked { border-left: 4px solid #c0392b; }
.review-progress { font-weight: 700; margin: 8px 0; }
.review-section { margin: 12px 0; }
.review-section > summary { cursor: pointer; font-weight: 800; padding: 10px 0; }
.review-item textarea, .review-result { margin-top: 10px; }
.review-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.review-head h3 { margin: 0; }
.review-result > summary { cursor: pointer; }
.chip.v-keep[aria-pressed="true"] { background: #2e7d4f; border-color: #2e7d4f; }
.chip.v-rework[aria-pressed="true"] { background: #b7791f; border-color: #b7791f; }
.chip.v-cut[aria-pressed="true"] { background: #c0392b; border-color: #c0392b; }
.chip.v-not_my_expertise[aria-pressed="true"] { background: #6b7280; border-color: #6b7280; }
.tag.dec-cut { background: #fbe4e1; color: #8c2a1e; }
.tag.dec-keep { background: #e1f3e8; color: #1f5c3a; }
.tag.dec-rework { background: #faecd2; color: #7a4d0d; }
.col { display: grid; gap: 10px; margin: 12px 0; }
.win-form { display: grid; gap: 12px; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.win-q { margin: 0; font-weight: 600; }
.wins-list li { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wins-list .btn { padding: 2px 8px; font-size: .75rem; font-weight: 500; border-radius: 6px; flex: none; }
.win-rows li { margin: 0 0 8px; }
.win-actions { margin: 8px 0 0; }
.pill.choice { padding: 6px 12px; gap: 10px; margin: 0; }
.pill.choice .icon.tile { width: 28px; height: 28px; border-radius: 8px; }
.her-message-text { font-size: 1.1rem; font-weight: 700; margin: 4px 0 10px; }
.win-prompt { margin: 8px 0 0; font-size: .9rem; }
.like { display: block; margin: 0 0 12px; }
.like input { display: block; width: 100%; margin-top: 4px; }
.likes-line { background: var(--her-soft); color: var(--her); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.likes-line .inline-icon { margin-right: 4px; }
.wins-head { font-weight: 800; margin: 12px 0 2px; }
.wins { margin: 0 0 10px; padding-left: 1.2rem; }
.wins li { margin: 3px 0; }

.banner { background: var(--warn-bg); color: var(--warn-text); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px; }

form.stack { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-weight: 600; }
label.inline { display: flex; align-items: center; gap: 10px; font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }

button.btn, a.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  text-decoration: none;
}
button.btn.secondary, a.btn.secondary { background: transparent; color: var(--accent); }
button.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.btn:disabled { opacity: .55; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.msg { margin: 8px 0 0; min-height: 1.4em; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--accent); }

.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0 0 10px; background: var(--surface); }
.choice.selected { border-color: var(--accent); border-width: 2px; padding: 11px; }
.choice ul { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: .9rem; }

.tag { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 99px; background: var(--warn-bg); color: var(--warn-text); }
.tag.ok { background: transparent; border: 1px solid var(--line); color: var(--muted); }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
ul.plain li:first-child { border-top: 0; }

details summary { cursor: pointer; color: var(--accent); font-weight: 600; }
details summary .inline-icon { margin-right: 6px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #ffffff; font-weight: 600; }

.banner.ok { background: var(--her-soft); color: var(--her); }

.connected { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: var(--her); color: #ffffff; font-size: .9rem; font-weight: 600; }
.inline-icon { display: inline-flex; vertical-align: middle; }
.sci-head { display: flex; align-items: center; gap: 8px; }
.sci-head .inline-icon { color: var(--brand, #1d4e9e); }
.chip { display: inline-flex; align-items: center; gap: 6px; }

/* Rating buttons: always one line on a phone. */
.rate-row { display: flex; gap: 6px; margin-top: 12px; flex-wrap: nowrap; }
.rate-row .btn { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 6px; font-size: .88rem; white-space: nowrap; }
.rate-msg { min-height: 1.2em; margin-top: 4px; }
.rate-row .btn[aria-pressed="true"] { background: var(--accent); color: #ffffff; border-color: var(--accent); }

/* Her color: plum. Marks things that came from her. "Confirmed" uses the connection blue. */
:root { --her: #8a3f7d; --her-soft: #f4e8f2; }
.tag.confirmed { display: inline-flex; align-items: center; gap: 4px; background: var(--her); color: #ffffff; border: 0; font-weight: 600; }
.tag.her { background: var(--her-soft); color: var(--her); font-weight: 600; }
.period-now { border-left: 4px solid var(--accent); }
.period-date { font-size: 1.6rem; font-weight: 700; line-height: 1.25; margin: 2px 0 10px; }
.period-history li { padding: 6px 0; font-size: .92rem; }
details.log-new { margin-top: 16px; }
details.log-new .log-form { margin-top: 10px; }

/* Her settings page wears her colour. */
.her-theme { --accent: var(--her); --accent-text: #ffffff; }
.her-theme .icon, .her-theme .choice.selected { background: var(--her-soft); }
.her-theme .banner.ok { background: var(--her-soft); color: var(--her); }

/* Cycle meter on Today. */
.timeline { margin: 0 0 18px; }
.tl-track { padding-top: 14px; }
.tl-bar { position: relative; display: flex; height: 16px; border-radius: 8px; overflow: visible; }
.tl-seg { min-width: 2px; opacity: .55; }
.tl-seg.now { opacity: 1; }
.tl-seg:first-child { border-radius: 8px 0 0 8px; }
.tl-seg:last-of-type { border-radius: 0 8px 8px 0; } /* the marker div follows the buttons, so :last-child never matched */
.tl-marker { position: absolute; top: -8px; bottom: -4px; width: 3px; margin-left: -1.5px; background: #1f1d1a; border-radius: 2px; }
.tl-marker::before { content: ""; position: absolute; top: -6px; left: -4px; border: 5.5px solid transparent; border-top: 7px solid #1f1d1a; border-bottom: 0; }
.tl-menstrual { background: #c27ab5; }
.tl-midcycle { background: #9db9e3; }
.tl-premenstrual { background: #1d4e9e; }
/* The three rules: the same colours as the lights on the zone card (Time out takes the closeness blue). */
.tl-z-time_out { background: #5b8def; }
.tl-z-open_field { background: #2e9e5b; }
.tl-z-unsure { background: #f2b705; }
.tl-z-hold_the_line { background: #d64545; }
.tl-track { position: relative; }
.tl-tick { position: absolute; bottom: -15px; width: 22px; height: 16px; margin-left: -11px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.tl-tick::before { content: ""; position: absolute; left: 6px; top: 2px; border: 5px solid transparent; border-bottom: 7px solid #1f1d1a; border-top: 0; }
.tl-tick[aria-expanded="true"]::before { border-bottom-color: var(--accent); }
.tl-tickdot { display: inline-block; margin-right: 5px; border: 5px solid transparent; border-bottom: 7px solid #1f1d1a; border-top: 0; }
.tl-legend-zones { margin-top: 22px; }
.tl-detail details { margin: 8px 0 0; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0 8px; }
.tl-length { display: inline-flex; align-items: center; margin-left: 4px; }
.tl-key { font: inherit; font-size: .82rem; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; }
.tl-key.now { color: var(--text); font-weight: 700; border-color: var(--text); }
.tl-key[aria-expanded="true"] { background: var(--text); color: #ffffff; }
.tl-seg { border: 0; padding: 0; cursor: pointer; }
.tl-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 4px 0 8px; }
.tl-detail h3 { margin: 0 0 2px; }
.tl-detail[hidden] { display: none; }
.tl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }

/* Page title on the left, the connection pill on the right of the same line. */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin: 8px 0 12px; }
.page-head .connected { margin: 0 0 4px; }

/* Brand header: the icon's blue, the wordmark's gold and coral. Same on every page, for both of them. */
.top { background: #1d4e9e; border-bottom: 3px solid #ffd23f; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #ffffff; }
.brand img { display: block; border-radius: 10px; }
.brand .lockup { display: flex; flex-direction: column; font-family: "Arial Black", Impact, "Helvetica Neue", Arial, sans-serif; font-weight: 900; line-height: 1; text-transform: none; }
.brand .good { color: #ffd23f; font-size: 1.3rem; letter-spacing: .1em; }
.brand .husband { color: #ff6b78; font-size: .74rem; letter-spacing: .3em; margin-top: 3px; }
.top nav a, .top nav button { color: #ffffff; }
.top nav a[aria-current="page"] { color: #ffd23f; text-decoration-color: #ffd23f; }
.top :focus-visible { outline-color: #ffd23f; }
.connected.him { background: #1d4e9e; }

/* Phase icon tiles, matching the cycle meter colours. */
.phase-head { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.phase-head h3 { margin: 0; }
.icon.ph-menstrual { background: #c27ab5; color: #ffffff; }
.icon.ph-midcycle { background: #ffd23f; color: #5b4300; }
.icon.ph-premenstrual { background: #1d4e9e; color: #ffffff; }

/* Profile icon, right-aligned in the header, with Profile / Account / Sign out under it. */
.top nav { flex: 1; align-items: center; }
.profile-menu { position: relative; margin-left: auto; }
.top nav .profile-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.top nav .profile-btn:hover, .top nav .profile-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .3); }
.profile-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); padding: 6px; display: flex; flex-direction: column; }
.profile-pop[hidden] { display: none; }
.profile-who { margin: 0; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; font-size: .9rem; word-break: break-all; }
.profile-who span { color: var(--muted); }
.top nav .profile-pop a, .top nav .profile-pop button { color: var(--text); text-align: left; padding: 10px; border-radius: 8px; width: 100%; }
.top nav .profile-pop a:hover, .top nav .profile-pop button:hover { background: var(--bg); }
.top nav .profile-pop a[aria-current="page"] { color: var(--accent); text-decoration: none; }

/* "Add her ..." links where he has not filled a favorite in yet. */
.like-add { display: inline-flex; align-items: center; gap: 2px; font-size: .9rem; }
.likes-inline { display: block; font-size: .9rem; }

/* "Add to home screen" prompt under the header. */
.install-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--warn-bg); color: var(--warn-text); border-bottom: 1px solid var(--line); }
.beta-note { padding: 8px 16px; font-size: .9rem; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); }
.beta-note b { color: var(--accent); margin-right: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.or-line { text-align: center; margin: 16px 0 8px; }
.google-btn { display: flex; justify-content: center; min-height: 44px; }
.check { color: #1f7a45; font-weight: 600; white-space: nowrap; }
.check.no { color: var(--muted); font-weight: 400; }
.beta-row { display: grid; gap: 4px; }
.beta-row .stage { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .9rem; }
.beta-row .who { font-weight: 600; min-width: 4.5rem; }
.install-banner img { border-radius: 8px; }
.install-banner > span { flex: 1; min-width: 200px; }
.install-banner .pill.wide { width: auto; margin: 0; }
.tag.status-new { background: #faecd2; color: #7a4d0d; font-weight: 700; }
.tag.status-planned { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.review-item.is-new { border-left: 4px solid #d99a2b; }

/* Screen gallery (/dev/screens): phone-shaped frames, many to a window. */
body.gallery main { max-width: none; }
.gallery h2 { margin: 20px 0 8px; }
.gallery-go { margin: 16px 0; }
.phones { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.phone { margin: 0; }
.phone figcaption { display: flex; justify-content: space-between; gap: 12px; margin: 0 4px 6px; font-size: .85rem; }
.phone-bezel { display: inline-block; padding: 12px; background: #1a1a1d; border-radius: 34px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.phone-screen { position: relative; overflow: hidden; border-radius: 22px; background: #ffffff; }
.phone-screen iframe { border: 0; transform-origin: top left; display: block; background: #ffffff; }
.inline[hidden] { display: none; }

/* ---- The zone card, the lights and the voice tiles (voice layer, 2026-10-26) ---- */
.light { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .18); margin-top: 5px; }
.light.green { background: #2e9e5b; }
.light.yellow { background: #f2b705; }
.light.red { background: #d64545; }
.light.read_her { background: #ef8a1d; }
.light.closeness { background: #5b8def; }

.panel.zone { border-left: 6px solid var(--line); padding-top: 14px; }
.panel.zone.zone-green { border-left-color: #2e9e5b; }
.panel.zone.zone-yellow { border-left-color: #f2b705; }
.panel.zone.zone-red { border-left-color: #d64545; }
.zone-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; font-weight: 700; color: var(--muted); }
.zone-headline { font-size: 1.5rem; line-height: 1.15; margin: 0 0 8px; }
.zone-headline { font-weight: 800; }
/* The day's picture with its headline laid over the empty band at the top: light text with a dark outline (or the reverse). */
.panel.zone { overflow: hidden; }
.zone-hero { position: relative; margin: -14px -16px 12px; border-radius: 0; overflow: hidden; }
.zone-art svg { display: block; width: 100%; height: auto; }
.hero-title { position: absolute; top: 0; left: 0; right: 0; margin: 0; padding: 12px 14px 0; text-align: center; font-size: 1.6rem; font-weight: 900; line-height: 1.08; color: var(--fg); -webkit-text-stroke: 6px var(--stroke); paint-order: stroke fill; text-wrap: balance; }
/* The three pills: hard talks, what to do, intimacy. One tap each; nothing is read until he opens one. */
.pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; }
.pill { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; font: inherit; color: var(--text); text-align: center; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pill[aria-expanded="true"], .pill[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.pill:disabled { opacity: .6; }
/* The same tile laid out icon-left, for a tap that stands alone (the science, why this, got it). */
.pill.wide { flex-direction: row; width: 100%; padding: 8px 12px; gap: 12px; text-align: left; margin: 0 0 8px; }
.pills.stack { grid-template-columns: 1fr; }
.pills.stack .pill.wide { margin: 0; }
.pills.rate-row { display: grid; margin-top: 12px; gap: 8px; }
/* The science opens as a card of its own: white, with the day's light colour down the side. */
.pill-panel .panel.section-card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0; }
.pill-panel .panel.section-card.zone-green { border-left-color: #2e9e5b; }
.pill-panel .panel.section-card.zone-yellow { border-left-color: #f2b705; }
.pill-panel .panel.section-card.zone-red { border-left-color: #d64545; }
.section-card p.muted:not(.small) { color: var(--text); }
.levels { margin: 0 0 14px; }
.levels-head { margin: 0 0 8px; }
.level-row { display: grid; grid-template-columns: 7.5rem 1fr 5rem; align-items: center; gap: 8px; margin: 0 0 6px; font-size: .9rem; }
.level-bar { display: flex; gap: 3px; }
.level-bar i { flex: 1 1 0; height: 12px; border-radius: 3px; background: var(--line); }
.level-bar i.on { background: var(--accent); }
.level-word { color: var(--muted); font-size: .8rem; text-align: right; }
/* One frame per thing: a card or phase panel opened inside the main card drops its own border, so there is a single line. */
.pill-panel .card, .pill-panel .panel, .zone-more .panel, .zone-more .card { border: 0; border-radius: 0; padding: 0; margin: 0 0 8px; background: none; }
.pill-panel .card .kind { display: none; }
.pill-panel .card .say { border-left: 0; padding-left: 0; }
.zone-more .panel.phase { border-left: 0; }
.pill-text { display: flex; flex-direction: column; min-width: 0; }
.pill-text b { font-size: .95rem; line-height: 1.2; }
.pill-sub { font-size: .75rem; color: var(--muted); line-height: 1.2; }
.pill-panel { margin: 0 0 12px; padding: 4px 2px 0; }
.pill-panel .zone-row:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
/* One size for every icon on the card: the tea, the lights, the science, housework and get-ready. */
.icon.tile { width: 40px; height: 40px; border-radius: 12px; }
.icon.tile.green { background: #2e9e5b; color: #fff; }
.icon.tile.yellow { background: #f2b705; color: #3a2d00; }
.icon.tile.red { background: #d64545; color: #fff; }
.icon.tile.read_her { background: #ef8a1d; color: #fff; }
.icon.tile.closeness { background: #5b8def; color: #fff; }
.icon.tile.do { background: var(--accent); color: #fff; }
.zone-kicker .icon.tile { background: #c27ab5; color: #fff; }
/* The "more" tap: a changing line and an arrow, nothing else. */
.zone-more { margin-top: 4px; }
.zone-more > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; color: var(--text); padding: 8px 12px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.zone-more > summary > span:not(.icon) { flex: 1 1 auto; }
.zone-more[open] > summary { border-color: var(--accent); background: var(--tint); margin-bottom: 12px; }
.zone-more > summary::-webkit-details-marker { display: none; }
.zone-more > summary::marker { content: ''; }
.zone-more > summary::after { content: ''; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); margin-right: 4px; transition: transform .15s; }
.zone-more[open] > summary::after { transform: rotate(-135deg); }
.zone-more > .zone-kicker { margin: 4px 0 12px; }
/* A small copy of the logo guy beside a note. */
.bust { display: inline-block; flex: none; width: 76px; height: 76px; border-radius: 14px; overflow: hidden; }
.bust svg { display: block; width: 100%; height: 100%; }
.note-with-art { display: flex; gap: 14px; align-items: flex-start; }
.note-words { flex: 1 1 auto; min-width: 0; }
.zone details { margin: 0 0 12px; }
.zone-row { display: flex; gap: 12px; align-items: flex-start; border-top: 1px solid var(--line); padding: 12px 0 0; margin: 12px 0 0; }
.zone-row > div { flex: 1 1 auto; min-width: 0; }
.zone-row p { margin: 4px 0 0; }
.zone-row .btn { margin-top: 8px; }
.ready-icon { flex: none; width: 14px; display: inline-flex; margin-top: 3px; color: var(--accent); }

/* Cards read as short bullets; the rest of a long one is behind "More". */
.bullets { margin: 6px 0 10px; padding-left: 20px; }
.bullets li { margin: 0 0 6px; }
details.more { margin: 0 0 10px; }
/* What is opened under More, The science and Why this? sits on a tint while it is open, so it reads as one opened thing. */
details.more[open], details.science[open], details.why[open] { background: var(--tint); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
details.more > summary, details.science > summary, details.why > summary { display: flex; align-items: center; gap: 6px; }
details.more > summary::-webkit-details-marker, details.science > summary::-webkit-details-marker, details.why > summary::-webkit-details-marker { display: none; }
details.more > summary::marker, details.science > summary::marker, details.why > summary::marker { content: ''; }
/* The small buttons that open a panel fill in while it is open, like the full-width bars. */
.btn.secondary[aria-expanded="true"] { background: var(--accent); color: var(--accent-text); }
.raise-panel { background: var(--tint); border-radius: 8px; padding: 10px 12px; margin: 8px 0 0; }
/* Done: everything under it has been answered. */
.reveal.done { border-color: var(--done); }
.reveal.done[aria-expanded="true"], .reveal-details[open] > .reveal.done { border-color: var(--accent); }
.pill.compact { padding: 4px 10px; gap: 8px; width: auto; margin: 0; }
.pill.compact .icon.tile { width: 28px; height: 28px; border-radius: 8px; }
.level-check { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.level-check .pills { margin: 0 0 10px; }
.reveal .done-tag { margin-left: 6px; font-weight: 700; }
/* Where a banner link has just scrolled to. */
@keyframes flash { from { box-shadow: 0 0 0 4px var(--tint), 0 0 0 6px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
.flash { animation: flash 1.4s ease-out; }
.jump { color: var(--accent); font-weight: 600; text-decoration: underline; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
.coming-up-line { margin: 10px 0 0; }
details.examples { margin: 8px 0 0; }

/* One look for every "tap to reveal" on Today: What can I do right?, Note what you noticed, Why today looks like this. */
.reveal { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; box-sizing: border-box; margin: 0; padding: 8px 12px; font: inherit; font-weight: 700; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; list-style: none; }
.reveal::-webkit-details-marker { display: none; }
.reveal .inline-icon { margin-right: 0; }
.reveal-details { margin: 0 0 16px; }
.reveal-details[open] > .reveal { margin-bottom: 12px; }
/* Open: filled, so it reads as "on" and tapping it again hides what it opened. */
.reveal[aria-expanded="true"], .reveal-details[open] > .reveal { background: var(--tint); color: var(--text); border-color: var(--accent); }
.do-toggle { margin: 0 0 16px; }
.do-box[hidden] { display: none; }

.voices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.voices legend { font-weight: 700; padding: 0; margin: 0 0 6px; }
.voice-tile { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.voice-tile input { position: absolute; opacity: 0; pointer-events: none; }
.voice-tile .inline-icon { grid-row: span 2; color: var(--accent); }
.voice-tile b { display: block; }
.voice-tile:has(input:checked) { border-color: var(--accent); background: #eef3fb; }
.voice-tile:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- Explanations that earn their space once: a note with Okay the first time, then a small (i) ---- */
.info { margin: 0 0 12px; }
.info-lead { display: flex; align-items: center; gap: 8px; min-width: 0; }
.info-lead h3 { margin: 0; }
.info-btn { flex: none; width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--accent); cursor: pointer; }
.info-btn[aria-expanded="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.info-body { margin: 8px 0 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .92rem; color: var(--muted); }
.info-body p { margin: 0 0 8px; }
.saved-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.info-body.info-first { border-left: 4px solid var(--accent); }
.info-body .btn { margin-top: 4px; }

/* A panel heading with one small action on the right (the review's Skip). */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.panel-head h3 { margin: 0; }
.panel-head .btn { padding: 6px 12px; }

/* "Noticed anything today?": the streak beside the heading, and what he noted at this point last cycle. */
.noticed-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag.streak { background: #e1f3e8; color: #1f5c3a; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.last-cycle { display: flex; align-items: center; gap: 6px; margin: 6px 0 4px; font-size: .95rem; color: var(--text); background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.pattern-line { font-weight: 600; margin: 8px 0; }

/* ---- One section pattern below the day's call, and the way a finished step looks ---- */
.section { margin: 0 0 12px; }
.section > .pills.stack { margin: 0; }
.section > .pill-panel { margin: 8px 0 0; padding: 0; }
.pill-panel .panel.section-card h3 { font-size: 1.05rem; margin: 0 0 8px; }
.pill-panel .panel.section-card .win-form { border: 0; padding: 0; background: none; }
.pill { position: relative; }
/* Done: a green ring and a check on the corner. Colour-coded tiles keep their colour. */
.pill.done { border-color: #2e9e5b; }
.pill.done::after, .zone-more.done > summary::before { content: ''; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: #2e9e5b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: 0 0 0 3px var(--surface); }
.pill.just-done { animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.burst i { position: absolute; width: 9px; height: 9px; margin: -4px; border-radius: 50%; background: #ffd23f; animation: spark .8s ease-out forwards; }
.burst i:nth-child(3n) { background: #2e9e5b; }
.burst i:nth-child(3n+1) { background: #5b8def; }
@keyframes spark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pill.just-done { animation: none; } .burst { display: none; } .seg { transition: none; } }
/* The strip that counts the day's steps */
.path { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.path.complete { border-color: #2e9e5b; }
.path-head { display: flex; align-items: center; gap: 12px; }
.path-label { display: flex; flex-direction: column; min-width: 6.5rem; }
.path-segs { flex: 1 1 auto; display: flex; gap: 4px; }
.seg { flex: 1 1 0; height: 10px; border-radius: 5px; background: var(--line); transition: background .3s; }
.seg.on { background: #2e9e5b; }
.path-note { margin: 8px 0 0; }
.reward { position: relative; margin: 0 0 16px; }
.panel.section-card.reward { border-left: 6px solid #2e9e5b; }
.pill-panel .panel.section-card.reward, .reward.panel.section-card { padding: 16px; }
/* Log a win is the one filled action; the wins before it are plain entries */
.pill.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill.primary .pill-sub { color: #dbe6f7; }
.pill.primary .icon.tile { background: #fff; color: var(--accent); }
.entry { display: flex; align-items: center; gap: 10px; width: 100%; font: inherit; color: var(--text); text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 2px; cursor: pointer; }
.entry[aria-expanded="true"] { background: var(--tint); }
.entry-check { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #e1f3e8; color: #1f5c3a; display: inline-flex; align-items: center; justify-content: center; }
.entry-text { display: flex; flex-direction: column; min-width: 0; }
.win-rows li { margin: 0; }
.win-actions { margin: 8px 0 8px; }
.zone-more > summary { position: relative; }
.zone-more.done > summary { border-color: #2e9e5b; }
.zone-more.just-done > summary { animation: pop .5s ease; }
