/* Coach: only what is special to this demo. Tokens, cards, buttons, the guide and the folds come from /_s/shell.css. */
.work { display: grid; gap: 16px; }
.small { font-size: .88rem; } .fine { font-size: .84rem; color: var(--muted); }

/* the picker: which member, and play */
.stage-head { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.stage-head > div:first-child { flex: 1 1 340px; min-width: 0; }
.stage-head .sr-hint { margin: 0 0 4px; }
.stage-head h2 { font: 600 1.35rem/1.25 var(--serif); letter-spacing: -.01em; margin: 0; }
.stage-actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* members: three cards that read as a choice (one is always picked), then what the picked member told the app */
.members { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.members [role=radio] { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 0; padding: 14px 14px 14px 14px; text-align: left; white-space: normal;
  justify-content: flex-start; border: 1.5px solid var(--axis); border-radius: var(--r); background: var(--surface); color: var(--ink); font: inherit; }
.members [role=radio]:hover:not(:disabled) { border-color: var(--accent); background: var(--surface); }
.members [role=radio][aria-checked="true"], .members [role=radio][aria-checked="true"]:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.mb-av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface2); color: var(--ink2); font: 650 1.05rem var(--serif); }
[aria-checked="true"] .mb-av { background: var(--accent); color: var(--on-accent, #fff); }
.mb-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.mb-t b { font: 650 1rem/1.25 var(--sans); }
.mb-t span { font-size: .85rem; line-height: 1.4; color: var(--ink2); }
.mb-dot { flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--axis); background: var(--surface); }
[aria-checked="true"] .mb-dot { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 5px, var(--surface) 5.5px); }
.answers { margin-top: 14px; padding: 16px 18px; border-radius: var(--r); background: var(--surface2); }
.answers h3 { margin: 0 0 12px; font: 650 .95rem var(--sans); }
.answers dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 20px; margin: 0; }
.answers dt { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 3px; }
.answers dd { margin: 0; font-size: .9rem; line-height: 1.4; }
@media (max-width: 900px) { .members { grid-template-columns: minmax(0, 1fr); gap: 8px; } .answers dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#stagesNote { margin: 10px 0 0; }

/* two columns: the app on the left, how it was made on the right */
.coach { display: grid; grid-template-columns: 410px minmax(0, 1fr); gap: 24px; align-items: start; }
.proof { min-width: 0; }
.proof > h2 { font: 600 1.2rem/1.25 var(--serif); margin: 0 0 14px; }
.proof h3 { font: 650 .95rem var(--sans); margin: 18px 0 8px; }
@media (max-width: 959px) { .coach { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- the phone */
/* A graphite phone: machined rim (border), black glass bezel (padding), side keys, a camera pill and a status bar.
   The device is drawn in fixed colours in both themes, because it is an object on the page, not part of it. */
.phone { position: sticky; top: calc(var(--bar-h, 0px) + 16px); display: flex; justify-content: center; }
.ph-device { --metal: linear-gradient(152deg, #9a958f 0%, #57534e 9%, #2f2d2a 30%, #1d1c1a 55%, #2c2a27 78%, #5c5853 92%, #8f8a84 100%);
  position: relative; box-sizing: border-box; width: 392px; aspect-ratio: 392 / 804;   /* app.js zooms it down on a short window */
  padding: 11px; border: 3.5px solid transparent; border-radius: 62px;
  background: linear-gradient(#050505, #050505) padding-box, var(--metal) border-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 0 0 .5px rgba(0, 0, 0, .5),
    0 50px 80px -40px rgba(45, 30, 15, .55), 0 22px 36px -22px rgba(0, 0, 0, .45); }
.ph-key { position: absolute; width: 4px; border-radius: 2px 0 0 2px; background: linear-gradient(90deg, #1a1917, #5e5a55 50%, #2b2926); }
.ph-key-action { left: -7px; top: 17%; height: 4%; }
.ph-key-up { left: -7px; top: 24.5%; height: 7.5%; }
.ph-key-down { left: -7px; top: 33.5%; height: 7.5%; }
.ph-key-power { right: -7px; top: 27%; height: 11.5%; border-radius: 0 2px 2px 0; background: linear-gradient(270deg, #1a1917, #5e5a55 50%, #2b2926); }
.ph-frame { position: relative; isolation: isolate; height: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: 47px; background: var(--page); color: var(--ink); }
.ph-island { position: absolute; z-index: 9; top: 11px; left: 50%; translate: -50% 0; width: 31%; height: 31px; border-radius: 20px; background: #000; pointer-events: none; }
.ph-island::after { content: ""; position: absolute; right: 11px; top: 50%; translate: 0 -50%; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #4b5a78 0 12%, #161b26 34%, #07080b 62%); box-shadow: 0 0 0 1.5px #0d0e10; }
.ph-status { flex: none; display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 6px 30px 0 38px; background: var(--surface); color: var(--ink); }
.ph-clock { font: 650 .92rem/1 var(--sans); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ph-icons { display: flex; align-items: center; gap: 6px; } .ph-icons svg { fill: currentColor; display: block; }
.ph-top { flex: none; display: flex; align-items: center; gap: 10px; padding: 4px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--grid); }
.ph-mark { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.ph-mark svg { width: 20px; height: 20px; }
.ph-title { min-width: 0; display: grid; } .ph-title > b { font: 650 1rem/1.2 var(--sans); }
.ph-who { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ph-who b { color: var(--ink2); font-weight: 600; }
.ph-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 24px; scroll-behavior: smooth; }
.ph-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; color: var(--muted); padding: 0 32px; }
.ph-empty svg { width: 46px; height: 46px; color: var(--accent); }
.ph-empty p { margin: 0; font-size: .95rem; }
.ph-tabs { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--grid); background: var(--surface); padding: 4px 8px 26px; }
.ph-tabs::after { content: ""; position: absolute; left: 50%; bottom: 8px; translate: -50% 0; width: 36%; height: 5px; border-radius: 3px; background: var(--ink); opacity: .85; }   /* home bar */
.ph-tabs button { display: grid; justify-items: center; gap: 2px; min-height: 52px; border: 0; background: none; border-radius: 12px; font: 600 .72rem var(--sans); color: var(--muted); padding: 6px 0; }
.ph-tabs button svg { width: 22px; height: 22px; }
.ph-tabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent-soft); }
.ph-tabs button:disabled { opacity: .45; cursor: default; }

.ph-card { background: var(--surface); border: 1px solid var(--grid); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.ph-card h4 { font: 650 .98rem/1.3 var(--sans); margin: 0; }
.ph-card.warn { border-color: var(--warn); background: var(--warn-soft); }
.ph-small { font-size: .84rem; color: var(--ink2); margin: 4px 0 8px; }
.ph-note { font-size: .84rem; color: var(--ink2); background: var(--surface2); border-radius: 12px; padding: 9px 12px; margin: 0 0 10px; }
.ph-note.allergen { border-left: 3px solid var(--warn); }
.ph-fine { font-size: .76rem; color: var(--muted); margin: 12px 2px 0; }
.ph-btn { width: 100%; min-height: 44px; border-radius: 12px; margin-top: 8px; font-weight: 600; }
.ph-btn.ghost { background: none; }
.ph-link { border: 0; background: none; min-height: 40px; padding: 0 10px; color: var(--accent-ink); font: 600 .85rem var(--sans); border-radius: 10px; }
.ph-link:hover { background: var(--hover); }
.ph-x { border: 0; background: none; font-size: 1.5rem; line-height: 1; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); padding: 0; }

/* ---- Today */
.ph-body { font-variant-numeric: tabular-nums; }
.t-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 0 14px; }
.t-days button { display: grid; justify-items: center; gap: 1px; min-height: 46px; padding: 6px 0 4px; border-radius: 12px; border: 0; background: none; color: var(--ink); }
.t-days b { font: 650 .8rem var(--sans); } .t-days i { font: normal 700 .7rem/1 var(--sans); height: .8rem; color: var(--good); }
.t-days .rest b { color: var(--muted); font-weight: 500; }
.t-days button[aria-pressed="true"], .t-days button[aria-pressed="true"]:hover:not(:disabled) { background: var(--ink); color: var(--page); } .t-days button[aria-pressed="true"] b { color: var(--page); } .t-days button[aria-pressed="true"] i { color: var(--page); }
.t-hero { background: var(--surface); border: 1px solid var(--grid); border-radius: 20px; padding: 16px 16px 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.t-eyebrow, .wo-eyebrow { font: 600 .74rem var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 2px; }
.t-hero h3 { font: 700 1.35rem/1.2 var(--sans); letter-spacing: -.01em; margin: 0; }
.t-sub { margin: 4px 0 0; color: var(--ink2); font-size: .9rem; }
.t-prog { height: 6px; border-radius: 999px; background: var(--surface2); margin: 12px 0 4px; overflow: hidden; } .t-prog span { display: block; height: 100%; background: var(--good); border-radius: inherit; }
.t-progt { margin: 0; font-size: .8rem; color: var(--ink2); }
.t-start { width: 100%; min-height: 50px; margin-top: 14px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font: 700 1rem var(--sans); }
.t-start:hover:not(:disabled) { background: var(--accent); filter: brightness(1.06); } .t-start.ghost, .t-start.ghost:hover:not(:disabled) { background: var(--surface2); color: var(--ink); filter: none; }
.t-tip { display: flex; align-items: flex-end; gap: 6px 10px; flex-wrap: wrap; justify-content: space-between; padding: 10px 12px; margin-bottom: 16px; border-radius: 14px; background: var(--surface2); font-size: .84rem; color: var(--ink2); }
.t-tip p { margin: 0; flex: 1 1 200px; }
.t-label { font: 650 .78rem var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 4px 8px; }
.t-list, .m-list, .wk { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.t-ex, .m-row, .wk button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; justify-content: flex-start; padding: 12px; min-height: 62px; border-radius: 16px; background: var(--surface); border: 1px solid var(--grid); color: var(--ink); white-space: normal; }
.t-ex:hover, .m-row:hover, .wk button:hover { border-color: var(--axis); }
.t-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); font: 700 .82rem var(--sans); color: var(--ink2); }
.t-ex.done .t-num { background: var(--good); color: #fff; }
.t-main { flex: 1; min-width: 0; display: grid; gap: 2px; } .t-main b { font: 650 .95rem/1.25 var(--sans); } .t-main small { font-size: .8rem; font-weight: 400; color: var(--ink2); }
.t-main em { font: normal 600 .72rem var(--sans); color: var(--accent-ink); }
.t-chev { flex: none; font-size: 1.4rem; line-height: 1; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .t-ex.flash { animation: flash 1.2s var(--ease); } @keyframes flash { from { box-shadow: 0 0 0 3px var(--accent); } } }

/* ---- the workout */
.wo-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 8px; font: 600 .84rem var(--sans); color: var(--ink2); }
.wo-end { border: 0; background: var(--surface2); min-height: 34px; padding: 0 14px; border-radius: 999px; font: 650 .82rem var(--sans); color: var(--ink); }
.wo-bar { display: flex; gap: 4px; margin-bottom: 18px; } .wo-bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--grid); } .wo-bar i.done { background: var(--good); } .wo-bar i.now { background: var(--accent); }
.wo-ex { text-align: center; } .wo-ex h3 { font: 700 1.45rem/1.2 var(--sans); letter-spacing: -.01em; margin: 0 8px; }
.wo-sets { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 18px; font: 600 .86rem var(--sans); color: var(--ink2); }
.wo-dots { display: flex; gap: 5px; } .wo-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--grid); } .wo-dots i.done { background: var(--good); } .wo-dots i.now { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wo-target { display: flex; align-items: stretch; justify-content: center; gap: 10px; margin-bottom: 14px; }
.wo-reps, .wo-kg { flex: 1; min-width: 0; display: grid; place-content: center; gap: 2px; padding: 14px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--grid); }
.wo-reps b { font: 750 2rem/1 var(--sans); letter-spacing: -.02em; } .wo-reps small, .wo-kg small { font: 600 .74rem var(--sans); color: var(--muted); }
.wo-kg { grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; padding: 8px 6px; }
.wo-kg button { width: 40px; height: 40px; border-radius: 50%; padding: 0; border: 0; background: var(--surface2); font: 600 1.3rem/1 var(--sans); color: var(--ink); }
.wo-kg label { display: grid; justify-items: center; }
.wo-kg input { width: 100%; max-width: 70px; border: 0; background: none; text-align: center; font: 750 1.6rem/1.1 var(--sans); color: var(--ink); padding: 0; min-height: 0; }
.wo-note { font-size: .82rem; color: var(--ink2); background: var(--warn-soft); border-radius: 12px; padding: 8px 12px; margin: 0 0 10px; text-align: left; }
.wo-cue { font-size: .92rem; color: var(--ink2); margin: 0 6px 16px; }
.wo-primary { width: 100%; min-height: 56px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font: 700 1.05rem var(--sans); }
.wo-primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.06); }
.wo-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.wo-tools button { min-height: 40px; padding: 0 4px; border: 0; border-radius: 12px; background: var(--surface2); font: 600 .8rem var(--sans); color: var(--ink); }
.wo-rest { margin: 4px 0 0; padding: 22px 18px 20px; border-radius: 24px; background: var(--stage); color: var(--on-stage); text-align: center; }
.wo-rest .wo-eyebrow { color: var(--on-stage2); }
.wo-ring { position: relative; width: 190px; height: 190px; margin: 10px auto 16px; }
.wo-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); } .wo-ring circle { fill: none; stroke-width: 8; }
.wo-ring .trk { stroke: color-mix(in srgb, var(--on-stage) 14%, transparent); } .wo-ring .arc { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset .25s linear; }
.wo-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 750 2.8rem/1 var(--sans); letter-spacing: -.02em; }
.wo-next { display: grid; gap: 2px; margin: 0 0 20px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--on-stage2); }
.wo-next b { font: 650 1.05rem var(--sans); text-transform: none; letter-spacing: 0; color: var(--on-stage); } .wo-next span { text-transform: none; letter-spacing: 0; font-size: .86rem; }
.wo-row { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.wo-ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--on-stage) 12%, transparent); }
.wo-ghost { min-height: 56px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--on-stage) 30%, transparent); background: none; color: var(--on-stage); font: 650 .95rem var(--sans); }
.wo-finish { text-align: center; padding: 26px 6px 0; } .wo-finish h3 { font: 700 1.5rem var(--sans); margin: 12px 0 4px; } .wo-finish p { color: var(--ink2); margin: 0 0 22px; }
.wo-medal { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff; font: 700 2.4rem/1 var(--sans); }
.wo-link { margin-top: 8px; width: 100%; min-height: 44px; border: 0; background: none; font: 600 .92rem var(--sans); color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) { .wo-ring .arc { transition: none; } }

/* ---- Week */
.wk button { padding: 10px 12px; min-height: 60px; } .wk button.rest { background: var(--surface2); }
.wk-d { flex: none; width: 38px; white-space: nowrap; font: 700 .8rem var(--sans); text-transform: uppercase; color: var(--muted); }
.wk-n { flex: 1; min-width: 0; display: grid; } .wk-n b { font: 650 .93rem/1.25 var(--sans); } .wk-n small { color: var(--ink2); font-size: .78rem; font-weight: 400; }
.wk-s { flex: none; font: 650 .74rem var(--sans); padding: 4px 9px; border-radius: 999px; background: var(--surface2); color: var(--ink2); }
.wk .done .wk-s { background: var(--good-soft); color: var(--goodtext); } .wk .part .wk-s { background: var(--accent-soft); color: var(--accent-ink); } .wk .rest .wk-s { background: none; color: var(--muted); }

/* ---- Meals */
.ph-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface2); margin-bottom: 10px; }
.ph-seg button { border: 0; min-height: 40px; border-radius: 10px; background: none; font: 600 .88rem var(--sans); color: var(--ink2); }
.ph-seg button[aria-pressed="true"], .ph-seg button[aria-pressed="true"]:hover:not(:disabled) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.m-sum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px; }
.m-kcal { display: grid; justify-items: center; padding-right: 14px; border-right: 1px solid var(--grid); }
.m-kcal b { font: 750 1.7rem/1 var(--sans); letter-spacing: -.02em; } .m-kcal span { font: 600 .78rem var(--sans); color: var(--ink2); } .m-kcal small { font-size: .7rem; color: var(--muted); margin-top: 4px; }
.m-macs { display: grid; gap: 6px; }
.m-mac { display: grid; grid-template-columns: 52px auto minmax(0, 1fr); grid-template-areas: "l v t" "l s t"; column-gap: 8px; align-items: center; font-size: .78rem; }
.m-mac span { grid-area: l; color: var(--ink2); } .m-mac b { grid-area: v; font: 650 .82rem var(--sans); } .m-mac small { display: none; }
.m-mac i { grid-area: t; height: 6px; border-radius: 999px; background: var(--surface2); overflow: hidden; } .m-mac s { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.m-time { flex: none; width: 46px; font: 650 .82rem var(--sans); color: var(--ink2); }

/* ---- Progress */
.ph-dayhead { margin: 2px 4px 12px; } .ph-dayhead h3 { font: 700 1.35rem/1.2 var(--sans); letter-spacing: -.01em; margin: 0; } .ph-dayhead p { margin: 2px 0 0; color: var(--ink2); font-size: .86rem; }
.ph-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ph-tiles div { background: var(--surface); border: 1px solid var(--grid); border-radius: 16px; padding: 12px 6px; text-align: center; }
.ph-tiles b { display: block; font: 750 1.4rem/1.1 var(--sans); } .ph-tiles b small { font-size: .85rem; color: var(--muted); font-weight: 600; } .ph-tiles span { font-size: .76rem; color: var(--ink2); }
.groups { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 9px; }
.groups li { display: grid; grid-template-columns: minmax(0, 1fr) 96px 48px; gap: 8px; align-items: center; font-size: .8rem; }
.g-name { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .g-n { color: var(--muted); text-align: right; font-size: .76rem; }
.g-track { height: 8px; border-radius: 999px; background: var(--surface2); overflow: hidden; } .g-track i { display: block; height: 100%; background: var(--good); border-radius: inherit; }
ul.plain { list-style: none; margin: 6px 0 0; padding: 0; font-size: .86rem; } ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--grid); } ul.plain li:last-child { border: 0; }

/* ---- the sheet */
.ph-sheet { position: absolute; inset: 0; z-index: 5; background: rgba(20, 18, 16, .42); display: flex; align-items: flex-end; }
.ph-sheet-card { width: 100%; max-height: 86%; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 24px 24px 0 0; padding: 8px 18px 22px; box-shadow: var(--shadow); }
.ph-sheet-card::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--grid); margin: 0 auto 8px; }
.ph-sheet-head { display: flex; align-items: flex-start; gap: 8px; } .ph-sheet-head h3 { flex: 1; font: 700 1.2rem/1.25 var(--sans); margin: 6px 0 0; }
.sh-meta { font-size: .86rem; color: var(--ink2); margin: 4px 0 12px; }
.sh-h { font: 650 .78rem var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 6px; }
.sh-p { font-size: .92rem; margin: 0; line-height: 1.5; }
.sh-note { font-size: .84rem; color: var(--ink2); background: var(--surface2); border-radius: 12px; padding: 9px 12px; margin: 10px 0 0; }
.sh-list { margin: 0; padding-left: 1.15rem; font-size: .9rem; } .sh-list li { margin: 4px 0; } .sh-list.tips { list-style: none; padding: 0; } .sh-list.tips li { margin: 0 0 10px; }
.sh-macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sh-macros span { display: grid; justify-items: center; padding: 8px 2px; border-radius: 12px; background: var(--surface2); font-size: .72rem; color: var(--ink2); } .sh-macros b { font: 700 .95rem var(--sans); color: var(--ink); }
.sh-actions { display: grid; gap: 4px; margin-top: 16px; }
.sh-fine { font-size: .78rem; color: var(--muted); margin: 14px 0 0; }
.alts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.alts button { width: 100%; text-align: left; display: grid; justify-items: start; justify-content: stretch; gap: 1px; padding: 10px 12px; min-height: 54px; border-radius: 14px; white-space: normal; }
.alts b { font: 650 .93rem var(--sans); } .alts small { color: var(--muted); font-size: .76rem; font-weight: 400; }

/* ---------------------------------------------------------------- how it was made */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 10px; counter-reset: st; }
.stages li { position: relative; counter-increment: st; padding: 0 0 0 34px; min-height: 40px; color: var(--muted); min-width: 0; }
.stages li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--axis); background: var(--surface); display: grid; place-items: center; font: 600 .72rem var(--mono); color: var(--muted); box-sizing: border-box; }
.stages b { display: block; font: 650 .84rem/1.25 var(--sans); color: var(--ink2); }
.stages small { display: block; font-size: .76rem; line-height: 1.3; margin-top: 2px; }
.stages li.run b, .stages li.done b, .stages li.fixed b, .stages li.failed b { color: var(--ink); }
.stages li.run::before { content: ""; border-color: var(--accent); border-top-color: transparent; }
.stages li.run small { color: var(--accent-ink); }
.stages li.done::before { content: "✓"; background: var(--good); border-color: var(--good); color: #fff; }
.stages li.fixed::before { content: "↻"; background: var(--warn); border-color: var(--warn); color: #fff; }
.stages li.failed::before { content: "!"; background: var(--bad); border-color: var(--bad); color: #fff; }
.stages li.done small { color: var(--ink2); } .stages li.fixed small { color: var(--warntext); } .stages li.failed small { color: var(--badtext); }
@media (prefers-reduced-motion: no-preference) { .stages li.run::before { animation: spin .9s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } }
@media (max-width: 1180px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.runfacts { font-size: .82rem; color: var(--muted); margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--grid); }
.runfacts:empty { display: none; }
.caught { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.caught button { width: 100%; height: 100%; text-align: left; display: grid; justify-items: start; justify-content: stretch; align-content: start; gap: 2px; padding: 10px 12px; border: 1px solid var(--grid); border-left: 4px solid var(--good); border-radius: var(--r-sm); background: var(--surface2); white-space: normal; }
.caught li.fixed button { border-left-color: var(--warn); }
.caught button:not(:disabled):hover { background: var(--hover); }
.caught b { font: 650 .88rem var(--sans); } .caught span { font-size: .86rem; color: var(--ink2); font-weight: 400; }
.hintline { font-size: .86rem; color: var(--ink2); margin: 14px 0 0; }
.origin { margin-top: 16px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--grid)); border-radius: var(--r); padding: 12px 14px; background: var(--surface); scroll-margin: 80px; }
.origin:focus { outline: none; }
.origin-head { display: flex; align-items: center; gap: 8px; } .origin-head h3 { flex: 1; margin: 0; font: 600 1.05rem var(--serif); }
.trail { list-style: none; margin: 8px 0 0; padding: 0; }
.trail li { position: relative; padding: 0 0 12px 22px; border-left: 2px solid var(--grid); margin-left: 6px; }
.trail li:last-child { border-left-color: transparent; padding-bottom: 0; }
.trail li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--good); }
.trail li.fixed::before { background: var(--warn); } .trail li.you::before { background: var(--accent); }
.trail b { display: block; font: 650 .88rem/1.35 var(--sans); } .trail span { display: block; font-size: .86rem; color: var(--ink2); margin-top: 2px; }
#proofMore { margin-top: 16px; border-top: 1px solid var(--grid); }
#proofMore details { border-bottom: 1px solid var(--grid); } #proofMore summary { padding: 12px 0; cursor: pointer; font: 600 .9rem var(--sans); color: var(--ink); }
#proofMore details > :not(summary) { margin-bottom: 12px; }
.decides { margin: 0 0 12px; padding-left: 1.1rem; font-size: .88rem; color: var(--ink2); } .decides li { margin: 4px 0; }
#assumed ul { margin: 0 0 8px; padding-left: 1.1rem; font-size: .88rem; color: var(--ink2); } #assumed p { font-size: .88rem; }
.dr-day { margin: 8px 0; font-size: .86rem; } .dr-day ul { margin: 4px 0 0; padding-left: 1.1rem; } .dr-day li { margin: 2px 0; } .dr-day li.marked { color: var(--warntext); }
.fb { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--grid); } .fb h3 { margin-top: 12px; }
.fbrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; } .fbrow .f { margin: 0; }
@media (max-width: 520px) { .fbrow { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- a real phone: the app is the page */
@media (max-width: 640px) {
  .phone { position: static; display: block; margin-inline: -8px; }
  .ph-device { width: auto; min-width: 0; aspect-ratio: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }   /* on a real phone the app is the page */
  .ph-key, .ph-island, .ph-status, .ph-tabs::after { display: none; }
  .ph-frame { height: auto; min-height: 420px; border: 1px solid var(--grid); border-radius: 18px; overflow: visible; box-shadow: var(--shadow-sm); }
  .ph-top { order: -2; border-radius: 18px 18px 0 0; padding: 10px 14px; }
  .ph-tabs { order: -1; position: sticky; top: 0; z-index: 4; border-top: 0; border-bottom: 1px solid var(--grid); padding: 4px; border-radius: 0; }
  .ph-body { overflow: visible; padding: 12px 10px 18px; }
  .ph-empty { min-height: 300px; }
  .ph-sheet { position: fixed; z-index: 300; }
  .stages { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .stage-actions, .stage-actions button { width: 100%; }
}
@media (min-width: 641px) and (max-width: 959px) { .phone { position: static; } }

/* the profile form, under "More to try" */
#quota { margin: 12px 0 0; }
#form { max-width: 760px; }
#fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0 14px; }
.f { margin: 12px 0 0; display: grid; gap: 4px; } .f input, .f select { width: 100%; }
fieldset.group { border: 0; margin: 14px 0 0; padding: 0; min-width: 0; }
fieldset.group legend { font: 500 .86rem var(--sans); color: var(--ink2); padding: 0; margin-bottom: 6px; }
.ticks { display: flex; flex-wrap: wrap; gap: 8px; } .ticks.col { flex-direction: column; gap: 2px; }
.ticks label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--axis); border-radius: 999px; font: 400 .95rem var(--sans); color: var(--ink); cursor: pointer; background: var(--surface); }
.ticks.col label { border: 0; border-radius: var(--r-sm); padding: 6px 4px; align-items: flex-start; } .ticks.col input { margin-top: 3px; }
.ticks label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ticks input { flex: none; }
fieldset:disabled .ticks label { cursor: not-allowed; opacity: .6; }
.hint { font-size: .86rem; color: var(--muted); margin: 6px 0 0; }
label.consent { display: flex; gap: 10px; align-items: flex-start; font: 400 .95rem/1.5 var(--sans); color: var(--ink); margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--grid); cursor: pointer; }
label.consent input { margin-top: 3px; flex: none; }
.fielderr { color: var(--badtext); font-size: .9rem; margin: 6px 0 0 28px; }
#msg { margin: 12px 0 0; }
.disclaimer { font-size: .9rem; color: var(--ink2); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--grid); max-width: 80ch; }

/* how a plan is built */
.own h2 { font: 600 1.2rem/1.25 var(--serif); margin: 0 0 10px; }
.how { margin: 0; padding-left: 1.3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px 36px; }
.how li::marker { font: 600 .82rem var(--mono); color: var(--accent-ink); }
.how b { display: block; } .how span { color: var(--ink2); font-size: .95rem; }
/* phone: smaller view buttons so the four fit on two rows */
@media (max-width: 700px) { .views { gap: 6px; } .views button { padding: 0 13px; font-size: .88rem; } }

.aiwarn { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--warn, #c98a2b); background: var(--surface2); font-size: .85rem; color: var(--ink2); border-radius: 0 8px 8px 0; }
