:root{--ink:#17313b;--muted:#63747a;--brand:#0d766e;--brand-dark:#075b55;--pale:#eaf5f2;--line:#dbe5e3;--paper:#fff;--canvas:#f4f7f6;--danger:#a53632;--warning:#94620c;--shadow:0 18px 54px rgba(23,49,59,.08)}
*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--canvas)}body{margin:0;min-height:100vh;display:flex;flex-direction:column}.skip-link{position:absolute;left:-9999px}.skip-link:focus{left:1rem;top:1rem;background:white;padding:.75rem;z-index:10}.site-header{height:76px;padding:0 clamp(1rem,5vw,4.5rem);display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:.7rem;color:var(--ink);text-decoration:none}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:var(--brand);color:white;font-weight:800}.brand strong,.brand small{display:block}.brand small{font-size:.72rem;color:var(--muted);margin-top:.1rem}.site-header nav{display:flex;gap:1.4rem;align-items:center}.site-header nav a,.link-button{color:var(--ink);text-decoration:none;font:inherit;font-size:.92rem;border:0;background:none;padding:.4rem;cursor:pointer}.site-header nav a:hover,.link-button:hover{color:var(--brand)}.site-header nav form{margin:0}.page-shell{width:min(1180px,calc(100% - 2rem));margin:0 auto;padding:3.2rem 0 4rem;flex:1}footer{padding:1.4rem clamp(1rem,5vw,4.5rem);display:flex;justify-content:space-between;border-top:1px solid var(--line);font-size:.82rem;color:var(--muted);background:white}footer a{color:var(--brand)}h1,h2,p{margin-top:0}h1{font-size:clamp(2rem,4vw,3.4rem);line-height:1.06;letter-spacing:-.045em;margin-bottom:1rem}h2{font-size:1.18rem;letter-spacing:-.02em}.lede{font-size:1.08rem;line-height:1.65;color:var(--muted);max-width:650px}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-weight:800;color:var(--brand);font-size:.72rem;margin-bottom:.75rem}.auth-card,.patient-card,.legal-card{width:min(620px,100%);margin:2rem auto;background:var(--paper);border:1px solid var(--line);border-radius:24px;padding:clamp(1.5rem,5vw,3.5rem);box-shadow:var(--shadow)}.patient-card{text-align:center}.patient-card.wide{width:min(720px,100%)}.patient-card .lede{margin-left:auto;margin-right:auto}.legal-card{width:min(780px,100%)}.legal-card h2{margin-top:2rem}.legal-card p:not(.lede){color:var(--muted);line-height:1.7}.icon-lock,.success-ring{margin:1.4rem auto;width:72px;height:72px;border-radius:50%;display:grid;place-items:center;background:var(--pale);color:var(--brand);font-size:2rem;font-weight:800}.success-ring{border:2px solid var(--brand)}.stepper{width:210px;margin:0 auto 2rem;display:flex;align-items:center;justify-content:center}.stepper b,.stepper i{font-style:normal;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--line);color:#8a989c;font-size:.78rem}.stepper b{background:var(--brand);border-color:var(--brand);color:white}.stepper span{height:2px;background:var(--line);width:54px}.stepper span.done{background:var(--brand)}.stack-form{display:flex;flex-direction:column;text-align:left;gap:.55rem;margin-top:1.8rem}.stack-form.narrow{max-width:380px;margin-left:auto;margin-right:auto}label{font-size:.82rem;font-weight:750}input{width:100%;border:1px solid #bdcdca;background:#fbfdfd;color:var(--ink);border-radius:10px;padding:.85rem .95rem;font:inherit;outline:none}input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(13,118,110,.13)}button,.primary,.secondary{border:0;border-radius:10px;padding:.82rem 1.05rem;font:inherit;font-weight:750;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.primary{color:white;background:var(--brand);margin-top:.7rem}.primary:hover{background:var(--brand-dark)}.primary.small{font-size:.78rem;padding:.55rem .7rem;margin:0}.secondary{background:white;color:var(--brand);border:1px solid #a9c8c4;padding:.52rem .7rem;font-size:.8rem}.errorlist{list-style:none;padding:0;margin:.1rem 0 .5rem;color:var(--danger);font-size:.8rem}.notice{padding:.9rem 1rem;border-radius:10px;font-size:.88rem;line-height:1.5;margin:1rem 0}.notice.error{background:#fae9e7;color:var(--danger)}.notice.success{background:#e4f4ec;color:#176443}.notice.neutral{background:#edf4f3;color:#456268}.security-note{font-size:.78rem;color:var(--muted);margin:1.5rem 0 0}.dropzone{min-height:190px;border:2px dashed #afc9c5;border-radius:16px;background:#f7fbfa;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:1.5rem;cursor:pointer}.dropzone:hover{border-color:var(--brand);background:var(--pale)}.dropzone strong{font-size:1.05rem}.dropzone small{font-weight:400;color:var(--muted);margin-top:.35rem}.dropzone input{margin-top:1rem;max-width:420px;background:white}.upload-symbol{font-size:2rem;color:var(--brand);margin-bottom:.6rem}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:2rem}.page-heading h1{margin-bottom:.55rem}.page-heading p{color:var(--muted)}.user-pill{background:white;border:1px solid var(--line);padding:.55rem .8rem;border-radius:999px;font-size:.78rem}.panel{background:white;border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 30px rgba(23,49,59,.04);margin-bottom:1.5rem}.create-panel{padding:1.5rem}.create-panel>div:first-child p{color:var(--muted);font-size:.9rem}.inline-form{display:grid;grid-template-columns:1fr 1fr auto;gap:1rem;align-items:end}.inline-form .primary{margin:0}.generated-link{margin-top:1.2rem;padding:1rem;border:1px solid #9ecbc4;background:var(--pale);border-radius:12px}.generated-link p{font-size:.8rem;color:var(--muted);margin:.2rem 0 .65rem}.generated-link input{background:white;font-family:ui-monospace,monospace;font-size:.82rem}.panel-title{padding:1.2rem 1.4rem;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.panel-title h2{margin:0}.panel-title span{font-size:.78rem;color:var(--muted)}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:760px}th,td{text-align:left;padding:1rem 1.2rem;border-bottom:1px solid #edf1f0;font-size:.84rem;vertical-align:middle}th{color:var(--muted);font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;background:#fbfcfc}td small{display:block;margin-top:.27rem;color:var(--muted)}tbody tr:last-child td{border-bottom:0}.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.68rem;max-width:230px;overflow:hidden;text-overflow:ellipsis}.status{display:inline-block;padding:.32rem .55rem;border-radius:999px;font-size:.72rem;font-weight:800;background:#edf1f0;color:#536267}.status.clean,.status.open{background:#dff2e9;color:#176443}.status.pending,.status.error{background:#fff0cc;color:var(--warning)}.status.infected,.status.rejected,.status.expired{background:#fae5e3;color:var(--danger)}.status.uploaded{background:#e0ecf6;color:#2d5f88}.actions{display:flex;gap:.5rem;align-items:center}.actions form{margin:0}.muted,.empty{color:var(--muted)}.messages{margin-bottom:1rem}
@media(max-width:760px){.site-header{height:auto;padding:1rem;align-items:flex-start}.site-header nav{gap:.35rem;flex-wrap:wrap;justify-content:flex-end}.brand small{display:none}.page-shell{padding-top:1.7rem}.inline-form{grid-template-columns:1fr}.page-heading{display:block}.user-pill{display:inline-block;margin-top:.5rem}footer{gap:1rem;flex-direction:column}.auth-card,.patient-card,.legal-card{margin:.5rem auto;border-radius:18px}.create-panel{padding:1rem}h1{font-size:2.25rem}}
.information-box{text-align:left;background:var(--pale);border:1px solid #cce1dd;border-radius:14px;padding:1.15rem 1.25rem;margin:1.5rem 0}.information-box h2{margin-bottom:.55rem}.information-box p{font-size:.88rem;line-height:1.6;color:#456268;margin-bottom:.7rem}.information-box p:last-child{margin-bottom:0}.category-list,.consent-list{border:0;padding:0;margin:1rem 0;display:grid;gap:.75rem}.category-list legend,.consent-list legend{font-size:.92rem;font-weight:800;margin-bottom:.55rem}.category-upload{display:block;border:1px solid var(--line);border-radius:12px;padding:1rem;background:#fbfdfd}.category-upload strong,.category-upload small{display:block}.category-upload small{color:var(--muted);font-weight:400;margin:.25rem 0}.category-upload input[type=file]{margin-top:.65rem;background:white}.consent-list{background:#f8faf9;border:1px solid var(--line);border-radius:14px;padding:1rem}.consent-row{display:grid;grid-template-columns:20px 1fr;gap:.65rem;align-items:start;font-weight:500;line-height:1.5}.consent-row input{width:18px;height:18px;margin-top:.15rem;accent-color:var(--brand)}.consent-row a{color:var(--brand)}select,textarea{width:100%;border:1px solid #bdcdca;background:#fbfdfd;color:var(--ink);border-radius:10px;padding:.7rem;font:inherit}.review-actions{display:flex;flex-direction:column;gap:.55rem;min-width:270px}.review-summary{border-left:3px solid var(--brand);padding:.35rem .65rem}.review-summary strong,.review-summary small{display:block}.review-summary p{font-size:.78rem;margin:.4rem 0 0;color:var(--muted);line-height:1.45}.review-box{border:1px solid var(--line);border-radius:10px;padding:.6rem}.review-box summary{cursor:pointer;font-weight:750;color:var(--brand);font-size:.8rem}.review-form{display:grid;gap:.6rem;margin-top:.8rem}.review-form label{display:grid;gap:.25rem}.secondary.danger{color:var(--danger);border-color:#d9aaa7;background:#fffafa}
.home-hero{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);gap:clamp(2rem,7vw,6rem);align-items:center;padding:clamp(1rem,5vw,4rem) 0}.home-access,.staff-entry{background:var(--paper);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow)}.home-access{padding:clamp(1.5rem,4vw,2.5rem);text-align:center}.home-access p,.staff-entry p{color:var(--muted);line-height:1.65}.home-access .secondary{margin-top:.4rem}.staff-entry{display:flex;align-items:center;justify-content:space-between;gap:2rem;padding:1.5rem 1.75rem}.staff-entry h2,.staff-entry p{margin-bottom:.35rem}.staff-entry .eyebrow{margin-bottom:.4rem}.staff-entry .primary{white-space:nowrap;margin:0}
.legal-card address{font-style:normal;line-height:1.7;color:var(--muted)}.legal-card a{color:var(--brand)}.legal-list{color:var(--muted);line-height:1.65;padding-left:1.25rem}.legal-list li+li{margin-top:.45rem}.legal-version{margin-top:2.5rem!important;font-size:.78rem}
.record-form-card{margin-top:0}.record-heading .actions{flex-wrap:wrap;justify-content:flex-end}.record-summary-grid,.record-controls{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem;margin-bottom:1.5rem}.record-summary{padding:1.35rem;margin:0}.record-summary p{color:var(--muted);line-height:1.65}.record-entry-form{display:grid;grid-template-columns:240px 1fr;gap:.75rem 1rem;align-items:start}.record-entry-form textarea,.record-entry-form button{grid-column:2}.record-timeline{padding:0 1.4rem}.record-entry{padding:1.35rem 0;border-bottom:1px solid var(--line)}.record-entry:last-child{border-bottom:0}.record-entry.amendment{border-left:3px solid #d9a642;padding-left:1rem}.record-entry-meta{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;font-size:.78rem;color:var(--muted)}.record-content{margin:1rem 0;line-height:1.7}.preline{white-space:pre-line}.amendment-link{color:var(--warning);font-size:.78rem;margin:.7rem 0}.record-entry .review-box{margin-top:1rem}.record-documents{padding:0 1.4rem}.record-document{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 0;border-bottom:1px solid var(--line)}.record-document:last-child{border-bottom:0}.record-document small{display:block;color:var(--muted);margin-top:.3rem}.record-controls .panel{margin:0}.status.closed{background:#edf1f0;color:#536267}
@media(max-width:760px){.home-hero{grid-template-columns:1fr;padding-top:1rem;gap:1.5rem}.staff-entry{align-items:flex-start;flex-direction:column}.staff-entry .primary{width:100%}}
@media(max-width:760px){.record-summary-grid,.record-controls{grid-template-columns:1fr}.record-entry-form{grid-template-columns:1fr}.record-entry-form textarea,.record-entry-form button{grid-column:1}.record-document{align-items:flex-start;flex-direction:column}.record-heading .actions{justify-content:flex-start}}
