* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page);
  color: var(--text);
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
/* every line icon gets a sensible size unless its container sets one */
svg[aria-hidden="true"]:not(.ill) { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- the phone frame ---------------------------------------------------- */
/* On a phone the app fills the screen. On a laptop it sits in a phone-sized
 * column so the demo looks like the learner's screens. */
.app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100%;
  background: var(--page);
  position: relative;
  display: flex;
  flex-direction: column;
}
@media (min-width: 600px) {
  body { background: color-mix(in srgb, var(--page) 70%, var(--outline)); }
  .app { min-height: 100vh; box-shadow: 0 0 0 1px var(--outline), 0 20px 60px rgba(0,0,0,.08); }
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 12px 10px 18px;
  background: var(--page);
}
.topbar h1 { font-size: 24px; font-weight: 700; margin: 0; flex: 1; letter-spacing: -0.2px; }
.topbar .sub-title { font-size: 21px; font-weight: 600; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: transparent; border: 0; color: var(--text);
}
.icon-btn:hover { background: var(--card-2); }
.icon-btn svg { width: 24px; height: 24px; }

main#view { flex: 1; padding: 4px 16px 110px; }

.tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card);
  border-top: 1px solid var(--outline);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 12.5px; font-weight: 500;
  background: none; border: 0; padding: 0;
}
.tab .pill { width: 56px; height: 32px; border-radius: 16px; display: grid; place-items: center; }
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--text); font-weight: 700; }
.tab[aria-current="page"] .pill { background: var(--primary-container); color: var(--primary); }

/* ---- type ----------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1fr 124px; gap: 8px; align-items: start; margin: 4px 0 18px; }
.hero h2 { font-size: 32px; line-height: 1.12; margin: 6px 0 8px; font-weight: 700; letter-spacing: -0.4px; }
.hero p { margin: 0; color: var(--muted); font-size: 15.5px; }
.hero .ill { width: 124px; height: 124px; }
.h-section { font-size: 21px; font-weight: 700; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.h-section .right { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.overline { font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* ---- cards ---------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card.tinted { background: var(--primary-container); border-color: color-mix(in srgb, var(--primary) 12%, transparent); }
.card.tone-plum { background: var(--plum-bg); border-color: transparent; }
.card.flat { box-shadow: none; }
.card h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.card-row { display: flex; align-items: center; gap: 14px; }
.card-row .grow { flex: 1; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.link-row { width: 100%; text-align: left; background: var(--card); border: 1px solid var(--outline); border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.link-row.tinted { background: var(--primary-container); border-color: transparent; }
.link-row .t { font-weight: 600; font-size: 16px; }
.link-row .s { color: var(--muted); font-size: 14px; }
.chev { color: var(--muted); width: 22px; height: 22px; flex: none; }

.badge {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
}
.badge svg { width: 24px; height: 24px; }
.badge.sm { width: 40px; height: 40px; }
.badge.sm svg { width: 20px; height: 20px; }
.tone-teal { background: var(--teal-bg); color: var(--teal-ink); }
.tone-peach { background: var(--peach-bg); color: var(--peach-ink); }
.tone-blue { background: var(--blue-bg); color: var(--blue-ink); }
.tone-plum { background: var(--plum-bg); color: var(--plum-ink); }
.tone-pink { background: var(--pink-bg); color: var(--pink-ink); }
.tone-slate { background: var(--slate-bg); color: var(--slate-ink); }
.tone-urgent { background: var(--urgent-bg); color: var(--urgent); }
.tone-attention { background: var(--attention-bg); color: var(--attention); }
.tone-calm { background: var(--calm-bg); color: var(--calm); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  white-space: nowrap;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.urgent { color: var(--urgent); background: var(--urgent-bg); }
.chip.attention { color: var(--attention); background: var(--attention-bg); }
.chip.calm { color: var(--calm); background: var(--calm-bg); }
.chip.plum { color: var(--plum-ink); background: var(--plum-bg); }
.chip.teal { color: var(--teal-ink); background: var(--teal-bg); }
.chip.blue { color: var(--blue-ink); background: var(--blue-bg); }
.chip.slate { color: var(--slate-ink); background: var(--slate-bg); }

/* ---- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  font-size: 16.5px; font-weight: 600; border: 0; width: 100%;
}
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--button-fill); color: var(--on-primary); }
.btn.outline { background: transparent; color: var(--primary); border: 1.5px solid color-mix(in srgb, var(--primary) 70%, transparent); }
.btn.tonal { background: var(--primary-container); color: var(--on-primary-container); }
.btn.danger { background: var(--urgent); color: #fff; }
.btn.small { min-height: 40px; font-size: 14.5px; padding: 0 16px; width: auto; }
.btn:disabled { background: var(--card-2); color: var(--faint); border-color: transparent; cursor: default; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row .btn { flex: 1; }
.text-btn { background: none; border: 0; color: var(--primary); font-weight: 600; padding: 6px 0; font-size: 15px; display: inline-flex; align-items: center; gap: 4px; }

.seg { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: none; border: 1px solid var(--outline); background: var(--card-2); color: var(--text);
  border-radius: 999px; padding: 9px 18px; font-size: 15px; font-weight: 500;
}
.seg button[aria-pressed="true"] { background: var(--button-fill); border-color: transparent; color: var(--on-primary); font-weight: 600; }

/* ---- forms ---------------------------------------------------------------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.input, textarea.input, select.input {
  width: 100%; border: 1px solid var(--outline-strong); background: var(--card);
  border-radius: 16px; padding: 14px 16px; font-size: 16px; outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea.input { min-height: 120px; resize: vertical; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--outline-strong); border-radius: 999px; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 24px; height: 24px; left: 4px; top: 4px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--button-fill); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ---- notices -------------------------------------------------------------- */
.notice { display: flex; gap: 12px; border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; font-size: 15px; color: var(--muted); }
.notice svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.notice.plum { background: var(--plum-bg); }
.notice.plum svg { color: var(--plum-ink); }
.notice.attention { background: var(--attention-bg); color: var(--on-severity); }
.notice.attention svg { color: var(--attention); }
.notice.teal { background: var(--teal-bg); }
.notice.teal svg { color: var(--teal-ink); }
.notice.slate { background: var(--card-2); }

.empty { text-align: center; color: var(--muted); padding: 22px 12px; }
.empty svg { width: 34px; height: 34px; color: var(--faint); margin-bottom: 6px; }

/* ---- monitor: the ladder ------------------------------------------------- */
.status-card { background: var(--primary-container); border-color: color-mix(in srgb, var(--primary) 10%, transparent); padding: 20px; }
.status-line { display: flex; align-items: center; gap: 12px; }
.status-line .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--calm); flex: none; }
.status-line .dot.live { animation: pulse 1.6s infinite; }
.status-line .dot.off { background: var(--faint); }
.status-line .dot.cry { background: var(--plum-ink); }
.status-line h3 { font-size: 22px; margin: 0; flex: 1; font-weight: 700; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 0%, transparent); opacity: 1; } 50% { opacity: .45; } }
.clock-row { display: flex; align-items: center; gap: 16px; margin: 14px 0 6px; }
.clock { font-size: 46px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1; }
.clock-row .what { font-weight: 600; font-size: 17px; }
.clock-row .sure { color: var(--muted); font-size: 14.5px; }

.ladder { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 20px 0 16px; }
.ladder .track { position: absolute; top: 17px; left: 12.5%; right: 12.5%; height: 4px; background: color-mix(in srgb, var(--outline-strong) 60%, transparent); border-radius: 2px; }
.ladder .fill { position: absolute; top: 17px; left: 12.5%; height: 4px; background: var(--primary); border-radius: 2px; transition: width .4s linear; }
.rung { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; z-index: 1; }
.rung .knob {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 2px solid var(--outline-strong); color: var(--muted);
}
.rung .knob svg { width: 18px; height: 18px; }
.rung.done .knob { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.rung.now .knob { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 18%, transparent); }
.rung.skipped .knob { opacity: .45; }
.rung.alarm .knob { background: var(--urgent); border-color: var(--urgent); color: #fff; }
.rung b { font-size: 15.5px; margin-top: 8px; font-weight: 600; }
.rung small { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }

.next-card { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--outline); border-radius: 18px; padding: 14px; }
.next-card .t { font-weight: 600; font-size: 16.5px; }
.next-card .s { color: var(--muted); font-size: 14.5px; }
.next-card .count { background: var(--primary-container); color: var(--primary); font-weight: 700; border-radius: 999px; padding: 6px 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.level-card canvas { width: 100%; height: 140px; display: block; }
.level-card .legend { font-size: 13.5px; color: var(--muted); }

.tried-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--outline); }
.tried-row:first-of-type { border-top: 0; }
.tried-row .t { font-weight: 600; font-size: 16px; }
.tried-row .s { color: var(--muted); font-size: 14px; }

.result-card .big { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 4px 0 8px; }
.steps { margin: 8px 0 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 6px 0; font-size: 14.5px; }
.steps li time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* quick log */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick button {
  text-align: left; border-radius: 20px; padding: 14px; border: 1px solid transparent; position: relative;
  min-height: 132px; display: flex; flex-direction: column; gap: 6px;
}
.quick .plus { position: absolute; top: 12px; right: 14px; width: 20px; height: 20px; }
.quick b { font-size: 16.5px; margin-top: auto; }
.quick small { color: var(--muted); font-size: 13.5px; }
.quick .q-teal { background: color-mix(in srgb, var(--teal-bg) 70%, var(--card)); border-color: color-mix(in srgb, var(--teal-ink) 12%, transparent); color: var(--text); }
.quick .q-peach { background: color-mix(in srgb, var(--peach-bg) 70%, var(--card)); border-color: color-mix(in srgb, var(--peach-ink) 12%, transparent); color: var(--text); }
.quick .q-blue { background: color-mix(in srgb, var(--blue-bg) 70%, var(--card)); border-color: color-mix(in srgb, var(--blue-ink) 12%, transparent); color: var(--text); }
.quick .q-teal .plus { color: var(--teal-ink); } .quick .q-peach .plus { color: var(--peach-ink); } .quick .q-blue .plus { color: var(--blue-ink); }

/* ---- timeline ------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); padding: 14px 4px; }
.tiles > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; border-left: 1px solid var(--outline); padding: 0 4px; }
.tiles > div:first-child { border-left: 0; }
.tiles b { font-size: 19px; margin-top: 8px; }
.tiles span { font-size: 14px; color: var(--muted); line-height: 1.2; }
.tiles small { font-size: 12.5px; color: var(--muted); }
.day-head { display: flex; align-items: center; gap: 10px; background: var(--card-2); border-radius: 16px; padding: 12px 16px; margin: 6px 0 14px; }
.day-head b { flex: 1; font-size: 16.5px; }
.day-head svg { width: 22px; height: 22px; color: var(--peach-ink); }
.tl { position: relative; padding-left: 74px; }
.tl::before { content: ""; position: absolute; left: 60px; top: 0; bottom: 0; width: 2px; background: var(--outline); }
.tl-item { position: relative; margin-bottom: 12px; }
.tl-item > time { position: absolute; left: -74px; top: 22px; width: 50px; text-align: right; color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.tl-item > .pin { position: absolute; left: -19px; top: 27px; width: 10px; height: 10px; border-radius: 50%; background: var(--slate-ink); }
.tl-card { background: var(--card); border: 1px solid var(--outline); border-radius: 18px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; }
.tl-card.urgent { background: var(--urgent-bg); border-color: var(--urgent-line); }
.tl-card.urgent .t { color: var(--urgent); }
.tl-card .t { font-weight: 600; font-size: 16px; display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
.tl-card .s { color: var(--muted); font-size: 14.5px; }
.tl-card .grow { flex: 1; min-width: 0; }
.tl-detail { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--outline); }
.tl-detail audio { width: 100%; margin-top: 8px; }
.kept { color: var(--primary); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.kept svg { width: 16px; height: 16px; }

/* ---- charts --------------------------------------------------------------- */
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 12px; font-family: inherit; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat-pair .card { margin: 0; display: flex; gap: 12px; align-items: flex-start; }
.stat-pair b { font-size: 24px; display: block; line-height: 1.15; }
.stat-pair .l { color: var(--muted); font-size: 14.5px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 10px; margin: 10px 0; font-size: 14.5px; }
.bar-row .bar { height: 10px; border-radius: 6px; background: var(--card-2); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }

/* ---- sheets, overlays, toast --------------------------------------------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 440px; background: var(--card); border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto;
  animation: up .22s ease-out;
}
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--outline-strong); margin: 4px auto 16px; }
.sheet h2 { margin: 0 0 6px; font-size: 22px; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.option { width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px; border-radius: 18px; border: 1px solid var(--outline); background: var(--card); margin-top: 10px; }
.option .t { font-weight: 600; }
.option .s { color: var(--muted); font-size: 14px; }

.wake {
  position: fixed; inset: 0; z-index: 80; background: var(--urgent); color: #fff;
  display: flex; flex-direction: column; justify-content: center; padding: 28px; text-align: left;
}
.wake .inner { max-width: 420px; margin: 0 auto; width: 100%; }
.wake .chip { background: rgba(255,255,255,.18); color: #fff; }
.wake h2 { font-size: 38px; line-height: 1.1; margin: 16px 0 10px; }
.wake p { font-size: 17px; opacity: .95; margin: 0 0 8px; }
.wake ul { padding-left: 20px; font-size: 16px; }
.wake .btn { background: #fff; color: var(--urgent); margin-top: 18px; }
.wake .btn.ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); }
.wake.flash { animation: flash 1s steps(2) infinite; }
@keyframes flash { 50% { background: #7F1A14; } }

.ringlight { position: fixed; inset: 0; background: #fff; z-index: 75; pointer-events: none; animation: ring 0.8s steps(2) infinite; }
@keyframes ring { 50% { opacity: 0; } }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 90;
  background: var(--text); color: var(--page); padding: 12px 18px; border-radius: 14px; font-size: 14.5px;
  max-width: 400px; width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.18);
}

/* ---- watch ---------------------------------------------------------------- */
.cam { position: relative; border-radius: 20px; overflow: hidden; background: #0b0f0e; aspect-ratio: 4 / 3; touch-action: none; }
.cam video, .cam canvas.view { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam canvas.overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.cam .cam-label { position: absolute; left: 12px; top: 12px; }
.alert-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; margin-bottom: 10px; background: var(--card); border: 1px solid var(--outline); }
.alert-row.urgent { background: var(--urgent-bg); border-color: var(--urgent-line); }
.alert-row.urgent .t { color: var(--urgent); }
.alert-row .t { font-weight: 600; }
.alert-row .s { color: var(--muted); font-size: 14px; }
.setting-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.setting-row .grow { flex: 1; }
.setting-row .t { font-weight: 600; }
.setting-row .s { color: var(--muted); font-size: 14px; }

/* ---- babyproof ----------------------------------------------------------- */
.photo-pins { position: relative; border-radius: 20px; overflow: hidden; }
.photo-pins img { width: 100%; }
.photo-pins .pin-n {
  position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%;
  background: var(--attention); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.photo-pins .pin-n.high { background: var(--urgent); }
.photo-pins .pin-n.done { background: var(--calm); }
.photo-pins .box { position: absolute; border: 2px solid rgba(255,255,255,.85); border-radius: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.fix { border-radius: 20px; padding: 16px; margin-bottom: 12px; background: var(--card); border: 1px solid var(--outline); }
.fix .num { width: 30px; height: 30px; border-radius: 50%; background: var(--attention); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.fix .num.high { background: var(--urgent); }
.fix .what { background: var(--attention-bg); color: var(--on-severity); border-radius: 14px; padding: 12px; margin-top: 10px; font-size: 14.5px; }
.fix .what b { color: var(--attention); display: block; margin-bottom: 2px; }
.fix.done { opacity: .7; }

/* ---- ask ------------------------------------------------------------------ */
.suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.suggest button { text-align: left; display: flex; gap: 12px; align-items: center; border-radius: 18px; padding: 14px; border: 1px solid transparent; font-weight: 500; font-size: 15px; color: var(--text); }
.q-bubble { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--outline); border-radius: 18px; padding: 12px 16px; margin-bottom: 14px; }
.answer { background: var(--teal-bg); border-radius: 20px; padding: 16px; font-size: 15.5px; color: var(--text); }
.answer p { margin: 0 0 10px; }
.answer p:first-child { font-weight: 600; }
.worth { background: var(--attention-bg); border-radius: 18px; padding: 14px 16px; margin-top: 12px; color: var(--on-severity); font-size: 15px; }
.worth b { color: var(--attention); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sources { margin-top: 12px; }
.sources a { display: block; font-size: 14px; padding: 4px 0; }
.sources summary { display: flex; align-items: center; gap: 8px; }
.verdict { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; }
.verdict .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.v-safe { color: var(--calm); } .v-check { color: var(--attention); } .v-avoid { color: var(--urgent); }

/* ---- doctor --------------------------------------------------------------- */
.med { background: var(--peach-bg); border-radius: 18px; padding: 14px 16px; margin-bottom: 10px; color: var(--on-severity); }
.med .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 17px; }
.med .amt { color: var(--peach-ink); font-weight: 600; }
.med .tag { display: inline-block; background: var(--card); color: var(--peach-ink); border-radius: 999px; padding: 3px 12px; font-size: 13.5px; font-weight: 600; margin: 8px 6px 0 0; }
.med details { margin-top: 8px; font-size: 14px; }
.med summary { color: var(--peach-ink); font-weight: 600; cursor: pointer; }
.date-row { display: flex; justify-content: space-between; gap: 10px; background: var(--blue-bg); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; color: var(--text); }
.date-row b { color: var(--blue-ink); font-weight: 600; white-space: nowrap; }
.sec-title { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; margin: 22px 0 12px; }

/* ---- health / signs ------------------------------------------------------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { text-align: left; background: var(--card); border: 1px solid var(--outline); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.tile .t { font-weight: 600; }
.tile .s { color: var(--muted); font-size: 13.5px; }
.tile.soon { opacity: .6; }
.thumb { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--card-2); flex: none; }
.measure { position: relative; border-radius: 18px; overflow: hidden; touch-action: none; background: #000; }
.measure img { width: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.measure .ring { position: absolute; border: 3px solid var(--zone); border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,.35); transform: translate(-50%, -50%); pointer-events: none; }

/* ---- welcome -------------------------------------------------------------- */
.welcome { text-align: center; padding: 24px 6px; }
.welcome .logo { width: 88px; height: 88px; border-radius: 24px; margin: 8px auto 16px; }
.welcome h2 { font-size: 30px; margin: 0 0 8px; }
.welcome p { color: var(--muted); margin: 0 0 18px; }
.welcome form { text-align: left; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.text-btn svg, .h-section .right svg { width: 18px; height: 18px; flex: none; }
.h-section .right { white-space: nowrap; gap: 2px; }
a.link-row, a.btn { color: var(--text); text-decoration: none; }
a.btn.primary { color: var(--on-primary); }
a.btn.tonal { color: var(--on-primary-container); }
a.btn.outline { color: var(--primary); }
.suggest button { cursor: pointer; }
.tried-row .grow, .setting-row .grow, .alert-row .grow, .next-card .grow, .link-row .grow, .option .grow { flex: 1; min-width: 0; }
