/* =============================================================================
   app.css — one stylesheet, no build step.

   Colour comes from Indian enamel signage: bottle green, warm cream,
   vermillion, signage gold. Chosen because that stuff is designed to be read
   correctly, at a glance, by anybody. Which is the job here too.
   ============================================================================= */

@font-face { font-family: "Bricolage"; src: url("../vendor/fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../vendor/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../vendor/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PlexMono"; src: url("../vendor/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PlexMono"; src: url("../vendor/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #123a2e;
  --ink-2: #4a6b5d;
  --paper: #fbf7ee;
  --paper-2: #f3ecdd;
  --card: #ffffff;
  --line: #ded3bc;
  --accent: #d9482a;
  --gold: #c2912b;
  --good: #2e7d5b;
  --bad: #b3271e;

  --seg-need: #123a2e;
  --seg-want: #6e9080;
  --seg-save: #c2912b;
  --seg-goal: #d9482a;
  --seg-spare: #e4dcc8;

  --f-display: "Bricolage", "Plex", system-ui, sans-serif;
  --f-body: "Plex", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-num: "PlexMono", ui-monospace, "SF Mono", Consolas, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r: 6px;
  --wrap: 1220px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.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;
}
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: var(--s2) var(--s3); z-index: 90; }
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ header */

/* Header and the allocation bar travel together. The bar is the point of the
   whole app — it should never scroll out of view while you are editing. */
.stick { position: sticky; top: 0; z-index: 40; background: var(--paper); box-shadow: 0 6px 12px -10px rgba(18, 58, 46, .5); }
.top { background: var(--paper); border-bottom: 1px solid var(--line); }

.top__bar {
  max-width: var(--wrap); margin: 0 auto; padding: var(--s3) var(--s4);
  display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: var(--s2); font-family: var(--f-display); font-size: 20px; }
.brand__mark { width: 16px; height: 16px; background: var(--accent); border-radius: 2px; flex: 0 0 auto; }

.top__spacer { flex: 1 1 auto; }

.top__cur { display: flex; align-items: center; gap: var(--s2); font-size: 13px; color: var(--ink-2); }
.top__cur select { font: inherit; padding: 2px var(--s2); border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); }

/* ------------------------------------------------- the bar (the whole point) */

.bar-region { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar-region__inner { max-width: var(--wrap); margin: 0 auto; padding: var(--s2) var(--s4) var(--s3); }

.readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); margin-top: var(--s2); }
.readout__live { font-size: 13px; font-weight: 500; }
.readout__live b { font-family: var(--f-num); }
.readout__live .is-warn { color: var(--bad); }

.bar {
  display: flex; width: 100%; height: 46px; border-radius: var(--r);
  overflow: hidden; background: var(--seg-spare); border: 1px solid var(--line);
}

.bar__seg {
  display: flex; align-items: center; min-width: 0; overflow: hidden;
  padding: 0 var(--s2); color: #fff; font-size: 12px; font-weight: 500;
  white-space: nowrap; text-overflow: ellipsis; position: relative;
  transition: width 260ms cubic-bezier(.2, .7, .3, 1);
  border-right: 1px solid rgba(251, 247, 238, .85);
}
.bar__seg:last-child { border-right: 0; }
.bar__seg--need { background: var(--seg-need); }
.bar__seg--want { background: var(--seg-want); }
.bar__seg--save { background: var(--seg-save); }
.bar__seg--goal { background: var(--seg-goal); }
.bar__seg--spare { background: var(--seg-spare); color: var(--ink-2); }
.bar__label { overflow: hidden; text-overflow: ellipsis; }

.bar--empty {
  align-items: center; justify-content: center; color: var(--ink-2);
  font-size: 13px; background: var(--paper-2);
}

.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s2); font-size: 12px; color: var(--ink-2); }
.legend__i { display: inline-flex; align-items: center; gap: 6px; }
.legend__sw { width: 10px; height: 10px; border-radius: 2px; flex: 0 0 auto; }

/* ------------------------------------------------------------------ layout */

.layout {
  max-width: var(--wrap); margin: 0 auto; padding: var(--s5) var(--s4) var(--s7);
  display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
}

@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.col { min-width: 0; display: flex; flex-direction: column; gap: var(--s5); }
.col--result { align-self: start; }

/* ------------------------------------------------------------------- cards */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.card__head { padding: var(--s4); border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.card__n { font-family: var(--f-num); font-size: 12px; color: #fff; background: var(--ink); border-radius: 4px; padding: 2px 7px; flex: 0 0 auto; }
.card__title { font-family: var(--f-display); font-size: 18px; margin: 0; }
.card__hint { flex: 1 1 100%; margin: 0; font-size: 13px; color: var(--ink-2); }
.card__body { padding: var(--s4); }
.card__foot { padding: var(--s3) var(--s4); border-top: 1px solid var(--line); background: var(--paper-2); display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; font-size: 13px; }

/* ------------------------------------------------------------------ inputs */

.f { display: block; margin-bottom: var(--s4); }
.f:last-child { margin-bottom: 0; }
.f__label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.f__hint { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }

.money-in { position: relative; display: flex; align-items: stretch; }
.money-in__sym {
  display: flex; align-items: center; padding: 0 var(--s3);
  background: var(--paper-2); border: 1px solid var(--line); border-right: 0;
  border-radius: var(--r) 0 0 var(--r); font-family: var(--f-num); color: var(--ink-2); font-size: 18px;
}
.money-in input {
  flex: 1 1 auto; min-width: 0; font-family: var(--f-num); font-size: 22px; font-weight: 500;
  padding: var(--s3); border: 1px solid var(--line); border-radius: 0 var(--r) var(--r) 0;
  background: var(--card); color: var(--ink); text-align: right; -moz-appearance: textfield;
}
.money-in input::-webkit-outer-spin-button, .money-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.money-in input:focus { border-color: var(--accent); }
.money-in--sm input { font-size: 15px; padding: var(--s2); }
.money-in--sm .money-in__sym { font-size: 14px; padding: 0 var(--s2); }

.words { display: block; margin-top: 4px; font-size: 13px; color: var(--accent); min-height: 19px; font-weight: 500; }

.txt, select.sel, input.date {
  width: 100%; font: inherit; font-size: 15px; padding: var(--s2) var(--s3);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink);
}
.txt:focus, select.sel:focus, input.date:focus { border-color: var(--accent); }

.row-grid { display: grid; gap: var(--s2); align-items: end; }

/* repeatable rows */
.rows { display: flex; flex-direction: column; gap: var(--s3); }
.rowc { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3); background: var(--paper); }
.rowc__top { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: var(--s2); align-items: center; }
.rowc__bottom { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s2); align-items: center; font-size: 13px; color: var(--ink-2); }
@media (max-width: 560px) { .rowc__top { grid-template-columns: 1fr; } }

.tag-set { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tag-set label { padding: 4px var(--s3); font-size: 13px; cursor: pointer; background: var(--card); border-right: 1px solid var(--line); }
.tag-set label:last-child { border-right: 0; }
.tag-set input { position: absolute; opacity: 0; width: 0; height: 0; }
.tag-set label:has(input:checked) { background: var(--ink); color: #fff; }
.tag-set label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: -3px; }

.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

/* ----------------------------------------------------------------- buttons */

.btn {
  font: inherit; font-size: 14px; font-weight: 500; padding: var(--s2) var(--s4);
  border: 1px solid var(--ink); border-radius: var(--r); background: var(--card);
  color: var(--ink); cursor: pointer; line-height: 1.4; text-decoration: none; display: inline-block;
}
.btn:hover { background: var(--paper-2); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #0b271f; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: #bf3d22; }
.btn--ghost { border-color: transparent; color: var(--ink-2); padding: var(--s1) var(--s2); }
.btn--ghost:hover { color: var(--accent); background: transparent; text-decoration: underline; }
.btn--sm { padding: var(--s1) var(--s2); font-size: 13px; }
.btn--danger { border-color: var(--bad); color: var(--bad); }
.btn--danger:hover { background: var(--bad); color: #fff; }
.btn.is-armed { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.icon-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: var(--r); width: 34px; height: 34px; cursor: pointer; font-size: 18px; line-height: 1;
}
.icon-btn:hover { border-color: var(--bad); color: var(--bad); }

/* ----------------------------------------------------------------- results */

.headline { padding: var(--s5) var(--s4); text-align: center; border-bottom: 1px solid var(--line); }
.headline__n { font-family: var(--f-display); font-size: 44px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 0; }
.headline__l { margin: var(--s2) 0 0; font-size: 13px; color: var(--ink-2); }

.split-list { list-style: none; margin: 0; padding: 0; }
.split-list li { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.split-list li:last-child { border-bottom: 0; }
.split-row { display: flex; align-items: baseline; gap: var(--s3); }
.split-row__sw { width: 10px; height: 10px; border-radius: 2px; flex: 0 0 auto; align-self: center; }
.split-row__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.split-row__amt { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-weight: 500; }
.split-row__pct { font-family: var(--f-num); font-size: 12px; color: var(--ink-2); width: 48px; text-align: right; }
.split-track { height: 4px; background: var(--paper-2); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.split-track__fill { height: 100%; transition: width 260ms cubic-bezier(.2,.7,.3,1); }

.per100 { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s4); border-bottom: 1px solid var(--line); }
.per100__i { font-size: 13px; padding: 3px var(--s2); border-radius: 4px; background: var(--paper-2); }
.per100__i b { font-family: var(--f-num); }

/* notes and warnings */
.note { padding: var(--s3) var(--s4); border-left: 4px solid var(--line); background: var(--paper-2); font-size: 13px; }
.note + .note { margin-top: var(--s2); }
.note--critical { border-left-color: var(--bad); }
.note--warn { border-left-color: var(--gold); }
.note--info { border-left-color: var(--ink-2); }
.note--good { border-left-color: var(--good); }
.note__t { font-weight: 500; margin: 0 0 2px; font-size: 14px; }
.note p { margin: 0; }

.empty-state { padding: var(--s6) var(--s4); text-align: center; color: var(--ink-2); font-size: 14px; }

/* goal cards in the result panel */
.goalr { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.goalr:last-child { border-bottom: 0; }
.goalr__top { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; }
.goalr__name { font-weight: 500; font-size: 14px; }
.goalr__meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.goalr__track { height: 6px; background: var(--paper-2); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.goalr__fill { height: 100%; background: var(--seg-goal); transition: width 260ms; }
.pill { font-size: 11px; font-family: var(--f-num); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pill--good { border-color: var(--good); color: var(--good); }
.pill--bad { border-color: var(--bad); color: var(--bad); }
.pill--warn { border-color: var(--gold); color: var(--gold); }

/* asset donut */
.asset { display: flex; gap: var(--s4); align-items: center; padding: var(--s4); flex-wrap: wrap; }
.asset__chart { flex: 0 0 auto; }
.asset__keys { flex: 1 1 180px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.asset__key { display: flex; align-items: center; gap: var(--s2); }
.asset__key b { margin-left: auto; font-family: var(--f-num); }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); align-items: baseline; }
.steps li:last-child { border-bottom: 0; }
.steps__n { font-family: var(--f-num); font-size: 12px; color: var(--ink-2); flex: 0 0 22px; }
.steps__b { flex: 1 1 auto; min-width: 0; }
.steps__l { font-size: 14px; }
.steps__note { font-size: 12px; color: var(--ink-2); }
.steps__a { font-family: var(--f-num); font-weight: 500; white-space: nowrap; }
.steps__a.is-neg { color: var(--bad); }

details.more { border-top: 1px solid var(--line); }
details.more > summary { padding: var(--s3) var(--s4); cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 500; }
details.more > summary:hover { color: var(--accent); }

/* slider */
.slider { display: flex; align-items: center; gap: var(--s3); }
.slider input[type="range"] { flex: 1 1 auto; accent-color: var(--accent); }
.slider__v { font-family: var(--f-num); font-size: 14px; width: 56px; text-align: right; }

/* ------------------------------------------------------------------ footer */

.foot { border-top: 1px solid var(--line); background: var(--paper-2); }
.foot__in { max-width: var(--wrap); margin: 0 auto; padding: var(--s5) var(--s4); display: flex; gap: var(--s4); flex-wrap: wrap; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.foot a { color: var(--ink); }

.disclaimer { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s4) var(--s5); font-size: 12px; color: var(--ink-2); }
.disclaimer strong { color: var(--ink); }

/* ------------------------------------------------------------------ toasts */

.toasts { position: fixed; left: var(--s4); right: var(--s4); bottom: var(--s4); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: var(--s2); pointer-events: none; }
.toast { pointer-events: auto; max-width: 480px; width: 100%; background: var(--ink); color: #fff; padding: var(--s3) var(--s4); border-radius: var(--r); font-size: 14px; display: flex; gap: var(--s3); align-items: center; justify-content: space-between; }
.toast--bad { background: var(--bad); }
.toast--good { background: var(--good); }
.toast button { background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; padding: 0 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .top, .foot, .toasts, .btn, .icon-btn { display: none !important; }
  .layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .top__bar { padding: var(--s2) var(--s3); gap: var(--s2); flex-wrap: nowrap; }
  #btn-example, #btn-export { display: none; }
  .top__cur { gap: 0; }
  .brand { font-size: 17px; }
  .bar { height: 34px; }
  .bar-region__inner { padding: var(--s1) var(--s3) var(--s2); }
  .legend { display: none; }
  .readout { margin-top: 6px; }
  .layout { padding: var(--s4) var(--s3) var(--s6); gap: var(--s4); }
  .headline__n { font-size: 36px; }
}

/* =============================================================================
   Added in v3 — statistics, charts, quick-add chips, richer rows.
   Same palette throughout; nothing new was invented.
   ============================================================================= */

/* ------------------------------------------------------------ at a glance */

.glance-wrap { background: var(--ink); color: var(--paper); }
.glance-inner { max-width: var(--wrap); margin: 0 auto; padding: var(--s4); }
.glance { display: grid; gap: 1px; grid-template-columns: repeat(6, minmax(0, 1fr)); background: rgba(251,247,238,.16); border-radius: var(--r); overflow: hidden; }
@media (max-width: 1000px) { .glance { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Below 700px a six-tile grid pushed the inputs off the bottom of the screen.
   A swipeable strip keeps the numbers one glance away without stealing the page. */
@media (max-width: 700px) {
  .glance {
    display: flex; gap: 1px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .glance .tile { flex: 0 0 46%; scroll-snap-align: start; }
  .glance::-webkit-scrollbar { height: 3px; }
  .glance::-webkit-scrollbar-thumb { background: rgba(251,247,238,.35); }
}

.tile { background: var(--ink); padding: var(--s3); min-width: 0; }
.tile__l { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; opacity: .72; }
.tile__v { margin: 4px 0 2px; font-size: 24px; font-weight: 500; line-height: 1.1; }
.tile__s { margin: 0; font-size: 11px; opacity: .68; line-height: 1.35; }
.tile--good .tile__v { color: #7fd0a8; }
.tile--warn .tile__v { color: #e8bf6a; }
.tile--bad  .tile__v { color: #ff9b8a; }

/* ------------------------------------------------------------------ chips */

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s4); }
.chips__lead { margin: 0 0 6px; font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.chip {
  font: inherit; font-size: 13px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--card); }
.chip:active { transform: translateY(1px); }

/* ------------------------------------------------------------------ icons */

.card__ico { flex: 0 0 auto; color: var(--accent); display: inline-flex; }
.ico { width: 22px; height: 22px; }
.ill { width: 120px; height: 80px; color: var(--line); }
.section-h { font-family: var(--f-display); font-size: 22px; display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s4); }
.section-h .ico { width: 24px; height: 24px; color: var(--accent); }

/* -------------------------------------------------------------- row extras */

.rowc__note { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); }
.rowc__note b { color: var(--ink); font-family: var(--f-num); }
.rowc__pct { margin-left: auto; font-size: 12px; font-family: var(--f-num); color: var(--ink-2); }
.rowc--locked { background: var(--paper-2); }
.rowc__fixed { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.rowc__tag { font-size: 11px; font-family: var(--f-num); background: var(--seg-save); color: #fff; padding: 1px 7px; border-radius: 999px; }
.icon-btn-spacer { width: 34px; }
.empty-row { margin: 0; padding: var(--s4); text-align: center; color: var(--ink-2); font-size: 13px; border: 1px dashed var(--line); border-radius: var(--r); }
.hint-red { color: var(--bad); }
.ok { color: var(--good); }
.fineprint { padding: var(--s4); margin: 0; font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--line); }

.mini { font: inherit; font-family: var(--f-num); font-size: 14px; width: 78px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); text-align: right; }
.mini-sel { font: inherit; font-size: 14px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); }
.date-in { font: inherit; font-size: 14px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); }
.mini:focus, .mini-sel:focus, .date-in:focus { border-color: var(--accent); }

.tag-set--big label { padding: 7px var(--s4); font-size: 14px; }

/* --------------------------------------------------------- split visual */

.split-visual { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.split-visual__keys { flex: 1 1 160px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.per100__lead { font-size: 13px; color: var(--ink-2); align-self: center; }

/* ------------------------------------------------------------------ gauge */

.gauge-wrap { display: flex; gap: var(--s4); align-items: center; padding: var(--s4); flex-wrap: wrap; }
.gauge-side { flex: 1 1 190px; }
.gauge-side__big { margin: 0; font-family: var(--f-num); font-size: 26px; font-weight: 500; }
.gauge-side__sub { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.goalr__pct { margin: 4px 0 0; font-size: 11px; font-family: var(--f-num); color: var(--ink-2); }

/* ----------------------------------------------------------------- charts */

.charts-wrap { background: var(--paper-2); border-top: 1px solid var(--line); }
.charts-inner { max-width: var(--wrap); margin: 0 auto; padding: var(--s6) var(--s4); }
.chart-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-controls { margin-bottom: var(--s3); }
.chart { display: block; max-width: 100%; }
.chart--wide { width: 100%; height: auto; }
.chart-note { margin: var(--s3) 0 0; font-size: 13px; color: var(--ink-2); }
.chart-note b { color: var(--ink); }
.legend--chart { margin-top: var(--s2); }

.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-track { stroke: var(--paper-2); stroke-width: 14; stroke-linecap: round; }
.ch-ylab { font-family: var(--f-num); font-size: 10px; fill: var(--ink-2); text-anchor: end; }
.ch-xlab { font-family: var(--f-num); font-size: 10px; fill: var(--ink-2); text-anchor: middle; }
.ch-rowlab { font-family: var(--f-body); font-size: 12px; fill: var(--ink); text-anchor: end; }
.ch-note { font-family: var(--f-num); font-size: 10px; fill: var(--bad); }
.ch-c1 { text-anchor: middle; font-family: var(--f-num); font-size: 17px; font-weight: 500; fill: var(--ink); }
.ch-c2 { text-anchor: middle; font-family: var(--f-body); font-size: 11px; fill: var(--ink-2); }

.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbar { display: grid; grid-template-columns: 110px 1fr auto; gap: var(--s2); align-items: center; font-size: 13px; }
.hbar__t { background: var(--paper-2); border-radius: 3px; height: 8px; overflow: hidden; }
.hbar__f { display: block; height: 100%; }
.hbar__v { font-size: 12px; }

/* ------------------------------------------------------- currency convert */

.convert {
  max-width: var(--wrap); margin: 0 auto; padding: var(--s2) var(--s4) var(--s3);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3);
  font-size: 13px; border-top: 1px solid var(--line); background: var(--paper-2);
}
.convert input { font: inherit; font-family: var(--f-num); width: 92px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); text-align: right; }

@media (max-width: 700px) {
  .top__cur-t { display: none; }
  .glance-inner { padding: var(--s3); }
  .tile__v { font-size: 20px; }
  .charts-inner { padding: var(--s5) var(--s3); }
  .section-h { font-size: 19px; }
}
.ch-right { font-family: var(--f-num); font-size: 11px; }
