/* Truegold, Save-items and What-to-invest guides (on top of the er-* and sw-* styles). Shared gd-* parts. */
.gd-hero-tg { background: radial-gradient(circle at 0 0, #f2c94c33, transparent 60%), var(--panel); }
.gd-hero-si { background: radial-gradient(circle at 0 0, #6aa6e833, transparent 60%), var(--panel); }
.gd-hero-wi { background: radial-gradient(circle at 0 0, #5fbf8333, transparent 60%), var(--panel); }
.gd-im { width: 40px; height: 40px; object-fit: contain; flex: none; display: block; }
.gd-im.s { width: 26px; height: 26px; }
.gd-im.l { width: 56px; height: 56px; }
.gd-sec-p { margin: 12px 0 0; }
.gd-check { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #1b1608; background: var(--warn); white-space: nowrap; vertical-align: 1px; }
.gd-todo { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; border: 2px dashed var(--warn); background: #e3a1440f; font-size: 13px; color: var(--muted); }
.gd-todo b { color: var(--warn); display: block; font-size: 14px; }
.gd-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c, var(--gold)) 10%, transparent); border-left: 4px solid var(--c, var(--gold)); font-size: 14px; }
.gd-note.warn { --c: var(--warn); }
.gd-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.gd-scroll .er-table { min-width: 420px; }
.gd-table td .gd-im.s { display: inline-block; vertical-align: middle; margin-right: 6px; }

/* stat tiles and big numbers */
.gd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.gd-stat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.gd-stat div { display: grid; min-width: 0; }
.gd-stat b { font: 800 24px var(--font-display); color: var(--gold-2); line-height: 1.1; }
.gd-stat small { color: var(--muted); font-size: 12px; }

/* tiles grid (buildings, sources, cards) */
.gd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.gd-tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.gd-tile b { font-size: 14px; overflow-wrap: anywhere; }
.gd-tile small { color: var(--muted); font-size: 12px; }
.gd-tile.off { opacity: .45; filter: grayscale(1); border-style: dashed; }
.gd-tile.hot { border-color: var(--c, var(--gold)); background: color-mix(in srgb, var(--c, var(--gold)) 12%, var(--panel-2)); }
.gd-tile .gd-badge { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #10140f; background: var(--ok); }
.gd-tile.off .gd-badge { background: var(--bad); }
.gd-tiles.wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gd-tile.row { flex-direction: row; text-align: left; align-items: center; gap: 10px; }
.gd-tile.row > div { display: grid; gap: 2px; min-width: 0; }

/* flow diagrams: a -> b -> c */
.gd-flow { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.gd-flow-box { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); min-width: 92px; max-width: 170px; flex: 1 1 92px; }
.gd-flow-box small { color: var(--muted); font-size: 12px; }
.gd-flow-box.hot { border-color: var(--c, var(--gold)); box-shadow: 0 0 0 1px var(--c, var(--gold)); }
.gd-flow-ims { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.gd-flow .er-arrow { flex: none; }

/* pips: stage of 5, refines per day, steps */
.gd-pips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.gd-pip { min-width: 44px; padding: 8px 6px; border-radius: 8px; text-align: center; font-weight: 800; font-size: 13px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.gd-pip.on { background: var(--c, var(--gold)); color: #10140f; border-color: var(--c, var(--gold)); }
.gd-pip.next { border: 2px dashed var(--c, var(--gold)); color: var(--text); }
.gd-pip.last { box-shadow: 0 0 0 2px var(--gold-2); }

/* day / stage strips */
.gd-days { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.gd-day { padding: 8px 2px; border-radius: 8px; text-align: center; font-size: 12px; font-weight: 800; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); min-width: 0; }
.gd-day small { display: block; font-size: 10px; font-weight: 600; }
.gd-day.on { background: var(--c, var(--ok)); border-color: var(--c, var(--ok)); color: #10140f; }
button.gd-day { cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
button.gd-day.sel { box-shadow: 0 0 0 2px var(--text); }
.gd-strip-h { margin: 12px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* vertical bar chart */
.gd-vbars { display: flex; align-items: flex-end; gap: 6px; height: 200px; margin: 14px 0 4px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.gd-vb { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.gd-vb-pair { display: flex; align-items: flex-end; gap: 2px; width: 100%; flex: 1; justify-content: center; }
.gd-vb-bar { width: 50%; max-width: 30px; border-radius: 5px 5px 0 0; background: var(--c, var(--gold)); position: relative; }
.gd-vb-bar.solo { width: 70%; max-width: 44px; }
.gd-vb em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--text); white-space: nowrap; }
.gd-vb small { font-size: 12px; font-weight: 800; color: var(--muted); }
.gd-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; align-items: center; }
.gd-legend span { display: inline-flex; align-items: center; gap: 5px; }
.gd-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c); }

/* horizontal bars with icon */
.gd-hrows { display: grid; gap: 8px; margin-top: 12px; }
.gd-hrow { display: grid; grid-template-columns: 30px minmax(0, 130px) minmax(0, 1fr) 76px; align-items: center; gap: 8px; font-size: 13px; }
.gd-hrow b { text-align: right; font-variant-numeric: tabular-nums; }
.gd-hrow .er-hbar span { transition: width .35s ease; }
.gd-hrow.ref .er-hbar span { background: repeating-linear-gradient(135deg, #9aa3b2 0 5px, #9aa3b255 5px 10px); }
.gd-hrow.win b { color: var(--ok); }
.gd-hrow.lose b { color: var(--bad); }

/* number inputs grid */
.gd-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.gd-inputs label { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 4px 8px; font-size: 12px; font-weight: 700; padding: 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.gd-inputs label input { grid-column: 1 / -1; width: 100%; font-weight: 700; }

/* donut */
.gd-donut { width: 84px; height: 84px; flex: none; }
.gd-donut text { font: 800 15px var(--font-body); fill: var(--text); }

/* item cards (save this for that) */
.gd-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 12px; }
.gd-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 12px; font-weight: 700; text-align: center; cursor: pointer; min-width: 0; line-height: 1.2; }
.gd-item.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.gd-item.dim { opacity: .35; }
.gd-item-info { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--c, var(--gold)); }
.gd-item-info-h { display: flex; align-items: center; gap: 10px; }
.gd-item-info-h div { display: grid; }
.gd-item-info-h small { color: var(--muted); }

/* week loop */
.gd-weeks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.gd-week { display: grid; gap: 6px; align-content: start; padding: 10px 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); border-top: 4px solid var(--c); min-width: 0; cursor: pointer; text-align: left; font: inherit; color: var(--text); }
.gd-week.sel { box-shadow: 0 0 0 2px var(--c); background: color-mix(in srgb, var(--c) 12%, var(--panel-2)); }
.gd-week b { font: 800 15px var(--font-display); color: var(--c); }
.gd-week-ims { display: flex; gap: 2px; flex-wrap: wrap; }

/* milestone track (TC levels) */
.gd-track { position: relative; height: 70px; margin: 18px 6px 4px; }
.gd-track-line { position: absolute; left: 0; right: 0; top: 28px; height: 8px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.gd-track-line i { display: block; height: 100%; background: var(--ok); transition: width .3s ease; }
.gd-mile { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; color: var(--muted); }
.gd-mile .gd-im { width: 26px; height: 26px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line); padding: 2px; }
.gd-mile.on { color: var(--ok); }
.gd-mile.on .gd-im { border-color: var(--ok); }
.gd-mile span { margin-top: 18px; }

/* chart (svg) */
.gd-chart { width: 100%; max-width: 420px; display: block; margin: 8px auto 0; }
.gd-chart text { font: 700 11px var(--font-body); fill: var(--muted); }
.gd-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 10px; }

/* do / don't */
.gd-dont { border-color: #e06a5f88; background: #e06a5f12; }
.gd-do { border-color: #5fbf8388; background: #5fbf8312; }
.gd-x, .gd-ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; color: #10140f; }
.gd-x { background: var(--bad); }
.gd-ok { background: var(--ok); }

/* stars */
.gd-stars { color: var(--gold-2); letter-spacing: 1px; font-size: 15px; }

/* quiz-free ladder input */
.gd-ladder { display: grid; gap: 6px; margin-top: 12px; }
.gd-rung { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; align-items: center; font-size: 13px; }
.gd-rung input { width: 100%; }
.gd-rung .er-hbar span { transition: width .3s ease; }
.gd-rung.over .er-hbar span { background: var(--bad); }

@media (max-width: 700px) {
  .gd-two { grid-template-columns: minmax(0, 1fr); }
  .gd-hrow { grid-template-columns: 26px minmax(0, 1fr) 70px; }
  .gd-hrow .er-hbar { grid-column: 1 / -1; grid-row: 2; }
  .gd-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gd-vbars { height: 170px; gap: 3px; }
  .gd-vb em { font-size: 10px; }
  .gd-rung { grid-template-columns: 52px minmax(0, 1fr); }
  .gd-rung .er-hbar { grid-column: 1 / -1; }
}
.gd-track.alt { height: 116px; }
.gd-mile.low { top: 66px; }
.gd-mile.low span { margin-top: 0; }
