/* Loss Guard. Calm instrument panel: cool fog surfaces, one loud number (room before the lock),
   data colours validated for colour-blind readers (profit/loss/trail/give-back). */
:root {
  --bg: #EEF1F3; --paper: #F8FAFB; --raised: #FFFFFF; --ink: #121C25; --ink-2: #45525E; --muted: #5B6773;
  --hair: #D9DFE4; --hair-2: #E6EAED;
  --profit: #0E8A6E; --loss: #C2412D; --trail: #4B4FB0; --gb: #B07A0A;
  --profit-ink: #0B6E58; --loss-ink: #A8361F;          /* text-safe steps (>= 4.5:1 on paper) */
  --lock: #23265C; --lock-ink: #ECEDFA; --lock-muted: #AEB2E2;
  --warn-bg: #FBF3E0; --bad-bg: #FBEAE6; --good-bg: #E3F3EE;
  --display: "Archivo", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: 18px; --r-lg: 18px; --r-md: 12px; --r-sm: 8px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); }
body { min-height: 100dvh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
body.locked { background: var(--lock); color: var(--lock-ink); }
main { max-width: 560px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) var(--pad) 28px; }
h1, h2 { font-family: var(--display); margin: 0; text-wrap: balance; }
h2 { font-size: 1.02rem; font-weight: 650; font-stretch: 92%; letter-spacing: -0.005em; margin: 0 0 12px; }
p { margin: 0 0 12px; text-wrap: pretty; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; font-stretch: 88%; }
.pos { color: var(--profit-ink); } .neg { color: var(--loss-ink); }
body.locked .pos, body.locked .neg, body.locked .muted { color: inherit; }

/* ---- top bar: page title + guard status + sound -------------------------------------- */
.top { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; }
.top .title { white-space: nowrap; font-size: 1.7rem; font-weight: 750; font-stretch: 85%; letter-spacing: -0.02em; margin-right: auto; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 600; color: var(--ink-2);
  padding: 6px 10px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.live i { background: var(--profit); box-shadow: 0 0 0 0 rgba(14,138,110,.5); animation: pulse 2.4s infinite; }
.status.bad { color: var(--loss-ink); background: var(--bad-bg); box-shadow: none; } .status.bad i { background: var(--loss); }
.status.warn i { background: var(--gb); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(14,138,110,.45); } 70% { box-shadow: 0 0 0 7px rgba(14,138,110,0); } 100% { box-shadow: 0 0 0 0 rgba(14,138,110,0); } }
.sndbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: 600 .82rem var(--body); padding: 6px 2px; cursor: pointer; }
.sndbtn svg { width: 20px; height: 20px; }
@media (max-width: 520px) { .sndbtn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .sndbtn { padding: 8px; } } .sndbtn[aria-pressed=false] .w { opacity: .25; }
.sndbtn[aria-pressed=true] { color: var(--ink); }
body.locked .status { background: rgba(255,255,255,.08); color: var(--lock-ink); box-shadow: none; }
body.locked .sndbtn { color: var(--lock-muted); }

/* ---- surfaces --------------------------------------------------------------------------- */
.panel { background: var(--paper); border-radius: var(--r-lg); padding: 18px 16px; margin: 0 0 14px; box-shadow: inset 0 0 0 1px var(--hair-2); }
.panel.dark { background: rgba(255,255,255,.05); box-shadow: none; padding: 12px 10px 4px; }
.banner { background: var(--warn-bg); border-left: 4px solid var(--gb); padding: 11px 13px; margin: 0 0 14px; border-radius: var(--r-sm); color: var(--ink); }
.banner.bad { background: var(--bad-bg); border-color: var(--loss); }
.banner.cool { background: #E6E7F6; border-color: var(--trail); }
.banner b { font-variant-numeric: tabular-nums; }
.note { font-size: .88rem; color: #8A5E06; font-weight: 600; margin: 10px 0 0; }

/* ---- Today: the one loud number ------------------------------------------------------------- */
.hero { padding: 6px 2px 16px; }
.hero .eyebrowless { color: var(--ink-2); font-weight: 600; margin: 0 0 2px; }
.hero .big { font-weight: 800; font-stretch: 72%; font-size: clamp(3.6rem, 19vw, 5.6rem); line-height: .92; letter-spacing: -0.035em; }
.hero.warn .big { color: #8A5E06; } .hero.danger .big { color: var(--loss-ink); }
.hero .sub { color: var(--ink-2); margin: 10px 0 0; }
.meter { height: 10px; border-radius: 6px; background: #DCE7E4; overflow: hidden; margin-top: 14px; }
.meter i { display: block; height: 100%; border-radius: 6px; background: var(--profit); transition: width .7s var(--ease), background-color .7s; }
.meter.warn { background: #F0E6CF; } .meter.warn i { background: var(--gb); }
.meter.danger { background: #F2DCD7; } .meter.danger i { background: var(--loss); }

.chartpanel { padding: 12px 10px 8px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .8rem; color: var(--muted); margin: 4px 6px 4px; }
.legend .k { display: inline-block; margin-right: -8px; vertical-align: middle; }
.legend .k.in { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--ink); }
.legend .k.out { width: 9px; height: 9px; border-radius: 50%; }
.legend .k.out.w { background: var(--profit); } .legend .k.out.l { background: var(--loss); }
.legend .k.flag { width: 9px; height: 9px; border-radius: 50%; background: var(--lock); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.tile { background: var(--paper); border-radius: var(--r-md); padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--hair-2); }
.tile span { display: block; font-size: .82rem; color: var(--muted); }
.tile b { display: block; font-size: 1.6rem; font-weight: 750; line-height: 1.15; }
.tile b small { font-size: .55em; font-weight: 600; color: var(--muted); }
.pips { display: flex; gap: 4px; margin-top: 6px; }
.pips i { flex: 1; height: 5px; border-radius: 3px; background: var(--hair); }
.pips i.on { background: var(--ink); }

.rules { margin: 0; display: grid; gap: 0; }
.rules > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--hair-2); }
.rules > div:last-child { border-bottom: 0; }
.rules dt { color: var(--ink-2); flex: none; max-width: 55%; } .rules dd { margin: 0; text-align: right; font-weight: 600; }
.rules.dark > div { border-color: rgba(236,237,250,.14); } .rules.dark dt { color: var(--lock-muted); }

/* Step away */
.slider label { display: block; font-weight: 600; margin: 4px 0 6px; }
.slider label b { font-size: 1.15rem; }
input[type=range] { width: 100%; height: 36px; accent-color: var(--lock); margin: 0; }
.ticks { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: -4px; }
.pausebtn, .lockbtn { display: block; width: 100%; padding: 14px; border-radius: var(--r-md); font: 650 1rem/1 var(--body); cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s; }
.pausebtn { margin: 12px 0 6px; border: 0; background: #E3E4F5; color: var(--lock); }
.pausebtn:hover:not(:disabled) { background: #D6D8F0; }
.lockbtn { margin: 8px 0 0; border: 2px solid var(--lock); background: transparent; color: var(--lock); }
.lockbtn:hover:not(:disabled) { background: var(--lock); color: var(--lock-ink); }
.pausebtn:active:not(:disabled), .lockbtn:active:not(:disabled), .primary:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.lockbtn:disabled, .pausebtn:disabled { opacity: .45; cursor: not-allowed; }
#lockpanel { margin-top: 10px; padding: 14px; border-radius: var(--r-md); background: var(--raised); box-shadow: inset 0 0 0 2px var(--lock); }

/* Feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hair-2); font-size: .93rem; }
.feed li:last-child { border-bottom: 0; }
.feed time { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed li.k-lock span, .feed li.k-warning span { font-weight: 600; }
.feed li.k-warning time { color: var(--loss-ink); }
body.locked .feed li { border-color: rgba(236,237,250,.14); } body.locked .feed time { color: var(--lock-muted); }

/* ---- Locked ------------------------------------------------------------------------------- */
.lockcard .padlock { width: 48px; height: 48px; margin: 4px 0 14px; color: var(--lock-ink); }
.lockcard .lockh { font-size: clamp(2.6rem, 12vw, 3.8rem); font-weight: 800; font-stretch: 75%; line-height: .95; letter-spacing: -0.03em; margin-bottom: 12px; }
.lockcard .lead { font-size: 1.08rem; max-width: 34ch; }
.lockcard h2 { margin-top: 22px; }
.lockgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 14px; }
.lockgrid span { display: block; font-size: .82rem; color: var(--lock-muted); }
.lockgrid b { font-size: 1.9rem; font-weight: 750; }

/* ---- Check-in ----------------------------------------------------------------------------- */
.checkin .ask { font-size: clamp(1.6rem, 7vw, 2.1rem); font-weight: 750; font-stretch: 82%; line-height: 1.08; letter-spacing: -0.02em; margin: 6px 0 12px; }
.recap { color: var(--ink-2); background: var(--paper); border-radius: var(--r-md); padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--hair-2); }
.recap .link { padding: 0; margin-left: 4px; }
.money { display: flex; align-items: baseline; gap: 6px; border-bottom: 3px solid var(--ink); padding: 8px 0 4px; margin-top: 18px; }
.money span { font-family: var(--display); font-size: 2.4rem; font-weight: 700; color: var(--muted); }
.money input { border: 0; background: transparent; font-family: var(--display); font-stretch: 75%; font-size: 3.6rem; font-weight: 800;
  width: 100%; color: var(--ink); padding: 0; letter-spacing: -0.02em; }
.money input:focus-visible { outline: none; } .money:focus-within { border-color: var(--profit); }
.quick { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.quick button { font: 600 .9rem var(--display); font-stretch: 90%; padding: 7px 12px; border-radius: var(--r-sm); border: 0;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); cursor: pointer; }
.quick button:hover { box-shadow: inset 0 0 0 1px var(--ink); }

/* ---- Forms -------------------------------------------------------------------------------- */
label { display: block; font-weight: 600; margin: 16px 0 6px; }
label .hint, .field .hint { display: block; font-weight: 400; color: var(--muted); font-size: .86rem; margin-top: 1px; }
input[type=number], input[type=text], select { font: inherit; width: 100%; padding: 12px 14px; border: 0; border-radius: var(--r-sm);
  background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair); transition: box-shadow .2s; }
input[type=number]:hover, input[type=text]:hover, select:hover { box-shadow: inset 0 0 0 1px #B9C3CC; }
input:focus-visible, select:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--trail); outline-offset: 2px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qlabel { font-weight: 600; margin: 16px 0 6px; }
.chips button { font: inherit; font-size: .95rem; padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); transition: background-color .2s; }
.chips button[aria-pressed=true] { background: var(--ink); color: var(--paper); box-shadow: none; }
.primary { display: block; width: 100%; margin: 26px 0 10px; padding: 16px; border: 0; border-radius: var(--r-md); cursor: pointer; text-align: center; text-decoration: none;
  background: var(--ink); color: var(--paper); font: 650 1.05rem/1 var(--body); transition: transform .15s var(--ease), opacity .2s; }
.primary:hover:not(:disabled) { opacity: .9; }
.primary.danger { background: var(--lock); }
.primary:disabled { background: #A3ADB7; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--ink-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; cursor: pointer; }
.err { color: var(--loss-ink); font-weight: 600; min-height: 1.4em; margin: 6px 0 0; }
.ok { color: var(--profit-ink); font-weight: 600; }
.fieldnote { display: block; min-height: 1.2em; font-size: .86rem; margin-top: 4px; color: var(--muted); }
.fieldnote.good { color: var(--profit-ink); font-weight: 600; } .fieldnote.bad { color: var(--loss-ink); font-weight: 600; }

/* Rules */
.modeline { padding: 12px 14px; border-radius: var(--r-md); background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--ink-2); }
.modeline.armed { background: var(--good-bg); box-shadow: none; } .modeline.locked { background: #E6E7F6; box-shadow: none; }
.modeline b { color: var(--ink); }
fieldset.panel { border: 0; margin: 0 0 14px; min-width: 0; }
fieldset legend { font-family: var(--display); font-weight: 700; font-stretch: 88%; font-size: 1.15rem; padding: 0 0 10px; float: left; width: 100%;
  margin-bottom: 2px; border-bottom: 1px solid var(--hair-2); color: var(--ink); }
fieldset legend + * { clear: both; }
.field label { margin-top: 14px; }
.savebar { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); padding: 4px 0 0; background: linear-gradient(transparent, var(--bg) 30%); }
.savebar .primary { margin-top: 10px; }

/* ---- Journal ------------------------------------------------------------------------------- */
.days { display: flex; gap: 6px; overflow-x: auto; padding: 2px var(--pad) 8px; margin: 0 calc(-1 * var(--pad)) 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.days button { flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; gap: 3px; scroll-snap-align: center;
  font: inherit; border: 0; border-radius: var(--r-md); padding: 8px 4px 7px; background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hair-2); cursor: pointer; position: relative; }
.days button[aria-pressed=true] { background: var(--ink); color: var(--paper); box-shadow: none; }
.days .dn { font-size: .74rem; line-height: 1.2; text-align: center; color: inherit; opacity: .8; }
.days .mini { display: block; width: 14px; border-radius: 3px; margin-top: auto; }
.days .mini.w { background: var(--profit); } .days .mini.l { background: var(--loss); }
.days .dv { font-size: .76rem; font-weight: 650; }
.days .lk { position: absolute; top: 3px; right: 6px; color: var(--trail); font-size: 1.1rem; line-height: 1; }
.days button[aria-pressed=true] .lk { color: #B9BCF0; }
.dayhead { display: grid; gap: 10px; margin: 8px 0 16px; }
.dayhead .muted { margin: 0; }
.dayhead .big { font-weight: 800; font-stretch: 72%; font-size: clamp(2.8rem, 14vw, 4rem); line-height: .95; letter-spacing: -0.03em; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; }
.facts dt { font-size: .76rem; color: var(--muted); } .facts dd { margin: 0; font-weight: 600; font-size: .95rem; }
.trades { list-style: none; margin: 0; padding: 0; }
.trades li { padding: 10px 0 10px 12px; border-bottom: 1px solid var(--hair-2); position: relative; }
.trades li:last-child { border-bottom: 0; }
.trades li::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--hair); }
.trades li.w::before { background: var(--profit); } .trades li.l::before { background: var(--loss); }
.trades .t1 { display: flex; justify-content: space-between; gap: 10px; }
.trades .t1 b { font-weight: 600; overflow-wrap: anywhere; } .trades .t1 .num { font-weight: 700; font-size: 1.05rem; }
.trades .t2 { font-size: .86rem; color: var(--muted); }
details summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
details summary::-webkit-details-marker { display: none; }
details summary h2 { margin: 0; }
details summary::after { content: "Show"; margin-left: auto; font-size: .85rem; color: var(--ink-2); text-decoration: underline; }
details[open] summary::after { content: "Hide"; }
details[open] summary { margin-bottom: 10px; }

/* Findings */
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.flags li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px; border-radius: var(--r-md); }
.flags li.bad { background: var(--bad-bg); } .flags li.good { background: var(--good-bg); }
.flags svg { width: 20px; height: 20px; margin-top: 2px; }
.flags li.bad svg { color: var(--loss); } .flags li.good svg { color: var(--profit); }
.flags b { display: block; font-family: var(--display); font-stretch: 92%; font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.flags p { margin: 3px 0 0; font-size: .92rem; color: var(--ink-2); }

/* ---- Stats --------------------------------------------------------------------------------- */
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-md); background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair-2); margin: 0 0 14px; }
.seg button { font: 600 .9rem var(--body); padding: 7px 14px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.kpi { background: var(--paper); border-radius: var(--r-md); padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--hair-2); }
.kpi > span { display: block; font-size: .82rem; color: var(--muted); }
.kpi > b { display: block; font-size: 1.55rem; font-weight: 750; line-height: 1.15; margin: 2px 0; }
.kpi > b small { font-size: .55em; color: var(--muted); font-weight: 600; }
.kpi > b.two { font-size: 1.25rem; } .kpi > b.two span { display: block; }
.kpi > small { display: block; font-size: .8rem; color: var(--muted); }
.kpis .kpi:first-child { grid-column: 1 / -1; } .kpis .kpi:first-child > b { font-size: 2.6rem; font-stretch: 75%; letter-spacing: -0.02em; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vs > div { padding: 10px 12px; border-radius: var(--r-md); background: var(--raised); box-shadow: inset 0 0 0 1px var(--hair-2); }
.vs span { display: block; font-size: .82rem; color: var(--muted); } .vs b { display: block; font-size: 1.4rem; font-weight: 750; }
.vs small { font-size: .8rem; color: var(--muted); }

/* ---- Charts ---------------------------------------------------------------------------------- */
figure.chart { margin: 0; position: relative; }
figure.chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart .cg { stroke: var(--hair-2); stroke-width: 1; }
.chart .c0 { stroke: #B5BFC8; stroke-width: 1; }
.chart .ct { fill: var(--muted); font: 500 11px var(--body); font-variant-numeric: tabular-nums; }
.chart .cl { fill: var(--ink-2); font: 600 11px var(--body); }
.chart .cbg { fill: var(--paper); opacity: .92; }
.chart .cline { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cwash.w { fill: var(--profit); opacity: .12; } .chart .cwash.l { fill: var(--loss); opacity: .12; }
.chart .cend { stroke: var(--paper); stroke-width: 2.5; } .chart .cend.w { fill: var(--profit); } .chart .cend.l { fill: var(--loss); }
.chart .cnow { stroke: var(--hair); stroke-width: 1; }
.chart .cmk-in { fill: var(--ink); stroke: var(--paper); stroke-width: 1.5; }
.chart .cmk-out { stroke: var(--paper); stroke-width: 2; } .chart .cmk-out.w { fill: var(--profit); } .chart .cmk-out.l { fill: var(--loss); }
.chart .cempty { fill: var(--muted); font: 500 13px var(--body); }
.chart .hx, .chart .hd { visibility: hidden; } .chart.hov .hx, .chart.hov .hd { visibility: visible; }
.chart .hx { stroke: var(--ink-2); stroke-width: 1; } .chart .hd { fill: var(--ink); stroke: var(--paper); stroke-width: 2; }
.chart .tbar.w { fill: var(--profit); } .chart .tbar.l { fill: var(--loss); } .chart .tbar.o { fill: var(--ink-2); }
.chart .tl { fill: var(--ink-2); font: 500 11.5px var(--body); }
.chart .bw { fill: var(--profit); } .chart .bls { fill: var(--loss); } .chart .bsoft { fill: #E5A99D; }
.chart .bl { fill: var(--ink); font: 500 12.5px var(--body); } .chart .bn { fill: var(--muted); font: 500 11px var(--body); }
.chart .bv { fill: var(--ink-2); font: 600 12px var(--display); font-variant-numeric: tabular-nums; }
.chart .brow:hover .bl, .chart .col:hover .ct { fill: var(--ink); font-weight: 700; }
.chart .col:hover path, .chart .brow:hover path { filter: brightness(.9); }
.chart .cflag, .chart .clock { fill: var(--lock); stroke: var(--paper); stroke-width: 2; }
.chart .hs { stroke: var(--paper); stroke-width: 2; } .chart .hs.w { fill: var(--profit); } .chart .hs.l { fill: var(--loss); }
.chart .hmed { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.chart .gtrack { fill: var(--hair-2); } .chart .gneed { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.chart .tip { position: absolute; top: -6px; width: 120px; padding: 6px 9px; border-radius: var(--r-sm); background: var(--ink); color: var(--paper);
  font-size: .8rem; line-height: 1.3; pointer-events: none; box-shadow: 0 6px 16px rgba(18,28,37,.18); }
.chart .tip b { display: block; font-family: var(--display); font-size: 1rem; font-variant-numeric: tabular-nums; }
.chart.dark .cg { stroke: rgba(236,237,250,.10); } .chart.dark .c0 { stroke: rgba(236,237,250,.35); }
.chart.dark .ct { fill: var(--lock-muted); } .chart.dark .cl { fill: var(--lock-ink); } .chart.dark .cbg { fill: var(--lock); }
.chart.dark .cline { stroke: var(--lock-ink); } .chart.dark .cend, .chart.dark .cmk-out { stroke: var(--lock); }
.chart.dark .cmk-in { fill: var(--lock-ink); stroke: var(--lock); } .chart.dark .tip { background: var(--lock-ink); color: var(--lock); }

/* ---- Bottom tabs ------------------------------------------------------------------------------ */
nav#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; gap: 4px;
  background: rgba(248,250,251,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -1px 0 var(--hair); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
nav#tabs button { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font: 600 .76rem var(--body); padding: 6px 0 4px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; }
nav#tabs button svg { width: 22px; height: 22px; }
nav#tabs button[aria-current=page] { color: var(--ink); background: var(--hair-2); }
body.locked nav#tabs { background: rgba(30,33,80,.94); box-shadow: 0 -1px 0 #3A3E80; }
body.locked nav#tabs button { color: #9DA1D6; }
body.locked nav#tabs button[aria-current=page] { color: var(--lock-ink); background: rgba(255,255,255,.08); }

/* ---- Login ------------------------------------------------------------------------------------- */
.login { padding-top: 14vh; max-width: 30rem; }
.login .mark { width: 44px; height: 44px; color: var(--ink); margin-bottom: 18px; }
.login h1 { font-size: clamp(2.8rem, 13vw, 3.6rem); font-weight: 800; font-stretch: 75%; line-height: .95; letter-spacing: -0.03em; margin-bottom: 14px; }
.login p { font-size: 1.05rem; color: var(--ink-2); max-width: 34ch; }

/* ---- Wider screens: laptop ------------------------------------------------------------------------ */
@media (min-width: 900px) {
  main { max-width: 1120px; padding-left: 32px; padding-right: 32px; }
  .today { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 0 22px; align-items: start; }
  .today > .side { position: sticky; top: 12px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .jgrid, .sgrid, .rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
  .jgrid > :first-child, .jgrid > .wide, .sgrid > .wide { grid-column: 1 / -1; }
  .kpis { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; } .kpis .kpi:first-child { grid-column: auto; }
  .dayhead { grid-template-columns: auto 1fr; align-items: end; gap: 28px; }
  .rgrid .savebar { grid-column: 1 / -1; position: static; background: none; max-width: 360px; }
  .checkin { max-width: 560px; } .lockcard { max-width: 760px; }
  nav#tabs button { flex-direction: row; justify-content: center; font-size: .88rem; padding: 10px 0; }
}
@media (max-width: 380px) { .facts { grid-template-columns: repeat(3, auto); } .tile b { font-size: 1.35rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

details.more { margin-top: 10px; } details.more summary { font-weight: 600; color: var(--ink-2); padding: 4px 0; }
