/* Partsmith Markets — a market workbench in the Partsmith CAD shell.
   App bar + ribbon on top, watchlist left, sheet viewport centre, inspector right,
   status bar laid out like a drawing title block. */
:root {
  --font-ui: 'Barlow', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-tech: 'Barlow Semi Condensed', 'Barlow', 'Arial Narrow', 'Segoe UI', sans-serif;
  --font-dim: 'Barlow Condensed', 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --bg: #e7eaee; --panel: #f5f6f8; --raised: #ffffff; --sunken: #eceef2;
  --ink: #12161c; --ink-2: #3f4856; --ink-3: #5c6573;
  --line: #d6dbe2; --line-2: #c2c9d2;
  --accent: #2f55d4; --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --accent-softer: color-mix(in srgb, var(--accent) 6%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 42%, transparent);
  --accent-text: color-mix(in srgb, var(--accent) 82%, var(--ink));
  --ok: #23885b; --warn: #b07a0c; --danger: #cc3b3b; --datum: #b8721a;
  --vp-a: #dfe4ea; --vp-b: #f5f6f8;
  --grid: rgba(47, 85, 212, 0.07); --grid-2: rgba(47, 85, 212, 0.13);
  --hover: rgba(22, 30, 44, 0.055); --press: rgba(22, 30, 44, 0.1);
  --shadow-1: 0 1px 2px rgba(18, 24, 34, 0.07);
  --shadow-2: 0 10px 30px rgba(18, 24, 34, 0.16), 0 2px 6px rgba(18, 24, 34, 0.08);
  --s1: #2f55d4; --s2: #c8761c; --s3: #1f9a8a;
  --r-s: 4px; --r: 6px; --r-l: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1); --t-fast: 110ms; --t: 170ms;
  --appbar-h: 2.85rem; --ribbon-h: 4.6rem; --status-h: 1.95rem;
  --left-w: 300px; --right-w: 350px;
  color-scheme: light;
}
:root[data-app-theme="dark"] {
  --bg: #111418; --panel: #171b20; --raised: #1f242b; --sunken: #13161a;
  --ink: #eef1f5; --ink-2: #bcc4cf; --ink-3: #98a2b0;
  --line: #262c34; --line-2: #343b45;
  --accent: #5b7cf0;
  --accent-text: color-mix(in srgb, var(--accent) 85%, #ffffff);
  --accent-soft: color-mix(in srgb, var(--accent) 17%, transparent);
  --accent-softer: color-mix(in srgb, var(--accent) 9%, transparent);
  --ok: #46c08a; --warn: #e2ae45; --danger: #f06a6a; --datum: #e8a54e;
  --vp-a: #1b2027; --vp-b: #0e1115;
  --grid: rgba(120, 150, 255, 0.05); --grid-2: rgba(120, 150, 255, 0.1);
  --hover: rgba(220, 230, 255, 0.06); --press: rgba(220, 230, 255, 0.11);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 12px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --s1: #6f8df0; --s2: #c07f2c; --s3: #21998a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: 14px; height: 100%; }
body { margin: 0; height: 100%; overflow: hidden; font-family: var(--font-ui); font-size: 1rem; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: var(--r-s); }
[hidden] { display: none !important; }
svg.ic { width: 1.25rem; height: 1.25rem; flex: none; stroke-width: 1.75; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--ok); } .down { color: var(--danger); } .flat { color: var(--ink-3); }
.scroll { overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

.app { height: 100%; display: grid; grid-template-rows: auto var(--appbar-h) var(--ribbon-h) 1fr var(--status-h); }

/* app bar */
.appbar { display: flex; align-items: center; gap: .5rem; padding: 0 .6rem 0 .75rem; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.brand { display: flex; align-items: center; gap: .5rem; margin-right: .4rem; flex: none; }
.brand-mark { width: 1.65rem; height: 1.65rem; }
.brand-name { font-family: var(--font-tech); font-weight: 600; font-size: 1.15rem; letter-spacing: .01em; }
.menubar { display: flex; gap: .1rem; flex: none; }
.menubar a { padding: .38rem .6rem; border-radius: var(--r-s); color: var(--ink-2); font-size: .98rem; }
.menubar a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.doc-title { flex: 1; display: flex; align-items: center; justify-content: center; gap: .55rem; min-width: 0; }
.doc-name { font-weight: 600; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-state { font-size: .86rem; color: var(--ink-3); white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.save-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.appbar-right { display: flex; align-items: center; gap: .25rem; flex: none; }
.icon-btn { display: inline-grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: var(--r); border: 1px solid transparent; background: transparent; color: var(--ink-2); transition: background var(--t-fast), color var(--t-fast); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: .45rem; height: 2rem; padding: 0 .75rem; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--raised); color: var(--ink); font-weight: 500; white-space: nowrap; box-shadow: var(--shadow-1); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.btn:hover { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-softer), var(--shadow-1); }
.btn.sm { height: 1.75rem; padding: 0 .55rem; font-size: .9rem; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }

/* ribbon */
.ribbon { display: flex; align-items: stretch; padding: 0 .4rem; overflow-x: auto; overflow-y: hidden; background: var(--panel); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.ribbon::-webkit-scrollbar { display: none; }
.rb-group { display: flex; flex-direction: column; padding: .3rem .45rem .2rem; position: relative; flex: none; }
.rb-group + .rb-group::before { content: ''; position: absolute; left: 0; top: .55rem; bottom: .55rem; width: 1px; background: var(--line); }
.rb-items { display: flex; gap: .15rem; flex: 1; align-items: center; }
.rb-label { font-family: var(--font-tech); font-size: .82rem; color: var(--ink-3); text-align: center; padding-top: .1rem; }
.readout { display: flex; flex-direction: column; justify-content: center; min-width: 5.6rem; height: 2.75rem; padding: .2rem .55rem; border-radius: var(--r); border: 1px solid transparent; }
.readout:hover { background: var(--hover); }
.readout .k { font-family: var(--font-tech); font-size: .84rem; color: var(--ink-3); letter-spacing: .02em; }
.readout .v { font-family: var(--font-dim); font-weight: 600; font-size: 1.18rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.readout .d { font-family: var(--font-tech); font-size: .84rem; font-variant-numeric: tabular-nums; }
.readout.sm { min-width: 4.6rem; }
.rb-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .16rem; min-width: 3.3rem; height: 2.75rem; padding: .2rem .4rem; border-radius: var(--r); border: 1px solid transparent; background: transparent; color: var(--ink-2); font-size: .82rem; font-family: var(--font-tech); font-weight: 500; }
.rb-btn:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.rb-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }

/* workspace */
.workspace { display: grid; min-height: 0; grid-template-columns: var(--left-w) 1fr var(--right-w); }
.sidebar { background: var(--panel); min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.sidebar-left { border-right: 1px solid var(--line); }
.sidebar-right { border-left: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: .6rem .75rem .5rem; border-bottom: 1px solid var(--line); font-family: var(--font-tech); font-weight: 600; font-size: .95rem; color: var(--ink-2); flex: none; letter-spacing: .02em; text-transform: uppercase; }
.panel-head span { font-weight: 500; color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.search { position: relative; margin: .6rem .6rem .2rem; flex: none; }
.search input { width: 100%; height: 2.1rem; padding: 0 .6rem 0 2rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--raised); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg.ic { position: absolute; left: .55rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--ink-3); }
.chips { display: flex; gap: .3rem; flex-wrap: wrap; padding: .4rem .6rem .3rem; flex: none; }
.chip { border: 1px solid var(--line); background: var(--raised); border-radius: 999px; padding: .16rem .6rem; font-size: .85rem; color: var(--ink-2); }
.chip:hover { border-color: var(--accent-line); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wl { flex: 1; min-height: 0; padding: .2rem .45rem 1rem; }
.wl-row { display: grid; grid-template-columns: 1fr auto; gap: .1rem .5rem; width: 100%; text-align: left; padding: .45rem .55rem; border-radius: var(--r); border: 1px solid transparent; background: transparent; color: var(--ink); transition: background var(--t-fast), border-color var(--t-fast); }
.wl-row:hover { background: var(--raised); border-color: var(--line); box-shadow: var(--shadow-1); }
.wl-row[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent-line); }
.wl-sym { font-family: var(--font-tech); font-weight: 600; font-size: 1.02rem; display: flex; align-items: center; gap: .35rem; }
.wl-name { color: var(--ink-3); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-px { font-family: var(--font-dim); font-weight: 600; font-size: 1.05rem; text-align: right; font-variant-numeric: tabular-nums; }
.wl-chg { font-family: var(--font-tech); font-size: .86rem; text-align: right; font-variant-numeric: tabular-nums; }
.badge { font-family: var(--font-tech); font-size: .84rem; padding: .02rem .36rem; border-radius: 3px; border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 500; }
.badge.pk { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-softer); }
.badge.stale { border-style: dashed; color: var(--warn); border-color: color-mix(in srgb, var(--warn) 55%, transparent); }

/* viewport / sheet */
.viewport { min-width: 0; min-height: 0; position: relative; background:
  linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 16px 16px,
  linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 16px 16px,
  linear-gradient(var(--grid-2) 1px, transparent 1px) 0 0 / 80px 80px,
  linear-gradient(90deg, var(--grid-2) 1px, transparent 1px) 0 0 / 80px 80px,
  radial-gradient(ellipse at 50% 30%, var(--vp-b), var(--vp-a)); }
.sheet { max-width: 1080px; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; display: flex; flex-direction: column; gap: 1.1rem; }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: .85rem 1rem .7rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.eyebrow { font-family: var(--font-tech); font-size: .84rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
h2 { margin: .1rem 0 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -.005em; }
h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.sub { color: var(--ink-2); font-size: .95rem; }
.card-body { padding: 1rem; }

/* hero session strip */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; padding: 1rem; align-items: center; }
.hero p { margin: .35rem 0 0; color: var(--ink-2); font-size: 1.02rem; max-width: 46rem; }
.hero-num { font-family: var(--font-dim); font-weight: 600; font-size: 2.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.stat { border: 1px solid var(--line); border-radius: var(--r); padding: .5rem .65rem; background: var(--panel); }
.stat .k { font-family: var(--font-tech); font-size: .84rem; color: var(--ink-3); }
.stat .v { font-family: var(--font-dim); font-weight: 600; font-size: 1.3rem; font-variant-numeric: tabular-nums; }

/* picks */
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .9rem; padding: 1rem; }
.pick { position: relative; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raised); padding: .9rem .9rem .8rem; display: flex; flex-direction: column; gap: .6rem; transition: border-color var(--t), box-shadow var(--t), transform var(--t) var(--ease); cursor: pointer; }
.pick:hover { border-color: var(--accent-line); box-shadow: 0 8px 22px rgba(18,24,34,.1), 0 0 0 3px var(--accent-softer); transform: translateY(-2px); }
.pick::before, .pick::after { content: ''; position: absolute; width: 10px; height: 10px; border-color: var(--accent); border-style: solid; opacity: .7; }
.pick::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: var(--r); }
.pick::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: var(--r); }
.pick-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .4rem .5rem; }
.pick-top > :first-child { flex: 1 1 9rem; min-width: 0; }
.pick { min-width: 0; }
.pick-no { font-family: var(--font-dim); font-size: .85rem; color: var(--ink-3); letter-spacing: .06em; }
.pick-sym { font-family: var(--font-tech); font-weight: 600; font-size: 1.6rem; line-height: 1; }
.pick-name { color: var(--ink-2); font-size: .9rem; }
.role { font-family: var(--font-tech); font-size: .82rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 3px; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; }
.pick-px { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.pick-px .px { font-family: var(--font-dim); font-weight: 600; font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.pick-px .meta { font-family: var(--font-tech); font-size: .86rem; color: var(--ink-3); }
.thesis { margin: 0; padding-left: 1.05rem; color: var(--ink); font-size: .95rem; display: flex; flex-direction: column; gap: .3rem; }
.risk { border-top: 1px dashed var(--line-2); padding-top: .55rem; font-size: .9rem; color: var(--ink-2); }
.risk b { color: var(--danger); font-family: var(--font-tech); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; margin-right: .3rem; }
.score { display: grid; grid-template-columns: 6.2rem 1fr 1.6rem; align-items: center; gap: .45rem; font-size: .85rem; }
.score .lbl { font-family: var(--font-tech); color: var(--ink-2); }
.score .bar { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; border: 1px solid var(--line); }
.score .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.score .n { font-family: var(--font-dim); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.srcs { display: flex; flex-wrap: wrap; gap: .25rem .55rem; font-size: .82rem; }
.srcs a { font-family: var(--font-tech); }
.riskpill { font-family: var(--font-tech); font-size: .82rem; font-weight: 600; padding: .1rem .45rem; border-radius: 3px; border: 1px solid; }
.riskpill.high { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.riskpill.mod { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }

/* chart */
.chart-wrap { position: relative; padding: .5rem 1rem 1rem; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .9rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
#chart { width: 100%; height: 280px; display: block; }
#chart text { font-family: var(--font-tech); font-size: 12px; fill: var(--ink-3); }
.tip { position: absolute; pointer-events: none; background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-2); padding: .5rem .65rem; font-size: .88rem; min-width: 11rem; z-index: 5; }
.tip .t { font-family: var(--font-tech); font-weight: 600; margin-bottom: .25rem; }
.tip .row { display: flex; justify-content: space-between; gap: .8rem; font-variant-numeric: tabular-nums; }
.tip .row i { width: 10px; height: 3px; display: inline-block; border-radius: 2px; margin-right: .35rem; vertical-align: middle; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-family: var(--font-tech); font-weight: 600; font-size: .84rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: .5rem .75rem; border-bottom: 1px solid var(--line); background: var(--panel); }
td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.n { text-align: right; font-variant-numeric: tabular-nums; }
.tick { font-family: var(--font-tech); font-weight: 600; }
.lean { font-family: var(--font-tech); font-size: .84rem; font-weight: 600; padding: .08rem .42rem; border-radius: 3px; white-space: nowrap; }
.lean.bull { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.lean.bear { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.lean.split { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.lean.info { color: var(--ink-2); background: var(--sunken); }
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; padding: 1rem; }
.cal-day { border: 1px solid var(--line); border-radius: var(--r); padding: .6rem .7rem; background: var(--panel); }
.cal-day .d { font-family: var(--font-tech); font-weight: 600; color: var(--accent-text); margin-bottom: .3rem; }
.cal-day ul { margin: 0; padding-left: 1rem; font-size: .9rem; color: var(--ink-2); display: flex; flex-direction: column; gap: .2rem; }
.note { font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.note p { margin: 0 0 .6rem; }
.disclaimer { border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 7%, transparent); border-radius: var(--r); padding: .75rem .9rem; font-size: .9rem; color: var(--ink-2); }
.disclaimer b { color: var(--ink); }
.src-list { columns: 2; column-gap: 1.5rem; margin: 0; padding: 1rem 1rem 1rem 2.2rem; font-size: .88rem; }
.src-list li { break-inside: avoid; margin-bottom: .35rem; color: var(--ink-3); }

/* inspector */
.insp { flex: 1; min-height: 0; padding: .9rem .85rem 1.5rem; display: flex; flex-direction: column; gap: .9rem; }
.insp-sym { font-family: var(--font-tech); font-weight: 600; font-size: 1.8rem; line-height: 1; }
.insp-px { font-family: var(--font-dim); font-weight: 600; font-size: 2rem; font-variant-numeric: tabular-nums; line-height: 1.05; }
.prop { border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); }
.prop-h { font-family: var(--font-tech); font-size: .84rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: .45rem .65rem; border-bottom: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: .3rem .6rem; padding: .55rem .65rem; font-size: .92rem; }
.kv .k { color: var(--ink-2); }
.kv .v { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-tech); font-weight: 600; }
.prop p { margin: 0; padding: .55rem .65rem; font-size: .92rem; color: var(--ink-2); }
.live-note { font-size: .85rem; color: var(--ink-3); border-left: 2px solid var(--accent-line); padding-left: .55rem; }

/* status / title block */
.status { display: grid; grid-template-columns: auto auto auto auto minmax(max-content, 1fr) minmax(0, max-content) auto; background: var(--panel); border-top: 1px solid var(--line-2); font-family: var(--font-tech); font-size: .82rem; color: var(--ink-2); }
.tb { display: flex; align-items: center; gap: .4rem; padding: 0 .75rem; border-right: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.tb:last-child { border-right: 0; }
.tb .k { color: var(--ink-3); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.tb .v { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.tb.warn .v { color: var(--warn); }

@media (max-width: 1180px) { :root { --right-w: 290px; --left-w: 240px; } .picks { grid-template-columns: 1fr; } .hero { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  body { overflow: auto; height: auto; }
  .app { height: auto; grid-template-rows: auto auto auto auto auto; }
  .menubar, .save-state { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar-left { order: 2; max-height: 420px; border-right: 0; border-top: 1px solid var(--line); }
  .viewport { order: 1; }
  .sidebar-right { order: 3; border-left: 0; border-top: 1px solid var(--line); }
  .status { grid-template-columns: 1fr 1fr; }
  .tb { padding: .35rem .75rem; border-bottom: 1px solid var(--line); }
  .src-list { columns: 1; }
}

/* live quotes */
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
#liveBtn[aria-pressed="true"] .live-dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { #liveBtn .live-dot { animation: none !important; } }
dialog { border: 1px solid var(--line-2); border-radius: var(--r-l); background: var(--raised); color: var(--ink); box-shadow: var(--shadow-2); padding: 1.1rem 1.2rem; width: min(30rem, 92vw); }
dialog::backdrop { background: rgba(10, 14, 20, 0.45); }
dialog h2 { margin-bottom: .4rem; }
.field { display: flex; flex-direction: column; gap: .3rem; margin: .7rem 0 .4rem; font-family: var(--font-tech); font-size: .85rem; color: var(--ink-2); }
.field input { height: 2.2rem; padding: 0 .6rem; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn-row { display: flex; gap: .45rem; align-items: center; margin-top: .6rem; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--sunken); padding: .05rem .3rem; border-radius: 3px; }

/* theme switch: Light / Dark / System */
.theme-seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--sunken); }
.theme-seg button { display: inline-grid; place-items: center; width: 1.9rem; height: 1.7rem; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink-2); transition: background var(--t-fast), color var(--t-fast); }
.theme-seg button:hover { color: var(--ink); background: var(--hover); }
.theme-seg button[aria-pressed="true"] { background: var(--raised); color: var(--accent-text); box-shadow: var(--shadow-1); }
.theme-seg svg.ic { width: 1.05rem; height: 1.05rem; }

/* my watchlist: + buttons */
.wl-item { position: relative; display: flex; align-items: center; gap: .15rem; }
.wl-item .wl-row { flex: 1; min-width: 0; }
.add-btn { flex: none; display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; padding: 0; border-radius: 999px; border: 1px solid var(--line-2); background: var(--raised); color: var(--ink-2); cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), opacity var(--t-fast); }
.add-btn svg, .add-wide svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.add-btn:hover { border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-softer); }
.add-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wl-add { opacity: .45; }
.wl-item:hover .wl-add, .wl-add:focus-visible, .wl-add[aria-pressed="true"] { opacity: 1; }
@media (hover: none) { .wl-add { opacity: 1; } }
.pick-actions { display: inline-flex; align-items: center; gap: .4rem; }
.insp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; flex-wrap: wrap; }
.add-wide { display: inline-flex; align-items: center; gap: .35rem; }
.add-wide[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip-n { font-family: var(--font-tech); font-size: .78rem; opacity: .8; }
.toast { position: fixed; left: 50%; bottom: 3.2rem; transform: translate(-50%, 12px); background: var(--ink); color: var(--raised); padding: .45rem .9rem; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow-1); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* tips & strategies */
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .8rem; padding: 0 1rem; }
.tipcard { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raised); padding: .9rem; display: flex; flex-direction: column; gap: .45rem; }
.tipcard h3 { margin: 0; font-size: 1.12rem; }
.tipcard p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.tip-kind { font-family: var(--font-tech); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.tip-try { font-size: .92rem; padding: .45rem .6rem; border-radius: var(--r-s); background: var(--accent-softer); border-left: 3px solid var(--accent); }
.tip-foot { padding: .7rem 1rem 1rem; }
/* daily stories */
.stories { list-style: none; margin: 0; padding: 0 1rem 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .1rem 1.2rem; }
.story { padding: .7rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.story-meta { display: flex; gap: .6rem; font-family: var(--font-tech); font-size: .82rem; color: var(--ink-3); }
.story-meta .outlet { color: var(--accent-text); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.story-title { color: var(--ink); font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.story-title:hover { color: var(--accent-text); text-decoration: underline; }
.story p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.45; }

/* welcome screen */
.icon-btn { width: 2rem; justify-content: center; padding: 0; font-family: var(--font-tech); font-weight: 600; font-size: 1.05rem; }
dialog.welcome { width: min(44rem, 94vw); padding: 0; overflow: hidden; }
dialog.welcome[open] { animation: wc-in .22s var(--ease, ease-out); }
@keyframes wc-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.wc-head { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem 1.4rem 1rem; border-bottom: 1px solid var(--line);
  background-image: linear-gradient(var(--accent-softer) 1px, transparent 1px), linear-gradient(90deg, var(--accent-softer) 1px, transparent 1px); background-size: 18px 18px; }
.wc-mark { width: 3rem; height: 3rem; flex: none; color: var(--ink); }
.wc-head h2 { margin: .1rem 0 .3rem; font-family: var(--font-tech); font-size: 1.7rem; }
.wc-lede { margin: 0; color: var(--ink-2); line-height: 1.5; }
.wc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; padding: 1rem 1.4rem .4rem; }
.wc-tile { position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: .15rem .6rem; padding: .8rem .85rem; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raised); color: var(--ink); text-decoration: none; transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.wc-tile:hover { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-softer); transform: translateY(-1px); }
.wc-tile .ic, .wc-tile .wc-plus { grid-row: span 2; width: 1.9rem; height: 1.9rem; padding: .35rem; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-text); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; box-sizing: border-box; }
.wc-plus { display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; padding: 0 !important; }
.wc-tile b { font-family: var(--font-tech); font-weight: 600; font-size: 1.02rem; }
.wc-tile span:not(.wc-plus) { color: var(--ink-2); font-size: .9rem; line-height: 1.4; }
.wc-fine { margin: .5rem 1.4rem 0; font-size: .86rem; color: var(--ink-3); }
dialog.welcome .btn-row { padding: .7rem 1.4rem 1.1rem; margin: 0; flex-wrap: wrap; }
.wc-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--ink-2); cursor: pointer; }
.sidebar-left.flash { animation: wl-flash 1.6s ease-out; }
@keyframes wl-flash { 0%, 40% { box-shadow: inset 0 0 0 2px var(--accent); } 100% { box-shadow: inset 0 0 0 2px transparent; } }
@media (max-width: 560px) { .wc-grid { grid-template-columns: 1fr; } .wc-head { padding: 1rem; } .wc-mark { display: none; } }
@media (prefers-reduced-motion: reduce) { dialog.welcome[open], .sidebar-left.flash { animation: none; } }

/* command center */
.cmd-btn .ic { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.cmd-btn kbd { font-family: var(--font-tech); font-size: .74rem; padding: 0 .3rem; border: 1px solid var(--line-2); border-radius: 3px; color: var(--ink-3); }
@media (max-width: 900px) { .cmd-btn span, .cmd-btn kbd { display: none; } }
dialog.cmd { width: min(42rem, 94vw); padding: 0; overflow: hidden; margin-top: 8vh; display: none; flex-direction: column; max-height: 80vh; }
dialog.cmd[open] { display: flex; animation: wc-in .18s ease-out; }
.cmd-head { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.cmd-head > .ic { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; flex: none; }
.cmd-head .note { font-size: .85rem; }
.ai-on { color: var(--ok); font-weight: 600; }
.ai-panel { padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: var(--accent-softer); }
.ai-panel .note { margin: 0 0 .5rem; font-size: .86rem; }
.cmd-log { flex: 1; min-height: 9rem; max-height: 46vh; overflow-y: auto; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .45rem; }
.cmd-line { max-width: 92%; padding: .45rem .7rem; border-radius: var(--r); line-height: 1.45; font-size: .95rem; }
.cmd-line.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); font-family: var(--font-tech); }
.cmd-line.ai { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.cmd-line.act { align-self: flex-start; background: var(--accent-softer); border: 1px solid var(--accent-line); }
.cmd-line.sys { align-self: flex-start; color: var(--ink-2); font-size: .88rem; padding-left: 0; }
.cmd-line.err { align-self: flex-start; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }
.cmd-ok { color: var(--ok); font-weight: 700; }
.cmd-form { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.cmd-prompt { font-family: var(--font-tech); font-weight: 700; color: var(--accent); font-size: 1.2rem; }
.cmd-form input { flex: 1; min-width: 0; height: 2.3rem; padding: 0 .7rem; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); color: var(--ink); font: inherit; }
.cmd-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cmd-suggest { padding: 0 1rem .8rem; }
dialog.cmd.busy .cmd-log::after { content: 'Thinking…'; align-self: flex-start; color: var(--ink-3); font-size: .88rem; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .35; } }

/* full-screen welcome (overrides the earlier modal sizing) */
dialog.welcome { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; padding: 0; box-shadow: none; background: var(--bg); }
dialog.welcome[open] { display: flex; flex-direction: column; animation: wc-fade .25s ease-out; }
@keyframes wc-fade { from { opacity: 0; } }
dialog.welcome::backdrop { background: var(--bg); }
.wc-top { display: flex; align-items: center; gap: .75rem; padding: .7rem clamp(1rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line); background: var(--panel, var(--raised)); }
.wc-auth { display: flex; align-items: center; gap: .5rem; }
.wc-user { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; }
.wc-main { flex: 1; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 6vw, 5rem);
  background-image: linear-gradient(var(--accent-softer) 1px, transparent 1px), linear-gradient(90deg, var(--accent-softer) 1px, transparent 1px); background-size: 24px 24px; }
.wc-hero h1 { font-family: var(--font-tech); font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.05; margin: .4rem 0 .8rem; letter-spacing: -.01em; }
.wc-hero .wc-lede { font-size: clamp(1rem, 1.4vw, 1.18rem); max-width: 34rem; }
.wc-cta { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.btn.lg { height: 2.75rem; padding: 0 1.2rem; font-size: 1.05rem; }
dialog.welcome .wc-grid { padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wc-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; padding: .75rem clamp(1rem, 4vw, 2.5rem); border-top: 1px solid var(--line); background: var(--panel, var(--raised)); }
.wc-bottom .wc-fine { margin: 0; }
.avatar { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-tech); font-weight: 600; font-size: .85rem; flex: none; }
.avatar.sm { width: 1.35rem; height: 1.35rem; font-size: .7rem; }
@media (max-width: 860px) { .wc-main { grid-template-columns: 1fr; align-items: start; } }
@media (max-width: 520px) { dialog.welcome .wc-grid { grid-template-columns: 1fr; } .wc-top .brand-name { display: none; } }

/* account menu */
.acct { position: relative; }
#acctBtn .avatar { margin-left: -.3rem; }
.acct-menu { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 30; width: 17rem; padding: .8rem; display: flex; flex-direction: column; gap: .7rem; background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r-l); box-shadow: var(--shadow-2); }
.acct-menu[hidden] { display: none; }
.acct-who { display: flex; gap: .6rem; align-items: center; }
.acct-who .note { font-size: .82rem; word-break: break-all; }
@media (max-width: 900px) { .acct-label { display: none; } }

/* log in / sign up */
dialog.auth { width: min(25rem, 94vw); }
.auth-tabs { display: flex; gap: .3rem; align-items: center; margin-bottom: .6rem; }
.auth-tabs [role=tab] { border: 0; background: none; padding: .3rem .2rem; margin-right: .6rem; font-family: var(--font-tech); font-weight: 600; font-size: 1rem; color: var(--ink-3); border-bottom: 2px solid transparent; cursor: pointer; }
.auth-tabs [aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.btn.google { width: 100%; justify-content: center; height: 2.5rem; margin-top: .4rem; }
.btn.google svg { width: 18px; height: 18px; }
.auth-or { display: flex; align-items: center; gap: .6rem; margin: .9rem 0 .1rem; color: var(--ink-3); font-size: .85rem; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
dialog.auth .field input { font-family: var(--font-ui); color: var(--ink); }
.auth-err { min-height: 1.2em; margin: .3rem 0 0; color: var(--danger); font-size: .9rem; }
.auth-err.info { color: var(--ink-2); }
.auth-fine { margin: .8rem 0 0; font-size: .8rem; }

/* sign-up next to log in; welcome hint beside the buttons */
.acct { display: flex; align-items: center; gap: .35rem; }
#acctSignup[hidden] { display: none; }
.wc-hint { margin-right: .4rem; font-size: .9rem; }
@media (max-width: 700px) { .wc-hint { display: none; } }
@media (max-width: 520px) { #acctSignup { display: none; } }

/* welcome: interactive black-hole background */
dialog.welcome { position: fixed; inset: 0; }
.wc-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
dialog.welcome > :not(.wc-bg) { position: relative; z-index: 1; }
dialog.welcome .wc-main { background: none; }
.wc-hero { border-radius: 2rem; background: color-mix(in srgb, var(--bg) 78%, transparent); box-shadow: 0 0 56px 40px color-mix(in srgb, var(--bg) 78%, transparent); }

/* hide / bring back the welcome orb */
dialog.welcome.orb-hover { cursor: pointer; }
dialog.welcome > .wc-orb-btn { position: absolute; top: 6.5rem; right: clamp(1rem, 4vw, 2.5rem); z-index: 2; animation: wc-fade .3s ease-out; }
.wc-orb-btn[hidden] { display: none; }
.wc-orb-dot { width: .8rem; height: .8rem; border-radius: 999px; background: #000; box-shadow: 0 0 0 1.5px #ffe2b8, 0 0 8px 2px var(--accent); }

/* quote of the day strip + Home button */
.quotebar { display: flex; align-items: baseline; justify-content: center; gap: .6rem; min-height: 1.9rem; padding: .3rem 1rem; background: var(--accent); color: var(--accent-ink); font-size: .92rem; line-height: 1.35; text-align: center; overflow: hidden; }
.quotebar:empty { visibility: hidden; }   /* keep its height so nothing jumps when the quote loads */
.qb-label { font-family: var(--font-tech); font-weight: 600; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; white-space: nowrap; }
.qb-text { font-style: italic; }
.qb-who { font-family: var(--font-tech); font-weight: 600; white-space: nowrap; }
@media (max-width: 700px) { .quotebar { flex-wrap: wrap; } .qb-label { display: none; } }
.brand-home { color: inherit; text-decoration: none; border-radius: var(--r); }
.brand-home:hover .brand-name { color: var(--accent-text); }
.home-btn .ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 900px) { .home-btn span { display: none; } }
/* quote strip: larger, upright, easier to read */
.quotebar { min-height: 2.4rem; padding: .45rem 1.2rem; font-size: 1.06rem; line-height: 1.45; gap: .75rem; align-items: center; }
.qb-text { font-family: var(--font-ui); font-style: normal; font-weight: 500; letter-spacing: .005em; }
.qb-text::before, .qb-text::after { opacity: .75; }
.qb-who { font-family: var(--font-ui); font-weight: 600; font-size: .98rem; opacity: .92; }
.qb-label { font-size: .78rem; padding: .12rem .45rem; border: 1px solid color-mix(in srgb, var(--accent-ink) 45%, transparent); border-radius: 3px; opacity: .9; }
@media (max-width: 700px) { .quotebar { font-size: .98rem; padding: .5rem .9rem; } }
[data-app-theme="dark"] .quotebar { background: color-mix(in srgb, var(--accent) 52%, #0b1020); color: #fff; }
[data-app-theme="dark"] .qb-label { border-color: rgba(255,255,255,.4); }
#acctSignOutTop[hidden] { display: none; }
@media (max-width: 520px) { #acctSignOutTop { display: none; } }

/* custom cursor (set by assets/cursor.js; "Classic" removes data-cursor) */
html[data-cursor], html[data-cursor] * { cursor: var(--cur); }
html[data-cursor] :is(a, button:not(:disabled), [role=tab], label, select, summary, .chip, .wl-row, .pick, .wc-tile, .rb-btn, .cur-swatch, .cur-opt),
html[data-cursor] dialog.welcome.orb-hover { cursor: var(--cur-pointer); }
html[data-cursor] :is(input:not([type=checkbox]):not([type=radio]), textarea, [contenteditable]) { cursor: text; }
html[data-cursor] :is(button:disabled, [aria-disabled=true]) { cursor: not-allowed; }

/* Cursor bar */
.cursor-slot { position: relative; }
.cur-btn svg { flex: none; }
.cur-bar { position: absolute; right: 0; top: calc(100% + .45rem); z-index: 40; width: 23rem; max-width: 92vw; padding: .75rem; display: flex; flex-direction: column; gap: .65rem; background: var(--raised); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-l); box-shadow: var(--shadow-2); animation: wc-fade .15s ease-out; }
.cur-bar[hidden] { display: none; }
.cur-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.cur-lbl { width: 3.2rem; flex: none; font-family: var(--font-tech); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cur-opt { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .4rem .45rem .3rem; min-width: 4.1rem; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel, var(--bg)); color: var(--ink-2); font-size: .78rem; font-family: var(--font-tech); }
.cur-opt svg { width: 26px; height: 26px; }
.cur-opt:hover { border-color: var(--accent-line); }
.cur-opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--ink); }
.cur-swatch { width: 1.6rem; height: 1.6rem; border-radius: 999px; border: 2px solid var(--raised); background: var(--sw); box-shadow: 0 0 0 1px var(--line-2); padding: 0; }
.cur-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent), 0 0 10px var(--sw); }
.cur-swatch:disabled, .cur-bar .chip:disabled { opacity: .35; }
@media (hover: none) { .cursor-slot { display: none; } }
@media (max-width: 900px) { .cur-btn span { display: none; } }
dialog.welcome > .wc-top { z-index: 3; }
.cur-bar { width: 26.5rem; }
.cur-lbl { width: 4.6rem; }
.cur-swatch.auto { background: linear-gradient(135deg, #0a0a0a 50%, #f5f5f5 50%); }
.cur-bar { width: 25rem; }
.ai-keys { margin: 0 0 .5rem; padding-left: 1.1rem; font-size: .86rem; }
.ai-keys li { margin: .15rem 0; }
.ai-keys code { font-size: .82rem; }

/* ===== guided tour: futuristic HUD ===== */
dialog.tour { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; box-shadow: none; color: #e6f6ff; }
dialog.tour::backdrop { background: transparent; }
.tour-spot { position: absolute; border-radius: 10px; pointer-events: none; transition: left .38s cubic-bezier(.2,.8,.2,1), top .38s cubic-bezier(.2,.8,.2,1), width .38s cubic-bezier(.2,.8,.2,1), height .38s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 0 9999px rgba(3, 7, 18, .74), 0 0 0 1.5px #22d3ee, 0 0 26px 3px rgba(34, 211, 238, .5), inset 0 0 18px rgba(34, 211, 238, .25); animation: tour-pulse 2.2s ease-in-out infinite; }
.tour-spot.none { box-shadow: 0 0 0 9999px rgba(3, 7, 18, .8); animation: none; }
.tour-spot i { position: absolute; width: 14px; height: 14px; border: 2px solid #67e8f9; }
.tour-spot.none i { display: none; }
.tour-spot i:nth-child(1) { left: -6px; top: -6px; border-right: 0; border-bottom: 0; }
.tour-spot i:nth-child(2) { right: -6px; top: -6px; border-left: 0; border-bottom: 0; }
.tour-spot i:nth-child(3) { left: -6px; bottom: -6px; border-right: 0; border-top: 0; }
.tour-spot i:nth-child(4) { right: -6px; bottom: -6px; border-left: 0; border-top: 0; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 9999px rgba(3, 7, 18, .74), 0 0 0 1.5px #67e8f9, 0 0 38px 6px rgba(34, 211, 238, .62), inset 0 0 22px rgba(34, 211, 238, .32); } }
.tour-card { position: absolute; width: min(23rem, calc(100vw - 24px)); padding: 1rem 1.1rem .9rem; color: #e6f6ff;
  background: linear-gradient(160deg, rgba(10, 18, 38, .96), rgba(6, 10, 24, .96)); border: 1px solid rgba(34, 211, 238, .55);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .15) inset, 0 18px 50px rgba(0, 0, 0, .55); transition: left .38s cubic-bezier(.2,.8,.2,1), top .38s cubic-bezier(.2,.8,.2,1); }
.tour-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(transparent 0 2px, rgba(34, 211, 238, .045) 2px 3px); }
.tour-card::before { content: ''; position: absolute; right: 0; top: 0; width: 26px; height: 2px; background: #22d3ee; transform: translate(4px, 8px) rotate(45deg); box-shadow: 0 0 8px #22d3ee; }
.tour-meta { display: flex; justify-content: space-between; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; letter-spacing: .14em; color: #67e8f9; text-transform: uppercase; }
.tour-card h3 { margin: .45rem 0 .35rem; font-family: var(--font-tech); font-size: 1.32rem; line-height: 1.15; color: #fff; text-shadow: 0 0 14px rgba(34, 211, 238, .55); min-height: 1.5rem; }
.tour-card p { margin: 0; color: #c3d6e8; font-size: .96rem; line-height: 1.5; }
.tour-progress { display: flex; gap: 3px; margin: .85rem 0 .75rem; }
.tour-progress i { flex: 1; height: 3px; background: rgba(103, 232, 249, .16); }
.tour-progress i.done { background: rgba(34, 211, 238, .55); }
.tour-progress i.on { background: #22d3ee; box-shadow: 0 0 8px #22d3ee; }
.tour-btns { position: relative; z-index: 1; display: flex; align-items: center; gap: .45rem; }
.tour-btn { font-family: var(--font-tech); font-weight: 600; font-size: .9rem; letter-spacing: .04em; height: 2.1rem; padding: 0 .85rem; color: #a5f3fc; background: rgba(34, 211, 238, .06); border: 1px solid rgba(34, 211, 238, .45); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); transition: background .15s, color .15s, box-shadow .15s; }
.tour-btn:hover:not(:disabled) { background: rgba(34, 211, 238, .16); color: #fff; }
.tour-btn.primary { background: #22d3ee; color: #031018; border-color: #22d3ee; }
.tour-btn.primary:hover { background: #67e8f9; color: #031018; box-shadow: 0 0 16px rgba(34, 211, 238, .6); }
.tour-btn.ghost { border-color: transparent; background: none; color: #7dd3fc; padding: 0 .3rem; text-decoration: underline; text-underline-offset: 3px; }
.tour-btn:disabled { opacity: .35; }
.tour-btn:focus-visible { outline: 2px solid #67e8f9; outline-offset: 2px; }
.tour-btn[hidden] { display: none; }
.tour-launch span { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; animation: none; } }
@media (max-width: 1500px) { .appbar .doc-title { display: none; } }
/* tour: easier-to-read text */
.tour-card { width: min(26rem, calc(100vw - 24px)); padding: 1.15rem 1.25rem 1rem; background: linear-gradient(160deg, rgba(10, 18, 38, .985), rgba(6, 10, 24, .985)); }
.tour-card::after { background: repeating-linear-gradient(transparent 0 3px, rgba(34, 211, 238, .025) 3px 4px); z-index: 0; }
.tour-card > * { position: relative; z-index: 1; }
.tour-meta { font-size: .78rem; letter-spacing: .12em; color: #7ee7f7; }
.tour-card h3 { font-family: var(--font-ui); font-weight: 700; font-size: 1.4rem; line-height: 1.25; letter-spacing: -.005em; margin: .55rem 0 .45rem; text-shadow: 0 0 10px rgba(34, 211, 238, .28); }
.tour-card p { font-family: var(--font-ui); font-size: 1.06rem; line-height: 1.62; color: #edf4fb; font-weight: 400; }
.tour-btn { font-size: .98rem; height: 2.3rem; }
.tour-btn.ghost { font-size: .95rem; color: #9fe5f5; }
/* tour text in fixed sizes (the site's root font is 14px) */
.tour-card { width: min(410px, calc(100vw - 24px)); padding: 18px 20px 16px; }
.tour-meta { font-size: 12px; }
.tour-card h3 { font-size: 23px; }
.tour-card p { font-size: 17px; line-height: 1.6; }
.tour-btn { font-size: 15px; height: 36px; padding: 0 14px; }
.tour-btn.ghost { font-size: 15px; }
.tour-progress { margin: 14px 0 12px; }

/* tour finish: Vercel-style triangle rising from the bottom */
.tour-outro { position: absolute; inset: 0; pointer-events: none; display: none; overflow: hidden; }
dialog.tour.outro .tour-outro { display: block; }
dialog.tour.outro .tour-card { animation: tour-card-out .35s ease-in forwards; }
dialog.tour.outro .tour-spot { transition: none; animation: tour-dim-out 1.25s ease-in .25s forwards; }
.tour-tri { position: absolute; left: 50%; bottom: 0; width: min(46vmin, 360px); aspect-ratio: 1 / .866;
  background: #0a0a0a; clip-path: polygon(50% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 0 22px rgba(34, 211, 238, .55));
  transform: translate(-50%, 110%) scale(.7); opacity: 0; }
[data-app-theme="dark"] .tour-tri { background: #f5f5f5; }
.tour-tri::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(34, 211, 238, .55), transparent 55%); clip-path: inherit; }
dialog.tour.outro .tour-tri { animation: tour-rise 1.35s cubic-bezier(.55, 0, .2, 1) forwards; }
@keyframes tour-rise {
  0%   { transform: translate(-50%, 110%) scale(.7); opacity: 0; }
  15%  { opacity: 1; }
  45%  { transform: translate(-50%, calc(-50vh + 50%)) scale(1); opacity: 1; }
  62%  { transform: translate(-50%, calc(-50vh + 50%)) scale(1.06); opacity: 1; }
  100% { transform: translate(-50%, calc(-100vh - 20%)) scale(1.5); opacity: 0; }
}
@keyframes tour-card-out { to { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes tour-dim-out { to { box-shadow: 0 0 0 9999px rgba(3, 7, 18, 0); } }
/* glow sits on the wrapper; the shape itself is the clipped ::before */
.tour-tri { background: none !important; clip-path: none; filter: drop-shadow(0 0 24px rgba(34, 211, 238, .6)) drop-shadow(0 0 4px rgba(34, 211, 238, .8)); }
.tour-tri::before { content: ''; position: absolute; inset: 0; background: #0a0a0a; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
[data-app-theme="dark"] .tour-tri::before { background: #f5f5f5; }
.tour-tri::after { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
/* longer, darker finish / skip transition */
dialog.tour.outro .tour-spot, dialog.tour.outro .tour-spot.none { animation: tour-dim-long 2.9s ease-in-out forwards; }
@keyframes tour-dim-long {
  0%   { box-shadow: 0 0 0 9999px rgba(2, 4, 10, .74); }
  14%  { box-shadow: 0 0 0 9999px rgba(2, 4, 10, .95); }
  78%  { box-shadow: 0 0 0 9999px rgba(2, 4, 10, .95); }
  100% { box-shadow: 0 0 0 9999px rgba(2, 4, 10, 0); }
}
dialog.tour.outro .tour-tri { animation: tour-rise-long 2.8s cubic-bezier(.45, 0, .2, 1) forwards; }
@keyframes tour-rise-long {
  0%   { transform: translate(-50%, 110%) scale(.7); opacity: 0; }
  10%  { opacity: 1; }
  32%  { transform: translate(-50%, calc(-50vh + 50%)) scale(1); opacity: 1; }
  72%  { transform: translate(-50%, calc(-50vh + 50%)) scale(1.08); opacity: 1; }
  100% { transform: translate(-50%, calc(-100vh - 20%)) scale(1.5); opacity: 0; }
}
.tour-tri { filter: drop-shadow(0 0 30px rgba(8, 145, 178, .5)) drop-shadow(0 0 3px rgba(34, 211, 238, .55)); }
.tour-tri::after { background: linear-gradient(to top, rgba(14, 116, 144, .5), transparent 55%); }

/* brief highlight on the status bar when new data arrives */
.status.just-updated { animation: data-flash 1.6s ease-out; }
@keyframes data-flash { 0%, 30% { box-shadow: inset 0 2px 0 var(--accent), 0 -6px 18px -6px var(--accent); } 100% { box-shadow: none; } }
/* fade the cursor bar in only when it opens, not on every change */
.cur-bar { animation: none; }
.cursor-slot.opening .cur-bar { animation: wc-fade .15s ease-out; }
.cur-bar { width: 28rem; }

/* ===== smoothness & refinements ===== */
/* reserve space up front so the page doesn't jump while it loads */
.quotebar { min-height: 2.4rem; box-sizing: border-box; }
.ribbon { min-height: var(--ribbon-h); }
.sheet:empty { min-height: 60vh; }
/* gentle scrolling for section jumps, contained so the page itself never rubber-bands */
.scroll, .viewport { scroll-behavior: smooth; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.scroll::-webkit-scrollbar, .viewport::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll::-webkit-scrollbar-thumb, .viewport::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.scroll::-webkit-scrollbar-track, .viewport::-webkit-scrollbar-track { background: transparent; }
/* theme changes fade instead of flashing */
body, .appbar, .ribbon, .sidebar, .card, .pick, .status, .btn, .chip, .wl-row, .readout, .tipcard, .quotebar { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
/* market bar: the Jump-to buttons repeat the menu above, so they step aside on narrower screens */
@media (max-width: 1500px) { .ribbon .rb-group:last-child { display: none; } }
.ribbon { overflow-x: auto; scrollbar-width: none; }
.ribbon::-webkit-scrollbar { display: none; }
/* picks: a lone third card spans the row instead of leaving a gap */
.picks > .pick:last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; }
@media (min-width: 1700px) { .picks > .pick:last-child:nth-child(odd):not(:first-child) { grid-column: auto; } }
.asof { display: block; margin-top: .2rem; font-size: .82rem; color: var(--ink-3); }
/* first load: cards ease up in sequence */
.sheet.intro > .card { animation: card-in .45s cubic-bezier(.2,.8,.2,1) both; }
.sheet.intro > .card:nth-child(2) { animation-delay: .06s; } .sheet.intro > .card:nth-child(3) { animation-delay: .12s; }
.sheet.intro > .card:nth-child(4) { animation-delay: .18s; } .sheet.intro > .card:nth-child(n+5) { animation-delay: .24s; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } }
/* price ticks */
.wl-px.tick-up { animation: tick-up 1.4s ease-out; }
.wl-px.tick-down { animation: tick-down 1.4s ease-out; }
@keyframes tick-up { 0%, 25% { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); } 100% { background: transparent; } }
@keyframes tick-down { 0%, 25% { color: var(--danger); background: color-mix(in srgb, var(--danger) 16%, transparent); } 100% { background: transparent; } }
.wl-px { border-radius: 4px; padding: 0 .2rem; margin-right: -.2rem; }
/* softer, consistent hover feedback */
.btn, .chip, .wl-row, .rb-btn, .add-btn { transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .12s ease; }
.btn:active, .chip:active, .add-btn:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .scroll, .viewport { scroll-behavior: auto; }
  .sheet.intro > .card, .wl-px.tick-up, .wl-px.tick-down { animation: none; }
  .btn:active, .chip:active, .add-btn:active { transform: none; }
}

/* index chart: plain-English explainer + legend with levels */
.chart-explain { margin: .2rem 0 .6rem; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.chart-explain .up { color: var(--ok); font-weight: 600; } .chart-explain .down { color: var(--danger); font-weight: 600; }
.chart-building { margin: 0 0 .6rem; padding: .4rem .65rem; border-radius: var(--r); background: var(--accent-softer); border: 1px dashed var(--accent-line); color: var(--ink-2); font-size: .88rem; }
.legend { gap: .4rem 1.4rem; margin-bottom: .2rem; }
.legend b { font-weight: 600; color: var(--ink); }
.legend .lv { font-family: var(--font-dim); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.legend .up, .legend .down, .legend .flat { font-family: var(--font-tech); font-weight: 600; font-variant-numeric: tabular-nums; }
#chart { height: 300px; }

/* top bar fits any width: the section menu gives way first, then labels shrink to icons */
.appbar { min-width: 0; }
.appbar > .brand, .appbar > .home-btn, .appbar-right { flex: none; }
.menubar { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.menubar::-webkit-scrollbar { display: none; }
@media (max-width: 1360px) { .cmd-btn kbd { display: none; } }
@media (max-width: 1240px) { .cur-btn span, .home-btn span { display: none; } }
@media (max-width: 1120px) { .appbar .brand-name { display: none; } #liveBtn { font-size: 0; gap: 0; } #liveBtn .live-dot { margin: 0; } #liveBtn::after { content: 'Live'; font-size: .9rem; margin-left: .35rem; } }
@media (max-width: 1000px) { .cmd-btn span { display: none; } .acct-label { display: none; } }
/* phones and small tablets: the bar wraps onto two rows instead of running off the screen */
@media (max-width: 900px) {
  .appbar { flex-wrap: wrap; height: auto; row-gap: .35rem; padding-top: .35rem; padding-bottom: .35rem; }
  .menubar { order: 3; flex-basis: 100%; display: flex; }
  .appbar-right { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; row-gap: .35rem; }
  .app { grid-template-rows: auto auto auto auto auto; }
}

/* Home screen eases away into the website */
dialog.welcome.leaving { animation: wc-leave .38s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes wc-leave { to { opacity: 0; transform: scale(1.025); filter: blur(2px); } }

/* login splash: glowing black Vercel-style triangle */
dialog.splash { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  display: none; place-items: center; align-content: center; gap: 1.6rem; color: #e8f6ff;
  background: radial-gradient(60% 55% at 50% 45%, #0c1730 0%, #050811 62%, #020306 100%); }
dialog.splash[open] { display: grid; animation: splash-in .35s ease-out; }
dialog.splash::backdrop { background: transparent; }
dialog.splash.out { animation: splash-out .55s ease-in forwards; }
.splash-tri { position: relative; width: min(30vmin, 220px); aspect-ratio: 1 / .866; animation: tri-in .7s cubic-bezier(.2, .9, .25, 1.15) both, tri-glow 1.6s ease-in-out .5s infinite alternate;
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, .75)) drop-shadow(0 0 46px rgba(91, 124, 240, .5)); }
.splash-tri::before { content: ''; position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(160deg, #e9fbff 0%, #22d3ee 45%, #5b7cf0 100%); }   /* the glowing rim */
.splash-tri i { position: absolute; inset: 3.2% 3.6% 2% 3.6%; clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #11141b 0%, #000 70%); }                    /* the black triangle */
.splash-text { font-family: var(--font-tech); font-weight: 600; font-size: clamp(1.2rem, 2.6vw, 1.7rem); letter-spacing: .04em;
  text-shadow: 0 0 14px rgba(34, 211, 238, .45); animation: splash-text .6s ease-out .35s both; }
@keyframes splash-in { from { opacity: 0; } }
@keyframes splash-out { to { opacity: 0; transform: scale(1.04); } }
@keyframes tri-in { from { opacity: 0; transform: translateY(18px) scale(.7); } }
@keyframes tri-glow { to { filter: drop-shadow(0 0 22px rgba(34, 211, 238, .95)) drop-shadow(0 0 70px rgba(91, 124, 240, .7)); } }
@keyframes splash-text { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { dialog.splash[open], dialog.splash.out, .splash-tri, .splash-text, dialog.welcome.leaving { animation: none; } }
dialog.splash[open] { animation: none; }   /* cover the screen instantly so the Home screen never peeks through */
dialog.splash[open].out { animation: splash-out .55s ease-in forwards; }
@media (prefers-reduced-motion: reduce) { dialog.splash[open].out { animation: none; } }

/* market movers */
.movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: .9rem; padding: 1rem; }
.mv-col h3 { font-family: var(--font-tech); font-size: .84rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 .4rem; }
.mover { display: grid; grid-template-columns: 4.2rem 1fr auto; grid-template-rows: auto auto; gap: 0 .6rem; width: 100%; text-align: left; padding: .45rem .55rem; border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--ink); transition: background var(--t-fast), border-color var(--t-fast); }
.mover:hover { background: var(--hover); border-color: var(--line); }
.mover + .mover { border-top-color: var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
.mv-sym { font-family: var(--font-tech); font-weight: 600; font-size: 1.02rem; grid-row: 1 / 3; align-self: center; }
.mv-name { color: var(--ink-2); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mv-val { font-family: var(--font-dim); font-weight: 600; font-size: 1.1rem; text-align: right; font-variant-numeric: tabular-nums; }
.mv-chg { grid-column: 2 / 4; font-family: var(--font-tech); font-size: .86rem; text-align: right; font-variant-numeric: tabular-nums; }

/* growth charts ---------------------------------------------------------- */
.chart-btn { flex: none; display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; padding: 0; border-radius: 999px; border: 1px solid var(--accent-line); background: var(--accent-softer); color: var(--accent-text); cursor: pointer; transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.chart-btn svg, .g-open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart-btn:hover { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-softer); transform: translateY(-1px); }
.g-open { width: 100%; justify-content: center; height: 2.4rem; font-weight: 600; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.g-open:hover { box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-1); }
.g-open svg { width: 17px; height: 17px; }

dialog.growth { width: min(64rem, 96vw); padding: 1.1rem 1.25rem 1rem; }
dialog.growth[open] { animation: g-in .2s var(--ease, ease-out); }
@keyframes g-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.growth .g-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.growth h2 { font-family: var(--font-tech); font-size: 1.9rem; line-height: 1; margin: .15rem 0 .1rem; }
.growth .g-close svg { stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.growth .g-summary { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; margin: .75rem 0 .8rem; min-height: 2.6rem; }
.growth .g-px { font-family: var(--font-dim); font-weight: 600; font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.growth .g-chg { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-tech); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.growth .g-lbl { color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.growth .g-loading { color: var(--ink-2); }
.growth .up { color: var(--ok); } .growth .down { color: var(--danger); } .growth .flat { color: var(--ink); }

.g-tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: var(--r); background: var(--sunken); border: 1px solid var(--line-2); margin-bottom: .8rem; }
.g-tabs button { min-width: 3.3rem; height: 2.1rem; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink-2); font-family: var(--font-tech); font-weight: 600; font-size: 1rem; letter-spacing: .02em; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.g-tabs button:hover { color: var(--ink); background: var(--hover); }
.g-tabs button[aria-selected="true"] { background: var(--raised); color: var(--accent-text); box-shadow: var(--shadow-1); }

.g-body { display: grid; grid-template-columns: 1fr 15rem; gap: 1rem; }
.g-plot { position: relative; min-width: 0; min-height: clamp(16rem, 46vh, 26rem); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
#gSvg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: crosshair; }
.g-grid { stroke: var(--line); stroke-width: 1; }
.g-base { stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 4 4; }
.g-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.g-end { stroke: var(--panel); stroke-width: 2; }
.g-ax { font-family: var(--font-tech); font-size: 12px; fill: var(--ink-2); }
.g-cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.g-dot { fill: var(--raised); stroke: var(--ink); stroke-width: 2; }
.g-tip { position: absolute; pointer-events: none; background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-2); padding: .45rem .6rem; font-family: var(--font-tech); font-size: .9rem; white-space: nowrap; }
.g-tip-d { color: var(--ink-2); font-size: .82rem; }
.g-tip-v { font-family: var(--font-dim); font-weight: 600; font-size: 1.15rem; }
.g-tip .up, .g-tip .down, .g-tip .flat { display: flex; align-items: center; gap: .3rem; }
.g-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 2rem; text-align: center; color: var(--ink-2); }

.g-arrow { width: 13px; height: 13px; flex: none; }
.g-arrow.up { fill: var(--ok); } .g-arrow.down { fill: var(--danger); }
.g-arrow.flat { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.g-key { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: .75rem .8rem; align-self: start; }
.g-key h3 { font-family: var(--font-tech); font-size: .84rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 .5rem; }
.g-key-row { display: flex; gap: .55rem; align-items: flex-start; margin-bottom: .55rem; }
.g-key-row .g-arrow { width: 16px; height: 16px; margin-top: .15rem; }
.g-key-row small { color: var(--ink-2); font-size: .82rem; }
.g-key .flat-ink { color: var(--ink); }
.g-all-row { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: .35rem .45rem; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink); font-size: .92rem; cursor: pointer; text-align: left; }
.g-all-row:hover { background: var(--hover); }
.g-all-row.on { background: var(--accent-softer); box-shadow: inset 2px 0 0 var(--accent); }
.g-all-row > span:last-child { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font-tech); font-weight: 600; font-variant-numeric: tabular-nums; }
.g-na { color: var(--ink-3); font-weight: 500 !important; }
.g-foot { margin-top: .75rem; font-size: .84rem; }
@media (max-width: 760px) {
  .g-body { grid-template-columns: 1fr; }
  .g-tabs { display: flex; width: 100%; } .g-tabs button { flex: 1; min-width: 0; }
  .growth .g-px { font-size: 1.9rem; }
}
