/* Tester phone app. One loud element per screen (the count); everything else quiet. */
:root { --paper: #f8f9f7; --hair: #e7e8ef; --tabh: 62px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
html { background: var(--navy); }
body { background: var(--paper); font-size: 15px; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
#app { min-height: 100vh; max-width: 560px; margin: 0 auto; background: var(--paper); position: relative; }
#app svg { width: 22px; height: 22px; flex-shrink: 0; }
button { -webkit-appearance: none; appearance: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 6px; height: calc(52px + var(--safe-t)); padding: var(--safe-t) 8px 0 8px; }
.top .logo { height: 22px; margin-left: 8px; }
.tb-btn { color: #fff; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.tb-title { flex: 1; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 2px; }
.tb-demo { font-size: 12px; font-weight: 500; color: #a3aca7; padding-right: 10px; }
.tb-text { background: transparent; border: 1.5px solid #56605c; color: #fff; font-weight: 600; font-size: 14px; border-radius: 99px; padding: 7px 16px; margin-right: 6px; }

/* the count */
.hero { background: var(--navy); color: #fff; padding: 6px 18px 22px; border-radius: 0 0 24px 24px; display: grid; gap: 16px; }
.hero-row { display: flex; align-items: center; gap: 16px; }
.num { font-size: 76px; font-weight: 700; line-height: 0.9; color: var(--orange); font-variant-numeric: tabular-nums; letter-spacing: -2px; min-width: 76px; }
.num.met { width: 68px; height: 68px; min-width: 68px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
#app .num.met svg { width: 36px; height: 36px; stroke-width: 2.6; }
.num.lockn { color: #fff; min-width: 0; }
#app .num.lockn svg { width: 46px; height: 46px; }
.hero-lab { display: grid; gap: 2px; font-size: 14px; color: #c2c9c4; line-height: 1.35; }
.hero-lab strong { color: #fff; font-size: 19px; font-weight: 600; }
.hero-lab .bad { color: #ff9db0; font-weight: 600; }
.segs { display: flex; gap: 6px; }
.segm { display: grid; gap: 5px; min-width: 0; }
.segm::before { content: ""; grid-area: 1 / 1; height: 6px; border-radius: 99px; background: #3d4543; }
.segm i { grid-area: 1 / 1; height: 6px; border-radius: 99px; background: var(--orange); transition: width 0.35s ease; }
.segm span { font-size: 11.5px; color: #a3aca7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta { font-size: 17px; padding: 16px; border-radius: 14px; }
.hero.small { position: sticky; top: calc(52px + var(--safe-t)); z-index: 25; padding: 0 18px 14px; gap: 10px; border-radius: 0 0 20px 20px; }
.hero.small .num { font-size: 50px; min-width: 56px; letter-spacing: -1px; }
.hero.small .num.met { width: 46px; height: 46px; min-width: 46px; }
#app .hero.small .num.met svg { width: 26px; height: 26px; }
.hero.small .hero-lab strong { font-size: 16px; }
.hero.small .hero-lab { font-size: 13px; }
.hero.lockhero .hero-lab { font-size: 14px; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.num.bump { animation: bump 0.32s ease; transform-origin: left center; }
.ticker { display: flex; gap: 10px; align-items: baseline; background: #0e1112; border-radius: 10px; padding: 9px 12px; min-width: 0; }
.tk-l { font-size: 11.5px; color: #8b9590; font-weight: 500; }
.tk-m { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; color: #a6d8dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* home */
.hello { background: var(--navy); color: #fff; padding: 8px 18px 24px; border-radius: 0 0 24px 24px; }
.hello h1 { color: #fff; font-size: 30px; font-weight: 700; margin: 0 0 6px; }
.unit { margin: 0; font-size: 13.5px; color: #c2c9c4; display: flex; align-items: center; gap: 8px; }
.unit span { color: #8b9590; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #3fcf8e; box-shadow: 0 0 0 4px rgba(63, 207, 142, 0.18); }

.page { padding: 16px 14px calc(var(--tabh) + var(--safe-b) + 28px); display: grid; gap: 12px; }
.page h2 { font-size: 13.5px; font-weight: 600; color: var(--slate); margin: 12px 4px 0; }
.rows { background: #fff; border-radius: 16px; overflow: hidden; }
.rows > * + * { border-top: 1px solid var(--hair); }
.small { font-size: 13px; }
.fine { font-size: 12.5px; color: var(--muted); margin: 0 4px; line-height: 1.45; }
.addr { margin: 0 4px; line-height: 1.45; }

.siterow { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; color: inherit; }
.sr-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sr-main strong { font-size: 16px; font-weight: 600; color: var(--navy); }
.sr-main > span { font-size: 13px; color: var(--muted); }
.live { font-style: normal; color: var(--orange-ink); font-weight: 600; margin-left: 8px; }
.meter { height: 5px; background: #ebecf2; border-radius: 99px; overflow: hidden; margin-top: 5px; }
.meter i { display: block; height: 100%; background: var(--orange); border-radius: 99px; }
.meter.met i { background: var(--green); }
.sr-num { text-align: right; display: grid; justify-items: end; min-width: 54px; }
.sr-num b { font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.sr-num span { font-size: 11.5px; color: var(--muted); }
.sr-num.met { color: var(--green); }
.sr-num.lockn { color: var(--crimson); }
.siterow.locked .sr-main strong { color: var(--slate); }

.foot-links { margin: 14px 4px 0; display: grid; gap: 10px; font-size: 13.5px; color: var(--slate); }
.foot-links p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.link { background: none; border: 0; padding: 0; color: var(--orange-ink); text-decoration: underline; font-size: inherit; }
.foot-links a { color: var(--orange-ink); }

/* loops */
.looprow { padding: 14px 16px; display: grid; gap: 8px; }
.lr-top { display: flex; align-items: baseline; gap: 8px; }
.lr-top strong { font-size: 15px; color: var(--navy); }
.lr-top span { flex: 1; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-top b { font-size: 13.5px; font-weight: 600; color: var(--orange-ink); white-space: nowrap; }
.lr-top b.ok, .trio .ok { color: var(--green); }
.trio { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--slate); font-variant-numeric: tabular-nums; }
.flag { margin: 0; font-size: 13px; color: var(--crimson); font-weight: 500; line-height: 1.4; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #e3e7e3; border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 11px 6px; font-weight: 600; font-size: 14px; color: var(--slate); }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(21, 25, 27, 0.16); }

.setrow { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 0; width: 100%; text-align: left; text-decoration: none; color: var(--slate); min-height: 60px; }
.setrow span { flex: 1; display: grid; gap: 1px; }
.setrow strong { font-size: 15px; font-weight: 600; color: var(--navy); }
.setrow small { font-size: 12.5px; color: var(--muted); }
.setrow input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 99px; background: #d4d9d5; position: relative; transition: background 0.18s; flex-shrink: 0; }
.setrow input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.18s; }
.setrow input[type="checkbox"]:checked { background: var(--orange); }
.setrow input[type="checkbox"]:checked::after { transform: translateX(20px); }
.settings { margin-top: 8px; }

/* test list */
.controls { display: flex; gap: 8px; align-items: center; padding: 14px 14px 0; }
.filter { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #e3e7e3; border-radius: 12px; padding: 3px; gap: 2px; }
.filter button { border: 0; background: transparent; border-radius: 9px; padding: 9px 2px; font-weight: 600; font-size: 13.5px; color: var(--slate); white-space: nowrap; }
.filter button i { font-style: normal; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(21, 25, 27, 0.16); }
.icon { width: 44px; height: 44px; border-radius: 12px; border: 0; background: #e3e7e3; color: var(--navy); display: grid; place-items: center; flex-shrink: 0; }
.searchbar { flex: 1; display: flex; gap: 8px; }
.searchbar input { flex: 1; border: 2px solid var(--navy); border-radius: 12px; padding: 0 14px; height: 44px; background: #fff; font-size: 16px; min-width: 0; }
.viewsw { padding: 10px 14px 0; }
.list-page { padding-top: 12px; padding-bottom: calc(var(--tabh) + var(--safe-b) + 96px); }
.dev { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; text-align: left; background: #fff; border: 0; width: 100%; padding: 13px 14px 13px 16px; min-height: 62px; position: relative; }
.dev::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: transparent; }
.dev.s-due::before { background: var(--orange); } .dev.s-fail::before { background: var(--crimson); } .dev.s-pass::before { background: var(--green); }
.dv-a { font-weight: 700; color: var(--navy); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.dv-m { min-width: 0; display: grid; gap: 1px; }
.dv-m strong { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-m small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-s { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dv-s em { font-style: normal; }
.s-due .dv-s { color: var(--orange-ink); } .s-fail .dv-s { color: var(--crimson); } .s-pass .dv-s { color: var(--green); } .s-na .dv-s { color: var(--slate); }
#app .dv-s svg { width: 16px; height: 16px; stroke-width: 2.6; }
.s-pass .dv-m strong, .s-na .dv-m strong { color: var(--slate); }
.empty { text-align: center; color: var(--muted); padding: 34px 20px; margin: 0; background: #fff; }
.loop-pick { display: flex; gap: 6px; }
.loop-pick button { border: 1.5px solid var(--hair); background: #fff; border-radius: 99px; padding: 8px 16px; font-weight: 600; font-size: 13.5px; color: var(--slate); }
.loop-pick button.on { background: var(--navy); border-color: var(--navy); color: #fff; }

.fab { position: fixed; right: max(14px, calc(50vw - 266px)); bottom: calc(var(--tabh) + var(--safe-b) + 14px); z-index: 26; border: 0; background: var(--orange); color: #fff; font-weight: 700; font-size: 15.5px; border-radius: 99px; padding: 15px 20px; display: flex; align-items: center; gap: 9px; box-shadow: 0 8px 22px rgba(21, 25, 27, 0.32); }
.fab small { font-weight: 600; font-size: 11px; background: rgba(255, 255, 255, 0.22); padding: 2px 7px; border-radius: 99px; }
.fab:active { transform: scale(0.97); }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabh) + var(--safe-b) + 84px); transform: translateX(-50%); z-index: 40; background: var(--green); color: #fff; font-weight: 600; font-size: 14px; padding: 9px 16px 9px 12px; border-radius: 99px; display: flex; gap: 6px; align-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); white-space: nowrap; }
#app .toast svg { width: 18px; height: 18px; stroke-width: 2.6; }

/* bottom tabs */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; z-index: 28; background: #fff; border-top: 1px solid var(--hair); display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabh) + var(--safe-b)); padding-bottom: var(--safe-b); }
.tabs a { display: grid; justify-items: center; align-content: center; gap: 3px; text-decoration: none; color: #8b9590; font-size: 11.5px; font-weight: 600; }
.tabs a.on { color: var(--navy); }
.tabs a.on svg { color: var(--orange); }

/* registration, guide, shared pieces inside the app */
.regcard { background: #fff; border-radius: 16px; padding: 16px; display: grid; gap: 12px; }
.regcard select { font-size: 16px; height: 48px; }
.guidepage .gh { font-size: 24px; margin: 4px 4px 0; }
.guidepage .guide { background: #fff; border-radius: 16px; padding: 16px; font-size: 14.5px; line-height: 1.5; }
.guidepage .guide h4 { font-size: 14.5px; margin-top: 12px; }
#app .ewis .plan, #app #plan .plan { border-radius: 14px; border-color: var(--hair); }
#app .ewis .chips { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #e3e7e3; border-radius: 12px; padding: 3px; gap: 3px; }
#app .ewis .chip { border: 0; background: transparent; border-radius: 9px; padding: 10px 4px; }
#app .ewis .chip.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(21, 25, 27, 0.16); }
#app .ewis-zone strong { font-size: 16px; color: var(--navy); }
#app .ewis-h { font-size: 13.5px; font-weight: 600; color: var(--slate); margin: 10px 4px 0; }
#app .ewis .list { background: #fff; border-radius: 16px; overflow: hidden; gap: 0; }
#app .ewis .list > * + * { border-top: 1px solid var(--hair); }
#app .erow, #app .ewis .dev { box-shadow: none; border-radius: 0; padding: 12px 14px; }
#app .ewis .dev { grid-template-columns: 44px 1fr auto; padding-left: 16px; }
#app .ewis .dev::before { display: none; }
#app .mini { padding: 9px 10px; border-radius: 9px; font-size: 12.5px; min-height: 38px; }
#app .ewis .feed { box-shadow: none; border-radius: 16px; }
#app .plan-tools .btn { flex: 1 1 auto; }
@media (prefers-reduced-motion: reduce) { .num.bump { animation: none; } .segm i, .setrow input[type="checkbox"], .setrow input[type="checkbox"]::after { transition: none; } }
#app .plan svg { width: 100%; height: auto; }
.num { flex-shrink: 0; }
.num.lockn { display: grid; place-items: center; width: 56px; height: 56px; letter-spacing: 0; }
#app .num.lockn svg { width: 40px; height: 40px; }
.hero.lockhero .hero-row { align-items: flex-start; }
.tabs a { font-size: 11px; }
#app .pump { display: grid; gap: 10px; }
#app .pump + .pump { margin-top: 18px; }
#app .pump .erow .pill { flex-shrink: 0; }
.recs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.recs .lbl { align-content: end; }
.need { background: #fff; border-radius: 16px; padding: 14px 16px; display: grid; gap: 5px; font-size: 14px; }
.need strong { font-size: 13.5px; color: var(--slate); font-weight: 600; }
.need p { margin: 0; color: var(--ink); line-height: 1.4; }
.need p b { color: var(--navy); margin-right: 4px; }
.need small { color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 3px; }
.warnpick { display: grid; gap: 8px; }
.pick-l { font-size: 13.5px; font-weight: 600; color: var(--slate); margin: 0 4px; }
.warnpick .fine strong { color: var(--navy); }
.badge { font-style: normal; background: var(--orange); color: #fff; font-weight: 700; font-size: 13px; min-width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; padding: 0 7px; flex: 0 0 auto !important; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.kinds button { border: 1.5px solid var(--hair); background: #fff; border-radius: 99px; padding: 7px 12px; font-weight: 600; font-size: 13px; color: var(--slate); min-height: 36px; }
.kinds button i { font-style: normal; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 2px; }
.kinds button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.kinds button.on i { color: #c2c9c4; }
.kindrow { display: flex; align-items: center; gap: 12px; padding: 13px 16px; text-decoration: none; color: var(--slate); }
.kr-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.kr-main strong { font-size: 15px; font-weight: 600; color: var(--navy); }
.kr-main small { font-size: 12.5px; color: var(--muted); }
.sched-set { background: #fff; border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; }
.sched-set strong { color: var(--navy); font-size: 15px; }
.sched-set .two input, .sched-set .two select { font-size: 16px; font-weight: 600; height: 48px; }
#app .sched .vrow { grid-template-columns: 1fr auto; padding-left: 16px; width: 100%; }
#app .sched .vrow .dd strong { display: block; font-size: 15px; color: var(--navy); font-weight: 600; }
#app .sched .vlink { text-decoration: none; color: inherit; }
#app .sched .back { color: var(--orange-ink); padding: 0 4px; font-size: 14px; }
#app .causes { padding: 0; }
.want { color: var(--navy); }

/* ---- TestHut look ---- */
.top .th-logo { margin-left: 8px; font-size: 18px; color: #fff; }
.hero { border-radius: 0; border-bottom: 4px solid var(--orange); }
.tabs a.on svg { color: var(--green); }
.num { color: #6fd3dc; }
