:root{--bg:#0a0d12;--panel:#10151d;--panel2:#131a24;--line:#222b38;--muted:#7c8999;--text:#edf2f7;--soft:#b6c0cc;--lime:#c8f169;--lime2:#a9d94d;--red:#ff6b68;--amber:#f6bc62;--blue:#75b9ff;--radius:14px;--mono:'SFMono-Regular',Consolas,'Liberation Mono',monospace;--sans:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);font-size:13px}button,input,select,textarea{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh;display:flex}.sidebar{width:252px;flex:0 0 252px;background:#0c1016;border-right:1px solid #1b2430;display:flex;flex-direction:column;padding:25px 15px 14px;position:fixed;inset:0 auto 0 0;z-index:20}.brand-lockup{display:flex;align-items:center;gap:11px;padding:0 12px 31px}.brand-mark{width:34px;height:34px;border:1px solid #546d37;border-radius:10px;display:grid;place-items:center;color:var(--lime);font-weight:800;font-size:20px;position:relative;box-shadow:0 0 18px #c8f16918}.brand-mark i{position:absolute;width:6px;height:6px;right:-3px;top:-3px;background:var(--lime);border-radius:50%}.brand-name{font-weight:800;font-size:17px;letter-spacing:1.4px}.brand-name span{color:var(--lime)}.brand-sub,.workspace-label,.breadcrumb,.app-footer,.eyebrow,.metric-label,.table-head,.label,.local-badge strong{font-family:var(--mono);letter-spacing:1px}.brand-sub{font-size:8px;color:#738091;margin-top:3px;letter-spacing:1.15px}.workspace-label{font-size:9px;color:#647182;padding:0 12px 10px}.nav-list{display:flex;flex-direction:column;gap:4px}.nav-item{border:0;background:transparent;color:#9ba7b5;border-radius:9px;display:flex;align-items:center;text-align:left;padding:11px 12px;gap:11px;transition:.18s;width:100%}.nav-item:hover{background:#141c26;color:#e7edf4}.nav-item.active{background:#1a241d;color:var(--lime);box-shadow:inset 2px 0 var(--lime)}.nav-icon{width:17px;text-align:center;font-size:16px}.nav-item span:nth-child(2){font-weight:600;font-size:12px;flex:1}.nav-item kbd{font:9px var(--mono);color:#586575}.nav-item.active kbd{color:#819b59}.nav-divider{height:1px;background:#1d2631;margin:16px 8px 14px}.sidebar-bottom{margin-top:auto}.local-badge{padding:12px;border:1px solid #29352a;background:#121b16;border-radius:10px;display:flex;align-items:center;gap:10px;margin:0 4px 12px}.pulse-dot{width:7px;height:7px;background:var(--lime);border-radius:50%;box-shadow:0 0 10px #c8f16980}.local-badge strong{display:block;font-size:8px;color:var(--lime)}.local-badge small{display:block;color:#7c8a80;font-size:9px;margin-top:3px}.profile-mini{display:flex;align-items:center;gap:9px;width:100%;padding:12px 8px 6px;background:transparent;border:0;border-top:1px solid #1e2732;color:var(--text);text-align:left}.avatar{width:29px;height:29px;border-radius:9px;display:grid;place-items:center;background:#263326;color:var(--lime);font-weight:800}.profile-mini-text{flex:1;min-width:0}.profile-mini-text strong,.profile-mini-text small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-mini-text strong{font-size:11px}.profile-mini-text small{font-size:9px;color:var(--muted);margin-top:3px}.more-dots{color:#6f7c8c;letter-spacing:2px}.main-area{margin-left:252px;width:calc(100% - 252px);min-height:100vh;display:flex;flex-direction:column}.topbar{height:65px;border-bottom:1px solid #1b2430;display:flex;align-items:center;justify-content:space-between;padding:0 35px;position:sticky;top:0;background:#0a0d12eF;backdrop-filter:blur(16px);z-index:10}.breadcrumb{font-size:9px;color:#778494}.breadcrumb b{margin:0 10px;color:#394452}.breadcrumb strong{color:#dce4ec;font-weight:500}.topbar-right{display:flex;align-items:center;gap:13px}.today-label{font:9px var(--mono);color:#7c8999}.icon-button{width:32px;height:32px;border:1px solid #293341;background:#101720;color:#9eabb9;border-radius:8px;font-size:17px}.top-cta,.btn-primary{background:var(--lime);border:1px solid var(--lime);color:#12180c;border-radius:8px;padding:10px 14px;font-size:11px;font-weight:800;display:inline-flex;align-items:center;gap:7px;transition:.18s}.top-cta:hover,.btn-primary:hover{background:#d8fa88;transform:translateY(-1px)}.mobile-menu{display:none}.page-wrap{max-width:1420px;width:100%;margin:0 auto;padding:31px 35px 46px;flex:1}.app-footer{border-top:1px solid #1b2430;padding:15px 35px;color:#556272;font-size:8px;display:flex;justify-content:space-between}.app-footer b{color:var(--lime);margin:0 6px}.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:25px}.eyebrow{font-size:9px;color:var(--lime);margin-bottom:9px}.page-title{font-size:27px;line-height:1.15;letter-spacing:-1px;margin:0;font-weight:800}.page-sub{color:#8390a0;margin:8px 0 0;font-size:11px;line-height:1.6;max-width:650px}.heading-actions{display:flex;gap:8px;align-items:center}.btn-secondary{background:#121923;border:1px solid #2b3542;color:#c8d1db;border-radius:8px;padding:10px 13px;font-size:10px;font-weight:700}.btn-secondary:hover{border-color:#64734e;color:var(--lime)}.grid{display:grid;gap:14px}.metrics-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:15px}.card{background:linear-gradient(145deg,#121923,#0f141c);border:1px solid #222d3a;border-radius:var(--radius);padding:17px;min-width:0}.metric-card{min-height:113px;position:relative;overflow:hidden}.metric-card:after{content:'';position:absolute;width:85px;height:85px;border-radius:50%;border:1px solid #36452b;right:-31px;top:-33px;box-shadow:0 0 0 12px #9fcf3510,0 0 0 25px #9fcf3508}.metric-label{font-size:8px;color:#8290a0}.metric-value{font-size:27px;font-weight:800;letter-spacing:-1px;margin-top:12px}.metric-foot{font-size:9px;color:#748294;margin-top:3px}.metric-foot.good{color:var(--lime)}.two-col{grid-template-columns:minmax(0,1.55fr) minmax(280px,1fr)}.three-col{grid-template-columns:repeat(3,minmax(0,1fr))}.card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;gap:10px}.card-title{font-size:12px;font-weight:800;margin:0}.card-kicker{color:#758293;font:8px var(--mono);letter-spacing:.8px}.chart-wrap{height:205px;display:flex;align-items:flex-end;gap:11px;padding:15px 5px 0;border-bottom:1px solid #293341;background:repeating-linear-gradient(to bottom,transparent 0,transparent 49px,#202936 50px)}.chart-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:7px;min-width:0}.chart-bar{width:min(25px,65%);background:linear-gradient(180deg,#c8f169,#668e35);border-radius:5px 5px 1px 1px;min-height:3px;box-shadow:0 0 15px #c8f16920}.chart-bar.dim{background:#344154;box-shadow:none}.chart-value{font:8px var(--mono);color:#9cabbb}.chart-label{font:8px var(--mono);color:#758394;white-space:nowrap}.issue-card{background:linear-gradient(135deg,#1b2519,#121a17);border-color:#384b2d}.issue-label{font:8px var(--mono);letter-spacing:1px;color:var(--lime)}.issue-title{font-size:16px;line-height:1.35;font-weight:800;margin:12px 0 7px}.issue-copy{font-size:10px;line-height:1.7;color:#a4b19f}.issue-empty{color:#a5b29d;font-size:11px;line-height:1.7;margin-top:12px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:490px}th{text-align:left;padding:10px 9px;color:#728092;font:8px var(--mono);letter-spacing:1px;border-bottom:1px solid #293341}td{padding:12px 9px;border-bottom:1px solid #202a36;font-size:10px;color:#c5ced8}tr:last-child td{border-bottom:0}.placement{font-weight:800;color:var(--lime)}.tag{display:inline-flex;align-items:center;gap:5px;border:1px solid #344050;border-radius:20px;padding:4px 7px;font:8px var(--mono);color:#a8b5c4;white-space:nowrap}.tag.green{border-color:#435c30;background:#1b2818;color:var(--lime)}.tag.red{border-color:#583735;background:#291a1a;color:#ff918c}.tag.amber{border-color:#5d4b2e;background:#292216;color:#f6c36d}.empty-state{padding:27px 15px;text-align:center;color:#7c8999;font-size:10px;line-height:1.7}.empty-icon{font-size:23px;color:#82945e;margin-bottom:8px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field.full{grid-column:1/-1}.field label,.label{font-size:8px;color:#9aa7b5;letter-spacing:.9px;font-weight:600}.field input,.field select,.field textarea,.inline-input{width:100%;background:#0b1118;border:1px solid #2a3542;border-radius:7px;padding:10px 11px;color:#e7edf4;font-size:10px;outline:none}.field textarea{min-height:85px;resize:vertical;line-height:1.6}.field input:focus,.field select:focus,.field textarea:focus{border-color:#8eae4e;box-shadow:0 0 0 2px #c8f16913}.field option{background:#111821}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}.hint{font-size:9px;color:#718092;line-height:1.55}.section-gap{margin-top:15px}.result-panel{border:1px solid #38492c;background:#121b16;border-radius:12px;padding:18px;margin-top:14px}.result-panel h3{font-size:13px;margin:0 0 10px}.result-panel p{font-size:10px;line-height:1.7;color:#bac5b3}.result-list{display:grid;gap:9px}.result-item{padding:12px;border:1px solid #2a3540;background:#101720;border-radius:9px}.result-item h4{margin:0 0 5px;font-size:11px}.result-item p{margin:0;color:#92a0af;font-size:9px;line-height:1.65}.priority-number{font:10px var(--mono);color:var(--lime);margin-right:7px}.split-line{height:1px;background:#26303c;margin:14px 0}.stat-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #222d39;font-size:10px}.stat-row:last-child{border-bottom:0}.stat-row span{color:#8795a4}.stat-row strong{color:#e7edf4}.pill-row{display:flex;flex-wrap:wrap;gap:7px}.filter-pill{border:1px solid #2b3542;background:#101720;color:#8f9dad;border-radius:20px;padding:7px 10px;font:9px var(--mono)}.filter-pill.active{color:var(--lime);border-color:#536d36;background:#1b2518}.call-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.call-item{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid #26303c;padding:10px 0}.call-item:last-child{border-bottom:0}.call-text{font-size:11px;font-weight:700}.call-type{font:8px var(--mono);color:#768495;text-transform:uppercase}.copy-btn{border:1px solid #2d3947;background:#131c27;color:#aebac7;border-radius:6px;padding:5px 8px;font-size:9px}.copy-btn:hover{color:var(--lime);border-color:#586d3c}.week-grid{grid-template-columns:repeat(7,minmax(0,1fr))}.day-card{background:#111821;border:1px solid #293442;border-radius:10px;padding:11px;min-height:138px}.day-name{font:8px var(--mono);color:var(--lime);letter-spacing:1px}.day-title{font-size:10px;font-weight:800;margin:10px 0 6px}.day-copy{font-size:9px;color:#8c9aaa;line-height:1.55}.progress-track{height:5px;background:#26303c;border-radius:6px;overflow:hidden;margin-top:12px}.progress-track span{display:block;height:100%;background:var(--lime);border-radius:6px}.notice{padding:11px 13px;border:1px solid #59492c;background:#251f14;color:#e6c27d;border-radius:8px;font-size:9px;line-height:1.6;margin-bottom:13px}.notice.info{border-color:#2c455b;background:#111e2a;color:#95caff}.notice.good{border-color:#3c552d;background:#141e13;color:#bce779}.hidden{display:none!important}.score-big{font-size:32px;font-weight:800;color:var(--lime);letter-spacing:-1px}.comparison-grid{grid-template-columns:1fr 1fr}.mini-stat{border:1px solid #2a3541;background:#0e151e;border-radius:9px;padding:13px}.mini-stat small{display:block;color:#8290a0;font:8px var(--mono);letter-spacing:.8px}.mini-stat strong{display:block;font-size:21px;margin-top:7px}.bar-row{display:grid;grid-template-columns:105px 1fr 25px;align-items:center;gap:10px;margin:11px 0;font-size:9px;color:#99a7b6}.bar-track{height:7px;background:#27313d;border-radius:5px;overflow:hidden}.bar-track span{display:block;background:var(--lime);height:100%;border-radius:5px}.danger-link{border:0;background:transparent;color:#ff8984;font-size:9px;padding:7px}.small-muted{font-size:9px;color:#718092}.settings-line{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #26303c}.toast{position:fixed;bottom:24px;right:24px;background:#d3f68d;color:#11180b;font-size:11px;font-weight:800;padding:11px 15px;border-radius:8px;box-shadow:0 12px 30px #0008;opacity:0;transform:translateY(12px);pointer-events:none;transition:.25s;z-index:50}.toast.show{opacity:1;transform:translateY(0)}
@media(max-width:1100px){.sidebar{width:220px;flex-basis:220px}.main-area{margin-left:220px;width:calc(100% - 220px)}.page-wrap{padding:25px 22px}.topbar{padding:0 22px}.week-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:800px){.sidebar{transform:translateX(-100%);transition:.25s;width:260px;box-shadow:20px 0 60px #0008}.sidebar.open{transform:translateX(0)}.main-area{margin-left:0;width:100%}.mobile-menu{display:block;border:1px solid #293341;background:#101720;color:#c7d1dc;border-radius:7px;padding:6px 9px}.topbar{height:58px;padding:0 15px}.breadcrumb{margin-right:auto;margin-left:12px}.today-label{display:none}.page-wrap{padding:22px 15px}.metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.two-col{grid-template-columns:1fr}.three-col{grid-template-columns:1fr 1fr}.page-heading{align-items:flex-start;flex-direction:column}.heading-actions{width:100%}.app-footer{padding:13px 15px;gap:10px;flex-wrap:wrap}.week-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.page-title{font-size:23px}.top-cta{padding:9px 10px}.top-cta span{display:none}.form-grid,.form-grid.three,.call-grid,.comparison-grid{grid-template-columns:1fr}.three-col{grid-template-columns:1fr}.week-grid{grid-template-columns:1fr 1fr}.card{padding:14px}.page-heading{margin-bottom:18px}.metric-value{font-size:24px}.app-footer{font-size:7px}}

/* Phase 1 accessibility and mobile quick-entry layer. */
body { font-size: 14px; }
body :is(.brand-sub,.workspace-label,.nav-item span,.nav-item kbd,.local-badge strong,.local-badge small,.profile-mini-text strong,.profile-mini-text small,.breadcrumb,.today-label,.top-cta,.btn-primary,.btn-secondary,.app-footer,.eyebrow,.page-sub,.metric-label,.metric-foot,.card-title,.card-kicker,.chart-value,.chart-label,.issue-label,.issue-copy,.issue-empty,th,td,.tag,.empty-state,.field label,.field input,.field select,.field textarea,.inline-input,.hint,.result-panel p,.result-item h4,.result-item p,.priority-number,.stat-row,.filter-pill,.call-text,.call-type,.day-name,.day-title,.day-copy,.notice,.mini-stat small,.bar-row,.danger-link,.small-muted,.settings-line,.copy-btn,.quick-label,.quick-log-step,.quick-log-top p,.quick-log-side .issue-copy,.toast) {
  font-size: 14px !important;
}
button, input, select, textarea, summary, [role="button"], .nav-item, .profile-mini, .copy-btn, .filter-pill {
  min-height: 44px;
}
button, [role="button"] { min-width: 44px; }
input, select, textarea { font-size: 16px !important; }
button, input, select, textarea, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.full-width { width: 100%; }
.metric-wait { font-size: 14px !important; letter-spacing: 0 !important; line-height: 1.3; }
.chart-wrap { overflow-x: auto; align-items: stretch; }
.chart-track { display: flex; align-items: flex-end; gap: 14px; width: 100%; min-width: 100%; height: 100%; }
.chart-col { min-width: 72px; flex: 1 0 72px; }
.chart-label { white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.15; }
.chart-caption { line-height: 1.5; }
.evidence-label { display: inline-flex; align-items: center; border: 1px solid #3b4d32; background: #172218; color: #c8f169; border-radius: 5px; padding: 3px 7px; margin-right: 4px; font: 700 14px/1.2 var(--mono) !important; letter-spacing: 0 !important; }
.evidence-label.opinion { color: #ffd28d; background: #2b2418; border-color: #66502d; }
.evidence-label.hypothesis { color: #a9d7ff; background: #152432; border-color: #34516b; }
.evidence-note { margin-top: 9px !important; }
.pattern-list { margin-top: 14px; }
.pattern-insight-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pattern-insight p { line-height: 1.55; margin: 8px 0 0; }
.demo-panel { border-color: #68522d; background: linear-gradient(145deg, #201c14, #10151d); }
.quick-log-shell { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr); gap: 15px; align-items: start; }
.quick-log-card { padding: 22px; }
.quick-log-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.quick-log-top h2 { margin: 0; font-size: 22px !important; line-height: 1.2; }
.quick-log-top p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }
.quick-log-step { color: var(--lime); border: 1px solid #465a32; border-radius: 8px; padding: 7px 10px; white-space: nowrap; }
.quick-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.quick-result-grid input { min-height: 56px; font-size: 22px !important; font-weight: 800; }
.quick-field { padding: 14px 0; border-top: 1px solid #27313d; }
.quick-label { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; font-weight: 800; color: #dce5ee; }
.quick-label span { color: var(--muted); font-weight: 500; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chip { scroll-margin-bottom: 150px; border: 1px solid #344151; background: #0c131c; color: #aebac7; border-radius: 9px; padding: 9px 12px; line-height: 1.15; }
.choice-chip.selected { background: #1b2818; border-color: var(--lime); color: var(--lime); box-shadow: inset 0 0 0 1px #c8f16940; }
.quick-other { width: 100%; min-height: 48px; margin-top: 9px; }
.quick-notes { margin-top: 8px; color: #c4cfda; }
.quick-notes summary { display: flex; align-items: center; width: fit-content; cursor: pointer; color: var(--lime); padding: 7px 0; }
.quick-notes textarea { width: 100%; margin-top: 9px; min-height: 72px; }
.quick-log-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid #27313d; padding-top: 16px; margin-top: 14px; }
.quick-save { min-height: 52px; padding: 12px 20px; }
.quick-log-side { display: grid; gap: 14px; }
.quick-speed-value { color: var(--lime); font-size: 32px !important; font-weight: 850; margin-bottom: 6px; }
.quick-log-side .card { padding: 17px; }
.quick-log-side .result-item { margin-top: 8px; }
.quick-log-side .issue-copy { line-height: 1.55; }
@media (max-width: 800px) {
  .quick-log-shell { grid-template-columns: 1fr; }
  .quick-log-side { grid-template-columns: 1fr 1fr; }
  .quick-log-card { padding: 16px; }
  .quick-log-actions { position: sticky; bottom: 0; z-index: 6; background: #10151d; box-shadow: 0 -12px 20px #10151d; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .quick-log-side { grid-template-columns: 1fr; }
  .quick-log-top { flex-direction: column; }
  .quick-log-step { align-self: flex-start; }
  .quick-result-grid { gap: 9px; }
  .quick-result-grid input { font-size: 20px !important; }
  .quick-log-actions { align-items: stretch; }
  .quick-log-actions .quick-save { width: 100%; }
  .chart-track { min-width: 520px; }
  .app-footer { font-size: 14px !important; }
}

/* Phase 2 intelligence and navigation layout */
.sidebar { padding-bottom: 18px; }
.nav-list { min-height: 0; overflow-y: auto; flex: 1 1 auto; padding-right: 3px; scrollbar-width: thin; scrollbar-color: #354232 transparent; }
.sidebar-bottom { flex: 0 0 auto; padding-top: 12px; background: #0c1016; }
.local-badge { align-items: flex-start; min-width: 0; }
.local-badge > div { min-width: 0; flex: 1; }
.local-badge strong { font-size: 12px !important; letter-spacing: .7px; line-height: 1.35; }
.local-badge small { font-size: 14px !important; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.profile-mini-text { overflow-wrap: anywhere; }
.nav-item { flex: 0 0 auto; }
.nav-item span:nth-child(2) { font-size: 14px !important; }
.nav-item kbd { font-size: 14px !important; }
.page-heading { flex-wrap: wrap; }
.heading-actions { flex-wrap: wrap; }
.leak-feature,.leak-empty { display:flex; align-items:center; gap:18px; padding:14px; border:1px solid #3d512e; border-radius:10px; background:linear-gradient(130deg,#1a2518,#101720); }
.leak-empty { border-color:#354151; }
.leak-score { display:grid; place-items:center; width:82px; height:82px; flex:0 0 82px; border-radius:50%; border:2px solid var(--lime); color:var(--lime); font-size:30px; font-weight:850; }
.leak-empty .leak-score { border-color:#536171; color:#8292a3; }
.leak-copy h3,.leak-empty h3 { margin:4px 0 7px; font-size:18px; }
.leak-copy p,.leak-empty p { color:#aab7a5; line-height:1.55; margin:5px 0; }
.formula-details { margin-top:12px; padding:12px; background:#0c131b; border:1px solid #293746; border-radius:9px; line-height:1.65; }
.formula-details summary { cursor:pointer; color:var(--lime); font-weight:800; }
.formula-details p { color:#aebac7; }
.mini-list { margin:10px 0; }
.before-after-list { display:grid; gap:10px; }
.before-after-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px; background:#101720; border:1px solid #2b3744; border-radius:9px; }
.before-after-row p { margin:5px 0 0; color:#8492a2; }
.before-after-values { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; font-weight:800; }
.before-after-values em { font-style:normal; border-radius:6px; padding:4px 7px; }
.before-after-values .better { color:#c8f169; background:#1d2a18; }
.before-after-values .worse { color:#ff9a8f; background:#2b1b1b; }
.before-after-values .same { color:#aab7c5; background:#1d2630; }
.trend-legend { display:flex; gap:16px; flex-wrap:wrap; color:#aab6c4; margin:0 0 8px; }
.legend-place { color:#c8f169; }
.legend-kills { color:#75b9ff; }
.svg-scroll { width:100%; overflow-x:auto; }
.trend-svg { display:block; width:100%; min-width:360px; }
.chart-axis { stroke:#44515f; stroke-width:1; }
.chart-svg-label { fill:#a2afbd; font-size:14px; text-anchor:middle; }
.line-place { fill:none; stroke:#c8f169; stroke-width:3; }
.line-kills { fill:none; stroke:#75b9ff; stroke-width:3; }
.dot-place { fill:#c8f169; }
.dot-kills { fill:#75b9ff; }
.heatmap-wrap { width:100%; overflow:auto; }
.heatmap { min-width:520px; }
.heatmap th { white-space:normal; max-width:120px; }
.heatmap td { text-align:center; padding:7px; }
.heat-cell { display:grid; place-items:center; min-width:34px; min-height:34px; border-radius:7px; background:#17212b; color:#93a2b2; font-weight:800; }
.heat-cell.h1 { background:#25341f; color:#d1f58e; }
.heat-cell.h2 { background:#384d26; color:#e0ffa8; }
.heat-cell.h3 { background:#596b2c; color:#fff; }
.heat-cell.h4,.heat-cell.h5 { background:#7a662b; color:#fff; }
.autopsy-result { margin-top:16px; padding:16px; border:1px solid #3b4d32; border-radius:10px; background:#101a15; }
.autopsy-result h3 { margin:6px 0 10px; }
.autopsy-result p { line-height:1.65; color:#b7c4b2; }
.autopsy-item { border-top:1px solid #2b3b2c; padding:14px 0; }
.autopsy-title { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.autopsy-title h4 { margin:0; flex:1; }
.autopsy-item p { margin:9px 0; }
.autopsy-item b { color:#e8f0e6; }
.date-inline { display:flex; align-items:center; gap:8px; color:#aab6c4; }
.date-inline input { background:#0b1118; color:#eef3f8; border:1px solid #344151; border-radius:7px; padding:8px; min-height:44px; }
.kb-entry-list { display:grid; gap:8px; margin-top:14px; }
.kb-entry { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; align-items:center; gap:8px; border:1px solid #2b3744; border-radius:8px; padding:9px; background:#0d141c; }
.kb-entry strong,.kb-entry small { display:block; }
.kb-entry small { color:#9eacbb; line-height:1.4; margin-top:4px; overflow-wrap:anywhere; }
.full-span { grid-column:1/-1; }
.quick-log-top p { line-height:1.5; }
@media(max-width:800px){
  .sidebar { max-height:100dvh; }
  .sidebar-bottom { margin-top:8px; }
  .local-badge { padding:9px; }
  .before-after-row { align-items:flex-start; flex-direction:column; }
  .before-after-values { justify-content:flex-start; }
  .kb-entry { grid-template-columns:1fr 1fr; }
  .kb-entry > div { grid-column:1/-1; }
  .date-inline { flex-wrap:wrap; }
  .leak-feature,.leak-empty { align-items:flex-start; }
}
@media(max-width:520px){
  .leak-feature,.leak-empty { flex-direction:column; }
  .leak-score { width:68px; height:68px; flex-basis:68px; }
  .quick-log-actions { position:sticky; }
  .date-inline { width:100%; }
  .date-inline input { width:100%; }
}

/* Phase 2: Knowledge Base metadata remains comfortably readable. */
.kb-entry small { font-size: 14px !important; }

/* Saved scoring format picker */
.inline-load{display:flex;gap:10px;align-items:stretch}.inline-load select{flex:1;min-width:0}.inline-load .btn-secondary{min-width:84px}
@media(max-width:520px){.inline-load{flex-direction:column}.inline-load .btn-secondary{width:100%}}

/* Hardening: visible backup safety, first-run guide, and local feedback loop. */
.backup-card { border-color:#405333; background:linear-gradient(130deg,#151f17,#101720); margin:0 0 14px; }
.backup-card.backup-warning { border-color:#8b6631; background:linear-gradient(130deg,#281f13,#121923); }
.backup-card-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.backup-card h3 { margin:5px 0 7px; font-size:19px; }
.backup-card p { margin:5px 0; line-height:1.5; }
.backup-icon { display:grid; place-items:center; width:46px; height:46px; border-radius:12px; background:#202b1c; color:var(--lime); font-size:25px; flex:0 0 46px; }
.backup-warning .backup-icon { background:#3a2b17; color:#ffd28d; }
.backup-actions,.first-run-actions,.success-actions,.feedback-actions { display:flex; gap:9px; flex-wrap:wrap; margin-top:12px; }
.backup-actions button,.first-run-actions button,.success-actions button,.feedback-actions button { min-height:44px; }
.backup-current { box-shadow:inset 3px 0 #8cb84f; }
.backup-warning { box-shadow:inset 3px 0 #d5a24e; }
.first-run-card { margin:0 0 14px; border-color:#526b37; background:linear-gradient(135deg,#172318,#101821); }
.first-run-card h2 { margin:7px 0; font-size:22px; }
.first-run-card p { line-height:1.55; }
.first-run-actions { margin:14px 0; }
.context-note { color:#a8b5c2 !important; font-size:14px; line-height:1.45; }
.heuristic-note { display:inline-block; padding:6px 9px; border:1px solid #66502d; background:#2b2418; color:#ffd28d !important; border-radius:7px; font-size:14px; }
.insight-feedback { border-top:1px solid #344132; margin-top:12px; padding-top:10px; }
.insight-feedback p { line-height:1.45; margin:5px 0; }
.feedback-actions { margin-top:8px; }
.feedback-btn { padding:8px 14px; border:1px solid #46563d; border-radius:8px; background:#172219; color:#d9edbc; font-weight:750; min-width:76px; }
.feedback-btn:hover,.feedback-btn:focus-visible { border-color:var(--lime); outline:2px solid #c8f16944; outline-offset:2px; }
.insight-feedback.saved { border-color:#405b35; background:#111b14; border-radius:8px; padding:9px 12px; }
.quick-success { margin:0 0 14px; }
.quick-success strong { display:block; }
.quick-batch-toggle { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 0 14px; border-bottom:1px solid #27313d; color:#aebac7; flex-wrap:wrap; }
.quick-batch-toggle button { min-height:44px; }
@media(max-width:520px) {
  .backup-actions,.first-run-actions { display:grid; grid-template-columns:1fr; }
  .backup-actions button,.first-run-actions button { width:100%; }
  .backup-card-head { gap:8px; }
  .feedback-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .feedback-btn { padding:8px 7px; min-width:0; }
  .quick-batch-toggle { align-items:stretch; }
  .quick-batch-toggle button { width:100%; }
}


/* Phase 3.1 — install, update and offline status. */
.network-pill{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:3px 9px;border-radius:20px;border:1px solid #35513a;background:#142015;color:#c8f169;font:700 14px var(--mono);letter-spacing:.5px}
.network-pill.offline{border-color:#7d5633;background:#2a1d13;color:#ffcb86}
.system-notices{padding:0 30px;max-width:1600px;margin:0 auto}
.pwa-notice{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:10px 0 0;padding:12px 14px}
.pwa-notice p{margin:3px 0 0;font-size:14px;line-height:1.5}
.pwa-notice-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.pwa-notice .btn-primary,.pwa-notice .btn-secondary{min-height:44px;white-space:nowrap}
.offline-notice{margin:10px 0 0;border-color:#7d5633;background:#2a1d13;color:#ffcb86;font-size:14px}
.storage-warning{margin-top:12px;padding:12px;border:1px solid #65512f;border-radius:9px;background:#211c13;color:#f0d39a}
.storage-warning strong{font-size:14px}
.storage-warning p{margin:5px 0 0;font-size:14px;line-height:1.55;color:#ddc99f}
@media(max-width:800px){.system-notices{padding:0 15px}.pwa-notice{align-items:flex-start;flex-direction:column}.pwa-notice-actions{width:100%}.pwa-notice-actions button{flex:1}}
@media(max-width:520px){.network-pill{font-size:14px;padding:3px 7px;min-height:28px}.topbar-right{gap:6px}.pwa-notice-actions{flex-wrap:wrap}}

@media(max-width:800px){.quick-field{scroll-margin-bottom:150px}.quick-log-form{padding-bottom:120px}}


/* Phase 3.2 — private, local Report Card PNG generator. */
.report-card-layout{display:grid;grid-template-columns:minmax(285px,.88fr) minmax(0,1.12fr);gap:15px;align-items:start}
.report-controls,.report-preview-panel{min-width:0}
.report-control-group{border-top:1px solid #293542;padding:15px 0;margin-top:8px}
.report-control-group>strong{display:block;font-size:16px;color:#eaf1f7;margin-bottom:5px}
.report-toggle-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.report-toggle{display:flex;align-items:center;gap:9px;min-height:48px;padding:9px 10px;border:1px solid #344251;border-radius:9px;background:#0d151e;color:#e6edf3;overflow-wrap:anywhere}
.report-toggle input{width:20px;height:20px;min-height:20px;flex:0 0 20px;accent-color:#c8f169}
.report-toggle span{display:flex;flex-direction:column;gap:3px;min-width:0;font-size:14px;line-height:1.3}
.report-toggle small{font-size:14px;color:#9baab8;overflow-wrap:anywhere}
.report-mistake-toggles{grid-template-columns:1fr}
.report-template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
.report-template{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;min-height:68px;padding:9px 10px;border:1px solid #344251;border-radius:9px;background:#0d151e;color:#e9f0f5;text-align:left}
.report-template b{font-size:14px}.report-template small{font-size:14px;color:#9baab8;line-height:1.3}
.report-template.active{border-color:#c8f169;background:#1b2818;box-shadow:inset 0 0 0 1px #c8f16940}
.report-date-field{margin-top:12px}
.report-honesty-note{font-size:14px;line-height:1.55}
.report-canvas-wrap{width:100%;max-width:520px;margin:12px auto 0;padding:8px;background:#080d13;border:1px solid #354352;border-radius:12px}
.report-canvas-wrap canvas{display:block;width:100%;height:auto;aspect-ratio:4/5;border-radius:7px;background:#090f16}
.report-export-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}
.report-export-actions button{min-height:48px}
.report-export-actions button:disabled{opacity:.42;cursor:not-allowed}
#rcNickname{min-height:48px;width:100%}
@media(max-width:900px){.report-card-layout{grid-template-columns:1fr}}
@media(max-width:520px){.report-template-grid{grid-template-columns:1fr 1fr}.report-template:last-child{grid-column:1/-1}.report-toggle-grid{grid-template-columns:1fr 1fr}.report-canvas-wrap{padding:5px}.report-export-actions{grid-template-columns:1fr}.report-controls,.report-preview-panel{padding:14px}}


/* Phase 3.2.1 — position scoring table and local rulebook hub. */
.placement-editor{border:1px solid #354352;border-radius:10px;background:#0b121a;padding:12px;min-width:0}
.placement-editor-head{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.placement-point-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.placement-point-cell{display:flex;flex-direction:column;gap:4px;border:1px solid #2c3947;border-radius:8px;padding:7px;background:#111a24;min-width:0}
.placement-point-cell span{font-size:14px;color:#aebbc8;font-weight:700}
.placement-point-cell input{width:100%;min-width:0;min-height:44px;padding:7px;background:#080e14;border:1px solid #3b4a59;border-radius:6px;color:#f1f5f8;font-size:16px}
.rulebook-results{display:grid;gap:10px;margin-top:12px}
.rulebook-entry{padding:13px;border:1px solid #30404e;border-radius:10px;background:#0e161f;min-width:0}
.rulebook-entry p{line-height:1.5;overflow-wrap:anywhere}
.rulebook-entry-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.rulebook-entry-head strong{font-size:16px;overflow-wrap:anywhere}
.rulebook-category-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
.rulebook-entry .copy-btn{min-height:44px}
@media(max-width:520px){.placement-point-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.placement-editor{padding:9px}.rulebook-entry{padding:11px}}
