/* Black and gold. One theme for every device: the app is always dark. */
:root {
  --bg: #0b0b0a;
  --surface: #151513;
  --surface-alt: #1f1f1c;
  --text: #f3efe2;
  --text-2: #b5b0a1;
  --text-3: #7f7b70;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.2);
  --gold: #f5c400;
  --gold-soft: rgba(245, 196, 0, 0.12);
  --on-gold: #0b0b0a;
  --accent: #f5c400;
  --accent-bg: rgba(245, 196, 0, 0.14);
  --good: #5dcaa5;
  --good-bg: rgba(93, 202, 165, 0.14);
  --bad: #f08a80;
  --bad-bg: rgba(240, 138, 128, 0.14);
  --warn: #fac775;
  --warn-bg: rgba(250, 199, 117, 0.14);
  --c1: #f5c400; --c2: #85b7eb; --c3: #ef9f27; --c4: #afa9ec; --c5: #f0997b; --c6: #b4b2a9;
  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3 { font-weight: 600; line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: .02em; text-transform: uppercase; color: var(--gold); }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); font-size: 13px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 10px max(16px, env(safe-area-inset-left));
}
.brand { font-family: var(--display); font-size: 20px; letter-spacing: .06em; color: var(--gold); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; flex-shrink: 1; }
@media (max-width: 640px) { .brand { max-width: 100%; text-align: center; } }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  color: var(--text-2); text-decoration: none; padding: 6px 10px; border-radius: 8px; white-space: nowrap; font-size: 14px;
}
.tabs a:hover { background: var(--surface-alt); }
.tabs a.active { background: var(--gold-soft); color: var(--gold); }

.container { max-width: 980px; margin: 0 auto; padding: 20px 16px 64px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.tile .label { font-size: 13px; color: var(--text-2); }
.tile .value { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 12px; color: var(--text-3); }

button.tile-link {
  text-align: left; width: 100%; font: inherit; color: inherit; cursor: pointer; position: relative;
  border-radius: var(--radius); padding: 12px 28px 12px 14px; transition: border-color .15s, transform .1s;
}
button.tile-link::after { content: "›"; position: absolute; right: 12px; top: 10px; color: var(--text-3); font-size: 20px; }
button.tile-link:hover { background: var(--surface); border-color: var(--border-strong); }
button.tile-link:active { transform: scale(0.98); }
button.row-link {
  width: 100%; font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--border);
  border-radius: 0; padding: 10px 0; cursor: pointer;
}
button.row-link:hover { background: var(--surface-alt); }
button.row-link:last-of-type { border-bottom: 0; }
.share { height: 4px; background: var(--surface-alt); border-radius: 99px; margin-top: 6px; max-width: 220px; }
.share > div { height: 100%; background: var(--c1); border-radius: 99px; }

.ticker-wrap { margin-bottom: 14px; }
.ticker {
  display: block; width: 100%; overflow: hidden; padding: 9px 0; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); text-align: left; font-size: 14px;
}
.ticker:hover { background: var(--surface); border-color: var(--border-strong); }
.ticker-track { display: inline-flex; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ticker-track.scrolling { animation: ticker-scroll 40s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus .ticker-track { animation-play-state: paused; }
.ticker-dupe { display: inline-flex; }
.tick { padding: 0 18px; border-right: 1px solid var(--border); }
.ticker-note { margin-top: 4px; text-align: right; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; }
  .ticker-track.scrolling { animation: none; }
  .ticker-dupe { display: none; }
}
.coin-row { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.coin-row .coin-other { grid-column: 1 / 2; grid-row: 2; }
@media (max-width: 640px) { .coin-row { grid-template-columns: 1fr 1fr; } .coin-row .coin-remove { grid-column: 1 / -1; justify-self: end; } }
.wl-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.wl-sym { text-transform: uppercase; }

.video-card { max-width: 520px; margin: 0 auto 16px; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--border); }
.video-facade, .video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; margin: 0; background: #000; border-radius: 0; }
.video-facade { position: relative; cursor: pointer; }
.video-facade:hover { background: #000; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.video-play {
  position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, .7); border-radius: 12px;
}
.video-play::after {
  content: ""; position: absolute; left: 27px; top: 14px;
  border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff;
}
.video-facade:hover .video-play { background: #e00; }
.video-caption { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: var(--surface); font-size: 13px; color: var(--text-2); }

.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.hero .big { font-family: var(--display); font-weight: 400; font-size: 52px; line-height: 1.05; letter-spacing: .01em; color: var(--gold); }
.chart-box { position: relative; height: 220px; }
.chart-box.tall { height: 300px; }

.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .right { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pill {
  display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px;
  background: var(--surface-alt); color: var(--text-2); vertical-align: 1px;
}
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.accent { background: var(--accent-bg); color: var(--accent); }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0 10px; flex-wrap: wrap; }
.section-head:first-child { margin-top: 0; }

button, .btn {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--surface-alt); }
button.primary, .btn.primary { background: var(--gold); color: var(--on-gold); border-color: var(--gold); font-weight: 600; }
button.primary:hover { opacity: .88; }
button.link { border: 0; background: none; color: var(--accent); padding: 4px 6px; }
button.danger { color: var(--bad); }
button.small { font-size: 13px; padding: 3px 10px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
label > input, label > select, label > textarea { margin-top: 4px; }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 8px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=range] { padding: 0; accent-color: var(--accent); }
.form-grid { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.error { color: var(--bad); font-size: 13px; min-height: 1em; margin: 0 0 8px; }

.money-input { position: relative; }
.money-input::before { content: "$"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.money-input input { padding-left: 22px; text-align: right; font-variant-numeric: tabular-nums; }

.progress { height: 8px; background: var(--surface-alt); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.progress > div { height: 100%; background: var(--c1); border-radius: 99px; }

.slider-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.slider-row output { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 32px 16px; }
.empty h2 { margin-bottom: 6px; }

table.preview { width: 100%; border-collapse: collapse; font-size: 13px; }
table.preview td, table.preview th { padding: 5px 6px; border-bottom: 1px solid var(--border); text-align: left; }
table.preview td.num { text-align: right; }

dialog {
  border: 1px solid var(--border); border-radius: 16px; padding: 0;
  background: var(--surface); color: var(--text);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
#modal-body { padding: 20px; }

#toast {
  font-weight: 600;
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--gold); color: var(--on-gold); padding: 10px 16px; border-radius: 10px; font-size: 14px;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 20;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.alert { border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; font-size: 14px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.accent { background: var(--accent-bg); color: var(--accent); }

.bottombar { display: none; }
.more-list a { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--border); }
.more-list a:last-child { border-bottom: 0; }
.more-list a::after { content: "›"; margin-left: auto; color: var(--text-3); font-size: 20px; }

@media (max-width: 640px) {
  .topbar { padding-top: max(10px, env(safe-area-inset-top)); justify-content: center; }
  .topbar .tabs { display: none; }
  .bottombar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottombar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 11px; color: var(--text-3); text-decoration: none; padding: 4px 0;
    -webkit-tap-highlight-color: transparent;
  }
  .bottombar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .bottombar a.active { color: var(--accent); }
  .container { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  input, select, textarea { font-size: 16px; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .tile .value { font-size: 19px; }
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 92vh; }
  #modal-body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .hero .big { font-size: 44px; }
  .slider-row { grid-template-columns: 1fr 80px; }
  .slider-row input { grid-column: 1 / -1; grid-row: 2; }
  .sub-row { flex-wrap: wrap; }
  .sub-row .grow { flex-basis: 100%; }
  .sub-row .right { flex-basis: 100%; text-align: left; display: flex; gap: 10px; align-items: baseline; }
  .sub-row select { width: 100% !important; }
}

/* Black and gold details */
.card.hero-card { border-top: 2px solid var(--gold); }
.tile .value { color: var(--text); }
.progress > div, .share > div { background: var(--gold); }
input:focus, select:focus, textarea:focus { outline-color: var(--gold); }
input[type=range] { accent-color: var(--gold); }
.video-card { border-color: var(--border-strong); }
.tick b { color: var(--gold); }
.empty h2 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .02em; text-transform: uppercase; color: var(--gold); }
dialog h2:first-child, #modal-body > h2, #modal-body .section-head h2 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .02em; text-transform: uppercase; color: var(--gold); }
.pill.accent { background: var(--gold-soft); color: var(--gold); }
::selection { background: var(--gold); color: var(--on-gold); }

/* Guided CSV import */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 22px 12px; margin: 0 0 12px;
  cursor: pointer; text-align: center; color: var(--text); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: var(--gold-soft); }
.dz-title { font-weight: 600; color: var(--gold); }
.import-file { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: var(--surface-alt); }
.import-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.import-file .name { font-weight: 500; word-break: break-all; }
.import-file .fix { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
details.help { margin: 4px 0 8px; font-size: 14px; }
details.help summary { cursor: pointer; color: var(--gold); }
.help-row { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.help-row b { color: var(--text); font-weight: 500; }
@media (max-width: 640px) { .help-row { grid-template-columns: 1fr; gap: 0; } }

/* Subscription rename */
.sub-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rename-btn { border: 0; background: none; color: var(--text-3); padding: 2px 4px; font-size: 14px; cursor: pointer; line-height: 1; }
.rename-btn:hover { color: var(--gold); background: none; }
.rename-input { font-size: 15px; padding: 4px 8px; width: auto; flex: 1; min-width: 140px; }

/* Subscription / Bill toggle in the add form */
.kind-toggle { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.kind-toggle label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 15px; cursor: pointer; }
.kind-toggle input { width: auto; accent-color: var(--gold); }

/* Drag to reorder */
.drag-handle {
  border: 0; background: none; color: var(--text-3); cursor: grab; touch-action: none;
  padding: 6px 4px; margin-left: -6px; font-size: 16px; line-height: 1; letter-spacing: -3px; align-self: center;
}
.drag-handle:hover, .drag-handle:focus-visible { color: var(--gold); background: none; }
.drag-handle:active { cursor: grabbing; }
.sort-list > .dragging { background: var(--surface-alt); border-radius: 8px; box-shadow: 0 0 0 1px var(--gold); position: relative; z-index: 2; }
.sort-list > .row:last-child { border-bottom: 0; }
@media (max-width: 640px) { .sub-row .drag-handle { order: -1; } .sub-row .grow { flex-basis: calc(100% - 30px); } }

/* Retirement "what if" inputs */
form.whatif { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-alt); }
form.whatif label { margin: 0; }
@media (max-width: 640px) { form.whatif { grid-template-columns: 1fr 1fr; } form.whatif .btn-row { grid-column: 1 / -1; } }

/* Accounts page totals */
.total-row { display: flex; align-items: baseline; gap: 12px; padding: 10px 0 2px; margin-top: 4px; border-top: 1px solid var(--border-strong); }
.total-row .grow { flex: 1; min-width: 0; }
.total-row .faint { margin-left: 6px; }
.total-row .right { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 16px; }
.net-footer { border-top: 2px solid var(--gold); }
.net-big { font-family: var(--display); font-size: 30px; color: var(--gold); letter-spacing: .01em; }

/* Goal plans */
.plan-box { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface-alt); border-left: 3px solid var(--gold); }
.plan-big { font-family: var(--display); font-size: 30px; color: var(--gold); line-height: 1.15; }
.plan-now { margin-top: 6px; font-size: 14px; }

/* Goal card */
.goal-line { margin: 4px 0; font-size: 15px; }
.gold { color: var(--gold); }
details.goal-math { margin-top: 8px; }
details.goal-math summary { cursor: pointer; color: var(--gold); font-size: 14px; }
details.goal-math p { margin: 6px 0; }
details.goal-math label { margin-top: 10px; }

/* Goal wizard */
.wizard h2 { margin-bottom: 14px; }
.wizard-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.wizard-dots span { width: 22px; height: 4px; border-radius: 4px; background: var(--border-strong); }
.wizard-dots span.done { background: var(--gold-soft); }
.wizard-dots span.on { background: var(--gold); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 500; text-align: left; }
.choice.on, .choice:hover { border-color: var(--gold); background: var(--gold-soft); }
.choice-icon { font-size: 22px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { border-radius: 999px; padding: 7px 14px; }
.chip.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.seg { display: flex; gap: 8px; margin-bottom: 12px; }
.big-input input { font-size: 26px; padding: 10px 12px 10px 26px; }
.big-input::before { font-size: 20px; }
.review-line { font-size: 18px; line-height: 1.5; }

/* Home: Where it's headed */
.headed-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.headed-title { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; color: var(--gold); margin: 0; }
.savings-chip { font-size: 13px; text-decoration: none; color: var(--text); border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.savings-chip:hover { border-color: var(--gold); }
.savings-chip.unset { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.headed-chart { position: relative; height: 130px; margin: 4px -4px 10px; }
.headed-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.headed-stat { background: var(--surface-alt); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.headed-big { font-family: var(--display); font-size: 30px; line-height: 1.1; color: var(--gold); }
.headed-stat .pill { margin-top: 4px; }
a.headed-goal { text-decoration: none; color: inherit; }
.headed-goal-status { font-size: 18px; font-weight: 600; margin: 4px 0 2px; }
.headed-more { display: block; margin-top: 10px; text-decoration: none; }
@media (max-width: 640px) {
  .headed-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .headed-goal { grid-column: 1 / -1; }
  .headed-big { font-size: 26px; }
  .headed-stat .pill { font-size: 11px; white-space: normal; }
}

/* Start-from-$0 switch on the goal review screen */
.switch-row { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 6px; padding: 12px; border-radius: 10px; background: var(--surface-alt); cursor: pointer; color: var(--text); font-size: 15px; }
.switch-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--gold); flex: none; }

/* Ways to get there */
.ways { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.ways-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); margin-bottom: 6px; }
.lever { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.lever-icon { width: 22px; text-align: center; flex: none; font-size: 15px; line-height: 1.4; color: var(--gold); }
.lever-title { font-weight: 500; font-size: 14px; }
.lever .faint { font-size: 13px; }
.lever b { color: var(--text); }
details.ideas summary { cursor: pointer; color: var(--gold); font-weight: 500; }
details.ideas[open] summary { margin-bottom: 8px; }

/* Opportunities */
.opp-card { border-left: 3px solid var(--gold); }
.opp-card summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; }
.opp-card summary::-webkit-details-marker { display: none; }
.opp-title { font-family: var(--display); font-size: 20px; letter-spacing: .03em; text-transform: uppercase; color: var(--gold); }
.opp-total { font-size: 15px; color: var(--text); }
.opp-item { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.opp-item:last-of-type { border-bottom: 0; }
.opp-item .grow { flex: 1; min-width: 0; }
.opp-item .right { white-space: nowrap; font-weight: 600; }
.row.has-opp { background: linear-gradient(90deg, var(--gold-soft), transparent 70%); border-left: 3px solid var(--gold); padding-left: 10px; margin-left: -13px; border-radius: 0 8px 8px 0; }
.opp-note { margin-top: 6px; font-size: 13px; color: var(--gold); line-height: 1.4; }
.row.has-opp { flex-wrap: wrap; }
.row.has-opp .name { white-space: normal; }
.opp-notes { flex-basis: 100%; }
.opp-note { margin-top: 2px; }

/* Account projection (history window) and track-record tile */
.proj-box { margin-bottom: 14px; padding: 12px 14px; border-radius: 10px; background: var(--surface-alt); border-left: 3px solid var(--gold); }
.proj-head { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); margin-bottom: 6px; }
.proj-row { padding: 6px 0; }
.proj-row + .proj-row { border-top: 1px solid var(--border); }
.proj-big { font-family: var(--display); font-size: 28px; color: var(--gold); line-height: 1.15; }
.track-tile { border: 1px solid var(--gold); }
.track-tile .value { color: var(--gold); }

/* Monthly update reminder */
.update-bar { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; }
.update-bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 7px; }
.update-track { height: 5px; background: var(--surface-alt); border-radius: 99px; overflow: hidden; }
.update-track > div { height: 100%; background: var(--text-3); border-radius: 99px; }
.update-bar.soon, .update-bar.overdue { border-color: var(--gold); background: var(--gold-soft); }
.update-bar.soon .update-track > div, .update-bar.overdue .update-track > div { background: var(--gold); }
.update-bar.overdue .update-bar-top span:first-child, .update-bar.soon .update-bar-top span:first-child { color: var(--gold); font-weight: 600; }
.update-due { font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.update-due.overdue, .update-due.soon { color: var(--gold); }
#tabs a.due, #bottombar a.due { position: relative; }
#tabs a.due::after { content: ""; position: absolute; top: 4px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
#bottombar a.due::after { content: ""; position: absolute; top: 2px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* Demo site banner */
.demo-banner { background: var(--gold); color: var(--on-gold); text-align: center; font-size: 13px; font-weight: 600; padding: 7px 16px; }
@media (max-width: 640px) { .demo-banner { font-size: 12px; } }
