/* Overlook: dashboard styling, density, Hermes dock. Loaded after home.css. */
:root{--dock-h:0px;--ov-gap:16px}
body[data-density=compact]{--ov-gap:10px;--ov-fs:.93}
body[data-density=overview]{--ov-gap:8px;--ov-fs:.82}
body[data-density=comfort]{--ov-gap:18px;--ov-fs:1}

/* ---- header controls: segmented, readable, clear active state ---- */
.hdr-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.density,.mseg{display:inline-flex;gap:2px;padding:3px;background:#0d1116;border:1px solid var(--line);border-radius:12px;position:relative}
.density button{appearance:none;border:0;background:transparent;color:var(--muted);font:600 11px var(--mono);letter-spacing:.06em;text-transform:uppercase;padding:8px 11px;border-radius:9px;cursor:pointer;min-height:34px}
.density button:hover{color:var(--bright)}
.density button[aria-pressed=true]{background:#1a1610;color:var(--gold);box-shadow:inset 0 0 0 1px var(--bronze)}
.mseg button{min-height:34px}
.ov-brand{font:600 10px var(--mono);letter-spacing:.2em;text-transform:uppercase;color:var(--gold);margin-bottom:2px}

/* ---- board: dense multi-column dashboard ---- */
#board{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:var(--ov-gap);grid-auto-flow:dense;align-items:stretch}
.hi.wg{grid-column:span 12;display:flex;flex-direction:column;min-width:0}
.hi.wg .wp{flex:1}
.hi.wg[data-size=S]{grid-column:span 6}.hi.wg[data-size=M]{grid-column:span 12}.hi.wg[data-size=L]{grid-column:span 12}.hi.wg[data-size=XL]{grid-column:1/-1}
.hi.wneeds{grid-column:1/-1}
/* tablet / phone landscape: two per row */
@media(min-width:640px){
  .hi.wg[data-size=S]{grid-column:span 4}.hi.wg[data-size=M]{grid-column:span 6}.hi.wg[data-size=L]{grid-column:span 12}
  [data-kind=stats]{grid-column:1/-1!important}
}
/* desktop: three per row, stats full width */
@media(min-width:1000px){
  .hi.wg[data-size=S]{grid-column:span 3}.hi.wg[data-size=M]{grid-column:span 4}.hi.wg[data-size=L]{grid-column:span 8}
}
@media(min-width:1500px){
  .hi.wg[data-size=S]{grid-column:span 3}.hi.wg[data-size=M]{grid-column:span 4}.hi.wg[data-size=L]{grid-column:span 6}
}
/* overview density: pack more per row (not on phones, where labels would truncate) */
@media(min-width:640px){body[data-density=overview] .hi.wg[data-size=M]{grid-column:span 6}}
@media(min-width:1000px){body[data-density=overview] .hi.wg[data-size=M]{grid-column:span 3}body[data-density=overview] .hi.wg[data-size=S]{grid-column:span 2}body[data-density=overview] .hi.wg[data-size=L]{grid-column:span 6}}
@media(min-width:1500px){body[data-density=overview] .hi.wg[data-size=M]{grid-column:span 3}body[data-density=overview] .hi.wg[data-size=L]{grid-column:span 6}}
body[data-density=compact] .wh{min-height:44px}
body[data-density=overview] .wh{min-height:38px;padding-top:8px;padding-bottom:8px}
body[data-density=overview] .wi{width:26px;height:26px}
body[data-density=overview] .wt b{font-size:12.5px}
body[data-density=overview] .wp{font-size:calc(1em*var(--ov-fs))}
body[data-density=compact] .wp{font-size:calc(1em*var(--ov-fs))}
body[data-density=overview] #hClock{font-size:34px!important}
body[data-density=overview] .homewrap{padding-top:12px!important}

/* ---- label/value stat grid ---- */
.ov-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.ov-stats>div{background:#0f141a;padding:12px 14px;display:flex;flex-direction:column;gap:4px;min-width:0}
.ov-stats small{font:500 10px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted);line-height:1.3}
.ov-stats b.nil{color:var(--dim);font-weight:500}
.ov-stats b{font:700 clamp(17px,2.2vw,24px) var(--display);color:var(--bright);letter-spacing:-.01em;white-space:nowrap}
.ov-stats b:is(:where(*)){font-variant-numeric:tabular-nums}
[data-kind=credits] .ov-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
body[data-density=overview] .ov-stats>div{padding:8px 10px}
body[data-density=overview] .ov-stats b{font-size:16px}

/* ---- lists ---- */
.ov-list{display:flex;flex-direction:column}
.ov-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 2px;border-top:1px solid #1b222b}
.ov-row:first-child{border-top:0}
.ov-row>div{min-width:0;display:flex;flex-direction:column;gap:2px}
.ov-row b{font:600 13px var(--ui);color:var(--ink);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.ov-row small{font:500 10px var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--dim)}
.bdg{flex:none;font:600 9.5px var(--mono);letter-spacing:.08em;text-transform:uppercase;padding:4px 8px;border-radius:999px;border:1px solid var(--line);color:var(--muted)}
.bdg:is([class]){white-space:nowrap}
.ov-row .bdg{align-self:center}

/* ---- tables ---- */
.ov-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px}
.ov-table{width:100%;border-collapse:collapse;font-size:12.5px}
.ov-table th{font:600 9.5px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--muted);text-align:left;padding:9px 12px;background:#0f141a;border-bottom:1px solid var(--line)}
.ov-table td{padding:10px 12px;border-top:1px solid #1b222b;color:var(--ink);white-space:nowrap}
.ov-table td:nth-child(2){font-variant-numeric:tabular-nums;text-align:right}.ov-table th:nth-child(2){text-align:right}
.berr{color:var(--dim);font:500 12px var(--ui);padding:10px 2px}

/* ---- Hermes dock ---- */
#ovDock{position:fixed;z-index:40;left:0;right:0;bottom:0;display:flex;justify-content:center;padding:0 12px calc(10px + env(safe-area-inset-bottom));pointer-events:none}
#ovDock form{pointer-events:auto;display:flex;align-items:center;gap:6px;width:min(760px,100%);background:#0f141af2;border:1px solid var(--bronze);border-radius:18px;padding:6px 6px 6px 14px;box-shadow:0 10px 36px #000c;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
#ovDock .mk{width:18px;height:18px;color:var(--gold);flex:none}
#ovDock input{flex:1;min-width:0;background:transparent;border:0;outline:0;color:var(--bright);font:500 14.5px var(--ui);padding:10px 4px}
#ovDock input::placeholder{color:#9a9fa8;opacity:1}
#ovDock button{appearance:none;flex:none;width:42px;height:42px;border-radius:13px;border:1px solid var(--line);background:#12171d;color:var(--muted);display:grid;place-items:center;cursor:pointer}
#ovDock button:hover{color:var(--bright);border-color:var(--bronze)}
#ovDock button .i{width:19px;height:19px}
#ovDock button.send{background:var(--gold);color:#16120a;border-color:var(--gold)}
#ovDock button.send:disabled{background:#14181e;color:#6b7078;border-color:var(--line);cursor:default}
#ovDock button.mic.on{background:#3a1d1a;color:#ff9a8a;border-color:#a8453a}
#ovDock .st{position:absolute;bottom:calc(66px + env(safe-area-inset-bottom));font:500 11px var(--mono);letter-spacing:.06em;color:var(--gold);background:#0f141af2;border:1px solid var(--bronze);border-radius:999px;padding:5px 12px;pointer-events:none;opacity:0;transition:opacity .2s}
#ovDock .st.on{opacity:1}
body[data-route=view] #ovDock,body[data-route=new] #ovDock{display:none}
/* reserve space so the dock never covers content; phone nav sits below it */
#vHome .homewrap{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
@media(max-width:760px){
  #ovDock{bottom:calc(58px + env(safe-area-inset-bottom));padding-bottom:6px}
  #ovDock .st{bottom:calc(66px)}
  .hdr-controls{justify-content:flex-start;width:100%}
  .density{width:100%}.density button{flex:1;padding:8px 6px}
  .mseg{width:100%}.mseg button{flex:1}
}
@media(prefers-reduced-motion:reduce){#ovDock .st{transition:none}}

/* compact: tighter than comfort so the difference is real */
body[data-density=compact] .wh{padding:9px 12px}
body[data-density=compact] .wp{padding-bottom:10px}
body[data-density=compact] .ov-stats>div{padding:9px 12px}
body[data-density=compact] .ov-row{padding:7px 2px}
body[data-density=compact] .ov-table td{padding:7px 10px}
body[data-density=compact] .hi.wg{border-radius:14px}
body[data-density=compact] .homewrap{padding-top:18px!important}
body[data-density=compact] #hClock{font-size:42px!important}
body[data-density=comfort] .ov-stats>div{padding:14px 16px}
body[data-density=comfort] .ov-row{padding:12px 2px}

/* Needs you: a normal card, one column of items (it used to span and overlap its neighbour) */
.hi.wg.wneeds{grid-column:span 12}
@media(min-width:640px){.hi.wg.wneeds{grid-column:span 6}}
@media(min-width:1000px){.hi.wg.wneeds{grid-column:span 4}}
.hi.wneeds #needs{display:flex!important;flex-direction:column;gap:10px;padding:12px 14px 14px}
.hi.wneeds .nhead{display:flex;justify-content:space-between;align-items:center;font:600 10.5px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--gold)}
/* dock: centered on the content area (right of the desktop rail), above the phone nav */
@media(min-width:761px){#ovDock{left:var(--rail,64px)}}
#ovDock{bottom:0}
@media(max-width:760px){#ovDock{bottom:calc(var(--nav-h,64px) + 8px)}#ovDock .st{bottom:calc(var(--nav-h,64px) + 66px)}}
@media(max-width:760px){#vHome .homewrap{padding-bottom:calc(var(--nav-h,64px) + 96px)!important}}
.hdr-controls .mseg .pill{display:none}
.mseg button.on,.mseg button[aria-pressed=true]{background:#1a1610;color:var(--gold);box-shadow:inset 0 0 0 1px var(--bronze)}
@media(min-width:1000px){.hdr .hdr-controls{grid-area:mode;justify-self:end}}
.mseg .pill{display:none}
/* phone: 44px targets, toast above the dock, header controls full width */
@media(max-width:760px){
  .density button,.mseg button{min-height:44px;font-size:11.5px}
  #ovDock input{font-size:16px}
  #ovDock .st{max-width:calc(100vw - 32px)}
}
#ovDock input{min-height:42px}
#ovDock .st{white-space:nowrap;font-size:11.5px}

/* ===== simplified + compact (v4) ===== */
.ov-brand{display:none}
.hdr-controls{gap:6px;flex-wrap:nowrap}
.density,.mseg{padding:2px;border-radius:10px;gap:1px}
.density button{width:30px;height:28px;min-height:28px;padding:0;display:grid;place-items:center;border-radius:8px}
.density button .i{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6}
.mseg button{min-height:28px;height:28px;padding:0 9px;font:600 10px var(--mono);letter-spacing:.06em;border-radius:8px}
.eicon{width:32px!important;height:32px!important}
.srow{margin:0!important}
.hstrip{font-size:10px}
.hstrip span:not(:first-child){display:none}
.askbar{height:40px}
.askbar input{font-size:14px}
.askbar button{width:30px;height:30px}
/* quieter cards: smaller headers, less chrome */
.hi.wg .wh{min-height:40px;padding:9px 12px;gap:9px}
.hi.wg .wi{width:26px;height:26px;border-radius:8px}
.hi.wg .wt b{font-size:13px}
.hi.wg .wsum{font-size:11px}
.ov-stats>div{padding:9px 12px}
.ov-stats b{font-size:clamp(16px,1.8vw,21px)}
/* dock: slim */
#ovDock form{padding:4px 4px 4px 12px;border-radius:14px;width:min(560px,100%)}
#ovDock input{padding:7px 4px;font-size:14px;min-height:34px}
#ovDock button{width:34px;height:34px;border-radius:10px}
#ovDock button .i{width:16px;height:16px}
#ovDock .mk{width:15px;height:15px}
@media(max-width:760px){
  .density button{width:auto;flex:1;height:32px;min-height:32px}
  .mseg button{flex:1;height:32px;min-height:32px}
  .hdr-controls{width:100%}
  .density{flex:0 0 auto}.mseg{flex:1}
  #ovDock input{font-size:16px}
}
/* overview: clearly denser than compact on every screen */
body[data-density=overview] .hi.wg .wh{min-height:32px;padding:6px 10px}
body[data-density=overview] .hi.wg .wi{width:22px;height:22px}
body[data-density=overview] .hi.wg .wt b{font-size:12px}
body[data-density=overview] .ov-stats>div{padding:6px 9px}
body[data-density=overview] .ov-stats b{font-size:15px}
body[data-density=overview] .ov-row{padding:5px 2px}
body[data-density=overview] .ov-row b{font-size:12px;-webkit-line-clamp:1}
body[data-density=overview] .ov-table td{padding:5px 9px}
body[data-density=overview] #board{gap:6px}
body[data-density=overview] .wp{padding-bottom:8px}

/* ===== v5: one input (the Hermes bar), smaller header ===== */
#askbar{display:none!important}
#vHome .today{gap:10px 14px}
#hClock{font-size:30px!important;line-height:1}
.hdr .clock #hClock{font-size:clamp(28px,2.6vw,38px)!important}
#hDate{font-size:9.5px;opacity:.85}
@media(min-width:1000px){
  #vHome .today{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"clock mode" "status edit" "bar bar" "board board"}
}
@media(max-width:760px){
  .hdr{display:flex;flex-direction:column;align-items:stretch;gap:8px}
  .hdr-controls{display:flex;flex-wrap:nowrap;gap:6px;width:100%}
  .density{flex:0 0 auto}.mseg{flex:1;min-width:0}
  .mseg button{padding:0 4px}
  .srow{display:flex;align-items:center;justify-content:space-between}
}

/* ===== v6: no clipping on phone, dock clearance, tidy grid ===== */
@media(max-width:760px){
  .hdr-controls{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px;width:100%;max-width:100%}
  .density{min-width:0}.density button{width:34px;flex:none}
  .mseg{min-width:0;display:grid;grid-template-columns:repeat(3,1fr)}
  .mseg button{padding:0 2px;font-size:9.5px;letter-spacing:.03em;min-width:0}
  #ovDock{bottom:calc(var(--nav-h,64px) + 14px)}
  #ovDock .st{bottom:calc(var(--nav-h,64px) + 64px)}
  #vHome .homewrap{padding-bottom:calc(var(--nav-h,64px) + 110px)!important}
}
.hi.wg .wh{align-items:center}
.hi.wg[data-kind=hermes] .ov-row b,.hi.wg[data-kind=recent] .ov-row b{word-break:break-word}
#board{align-items:stretch}
.hi.wneeds{align-self:stretch}
.hi.wneeds #needs{height:100%}

/* ===== v7: READABILITY. Same dark + gold theme, higher contrast, larger small text ===== */
:root{--dim:#8d939c;--muted:#aab0b9;--ink:#ece8de;--line:#2b333d}
/* nothing below 11px; body text 13.5px+ */
.ov-stats small,.ov-row small,.bdg,.eyebrow,#hDate,.hstrip,.hstrip span,.nhead,.ncard .tg,.ncard .ns,.wsum,.berr{font-size:11px!important;letter-spacing:.05em}
.ov-stats small{color:var(--muted)!important}
.ov-row small{color:var(--muted)}
.bdg{color:#c9ced6;border-color:#46505c;padding:3px 8px}
.ov-row b{font-size:14px;line-height:1.35;color:#f3efe4}
.ov-stats b{color:#fbf7ec}
.ov-table th{font-size:11px;color:var(--muted)}
.ov-table td{font-size:13.5px}
.hi.wg .wt b{font-size:14px;color:#fbf7ec}
.hi.wg .wsum{color:var(--muted)}
.berr,.ov-stats b.nil{color:var(--muted)}
.ncard b{font-size:14px}
#hDate{color:var(--muted)}
.hstrip{color:#c4c9d1}
.density button,.mseg button{color:#b4bac3;font-size:11px}
.density button[aria-pressed=true],.mseg button.on,.mseg button[aria-pressed=true]{color:#f1d9a6;background:#241c10;box-shadow:inset 0 0 0 1px #8a6c3c}
#ovDock input{color:#fbf7ec}
#ovDock input::placeholder{color:#b4bac3}
#ovDock .st{color:#f1d9a6;font-size:12px}
/* urgency stays obvious without relying on tiny red text */
.ncard.red{border-color:#c0584a}
/* overview keeps text >= 12px */
body[data-density=overview] .ov-row b{font-size:13px}
body[data-density=overview] .hi.wg .wt b{font-size:13px}
body[data-density=overview] .ov-stats b{font-size:16px}
body[data-density=overview] .ov-table td{font-size:12.5px}
/* faint topo lines stay behind cards; cards a touch more opaque for legibility */
.hi.wg{background:#12171df2}
@media(max-width:760px){.ov-row b{font-size:14.5px}.ov-stats b{font-size:19px}}

/* ===== v8: labels 12px+, brighter secondary text, toast clear of content, send icon visible ===== */
.ov-stats small,.ov-row small,.bdg,#hDate,.hstrip,.hstrip span,.nhead,.ncard .tg,.ncard .ns,.wsum,.berr{font-size:12px!important;letter-spacing:.04em}
:root{--muted:#bcc2ca;--dim:#9aa0a9}
.ov-stats small,.ov-row small,.wsum,#hDate,.ncard .ns{color:#bcc2ca!important}
.bdg{font-size:11.5px!important;color:#dfe3e8;border-color:#5a6573}
.density button,.mseg button{font-size:12px}
.density button .i{width:17px;height:17px}
.density button{width:34px;height:30px}
.eicon{width:36px!important;height:36px!important}
#ovDock button.send:disabled{color:#98a0aa;border-color:#46505c;background:#1a2028}
#ovDock .st{bottom:calc(100% + 8px);top:auto;position:absolute;left:50%;transform:translateX(-50%);box-shadow:0 6px 20px #000a}
#ovDock{flex-direction:column;align-items:center}
#ovDock form{position:relative}
.hi.wg .wh{padding:10px 14px}
[data-kind=money] small,[data-kind=todo] small{color:#bcc2ca}
@media(max-width:760px){#ovDock .st{bottom:calc(100% + 6px)}}
@media(max-width:760px){
  .density button{width:42px;height:38px}
  .mseg button{height:38px;min-height:38px}
  .eicon{width:40px!important;height:40px!important}
  #ovDock button{width:40px;height:40px}
}

.ov-crbars{display:flex;align-items:flex-end;gap:5px;height:44px;margin-top:10px}
.ov-crbars i{flex:1;border-radius:3px 3px 1px 1px;background:#6b5535;min-height:3px}
.ov-crby{margin-top:8px;font-size:12px;color:#b3b0a8}

/* ONE assistant: Scout (bar arcs / gold dot) replaces the docked Hermes bar; its send/voice/runs live on in Scout's Task mode */
#ovDock{display:none!important}
