/* Mobile-first screen prototype. Desktop operations keep the original layout. */
:root{--preview-height:48px;--phone-width:440px;--banner-h:32px;--topbar-h:56px}
[hidden]{display:none!important}
.preview-bar{height:var(--preview-height);position:sticky;top:0;z-index:210;display:flex;align-items:center;justify-content:center;gap:24px;background:#fff;border-bottom:1px solid var(--line);font-size:13px}
.preview-bar a{font-weight:700;text-decoration:none}.preview-switch{display:flex;gap:4px}.preview-switch button{min-height:36px;padding:6px 16px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-weight:700}
.preview-switch button[aria-pressed=true]{background:var(--blue);color:#fff}
.proto-banner{top:var(--preview-height);height:auto;min-height:32px;gap:16px;font-size:12px;line-height:1.5;padding:6px 10px}
.staff-view .app-side{top:calc(var(--preview-height) + var(--banner-h));height:calc(100dvh - var(--preview-height) - var(--banner-h))}
.phone-view{background:#e8edf5}.phone-view .device-surface{max-width:var(--phone-width);min-height:calc(100svh - var(--preview-height));margin:0 auto;background:var(--surface);box-shadow:0 0 0 1px #d8dfe9,0 12px 48px #17245214}
.phone-view .app-shell{display:block;min-height:0}.phone-view .app-side{display:none}
.phone-view .mobile-topbar{display:flex;top:calc(var(--preview-height) + var(--banner-h));height:56px;padding:8px 18px;background:var(--blue-deep)}
.phone-view .app-logo{font-size:18px}.phone-view .app-logo span{font-size:12px;color:#c4cffb}
.phone-view .mobile-menu-btn{height:44px;width:44px;font-size:22px}
.phone-view .mobile-nav-panel{width:min(100%,var(--phone-width));left:50%;right:auto;transform:translateX(-50%);top:calc(var(--preview-height) + var(--banner-h) + 56px);bottom:0;padding:18px}
.phone-view .mobile-nav-panel .side-nav a{font-size:16px;min-height:48px}
.phone-view .app-main{padding:22px 18px calc(104px + env(safe-area-inset-bottom));min-width:0}
.phone-view .page-head{display:block;margin-bottom:18px}.phone-view .page-head h1{font-size:24px;line-height:1.4;letter-spacing:-.04em}
.phone-view .page-eyebrow{font-size:12px;margin-bottom:6px}.phone-view .page-sub{font-size:15px;line-height:1.7;margin-top:8px}
.phone-view .head-actions{margin-top:14px;align-items:center;gap:8px}.phone-view .route-tag,.phone-view .head-actions>.badge{display:none}
.phone-view .grid-2,.phone-view .grid-3,.phone-view .grid-4,.phone-view .decision-options{grid-template-columns:minmax(0,1fr)!important;gap:14px}
.phone-view .card,.phone-view .panel,.phone-view .option{padding:18px;border-radius:16px;min-width:0}
.phone-view .card h3,.phone-view .panel h3{font-size:18px}.phone-view .card p,.phone-view .panel p{font-size:16px;line-height:1.7}
.phone-view .panel-kicker,.phone-view .field label{font-size:14px;line-height:1.5}.phone-view .source-note,.phone-view .hint,.phone-view .cell-label{font-size:12px;line-height:1.6}
.phone-view .cell-value,.phone-view .person strong{font-size:16px}.phone-view .person span{font-size:13px}.phone-view .person strong{white-space:normal}
.phone-view .status-pill{font-size:14px;justify-self:start;line-height:1.5;padding:6px 10px}.phone-view .badge{font-size:12px}
.phone-view .btn,.phone-view .tabbar button{min-height:46px;font-size:15px;line-height:1.5;padding:11px 14px;white-space:normal}
.phone-view .btn-sm{min-height:44px;font-size:14px}.phone-view .close-x{min-width:44px;min-height:44px}
.phone-view input:not([type=checkbox]):not([type=radio]),.phone-view textarea,.phone-view select{width:100%;max-width:100%;min-width:0;font-size:16px;min-height:48px;line-height:1.5}
.phone-view textarea{min-height:110px}.phone-view input[type=checkbox],.phone-view input[type=radio]{width:22px;height:22px;flex:0 0 22px;accent-color:var(--blue);margin:2px 0}
.phone-view .checkline,.phone-view .pick{font-size:14px;line-height:1.7;min-height:44px;gap:10px;padding-block:8px}
.phone-view .field+.field{margin-top:4px}.phone-view .unknown-note{font-size:14px;line-height:1.7}
.phone-view .list{background:transparent;border:0;border-radius:0;overflow:visible}
.phone-view .list-row{grid-template-columns:minmax(0,1fr)!important;gap:12px;padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff}
.phone-view .list-row+.list-row{margin-top:12px}.phone-view .list-row>.btn{width:100%}.phone-view .list-row .person{align-items:flex-start}.phone-view .avatar{width:44px;height:44px;font-size:13px}
.phone-view .tabbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.phone-view .tabbar button{padding:10px 4px;font-size:13px;line-height:1.5}
.phone-view .bottom-tabbar{display:block;position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:min(100%,var(--phone-width));padding:8px 6px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -4px 20px #1125530a;z-index:180}
.phone-view .bottom-tabbar a{min-height:52px;padding:5px 0;font-size:12px;gap:2px}.phone-view .bottom-tabbar .ic{font-size:23px;line-height:26px}
.phone-view .overlay{align-items:flex-end;justify-content:center}.phone-view .drawer{width:min(100%,var(--phone-width));height:auto;max-height:calc(100dvh - 64px);border-radius:24px 24px 0 0;padding:22px 20px calc(24px + env(safe-area-inset-bottom));overscroll-behavior:contain}
.phone-view .drawer-head{position:sticky;top:-22px;background:#fff;padding-top:10px;z-index:1}.phone-view .drawer-head h3{font-size:19px;line-height:1.5}
.phone-view .modal-overlay{padding:16px}.phone-view .modal{max-height:calc(100dvh - 32px);overflow:auto;width:min(400px,100%);padding:22px}.phone-view .modal h3{font-size:20px;line-height:1.5}.phone-view .modal p{font-size:16px}
.phone-view .modal-actions{display:grid;grid-template-columns:1fr;gap:10px}.phone-view .toast-wrap{left:50%;right:auto;transform:translateX(-50%);bottom:100px;width:min(calc(100% - 32px),408px)}
.phone-view .toast{font-size:14px}.phone-view .simple-shell{padding:28px 20px 72px;max-width:100%;min-height:calc(100svh - var(--preview-height) - 32px)}
.phone-view .simple-shell h1{font-size:25px;line-height:1.4}.phone-view .simple-shell h2{font-size:18px}.phone-view .simple-shell p,.phone-view .simple-shell li{font-size:16px;line-height:1.8;overflow-wrap:anywhere}
.phone-view .center-card{margin:8px auto;padding:22px 18px;max-width:100%}.phone-view .simple-shell .breadcrumb{font-size:13px}.phone-view .center-card .ic{font-size:32px}
.phone-view .device-surface [style*="display:flex"],.phone-view .device-surface [style*="display: flex"]{flex-wrap:wrap}
.phone-view .device-surface [style*="grid-template-columns"]:not(.tabs){grid-template-columns:minmax(0,1fr)!important}
.phone-view .option strong{font-size:18px!important}.phone-view .option ul{font-size:15px;line-height:1.7}.phone-view .option-letter{font-size:24px}.phone-view .option-letter span{font-size:12px}
.phone-view .option:has(input:checked){border-color:var(--blue);background:#f5f7ff}.phone-view a,.phone-view p,.phone-view strong{overflow-wrap:anywhere}
.prototype-tools{margin:0 0 16px;color:var(--muted);font-size:12px}.prototype-tools>summary{cursor:pointer;min-height:34px;padding:7px 0}.prototype-tools .state-toolbar{margin:4px 0 0}
.prototype-tools .state-toolbar button{min-height:40px}.prototype-meta{margin-top:24px;font-size:12px;color:var(--muted)}.prototype-meta summary{cursor:pointer;padding:10px 0}.prototype-meta .mini-footer{margin:0;padding:10px 0;line-height:1.7}
/* State visibility must win over layout classes for every prototype state. */
[data-state-block]{display:none!important}[data-state-block].state-visible{display:block!important}[data-state-block].state-visible.stack{display:grid!important}
.home-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.home-heading h1{font-size:25px}.home-heading p{font-size:14px;color:var(--muted);margin-bottom:4px}
.home-next{background:var(--blue-deep);border:0;color:#fff;padding:22px;border-radius:20px}.home-next .panel-kicker{color:#bdcdff}.home-next h2{font-size:21px;line-height:1.5;margin:12px 0 8px}.home-next p{font-size:15px;color:#e2e8ff;line-height:1.7}.home-next .btn{background:#fff;color:var(--blue-deep);width:100%;margin-top:18px}
.home-section{margin-top:24px}.home-section h2{font-size:18px;margin-bottom:12px}.quick-consult{display:flex;gap:14px;align-items:center;padding:20px;border:1px solid #c9d3f7;border-radius:18px;background:#fff;text-decoration:none;color:var(--ink)}.quick-consult .voice-dot{width:48px;height:48px;border-radius:50%;background:var(--blue);color:#fff;display:grid;place-items:center;font-size:24px;flex-shrink:0}.quick-consult strong{font-size:17px}.quick-consult p{font-size:14px;color:var(--muted);margin-top:4px}.quick-consult .arrow{margin-left:auto;font-size:24px;color:var(--blue)}
.section-link{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.section-link h2{margin:0}.section-link a{font-size:14px;padding:8px 0}
.metric-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.metric-pair .metric{padding:16px;background:#fff;border:1px solid var(--line);border-radius:14px}.metric span{font-size:12px;display:block;color:var(--muted)}.metric strong{font-size:26px;display:block;margin:6px 0;color:var(--blue-deep)}
.phone-view .consult-head{margin-bottom:16px}.consult-progress{font-size:14px;color:var(--muted);display:flex;justify-content:space-between;margin-bottom:18px}.consult-question{font-size:23px;line-height:1.6;color:var(--ink);margin:8px 0 22px}.consult-label{color:var(--blue);font-size:14px;font-weight:700}.consult-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:22px 20px}.input-switch{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:5px;background:#e8edf8;border-radius:13px;margin:18px 0}.input-switch button{min-height:44px;background:transparent;color:var(--muted);border:0;border-radius:9px;font-size:15px;font-weight:700}.input-switch button[aria-pressed=true]{background:#fff;color:var(--blue);box-shadow:0 2px 6px #10246f12}
.voice-control{display:flex;flex-direction:column;align-items:center;gap:12px;padding:8px 0 18px}.voice-control button{border:0;border-radius:50%;width:76px;height:76px;background:var(--blue);color:white;font-size:28px;box-shadow:0 7px 22px #1939b730}.voice-control p{font-size:13px;color:var(--muted)}.consult-actions{display:grid;gap:8px;margin-top:16px}.answer-label{display:block;font-size:14px;font-weight:700;margin-bottom:8px}.consult-status{font-size:14px;line-height:1.7;color:var(--blue);margin-top:14px;min-height:24px}.consult-status.error{color:var(--red)}.consult-summary{margin-top:18px;padding:16px;border-radius:14px;background:var(--blue-pale);font-size:15px}.history-details{margin-top:22px;font-size:14px}.history-details summary{cursor:pointer;padding:12px 0;font-weight:700}.history-details li{padding:14px 0;border-bottom:1px solid var(--line);font-size:14px}
.index-intro{font-size:17px!important;max-width:800px}.index-start{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}.index-start a{padding:22px;border-radius:18px;background:var(--blue-deep);color:#fff;text-decoration:none;font-size:18px;font-weight:750}.index-start a:last-child{background:#fff;color:var(--blue-deep);border:1px solid var(--line)}.index-start span{display:block;font-size:14px;margin-top:6px;font-weight:500}
@media(max-width:760px){:root{--preview-height:0px}.preview-bar{display:none}.phone-view{background:var(--surface)}.phone-view .device-surface{box-shadow:none;max-width:none}.phone-view .bottom-tabbar,.phone-view .mobile-nav-panel{width:100%}.phone-view .overlay .drawer{width:100%}.index-start{grid-template-columns:1fr}.proto-banner{font-size:12px}.phone-view .simple-shell{padding-top:24px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.skeleton{animation:none}.toast{transition:none}}
