/* TimePay: brand-card system. One blue (#032c89) turned down over white, black ink, error red + highlight yellow as the only two signals, no green. One radius. White mode always, except the sign-in screen which is deliberately dark. */
@font-face {
  font-family: 'Michroma';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/Michroma-Regular.ttf') format('truetype');
}
:root {
  --ground: #F4F7FD; --card: #FFFFFF; --ink: #000000; --ink-2: rgba(0,0,0,.62); --ink-3: rgba(0,0,0,.55);
  --line: #E1E6F1; --edge: #B3C0DC; --tint60: #6880B8;
  --crimson: #032C89; --crimson-dark: #022167; --gold: #FFDE59;
  --good: #032C89; --good-bg: #E8ECF9; --warn: #000000; --warn-bg: #FFF7D6;
  --bad: #D0342C; --bad-bg: #FBE8E6; --leave: #022167; --leave-bg: #EEF1F8; --mute: rgba(0,0,0,.55); --mute-bg: #EDEFF5;
  --chart: #032C89;
  --dg-ground: #0B0A1F; --dg-surface: #15142E; --dg-fill: #B3C0DC; --dg-error: #FF6B61;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Hind Siliguri", "Helvetica Neue", Arial, sans-serif;
  --wordmark-font: 'Michroma', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; font-size: 16px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 1rem/1.5 var(--font); }
body.dark { --ground: var(--dg-ground); --card: var(--dg-surface); --ink: #fff; --ink-2: rgba(255,255,255,.75); --ink-3: rgba(255,255,255,.6);
  --line: rgba(255,255,255,.16); --edge: rgba(255,255,255,.3); --good: var(--dg-fill); --bad: var(--dg-error); }
body.dark a { color: var(--dg-fill); }
body.dark a.brand { color: #fff; }
body.dark input, body.dark select, body.dark textarea { background: rgba(255,255,255,.06); }
body.dark input:disabled, body.dark select:disabled { background: rgba(255,255,255,.03); }
a { color: var(--crimson); }
a:hover { color: var(--crimson-dark); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 700; margin: 0 0 16px; }
h1 small, h2 small { font-weight: 400; font-size: .6em; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
:lang(bn) { letter-spacing: normal; line-height: 1.65; }
.muted { color: var(--ink-3); }
.bad-text { color: var(--bad); }
code, pre.code { font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; }
pre.code { background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

/* ---------- frame ---------- */
header.top { background: #000; color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 16px; min-height: 56px; position: sticky; top: 0; z-index: 20; }
.brand { color: #fff; font-family: var(--wordmark-font); font-weight: 400; font-size: 16px; letter-spacing: -0.02em; text-decoration: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.brand:hover { color: #fff; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.who small { color: rgba(255,255,255,.6); }
.who form { margin: 0; }
.btn-link { background: none; border: 0; color: #fff; text-decoration: underline; font: inherit; cursor: pointer; padding: 8px 0; min-height: 44px; display: flex; align-items: center; gap: 8px; }
details.menu { display: none; }
details.menu summary { list-style: none; cursor: pointer; padding: 8px 14px; border: 1px solid rgba(255,255,255,.3); border-radius: var(--radius); min-height: 44px; display: flex; align-items: center; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu nav { position: absolute; left: 16px; right: 16px; top: 60px; background: var(--card); border-radius: var(--radius); padding: 8px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); display: grid; gap: 2px; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 24px; max-width: 1600px; margin: 0 auto; }
body.bare .shell { grid-template-columns: minmax(0, 1fr); }
nav.side { display: grid; gap: 2px; align-content: start; position: sticky; top: 80px; }
nav.side a, details.menu nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 500; }
nav.side a:hover, details.menu nav a:hover { background: var(--card); }
nav.side a.on, details.menu nav a.on { background: var(--crimson); color: #fff; }
.nav-ic { width: 1.1em; height: 1.1em; flex: none; }
main { min-width: 0; }
@media (max-width: 600px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 12px; }
  .kpi strong { font-size: 22px; }
  .card { padding: 16px; }
  .counter strong { font-size: 34px; }
  .kiosk-clock { font-size: 44px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
  nav.side { display: none; }
  details.menu { display: block; }
  .who span { display: none; }
  h1 { font-size: 22px; }
}

/* ---------- blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.card.narrow, .narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.head h1 { margin: 0 auto 8px 0; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.kpi { margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { color: var(--ink-2); font-size: 13px; }
.kpi strong { font-size: 26px; line-height: 1.2; font-weight: 700; }
.kpi small { color: var(--ink-3); font-size: 12px; }
.kpi.money { border-top: 4px solid var(--gold); }
.formula { color: var(--ink-3); font-size: 13px; margin-top: 8px; }
.flash { border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; border: 1px solid transparent; }
.flash.ok { background: var(--good-bg); border-color: #C7D3EF; }
.flash.bad { background: var(--bad-bg); border-color: #F3C6C2; }
.flash.warn { background: var(--warn-bg); border-color: #F0E2A0; }
body.dark .flash.ok { background: rgba(179,192,220,.15); border-color: var(--dg-fill); color: #fff; }
body.dark .flash.bad { background: rgba(255,107,97,.15); border-color: var(--dg-error); color: #fff; }
.empty { text-align: center; padding: 40px 20px; }
.legal { max-width: 480px; margin: 24px auto; color: var(--ink-3); font-size: 13px; text-align: center; }
.legal address { font-style: normal; margin: 8px 0; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
form.found { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; margin: 0; }
form.found label { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
@media (max-width: 700px) { form.found { grid-template-columns: 1fr; } }
ul.log { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
ul.log time { color: var(--ink-3); margin-right: 6px; }
ul.explain { padding-left: 20px; }
ul.explain li { margin-bottom: 4px; }
.steps-text li { margin-bottom: 4px; }
.dim { opacity: .55; }

/* ---------- status words ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mute); flex: none; }
.st-good .dot { background: var(--good); } .st-warn .dot { background: var(--gold); } .st-bad .dot { background: var(--bad); }
.st-leave .dot { background: var(--tint60); } .st-mute .dot { background: var(--mute); }

/* ---------- forms ---------- */
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--edge); border-radius: var(--radius); min-height: 44px; padding: 8px 12px; max-width: 100%; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 20px; height: 20px; accent-color: var(--crimson); margin: 0; }
input[type=range] { accent-color: var(--crimson); border: 0; padding: 0; min-height: 44px; }
input[type=file] { padding: 9px 12px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, .col:focus { outline: 3px solid rgba(3, 44, 137, .35); outline-offset: 1px; border-color: var(--crimson); }
input:disabled, select:disabled { background: var(--ground); color: var(--ink-2); }
input.short { width: 110px; }
input.money { width: 110px; text-align: right; min-height: 36px; padding: 4px 8px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .hint, .hint { color: var(--ink-3); font-size: 12px; }
.field > select, .field > input:not([type=checkbox]):not([type=radio]) { width: 100%; min-width: 0; }
.field.indent { margin-left: 30px; max-width: 320px; }
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-right: 52px; }
.eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border: 0; background: none; color: var(--ink-2); cursor: pointer; border-radius: var(--radius); display: grid; place-items: center; }
.eye:hover { background: var(--ground); }
.stack { display: grid; gap: 14px; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0; }
.grid-form { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: end; }
.grid-form h2, .grid-form .span, .span { grid-column: 1 / -1; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 16px; }
.filters label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check.inline-check { display: inline-flex; margin-right: 14px; }
label.choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
label.choice small { display: block; color: var(--ink-3); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px; }
legend { font-weight: 700; padding: 0 6px; }
.rule-form .field { margin-bottom: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn, .btn-quiet, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: var(--radius);
  font: 600 15px/1 var(--font); cursor: pointer; text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.btn { background: linear-gradient(45deg, #1A1054, #255FF1); color: #fff; }
.btn:hover { filter: brightness(1.08); color: #fff; }
.btn-quiet { background: #fff; color: var(--ink); border-color: var(--edge); }
.btn-quiet:hover { background: var(--ground); color: var(--ink); }
.btn-danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); }
body.dark .btn-quiet { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
body.dark .btn-quiet:hover { background: rgba(255,255,255,.08); }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: #FAFAFB; font-size: 13px; color: var(--ink-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tfoot th { background: #FAFAFB; border-top: 2px solid var(--line); border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.group th { background: var(--ground); }
td.indent { padding-left: 28px; }
table caption { text-align: left; font-weight: 700; padding: 0 0 6px; }
.sheet td, .sheet th { padding: 8px 10px; }
table.audit code { font-size: 12px; word-break: break-all; }

/* attendance month grid */
.grid-wrap { max-height: 75vh; }
table.grid { font-size: 12px; }
table.grid th, table.grid td { padding: 0; text-align: center; border-right: 1px solid var(--line); }
table.grid thead th { padding: 6px 4px; }
table.grid td a { display: block; padding: 7px 4px; min-width: 42px; text-decoration: none; color: inherit; font-variant-numeric: tabular-nums; }
table.grid .sticky { position: sticky; left: 0; background: #fff; text-align: left; z-index: 2; min-width: 200px; padding: 6px 10px; }
table.grid thead .sticky { z-index: 3; background: #FAFAFB; }
table.grid td.num { padding: 7px 8px; }
.c.good { color: var(--good); } .c.warn { color: var(--ink); background: var(--warn-bg); font-weight: 600; }
.c.bad { color: var(--bad); background: var(--bad-bg); font-weight: 700; } .c.leave { color: var(--leave); background: var(--leave-bg); }
.c.mute { color: var(--mute); } .c.off { background: var(--mute-bg); color: var(--mute); }
.c.flagged { box-shadow: inset 0 -3px 0 var(--gold); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--ink-2); }
.legend .c { display: inline-block; padding: 4px 8px; border: 1px solid var(--line); font-size: 12px; }

/* ---------- tabs, stepper ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.tabs a { padding: 10px 2px; color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.on { color: var(--crimson); border-bottom-color: var(--crimson); }
.tabs a b { color: var(--ink-3); font-weight: 600; margin-left: 4px; }
.stepper { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.stepper li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; color: var(--ink-3); }
.stepper li b { color: inherit; }
.stepper li small { font-size: 12px; }
.stepper li.done { color: var(--good); border-color: #C7D3EF; }
.stepper li.now { color: var(--crimson); border: 2px solid var(--crimson); }

/* ---------- live ---------- */
.replay { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 16px; }
.replay input[type=range] { flex: 1 1 260px; }
.replay output { font-weight: 700; min-width: 80px; font-variant-numeric: tabular-nums; }
table.live td { vertical-align: middle; }
.counter { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 4px solid var(--gold); }
.counter div { display: grid; }
.counter span { color: var(--ink-2); font-weight: 600; text-transform: uppercase; font-size: 13px; letter-spacing: .04em; }
.counter strong { font-size: 44px; line-height: 1.1; }
.counter p { grid-column: 1 / -1; color: var(--ink-3); margin: 0; }
.today .big { font-size: 20px; }
.whatif { border: 2px solid var(--gold); }
.issue h2 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sumline { display: flex; flex-wrap: wrap; gap: 8px 24px; background: var(--ground); border-radius: var(--radius); padding: 12px 16px; margin-top: 12px; }

/* ---------- chart ---------- */
.chart { margin: 16px 0 0; }
.chart figcaption { font-weight: 600; margin-bottom: 6px; }
.chart-scroll { overflow-x: auto; }
.chart svg { display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--ink-3); font: 11px var(--font); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--chart); }
.chart .hit { fill: transparent; }
.chart .col:hover .bar, .chart .col:focus .bar { fill: #255FF1; }
.chart .col { outline: none; cursor: default; }
.table-view summary { cursor: pointer; color: var(--ink-2); font-size: 13px; margin-top: 6px; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }

/* ---------- kiosk ---------- */
body.bare:has(.kiosk) .shell { max-width: 900px; }
.kiosk { text-align: center; padding: 32px 16px; }
.kiosk-where { color: var(--ink-3); }
.kiosk-clock { font-size: 64px; font-weight: 800; margin: 8px 0 24px; font-variant-numeric: tabular-nums; }
.kiosk label { display: block; font-size: 20px; margin-bottom: 12px; }
.kiosk input { font-size: 32px; text-align: center; width: min(420px, 100%); min-height: 72px; }
.kiosk-result { margin: 28px auto 0; max-width: 640px; min-height: 120px; }
.kiosk-result .card { font-size: 24px; border-left: 8px solid var(--leave); text-align: left; }
.kiosk-result .card.in { border-left-color: var(--good); } .kiosk-result .card.late { border-left-color: var(--gold); }
.kiosk-result .card.err { border-left-color: var(--bad); } .kiosk-result .card.dup { border-left-color: var(--mute); }

/* ---------- payslip ---------- */
.payslip { max-width: 820px; }
.payslip header { border-bottom: 3px solid var(--ink); margin-bottom: 14px; }
.payslip header h1 { margin: 0; }
.payslip .two { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 12px 0; }
.payslip .net { font-size: 22px; background: var(--ground); border-radius: var(--radius); padding: 12px 16px; }
.payslip .draft { color: var(--bad); font-weight: 800; letter-spacing: .1em; }
.payslip table.facts td { border: 1px solid var(--line); }

@media print {
  header.top, nav.side, details.menu, .no-print, .filters, .tabs, .btn, .btn-quiet, .btn-danger, .replay, .flash.warn, .table-view { display: none !important; }
  body { background: #fff; font-size: 11px; }
  .shell { display: block; padding: 0; }
  .card { border: 0; box-shadow: none; padding: 0; }
  .table-wrap { overflow: visible; border: 0; }
  th, td { padding: 4px 6px; }
  thead th { position: static; }
  @page { size: A4 landscape; margin: 10mm; }
}

/* ---------- Dashboard: draggable widget grid. Dark by default (a cookie switches it to light). ---------- */
.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; }
body.dash { --ground: #FFFFFF; --card: #FFFFFF; --ink: #09090B; --ink-2: #52525B; --ink-3: #71717A; --line: #E4E4E7; --edge: #D4D4D8;
  --accent: #3B82F6; --accent-2: #2563EB; --good: var(--accent); --bad: #D0342C; --amber: #D97706; --heat: 59, 130, 246; --fill: 9, 9, 11; color-scheme: light; }
body.dash.dark { --ground: #0A0A0B; --card: #141417; --ink: #FAFAFA; --ink-2: #A1A1AA; --ink-3: #A1A1AA; --line: #27272A; --edge: #3F3F46;
  --accent: #60A5FA; --accent-2: #93C5FD; --bad: #FF6B61; --amber: #FBBF24; --heat: 96, 165, 250; --fill: 250, 250, 250; color-scheme: dark; }
body.dash.dark a { color: var(--accent); }
body.dash.dark .tip { background: var(--card); color: var(--ink); }
body.dash.dark .btn-quiet { background: var(--card); color: var(--ink); border-color: var(--edge); }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dash-hint { color: var(--ink-3); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent, var(--crimson)); cursor: pointer; text-decoration: underline; }

.wgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 215px; grid-auto-flow: dense;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.widget[data-size="wide"] { grid-column: span 2; }
.widget[data-size="tall"] { grid-row: span 2; }
.widget[data-size="lg"] { grid-column: span 2; grid-row: span 2; }
.widget { container-type: size; position: relative; min-width: 0; border-radius: var(--radius); outline: none; cursor: grab; touch-action: pan-y pinch-zoom;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; box-shadow: 0 1px 2px rgba(0,0,0,.12); transition: box-shadow .26s; }
.widget a, .widget img { -webkit-user-drag: none; }
.widget:focus-visible { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--accent); }
.widget.lifted { z-index: 20; cursor: grabbing; box-shadow: 0 28px 60px -16px rgba(0,0,0,.45), 0 10px 24px -8px rgba(0,0,0,.3); }
.widget.raised { z-index: 10; }
.w-in { position: relative; height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; overflow: hidden;
  border-radius: var(--radius); background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s, scale .2s; }
.widget.holding .w-in { scale: .97; }
.widget.landed .w-in { box-shadow: inset 0 0 0 2px rgba(var(--fill), .4); }
.w-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; font-size: 13px; line-height: 1; }
.w-head h3 { margin: 0; font-size: 12px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-meta { color: var(--ink-3); white-space: nowrap; }
.w-body { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 10px; }
.w-big { margin: 0; font-size: 28px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.w-unit { font-size: 13px; letter-spacing: normal; color: var(--ink-3); }
.w-note { margin: 0; font-size: 12px; color: var(--ink-3); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.w-note:first-of-type { margin-top: auto; }
.w-list { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 7px; font-size: 13px; }
.w-2col { grid-template-columns: 1fr 1fr; column-gap: 24px; }
.w-row, .w-bar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.w-label { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.w-label small { color: var(--ink-3); }
.w-val { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-bars { gap: 9px; }
.w-bar .w-label { flex: 0 1 42%; }
.w-track { flex: 1; height: 3px; border-radius: var(--radius); background: rgba(var(--fill), .1); min-width: 24px; }
.w-track i { display: block; height: 100%; border-radius: var(--radius); background: rgba(var(--fill), .28); }
.w-bars:not(.unranked) .w-bar:first-child .w-track i { background: var(--accent); }
.w-bars:not(.unranked) .w-bar:not(:first-child) .w-label { color: var(--ink-2); }
.wdot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: rgba(var(--fill), .45); }
.wdot-ok { background: var(--accent); } .wdot-warn { background: var(--amber); } .wdot-bad { background: var(--bad); }
.w-spark { margin-top: auto; display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.w-spark span { flex: 1; min-width: 0; border-radius: var(--radius); background: rgba(var(--fill), .15); transition: height .7s; }
.w-spark span.on { background: var(--accent); }
.w-heat { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px 12px; align-items: center; }
.w-heat-name { display: none; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16ch; }
.w-heat-row { display: grid; gap: 3px; }
.w-heat-row i { aspect-ratio: 1; border-radius: 50%; background: rgba(var(--fill), .06); }
.w-heat-row i.h1 { background: rgba(var(--heat), .2); } .w-heat-row i.h2 { background: rgba(var(--heat), .35); }
.w-heat-row i.h3 { background: rgba(var(--heat), .55); } .w-heat-row i.h4 { background: rgba(var(--heat), .85); }
@container (min-width: 440px) { .w-heat { grid-template-columns: auto minmax(0, 1fr); } .w-heat-name { display: block; } }
@container (max-width: 200px) { .w-meta { display: none; } }
@container (max-height: 260px) { .w-list:not(.w-2col) > li:nth-child(n+4) { display: none; } }
@container (max-height: 180px) { .w-in { padding: 14px; gap: 10px; } .w-big { font-size: 24px; } .w-note { -webkit-line-clamp: 2; }
  .w-list ~ .w-note, .w-spark ~ .w-note { display: none; } .w-list:not(.w-2col) > li:nth-child(n+3) { display: none; } }
@container (min-height: 261px) { .w-bars { margin-top: 0; overflow-y: auto; } }
@media (prefers-reduced-motion: reduce) { .widget, .w-in, .w-spark span { transition: none; } }
