/* StoxScanner — Apple/Google-inspired design system. Light + dark, follows the system unless overridden. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, "Roboto Mono", monospace;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #ececf0;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --sep: rgba(0, 0, 0, .08);
  --sep-strong: rgba(0, 0, 0, .14);
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, .1);
  --up: #1d8a3b;
  --up-fill: #34c759;
  --up-soft: rgba(52, 199, 89, .14);
  --down: #d70015;
  --down-fill: #ff3b30;
  --down-soft: rgba(255, 59, 48, .12);
  --neutral-fill: #8e8e93;
  --sig-bull: #ff3b30;      /* red candle = bullish signal (your convention) */
  --sig-bear: #ffcc00;      /* yellow candle = bearish signal */
  --warn: #b25000;
  --warn-soft: rgba(255, 149, 0, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 24px rgba(0, 0, 0, .05);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .18);
  --nav-bg: rgba(245, 245, 247, .72);
  --logo-bg: #1d1d1f;
  --logo-fg: #34c759;
  --radius: 18px;
  --radius-sm: 12px;
  --chart-grid: rgba(0, 0, 0, .06);
  --chart-candle-up: #8e8e93;
  --chart-candle-dn: #c7c7cc;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
    --text: #f5f5f7; --text-2: #98989d; --text-3: #636366;
    --sep: rgba(255, 255, 255, .09); --sep-strong: rgba(255, 255, 255, .16);
    --accent: #0a84ff; --accent-soft: rgba(10, 132, 255, .18);
    --up: #30d158; --up-fill: #30d158; --up-soft: rgba(48, 209, 88, .16);
    --down: #ff453a; --down-fill: #ff453a; --down-soft: rgba(255, 69, 58, .16);
    --sig-bull: #ff453a; --sig-bear: #ffd60a; --warn: #ffb340; --warn-soft: rgba(255, 159, 10, .16);
    --shadow: none; --shadow-lg: 0 24px 70px rgba(0, 0, 0, .6);
    --nav-bg: rgba(22, 22, 23, .72); --logo-bg: #f5f5f7; --logo-fg: #1d8a3b;
    --chart-grid: rgba(255, 255, 255, .07); --chart-candle-up: #8e8e93; --chart-candle-dn: #48484a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
  --text: #f5f5f7; --text-2: #98989d; --text-3: #636366;
  --sep: rgba(255, 255, 255, .09); --sep-strong: rgba(255, 255, 255, .16);
  --accent: #0a84ff; --accent-soft: rgba(10, 132, 255, .18);
  --up: #30d158; --up-fill: #30d158; --up-soft: rgba(48, 209, 88, .16);
  --down: #ff453a; --down-fill: #ff453a; --down-soft: rgba(255, 69, 58, .16);
  --sig-bull: #ff453a; --sig-bear: #ffd60a; --warn: #ffb340; --warn-soft: rgba(255, 159, 10, .16);
  --shadow: none; --shadow-lg: 0 24px 70px rgba(0, 0, 0, .6);
  --nav-bg: rgba(22, 22, 23, .72); --logo-bg: #f5f5f7; --logo-fg: #1d8a3b;
  --chart-grid: rgba(255, 255, 255, .07); --chart-candle-up: #8e8e93; --chart-candle-dn: #48484a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.47 var(--font); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.num, .mono { font-family: var(--font); font-variant-numeric: tabular-nums; }
.t2 { color: var(--text-2); }
.t3 { color: var(--text-3); }
.up { color: var(--up); }
.down { color: var(--down); }
.hidden, [hidden] { display: none !important; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: var(--nav-bg); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--sep); }
.nav-inner { max-width: 1240px; margin: 0 auto; height: 56px; padding: 0 22px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--font-display); font-weight: 650; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.links { display: flex; gap: 2px; flex: 1; justify-content: center; }
.links a { color: var(--text-2); font-size: 13.5px; font-weight: 500; padding: 7px 11px; border-radius: 980px; white-space: nowrap; transition: color .15s, background .15s; }
.links a:hover { color: var(--text); }
.links a.on { color: var(--text); background: var(--surface-3); }
.nav-right { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

/* Segmented control */
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { padding: 5px 12px; border-radius: 7px; font-size: 13px; font-weight: 550; color: var(--text-2); transition: background .15s, color .15s; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
:root[data-theme="dark"] .seg button.on { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button.on { background: #636366; } }
.seg-sm button { padding: 4px 9px; font-size: 12px; }

/* ---------- Page ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 32px 22px 24px; min-height: 70vh; }
.hero { margin: 8px 0 28px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0; margin-bottom: 6px; }
h1.display { font-family: var(--font-display); font-size: 48px; line-height: 1.06; font-weight: 700; letter-spacing: -.035em; margin: 0; }
.lede { font-size: 19px; line-height: 1.42; color: var(--text-2); max-width: 760px; margin: 12px 0 0; letter-spacing: -.012em; }
.lede b { color: var(--text); font-weight: 600; }
h2.section { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.025em; margin: 44px 0 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
h2.section .more { font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
h2.section .sub { font-size: 14px; font-weight: 400; color: var(--text-2); letter-spacing: -.01em; }
h3.card-title { font-size: 17px; font-weight: 650; letter-spacing: -.02em; margin: 0 0 4px; }
.card-sub { font-size: 13px; color: var(--text-2); margin: 0 0 14px; }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.auto-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.auto-tiles { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
@media (max-width: 1020px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto; } }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.tap { cursor: pointer; transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; }
.card.tap:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .08); }
.card.tap:active { transform: scale(.99); }

/* ---------- Score ring + pills ---------- */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { display: block; transform: rotate(-90deg); }
.ring .val { position: absolute; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring .lbl { position: absolute; bottom: -18px; font-size: 11px; color: var(--text-2); font-weight: 500; }
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 24px; padding: 0 8px; border-radius: 7px; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chg { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pct { font-variant-numeric: tabular-nums; font-weight: 550; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 980px; font-size: 12px; font-weight: 550; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.good { background: var(--up-soft); color: var(--up); }
.badge.bad { background: var(--down-soft); color: var(--down); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.dots i.g { background: var(--up-fill); }
.dots i.r { background: var(--down-fill); }
.candle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; white-space: nowrap; color: var(--text-2); }
.candle i { width: 6px; height: 14px; border-radius: 2px; position: relative; display: inline-block; }
.candle i::before { content: ""; position: absolute; left: 2.5px; top: -3px; bottom: -3px; width: 1px; background: inherit; }
.candle.bull i { background: var(--sig-bull); }
.candle.bear i { background: var(--sig-bear); }

/* ---------- Index tiles ---------- */
.tile { display: flex; flex-direction: column; gap: 2px; }
.tile .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile .sym { font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.tile .name { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .px { font-size: 22px; font-weight: 650; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.tile .spark { margin: 8px 0 6px; height: 36px; }
.tile .foot-row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }

/* Regime hero */
.regime { display: flex; align-items: center; gap: 28px; }
.regime-copy .k { font-size: 13px; color: var(--text-2); font-weight: 550; }
.regime-copy .v { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.regime-copy p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }

/* Stat blocks */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 20px; }
.stat .k { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.stat .v { font-size: 28px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .v small { font-size: 14px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.meter { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; border-radius: 6px; }

/* Lists */
.rows { display: flex; flex-direction: column; }
.rowi { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 11px 0; border-top: 1px solid var(--sep); cursor: pointer; }
.rowi:first-child { border-top: 0; padding-top: 2px; }
.rowi:hover .sym { color: var(--accent); }
.rowi .sym { font-weight: 650; transition: color .15s; }
.rowi .nm { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowi .why { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-2); }
.rowi .rt { display: flex; align-items: center; gap: 10px; }

/* Sector cards */
.sect-card { display: flex; flex-direction: column; gap: 14px; }
.sect-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sect-head h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.sect-head .meta { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.dist { display: flex; height: 8px; border-radius: 8px; overflow: hidden; gap: 2px; }
.dist i { display: block; height: 100%; }
.mini4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini4 div { font-size: 11px; color: var(--text-2); font-weight: 500; }
.mini4 b { display: block; font-size: 15px; color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 980px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep-strong); font-size: 13px; font-weight: 550; color: var(--text); cursor: pointer; transition: background .15s, box-shadow .15s; white-space: nowrap; }
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--accent); color: #fff; box-shadow: none; }
.chip.sm { height: 26px; padding: 0 10px; font-size: 12.5px; }
.chip .score { height: 18px; min-width: 26px; font-size: 11.5px; padding: 0 5px; border-radius: 5px; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.data th { position: sticky; top: 0; background: var(--surface); text-align: right; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 12px 14px; border-bottom: 1px solid var(--sep); white-space: nowrap; cursor: pointer; user-select: none; z-index: 1; }
table.data th.l, table.data td.l { text-align: left; }
table.data th.on { color: var(--text); }
table.data td { text-align: right; padding: 11px 14px; border-bottom: 1px solid var(--sep); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data tbody tr { cursor: pointer; transition: background .12s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .sym { font-weight: 650; }
table.data .nm { display: block; font-size: 12px; color: var(--text-2); max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
table.data .stick { position: sticky; left: 0; background: var(--surface); z-index: 2; }
table.data tbody tr:hover .stick { background: var(--surface-2); }
table.data th.stick { z-index: 3; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.select { appearance: none; -webkit-appearance: none; height: 30px; padding: 0 30px 0 12px; border-radius: 980px; border: 0; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238e8e93' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; box-shadow: inset 0 0 0 1px var(--sep-strong); color: var(--text); font: 550 13px var(--font); }
.field { height: 30px; border-radius: 980px; border: 0; padding: 0 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep-strong); color: var(--text); font: 13px var(--font); outline: none; min-width: 160px; }
.field:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.count { font-size: 13px; color: var(--text-2); margin-left: auto; }

/* Heatmap */
.heat-wrap { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.heat-wrap svg { display: block; width: 100%; }
.heat-wrap .tile-r { cursor: pointer; }
.heat-wrap .tile-r:hover rect { filter: brightness(1.12); }
.legend { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.legend .ramp { width: 160px; height: 8px; border-radius: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Ticker page */
.tk-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 4px 0 26px; }
.tk-hero .crumbs { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.tk-hero .crumbs a { color: var(--text-2); }
.tk-hero .crumbs a:hover { color: var(--accent); }
.tk-hero h1 { font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -.035em; margin: 0; line-height: 1.05; }
.tk-hero .co { font-size: 17px; color: var(--text-2); margin-top: 4px; }
.tk-price { font-size: 34px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 14px; }
.tk-price .pct { font-size: 17px; margin-left: 8px; }
.tk-actions { display: flex; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 980px; font-size: 14px; font-weight: 550; background: var(--accent); color: #fff; transition: filter .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--sep-strong); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.starred { color: #ff9f0a; }
.rings { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; justify-content: space-around; padding-bottom: 14px; }
.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); box-shadow: var(--shadow-lg); border-radius: 10px; padding: 8px 10px; font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; white-space: nowrap; z-index: 5; }
.chart-tip b { font-weight: 650; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 20px; }
.kv.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kv .k { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kv .v { font-size: 17px; font-weight: 650; letter-spacing: -.015em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kv .v small { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.parts { width: 100%; border-collapse: collapse; font-size: 14px; }
.parts th { font-size: 12px; color: var(--text-2); font-weight: 600; text-align: right; padding: 0 8px 10px; }
.parts th:first-child, .parts td:first-child { text-align: left; padding-left: 0; }
.parts td { padding: 10px 8px; border-top: 1px solid var(--sep); text-align: right; font-variant-numeric: tabular-nums; }
.bar2 { display: inline-block; position: relative; width: 70px; height: 6px; border-radius: 6px; background: var(--surface-3); vertical-align: middle; margin-right: 8px; }
.bar2 i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.bar2::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--sep-strong); }
.read-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.read-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.read-list .tf { flex: none; width: 64px; font-size: 12px; font-weight: 650; color: var(--text-2); padding-top: 2px; }
.read-list .tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* News */
.news { display: flex; flex-direction: column; }
.news a { display: block; padding: 13px 0; border-top: 1px solid var(--sep); color: var(--text); }
.news a:first-child { border-top: 0; padding-top: 0; }
.news a:hover .h { color: var(--accent); }
.news .h { font-size: 15px; font-weight: 550; line-height: 1.38; letter-spacing: -.012em; transition: color .15s; }
.news .m { font-size: 12.5px; color: var(--text-2); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.news .m .sym { font-weight: 650; color: var(--text); }

/* Empty / skeleton */
.empty { padding: 48px 20px; text-align: center; color: var(--text-2); }
.empty h3 { color: var(--text); font-size: 19px; margin: 0 0 6px; letter-spacing: -.02em; }
.skeleton { height: 60vh; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* Footer */
.foot { max-width: 1240px; margin: 40px auto 0; padding: 22px 22px 48px; border-top: 1px solid var(--sep); color: var(--text-3); font-size: 12px; line-height: 1.6; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--text-2); }

/* Command palette */
.palette { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .28); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.palette-box { position: relative; width: min(620px, 100%); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--sep); color: var(--text-2); }
.palette-input input { flex: 1; border: 0; outline: none; background: transparent; color: var(--text); font: 17px var(--font); letter-spacing: -.015em; }
.palette-input input::-webkit-search-cancel-button { display: none; }
kbd { font: 11px var(--font); color: var(--text-2); background: var(--surface-3); border-radius: 5px; padding: 2px 6px; }
.palette-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette-list .pi { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.palette-list .pi.sel { background: var(--accent-soft); }
.palette-list .pi .sym { font-weight: 650; }
.palette-list .pi .nm { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-list .grp { font-size: 11.5px; font-weight: 600; color: var(--text-3); padding: 10px 10px 4px; text-transform: uppercase; letter-spacing: .04em; }

/* Guide */
.prose { max-width: 720px; }
.prose h3 { font-size: 19px; letter-spacing: -.02em; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--text-2); font-size: 16px; line-height: 1.6; }
.prose b { color: var(--text); }

/* ---------- Mobile ---------- */
@media (max-width: 1080px) {
  .links { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .links::-webkit-scrollbar { display: none; }
}
@media (max-width: 860px) {
  .nav-inner { flex-wrap: wrap; height: auto; padding: 10px 16px 0; gap: 8px 12px; }
  .logo { flex: 1; }
  .links { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 4px 12px 8px; }
  .page { padding: 22px 16px 16px; }
  h1.display { font-size: 34px; }
  .lede { font-size: 17px; }
  h2.section { font-size: 21px; margin-top: 34px; }
  .card { padding: 18px; border-radius: 16px; }
  .regime { gap: 18px; }
  .regime-copy .v { font-size: 24px; }
  .tk-hero h1 { font-size: 32px; }
  .tk-price { font-size: 28px; }
  .hide-sm { display: none !important; }
  .bar2 { display: none; }
  .parts { font-size: 13px; }
  .rings { gap: 18px; }
  .foot { padding: 20px 16px 40px; }
  .auto-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 400px) { .seg-sm button { padding: 4px 7px; } }
