/* Glass home test — light frosted-glass homepage built from the Paper mockup
   "The Intraday home — frosted glass · LIGHT". */
:root {
  --bg: #EDEFF2;
  --surf: rgba(255, 255, 255, 0.86);
  --bd: rgba(15, 17, 22, 0.08);
  --rule: rgba(15, 17, 22, 0.07);
  --tx: #17191E;
  --mu: #5F6470;
  --fa: #8C919B;
  --ac: #B86E0A;
  --lk: #1F5FD6;
  --up: #0F8A45;
  --dn: #D33A3A;
  --glass: rgba(255, 255, 255, 0.55);
  --chip: rgba(15, 17, 22, 0.04);
  --ink: #1F2A37;
  --bar: #5E7590;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--tx);
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 12px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-width: 1340px;
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.display { font-family: 'Space Grotesk', system-ui, sans-serif; }

/* ---------- Atmosphere ---------- */
.atmo { position: absolute; inset: 0 0 auto 0; height: 1100px; pointer-events: none; z-index: 0; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); }
.glow.cool { width: 900px; height: 620px; left: -180px; top: -260px; background: radial-gradient(closest-side, rgba(130, 165, 225, 0.42), transparent); }
.glow.warm { width: 900px; height: 620px; right: -160px; top: -240px; background: radial-gradient(closest-side, rgba(242, 176, 96, 0.40), transparent); }
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15, 17, 22, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 17, 22, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}

.page { position: relative; z-index: 1; width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding-top: 20px; }
.glass {
  display: flex; align-items: center; height: 46px; border-radius: 8px;
  background: var(--glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 0.6px solid rgba(15, 17, 22, 0.08);
}
.nav-left { padding: 0 8px 0 16px; gap: 2px; }
.nav-right { padding: 0 7px 0 8px; gap: 10px; }
.wordmark { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 19px; line-height: 22px; letter-spacing: -0.035em; padding-right: 18px; white-space: nowrap; }
.tab { padding: 6px 11px; border-radius: 6px; font-size: 13px; font-weight: 500; color: #3A3E47; white-space: nowrap; }
.tab:hover { background: rgba(15, 17, 22, 0.04); }
.tab.on { background: rgba(15, 17, 22, 0.06); color: var(--tx); }
.search { display: flex; align-items: center; gap: 8px; width: 220px; height: 32px; padding: 0 10px; border-radius: 6px; background: rgba(15, 17, 22, 0.05); color: var(--mu); font-size: 13px; }
.search span { flex: 1; }
.kbd { padding: 1px 5px; border-radius: 3px; border: 1px solid rgba(15, 17, 22, 0.12); font-size: 10px; }
.btn { padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.btn.outline { border: 1px solid rgba(15, 17, 22, 0.14); }
.btn.solid { background: var(--ink); color: #fff; font-weight: 600; }
.nav-right .signup-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 14px; background: #17191e; border-radius: 7px; }
.signup-btn svg { flex-shrink: 0; }
.profile-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 4px; background: transparent; color: #17191e; }
.profile-btn:hover { color: #535965; }
.signup-btn:hover { background: #292c33; }
.profile-btn:focus-visible, .signup-btn:focus-visible { outline: 2px solid var(--lk); outline-offset: 3px; }
.icon-btn { display: flex; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Header ---------- */
.header { display: flex; gap: 40px; align-items: center; padding: 14px 0 0; }
.header-copy { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.eyebrow { display: flex; gap: 10px; font-size: 11px; letter-spacing: 0.12em; font-weight: 500; color: var(--ac); }
.eyebrow .meta { color: var(--fa); letter-spacing: 0.04em; font-weight: 400; }
.headline { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 32px; line-height: 36px; letter-spacing: -0.03em; margin: 0; }
.lead { margin: 0; font-size: 14px; line-height: 21px; color: var(--mu); width: 660px; }
.lead b { color: var(--tx); font-weight: 600; }
.byline { font-size: 12px; color: var(--fa); }
.byline a { color: var(--lk); }
.brief { display: flex; gap: 10px; font-size: 14px; line-height: 21px; color: var(--mu); width: 720px; }
.brief b { color: var(--tx); font-weight: 500; white-space: nowrap; }

.panel { background: var(--surf); border: 1px solid var(--bd); border-radius: 10px; display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 10px; border-bottom: 1px solid var(--rule); }
.panel-title { display: flex; align-items: baseline; gap: 10px; }
.panel-title h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px; line-height: 20px; letter-spacing: -0.01em; }
.panel-title .sub { font-size: 11px; color: var(--mu); }
.more { font-size: 12px; color: var(--lk); white-space: nowrap; }

.breadth { width: 440px; flex-shrink: 0; padding: 12px 16px; gap: 10px; }
.breadth-head { display: flex; justify-content: space-between; align-items: baseline; }
.breadth-head h3 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 14px; }
.breadth-row { display: flex; gap: 22px; }
.meter { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.meter-labels, .meter-vals { display: flex; justify-content: space-between; }
.meter-labels { font-size: 11px; color: var(--mu); }
.meter-vals { font-size: 12px; font-weight: 500; }
.meter-bar { display: flex; height: 4px; gap: 2px; }
.meter-bar i { display: block; border-radius: 2px; }
.up { color: var(--up); }
.dn { color: var(--dn); }
.flat { color: var(--mu); }

/* ---------- Index cards ---------- */
.indices { display: flex; gap: 16px; }
.index-card { flex: 1; padding: 6px; gap: 0; min-width: 0; height: 164px; }
/* Ticker and price on the left, the day's change grouped on the right; all on
   one baseline, with Geist for the ticker so its letters match the rest of the UI. */
.index-top { display: flex; align-items: center; gap: 6px; height: 18px; flex-shrink: 0; white-space: nowrap; }
.index-name { font-family: 'Geist', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.04em; color: var(--mu); }
.index-top .px { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px; line-height: 18px; letter-spacing: -0.03em; }
.index-top .chg { margin-left: auto; font-size: 12px; font-weight: 500; }
.index-top .pill, .index-top .pill.up, .index-top .pill.dn { font-size: 12px; padding: 0; background: none; }
.index-time { margin-left: auto; font-size: 11px; color: var(--fa); }
.pill { padding: 1px 5px; border-radius: 3px; font-size: 11px; font-weight: 500; }
.pill.up { background: rgba(15, 138, 69, 0.10); }
.pill.dn { background: rgba(211, 58, 58, 0.10); }
.spark { flex: 1; min-height: 0; }
.spark svg { display: block; width: 100%; height: 100%; }
.index-axis { padding-right: 46px; flex-shrink: 0; display: flex; justify-content: space-between; font-size: 10px; line-height: 14px; min-height: 14px; color: var(--fa); }

/* ---------- Fundamentals + map ---------- */
.row { display: flex; gap: 16px; align-items: stretch; }
.fund { flex: 1; min-width: 0; }
.carousel { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 10px; flex: 1; }
.slide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.slide-meta { display: flex; align-items: center; gap: 8px; }
.slide-meta .tk { color: var(--lk); font-weight: 600; font-size: 13px; }
.slide-meta .nm { color: var(--mu); font-size: 12px; }
.slide-meta .pd { color: var(--fa); font-size: 11px; }
.slide-title { margin: 6px 0 0; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 22px; line-height: 28px; letter-spacing: -0.02em; }
.slide-value { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.slide-value .big { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 26px; line-height: 30px; letter-spacing: -0.02em; }
.slide-value .delta { font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.chart-wrap { position: relative; flex: 1; min-height: 180px; }
.chart-wrap svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.chart-wrap.loading::after { content: 'Loading fundamentals…'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--fa); }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--mu); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.legend i.line { width: 12px; height: 2px; border-radius: 0; background: var(--ac); }
.carousel-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--rule); }
.dots { display: flex; gap: 6px; }
.dot { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(15, 17, 22, 0.10); background: none; cursor: pointer; font: inherit; }
.dot b { font-size: 11.5px; font-weight: 600; color: var(--lk); }
.dot em { font-style: normal; font-size: 11px; color: var(--mu); white-space: nowrap; }
.dot.on { background: var(--ink); border-color: var(--ink); }
.dot.on b { color: #fff; }
.dot.on em { color: rgba(255, 255, 255, 0.7); }
.pager { display: flex; align-items: center; gap: 10px; }
.pager .count { font-size: 11.5px; color: var(--mu); white-space: nowrap; }
.arrow { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid rgba(15, 17, 22, 0.12); background: rgba(255, 255, 255, 0.7); cursor: pointer; padding: 0; }
.arrow:hover { background: #fff; }
.source { padding: 0 16px 12px; font-size: 10.5px; color: var(--fa); }

.map { width: 440px; flex-shrink: 0; }
.treemap { position: relative; margin: 10px 12px 6px; height: 392px; }
.sector { position: absolute; }
.sector-label { position: absolute; left: 1px; top: 0; font-size: 8.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--mu); text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.tile { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; overflow: hidden; border: 1px solid var(--bg); text-align: center; }
.tile .s { font-weight: 600; line-height: 13px; }
.tile .p { font-size: 9px; opacity: 0.85; line-height: 11px; }
.scale { display: flex; align-items: center; gap: 6px; padding: 0 12px 12px; font-size: 10px; color: var(--fa); }
.scale i { flex: 1; height: 4px; border-radius: 2px; }

/* ---------- Lists, tables, chips ---------- */
.side { width: 440px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.patterns { display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 4px 16px 12px; }
.pgroup { display: flex; flex-direction: column; width: 380px; }
.pgroup > span { font-size: 11px; color: var(--fa); height: 24px; display: flex; align-items: center; }
.prow { display: flex; align-items: center; gap: 8px; height: 22px; border-top: 1px solid var(--rule); }
.prow .n { flex: 1; white-space: nowrap; }
.prow a { color: var(--lk); font-weight: 500; width: 36px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 12px; }
.chip { display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 24px; padding: 0 7px; border-radius: 6px; background: var(--chip); }
.chip a { color: var(--lk); font-weight: 500; white-space: nowrap; }
.chip span { font-size: 11px; font-weight: 500; white-space: nowrap; }
.chips.c4 .chip { width: calc((100% - 18px) / 4); }
.chips.c6 .chip { width: calc((100% - 30px) / 6); }

.news { display: flex; flex-direction: column; padding: 2px 16px 8px; }
.news-row { display: flex; align-items: center; gap: 14px; height: 30px; border-top: 1px solid var(--rule); }
.news-row:first-child { border-top: 0; }
.news-row .t { width: 62px; flex-shrink: 0; font-size: 11px; color: var(--mu); }
.news-row .h { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-row .src { width: 90px; flex-shrink: 0; text-align: right; font-size: 11px; color: var(--fa); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; }
.empty b { font-size: 13px; font-weight: 400; }
.empty span { font-size: 11px; color: var(--fa); }
.earn { display: flex; flex-direction: column; gap: 8px; padding: 6px 16px 12px; }
.earn > div { display: flex; flex-direction: column; gap: 6px; }
.earn > div > span { font-size: 11px; color: var(--mu); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { padding: 3px 8px; border-radius: 5px; background: var(--chip); color: var(--lk); font-weight: 500; }

table { border-collapse: collapse; width: 100%; }
.tbl { padding: 4px 16px 10px; }
.tbl th { height: 24px; font-size: 11px; font-weight: 400; color: var(--fa); text-align: left; }
.tbl td { height: 26px; border-top: 1px solid var(--rule); white-space: nowrap; }
.tbl .r { text-align: right; }
.tbl td.tk { color: var(--lk); font-weight: 500; }
.tbl td.m { color: var(--mu); }
.tbl tr.hl td { background: rgba(211, 58, 58, 0.08); }
.tbl .ellip { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.tag { padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.tag.sale { background: rgba(211, 58, 58, 0.10); color: var(--dn); }
.tag.buy { background: rgba(15, 138, 69, 0.10); color: var(--up); }
.tag.opt { background: var(--chip); color: var(--mu); }
.tag.prop { background: rgba(184, 110, 10, 0.08); color: #A8620A; }
.narrow { width: 380px; flex-shrink: 0; }
.tbl.compact td { height: 24px; }

.footer { display: flex; justify-content: space-between; align-items: flex-start; padding: 36px 0 40px; border-top: 1px solid var(--rule); }
.footer-copy { display: flex; flex-direction: column; gap: 8px; width: 640px; }
.footer-copy .wm { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.footer-copy p { margin: 0; font-size: 11px; line-height: 17px; color: var(--mu); }
.footer-copy small { font-size: 11px; color: var(--fa); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; width: 520px; justify-content: flex-end; color: var(--mu); }

/* Generated with the same Canvas2D renderer and profile as newsletter exports. */
.newsletter-chart-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--mu); font-size: 11px; }
.newsletter-chart-meta a { color: var(--lk); }
.newsletter-frame { display: flex; align-items: center; justify-content: center; min-height: 230px; overflow: hidden; }
.newsletter-chart-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.carousel-foot .dots { flex-wrap: wrap; }
.carousel-foot .dot { padding: 5px 8px; gap: 4px; }

.newsletter-frame { min-height: 230px; }
.slide-title { margin: 0; }
.slide-head { align-items: center; }

/* Compact baseline index cards: selected Paper A. */
.index-grid { fill: none; stroke: var(--tx); stroke-opacity: .055; stroke-width: .8; }
.index-baseline { fill: none; stroke: var(--mu); stroke-opacity: .5; stroke-width: 1; }
.index-baseline-tag { fill: var(--bg); }
.index-level,.index-last { font-size: 10px; font-weight: 600; text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums; }
.index-level { fill: var(--tx); }
.index-last { fill: #fff; }
.index-prior { fill: var(--mu); font-size: 9px; text-anchor: end; }
.index-end { fill: var(--tx); }

.carousel-foot { justify-content: flex-end; }

/* Main homepage: headline/value occupy the chart's single header row. */
html#glass-home-preview .slide-head.chart-caption { min-height:48px; padding:0; color:var(--tx); }
html#glass-home-preview .slide-head .slide-title { flex:1; }
html#glass-home-preview .slide-head .slide-value { flex-shrink:0; }

/* Homepage exports preserve their proportions; never stretch raster text. */
html#glass-home-preview .newsletter-chart-image { object-fit:contain; }

html#glass-home-preview .homepage-series-legend { display:flex;gap:14px;margin-right:auto;font-size:11px;color:var(--mu); }
html#glass-home-preview .homepage-series-legend[hidden] { display:none; }
html#glass-home-preview .homepage-series-legend span { display:flex;align-items:center;gap:5px; }
html#glass-home-preview .homepage-series-legend i { width:7px;height:7px;border-radius:50%; }

/* Keep navigation in the header and devote the former footer to the plot. */
html#glass-home-preview .slide-head .pager { flex-shrink:0;gap:8px;margin-left:8px; }
html#glass-home-preview .slide-head .pager .count { font-size:10px; }
html#glass-home-preview .slide-head .slide-title { min-width:0; }
html#glass-home-preview .carousel { position:relative; }
/* Reserve a separate legend row below the image, including its year labels. */
html#glass-home-preview .homepage-series-legend { position:static;flex:none;flex-wrap:wrap;row-gap:6px;padding:8px 8px 0;pointer-events:none; }
html#glass-home-preview .homepage-series-legend span { white-space:nowrap; }
html#glass-home-preview .homepage-series-legend i { flex-shrink:0; }
@media(max-width:700px) {
  html#glass-home-preview .slide-head.chart-caption { flex-wrap:wrap;gap:8px; }
  html#glass-home-preview .slide-head .slide-title { flex-basis:100%; }
  html#glass-home-preview .slide-head .pager { margin-left:auto; }
}

html#glass-home-preview .slide-head.chart-caption { background:transparent;border:0;margin:0;box-shadow:none; }
html#glass-home-preview .carousel { gap:4px; }

/* Two index charts align with the heat map; the main row takes the freed height. */
html#glass-home-preview .header { gap:16px; }
html#glass-home-preview .header-copy { min-width:0; }
html#glass-home-preview .lead { width:auto;max-width:660px; }
html#glass-home-preview .header-indices { width:440px;flex-shrink:0;gap:12px; }
html#glass-home-preview .header-indices .index-card { height:200px; }
html#glass-home-preview .header-indices .index-top { flex-wrap:wrap;height:36px;column-gap:5px;row-gap:0; }
html#glass-home-preview .header-indices .index-top .chg { margin-left:0; }

/* One index chart fills the header slot; controls stay in place between slides. */
html#glass-home-preview .header-indices { position:relative;display:block; }
html#glass-home-preview .header-indices .index-card[hidden] { display:none; }
html#glass-home-preview .header-indices .index-top { padding-right:100px;flex-wrap:nowrap; }
.index-controls { position:absolute;right:10px;top:1px;height:36px;display:flex;align-items:center;gap:5px; }
.index-position { font-size:10px;color:var(--mu);margin-right:3px;font-variant-numeric:tabular-nums; }
.index-controls button { display:grid;place-items:center;line-height:1;width:24px;height:24px;padding:0;border:1px solid var(--bd, #d9dce1);border-radius:6px;background:transparent;color:var(--fg);cursor:pointer; }
.index-controls button:hover { background:rgba(128,128,128,.1); }
.index-controls button:focus-visible { outline:2px solid var(--lk);outline-offset:2px; }

/* Stable plot height and CSS-pixel labels while the sidebar changes width. */
html#glass-home-preview #s-chart{height:480px;min-height:480px;flex:none}
html#glass-home-preview .homepage-series-legend{min-height:20px;box-sizing:content-box}
html#glass-home-preview .homepage-series-legend[hidden]{display:flex;visibility:hidden}
