:root {
  color-scheme: dark;
  --ink: #eee9dd;
  --muted: #a8a292;
  --panel: rgba(18, 24, 23, .86);
  --line: rgba(228, 218, 190, .14);
  /* Accent: forest green, in four weights. Wood tones stay on the rings and the legend;
     the chrome (buttons, borders, focus, links, hero numbers) takes the green. */
  --accent: #6fbf8a;                 /* text, icons, focus borders */
  --accent-line: #4f9a68;            /* active/hover borders */
  --accent-deep: #2b5e3f;            /* active button fill */
  --accent-soft: rgba(111,191,138,.22);
  --accent-ink: #eaf7ee;             /* text on an active fill */
}
* { box-sizing: border-box; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #07100d;
  color: var(--ink);
  font: 14px/1.45 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 72% 18%, rgba(74, 111, 74, .17), transparent 35%),
    linear-gradient(#0b1713 0%, #07100d 62%, #10130d 100%);
}
.page { position: relative; min-height: 100vh; display: grid; grid-template-rows: auto auto 1fr; }
header { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; padding: 24px 28px 14px; }
.eyebrow { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; color: var(--accent); font: 11px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow-links { display: inline-flex; gap: 12px; }
.eyebrow-links a { color: #8f998f; text-decoration: none; letter-spacing: .1em; }
.eyebrow-links a:hover { color: var(--accent-ink); }
h1 { margin: 4px 0 3px; font: 500 clamp(24px, 3vw, 39px)/1.05 Georgia, serif; letter-spacing: -.025em; }
.dek { color: var(--muted); max-width: 680px; margin: 0; }
.dek:empty { display: none; }
/* Breadcrumb trail: Forest › Nvidia › Compare. The last crumb is the page you are on. */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; font-size: 15px; }
.crumb { color: #d8cfb9; text-decoration: none; font-weight: 500; }
.crumb:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.crumb-sep { color: #6f7a6f; }
.crumb-here { color: var(--muted); }
.title-sub { margin: 2px 0 0; color: var(--muted); font: 14px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
/* Toolbar grammar — shared by the Forest and the Tree page.
   A .toolbar is a panel of .tool-rows. Each row is one tier of controls:
   find/browse first, then refine, then how the rings are drawn. The
   .view-cluster (color toggle · legend · How to read · …) is the same
   component on both pages, so a reader learns it once. */
.toolbar { position: sticky; top: 0; z-index: 6; margin: 0 22px 18px; padding: 10px 12px; background: rgba(12,19,16,.95); border: 1px solid var(--line); border-radius: 11px; backdrop-filter: blur(14px); }
.tool-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tool-row + .tool-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tool-label { color: #8f998f; font: 10px ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; margin-right: 3px; }
.view-cluster { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.view-cluster.trailing { margin-left: auto; padding-left: 12px; border-left: 1px solid var(--line); }
.read-key { position: relative; }
.read-key summary { list-style: none; color: #d8d0bf; background: #18241e; border: 1px solid #34443a; border-radius: 7px; padding: 7px 11px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.read-key summary::-webkit-details-marker { display: none; }
.read-key summary::after { content: " ?"; color: #8fb89c; }
.read-key[open] summary { border-color: var(--accent-line); }
.read-key .reading-grid { position: absolute; z-index: 12; right: 0; top: calc(100% + 7px); width: 300px; padding: 14px; border: 1px solid #4a554b; border-radius: 9px; background: rgba(7,13,11,.98); box-shadow: 0 14px 38px rgba(0,0,0,.36); }
button, input { font: inherit; }
button {
  color: var(--ink); background: #18241e; border: 1px solid #34443a; border-radius: 7px; padding: 7px 11px; cursor: pointer;
}
button:hover, button.active { border-color: var(--accent); color: var(--accent-ink); }
/* Toolbar action: a button or a link that looks like one (Full view, Chart, Compare, Download poster). */
.tool-btn { display: inline-block; padding: 7px 11px; border: 1px solid #34443a; border-radius: 7px; background: #18241e; color: var(--ink); text-decoration: none; white-space: nowrap; cursor: pointer; }
.tool-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.tool-btn.active { background: var(--accent-deep); border-color: var(--accent-line); color: var(--accent-ink); }
.tool-btn kbd, .dd kbd { margin-left: 4px; padding: 0 4px; border: 1px solid rgba(228,218,190,.28); border-radius: 3px; color: #a9a294; font: 9px ui-monospace, Menlo, monospace; }
.tool-btn:disabled { opacity: .55; cursor: wait; }
@media (hover: none) { .tool-btn kbd, .dd kbd { display: none; } }
/* Custom dropdowns: a <details> whose summary shows the current value and whose menu is a list of buttons. */
.dd { position: relative; }
.dd summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border: 1px solid #34443a; border-radius: 7px; background: #18241e; color: var(--ink); font-size: 13px; cursor: pointer; white-space: nowrap; }
.dd summary::-webkit-details-marker { display: none; }
.dd summary::after { content: '▾'; color: #8fb89c; font-size: 11px; }
.dd summary .tool-label { margin: 0; }
.dd summary:hover, .dd[open] summary, .dd.set summary { border-color: var(--accent-line); }
.dd.set .dd-value { color: var(--accent-ink); font-weight: 600; }
.dd-menu { position: absolute; z-index: 12; left: 0; top: calc(100% + 6px); min-width: 100%; padding: 6px; border: 1px solid #4a554b; border-radius: 9px; background: rgba(7,13,11,.98); box-shadow: 0 14px 38px rgba(0,0,0,.36); display: grid; gap: 2px; }
.dd-menu button { display: block; width: 100%; text-align: left; padding: 7px 12px; border: 0; border-radius: 6px; background: transparent; color: #d8d0bf; font-size: 13px; white-space: nowrap; }
.dd-menu button:hover { background: rgba(43,94,63,.45); color: var(--accent-ink); }
.dd-menu button.active { background: var(--accent-deep); color: var(--accent-ink); }
/* The tree picker: a dropdown with a search field, grouped by class. */
.tree-pick { min-width: 0; }
.tree-pick summary { max-width: 100%; }
.tree-pick .dd-value { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-pick .dd-value b { font: 600 12px ui-monospace, Menlo, monospace; }
.pick-menu { width: min(400px, calc(100vw - 40px)); padding: 8px; display: block; }
.pick-menu input { width: 100%; margin-bottom: 6px; }
.pick-list { max-height: min(420px, 55vh); overflow: auto; display: grid; gap: 1px; }
.pick-group { padding: 9px 10px 3px; color: #8f897d; font: 10px ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; }
.pick-list button { display: grid; grid-template-columns: 96px minmax(0,1fr) auto; align-items: baseline; gap: 9px; padding: 6px 10px; }
.pick-list button b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 600 11px ui-monospace, Menlo, monospace; }
.pick-list button span { overflow: hidden; text-overflow: ellipsis; }
.pick-list button i { color: #8f897d; font: 10px ui-monospace, Menlo, monospace; font-style: normal; }
.pick-list button:focus-visible { background: rgba(43,94,63,.45); color: var(--accent-ink); outline: none; }
.pick-empty { margin: 8px 10px; color: var(--muted); font-size: 12px; }
.palette-toggle { display: inline-flex; align-items: center; gap: 0; padding: 2px; border: 1px solid #34443a; border-radius: 7px; background: #0d1713; }
.palette-toggle span { padding: 0 7px; color: #8f998f; font: 10px ui-monospace, Menlo, monospace; text-transform: uppercase; }
.palette-toggle button { padding: 4px 8px; border: 0; border-radius: 5px; background: transparent; color: #aaa596; font-size: 11px; }
.palette-toggle button:hover { color: #eee9dd; }
.palette-toggle button.active { background: var(--accent-deep); color: var(--accent-ink); }
.return-legend { width: 300px; --loss: #402618; --loss-near: #7a4a2a; --zero: #a07a4e; --gain-near: #c8a064; --gain: #eecd8a; }
.return-legend[data-palette="market"] { --loss: #8c1e2d; --loss-near: #be5555; --zero: #ad9e7c; --gain-near: #70be98; --gain: #3ac484; }
.legend-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; height: 8px; overflow: hidden; border-radius: 5px; }
.legend-scale i { box-shadow: inset 0 0 0 1px rgba(235,225,204,.10); }
.legend-scale i:nth-child(1) { background: var(--loss); }
.legend-scale i:nth-child(2) { background: var(--loss-near); }
.legend-scale i:nth-child(3) { background: var(--zero); }
.legend-scale i:nth-child(4) { background: var(--gain-near); }
.legend-scale i:nth-child(5) { background: var(--gain); }
.legend-labels { display: grid; grid-template-columns: repeat(5,1fr); gap: 3px; margin-top: 3px; color: #9aa49a; font: 10px/1.1 ui-monospace, Menlo, monospace; text-align: center; text-transform: uppercase; }
.reading-grid { display: grid; gap: 10px; margin: 0; }
.reading-item { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: baseline; color: #9f998b; font-size: 11px; line-height: 1.4; }
.reading-item dt { color: #ddd5c4; font: 600 10px ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: .04em; }
.reading-item dd { margin: 0; }
input[type="search"] { color: var(--ink); background: #0d1713; border: 1px solid #34443a; border-radius: 7px; padding: 8px 10px; }
.tooltip { position: fixed; pointer-events: none; opacity: 0; z-index: 20; max-width: 240px; padding: 9px 11px; border-radius: 7px; background: rgba(5, 9, 8, .94); border: 1px solid #4b574e; color: #ded8ca; font-size: 12px; transition: opacity .1s; }
.tooltip b { color: white; }
/* Site footer: the data credit lives here and beside the data on every page (required by Twelve Data and CoinGecko). */
.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 22px; padding: 18px 2px 28px; border-top: 1px solid var(--line); color: #8f978f; font-size: 13px; }
.site-footer a { color: #9fcfae; }
.site-footer a:hover { color: var(--accent-ink); }
.load-error { margin: 16px 22px; padding: 24px; border: 1px solid rgba(207,110,94,.5); border-radius: 12px; background: rgba(61,24,21,.5); text-align: center; }
.load-error h2 { margin: 0 0 6px; font: 500 22px Georgia,serif; }
.load-error p { margin: 0 0 14px; color: var(--muted); }
@media (max-width: 720px) {
  header { align-items: flex-start; padding: 18px 16px 12px; }
  .toolbar { position: static; backdrop-filter: none; margin-inline: 10px; }
  .view-cluster.trailing { margin-left: 0; padding-left: 0; border-left: 0; }
  .read-key .reading-grid { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; }
  .dd-menu { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; min-width: 0; max-height: 70vh; overflow: auto; }
  .pick-menu { width: auto; }
  .site-footer { margin-inline: 10px; }
}
