:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;color:#292d2a;background:#f7f8f6;font-synthesis:none}[hidden]{display:none!important}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}
.shell{max-width:1130px;margin:auto;min-height:100vh;display:flex;flex-direction:column;padding:0 24px}.top{display:flex;align-items:center;justify-content:space-between;padding:25px 2px;border-bottom:1px solid #e5e0d7}.identity{display:flex;gap:12px;align-items:center;font-size:17px;font-weight:740;letter-spacing:.01em}.identity small{display:block;font-size:9px;letter-spacing:.16em;color:#9b9c94;font-weight:700;margin-top:3px}.logo{display:grid;place-items:center;background:#2b493b;color:#f7f7e9;border-radius:15px;width:44px;height:44px;font-size:26px}.session-actions{display:flex;gap:13px;align-items:center;font-size:13px}.text-button{border:0;background:transparent;color:#576c5e;text-decoration:underline}.gate{width:min(100%,520px);margin:10vh auto!important;padding:42px!important}.gate h1,.welcome h1{font-size:clamp(28px,4vw,42px);letter-spacing:-.045em;line-height:1.15;margin:12px 0}.gate p{line-height:1.65}.eyebrow{color:#697d6a;font-size:11px;letter-spacing:.13em;font-weight:800;text-transform:uppercase}.card{background:#fffefb;border:1px solid #e7e2d9;border-radius:22px;box-shadow:0 10px 35px rgba(41,45,42,.035)}.muted{color:#81837d}.hint{font-size:12px;color:#81837d}.form{display:flex;flex-direction:column;gap:17px;margin-top:25px}.form label,.toolbar label,.search{display:flex;flex-direction:column;font-size:13px;color:#5a625a;font-weight:650;gap:7px}input:not([type=checkbox]),select,textarea{width:100%;border:1px solid #dadcd4;background:#fff;border-radius:11px;padding:12px 14px;outline:0;color:#273129}textarea{resize:vertical;min-height:76px;line-height:1.6}input:focus,select:focus,textarea:focus{border-color:#678c74;box-shadow:0 0 0 3px rgba(103,140,116,.13)}.primary{border:1px solid #2d4d3a;color:#fff;background:#31513e;padding:13px 18px;border-radius:11px;font-weight:750}.primary:hover{background:#243f30}.subtle{border:1px solid #d8dfd3;border-radius:10px;background:#f5f8f2;color:#365b41;padding:10px 14px;font-weight:700}.subtle:hover{background:#eaf1e7}.error{color:#a33d33;font-size:13px}.feedback{font-size:13px;color:#42754d}.welcome{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:45px 2px 35px}.welcome h1{margin:13px 0}.private-chip{border-radius:40px;padding:9px 15px;background:#eaf0e8;color:#507354;font-size:12px;white-space:nowrap}.tabs{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:16px}.tabs button{background:transparent;border:0;border-radius:10px;color:#787e76;padding:13px 20px;font-weight:650}.tabs button.active{background:#31513e;color:#fff}.toolbar{padding:19px 24px;display:flex;align-items:end;gap:20px;margin-bottom:16px}.toolbar label{width:240px}.toolbar .muted{font-size:12px}.panel{padding:30px 32px;margin-bottom:30px}.panel h2{font-size:26px;letter-spacing:-.04em;margin:9px 0 10px}.panel h3{margin-top:35px}.panel-heading{display:flex;justify-content:space-between;align-items:center}.search{margin:20px 0}.record-list{display:flex;flex-direction:column;gap:12px}.record{padding:18px 20px;border-radius:13px;border:1px solid #e8eae2;background:#fff}.record-top{display:flex;justify-content:space-between;gap:14px}.record h3{margin:0 0 5px;font-size:16px}.record .meta{font-size:12px;color:#94988e}.record p{white-space:pre-wrap;line-height:1.65;font-size:14px;margin:10px 0 0;color:#5d675f}.empty{padding:55px 20px;text-align:center;color:#8f948a}.two{display:grid;grid-template-columns:1fr 1fr;gap:15px}.inline{display:flex!important;flex-direction:row!important;align-items:start;line-height:1.5}.inline input{margin-top:3px}.preview,.report-output{border:1px solid #e4e9e2;background:#f8faf7;border-radius:12px;padding:17px;margin:12px 0;white-space:pre-wrap;line-height:1.6;font-size:13px}.report-output:empty{display:none}.metric-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin:22px 0}.metric{border-radius:13px;background:#edf4ed;padding:18px}.metric b{font-size:28px;display:block;color:#2e5b3f}.metric span{font-size:12px;color:#67806c}.trend{margin:15px 0;border-top:1px solid #e1e8dd;padding-top:14px}.trend svg{display:block;width:100%;max-height:120px}.grant-row{border:1px solid #dfe5dc;border-radius:13px;padding:15px;margin:10px 0}.grant-row h4{margin:0 0 12px}.grant-controls{display:flex;gap:18px;flex-wrap:wrap}.grant-controls label{font-size:13px;display:flex;align-items:center;gap:8px}footer{margin-top:auto;text-align:center;padding:26px;color:#a2a49c;font-size:11px;border-top:1px solid #e5e0d7}
@media(max-width:680px){.shell{padding:0 14px}.top{padding:17px 0}.identity{font-size:15px}.logo{width:38px;height:38px}.gate{margin:7vh auto!important;padding:26px!important}.welcome{margin:28px 0 20px;display:block}.private-chip{display:inline-block;margin-top:12px}.tabs button{flex:1;padding:10px 9px;font-size:12px}.panel{padding:24px 18px}.toolbar{padding:16px;align-items:stretch;flex-direction:column}.toolbar label{width:100%}.two{grid-template-columns:1fr}.record-top{display:block}.record-top .meta{display:block;margin-top:7px}}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:15px}.actions button{padding:7px 12px;font-size:12px}.subtle.danger{color:#a0443b;border-color:#ebd4d1;background:#fff7f5}.history-detail{white-space:pre-wrap}.history-detail p+ p{border-top:1px solid #e0e8df;padding-top:12px}

/* Family health overview: calm, glanceable, clinically source-grounded. */
.dashboard.panel{border:0;background:transparent;box-shadow:none;padding:8px 0 16px;margin:0}
.dashboard-heading{display:flex;gap:24px;justify-content:space-between;align-items:end;margin:12px 2px 24px}
.dashboard-heading h2{font-size:clamp(27px,3.6vw,40px);letter-spacing:-.05em;margin:7px 0 6px}
.dashboard-heading p{margin:0;font-size:13px}
.dashboard-range-label,.dashboard-metric-label{font-size:12px;font-weight:750;color:#687368;display:flex;flex-direction:column;gap:7px}
.dashboard-range-label{width:175px;flex-shrink:0}
.dashboard-range-label select,.dashboard-metric-label select{background:#fff;border-radius:12px;border-color:#e4e8e1}
.dashboard-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:20px 0}
.dashboard-stat{position:relative;min-height:136px;padding:22px 24px;border:1px solid #e9ece8;background:#fff;border-radius:23px;box-shadow:0 8px 30px rgba(42,54,45,.025)}
.dashboard-stat:before{content:'';position:absolute;top:20px;right:23px;width:9px;height:9px;border-radius:100%;background:#c6dbc8}
.dashboard-stat:nth-child(2):before{background:#f2b3a2}.dashboard-stat:nth-child(3):before{background:#d2c0e5}.dashboard-stat:nth-child(4):before{background:#e9d49a}
.dashboard-stat span{display:block;color:#818a82;font-size:12px;font-weight:750;margin-bottom:19px}
.dashboard-stat strong{font-weight:770;line-height:1.1;letter-spacing:-.04em;font-size:clamp(23px,3vw,34px);color:#2b4434;overflow-wrap:anywhere}
.dashboard-stat small{font-size:12px;color:#8b938a;padding-left:7px}
.dashboard-columns{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);gap:15px;margin-bottom:15px}
.dashboard-bottom{grid-template-columns:repeat(2,minmax(0,1fr))}
.dashboard-surface{background:#fff;border:1px solid #e9ece8;border-radius:25px;padding:26px 27px;min-width:0;box-shadow:0 8px 30px rgba(42,54,45,.025)}
.dashboard-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}
.dashboard-section-head h3{font-size:19px;letter-spacing:-.025em;margin:5px 0 0}
.dashboard-section-head .eyebrow,.dashboard-intelligence .eyebrow{letter-spacing:.08em}
.feature-icon{display:grid;place-items:center;background:#f1f6f0;color:#63826a;border-radius:15px;width:42px;height:42px;flex-shrink:0;font-weight:750;font-size:23px}
.dashboard-feature .feature-icon{background:#fff0f0;color:#d86668}
.dashboard-metric-label select{margin-top:2px;max-width:100%;font-size:14px}
.dashboard-chart{min-height:252px;margin-top:22px}
.dashboard-chart-main{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.dashboard-chart-main strong{font-size:clamp(29px,4vw,42px);letter-spacing:-.045em;color:#2d3d33}
.dashboard-chart-main span{font-size:12px;color:#808c82}
.dashboard-chart svg{width:100%;height:auto;max-height:235px;display:block;margin-top:12px;overflow:visible}
.dashboard-chart-caption{display:flex;justify-content:space-between;gap:15px;color:#858c84;font-size:11px}
.dashboard-delta{font-size:12px;color:#66726b;margin:13px 0 0}
.dashboard-footnote{border-top:1px solid #eef1ed;padding-top:14px;margin:18px 0 0;font-size:11px;color:#959e96;line-height:1.6}
.dashboard-empty{padding:35px 12px;min-height:85px;color:#9ba29a;font-size:13px;text-align:center;line-height:1.65}
.dashboard-latest-list,.dashboard-family-list,.dashboard-events{display:flex;flex-direction:column}
.dashboard-latest-row,.dashboard-family-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 0;border-bottom:1px solid #f0f2ef}
.dashboard-latest-row:last-child,.dashboard-family-row:last-child{border-bottom:0}
.dashboard-latest-row strong,.dashboard-family-row strong,.dashboard-event strong{display:block;font-size:13px;color:#3c4a40;font-weight:760}
.dashboard-latest-row small,.dashboard-family-row small,.dashboard-event small{display:block;font-size:11px;color:#949e94;margin-top:5px}
.dashboard-latest-row>span{font-size:17px;white-space:nowrap;font-weight:780;color:#2d6247;letter-spacing:-.02em;text-align:right}
.dashboard-family-row b{font-size:19px;color:#3b5945;letter-spacing:-.035em}
.dashboard-family-row>div{text-align:right}
.dashboard-event{display:flex;gap:12px;padding:13px 0;border-bottom:1px solid #f0f2ef;align-items:start}
.dashboard-event:last-child{border-bottom:0}
.dashboard-event-dot{margin-top:5px;width:9px;height:9px;border-radius:100%;background:#e0a5a5;border:2px solid #f5e0e0;flex-shrink:0}
.dashboard-event:nth-child(3n+2) .dashboard-event-dot{background:#8da991;border-color:#deebdf}
.dashboard-event:nth-child(3n) .dashboard-event-dot{background:#d7b96f;border-color:#f5eccc}
.dashboard-intelligence{display:flex;align-items:center;justify-content:space-between;gap:24px;background:linear-gradient(125deg,#e9f2e9 0%,#f7f9f4 60%,#fff3f0 100%);margin:18px 0 28px;padding:30px 32px}
.dashboard-intelligence h3{font-size:21px;letter-spacing:-.03em;margin:8px 0}
.dashboard-intelligence p{color:#64766a;font-size:13px;line-height:1.7;margin:0;max-width:730px}
.dashboard-intelligence button{max-width:240px;flex-shrink:0;background:#fff;padding:13px 18px}
@media(max-width:860px){.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-columns,.dashboard-bottom{grid-template-columns:1fr}.dashboard-intelligence{align-items:stretch;flex-direction:column}.dashboard-intelligence button{max-width:none}}
@media(max-width:520px){.dashboard-heading{display:block}.dashboard-range-label{width:100%;margin-top:18px}.dashboard-stat{padding:18px;min-height:125px}.dashboard-surface{padding:20px 18px;border-radius:19px}.dashboard-stats{gap:10px}.dashboard-stat strong{font-size:24px}.dashboard-intelligence{padding:22px}.dashboard-chart-caption{font-size:10px}}

/* Primary input: mobile-friendly private AI intake, with clear review before write. */
.assistant-panel{background:transparent;border:0;box-shadow:none;padding:14px 0 28px}
.assistant-panel .panel-heading h2{font-size:clamp(24px,3.4vw,34px);letter-spacing:-.045em}
.assistant-status-dot{font-size:11px;color:#627c69;background:#ecf4ed;border-radius:30px;padding:9px 14px;white-space:nowrap}
.assistant-intro{font-size:13px;line-height:1.75;max-width:780px;margin:0 0 24px}
.assistant-thread{display:flex;flex-direction:column;gap:15px;min-height:245px;max-height:520px;overflow-y:auto;padding:25px 22px;border:1px solid #e8ede8;background:linear-gradient(165deg,#fff,#f9fbf9);border-radius:22px 22px 8px 8px}
.assistant-message{max-width:85%;white-space:pre-wrap;line-height:1.7;padding:15px 19px;border-radius:20px;font-size:14px;overflow-wrap:anywhere}
.assistant-bot{align-self:flex-start;color:#3f5546;background:#eef4ed;border-radius:20px 20px 20px 5px}
.assistant-user{align-self:flex-end;color:#fff;background:#40634d;border-radius:20px 20px 5px 20px}
.assistant-form{background:#fff;border:1px solid #e8ede8;border-top:0;padding:21px;border-radius:0 0 22px 22px}
.assistant-switch{display:flex;gap:7px;margin:0 0 15px}
.assistant-switch button{border:1px solid #e6eae5;background:#fff;color:#7a877b;padding:9px 15px;border-radius:25px;font-size:12px;font-weight:750}
.assistant-switch button.active{background:#31513e;color:white;border-color:#31513e}
.assistant-form textarea{min-height:100px;line-height:1.65;font-size:15px;border-color:#e1e7df;background:#fefefe}
.assistant-controls{display:flex;align-items:center;flex-wrap:wrap;gap:13px;margin-top:13px}
.assistant-attach{display:flex;align-items:center;gap:7px;cursor:pointer;font-size:13px;color:#3c6849;font-weight:750;border:1px solid #dfe8dc;padding:12px 14px;border-radius:12px}
.assistant-attach:hover{background:#eff5ec}
.assistant-controls .primary{margin-left:auto;white-space:nowrap}
#assistant-file-label{font-size:11px;flex:1;min-width:100px;overflow-wrap:anywhere}
#assistant-feedback{min-height:17px;margin:10px 0 0;font-size:12px}
.assistant-draft{border:1px solid #c7dcc9;background:#f6faf5;border-radius:19px;padding:25px;margin:17px 0}
.assistant-draft-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.assistant-draft-pill{font-size:11px;color:#926b37;background:#fbebcd;border-radius:30px;padding:6px 12px}
.assistant-draft h3{font-size:19px;color:#2c5237;margin:15px 0 10px}
.assistant-draft p{font-size:13px;line-height:1.65;white-space:pre-wrap}
.assistant-evidence{color:#6c806d;padding:12px 16px;background:#eaf3e9;border-radius:10px}
.assistant-observations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:18px 0}
.assistant-observation{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;padding:14px;background:#fff;border:1px solid #edf0ea;border-radius:12px;font-size:12px}
.assistant-observation strong{color:#435e49}.assistant-observation span{font-weight:800;color:#2f6544}
.assistant-observation small{width:100%;color:#869286;overflow-wrap:anywhere}
.assistant-fallback{font-size:12px;line-height:1.7;color:#6a746a;margin:20px 4px 0;padding:16px 18px;border:1px dashed #d7e1d4;border-radius:13px}
.assistant-fallback strong{color:#405b44}
@media(max-width:560px){.assistant-panel .panel-heading{display:block}.assistant-status-dot{display:inline-block;margin:6px 0 16px}.assistant-thread{padding:15px 12px;min-height:205px;max-height:440px}.assistant-message{max-width:95%;font-size:13px;padding:12px 14px}.assistant-form{padding:13px}.assistant-observations{grid-template-columns:1fr}.assistant-draft{padding:18px}.assistant-controls .primary{width:100%;margin-left:0}}
