/* Ziraah — clean fintech. Tokens first; dark mode swaps them. */
:root {
  --bg: #F5F6F8; --surface: #FFFFFF; --ink: #0B1220; --ink-2: #4A5468; --ink-3: #5E6678;
  --line: #E6E8EC; --line-2: #EEF0F3; --field: #D5D9E0; --seg: #EBEDF0;
  --brand: #0B7A5C; --brand-hover: #075E46; --brand-ink: #FFFFFF; --brand-soft: #E6F4EE;
  --neg: #C4320A; --warn: #9A5B00; --warn-soft: #FFF4DC; --neg-soft: #FDECE6;
  --dark: #0B1220; --on-dark: #FFFFFF; --on-dark-2: #A8B0C0; --dark-line: rgba(255,255,255,.12);
  --mint: #5EE0B1; --mint-2: #A7F0D3; --amber: #FFC46B; --track: #1E2738;
  --shadow: 0 1px 2px rgba(16,24,40,.06);
  --r: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0E15; --surface: #121826; --ink: #E8ECF2; --ink-2: #B4BCCB; --ink-3: #98A2B3;
    --line: #222B3B; --line-2: #1A2130; --field: #344054; --seg: #1A2130;
    --brand: #3CCB98; --brand-hover: #5EE0B1; --brand-ink: #062118; --brand-soft: #0F2B22;
    --neg: #FF8A65; --warn: #F5B94F; --warn-soft: #2A2112; --neg-soft: #2E1710;
    --dark: #18213A; --track: #26304A; --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--brand); }
a:hover { color: var(--brand-hover); }
h1, h2 { margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 700; }
small { font-size: 12px; color: var(--ink-3); }
b { font-weight: 600; }
.pos { color: var(--brand); }
.neg { color: var(--neg); }
.warn { color: var(--warn); }
.muted { color: var(--ink-3); font-size: 13px; margin: 0; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- shell: bottom tabs on phone, sidebar on desktop ---- */
.side {
  position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.side .brand, .side .logout { display: none; }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px;
  color: var(--ink-3); font-family: inherit; font-weight: 500; font-size: 11px; line-height: 1.2; text-decoration: none; background: none; border: 0; cursor: pointer; width: 100%;
}
.tab.on { color: var(--brand); font-weight: 600; }
.tab:hover { color: var(--ink); }
main { width: 100%; min-width: 0; max-width: 1120px; margin: 0 auto; padding: 8px 16px 104px; display: flex; flex-direction: column; gap: 16px; }
main.solo { min-height: 100vh; justify-content: center; align-items: center; padding: 24px 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand.big { font-size: 22px; }
.logo { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 15px; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
  .side {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px;
    padding: 24px 16px; border-top: 0; border-right: 1px solid var(--line);
  }
  .side .brand { display: flex; margin: 0 8px 20px; }
  .side .logout { display: block; margin-top: auto; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
  .tab.on { background: var(--brand-soft); }
  main { padding: 28px 32px 48px; gap: 20px; }
}

/* ---- page header ---- */
.top { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.top .ttl { flex-grow: 1; min-width: 0; }
.top h1 { font-size: 22px; font-weight: 700; }
.top p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.top p .i { width: 14px; height: 14px; }
.iconbtn {
  width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; flex-shrink: 0;
  color: var(--ink); background: none; border: 0; cursor: pointer; margin-left: -10px;
}
.iconbtn:hover { background: var(--seg); color: var(--ink); }
.iconbtn.sm { width: 36px; height: 36px; margin: 0; color: var(--ink-3); }
.iconbtn.sm .i { width: 16px; height: 16px; }
@media (min-width: 900px) { .top h1 { font-size: 26px; } }

/* ---- surfaces ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.dark { background: var(--dark); color: var(--on-dark); border-radius: 20px; }
.dark small { color: var(--on-dark-2); }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.split-2 { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .split-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; } }
.sh { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.sh a:not(.btn) { font-size: 13px; font-weight: 600; text-decoration: none; }
.empty { margin: 0; padding: 18px; text-align: center; color: var(--ink-3); font-size: 14px; border: 1px dashed var(--field); border-radius: var(--r); }
.banner { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--ink); font-weight: 500; }
.alert { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--neg-soft); color: var(--neg); font-weight: 600; }

/* dashboard */
.dash { display: grid; gap: 16px; }
@media (min-width: 900px) { .dash { grid-template-columns: 1.3fr 1fr; } .dash .hero { grid-row: span 2; } }
.hero { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.big { font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.hero-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 14px; border-top: 1px solid var(--dark-line); }
.hero-row > div, .equity > div, .stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero-row b { font-size: 17px; }
.amber { color: var(--amber); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.pill .i { width: 14px; height: 14px; stroke-width: 2.4; }
.pill.ok { color: var(--mint); background: rgba(94,224,177,.12); }
.pill.bad { color: var(--amber); background: rgba(255,196,107,.14); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-content: start; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 500; }
.qa-i { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.qa-i.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.qa:hover .qa-i { border-color: var(--brand); }
.qa:hover { color: var(--ink); }
.equity { padding: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.equity b, .stat b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }

/* batch cards */
.bcard { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.bcard:hover { color: var(--ink); border-color: var(--field); }
.bc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bc-l, .bc-r { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bc-r { align-items: flex-end; text-align: right; flex-shrink: 0; }
.bc-name { display: flex; align-items: center; gap: 8px; font-weight: 600; flex-wrap: wrap; }
.chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--seg); color: var(--ink-2); white-space: nowrap; }
.chip.ready { background: var(--brand-soft); color: var(--brand); }
.top .chip { font-size: 12px; padding: 4px 10px; }
.prog { display: flex; align-items: center; gap: 10px; }
.prog small { white-space: nowrap; }
progress { flex-grow: 1; height: 6px; border: 0; border-radius: 999px; background: var(--line-2); overflow: hidden; -webkit-appearance: none; appearance: none; }
progress::-webkit-progress-bar { background: var(--line-2); }
progress::-webkit-progress-value { background: var(--ink); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--ink); border-radius: 999px; }
progress.done { background: var(--brand-soft); }
progress.done::-webkit-progress-bar { background: var(--brand-soft); }
progress.done::-webkit-progress-value { background: var(--brand); }
progress.done::-moz-progress-bar { background: var(--brand); }

/* batch page */
.hero-light { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.hero-light .prog { margin-top: 8px; }
.stmt { padding: 4px 16px; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.line > :last-child { white-space: nowrap; }
.line.muted { color: var(--ink-2); }
.line.total { border-bottom: 0; font-size: 15px; font-weight: 700; padding-top: 12px; }
.line.total b { font-weight: 700; }
.list { padding: 4px 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; flex-wrap: wrap; }
.row + .row { border-top: 1px solid var(--line-2); }
.row-main { flex: 1 1 140px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-main b { font-size: 14px; }
.row-end { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.row-end > b { font-size: 14px; white-space: nowrap; }
.row-below { flex-basis: 100%; padding-left: 50px; }
.ri { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--seg); color: var(--ink-2); flex-shrink: 0; }
.ri.pos { background: var(--brand-soft); color: var(--brand); }
.ri.warn { background: var(--warn-soft); color: var(--warn); }
.ri.neg { background: var(--neg-soft); color: var(--neg); }
.pay { display: flex; gap: 6px; align-items: center; }
.pay select { height: 36px; font-size: 13px; padding: 0 8px; max-width: 170px; }
.actionbar {
  position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 10; display: flex; gap: 8px;
  padding: 10px; margin: 4px -6px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 8px 24px rgba(16,24,40,.12);
}
.actionbar .btn { min-width: 0; padding: 0 14px; }
.stack:has(.sheet[open]) .actionbar { display: none; }
@media (max-width: 420px) { .actionbar .i { display: none; } .actionbar .btn { font-size: 14px; padding: 0 12px; } }
@media (min-width: 900px) { .actionbar { bottom: 16px; } }

/* sheets (collapsible forms) */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); scroll-margin-top: 16px; }
.sheet > summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  min-height: 52px; padding: 0 16px; font-weight: 600;
}
.sheet > summary::-webkit-details-marker { display: none; }
.sheet > summary::after { content: "+"; font-size: 20px; color: var(--ink-3); }
.sheet[open] > summary::after { content: "–"; }
.sheet > form, .sheet > .form { padding: 0 16px 16px; }
.sheet > form + form { padding-top: 0; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.card.form { padding: 18px; }
.form h2 { margin-bottom: 2px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; }
input, select {
  width: 100%; height: 48px; padding: 0 12px; border: 1px solid var(--field); border-radius: 12px;
  background: var(--surface); color: var(--ink); font-family: inherit; font-weight: 500; font-size: 16px; line-height: 1.2;
}
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.field { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 14px; border: 1px solid var(--field); border-radius: 14px; background: var(--surface); }
.field:focus-within { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.field input { border: 0; height: 100%; padding: 0; font-size: 22px; font-weight: 700; outline: 0; background: transparent; }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.field.big > span { font-size: 20px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--seg); border-radius: 12px; padding: 3px; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label > span, .seg a {
  display: grid; place-items: center; height: 40px; border-radius: 9px; font-family: inherit; font-weight: 600; font-size: 14px; color: var(--ink-2);
  text-decoration: none; cursor: pointer; padding: 0 12px;
}
.seg input:checked + span, .seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.1); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }
.sum { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; border-radius: 18px; }
.sum b { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field); background: var(--surface); color: var(--ink); font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.chips button:hover { border-color: var(--brand); }
.login { width: 100%; max-width: 380px; gap: 16px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .seg { flex: 1 1 280px; max-width: 380px; }
.seg label > span, .seg a { white-space: nowrap; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { color: var(--ink); border-color: var(--field); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); color: var(--brand-ink); }
.btn.danger { color: var(--neg); }
.btn.dashed { border-style: dashed; border-color: var(--field); justify-content: space-between; }
.btn.block { width: 100%; }
.btn.grow { flex-grow: 1; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.sm .i { width: 16px; height: 16px; }

/* settle split bar */
.splitbar { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.splitbar .bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--track); flex-wrap: nowrap; }
.splitbar .bar span { display: block; height: 100%; width: 0; transition: width .2s; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.legend > div { display: flex; flex-direction: column; gap: 2px; }
.legend small { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.s0 { background: var(--amber); }
.s1 { background: var(--mint); }
.s2 { background: var(--mint-2); }
.s3 { background: #7DD3FC; }

/* tables (reports) */
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.n { text-align: right; }

@media print {
  .side, .actionbar, .sheet, .iconbtn, form { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
}

/* ---- charts (palettes validated with the dataviz validator; light + dark) ---- */
:root {
  --v-pos: #0B7A5C; --v-neg: #C4320A;
  --v-1: #2a78d6; --v-2: #eb6834; --v-3: #1baf7a; --v-4: #eda100; --v-5: #e87ba4; --v-6: #008300;
  --v-grid: #EEF0F3; --v-axis: #C9CED6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --v-pos: #199e70; --v-neg: #d95926;
    --v-1: #3987e5; --v-2: #d95926; --v-3: #199e70; --v-4: #c98500; --v-5: #d55181; --v-6: #008300;
    --v-grid: #1F2736; --v-axis: #344054;
  }
}
.charts { display: grid; gap: 12px; }
@media (min-width: 900px) { .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chart { margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chart figcaption { display: flex; flex-direction: column; gap: 2px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: inherit; font-variant-numeric: tabular-nums; }
.v-t { font-size: 10px; fill: var(--ink-3); }
.v-l { font-size: 11.5px; fill: var(--ink-2); }
.v-v { font-size: 10.5px; font-weight: 600; fill: var(--ink); }
.v-grid { stroke: var(--v-grid); stroke-width: 1; }
.v-axis { stroke: var(--v-axis); stroke-width: 1; }
.v-pos { fill: var(--v-pos); } .v-neg { fill: var(--v-neg); }
.v-1 { fill: var(--v-1); } .v-2 { fill: var(--v-2); } .v-3 { fill: var(--v-3); }
.v-4 { fill: var(--v-4); } .v-5 { fill: var(--v-5); } .v-6 { fill: var(--v-6); }
.v-line { fill: none; stroke: var(--v-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.v-area { fill: var(--v-1); opacity: .1; stroke: none; }
.v-dot { fill: var(--v-1); stroke: var(--surface); stroke-width: 2; opacity: 0; }
.v-dot.on, .slot:hover .v-dot, .slot:focus .v-dot { opacity: 1; }
.xhair { stroke: var(--v-axis); stroke-width: 1; opacity: 0; }
.slot:hover .xhair, .slot:focus .xhair { opacity: 1; }
.hit { fill: transparent; }
.slot { outline: none; cursor: default; }
.slot:hover path, .slot:focus path, .slot:hover rect:not(.hit), .slot:focus rect:not(.hit) { opacity: .78; }
.slot:focus-visible .hit { stroke: var(--brand); stroke-width: 1.5; }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.sw.v-pos { background: var(--v-pos); } .sw.v-neg { background: var(--v-neg); }
.sw.v-1 { background: var(--v-1); } .sw.v-2 { background: var(--v-2); } .sw.v-3 { background: var(--v-3); }
.sw.v-4 { background: var(--v-4); } .sw.v-5 { background: var(--v-5); } .sw.v-6 { background: var(--v-6); }
.parts { display: grid; gap: 6px; }
.parts > div { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; font-size: 13px; }
.parts small { min-width: 40px; text-align: right; }
.tv summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.tv .tbl { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; }
.tv td, .tv th { padding: 8px 12px; font-size: 13px; }
.tip {
  position: fixed; z-index: 50; pointer-events: none; display: flex; flex-direction: column; gap: 1px;
  padding: 8px 10px; border-radius: 10px; background: var(--dark); color: var(--on-dark);
  font-size: 12px; box-shadow: 0 6px 20px rgba(16,24,40,.2); max-width: 240px;
}
.tip b { font-size: 14px; }
.tip span { color: var(--on-dark-2); }
.big, .stat b, .equity b, .hero-row b, .sum b { font-variant-numeric: proportional-nums; }
.tip[hidden] { display: none; }
.amt { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; }
.amt b { font-size: 14px; white-space: nowrap; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-row .chip { font-size: 12px; padding: 4px 10px; }
.toolbar h2 { margin-right: auto; }
.chip.win { background: var(--brand); color: var(--brand-ink); }
.banner.ok { display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 600; }
.recov { margin-top: 6px; }
.hero-light .left { color: var(--ink-2); }
.hero-light .left b { color: var(--ink); }
.contact { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.contact-card p { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.contact-card p .i { width: 18px; height: 18px; color: var(--ink-3); }
.fu-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.fu-act details[open] { flex-basis: 100%; }
.fu-act summary { list-style: none; }
.fu-act summary::-webkit-details-marker { display: none; }
.fu-form { margin-top: 10px; }
form.inline { display: inline-flex; gap: 6px; margin: 0; flex-wrap: wrap; }
.side .extra { display: none; }
@media (min-width: 900px) { .side .extra { display: flex; } }
:root { --v-7: #6250d6; --v-8: #e34948; }
@media (prefers-color-scheme: dark) { :root { --v-7: #9085e9; --v-8: #e66767; } }
.v-7 { fill: var(--v-7); } .v-8 { fill: var(--v-8); }
.sw.v-7 { background: var(--v-7); } .sw.v-8 { background: var(--v-8); }
fieldset.terms { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
fieldset.terms legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.hatch-res input { height: 36px; width: auto; min-width: 0; flex: 1 1 110px; font-size: 14px; }
.diff { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--ink-2); }
.foot { margin: 8px 0 0; font-size: 13px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.foot a { display: inline-flex; gap: 4px; align-items: center; }
.foot .i, .sh a .i { width: 16px; height: 16px; }
.sh a { display: inline-flex; gap: 4px; align-items: center; }
/* tabs: a sticky, scrollable segmented bar under the page title */
.tabbar { position: sticky; top: 0; z-index: 15; margin: -6px -16px 0; padding: 6px 16px 4px; background: var(--bg); }
.seg.tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.seg.tabs::-webkit-scrollbar { display: none; }
.seg.tabs a { flex: 1 0 auto; }
@media (min-width: 900px) { .tabbar { margin: -8px -32px 0; padding: 8px 32px 4px; } .seg.tabs { max-width: 640px; } }
.seg.tabs a { font-size: 13.5px; padding: 0 11px; height: 38px; }
@media (max-width: 420px) { .seg.tabs a { padding: 0 7px; font-size: 13px; } }
.cnt { display: inline-block; flex-shrink: 0; }
.seg.tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.cnt { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--line); color: var(--ink-2); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.seg.tabs a.on .cnt { background: var(--brand); color: var(--brand-ink); }
.partner { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.partner .sh { margin: 0; }
.partner .two .stat { padding: 10px 12px; }
.choice { flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; }
.choice input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand); }
.choice span { display: flex; flex-direction: column; gap: 2px; }
.choice b { color: var(--ink); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* Buttons and boxes that app.js reveals (display rules above would otherwise beat [hidden]) */
[hidden] { display: none !important; }
