/* Shared styles for IPO GMP Live content pages (News, Guides, Blog, Compare, Pre-IPO, OFS).
   Matches the dashboard design system: charcoal dark default, emerald accent, Outfit + JetBrains Mono. */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:root {
  --bg: #101114;
  --ink: #ececee;
  --muted: #8d919a;
  --line: #2a2d34;
  --surface: #17191d;
  --surface-2: #1c1f25;
  --accent: #3d9a6a;
  --accent-ink: #e8f6ee;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pos: #34d399;
  --neg: #f87171;
  --font-ui: Outfit, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg); color: var(--ink);
  min-height: 100dvh;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 30; opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button {
  background: var(--accent); color: #062015; border: none; padding: 8px 14px; border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
button:hover { background: #4eae7b; }
button:active { transform: scale(0.98); }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button.ghost:hover { background: var(--surface-2); color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.shell { max-width: 1200px; margin: 0 auto; padding: 22px 24px 48px; }

/* ---- Site navigation ---- */
.site-nav {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; margin-bottom: 22px;
}
.site-nav .brand { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-nav .brand span { color: var(--accent); }
.site-nav .nav-links { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.site-nav .nav-link {
  padding: 7px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.site-nav .nav-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.site-nav .nav-link.active { background: var(--surface-2); color: var(--accent); }
.site-nav .nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.theme-switch input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
/* ---- Page header ---- */
.page-head { margin: 6px 0 24px; }
.page-head .kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.page-head h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; text-wrap: balance; }
.page-head h1 span { color: var(--accent); }
.page-head .lede { margin-top: 8px; color: var(--muted); font-size: 14.5px; max-width: 68ch; line-height: 1.55; }
.back { display: inline-block; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.back:hover { color: var(--ink); }

/* ---- Ticker marquee ---- */
.ticker {
  overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 18px; display: flex; align-items: center;
}
.ticker .ticker-label {
  flex-shrink: 0; padding: 9px 14px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); border-radius: 11px 0 0 11px;
}
.ticker .ticker-viewport { overflow: hidden; flex: 1; }
.ticker .ticker-track { display: inline-flex; align-items: center; padding: 9px 0; white-space: nowrap; animation: ticker-scroll 90s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker .tick { display: inline-flex; align-items: baseline; gap: 7px; margin-right: 26px; font-family: var(--font-mono); font-size: 13px; }
.ticker .tick .t-name { color: var(--ink); font-family: var(--font-ui); font-weight: 600; }
.ticker .tick .t-price { color: var(--muted); }
.ticker .tick .t-pct { font-weight: 700; }
.ticker .tick.up .t-pct { color: var(--pos); }
.ticker .tick.down .t-pct { color: var(--neg); }
.ticker .tick .arrow { font-size: 11px; }
.ticker .tick.up .arrow { color: var(--pos); }
.ticker .tick.down .arrow { color: var(--neg); }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ---- Cards & grids ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px;
  display: flex; flex-direction: column; gap: 8px; transition: border-color .2s var(--ease), transform .2s var(--ease);
}
a.card { color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.card .card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.card .card-title { font-size: 15.5px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.card .card-desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.card .card-foot { margin-top: auto; padding-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill.beg { background: #065f46; color: #6ee7b7; }
.pill.int { background: #1e3a8a; color: #93c5fd; }
.pill.ref { background: #7c2d12; color: #fdba74; }
.pill.neutral { background: #334155; color: #cbd5e1; }
.pill.pos { background: #14532d; color: #86efac; }
.pill.neg { background: #7f1d1d; color: #fca5a5; }
.pill.src { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* ---- Article content (Guides / Blog) ---- */
.article {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px 28px;
  max-width: 820px; margin: 0 auto 22px;
}
.article .article-head { margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.article .article-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.article .article-head .article-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.article .prose h2 { font-size: 17px; font-weight: 600; margin: 22px 0 8px; letter-spacing: -0.01em; }
.article .prose p { color: var(--ink); opacity: .9; font-size: 15px; line-height: 1.7; margin-bottom: 12px; }
.article .prose ul { margin: 0 0 12px 20px; }
.article .prose li { font-size: 15px; line-height: 1.6; color: var(--ink); opacity: .9; margin-bottom: 4px; }
.article .prose strong { color: var(--ink); font-weight: 600; }
/* ---- Data tables ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 640px; }
th, td { text-align: left; padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-2); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
tbody tr:first-child td { border-top: none; }
tbody tr:hover td { background: var(--surface-2); }
td.num { font-family: var(--font-mono); text-align: right; }
th.num { text-align: right; }
td .star { color: #fbbf24; font-weight: 600; }

/* ---- Filter chips ---- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
}
.chip:hover { background: var(--surface-2); color: var(--ink); }
.chip.active { background: var(--accent); color: #062015; border-color: var(--accent); }

/* ---- Compare page ---- */
.compare-select { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; align-items: flex-end; }
.compare-select .field { display: flex; flex-direction: column; gap: 6px; }
.compare-select .field span { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.compare-select select {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-family: inherit; font-size: 14px; min-width: 180px;
}
.compare-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.compare-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.compare-card .cc-name { font-size: 16px; font-weight: 700; }
.compare-card .cc-rating { color: #fbbf24; font-weight: 600; font-size: 13px; }
.compare-card .cc-type { font-size: 12px; color: var(--muted); margin-top: 2px; }
.compare-card .cc-open { margin-top: 12px; }
.compare-group { margin-bottom: 22px; }
.compare-group h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; color: var(--accent); }
.group-table { min-width: 0; }
.group-table td:first-child { font-weight: 600; color: var(--muted); white-space: normal; min-width: 180px; }

/* ---- FAQ ---- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq-item h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.faq-item p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ---- Notice / disclaimer ---- */
.notice { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--muted); margin-bottom: 18px; line-height: 1.55; }
.error, .empty { padding: 18px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---- Modal / company detail ---- */
dialog.modal {
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink);
  max-width: 760px; width: calc(100% - 32px); padding: 0; margin: auto; max-height: 88vh;
  box-shadow: 0 24px 64px -24px rgba(0, 0, 0, .6);
}
dialog.modal::backdrop { background: rgba(8, 10, 14, .68); }
.modal-inner { padding: 20px 24px 24px; overflow-y: auto; max-height: 88vh; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.modal-close { background: transparent; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px; border-radius: 8px; }
.modal-close:hover { color: var(--ink); background: var(--surface-2); }
.detail-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); flex-shrink: 0; }
.detail-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.detail-price { font-family: var(--font-mono); font-size: 26px; font-weight: 700; }
.detail-meta { font-size: 13px; color: var(--muted); }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.fact-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.fact-item .lbl { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fact-item .val { font-size: 14px; font-weight: 600; margin-top: 3px; }
.copy-btn { background: transparent; border: none; color: var(--muted); cursor: pointer; padding: 2px 4px; border-radius: 6px; display: inline-flex; align-items: center; vertical-align: middle; }
.copy-btn:hover { color: var(--ink); background: var(--surface-2); }
.copy-btn.is-done { color: var(--accent); }
.copy-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.chart-box { position: relative; }
.chart-box svg text { font-family: var(--font-mono); }
.chart-tip {
  position: absolute; top: 6px; pointer-events: none; z-index: 5;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font-size: 12.5px; line-height: 1.4; white-space: nowrap;
  font-family: var(--font-mono); color: var(--ink);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4);
}
.chart-tip span { color: var(--muted); font-size: 11px; }
html[data-theme="light"] .chart-tip { background: #fff; border-color: #e2e8f0; }
.chart-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-tab {
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
  padding: 5px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.chart-tab:hover { color: var(--ink); }
.chart-tab.active { background: var(--accent); color: #062015; border-color: var(--accent); }
.chart-change { font-family: var(--font-mono); font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.chart-change.pos { color: var(--pos); }
.chart-change.neg { color: var(--neg); }
.chart-change-label { font-family: var(--font-ui); font-weight: 500; color: var(--muted); font-size: 12px; }
html[data-theme="light"] .chart-tab { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
html[data-theme="light"] .chart-tab:hover { color: #0f172a; }
.detail-section { margin-bottom: 16px; }
.detail-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--accent); letter-spacing: -0.01em; }
.detail-section p, .detail-section li { font-size: 13.5px; line-height: 1.6; color: var(--ink); opacity: .88; }
.detail-section ul { margin-left: 18px; }
.detail-section li { margin-bottom: 5px; }
.detail-loading, .detail-error { padding: 32px; text-align: center; color: var(--muted); font-size: 14px; }
html[data-theme="light"] dialog.modal { background: #fff; border-color: #e2e8f0; }
html[data-theme="light"] dialog.modal::backdrop { background: rgba(15, 23, 42, .4); }
html[data-theme="light"] .fact-item { background: #f1f5f9; border-color: #e2e8f0; }
html[data-theme="light"] .detail-logo { background: #f1f5f9; border-color: #e2e8f0; }
.skel { height: 16px; border-radius: 6px; background: linear-gradient(90deg, #22262d 25%, #2c313a 37%, #22262d 63%); background-size: 400% 100%; animation: shimmer 1.2s ease infinite; margin-bottom: 10px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---- Footer ---- */
.site-foot { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }
/* ---- Light theme ---- */
html[data-theme="light"] {
  --bg: #f8fafc; --ink: #0f172a; --muted: #475569; --line: #e2e8f0;
  --surface: #ffffff; --surface-2: #f1f5f9; --pos: #15803d; --neg: #b91c1c;
}
html[data-theme="light"] body { background: #f8fafc; color: #0f172a; }
html[data-theme="light"] .page-head h1 span, html[data-theme="light"] .page-head .kicker { color: #2f7d56; }
html[data-theme="light"] .site-nav, html[data-theme="light"] .card, html[data-theme="light"] .article,
html[data-theme="light"] .table-wrap, html[data-theme="light"] .faq-item, html[data-theme="light"] .compare-card,
html[data-theme="light"] .ticker, html[data-theme="light"] .notice { background: #fff; border-color: #e2e8f0; }
html[data-theme="light"] thead th { background: #f1f5f9; color: #475569; }
html[data-theme="light"] tbody tr:hover td { background: #f1f5f9; }
html[data-theme="light"] .site-nav .nav-link:hover { background: #f1f5f9; color: #0f172a; }
html[data-theme="light"] .site-nav .nav-link.active { background: #eef2f7; color: #2f7d56; }
html[data-theme="light"] .site-nav .brand { color: #0f172a; }
html[data-theme="light"] .theme-switch { color: #334155; }
html[data-theme="light"] .card .card-title { color: #0f172a; }
html[data-theme="light"] .card .card-desc, html[data-theme="light"] .card .card-meta { color: #475569; }
html[data-theme="light"] .ticker .tick .t-name { color: #0f172a; }
html[data-theme="light"] .ticker .tick .t-price { color: #475569; }
html[data-theme="light"] .article .prose p, html[data-theme="light"] .article .prose li { color: #0f172a; opacity: .85; }
html[data-theme="light"] .article .prose h2 { color: #0f172a; }
html[data-theme="light"] .chip { background: #fff; color: #475569; border-color: #cbd5e1; }
html[data-theme="light"] .chip:hover { background: #f1f5f9; color: #0f172a; }
html[data-theme="light"] .compare-select select { background: #fff; color: #0f172a; border-color: #cbd5e1; }
html[data-theme="light"] .notice, html[data-theme="light"] .site-foot { color: #475569; }
html[data-theme="light"] .site-foot { border-color: #e2e8f0; }
html[data-theme="light"] .skel { background: linear-gradient(90deg, #e7ebf0 25%, #f4f6f8 37%, #e7ebf0 63%); }

@media (max-width: 640px) {
  .shell { padding: 16px 14px 36px; }
  .page-head h1 { font-size: 23px; }
  .article { padding: 18px 16px; }
  .article .article-head h1 { font-size: 21px; }
}



