/* IPO GMP Daily. One stylesheet, no external requests. */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece4;
  --ink: #16202b;
  --ink-2: #4a5663;
  --ink-3: #6f7a86;
  --line: #e0dcd2;
  --accent: #0b6e69;
  --accent-ink: #ffffff;
  --accent-soft: #dcefec;
  --up: #11723f;
  --down: #b3261e;
  --flat: #6f7a86;
  --high: #11723f;
  --med: #9a6a00;
  --low: #b3261e;
  --badge-open: #11723f;
  --badge-soon: #1f5fae;
  --badge-closed: #6f7a86;
  --badge-today: #b34d00;
  --shadow: 0 1px 2px rgba(22, 32, 43, .06), 0 2px 8px rgba(22, 32, 43, .04);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1419; --surface: #161d24; --surface-2: #1d262f; --ink: #e8edf2;
    --ink-2: #b4bfca; --ink-3: #8d99a6; --line: #2a3540; --accent: #3cb8ae;
    --accent-ink: #06201e; --accent-soft: #12332f; --up: #4cc27f; --down: #ff7b72;
    --high: #4cc27f; --med: #e0b341; --low: #ff7b72; --badge-open: #2e9e5e;
    --badge-soon: #4a8fe0; --badge-closed: #7b8794; --badge-today: #e07b2e;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1419; --surface: #161d24; --surface-2: #1d262f; --ink: #e8edf2;
  --ink-2: #b4bfca; --ink-3: #8d99a6; --line: #2a3540; --accent: #3cb8ae;
  --accent-ink: #06201e; --accent-soft: #12332f; --up: #4cc27f; --down: #ff7b72;
  --high: #4cc27f; --med: #e0b341; --low: #ff7b72; --badge-open: #2e9e5e;
  --badge-soon: #4a8fe0; --badge-closed: #7b8794; --badge-today: #e07b2e;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.55; padding-bottom: 72px;
}
@media (min-width: 860px) { body { padding-bottom: 0; } }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; margin: .2em 0 .35em; }
h2 { font-size: 1.2rem; margin: 1.8em 0 .6em; }
h3 { font-size: 1.02rem; margin: 1.4em 0 .4em; }
p { margin: .5em 0 .9em; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: .86rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.prose { max-width: 720px; }
.prose li { margin: .3em 0; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.brand .mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 1rem; font-weight: 800; flex: none; }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .94rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
@media (min-width: 860px) { .nav { display: flex; } }
.theme { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--ink-2); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }
@media (min-width: 860px) { .theme { margin-left: 8px; } }

/* ticker */
.ticker { background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: .88rem; }
.ticker .wrap { display: flex; gap: 18px; overflow-x: auto; white-space: nowrap; padding-top: 7px; padding-bottom: 7px; scrollbar-width: none; }
.ticker .wrap::-webkit-scrollbar { display: none; }
.ticker a { color: var(--ink); text-decoration: none; }
.ticker b { font-weight: 600; }
.ticker .lbl { color: var(--accent); font-weight: 700; }

main { padding: 18px 0 40px; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin: 0 0 4px; }
.crumbs a { color: var(--ink-3); }
.lede { color: var(--ink-2); font-size: 1.02rem; max-width: 760px; }
.stamp { font-size: .85rem; color: var(--ink-3); }

/* cards and blocks */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 4px; font-size: 1rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card .big { font-size: 1.5rem; font-weight: 700; }
.card .row { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; color: var(--ink-2); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 12px 0 8px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi .v { font-size: 1.45rem; font-weight: 700; }
.kpi .k { font-size: .82rem; color: var(--ink-3); }
.note { background: var(--surface-2); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: .92rem; color: var(--ink-2); margin: 14px 0; }
.disclaimer { font-size: .84rem; color: var(--ink-3); border-top: 1px solid var(--line); margin-top: 28px; padding-top: 12px; }

/* estimate hero on IPO pages */
.hero { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 12px 0; }
@media (min-width: 700px) { .hero { grid-template-columns: 1.3fr 1fr 1fr; } }
.hero .card .big { font-size: 2rem; }

/* tables */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.data td:first-child, .data th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 150px; }
.data th:first-child { background: var(--surface-2); }
.data td:first-child a { font-weight: 600; color: var(--ink); text-decoration: none; }
.data td:first-child a:hover { text-decoration: underline; }
.data .sub { display: block; font-size: .78rem; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.facts th { width: 42%; text-transform: none; letter-spacing: 0; font-size: .9rem; background: transparent; color: var(--ink-2); font-weight: 500; white-space: normal; }

.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--flat); }
.conf { display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.conf.High { color: var(--high); } .conf.Medium { color: var(--med); } .conf.Low { color: var(--low); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 5px; color: #fff; vertical-align: 1px; margin-left: 4px; white-space: nowrap; }
.b-Open { background: var(--badge-open); } .b-Closing-today { background: var(--badge-today); }
.b-Upcoming { background: var(--badge-soon); } .b-Closed { background: var(--badge-closed); }
.b-Listing-today { background: var(--badge-today); } .b-Listed { background: var(--badge-closed); }
.seg { font-size: .72rem; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; margin-left: 4px; }

/* filter chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 12px; font-size: .88rem; cursor: pointer; font-family: inherit; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.segtabs { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-top: 6px; }
.segtabs a { padding: 6px 14px; text-decoration: none; color: var(--ink-2); font-size: .92rem; background: var(--surface); }
.segtabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

/* per-IPO tab bar */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 14px 0 6px; overflow-x: auto; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; font-size: .94rem; }
.tabs a:hover { color: var(--ink); }

/* chart */
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 4px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .ar { fill: var(--accent-soft); }
.chart .gd { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }

/* faq */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 8px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: .6em 0 .2em; color: var(--ink-2); }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); font-size: .88rem; color: var(--ink-3); padding: 22px 0 26px; }
.foot .cols { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.foot a { color: var(--ink-2); }

/* mobile tab bar */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { text-align: center; padding: 8px 2px 9px; color: var(--ink-3); text-decoration: none; font-size: .72rem; line-height: 1.2; }
.tabbar a .i { display: block; font-size: 1.1rem; margin-bottom: 1px; }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 600; }
@media (min-width: 860px) { .tabbar { display: none; } }

.hide { display: none !important; }
