/* GoldR account chart (account-chart.js): the same file in homepage/portal/ and admin/. Colours are its own tokens, so it
   looks the same inside both pages. */
.ac {
  --ac-gold: #e2c46c; --ac-eq: #7ee0a3; --ac-up: #7ee0a3; --ac-down: #ff8b86; --ac-cash: #8fb8ff;
  --ac-ink: #f5f3ec; --ac-muted: #aab2be; --ac-quiet: #7f8997; --ac-card: #0b0d11; --ac-on-gold: #17130a;
  --ac-line: rgba(255, 255, 255, .07); --ac-line-strong: rgba(255, 255, 255, .16);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0;   /* one full-width column: an SVG in an auto track shrinks */
}
.ac-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--ac-line); border: 1px solid var(--ac-line); border-radius: 12px; overflow: hidden; }
.ac-facts:empty { display: none; }
.ac-facts > div { background: var(--ac-card); padding: 11px 13px; display: grid; gap: 2px; align-content: start; min-width: 0; grid-row: span 3; grid-template-rows: subgrid; }
.ac-facts > div > span { color: var(--ac-quiet); font-size: 11.5px; }
.ac-facts strong { color: var(--ac-ink); font-size: 18px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ac-facts small { color: var(--ac-quiet); font-size: 11.5px; }
.ac .up { color: var(--ac-up); } .ac .down { color: var(--ac-down); }
.ac-svg { display: block; width: 100%; height: 260px; overflow: visible; }
.ac-grid { stroke: var(--ac-line); stroke-dasharray: 2 4; }
.ac-ylab, .ac-xlab { fill: var(--ac-quiet); font: 500 11px "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace; }
.ac-fill-top { stop-color: var(--ac-gold); stop-opacity: .22; }
.ac-fill-end { stop-color: var(--ac-gold); stop-opacity: 0; }
.ac-bal { fill: none; stroke: var(--ac-gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ac-eq { fill: none; stroke: var(--ac-eq); stroke-width: 1.4; stroke-linejoin: round; opacity: .9; }
.ac-dot { stroke: var(--ac-card); stroke-width: 1.5; }
.ac-dot.win { fill: var(--ac-up); } .ac-dot.loss { fill: var(--ac-down); }
.ac-dot.other { fill: var(--ac-card); stroke: var(--ac-quiet); }
.ac-cash { fill: var(--ac-cash); stroke: var(--ac-card); stroke-width: 1.5; }
.ac-now { fill: var(--ac-gold); }
.ac-nowtag { fill: var(--ac-gold); }
.ac-nowtext { fill: var(--ac-on-gold); font: 700 11px "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace; }
.ac-cross { stroke: var(--ac-line-strong); }
.ac-hb { fill: var(--ac-gold); stroke: var(--ac-card); stroke-width: 2; }
.ac-he { fill: var(--ac-eq); stroke: var(--ac-card); stroke-width: 2; }
.ac-cross, .ac-hb, .ac-he { visibility: hidden; }
.ac-reading .ac-cross, .ac-reading .ac-hb, .ac-reading .ac-he { visibility: visible; }
.ac-tip { position: absolute; top: 8px; left: 0; display: grid; gap: 2px; min-width: 170px; padding: 9px 11px; border: 1px solid var(--ac-line-strong); border-radius: 10px;
  background: rgba(10, 12, 16, .95); color: var(--ac-muted); font-size: 12px; line-height: 1.45; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none; transition: opacity .15s; }
.ac-reading .ac-tip { opacity: 1; }
.ac-tip b { color: var(--ac-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ac-tip .ac-when { margin-bottom: 2px; }
.ac-tip .up { color: var(--ac-up); } .ac-tip .down { color: var(--ac-down); }
.ac-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ac-quiet); font-size: 11.5px; }
.ac-legend span::before, .ac-tip .k-bal::before, .ac-tip .k-eq::before { content: ""; display: inline-block; vertical-align: middle; margin-right: 6px; }
.ac-legend .k-bal::before, .ac-legend .k-eq::before { width: 14px; height: 2px; border-radius: 2px; background: var(--ac-gold); }
.ac-legend .k-eq::before { background: var(--ac-eq); }
.ac-legend .k-win::before, .ac-legend .k-loss::before, .ac-legend .k-other::before, .ac-tip .k-bal::before, .ac-tip .k-eq::before { width: 8px; height: 8px; border-radius: 50%; background: var(--ac-up); }
.ac-legend .k-loss::before { background: var(--ac-down); }
.ac-legend .k-other::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ac-quiet); }
.ac-legend .k-cash::before { width: 8px; height: 8px; background: var(--ac-cash); transform: rotate(45deg); }
.ac-tip .k-bal::before { background: var(--ac-gold); }
.ac-tip .k-eq::before { background: var(--ac-eq); }
@media (max-width: 600px) {
  .ac-svg { height: 220px; }
  .ac-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 400px) {
  .ac-facts { grid-template-columns: minmax(0, 1fr); }
  .ac-facts > div:last-child:nth-child(odd) { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .ac-tip { transition: none; } }
