/* Recovary — final labelled-tabs design from the supplied Claude mockup. */
@font-face{font-family:Atkinson;src:url('/fonts/AtkinsonHyperlegible-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:Atkinson;src:url('/fonts/AtkinsonHyperlegible-Bold.ttf') format('truetype');font-weight:700;font-display:swap}
:root{color-scheme:light;--paper:#f5f6f0;--white:#fff;--card:#fff;--card2:#fafcf7;--chrome:#fffef9;--ink:#203b31;--muted:#43584d;--line:#d2dccf;--line2:#cfd9cb;--line3:#7b8c7c;--green:#285d50;--primary:#285d50;--on-primary:#fff;--on-accent:#fff;--hero:#285d50;--chip:#f1f3ee;--f-day:#285d50;--p-day:#d9e6cc;--f-timeline:#2f526a;--p-timeline:#d3e3ec;--f-exp:#6b4a1d;--p-exp:#f0dfc0;--f-files:#5c3f65;--p-files:#e6d6e8;--f-rep:#7d3f2a;--p-rep:#f0d6c8;--section-fg:var(--f-day);--section-bg:var(--p-day)}
:root[data-theme=dark]{color-scheme:dark;--paper:#111814;--white:#1a231e;--card:#1a231e;--card2:#18211c;--chrome:#151d19;--ink:#e8ede6;--muted:#b4c1b8;--line:#2e3b34;--line2:#3d4c44;--line3:#6f8076;--green:#a3d8b9;--primary:#8cc7a6;--on-primary:#0e1d15;--on-accent:#10170f;--hero:#1f4a3e;--chip:#232e28;--f-day:#a3d8b9;--p-day:#2e4636;--f-timeline:#a9d0ea;--p-timeline:#2a3f4c;--f-exp:#f2cf96;--p-exp:#4a3d28;--f-files:#dfbde8;--p-files:#3e3045;--f-rep:#f3b89c;--p-rep:#4b3329}
body{font:20px/1.55 Atkinson,Arial,sans-serif;background:var(--paper);color:var(--ink)}
h1,h2,h3,.stat-row strong,.entry-date b{font-family:Atkinson,Arial,sans-serif;font-weight:700;letter-spacing:0}
h1{font-size:36px;line-height:1.2}h2{font-size:24px}h3{font-size:22px}
button{font-weight:700}button:disabled{cursor:not-allowed}p{overflow-wrap:anywhere}
.skip-link{position:fixed;top:-100px;left:16px;z-index:200;background:var(--card);padding:16px;border:2px solid var(--green);border-radius:12px}.skip-link:focus{top:12px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--f-timeline);outline-offset:4px}
.shell{display:grid;grid-template-columns:290px minmax(0,1fr)}
.sidebar{height:100dvh;position:sticky;top:0;background:var(--chrome);padding:26px 18px;overflow-y:auto;border-color:var(--line);gap:22px}
.sidebar .brand{width:240px;max-width:100%;margin:0 0 4px}.brand-logo{width:100%;height:auto;object-fit:contain;display:block}
.sidebar .eyebrow,.sidebar-note{display:none}.sidebar nav{display:flex;flex-direction:column;gap:8px;margin:0;overflow:visible}
.sidebar nav button{width:100%;min-height:70px;padding:10px 12px;gap:14px;border:0;border-radius:16px;background:transparent;color:var(--ink);font-size:20px;line-height:1.3;white-space:normal}
.sidebar nav .nav-label{font-size:20px;width:auto;line-height:1.3;color:inherit;flex:1}
.sidebar nav .nav-icon{width:44px;height:44px;border-radius:12px;background:var(--nav-bg);color:var(--nav-fg);flex:none;display:flex;align-items:center;justify-content:center}
.sidebar nav .ui-icon{width:26px;height:26px}.nav-short{display:none}
[data-page=today],[data-goto=today]{--nav-bg:var(--p-day);--nav-fg:var(--f-day)}
[data-page=timeline],[data-goto=timeline]{--nav-bg:var(--p-timeline);--nav-fg:var(--f-timeline)}
[data-page=expenses],[data-goto=expenses]{--nav-bg:var(--p-exp);--nav-fg:var(--f-exp)}
[data-page=files],[data-goto=files]{--nav-bg:var(--p-files);--nav-fg:var(--f-files)}
[data-page=reports],[data-goto=reports]{--nav-bg:var(--p-rep);--nav-fg:var(--f-rep)}
.sidebar nav button.active{background:var(--nav-bg);box-shadow:inset 0 0 0 2px var(--nav-fg)}
.sidebar nav button:hover{background:var(--nav-bg)}
.sidebar-account{margin-top:auto;min-height:56px;width:100%}.storage-note{padding:12px 10px 0;border-color:var(--line);font-size:18px}.storage-note button,.storage-note small{color:var(--muted);font-size:18px}
main{padding:0 36px;max-width:1220px;margin:0 auto;min-width:0}
.topbar{min-height:78px;height:auto;gap:18px;padding:16px 0;font-size:18px}.topbar>div{gap:14px;flex-wrap:wrap}.topbar #demo-toggle{font-size:18px;white-space:normal}
.topbar .account-button{display:none}.account-button,.secondary{border:2px solid var(--line2);background:var(--card);color:var(--ink);border-radius:14px;font-size:20px;min-height:56px;padding:10px 20px;font-weight:700}
.secondary:hover{background:var(--chip)}.primary{background:var(--primary);color:var(--on-primary);border-radius:16px;min-height:62px;padding:14px 24px;font-size:20px;gap:12px;font-weight:700}.primary:hover{background:var(--primary);filter:brightness(.95)}
.text-button{min-height:48px;color:var(--section-fg);font-size:19px;font-weight:700;text-decoration:underline;text-underline-offset:4px}
.injury-strip{margin:22px 0 0;border:1px solid var(--line);border-radius:16px;background:var(--card);padding:14px 18px;gap:12px;flex-wrap:wrap}.injury-strip .icon-badge{display:none}.injury-strip>div{display:flex;flex:1;gap:4px 12px;flex-wrap:wrap}.injury-strip .eyebrow{display:none}.injury-strip #injury-summary{font-size:18px;color:var(--muted)}.injury-strip button{font-size:18px;min-height:48px;padding:8px 14px}
.home-heading{margin:28px 0 24px}.home-heading h1{margin:5px 0 8px}.home-heading p{margin:0;color:var(--muted)}.home-heading .fine{font-weight:700}
.daily-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.daily-grid>.section-card{margin:0}
.section-card{padding:28px;border:1px solid var(--line);border-radius:24px;background:var(--card);box-shadow:none;margin-bottom:24px}
.checkin-card{background:var(--hero);color:#fff;border:0;padding:30px;display:flex;flex-direction:column;gap:12px}.checkin-card>p,.checkin-card h2{margin:0}.checkin-card .eyebrow{color:#dfebbf;letter-spacing:1px;font-size:18px;margin-top:4px}.checkin-card h2{font-size:28px;line-height:1.25;color:#fff}.checkin-card>p:not(.eyebrow){color:#e8efdf;font-size:19px}.checkin-card>.icon-badge{background:#dfebbf;color:#1b3f35;width:56px;height:56px}.checkin-card>.primary{background:#dfebbf;color:#1b3f35;margin-top:auto;min-height:64px;width:100%}
.last-card{display:flex;flex-direction:column;gap:14px}.last-card .card-heading{align-items:center;margin:0}.last-card .card-heading h2{font-size:24px;line-height:1.3}.last-card>#last-checkin{flex:1}.last-card>.text-button{align-self:flex-start;color:var(--f-timeline)}.last-meta{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:14px}.last-note{white-space:pre-wrap;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;font-size:20px}.last-card .empty{border:0;background:transparent;text-align:left;padding:12px 0}.last-card .empty-symbol{display:none}
.week-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0 30px}.week-stats .section-card{padding:22px;border-radius:20px;margin:0}.week-stats p{font-size:18px;font-weight:700;color:var(--muted);margin-bottom:6px}.week-stats strong{font-size:30px;display:block;color:var(--f-day)}.week-stats article:nth-child(2) strong{color:var(--f-exp)}.week-stats article:nth-child(3) strong{color:var(--f-files)}.week-stats .fine{display:block;margin-top:4px}
.daily-grid{grid-template-columns:minmax(0,1.45fr) minmax(300px,1fr);margin-bottom:30px}.daily-side{display:flex;flex-direction:column;gap:16px;min-width:0}.daily-side>.last-card{flex:1;margin:0}.daily-side .week-stats{grid-template-columns:minmax(0,1fr);gap:12px;margin:0}.daily-side .week-stats .section-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 16px;padding:16px 22px}.daily-side .week-stats p{margin:0;align-self:end}.daily-side .week-stats strong{grid-column:2;grid-row:1/3;align-self:center;font-size:28px;white-space:nowrap}.daily-side .week-stats .fine{grid-column:1;margin:0}
@media(max-width:1150px) and (min-width:801px){.daily-side .week-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.daily-side .week-stats .section-card{display:block;padding:18px}.daily-side .week-stats p{margin-bottom:6px}.daily-side .week-stats strong{font-size:26px}.daily-side .week-stats .fine{margin-top:4px}}
.shortcut-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.shortcut-card{display:grid;grid-template-columns:54px minmax(0,1fr);gap:8px 16px;padding:24px;border:1px solid var(--line);border-radius:22px;background:var(--nav-bg);color:var(--ink)}.shortcut-card>.icon-badge{grid-row:1/4;background:var(--card);color:var(--nav-fg)}.shortcut-card>strong,.shortcut-description,.card-link{grid-column:2}.shortcut-card>strong{font-size:24px;color:var(--nav-fg);line-height:1.3}.shortcut-description{font-size:18px;line-height:1.5;color:var(--ink)}.shortcut-card .card-link{color:var(--nav-fg);font-size:18px}.shortcut-card:hover{background:var(--nav-bg);border-color:var(--nav-fg);box-shadow:none}
.journal-overview{border:1px solid var(--line);padding:18px 22px;border-radius:18px;background:var(--card)}summary{font-weight:700;cursor:pointer;min-height:48px;align-content:center}.journal-overview #recent-entries{margin-top:18px}
.icon-badge{background:var(--section-bg);color:var(--section-fg)}.icon-badge.sage{background:var(--p-day);color:var(--f-day)}.icon-badge.blue{background:var(--p-timeline);color:var(--f-timeline)}.icon-badge.sand{background:var(--p-exp);color:var(--f-exp)}
#page-timeline{--section-fg:var(--f-timeline);--section-bg:var(--p-timeline)}#page-expenses{--section-fg:var(--f-exp);--section-bg:var(--p-exp)}#page-files{--section-fg:var(--f-files);--section-bg:var(--p-files)}#page-reports{--section-fg:var(--f-rep);--section-bg:var(--p-rep)}
.page-heading{padding:24px 26px;border-radius:24px;background:var(--section-bg);margin:28px 0 24px}.page-heading h1{font-size:32px;color:var(--section-fg);margin-bottom:8px}.page-heading p:last-child{font-size:18px;color:var(--ink)}.page .primary{background:var(--section-fg);color:var(--on-accent)}.page .checkin-card .primary{background:#dfebbf;color:#1b3f35}
.card-heading p,.muted,.fine,.eyebrow,label,legend{color:var(--muted)}.card-heading h2,.card-heading h3{color:var(--ink)}.fine{font-size:18px}.eyebrow{font-size:18px}.section-title{flex-wrap:wrap;gap:18px}
.filters{padding:0;background:transparent}.filters label{min-width:180px}.filters .checkbox{flex-basis:100%;align-self:center}.filters .checkbox input{width:26px;height:26px}.filters #clear-filters{min-width:140px}
label,legend{font-size:20px;font-weight:700;color:var(--ink)}input,select,textarea{font-size:21px;border:2px solid var(--line3);border-radius:16px;min-height:62px;padding:14px 18px;background:var(--card);color:var(--ink)}input::placeholder,textarea::placeholder{font-size:20px;color:var(--muted)}.checkbox input{width:28px;height:28px;min-height:28px;accent-color:var(--primary);flex:none}.checkbox{gap:14px;align-items:center}
.filter-chips{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.filter-chips button{border:2px solid var(--line2);border-radius:28px;min-height:52px;padding:10px 18px;background:var(--card);color:var(--ink);font-size:19px}.filter-chips button[aria-pressed=true]{background:var(--section-bg);border-color:var(--section-fg);color:var(--section-fg)}
.entry-card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:20px;align-items:flex-start}.entry-card:hover{background:var(--card2);border-color:var(--f-timeline)}.entry-date{background:var(--p-timeline);color:var(--f-timeline);min-width:76px;padding:10px;border-radius:14px}.entry-date small{color:var(--f-timeline);font-size:18px}.entry-body p{white-space:normal;color:var(--ink);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.entry-top{flex-wrap:wrap;justify-content:flex-start}.entry-top small{font-size:18px;color:var(--muted)}.tag{border-radius:24px;background:var(--p-day);color:var(--f-day);padding:4px 12px;font-weight:700;font-size:18px}.tag.harder{background:var(--p-rep);color:var(--f-rep)}.entry-arrow{color:var(--f-timeline)}.empty{background:var(--card2);border-color:var(--line3);color:var(--muted)}.empty strong{color:var(--ink);font-weight:700}
.total-panel{border:0;background:var(--p-exp);border-radius:18px;padding:24px;color:var(--f-exp)}.total-panel strong{font-size:36px;color:var(--f-exp)}.expense-categories{padding:22px 0;border-bottom:1px solid var(--line);margin-bottom:8px}.category{margin:14px 0}.category>div{display:flex;justify-content:space-between;gap:12px;font-size:18px}.category meter{display:block;width:100%;height:16px;appearance:none;margin-top:7px}.category meter::-webkit-meter-bar{background:var(--p-exp);border:0;border-radius:10px}.category meter::-webkit-meter-optimum-value{background:#b48a4f;border-radius:10px}.expense-row p{color:var(--muted)}.expense-actions{flex-wrap:wrap;justify-content:flex-end}.expense-row button{color:var(--f-rep);min-height:48px}
.usage-badge{background:var(--p-files);color:var(--f-files)}#files-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:18px}#files-list .empty{grid-column:1/-1}.file-row{background:var(--card);border:1px solid var(--line);border-radius:20px;margin:0;padding:20px;display:flex;flex-direction:column;align-items:stretch;gap:16px;min-width:0}.file-icon{width:100%;height:100px;border-radius:12px;background:var(--p-files);color:var(--f-files);font-size:22px}.file-info p{color:var(--muted)}.file-actions{display:flex;flex-wrap:wrap;gap:8px 18px}.file-actions button{color:var(--f-files);font-size:18px;min-height:48px;background:transparent;text-decoration:underline;text-underline-offset:4px}.file-actions .remove-file{color:var(--f-rep)}.detail-files .file-row{margin-bottom:12px}
.report-grid{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:20px}.report-grid .field-row{flex-wrap:wrap}.report-grid .field-row label{min-width:170px}.report-grid .icon-badge{background:var(--section-bg);color:var(--section-fg)}
.gentle-note{background:var(--p-day);border-color:var(--line);color:var(--ink)}footer{color:var(--muted);border-color:var(--line)}.stat-row{color:var(--muted);border-color:var(--line)}.stat-row strong{color:var(--ink)}
dialog{background:var(--paper);border:1px solid var(--line2);border-radius:24px;color:var(--ink);width:min(800px,calc(100% - 32px));padding:28px;max-height:92dvh}dialog::backdrop{background:#0e1d1599}.icon-button{color:var(--muted);min-width:48px;min-height:48px}.form-card,.detail-section{background:var(--card);border-color:var(--line);border-radius:18px}.report-meta{color:var(--muted)}.danger{background:var(--p-rep);border-color:var(--f-rep);color:var(--f-rep);border-radius:14px;min-height:56px}.notice,#demo-banner,.form-status:not(:empty){background:var(--p-exp);color:var(--ink);border-color:var(--line3)}#demo-banner button{color:var(--f-exp)}.theme-picker{border-bottom:1px solid var(--line);padding-bottom:16px;margin-bottom:24px}
.guided{position:fixed;inset:0;margin:0;width:100%;max-width:none;height:100dvh;max-height:none;border:0;border-radius:0;padding:0;overflow-y:auto;background:var(--paper)}
.guided form{min-height:100%;display:flex;flex-direction:column}.wizard-header{position:sticky;top:0;z-index:2;background:var(--card);border-bottom:1px solid var(--line);padding:20px max(24px,calc((100% - 880px)/2));display:flex;flex-wrap:wrap;align-items:center;gap:14px 20px}.wizard-header>div:first-child{flex:1}.wizard-header h2{margin:0;font-size:24px}.wizard-count{margin:3px 0 0;color:var(--muted);font-size:18px}.wizard-progress{display:flex;gap:6px;flex-basis:100%}.wizard-progress span{flex:1;height:10px;border-radius:8px;background:var(--line)}.wizard-progress .complete{background:var(--primary)}
.wizard-content{max-width:780px;width:100%;padding:32px 24px;margin:0 auto;flex:1}.wizard-question{font-size:32px;line-height:1.2;margin:0 0 12px;outline:none}.wizard-help{color:var(--muted);margin-bottom:26px;font-size:20px}.wizard-step label{margin:16px 0}.wizard-step fieldset{margin:0}.wizard-step .checkbox{background:var(--card);padding:20px 22px;border:2px solid var(--line2);border-radius:18px;min-height:80px;cursor:pointer}.wizard-step .checkbox:has(:checked){background:var(--p-day);border-color:var(--f-day)}
.wizard-footer{position:sticky;bottom:0;background:var(--card);border-top:1px solid var(--line);margin:0;padding:18px max(24px,calc((100% - 780px)/2));display:flex;align-items:center;justify-content:space-between;gap:14px;z-index:2}.wizard-footer button{white-space:nowrap}.wizard-footer .primary{min-width:180px}.wizard-skip{font-size:18px}
.large-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.large-choices label{margin:0}.large-choices span{border:2px solid var(--line2);border-radius:18px;background:var(--card);color:var(--ink);padding:24px;min-height:90px;font-weight:700;font-size:23px}.choices input:checked+span{background:var(--p-day);border:3px solid var(--f-day)}
.pain-scale{display:grid;grid-template-columns:repeat(auto-fit,minmax(60px,1fr));gap:10px;margin-top:20px}.pain-scale button{height:68px;border:2px solid var(--line2);border-radius:14px;color:var(--ink);background:var(--card);font-size:26px}.pain-scale button[aria-pressed=true]{background:var(--primary);color:var(--on-primary);border-color:var(--primary)}
.note-starters{display:flex;flex-wrap:wrap;gap:14px;align-items:center;font-size:18px}.note-starters button{border:2px dashed var(--line3);border-radius:26px;color:var(--green);background:var(--card);padding:12px 18px;min-height:52px;font-size:18px}
.review-list{border:1px solid var(--line);background:var(--card);border-radius:20px;overflow:hidden}.review-row{display:flex;align-items:center;gap:18px;padding:20px 22px;border-bottom:1px solid var(--line)}.review-row:last-child{border:0}.review-row>div{flex:1;min-width:0}.review-row strong{color:var(--muted);font-size:18px}.review-row p{white-space:pre-wrap;margin:4px 0 0;overflow-wrap:anywhere}.review-row .text-button{flex:none}.file-drop{border:2px dashed var(--f-files);background:var(--p-files);border-radius:20px;padding:24px;color:var(--ink)}.file-drop span{color:var(--muted)}.file-drop input{background:var(--card);font-size:18px;max-width:100%}
#toast{background:var(--hero);color:white;font-size:19px}#report-content{color:#203b31;background:#fff}#report-content .detail-section{color:#203b31;background:#fff;border-color:#d2dccf}#report-content .report-meta{color:#43584d}
[data-theme=dark] .brand-logo{background:#f5f6f0;border-radius:12px;padding:6px 12px}
.welcome{max-width:680px;margin:8vh auto;padding:32px}.welcome .brand{width:260px}.welcome h1{font-size:40px}.welcome-features{display:grid;gap:16px;margin:26px 0}.welcome-features p{display:flex;gap:14px;align-items:center;font-weight:700;color:var(--ink);margin:0}.welcome-features span{border-radius:14px;background:var(--p-day);padding:10px 16px;color:var(--f-day)}
@media(max-width:1150px){.shell{grid-template-columns:250px minmax(0,1fr)}main{padding:0 24px}.sidebar{padding:24px 14px}.sidebar nav button{gap:10px}.daily-grid{grid-template-columns:minmax(0,1fr)}.shortcut-grid{grid-template-columns:minmax(0,1fr)}.report-grid{grid-template-columns:minmax(0,1fr)}.week-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.week-stats .section-card{padding:18px}.week-stats strong{font-size:26px}}
@media(max-width:800px){.shell{display:block;padding-bottom:112px}.sidebar{height:auto;position:relative;padding:16px 20px;border:0;border-bottom:1px solid var(--line);display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:14px;overflow:visible}.sidebar .brand{width:190px;max-width:65%;margin:0}.sidebar-account{display:block;width:auto;font-size:18px;padding:10px 14px;margin:0}.sidebar .storage-note{display:none}.sidebar nav{position:fixed;left:0;right:0;bottom:0;width:100%;z-index:10;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;padding:10px 6px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--chrome)}.sidebar nav button{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:5px;min-height:88px;padding:10px 0;border-radius:12px;box-shadow:none}.sidebar nav button.active{background:transparent}.sidebar nav .nav-label{display:none}.sidebar nav .nav-short{display:block;font-size:16px;font-weight:700;color:var(--ink);line-height:1.3;width:auto}.sidebar nav .nav-icon{width:50px;height:36px;border-radius:18px;background:transparent}.sidebar nav button.active .nav-icon{background:var(--nav-bg);outline:none;box-shadow:inset 0 0 0 2px var(--nav-fg)}.sidebar nav button:hover{background:var(--chip)}main{padding:0 20px}.topbar{min-height:64px;padding:12px 0;font-size:18px}.topbar>div{gap:8px}.topbar #demo-toggle{font-size:18px}.injury-strip{margin-top:18px}.home-heading{margin:24px 0}.home-heading h1{font-size:32px}.daily-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.week-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.shortcut-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#toast{bottom:118px}footer{margin-top:28px}}
@media(max-width:600px){main{padding:0 18px}.sidebar{padding:14px 18px}.sidebar .brand{width:175px}.sidebar-account{font-size:18px;padding:8px 12px;min-height:52px}.topbar{align-items:flex-start;flex-direction:column;gap:4px}.topbar #demo-toggle{min-height:44px}.injury-strip{padding:14px}.injury-strip>div{flex-basis:100%}.injury-strip>.secondary{width:auto;min-height:48px}.injury-strip strong{font-size:20px}.daily-grid,.shortcut-grid{grid-template-columns:minmax(0,1fr)}.week-stats{grid-template-columns:minmax(0,1fr);gap:12px}.week-stats .section-card{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:18px 20px}.week-stats p{margin:0;align-self:center}.week-stats strong{grid-column:2;grid-row:1/3;align-self:center}.week-stats .fine{grid-column:1;font-size:18px}.section-card{padding:22px;border-radius:22px}.checkin-card{padding:26px}.checkin-card h2{font-size:28px}.last-card .card-heading h2{font-size:24px}.page-heading{padding:22px}.page-heading h1{font-size:30px;line-height:1.2}.page-heading h1>.ui-icon{width:30px;flex:none}.section-title>.card-heading{min-width:0}.section-title .primary{width:100%}.shortcut-card{padding:22px}.shortcut-card>strong{font-size:23px}.filters label{min-width:0;flex-basis:100%}.filters label:not(:first-child){min-width:0}.filters .secondary{width:100%}.entry-card{padding:16px;gap:14px}.entry-date{min-width:62px}.entry-top small{font-size:18px}.expense-row{align-items:flex-start;flex-wrap:wrap}.expense-actions{width:100%;justify-content:space-between}.total-panel strong{font-size:30px}.field-row{flex-wrap:wrap}.field-row label{flex-basis:100%}.files-toolbar{display:block}.usage-badge{margin-top:16px}dialog{padding:22px;width:calc(100% - 20px)}.dialog-heading h2{font-size:26px}.wizard-header{padding:16px 18px;gap:12px}.wizard-header h2{font-size:22px}.wizard-header>.secondary{min-height:48px;padding:8px 14px;font-size:18px}.wizard-content{padding:28px 20px}.wizard-question{font-size:30px}.wizard-footer{padding:14px 16px max(14px,env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr 1fr;gap:10px}.wizard-footer .primary{min-width:0;width:100%;grid-column:2;grid-row:1/3;height:100%}.wizard-footer .wizard-back{font-size:19px;min-height:52px}.wizard-footer .wizard-skip{font-size:18px;grid-column:1;grid-row:2;min-height:44px}.large-choices{grid-template-columns:minmax(0,1fr)}.large-choices span{min-height:76px;padding:20px}.review-row{padding:18px;gap:12px}.file-drop{padding:18px}.file-drop input{padding:12px 8px}.welcome{padding:24px;margin:4vh auto}.welcome h1{font-size:36px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.file-row{flex-wrap:nowrap}.file-row .file-info{flex:0 1 auto}
.account-journal{border-bottom:1px solid var(--line);padding-bottom:22px;margin-bottom:24px}.account-journal .injury-strip{margin-top:12px}.account-journal .injury-strip #injury-summary{display:block}.account-example{margin-top:24px}.account-example h3{margin-bottom:6px}.account-example p{margin-bottom:8px}
/* Keep the mobile dashboard's first action close to its heading. */
@media(max-width:600px){.injury-strip #injury-summary{display:none}.injury-strip>div{flex-basis:auto}.injury-strip{gap:10px}.sidebar nav .nav-short{font-size:18px}.sidebar nav{gap:0;padding-inline:2px}.sidebar nav button{letter-spacing:-.2px}}
/* Compact date context shared by every tab, without a reserved toolbar row. */
.topbar{min-height:0;height:auto;padding:16px 0 0;gap:0;align-items:flex-start}
.topbar>div:not(.date-label){display:none}
.topbar .date-label{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:8px;padding:5px 10px;border-radius:10px;background:var(--chip);color:var(--muted);font-size:18px;font-weight:700;line-height:1.4}
.date-label .ui-icon{width:20px;height:20px;flex:none}
.home-heading,.page-heading{margin-top:12px}
/* Let the check-in lead; the greeting and recovery day are supporting context. */
main:has(#page-today:not([hidden]))>.topbar{display:none}
.home-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;margin:14px 0 12px}
.home-welcome{min-width:0}
.home-date{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:18px;line-height:1.35;margin-bottom:8px}
.home-date .ui-icon{width:20px;height:20px;flex:none}
.home-date time{display:flex;flex-wrap:wrap;gap:0 4px}.home-date time span{white-space:nowrap}
.home-heading #greeting{font-size:22px;line-height:1.3;font-weight:700;color:var(--ink);overflow-wrap:anywhere}
.home-heading #recovery-day{display:grid;gap:2px;text-align:center;align-content:center;width:auto;min-height:0;padding:6px 10px;border:1px solid var(--line);border-radius:12px;background:var(--p-day);color:var(--f-day);font-size:18px;line-height:1.2;font-weight:400}
.home-heading #recovery-day[hidden]{display:none}
.home-heading #recovery-day strong{font-size:22px;line-height:1.2;overflow-wrap:anywhere}
.home-heading #recovery-day span{white-space:nowrap}
.home-heading:has(#recovery-day[hidden]){grid-template-columns:minmax(0,1fr)}
.checkin-label{display:flex;align-items:center;gap:12px}
.checkin-label .icon-badge{width:44px;height:44px;flex:none;background:#dfebbf;color:#1b3f35}
.checkin-label .eyebrow{margin:0;color:#dfebbf;font-size:18px;font-weight:700;letter-spacing:0;text-transform:none}
.checkin-card #checkin-title{margin:4px 0 0;color:#fff;font-size:32px;line-height:1.2}
.checkin-card>.primary{margin-top:6px}
.checkin-card>.fine{font-size:18px}
/* Floating mobile navigation, with room around the active tab and device inset. */
@media(max-width:800px){
  .shell{padding-bottom:calc(144px + env(safe-area-inset-bottom))}
  .sidebar nav{left:50%;right:auto;bottom:max(12px,env(safe-area-inset-bottom));transform:translateX(-50%);width:calc(100% - 24px);max-width:640px;padding:8px 6px;border:1px solid var(--line3);border-radius:24px;box-shadow:0 8px 28px #0e1d1533;gap:2px}
  .sidebar nav{grid-template-columns:repeat(6,minmax(0,1fr))}
  .sidebar nav button{border-radius:16px}
  .sidebar nav .nav-short{white-space:nowrap}
  .sidebar nav{background:var(--chrome);border-color:#8b9e9180;box-shadow:0 12px 32px #0e1d1529,0 3px 8px #0e1d1514,inset 0 1px 0 #ffffffeb,inset 0 -1px 0 #ffffff66}
  :root[data-theme=dark] .sidebar nav{border-color:#c0d9cc40;box-shadow:0 12px 32px #0006,0 3px 8px #0003,inset 0 1px 0 #ffffff40,inset 0 -1px 0 #ffffff0f}
  @supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
    .sidebar nav{background:linear-gradient(135deg,#ffffffad,#fffef970 52%,#e3eee18c);-webkit-backdrop-filter:blur(22px) saturate(160%);backdrop-filter:blur(22px) saturate(160%)}
    :root[data-theme=dark] .sidebar nav{background:linear-gradient(135deg,#34483bd9,#151d19bd 52%,#21372ae0)}
  }
  @media(prefers-reduced-transparency:reduce){.sidebar nav,:root[data-theme=dark] .sidebar nav{background:var(--chrome);-webkit-backdrop-filter:none;backdrop-filter:none}}
  #toast{bottom:calc(144px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){.sidebar nav{width:calc(100% - 16px);padding:8px 2px;gap:0}.sidebar nav .nav-short{font-size:16px}.sidebar nav .nav-icon{width:44px}}
#report-content{--ink:#203b31;--muted:#43584d;--card:#fff;--line:#d2dccf}
.cover-fields{display:grid;gap:14px;margin:4px 0 18px;padding:18px 20px;border:1px solid var(--line);border-radius:16px}.cover-fields>.fine{margin:0}.cover-fields label{display:grid;gap:6px;font-weight:700}.cover-fields small{font-weight:400;color:var(--muted)}.cover-fields input,.cover-fields textarea{width:100%;box-sizing:border-box}
.report-cover{padding-bottom:28px;margin-bottom:32px;border-bottom:2px solid var(--line)}.report-cover h1{font-size:40px;line-height:1.2;margin:8px 0 22px}.cover-details{display:grid;gap:10px;margin:0 0 24px}.cover-details>div{display:grid;grid-template-columns:170px minmax(0,1fr);gap:16px}.cover-details dt{font-weight:700;color:var(--muted)}.cover-details dd{margin:0;overflow-wrap:anywhere}.cover-note{border-left:4px solid var(--line);padding:2px 0 2px 18px;margin:24px 0}.cover-note h2{margin-top:0}.cover-note p{white-space:pre-wrap;overflow-wrap:anywhere}.cover-glance li,.cover-contents li{margin:6px 0}
@media(max-width:600px){.cover-details>div{grid-template-columns:minmax(0,1fr);gap:2px}.report-cover h1{font-size:32px}}
@media print{.report-cover{break-after:page;border:0;margin:0;padding:0}}
@media print{:root{color-scheme:light}body{background:#fff;color:#203b31}.skip-link{display:none!important}#report-dialog{position:static;width:100%;height:auto;padding:0;max-height:none;border:0;background:#fff}#report-content{padding:0}.report-entry,.detail-section{background:#fff;color:#203b31}.report-meta{color:#43584d}footer{display:none}}

/* Expenses & Lost Wages */
.cost-totals article:nth-child(2) strong{color:var(--f-timeline)}
.cost-totals article:nth-child(3) strong{color:var(--ink)}
.wages-card{margin-top:24px}
.wage-panel{background:var(--p-timeline);color:var(--f-timeline)}
.wage-panel strong{color:var(--f-timeline)}
.work-line{display:flex;justify-content:space-between;align-items:center;gap:12px 20px;flex-wrap:wrap;border:2px solid var(--p-timeline);border-radius:18px;padding:18px 20px;margin:0 0 18px}
.work-line p{margin:4px 0 0;color:var(--muted)}
.work-line .text-button,.work-line .secondary{min-height:48px}
.calc-line{font-size:21px;font-weight:700;line-height:1.5;background:var(--p-timeline);color:var(--f-timeline);border-radius:16px;padding:18px 20px;margin:0 0 18px}
.wage-row p{margin:4px 0 0}
.wage-row .wage-note{font-style:italic}

/* Light/dark quick toggle beside My Account */
.account-row{display:flex;gap:10px;align-items:stretch;margin-top:auto;width:100%}
.account-row .sidebar-account{margin:0;flex:1;width:auto}
.theme-toggle{flex:none;width:56px;height:56px;min-height:56px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:2px solid var(--line2);border-radius:14px;background:var(--card);color:var(--ink);cursor:pointer}
.theme-toggle:hover{background:var(--nav-bg)}
.theme-toggle .ui-icon{width:26px;height:26px}
.theme-toggle .icon-sun,[data-theme=dark] .theme-toggle .icon-moon{display:none}
[data-theme=dark] .theme-toggle .icon-sun{display:block}
@media(max-width:800px){.account-row{width:auto;margin:0 0 0 auto;flex:none}}
@media(max-width:600px){.theme-toggle{width:52px;height:52px;min-height:52px}.account-row{gap:8px}}

/* Timeline filters follow the theme like every other field (style.css forced them white). */
.filters input{background:var(--card);color:var(--ink)}

/* Keep every field inside its card on phones. iOS Safari gives date inputs (and some selects)
   a built-in width that ignores width:100%, so they ran past the right edge of the screen. */
input,select,textarea{max-width:100%;min-width:0}
label{max-width:100%;min-width:0}
input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:none;appearance:none;display:block;width:100%;text-align:left}
input[type=date]::-webkit-date-and-time-value,input[type=time]::-webkit-date-and-time-value{text-align:left;min-height:1.5em}
input[type=date]::-webkit-calendar-picker-indicator{margin-left:auto}
select{text-overflow:ellipsis}

.page h1[tabindex="-1"]:focus{outline:none}
[data-page=care],[data-goto=care]{--nav-bg:var(--p-day);--nav-fg:var(--f-day)}
#page-care{--section-fg:var(--f-day);--section-bg:var(--p-day)}
.care-group{font-size:20px;margin:26px 0 6px;color:var(--muted)}.care-group:first-child{margin-top:8px}
#page-care textarea,#appointment-dialog textarea,#medication-dialog textarea{width:100%;font:inherit}
/* Phones: one row of five, icon above label. Photos & Documents and Reports & Backup move under More. */
.sidebar nav .nav-more{display:none;--nav-bg:var(--chip);--nav-fg:var(--ink)}
.sidebar nav .nav-more-menu{position:absolute;right:4px;bottom:calc(100% + 10px);width:min(340px,calc(100vw - 32px));display:flex;flex-direction:column;gap:6px;padding:10px;border:1px solid var(--line3);border-radius:20px;background:var(--card);box-shadow:0 12px 32px #0e1d1533}
.sidebar nav .nav-more-menu button{flex-direction:row;justify-content:flex-start;align-items:center;gap:14px;min-height:62px;padding:8px 12px;border-radius:14px;color:var(--ink);font-size:19px;font-weight:700;line-height:1.25;text-align:left;white-space:normal}
.sidebar nav .nav-more-menu .nav-icon{width:44px;height:44px;border-radius:12px;background:var(--nav-bg)}
.sidebar nav .nav-more-menu button>span:last-child{flex:1;width:auto;color:inherit;font-size:19px;line-height:1.25}
.sidebar nav .nav-more-menu button.active{background:var(--nav-bg);box-shadow:inset 0 0 0 2px var(--nav-fg)}
@media(max-width:600px){
.sidebar nav{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:6px 4px}
.sidebar nav>[data-page=files],.sidebar nav>[data-page=reports]{display:none}
.sidebar nav>button{flex-direction:column;justify-content:center;align-items:center;gap:2px;min-height:64px;padding:4px 0}
.sidebar nav>button .nav-icon{width:48px;height:30px;border-radius:15px;flex:none}
.sidebar nav>button .nav-icon .ui-icon{width:24px;height:24px}
.sidebar nav .nav-short{font-size:16px;letter-spacing:-.2px}
.sidebar nav .nav-more{display:flex}
body[data-page=files] .sidebar nav .nav-more .nav-icon,body[data-page=reports] .sidebar nav .nav-more .nav-icon{background:var(--nav-bg);box-shadow:inset 0 0 0 2px var(--nav-fg)}
.shell{padding-bottom:calc(112px + env(safe-area-inset-bottom))}
#toast{bottom:calc(104px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){.sidebar nav{gap:0;padding:6px 2px}.sidebar nav .nav-short{font-size:14px}}
/* Quick check-in (inside the green My Day card) and rough day */
.quick-form{display:flex;flex-direction:column;gap:20px;margin-top:6px}
.quick-group{border:0;padding:0;margin:0;min-width:0}
.quick-group legend,.quick-note{color:#fff;font-size:21px;font-weight:700;line-height:1.3}
.quick-group legend{padding:0;margin-bottom:10px}
.quick-group small,.quick-note small{color:#e8efdf;font-size:18px;font-weight:400}
.quick-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.quick-choices label{margin:0}
.quick-choices span{display:flex;align-items:center;justify-content:center;text-align:center;min-height:62px;padding:12px;border:2px solid var(--line2);border-radius:16px;background:var(--card);color:var(--ink);font-size:21px;font-weight:700;line-height:1.2}
.quick-pain{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-top:0}
.quick-pain button{height:58px;font-size:24px;padding:0;white-space:nowrap}
.quick-note{display:flex;flex-direction:column;gap:8px}
.quick-note textarea{width:100%}
.quick-form .primary{width:100%;min-height:64px;margin:0}
.checkin-card .quick-status{color:#fff;margin:0}
.checkin-card .text-button{color:#dfebbf;align-self:auto}
/* Numbered steps. Hidden groups (no pain tracking, no work set up) are display:none, so they don't take a number. */
.checkin-card{--q-on-bg:#1b3f35;--q-on-fg:#fff;--q-on-ring:#dfebbf}
:root[data-theme=dark] .checkin-card{--q-on-bg:#dfebbf;--q-on-fg:#10170f;--q-on-ring:#fff}
.quick-form{counter-reset:qstep}
.quick-form>.quick-group,.quick-form>.quick-note{counter-increment:qstep}
.step-num{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin-right:10px;border-radius:50%;background:#dfebbf;color:#1b3f35;font-size:18px;line-height:1;vertical-align:2px}
.step-num::before{content:counter(qstep)}
/* Selected answers: a tick and a dark fill, so the choice doesn't rely on colour alone. */
.quick-choices input:checked+span{gap:8px;background:var(--q-on-bg);color:var(--q-on-fg);border:3px solid var(--q-on-ring)}
.quick-choices input:checked+span::before{content:'';flex:none;width:20px;height:20px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat}
.checkin-card .quick-pain button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;line-height:1}
.checkin-card .quick-pain button[aria-pressed=true]{background:var(--q-on-bg);color:var(--q-on-fg);border:3px solid var(--q-on-ring)}
.quick-pain button small{color:inherit;font-size:14px;font-weight:700;line-height:1}/* Secondary actions as real buttons, divided from the form. */
.checkin-card .quick-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px;margin-top:4px;padding-top:18px;border-top:1px solid #ffffff40}
.quick-alt{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:56px;padding:10px 16px;border:2px solid #ffffffa6;border-radius:14px;background:transparent;color:#fff;font-size:19px;font-weight:700;line-height:1.25;text-align:center}
.quick-alt:hover{background:#ffffff1a}
.quick-alt .ui-icon{width:22px;height:22px;flex:none}
.quick-alt.light{background:#dfebbf;color:#1b3f35;border-color:#dfebbf}
.quick-alt.light:hover{background:#eef5d8}
/* Shown instead of the form once today has a check-in. */
.quick-done{display:flex;flex-direction:column;gap:14px}
.checkin-card:has(>.quick-done:not([hidden])){align-self:start}
.quick-done p{margin:0;color:#e8efdf;font-size:19px}
.quick-done .quick-done-summary{display:flex;align-items:center;gap:14px;color:#fff;font-size:21px;font-weight:700}
.quick-done-mark{width:48px;height:48px;flex:none;border-radius:50%;background:#dfebbf;color:#1b3f35;display:flex;align-items:center;justify-content:center}
.quick-done-mark .ui-icon{width:28px;height:28px}
.checkin-card .quick-done .quick-links{border:0;padding-top:4px}
#rough-dialog .pain-scale{margin:12px 0 22px}
#rough-dialog .secondary{width:100%}

/* Timeline: search and filter chips up front, dates and the detailed filters folded away */
.timeline-find{display:flex;flex-direction:column;gap:14px}
.timeline-find .filter-chips{margin:0}
.search-field{position:relative;display:block;margin:0}
.search-field .ui-icon{position:absolute;left:18px;top:50%;transform:translateY(-50%);width:24px;height:24px;color:var(--muted);pointer-events:none}
.search-field input{margin:0;min-height:60px;padding:12px 16px 12px 54px;border:2px solid var(--line2);border-radius:16px;background:var(--card);color:var(--ink);font-size:20px}
.more-filters summary{width:max-content;max-width:100%;color:var(--f-timeline);text-decoration:underline;text-underline-offset:4px}
.more-filters[open] summary{margin-bottom:8px}
.more-filters .filters{margin:0}
.more-filters .filters label,.more-filters .filters label:first-child{flex:1 1 180px}
.more-filters .filters label.checkbox{flex-basis:100%}
@media(max-width:600px){.more-filters .filters label,.more-filters .filters label:first-child{flex-basis:100%}}
/* Check-ins grouped by week */
.timeline-week{margin-top:26px}
.timeline-week:first-child{margin-top:10px}
.timeline-week-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 16px;padding:0 4px 10px;margin-bottom:14px;border-bottom:2px solid var(--line)}
.timeline-week-head h3{margin:0;font-size:22px;line-height:1.3}
.timeline-week-head span{font-size:18px;color:var(--muted)}
.tag.plain{background:var(--chip);color:var(--ink)}
.tag.files{display:inline-flex;align-items:center;gap:6px;background:var(--p-files);color:var(--f-files)}
.tag .ui-icon{width:18px;height:18px;flex:none}

/* My Day: the last 7 days at a glance */
.week-card{margin:0;display:flex;flex-direction:column;gap:14px}
.week-card-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 16px}
.week-card-head h2{margin:0;font-size:24px;line-height:1.3}
.week-card-head .text-button{min-height:44px;color:var(--f-timeline)}
.week-strip{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.week-strip li{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.week-dow,.week-date{font-size:16px;font-weight:700;line-height:1.2;color:var(--muted);white-space:nowrap}
.week-mark{width:100%;height:56px;box-sizing:border-box;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700}
.week-mark .ui-icon{width:24px;height:24px}
.week-strip .done .week-mark{background:var(--p-day);color:var(--f-day)}
.week-strip .missed .week-mark{border:2px dashed var(--line3);color:var(--muted)}
.week-strip .today .week-mark{border:3px solid var(--primary)}
.week-strip .is-today.done .week-mark{box-shadow:inset 0 0 0 3px var(--f-day)}
.week-strip .is-today .week-dow,.week-strip .is-today .week-date{color:var(--ink)}
.week-summary{margin:0;font-size:18px;color:var(--muted)}
/* Next appointment, this week's costs and files, in place of the shortcut cards (the menu already lists every section) */
.glance{margin:0 0 30px}
.glance-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px}
.glance-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:20px 22px;border:1px solid var(--line);border-radius:20px;background:var(--card);color:var(--ink);font-weight:400;text-align:left;cursor:pointer}
.glance-card:hover{border-color:var(--nav-fg);background:var(--card2)}
.glance-label{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:700;color:var(--nav-fg)}
.glance-label .ui-icon{width:22px;height:22px;flex:none}
.glance-card strong{font-size:24px;line-height:1.25;color:var(--ink)}
.glance-detail{font-size:18px;color:var(--muted)}
