:root{--ink:#182430;--paper:#f1f3ef;--panel:#fff;--blue:#3e6e8e;--blue-dark:#2c5470;--muted:#66717d;--line:#dce1dd;--danger:#9d2a2a;--ok:#25673e}*{box-sizing:border-box}body{margin:0;background:var(--paper);font-family:Arial,"Segoe UI",sans-serif;color:var(--ink);line-height:1.45}.site-header{min-height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:10px max(20px,calc((100vw - 1040px)/2))}.brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none;font-weight:700}.brand img{width:42px;height:46px;object-fit:cover;border-radius:4px}.site-header nav{display:flex;align-items:center;gap:18px}.site-header nav a,.link-button{color:var(--blue-dark);font:inherit;text-decoration:none;background:none;border:0;padding:0;cursor:pointer}.shell{max-width:1040px;margin:34px auto;padding:0 20px;min-height:calc(100vh - 170px)}footer{text-align:center;color:var(--muted);font-size:.8rem;padding:24px}.card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:28px;max-width:640px;margin:0 auto}.wide-card{max-width:900px}.field{margin:0 0 18px}.field label{display:block;font-weight:700;margin-bottom:6px}.field input,.field select{width:100%;min-height:42px;padding:8px 10px;border:1px solid #aeb8c1;border-radius:7px;font:inherit}.field input:focus{outline:3px solid rgba(62,110,142,.18);border-color:var(--blue)}button,.button{display:inline-block;background:var(--blue);color:#fff;border:0;border-radius:7px;padding:10px 16px;font:inherit;font-weight:700;cursor:pointer;text-decoration:none}.button.secondary{background:#5f6972}.validation-summary-errors,.field-validation-error,.error{color:var(--danger)}.notice{padding:12px 14px;border-radius:7px;background:#edf6ef;border:1px solid #b9d9c1;color:var(--ok);margin:0 0 18px}.warning{padding:12px 14px;border-radius:7px;background:#fff8e7;border:1px solid #e4c878;margin:0 0 18px}.muted{color:var(--muted)}.mono{font-family:Consolas,"Courier New",monospace}.recovery-codes{columns:2;font-family:Consolas,"Courier New",monospace;font-size:1.05rem}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.user-table{width:100%;border-collapse:collapse;background:#fff}.user-table th,.user-table td{text-align:left;padding:10px;border-bottom:1px solid var(--line)}.report-page{background:#fff;padding:26px;border:1px solid var(--line)}.report-header{display:grid;grid-template-columns:110px 1fr 110px;gap:16px;align-items:end}.report-header img{max-width:100%}.report-title{text-align:center}.patient-admin{display:grid;grid-template-columns:1fr 1fr;gap:28px}.report-gauge{display:block;width:100%;max-width:808px;margin:20px auto}.supplemental-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px}.percentile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:18px;background:#f7f9fa;border:1px solid var(--line);border-radius:8px}.percentile meter{width:100%;height:22px}.small{font-size:.88rem}.print-only{display:none}@media(max-width:700px){.site-header{align-items:flex-start;gap:12px}.site-header nav{flex-wrap:wrap;justify-content:flex-end}.grid2,.patient-admin,.supplemental-grid,.report-header{grid-template-columns:1fr}.report-header>img{display:none}.recovery-codes{columns:1}}@media print{body{background:#fff}.site-header,footer,.no-print{display:none!important}.shell{max-width:none;margin:0;padding:0}.report-page{border:0;padding:0}.page-break{break-before:page;page-break-before:always}.print-only{display:block}}

.qr-box{width:220px;max-width:100%;margin:18px auto}.qr-box svg{width:100%;height:auto;display:block}

/* 0.1.4 report percentile indicators and print layout */
.percentile-track{width:100%;height:12px;border:1px solid #b9c4bd;border-radius:999px;background:#fff;overflow:hidden;position:relative}
.percentile-fill{display:block;height:100%;background:#2f8f59;width:0}
@media print{
  @page{size:letter portrait;margin:.35in .4in}
  html,body{width:auto!important;height:auto!important}
  body{font-size:9.5pt;line-height:1.28;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .shell{width:auto!important;max-width:none!important;margin:0!important;padding:0!important;min-height:0!important}
  .report-page{width:auto!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important}
  .report-page section{break-inside:auto}
  .report-header{grid-template-columns:.72in 1fr .72in;gap:10px;align-items:start}
  .report-header>img{max-height:.76in;width:auto;justify-self:center}
  .report-title h1{font-size:16pt;line-height:1.08;margin:0 0 7px}
  .report-title h2,.report-title h3{margin-top:0}
  .patient-admin{gap:16px;font-size:8.5pt;text-align:left}
  .report-gauge{width:5.75in;max-width:100%;height:auto;margin:.12in auto .08in;break-inside:avoid;page-break-inside:avoid}
  .report-gauge + .small{font-size:8.3pt;line-height:1.22;margin:.06in 0 0}
  .page-break{break-before:page;page-break-before:always}
  .page-break>.report-title:first-child{font-size:16pt;line-height:1.12;margin:0 0 6px}
  .page-break>.report-title:nth-child(2){font-size:12pt;margin:0 0 10px}
  .supplemental-grid{grid-template-columns:1fr 1fr;column-gap:.28in;row-gap:.12in}
  .supplemental-grid>div{break-inside:avoid;page-break-inside:avoid}
  .supplemental-grid h3{font-size:10.5pt;margin:7px 0 5px}
  .supplemental-grid .small{font-size:8.4pt;line-height:1.24;margin:0}
  .percentile{gap:5px;padding:8px 10px;border-radius:5px;break-inside:avoid;page-break-inside:avoid}
  .percentile-track{height:8px;border:1px solid #86958c;background:#fff!important;overflow:hidden}
  .percentile-fill{height:100%;background:#2f8f59!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .supplemental-grid + .small{font-size:7.8pt;line-height:1.2;margin-top:9px}
}

/* 0.4.0 read-only audit review */
.audit-card{max-width:1240px}.audit-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 18px;align-items:end}.audit-filters .field{margin:0}.audit-filter-actions{display:flex;gap:10px;align-items:center}.audit-table-wrap{overflow-x:auto}.audit-table{min-width:1120px}.audit-table td,.audit-table th{vertical-align:top}.audit-pagination{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:18px}@media(max-width:800px){.audit-filters{grid-template-columns:1fr}}

/* 0.4.3 CSP-safe percentile gauges: dynamic width is an SVG attribute, not an inline CSS style. */
.percentile-gauge{display:block;width:100%;height:12px;overflow:visible}
.percentile-gauge-track{fill:#fff;stroke:#b9c4bd;stroke-width:.6}
.percentile-gauge-fill{fill:#2f8f59}
@media print{
  .percentile-gauge{height:8px}
  .percentile-gauge-track{fill:#fff;stroke:#86958c;stroke-width:.6}
  .percentile-gauge-fill{fill:#2f8f59}
}

/* 0.4.4 percentile widths: external CSS classes avoid inline-style and SVG/CSP issues. */
.p0{width:0%}
.p1{width:1%}
.p2{width:2%}
.p3{width:3%}
.p4{width:4%}
.p5{width:5%}
.p6{width:6%}
.p7{width:7%}
.p8{width:8%}
.p9{width:9%}
.p10{width:10%}
.p11{width:11%}
.p12{width:12%}
.p13{width:13%}
.p14{width:14%}
.p15{width:15%}
.p16{width:16%}
.p17{width:17%}
.p18{width:18%}
.p19{width:19%}
.p20{width:20%}
.p21{width:21%}
.p22{width:22%}
.p23{width:23%}
.p24{width:24%}
.p25{width:25%}
.p26{width:26%}
.p27{width:27%}
.p28{width:28%}
.p29{width:29%}
.p30{width:30%}
.p31{width:31%}
.p32{width:32%}
.p33{width:33%}
.p34{width:34%}
.p35{width:35%}
.p36{width:36%}
.p37{width:37%}
.p38{width:38%}
.p39{width:39%}
.p40{width:40%}
.p41{width:41%}
.p42{width:42%}
.p43{width:43%}
.p44{width:44%}
.p45{width:45%}
.p46{width:46%}
.p47{width:47%}
.p48{width:48%}
.p49{width:49%}
.p50{width:50%}
.p51{width:51%}
.p52{width:52%}
.p53{width:53%}
.p54{width:54%}
.p55{width:55%}
.p56{width:56%}
.p57{width:57%}
.p58{width:58%}
.p59{width:59%}
.p60{width:60%}
.p61{width:61%}
.p62{width:62%}
.p63{width:63%}
.p64{width:64%}
.p65{width:65%}
.p66{width:66%}
.p67{width:67%}
.p68{width:68%}
.p69{width:69%}
.p70{width:70%}
.p71{width:71%}
.p72{width:72%}
.p73{width:73%}
.p74{width:74%}
.p75{width:75%}
.p76{width:76%}
.p77{width:77%}
.p78{width:78%}
.p79{width:79%}
.p80{width:80%}
.p81{width:81%}
.p82{width:82%}
.p83{width:83%}
.p84{width:84%}
.p85{width:85%}
.p86{width:86%}
.p87{width:87%}
.p88{width:88%}
.p89{width:89%}
.p90{width:90%}
.p91{width:91%}
.p92{width:92%}
.p93{width:93%}
.p94{width:94%}
.p95{width:95%}
.p96{width:96%}
.p97{width:97%}
.p98{width:98%}
.p99{width:99%}
.p100{width:100%}

/* 0.4.5 image-based percentile gauges. The colored bar is foreground image content,
   not a CSS/SVG background, for reliable screen and print rendering. */
.percentile-image{display:block;width:100%;height:auto;max-width:600px}
@media print{
  .percentile-image{width:100%;height:auto;max-width:100%}
}

.hint{display:block;font-size:.82rem;color:var(--muted);margin-top:4px}
.step-indicator{color:var(--muted);font-size:.85rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;margin:0 0 6px}
.history-box{margin:0 0 18px;padding:14px 16px;background:#fff;border:1px solid var(--line);border-radius:8px}
.history-list{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:10px}
.history-list li{font-size:.88rem}
.history-list li.current span{color:var(--muted);font-weight:700}
.history-list a{color:var(--blue-dark)}
@media print{.history-box{display:none}}

.billing-card{max-width:1240px}.billing-filter{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.billing-filter .field{margin:0}.billing-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:22px 0}.billing-totals>div{padding:16px;background:#f7f9fa;border:1px solid var(--line);border-radius:8px}.billing-totals strong{display:block;font-size:1.7rem}.billing-totals span{color:var(--muted);font-size:.88rem}.billing-summary{margin-bottom:20px}.billing-detail{margin:14px 0;border:1px solid var(--line);border-radius:8px;background:#fff}.billing-detail summary{cursor:pointer;font-weight:700;padding:14px}.billing-detail .audit-table-wrap{border-top:1px solid var(--line)}.billing-tests{min-width:980px}@media(max-width:700px){.billing-totals{grid-template-columns:1fr}}

.button.danger{background:var(--danger)}
