/* Budget Explorer: dark, dense, colourful. Keeps the original gradient slider and large teal figure.
   Uses the shell tokens (shell.css) and the shared control/legend/detail styles (dist.css). */
.bgt-wrap h2 { margin-top: 26px; }
.bgt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* original slider look, larger touch target */
.bgt-budget { background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: 12px; padding: 14px 18px 12px; margin-bottom: 12px; text-align: center; }
.budget-display { font-size: 48px; font-weight: 800; color: #4ecdc4; letter-spacing: -2px; line-height: 1.1; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.bgt-slide { max-width: 640px; margin: 0 auto; }
.bgt-lbl { display: block; font-size: 13px; color: var(--sc-text-2); margin-bottom: 8px; }
.budget-slider { width: 100%; -webkit-appearance: none; appearance: none; height: 10px; border-radius: 5px; background: linear-gradient(to right, #1a6fb5, #4ecdc4, #e8b448, #c0392b); outline: none; cursor: pointer; margin: 8px 0; touch-action: pan-y; }
.budget-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 4px solid #4ecdc4; cursor: grab; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.budget-slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 4px solid #4ecdc4; cursor: grab; }
.budget-slider:focus-visible { outline: 3px solid var(--sc-focus); outline-offset: 6px; }
.slider-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--sc-text-3); }
.bgt-exact { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--sc-text-2); }
.bgt-exact input { font: inherit; font-size: 15px; width: 110px; min-height: 44px; color: var(--sc-text); background: var(--sc-panel-2); border: 1px solid var(--sc-line); border-radius: 8px; padding: 0 10px; font-variant-numeric: tabular-nums; }
.bgt-exact input:focus-visible { outline: 3px solid var(--sc-focus); outline-offset: 2px; }
.bgt-headline { font-size: 17px; color: var(--sc-text); margin-top: 10px; line-height: 1.45; }
.bgt-headline b { color: var(--sc-accent); font-size: 22px; font-variant-numeric: tabular-nums; }
.bgt-headline .bgt-of { color: #fff; font-weight: 700; }
.bgt-headline em { font-style: normal; font-weight: 700; color: #fff; }
.bgt-headline small { display: block; font-size: 13px; color: var(--sc-text-2); margin-top: 2px; }

/* real quotes either side */
.bgt-near { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.bgt-nearcol { background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.bgt-nearcol h3 { font-size: 13px; font-weight: 700; color: var(--sc-text-2); margin-bottom: 6px; }
.bgt-nearcol.fit { border-top: 4px solid #4ecdc4; } .bgt-nearcol.over { border-top: 4px solid #6f87a6; }
.bgt-q { display: flex; width: 100%; align-items: baseline; gap: 10px; text-align: left; font: inherit; font-size: 13px; color: var(--sc-text); background: transparent; border: 0; border-bottom: 1px solid #1c2e4a; padding: 8px 2px; min-height: 44px; cursor: pointer; }
.bgt-q:last-child { border-bottom: 0; }
.bgt-q:hover { background: rgba(78,205,196,.08); } .bgt-q:focus-visible { outline: 3px solid var(--sc-focus); outline-offset: -2px; }
.bgt-q b { font-size: 16px; color: #fff; min-width: 70px; font-variant-numeric: tabular-nums; }
.bgt-q span { color: var(--sc-text-2); min-width: 0; overflow-wrap: anywhere; }
.bgt-empty { color: var(--sc-text-3); font-size: 13px; padding: 6px 2px; }

/* region rows with canvas dots */
.bgt-rowtools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; margin-bottom: 8px; }
.bgt-axisbar { position: sticky; top: 0; z-index: 5; background: #0d1a30; border-bottom: 1px solid var(--sc-line); display: grid; grid-template-columns: 250px 1fr; }
.bgt-axisname { font-size: 12px; color: var(--sc-text-3); padding: 8px 10px 0; }
.bgt-axis { display: block; width: 100%; cursor: ew-resize; touch-action: none; }
.bgt-row { display: grid; grid-template-columns: 250px 1fr; border-bottom: 1px solid #1c2e4a; }
.bgt-row.focus { background: rgba(255,209,102,.07); }
.bgt-rh { padding: 8px 10px; min-width: 0; }
.bgt-rn { font-size: 14px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.bgt-rc { font-size: 13px; color: var(--sc-text-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.bgt-rc b { color: var(--sc-accent); font-size: 15px; }
.bgt-bar { height: 6px; border-radius: 3px; background: #1c2e4a; margin: 6px 0 4px; overflow: hidden; }
.bgt-bar i { display: block; height: 100%; background: #4ecdc4; }
.bgt-sel { font-size: 12px; color: #f4cf85; min-height: 16px; }
.bgt-rbtn { font: inherit; font-size: 12px; font-weight: 600; color: var(--sc-text); background: var(--sc-panel-2); border: 1px solid var(--sc-line); border-radius: 8px; min-height: 36px; padding: 0 10px; cursor: pointer; margin-top: 4px; }
.bgt-rbtn:hover { border-color: var(--sc-accent); } .bgt-rbtn:focus-visible { outline: 3px solid var(--sc-focus); outline-offset: 2px; }
.bgt-plot { position: relative; min-width: 0; }
.bgt-cv { display: block; width: 100%; cursor: pointer; }
.bgt-cv:focus-visible { outline: 3px solid var(--sc-focus); outline-offset: -3px; }
.bgt-beyond { position: absolute; right: 6px; top: 4px; font-size: 12px; color: var(--sc-text-3); pointer-events: none; }
.bgt-tip { position: fixed; z-index: 60; pointer-events: none; background: #0e1b30; border: 1px solid var(--sc-accent); border-radius: 8px; padding: 6px 9px; font-size: 12px; color: #fff; max-width: 260px; }

/* months */
.bgt-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.bgt-m { background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: 10px; padding: 8px 10px; font-size: 13px; color: var(--sc-text-2); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bgt-m.sel { border-color: var(--sc-focus); }
.bgt-m.none { border-style: dashed; color: var(--sc-text-3); }
.bgt-m button.bgt-mb { font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: transparent; border: 0; text-align: left; padding: 0; min-height: 28px; cursor: pointer; }
.bgt-m button.bgt-mb:focus-visible, .bgt-m a:focus-visible { outline: 3px solid var(--sc-focus); outline-offset: 2px; }
.bgt-m b { color: var(--sc-accent); font-size: 16px; font-variant-numeric: tabular-nums; }
.bgt-m a { color: var(--sc-accent); font-size: 13px; display: inline-block; min-height: 28px; line-height: 28px; }
.bgt-links { margin: 10px 0 0; font-size: 13px; color: var(--sc-text-2); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.bgt-links a { color: var(--sc-accent); display: inline-block; min-height: 28px; line-height: 28px; }

/* table */
.bgt-tbl { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: 12px; overflow: hidden; }
.bgt-tbl th, .bgt-tbl td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #1c2e4a; vertical-align: top; font-variant-numeric: tabular-nums; color: var(--sc-text-2); }
.bgt-tbl thead th { color: var(--sc-text-3); font-weight: 600; background: #0d1a30; }
.bgt-tbl td.t { color: #fff; font-weight: 800; font-size: 15px; }
.bgt-tbl tr.go { cursor: pointer; } .bgt-tbl tr.go:hover { background: rgba(78,205,196,.07); }
.bgt-tbl button.bgt-link { font: inherit; font-size: 13px; font-weight: 700; color: var(--sc-accent); background: transparent; border: 0; padding: 0; min-height: 32px; cursor: pointer; text-align: left; text-decoration: underline; }
.bgt-tbl button.bgt-link:focus-visible { outline: 3px solid var(--sc-focus); outline-offset: 2px; }
.bgt-more { margin-top: 8px; }
.bgt-tblhead { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; margin: 4px 0 8px; }
.dst-fine { font-size: 13px; color: var(--sc-text-2); }
.bgt-zero { padding: 18px; border: 1px dashed var(--sc-amber); border-radius: 12px; background: var(--sc-panel); color: var(--sc-text); font-size: 14px; line-height: 1.5; }

@media (max-width: 720px) {
  .budget-display { font-size: 40px; }
  .bgt-budget { padding: 10px 12px; position: sticky; top: 0; z-index: 20; }
  .bgt-budget .bgt-lbl { font-size: 12px; margin-bottom: 2px; }
  .bgt-headline { font-size: 14px; } .bgt-headline b { font-size: 18px; }
  .bgt-near { grid-template-columns: 1fr; }
  .bgt-axisbar { grid-template-columns: 1fr; } .bgt-axisname { display: none; }
  .bgt-row { grid-template-columns: 1fr; }
  .bgt-rh { padding: 8px 8px 0; }
  .bgt-months { grid-template-columns: repeat(2, 1fr); }
  .bgt-tbl thead { display: none; }
  .bgt-tbl, .bgt-tbl tbody, .bgt-tbl tr, .bgt-tbl td { display: block; width: 100%; }
  .bgt-tbl tr { border-bottom: 1px solid var(--sc-line); padding: 6px 0; }
  .bgt-tbl td { border: 0; padding: 2px 10px; display: flex; gap: 10px; justify-content: space-between; }
  .bgt-tbl td::before { content: attr(data-label); color: var(--sc-text-3); font-weight: 600; flex: none; }
}
