/* ==========================================================================
   Design system. Everything is driven by the tokens below; dark mode only
   swaps tokens. Chart colours follow a validated colour-blind-safe order.
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #f5f5f2; --surface: #ffffff; --surface-2: #f4f4f0; --surface-3: #eaeae4;
  --line: rgba(11, 11, 11, .09); --line-strong: rgba(11, 11, 11, .17);
  --text: #0e0e0d; --text-2: #55544f; --muted: #8a8882;
  --accent: #2a78d6; --accent-hover: #256abf; --accent-ink: #fff; --accent-soft: rgba(42, 120, 214, .11);
  --good: #0ca30c; --good-text: #006300; --good-soft: rgba(12, 163, 12, .12);
  --warn: #fab219; --warn-text: #7a5200; --warn-soft: rgba(250, 178, 25, .18);
  --crit: #d03b3b; --crit-text: #b12a2a; --crit-soft: rgba(208, 59, 59, .11);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --grid: #e9e8e2; --axis: #c3c2b7; --track: #ecece7;
  --r: 16px; --r-sm: 10px; --r-xs: 7px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .05), 0 12px 32px -16px rgba(0, 0, 0, .18);
  --shadow-3: 0 24px 64px -24px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .08);
  --ease: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --side: 248px; --nav-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0d0d; --surface: #1a1a19; --surface-2: #222221; --surface-3: #2c2c2a;
    --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .18);
    --text: #f0efec; --text-2: #c3c2b7; --muted: #898781;
    --accent: #3987e5; --accent-hover: #5598e7; --accent-soft: rgba(57, 135, 229, .16);
    --good-text: #2fbf2f; --warn-text: #fab219; --crit: #e66767; --crit-text: #ee8080; --crit-soft: rgba(230, 103, 103, .14);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
    --grid: #2c2c2a; --axis: #383835; --track: #2c2c2a;
    --shadow-2: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d; --surface: #1a1a19; --surface-2: #222221; --surface-3: #2c2c2a;
  --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .18);
  --text: #f0efec; --text-2: #c3c2b7; --muted: #898781;
  --accent: #3987e5; --accent-hover: #5598e7; --accent-soft: rgba(57, 135, 229, .16);
  --good-text: #2fbf2f; --warn-text: #fab219; --crit: #e66767; --crit-text: #ee8080; --crit-soft: rgba(230, 103, 103, .14);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
  --grid: #2c2c2a; --axis: #383835; --track: #2c2c2a;
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 26px; letter-spacing: -.02em; font-weight: 680; }
h2 { font-size: 17px; letter-spacing: -.01em; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .dim { color: var(--text-2); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.pos { color: var(--good-text); } .neg { color: var(--crit-text); }
.nowrap { white-space: nowrap; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; } .right { margin-left: auto; } .center { text-align: center; }
.gap-s { gap: 6px; } .gap-l { gap: 18px; } .mt { margin-top: 14px; } .mt-l { margin-top: 26px; } .mb { margin-bottom: 14px; }
.hide { display: none !important; }
svg.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.ic.s { width: 16px; height: 16px; } svg.ic.l { width: 24px; height: 24px; }

/* ---- splash --------------------------------------------------------------- */
.splash { position: fixed; inset: 0; display: grid; place-items: center; }
.splash-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--accent); animation: pulse 1.1s var(--ease) infinite alternate; }
@keyframes pulse { from { transform: scale(.82); opacity: .55; } to { transform: scale(1); opacity: 1; } }

/* ---- shell ---------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 18px 12px 12px; border-right: 1px solid var(--line); background: var(--bg); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; color: #fff; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 520; transition: background .18s, color .18s, transform .18s var(--ease); }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a:active { transform: scale(.98); }
.nav a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.nav a.on svg { color: var(--accent); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.side-quick { margin: -8px 0 8px; }
.side-quick .nav-label { padding-top: 4px; }
.side-quick-button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 12px; border: 0; border-radius: var(--r-sm); color: var(--text-2); background: transparent; text-align: left; }
.side-quick-button:hover { background: var(--surface-3); color: var(--text); }
.side-quick summary { cursor: pointer; padding: 5px 12px; }
.side-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 650; font-size: 13px; flex: none; }
.main { min-width: 0; padding: 26px clamp(16px, 3.4vw, 40px) 60px; }
.page { max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; min-height: 40px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.topbar, .tabbar, .fab { display: none; }

@media (max-width: 900px) {
  .shell { display: block; }
  .side { display: none; }
  .main { padding: 12px 14px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; margin: -12px -14px 12px; padding: 10px 14px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 560; color: var(--muted); background: none; border: 0; transition: color .2s, transform .2s var(--ease); }
  .tabbar a.on { color: var(--accent); }
  .tabbar a:active { transform: scale(.92); }
  .fab { display: grid; place-items: center; position: fixed; z-index: 31; left: 50%; bottom: calc(var(--nav-h) - 26px + env(safe-area-inset-bottom)); width: 54px; height: 54px; margin-left: -27px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; box-shadow: 0 10px 24px -8px var(--accent), 0 2px 6px rgba(0, 0, 0, .2); transition: transform .25s var(--ease-spring); }
  .fab:active { transform: scale(.9) rotate(90deg); }
  h1 { font-size: 22px; }
  .desk-only { display: none !important; }
}
@media (min-width: 901px) { .mob-only { display: none !important; } }

/* ---- cards & grids -------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-1); }
.card.flush { padding: 0; overflow: hidden; }
.card.tap { transition: transform .22s var(--ease), box-shadow .22s; cursor: pointer; }
.card.tap:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card.tap:active { transform: scale(.985); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head .link { margin-left: auto; font-size: 13px; color: var(--accent); font-weight: 560; display: inline-flex; align-items: center; gap: 2px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g2, .g3, .g-main { grid-template-columns: minmax(0, 1fr); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .card { padding: 15px; } }
.favorites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.favorite-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.favorite-main { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; min-height: 150px; padding: 16px; border: 0; background: transparent; text-align: left; }
.favorite-main:hover { background: var(--surface-3); }
.favorite-main:focus-visible, .favorite-actions button:focus-visible { outline-offset: -3px; }
.favorite-kind, .favorite-detail { color: var(--text-2); font-size: 12.5px; }
.favorite-name { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.favorite-value { font-size: 21px; font-weight: 680; overflow-wrap: anywhere; }
.favorite-link { margin-top: auto; padding-top: 6px; color: var(--accent); font-size: 13px; font-weight: 600; }
.favorite-actions { display: flex; border-top: 1px solid var(--line-strong); }
.favorite-actions button { flex: 1; min-height: 44px; padding: 8px; border: 0; background: transparent; color: var(--accent); font-weight: 600; }
.favorite-actions button + button { border-left: 1px solid var(--line-strong); }
.favorite-actions button:hover { background: var(--surface-3); }
.favorite-action-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 24px; line-height: 1; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 560; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 24px; font-weight: 680; letter-spacing: -.02em; margin-top: 4px; }
.stat .delta { font-size: 12.5px; margin-top: 2px; color: var(--muted); }
.hero { font-size: clamp(36px, 6vw, 52px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.stagger > * { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---- buttons -------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 580; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s var(--ease), box-shadow .15s, opacity .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 6px 16px -8px var(--accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--crit-text); } .btn.danger.solid { background: var(--crit); color: #fff; border-color: transparent; }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 31px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.busy { pointer-events: none; color: transparent !important; position: relative; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text-2); border-top-color: transparent; animation: spin .7s linear infinite; }
.btn.primary.busy::after, .btn.danger.solid.busy::after { border-color: #fff; border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); transition: background .15s, color .15s, transform .15s var(--ease); flex: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:active { transform: scale(.9); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 560; }
.linkish:hover { text-decoration: underline; }

/* ---- forms ---------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); transition: border-color .15s, box-shadow .15s; min-width: 0; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 76px; }
.input:hover { border-color: var(--muted); }
.input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.sm { height: 34px; font-size: 13.5px; border-radius: 8px; }
.search-select { position: relative; width: 100%; min-width: 0; }
.search-select .input { padding-right: 32px; text-overflow: ellipsis; }
.search-select .input:disabled { opacity: .6; cursor: default; }
.search-select > .ic { position: absolute; top: 50%; right: 11px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-select-list { position: fixed; z-index: 80; overflow-y: auto; overscroll-behavior: contain; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-3); }
.search-select-group { padding: 7px 9px; color: var(--muted); font-size: 12px; font-weight: 600; }
.search-select-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 6px 9px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.search-select-option.active, .search-select-option:hover { background: var(--accent-soft); }
.search-select-option .ic { color: var(--accent); flex: none; }
@media (pointer: coarse) { .search-select .input { font-size: max(16px, 1em); } }
.amount-input { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 10px 0 6px; }
.amount-input input { width: auto; min-width: 1.4ch; max-width: 100%; border: 0; background: transparent; text-align: center; font-size: 44px; font-weight: 700; letter-spacing: -.03em; outline: 0; padding: 0; font-variant-numeric: tabular-nums; caret-color: var(--accent); }
.amount-input input::placeholder { color: var(--surface-3); }
.amount-input .cur { font-size: 16px; font-weight: 650; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 14px; }
.check input { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; transition: background .15s, border-color .15s; margin: 0; flex: none; }
.check input::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .2s var(--ease-spring); margin-top: -2px; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.switch { position: relative; width: 42px; height: 25px; border-radius: 99px; background: var(--surface-3); border: 0; padding: 0; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .25s var(--ease-spring); }
.switch.on { background: var(--accent); } .switch.on::after { transform: translateX(17px); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 11px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 580; color: var(--text-2); white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg.block { display: flex; } .seg.block button { flex: 1; justify-content: center; }
.modes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 13px; }
.modes button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-size: 12px; font-weight: 600; transition: background .2s, color .2s, box-shadow .2s, transform .15s var(--ease); min-width: 0; }
.modes button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modes button:active { transform: scale(.95); }
.modes button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.modes button.on svg { color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 560; color: var(--text-2); white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--muted); color: var(--text); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.tx-suggestion { display: inline-flex; align-items: center; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); overflow: hidden; }
.tx-suggestion:hover { border-color: var(--muted); }
.tx-suggestion-label, .tx-suggestion-pin { height: 30px; border: 0; background: transparent; color: var(--text-2); font-size: 13px; }
.tx-suggestion-label { min-width: 0; padding: 0 4px 0 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-suggestion-pin { flex: none; padding: 0 10px 0 6px; color: var(--accent); font-size: 16px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; } .chips.scroll::-webkit-scrollbar { display: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 620; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good-text); } .badge.warn { background: var(--warn-soft); color: var(--warn-text); }
.badge.crit { background: var(--crit-soft); color: var(--crit-text); } .badge.accent { background: var(--accent-soft); color: var(--accent); }
.emoji { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 19px; flex: none; }
.emoji.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; } .emoji.lg { width: 48px; height: 48px; border-radius: 15px; font-size: 24px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: 13.5px; }
.notice.warn { background: var(--warn-soft); } .notice.crit { background: var(--crit-soft); } .notice.good { background: var(--good-soft); }
.kbd { font: 11px/1 ui-monospace, monospace; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--muted); }
code.copy { display: block; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; white-space: pre; user-select: all; }

/* ---- lists & tables ------------------------------------------------------- */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; position: relative; transition: background .15s; min-width: 0; }
.item + .item::before, .list > .item:not(:first-child)::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; border-top: 1px solid var(--line); }
.item.tap { cursor: pointer; } .item.tap:hover { background: var(--surface-2); }
.item .title { font-weight: 560; } .item .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; min-width: 0; }
.item .amount { font-weight: 620; text-align: right; white-space: nowrap; }
.item.sel { background: var(--accent-soft); }
.day-head { display: flex; justify-content: space-between; padding: 14px 16px 6px; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; position: sticky; top: 0; background: var(--surface); z-index: 2; }
@media (max-width: 900px) { .day-head { top: 54px; } }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: right; font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
table.t td { text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t th:first-child, table.t td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
table.t tr.total td { font-weight: 680; border-top: 1px solid var(--line-strong); }
table.t tr.group td { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 16px; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.budget-grid th, table.budget-grid td { border-right: 1px solid var(--line); }
table.budget-grid .budget-previous { background: var(--surface-2); }
.budget-amount-input { width: 110px; text-align: right; }
.budget-amount-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 44px 20px; color: var(--muted); }
.empty .art { font-size: 40px; animation: float 3.2s ease-in-out infinite; }
.empty h3 { color: var(--text); font-size: 16px; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ---- meters --------------------------------------------------------------- */
.meter { position: relative; height: 8px; border-radius: 99px; background: var(--track); overflow: visible; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); width: 0; transition: width .9s var(--ease), background .3s; }
.meter.warn > i { background: var(--warn); } .meter.crit > i { background: var(--crit); } .meter.good > i { background: var(--good); }
.meter .pace { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: var(--text); opacity: .55; transition: left .6s var(--ease); }
.meter.thick { height: 12px; }
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; cursor: default; }
.bar-row.tap { cursor: pointer; }
.bar-row .name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 540; min-width: 0; }
.bar-row .val { font-size: 13.5px; font-weight: 620; font-variant-numeric: tabular-nums; }
.bar-row .track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: transparent; }
.bar-row .track i { display: block; height: 100%; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--s1); width: 0; transition: width .9s var(--ease); }
.bar-row:hover .track i { filter: brightness(1.12); }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--c, var(--accent)) calc(var(--p) * 1%), var(--track) 0); display: grid; place-items: center; flex: none; transition: --p .9s var(--ease); }
.ring::before { content: ""; grid-area: 1 / 1; width: calc(100% - 13px); height: calc(100% - 13px); border-radius: 50%; background: var(--surface); }
.ring > span { grid-area: 1 / 1; font-size: 13px; font-weight: 680; z-index: 1; }
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.chart-box { position: relative; width: 100%; }
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; min-height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- overlays ------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(8, 8, 8, .46); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center; padding: 20px; overflow-y: auto; }
.dialog { min-width: 0; width: min(100%, var(--w, 520px)); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-3); border: 1px solid var(--line); display: flex; flex-direction: column; max-height: calc(100dvh - 40px); }
.dialog-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.dialog-body { min-width: 0; padding: 12px 18px 18px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 14px; }
.dialog-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .overlay { align-items: end; padding: 0; }
  .dialog { width: 100%; border-radius: 22px 22px 0 0; max-height: 94dvh; padding-bottom: env(safe-area-inset-bottom); }
  .dialog-head::before { content: ""; position: absolute; left: 50%; top: 7px; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--surface-3); }
  .dialog { position: relative; } .dialog-head { padding-top: 22px; }
  .dialog-foot .btn { flex: 1; height: 46px; }
}
.modal-enter-active, .modal-leave-active { transition: opacity .22s ease; }
.modal-enter-active .dialog, .modal-leave-active .dialog { transition: transform .32s var(--ease), opacity .22s ease; }
.modal-enter-from, .modal-leave-to { opacity: 0; }
.modal-enter-from .dialog, .modal-leave-to .dialog { transform: translateY(18px) scale(.97); opacity: 0; }
@media (max-width: 640px) { .modal-enter-from .dialog, .modal-leave-to .dialog { transform: translateY(100%); opacity: 1; } }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 8px; align-items: center; width: min(92vw, 460px); pointer-events: none; }
@media (max-width: 900px) { .toasts { bottom: calc(var(--nav-h) + 34px + env(safe-area-inset-bottom)); } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 13px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 520; box-shadow: var(--shadow-3); max-width: 100%; }
.toast.error { background: var(--crit); color: #fff; }
.toast button { background: none; border: 0; color: inherit; font-weight: 700; padding: 2px 4px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.toast-enter-active { transition: all .38s var(--ease-spring); } .toast-leave-active { transition: all .22s ease; position: absolute; }
.toast-enter-from { opacity: 0; transform: translateY(18px) scale(.94); } .toast-leave-to { opacity: 0; transform: scale(.94); }
.toast-move { transition: transform .3s var(--ease); }
.menu { position: absolute; z-index: 50; min-width: 200px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-3); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 9px; text-align: left; font-size: 14px; }
.menu button:hover { background: var(--surface-2); } .menu button.danger { color: var(--crit-text); }
.pop-enter-active { transition: opacity .16s, transform .2s var(--ease-spring); } .pop-leave-active { transition: opacity .12s; }
.pop-enter-from { opacity: 0; transform: scale(.94) translateY(-4px); } .pop-leave-to { opacity: 0; }
.palette { width: min(100%, 580px); align-self: start; margin-top: 12vh; }
.palette input { width: 100%; border: 0; background: none; outline: 0; font-size: 17px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.palette .results { max-height: 46vh; overflow-y: auto; padding: 6px; }
.palette .res { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.palette .res.on { background: var(--accent-soft); }

/* ---- motion --------------------------------------------------------------- */
.page-enter-active { transition: opacity .28s ease, transform .34s var(--ease); }
.page-leave-active { transition: opacity .13s ease, transform .13s ease; }
.page-enter-from { opacity: 0; transform: translateY(10px); }
.page-leave-to { opacity: 0; transform: translateY(-4px); }
.rows-move { transition: transform .38s var(--ease); }
.rows-enter-active { transition: opacity .32s ease, transform .38s var(--ease), background 1.2s ease; }
.rows-leave-active { transition: opacity .22s ease, transform .26s ease; position: absolute; left: 0; right: 0; }
.rows-enter-from { opacity: 0; transform: translateY(-10px) scale(.98); background: var(--accent-soft); }
.rows-leave-to { opacity: 0; transform: translateX(28px); }
.fade-enter-active, .fade-leave-active { transition: opacity .2s ease; } .fade-enter-from, .fade-leave-to { opacity: 0; }
.swap-enter-active { transition: opacity .25s ease, transform .3s var(--ease); } .swap-leave-active { transition: opacity .12s ease; }
.swap-enter-from { opacity: 0; transform: translateX(14px); } .swap-leave-to { opacity: 0; transform: translateX(-10px); }
.grow-enter-active, .grow-leave-active { transition: grid-template-rows .3s var(--ease), opacity .25s; display: grid; }
.grow-enter-from, .grow-leave-to { grid-template-rows: 0fr; opacity: 0; } .grow-enter-to, .grow-leave-from { grid-template-rows: 1fr; }
.grow-enter-active > *, .grow-leave-active > * { overflow: hidden; min-height: 0; }
.pop-in { animation: popin .45s var(--ease-spring) both; }
@keyframes popin { from { transform: scale(.6); opacity: 0; } }
.success-check { width: 72px; height: 72px; border-radius: 50%; background: var(--good-soft); display: grid; place-items: center; color: var(--good-text); animation: popin .5s var(--ease-spring) both; }
.success-check svg { width: 34px; height: 34px; stroke-width: 2.6; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .2s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.spin { animation: spin .9s linear infinite; }

/* ---- auth & setup --------------------------------------------------------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1000px 500px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.auth-card { width: min(100%, 420px); } .auth-card.wide { width: min(100%, 640px); }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; position: relative; }
.steps i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.steps i.done::after { transform: scaleX(1); }
.choice { display: flex; gap: 13px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; text-align: left; width: 100%; transition: border-color .18s, background .18s, transform .18s var(--ease); }
.choice:hover { border-color: var(--muted); } .choice:active { transform: scale(.99); }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.req { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.req .mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--good-soft); color: var(--good-text); }
.req .mark.bad { background: var(--crit-soft); color: var(--crit-text); } .req .mark.opt { background: var(--surface-3); color: var(--muted); }
.drop { border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 22px; text-align: center; color: var(--text-2); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
ol.guide { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--text-2); }
ol.guide b { color: var(--text); font-weight: 620; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}
@media print { .side, .tabbar, .fab, .topbar, .toasts { display: none !important; } .shell { display: block; } }

/* ---------------------------------------------------------------- month & year reports (SVG charts) */
.rc-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.rc > *, .rc .grid > * { min-width: 0; }
.rc-chart { width: 100%; }
.rc-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.rc-svg text { font-size: 11.5px; fill: var(--text-2); }
.rc-svg .rc-tick { fill: var(--muted); font-variant-numeric: tabular-nums; }
.rc-svg .rc-val { fill: var(--text); font-weight: 620; }
.rc-svg .rc-lbl { fill: var(--text); font-size: 12.5px; }
.rc-svg .rc-leg { fill: var(--text-2); font-size: 12px; }
.rc-grid { stroke: var(--grid); stroke-width: 1; }
.rc-axis { stroke: var(--axis); stroke-width: 1; }
.mk-inc, .mk-pos, .mk-cat-inc { fill: var(--s1); }
.mk-exp, .mk-neg, .mk-cat-exp { fill: var(--s2); }
.mk-dim { opacity: .3; }
.rc-ref { stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.ln-cur, .ln-nw, .ln-prev { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ln-cur { stroke: var(--s2); } .ln-nw { stroke: var(--s1); }
.ln-prev { stroke: var(--muted); stroke-width: 1.75; stroke-dasharray: 5 4; }
.ar-cur { fill: var(--s2); opacity: .1; } .ar-nw { fill: var(--s1); opacity: .1; }
.dot-cur, .dot-nw, .dot-prev { stroke: var(--surface); stroke-width: 2; }
.dot-cur { fill: var(--s2); } .dot-nw { fill: var(--s1); } .dot-prev { fill: var(--muted); }
.rc-hit { fill: transparent; }
.rc-svg rect.rc-hit:hover, .rc-col:hover .rc-hit { fill: var(--text); fill-opacity: .045; }
.rc-cross, .rc-hdot { opacity: 0; }
.rc-cross { stroke: var(--axis); stroke-width: 1; }
.rc-col:hover .rc-cross, .rc-col:hover .rc-hdot { opacity: 1; }
.rc-svg path[data-tip]:hover { opacity: .8; }
.rc-tip { position: fixed; z-index: 90; pointer-events: none; max-width: 260px; padding: 8px 11px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 12.5px; line-height: 1.45; white-space: pre-line; box-shadow: var(--shadow-3); }
.rc-tip::first-line { font-weight: 650; }
.rc-hero-title { font-size: 24px; letter-spacing: -.02em; margin: 0 0 8px; }
.rc-story { margin: 4px 0 0; max-width: 70ch; color: var(--text-2); }
.rc-story:first-of-type { color: var(--text); font-size: 16px; }
.rc-print-only { display: none; }
.rc-card-table td.ellipsis { max-width: 280px; }
.rc-bw { --bg: #fff; --surface: #fff; --surface-2: #f5f5f5; --surface-3: #ececec; --text: #111; --text-2: #333; --muted: #5f5f5f; --grid: #e3e3e3; --axis: #b3b3b3; --track: #eee; --line: rgba(0, 0, 0, .13); --line-strong: rgba(0, 0, 0, .25); color: var(--text); }
.rc-bw .card { background: #fff; }
.rc-bw .mk-inc, .rc-bw .mk-pos, .rc-bw .mk-cat-inc { fill: #3b3b3b; }
.rc-bw .mk-exp, .rc-bw .mk-neg { fill: url(#rc-hatch); stroke: #1a1a1a; stroke-width: 1; }
.rc-bw .mk-cat-exp { fill: #8c8c8c; }
.rc-bw .ln-cur, .rc-bw .ln-nw { stroke: #111; }
.rc-bw .ln-prev { stroke: #6f6f6f; }
.rc-bw .ar-cur, .rc-bw .ar-nw { fill: #000; opacity: .07; }
.rc-bw .dot-cur, .rc-bw .dot-nw { fill: #111; }
.rc-bw .dot-prev { fill: #6f6f6f; }
.rc-bw .neg { color: #111; }

@media print {
  @page { margin: 12mm; }
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] { --bg: #fff; --surface: #fff; --surface-2: #f5f5f5; --surface-3: #ececec; --text: #111; --text-2: #333; --muted: #5f5f5f; --grid: #e3e3e3; --axis: #b3b3b3; --track: #eee; --line: rgba(0, 0, 0, .13); --line-strong: rgba(0, 0, 0, .25); color-scheme: light; }
  html, body { background: #fff !important; }
  .side, .tabbar, .topbar, .no-print, .toasts, .rc-tip, .page-head { display: none !important; }
  .shell { display: block; } .main { padding: 0; } .page { max-width: none; }
  .card { box-shadow: none; border: 1px solid #c9c9c9; break-inside: avoid; }
  .rc .grid.g2 { grid-template-columns: minmax(0, 1fr); }
  .rc .grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .rc-print-only { display: block; }
  .table-wrap { max-height: none !important; overflow: visible !important; }
  * { animation: none !important; transition: none !important; }
  .rc .mk-inc, .rc .mk-pos, .rc .mk-cat-inc { fill: #3b3b3b; }
  .rc .mk-exp, .rc .mk-neg { fill: url(#rc-hatch); stroke: #1a1a1a; stroke-width: 1; }
  .rc .mk-cat-exp { fill: #8c8c8c; }
  .rc .ln-cur, .rc .ln-nw { stroke: #111; }
  .rc .ln-prev { stroke: #6f6f6f; }
  .rc .ar-cur, .rc .ar-nw { fill: #000; opacity: .07; }
  .rc .dot-cur, .rc .dot-nw { fill: #111; }
  .rc .dot-prev { fill: #6f6f6f; }
  .rc .neg { color: #111; }
}

/* ---- Insights ---------------------------------------------------------------------------- */
.ins-tiles .stat .value .unit { font-size: 14px; font-weight: 560; color: var(--muted); margin-left: 2px; }
.ins-card { border-left: 3px solid var(--line-strong); }
.ins-card.lv-warn { border-left-color: var(--warn); }
.ins-card.lv-info { border-left-color: var(--accent); }
.ins-card.lv-good { border-left-color: var(--good); }
.ins-top { display: flex; align-items: flex-start; gap: 10px; }
.ins-top h3 { font-size: 15.5px; font-weight: 650; line-height: 1.35; margin: 0; min-width: 0; }
.ins-ic { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.lv-warn .ins-ic { background: var(--warn-soft); color: var(--warn-text); }
.lv-info .ins-ic { background: var(--accent-soft); color: var(--accent); }
.lv-good .ins-ic { background: var(--good-soft); color: var(--good-text); }
.ins-text { margin: 8px 0 0 36px; color: var(--text-2); line-height: 1.55; font-size: 14px; }
.ins-foot { margin: 6px 0 0 36px; }
.ins-foot:empty { display: none; }
.ins-link { color: var(--accent); padding-left: 0; }
.alloc { display: flex; gap: 2px; height: 14px; border-radius: 99px; overflow: hidden; background: var(--track); }
.alloc i { display: block; height: 100%; min-width: 3px; }
.alloc i:first-child { border-radius: 99px 0 0 99px; } .alloc i:last-child { border-radius: 0 99px 99px 0; } .alloc i:only-child { border-radius: 99px; }
.alloc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13px; }
.alloc-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.alloc-legend b { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.learn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
@media (max-width: 760px) { .learn { grid-template-columns: minmax(0, 1fr); } .ins-text, .ins-foot { margin-left: 0; } }
.learn-item { display: flex; gap: 10px; align-items: flex-start; }
.learn-ic { font-size: 20px; line-height: 1.2; }
.learn-item h4 { margin: 0 0 3px; font-size: 14px; font-weight: 650; }
.learn-item p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.mkt { display: flex; flex-direction: column; }
.mkt-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.mkt-row:last-of-type { border-bottom: 0; }
.mkt-name { font-size: 13.5px; font-weight: 600; }
.mkt-val { font-size: 15px; font-weight: 680; text-align: right; min-width: 64px; font-variant-numeric: tabular-nums; }
.spark { flex: none; overflow: visible; }
.spark path { fill: none; stroke: var(--s1); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.spark circle { fill: var(--s1); }
.news { display: flex; flex-direction: column; margin-top: 10px; }
.news-item { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.news-item:last-child { border-bottom: 0; }
.news-item:hover .news-title { color: var(--accent); }
.news-title { font-size: 13.5px; font-weight: 560; line-height: 1.4; overflow-wrap: anywhere; }
.news-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 600; }
.ask .chips .chip { height: auto; min-height: 30px; padding: 5px 11px; white-space: normal; text-align: left; line-height: 1.3; }
.ask-preview { max-height: 280px; overflow: auto; font-size: 11.5px; white-space: pre; }
.ask-answer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.md { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.md h3, .md h4, .md h5, .md h6 { font-size: 14.5px; font-weight: 680; margin: 14px 0 4px; }
.md p { margin: 6px 0; } .md ul, .md ol { margin: 6px 0; padding-left: 20px; } .md li { margin: 3px 0; }
@media print { .ins .ask, .ins .mkt-row button { display: none; } }

/* ---- Setup & system: help boxes, backups ---------------------------------------------------- */
details.guide-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface-2); }
details.guide-box summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); }
details.guide-box[open] summary { margin-bottom: 10px; }
.backup-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.backup-row:last-child { border-bottom: 0; }
.grid > .full-row { grid-column: 1 / -1; }
