/* Compact navigation and readable controls on tablets and phones. */
.daily-cards{display:none}
@media(max-width:900px){
  .sidebar{position:static;inset:auto;width:100%;padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-right:0;border-bottom:1px solid var(--line)}
  .sidebar .workspace-label,.sidebar .nav-active,.sidebar .sidebar-note,.sidebar .sidebar-footer{display:none}
  .brand{margin:0;padding:0;width:220px;max-width:55%;flex:0 1 220px;min-width:0}
  .product-name{display:flex;align-items:center;gap:8px;margin:0;font-size:16px;white-space:nowrap}
  .product-name span{display:none}.product-name svg{margin:0;width:19px}
  main{margin:0;padding:0 24px;min-width:0}.workspace-grid{grid-template-columns:minmax(0,1fr)}
  .topbar{height:auto;min-height:54px;flex-wrap:wrap;gap:8px;padding:14px 0}.intro{padding-top:24px}
  .intro>p{max-width:600px}.intro h1{font-size:clamp(24px,4.8vw,38px);letter-spacing:-.6px;overflow-wrap:anywhere}
  .steps{gap:12px;justify-content:space-between}.steps li{font-size:12px}
  .button,.text-button{min-height:48px;font-size:14px}.icon-button{min-width:44px;min-height:44px}
  .upload-card{min-width:0}.card-heading{flex-wrap:wrap;gap:8px;margin-bottom:16px}.card-heading h2{margin:8px 0 0}
  .pill{margin:0;font-size:10px}.dropzone{min-height:185px}.capture-hint p{font-size:12px}
  .results-heading{align-items:stretch;flex-direction:column;gap:12px}.results-heading .button{align-self:stretch}
  .results-heading h2{font-size:clamp(21px,4vw,28px);overflow-wrap:anywhere}
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric>span{font-size:13px}.metric>small{font-size:11px}
  .page-footer{flex-direction:column;gap:16px}.page-footer p{max-width:none;font-size:12px}
  dialog{max-height:calc(100dvh - 24px);overflow-y:auto}.video-wrap{min-height:120px}video{max-height:45dvh}
  .raw-details summary{min-height:48px;display:flex;align-items:center;font-size:13px}.raw-details summary::before{content:'▸';margin-right:8px}.raw-details[open] summary::before{content:'▾'}
}
@media(max-width:700px){
  .readings-card .table-scroll{display:none}.daily-cards{display:grid;gap:14px;padding:0 16px 6px}
  .table-heading{flex-wrap:wrap;align-items:flex-start;gap:8px;padding:20px 16px}.table-heading h3{font-size:16px}.table-heading>span{font-size:11px}
  .day-card{min-width:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}
  .day-card h4{font-size:15px;font-weight:600;margin:0;padding:14px;background:#e6ecf7;color:var(--navy);overflow-wrap:anywhere}
  .day-card section{padding:14px}.day-card section+section{border-top:1px solid var(--line)}
  .day-card h5{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:14px;font-weight:600;margin:0 0 12px;color:var(--navy)}
  .day-card h5>span{font-size:12px;font-weight:400;color:var(--muted);overflow-wrap:anywhere;max-width:100%}
  .day-card dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0}
  .day-card dl>div{min-width:0;background:#f4f6fa;border-radius:7px;padding:10px 5px;text-align:center}
  .day-card dt{font-size:11px;color:var(--muted);margin-bottom:6px}.day-card dd{font-size:17px;font-weight:600;margin:0;overflow-wrap:anywhere;color:var(--navy)}
  .day-card dd.needs-review{color:#91631f;font-size:15px}.day-pulse{padding:12px 14px;margin:0;border-top:1px solid var(--line);font-size:12px;color:var(--muted);overflow-wrap:anywhere}
  .review-note{font-size:12px;padding:16px;line-height:1.7}
}
@media(max-width:480px){
  .sidebar{padding:18px 16px;gap:14px}.brand{max-width:58%}.product-name{font-size:13px;gap:5px}.product-name svg{width:16px}
  main{padding:0 16px}.topbar>span:first-child{font-size:8px;letter-spacing:.6px}.session-badge{font-size:10px}
  .intro h1{font-size:clamp(21px,6.1vw,29px);line-height:1.4;margin:12px 0}.intro>p{font-size:14px;line-height:1.65}.intro .eyebrow{font-size:8px}
  .steps{margin:22px 0 18px;gap:8px}.steps li{font-size:10px;gap:5px}.steps li>span{width:22px;height:22px;flex-shrink:0}
  .upload-card{padding:18px 14px}.card-heading h2{font-size:18px}.dropzone{min-height:165px;padding:18px 10px}
  .dropzone h3{font-size:14px}.dropzone p{font-size:12px}.dropzone span{font-size:11px}.upload-symbol{width:40px;height:40px;margin-bottom:12px}
  .capture-hint{margin:12px 0 16px}.capture-hint p{font-size:12px;line-height:1.65}.upload-footer{flex-direction:column-reverse;align-items:stretch}.upload-footer>span{text-align:center;font-size:12px}
  .source-actions{gap:8px}.source-actions .button{padding:10px 8px;font-size:13px}.metrics{gap:10px}.metric{padding:16px 12px}.metric>span{font-size:12px}.metric>strong{font-size:30px}
  .results-heading p{font-size:13px}.results-heading h2{font-size:22px}.results{scroll-margin-top:16px}.processing{flex-wrap:wrap}.processing .text-button{min-width:70px}
  .camera-actions{flex-direction:column-reverse}.camera-heading h2{font-size:17px;line-height:1.4}.camera-heading{align-items:flex-start}.camera-heading .eyebrow{font-size:9px}dialog{padding:18px;width:calc(100% - 20px)}
}
@media(max-width:360px){.source-actions{grid-template-columns:1fr}.topbar{align-items:flex-start;flex-direction:column;gap:7px}.day-card section{padding:12px 10px}.day-card dd{font-size:15px}.day-card dt{font-size:10px}.brand{max-width:56%}.steps li{font-size:9px}}
@supports(padding-bottom:env(safe-area-inset-bottom)){main{padding-bottom:env(safe-area-inset-bottom)}dialog{padding-bottom:max(18px,env(safe-area-inset-bottom))}}
@media(max-width:480px){
  .sidebar{flex-direction:column;align-items:flex-start;gap:12px}
  .sidebar .brand{flex:0 1 auto;max-width:230px;width:100%}
  .sidebar .product-name{font-size:15px;white-space:normal}
}

.workspace-status{display:flex;align-items:center;justify-content:flex-end;gap:18px;flex-wrap:wrap}
.service-health{display:inline-flex;align-items:center;gap:7px;font-size:12px;letter-spacing:0;color:#55607a}
.service-health i{width:8px;height:8px;border-radius:50%;background:#91631f;flex-shrink:0}
.service-health[data-state=online]{color:#1a6b48}.service-health[data-state=online] i{background:#1a6b48}
.service-health[data-state=offline]{color:#a23c35}.service-health[data-state=offline] i{background:#a23c35}
@media(max-width:900px){.topbar{flex-wrap:wrap}.workspace-status{justify-content:flex-start;gap:10px 16px}.service-health{font-size:12px}}
@media(max-width:480px){.topbar{align-items:flex-start;flex-direction:column;gap:10px;padding:14px 0}.workspace-status{width:100%;justify-content:space-between;gap:10px}.workspace-status .session-badge{font-size:10px}}
