/* Supplementary reading aids. Source tables remain the detailed reference. */
.viz-extra { scroll-margin-top:calc(var(--nav-height, 72px) + 20px); }
.viz-class-card { display:grid; grid-template-columns:56px minmax(0,1fr); gap:16px; align-items:start; }
.viz-class-card > img { width:48px; height:48px; padding:6px; background:#211a29; border:1px solid var(--line); border-radius:10px; }
.viz-class-card h4 { margin:0 0 10px; font-size:20px; }
.viz-class-card table { width:100%; font-size:13px; }
.viz-class-card th { width:92px; }
.viz-class-card td,.viz-class-card th { white-space:normal; word-break:keep-all; overflow-wrap:anywhere; }
.viz-class-card > a { grid-column:2; }
.viz-badges { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.viz-badges > span { border:1px solid #54405f; background:#2b2133; border-radius:6px; padding:4px 8px; font-size:12px; color:#ddcde9; }
.viz-growth-chart { display:block; width:100%; max-width:740px; height:auto; margin:14px auto; overflow:visible; }
.viz-growth-chart text { fill:var(--muted); font-size:14px; font-family:inherit; }
.viz-grid-line { stroke:#4b4053; stroke-width:.7; }
.viz-growth-band { fill:#b28bce24; }
.viz-growth-line { fill:none; stroke:#c7a7dd; stroke-width:2.4; stroke-linejoin:round; }
.viz-growth-current { fill:#dec8ed; stroke:#241b2c; stroke-width:2; }
.viz-growth-actual { fill:#8ed0af; stroke:#15231c; stroke-width:2; }
.viz-extra summary { min-height:44px; cursor:pointer; padding:10px 0; color:var(--ink); font-size:14px; }
.viz-hunger-track { position:relative; display:flex; height:24px; margin:20px 0 12px; border-radius:6px; background:#25202c; }
.viz-hunger-track > span { display:grid; place-items:center; font-size:11px; white-space:nowrap; color:#f2ebf6; }
.viz-hunger-track > span:nth-child(1) { background:#845b67; border-radius:6px 0 0 6px; }
.viz-hunger-track > span:nth-child(2) { background:#816c52; }
.viz-hunger-track > span:nth-child(3) { background:#47695c; border-radius:0 6px 6px 0; }
.viz-hunger-pointer { position:absolute; top:-6px; bottom:-6px; width:3px; background:#fff; box-shadow:0 0 0 2px #151019; transform:translateX(-50%); }
.viz-hunger-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.viz-hunger-cards > .is-ready { outline:1px solid #a7d0bb; outline-offset:1px; }
.viz-step-rail { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; list-style:none; padding:0; margin:16px 0; }
.viz-step-rail li { min-width:0; }
.viz-step-rail button { width:100%; height:100%; text-align:left; border:1px solid var(--line); color:var(--muted); background:#211a29; font-size:13px; overflow-wrap:anywhere; word-break:keep-all; }
.viz-step-rail button[aria-pressed=true] { color:#eee1f6; border-color:#b393cc; background:#3a2a46; }
.viz-step-card { display:grid; grid-template-columns:56px minmax(0,1fr); gap:14px; padding:18px; background:#19151f; border:1px solid var(--line); border-radius:10px; margin:14px 0; }
.viz-step-card > div:first-child { grid-column:1/-1; }
.viz-step-card img { width:48px; height:48px; }
.viz-step-card > a { grid-column:1/-1; }
.viz-step-card h4,.viz-step-label { color:var(--muted); font-size:12px; font-weight:600; margin:12px 0 4px; }
.viz-step-description { color:var(--ink); font-size:15px; line-height:1.85; overflow-wrap:anywhere; word-break:keep-all; }
.viz-eyebrow { font-size:12px; color:#c3a7d7; margin:0; }
.viz-reward-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:8px 0; }
.viz-reward-card { border:1px solid var(--line); border-radius:8px; background:#19151f; padding:12px; min-width:0; }
.viz-reward-card > a { display:flex; align-items:center; gap:8px; min-height:44px; color:var(--ink); font-size:13px; }
.viz-reward-card img { width:32px; height:32px; }
.viz-reward-card .viz-check { font-size:12px; }
.viz-compare-link,.viz-more { display:inline-flex; align-items:center; min-height:44px; color:#dbc3eb; font-size:13px; }
.viz-compare-link[aria-disabled=true] { color:var(--muted); }
.viz-route-caption { font-size:13px; line-height:2; color:#cab8d8; word-break:keep-all; }
.viz-mini-metric { margin:9px 0; }
.viz-mini-metric > span { display:block; font-size:11px; color:var(--ink); margin-bottom:4px; }
.viz-metric-track { height:6px; overflow:hidden; background:#32293b; border-radius:3px; }
.viz-metric-track > i { display:block; height:100%; background:#c2a3d6; border-radius:3px; }
.viz-item-metrics { margin:12px 0; }
.viz-item-metrics .fine { font-size:10px; line-height:1.7; }
.viz-place-list { margin-top:12px; padding:12px; border:1px solid var(--line); border-radius:8px; }
.viz-place-list summary { cursor:pointer; min-height:44px; display:flex; align-items:center; font-size:13px; }
.viz-place-buttons { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.viz-place-buttons button { min-width:0; min-height:44px; font-size:12px; white-space:normal; word-break:keep-all; }
.viz-place-row-button { min-height:44px; color:#d5bce8; text-decoration:underline; text-underline-offset:4px; border:0; padding:4px 0; background:transparent; font:inherit; cursor:pointer; }
.viz-place-buttons button[aria-pressed=true],.atlas-dungeons button[aria-pressed=true] { background:#443051; border-color:#c5a2de; color:#f3e7fc; }
.atlas-surface > .viz-place-marker { position:absolute; z-index:8; width:0; height:0; transform:rotate(45deg) scale(calc(var(--atlas-inverse-scale, 1) * 1.4142135623730951)); transform-origin:0 0; pointer-events:none; }
.viz-place-marker > b { position:absolute; left:0; bottom:10px; transform:translateX(-50%); border:1px solid #bba2d2; border-radius:4px; padding:4px 7px; font:600 11px/1.5 var(--sans); color:#f8f2ff; background:#30223eee; white-space:nowrap; }
.viz-related,.is-related { outline:2px solid #b99bce; outline-offset:2px; background-color:#b295cc12; }
tr.is-related { outline-offset:-2px; }
.viz-reading-progress { position:fixed; left:0; right:0; height:2px; z-index:85; pointer-events:none; background:transparent; }
.viz-reading-fill { width:100%; height:100%; background:#bca2cc; transform-origin:left; transform:scaleX(0); }
.viz-reading-current { position:fixed; bottom:12px; left:calc(var(--sidebar-width, 250px) + 30px); z-index:35; max-width:min(360px,65vw); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#d4c4df; font-size:11px; border:1px solid #6a547c88; background:#1c1525ed; padding:6px 10px; border-radius:6px; text-decoration:none; }
.viz-trade-journey { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; list-style:none; padding:0; margin:12px 0 4px; counter-reset:trade-stage; max-width:600px; }
.viz-trade-journey li { counter-increment:trade-stage; font-size:11px; color:var(--muted); padding:6px 4px; border:1px solid var(--line); border-radius:5px; text-align:center; word-break:keep-all; overflow-wrap:anywhere; }
.viz-trade-journey li::before { content:counter(trade-stage) ' '; opacity:.65; }
.viz-trade-journey .is-current { color:#eee0f6; border-color:#bc9dd4; background:#443050; }
.viz-trade-journey .is-recorded { color:#bbd9c9; border-color:#466854; }
.viz-trade-note { font-size:10px; max-width:46em; }
.viz-role-bar { display:flex; overflow:hidden; height:16px; border-radius:5px; background:#29222f; margin:12px 0; }
.viz-role-bar > span { display:block; height:100%; }
.viz-role-0 { background:#a9a0d4; }.viz-role-1 { background:#ce929b; }.viz-role-2 { background:#91c2ac; }.viz-role-3 { background:#c3aa76; }
.viz-role-table { width:100%; font-size:12px; table-layout:fixed; }
.viz-role-table caption { font-size:12px; color:var(--muted); text-align:left; }
.viz-role-table th,.viz-role-table td { text-align:center; padding:8px 4px; }
.viz-role-label-0 { color:#c9c0f4; }.viz-role-label-1 { color:#eeb2bb; }.viz-role-label-2 { color:#b1e2cc; }.viz-role-label-3 { color:#e3ca96; }
.viz-cape-zoom { color:var(--ink); background:#1a151f; border:1px solid #6b547a; border-radius:12px; padding:20px; width:min(520px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; overscroll-behavior:contain; }
.viz-cape-zoom::backdrop { background:#08060dce; }
.viz-cape-zoom h3 { font-size:18px; margin:0 0 12px; overflow-wrap:anywhere; }
.viz-cape-zoom button { min-height:44px; }
.viz-cape-backgrounds { display:flex; flex-wrap:wrap; gap:7px; margin:14px 0; }
.viz-cape-backgrounds button[aria-pressed=true] { border-color:#d0afeb; background:#483155; color:#f2e6fb; }
.viz-cape-stage { display:grid; place-items:center; padding:12px; border:1px solid #63566e; border-radius:6px; }
.viz-cape-stage[data-background=checker] { background-color:#c6becd; background-image:conic-gradient(#91869b 25%,transparent 0 50%,#91869b 0 75%,transparent 0); background-size:20px 20px; }
.viz-cape-stage[data-background=light] { background:#f2eff5; }.viz-cape-stage[data-background=dark] { background:#0a090d; }
.viz-cape-stage img { display:block; width:225px; max-width:100%; height:auto; aspect-ratio:1/2; object-fit:contain; }
@media(max-width:900px) {
  .viz-reading-current { left:12px; bottom:10px; max-width:calc(100vw - 90px); }
}
@media(max-width:600px) {
  .viz-class-card { grid-template-columns:40px minmax(0,1fr); gap:10px; }
  .viz-class-card > img { width:36px; height:36px; }
  .viz-class-card table { font-size:12px; }
  .viz-class-card th { width:65px; }
  .viz-class-card th,.viz-class-card td { padding:8px 6px; }
  .viz-hunger-cards { grid-template-columns:1fr; }
  .viz-step-rail,.viz-reward-grid,.viz-place-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .viz-step-card { padding:12px; grid-template-columns:40px minmax(0,1fr); gap:10px; }
  .viz-step-card img { width:36px; height:36px; }
  .viz-step-description { font-size:14px; }
  .viz-cape-zoom { padding:16px; }
}
@media(prefers-reduced-motion:reduce) { .viz-reading-fill { transition:none; } }
@media print { .viz-reading-progress,.viz-reading-current { display:none; } .viz-extra { break-inside:avoid; } }

.viz-share-tools { margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.viz-share-tools button,.viz-chart-tools button { min-height:44px; font-size:12px; }
.viz-share-tools .viz-note:empty { display:none; }
.viz-share-tools input { width:100%; min-height:44px; }
.viz-chart-tools { margin-top:12px; }
.viz-show-location { min-height:44px; margin:8px 0; }
figure.atlas { scroll-margin-top:calc(var(--nav-height,72px) + 16px); }
.compare-saved { padding:18px; margin:18px 0; border:1px solid var(--line); border-radius:10px; background:#1b1622; }
.compare-saved h3 { font-size:16px; margin:0 0 10px; }
.compare-saved .toolbar { flex-wrap:wrap; }
.compare-saved .toolbar button { font-size:12px; }
.compare-saved label { font-size:12px; }
.viz-reading-mode { padding:14px; margin:18px 0; border:1px solid var(--line); border-radius:9px; background:#1b1622; }
.viz-reading-mode .toolbar { gap:8px; flex-wrap:wrap; margin:0 0 10px; }
.viz-reading-mode button { min-height:44px; padding:8px 12px; border-radius:7px; font-size:13px; }
.viz-reading-mode button[aria-pressed=true] { background:#493255; border-color:#c8a4dd; color:#f4e9fa; }
.viz-reading-mode .viz-note { margin:8px 0 0; }
details.viz-reference { margin:14px 0; border:1px solid var(--line); border-radius:8px; background:#1b1721; }
details.viz-reference > summary { padding:12px 14px; min-height:44px; cursor:pointer; font-size:13px; line-height:1.8; color:#d6c2e4; word-break:keep-all; overflow-wrap:anywhere; }
details.viz-reference > .table-wrap { margin:0; }
.viz-reading-control { position:fixed; bottom:12px; left:calc(var(--sidebar-width,250px) + 30px); z-index:35; max-width:min(520px,calc(100vw - 90px)); display:flex; align-items:center; gap:4px; padding:4px; border:1px solid #6a547c88; border-radius:8px; background:#1c1525f5; }
.viz-reading-control > .viz-reading-current { position:static; display:block; min-width:0; min-height:44px; flex:1; max-width:none; margin:0; border:0; background:transparent; padding:8px; font-size:12px; line-height:28px; }
.viz-reading-control > .viz-reading-toggle,.viz-reading-control > .viz-reading-close { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; min-height:44px; height:44px; min-width:44px; margin:0; padding:0 10px; border:0; border-radius:6px; background:transparent; color:#cbbdd5; font:500 12px/1 var(--sans); letter-spacing:normal; text-align:center; cursor:pointer; }
.viz-reading-control > .viz-reading-close { width:44px; flex-basis:44px; padding:0; }
.viz-reading-close > svg { display:block; flex:none; width:18px; height:18px; pointer-events:none; }
.viz-reading-control > button:focus-visible { outline:2px solid var(--accent,#c7b5df); outline-offset:0; }
@media(hover:hover) { .viz-reading-control > button:hover { background:#33273e; color:#f3edf6; } }
.viz-chart-zoom { width:min(920px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; background:#1b1522; color:var(--ink); border:1px solid #70547d; border-radius:12px; padding:18px; }
.viz-chart-zoom::backdrop { background:#09060edb; }
.viz-chart-zoom h3 { font-size:18px; margin:0 0 12px; }
.viz-chart-zoom button { min-height:44px; }
.viz-chart-scroll { overflow:auto; max-width:100%; border:1px solid var(--line); border-radius:8px; padding:12px; }
.viz-chart-scroll > svg { display:block; width:max(680px,100%); max-width:none; height:auto; margin:0; }
.viz-chart-scroll text { fill:var(--muted); font:15px var(--sans); }
@media(max-width:900px) { .viz-reading-control { left:12px; bottom:10px; } }
@media print {
  .viz-reading-mode,.viz-reading-control,.viz-share-tools,.viz-chart-tools { display:none; }
  details.viz-reference { display:block; }
  details.viz-reference > .table-wrap { display:block!important; }
}
