:root {
  --bg: #081019;
  --bg2: #0f1e2f;
  --paper: #12263a;
  --line: #2a4766;
  --text: #d7e5f4;
  --muted: #8ba5be;
  --good: #72f0c2;
  --accent: #f4cf77;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at 85% 10%, rgba(244, 207, 119, 0.2), transparent 25%),
    radial-gradient(circle at 15% 85%, rgba(88, 208, 185, 0.22), transparent 28%),
    linear-gradient(155deg, var(--bg) 0%, var(--bg2) 100%);
  min-height: 100vh;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  backdrop-filter: blur(10px);
  background: rgba(8, 16, 25, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(244, 207, 119, 0.22);
}

.topnav {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topnav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}

.topnav a:hover {
  color: var(--text);
}

.cta {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.lang {
  background: transparent;
  color: #acc5dc;
  border: 0;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.lang.active {
  background: rgba(121, 239, 199, 0.25);
  color: #ebfff7;
}

main {
  width: min(1200px, 95vw);
  margin: 0 auto;
  padding: 26px 0 64px;
}

.hero {
  padding: 28px 8px 20px;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  margin: 0;
}

h1 {
  margin: 12px 0;
  font-family: var(--serif);
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.05;
}

h1 span {
  display: block;
  color: #f0f5fa;
  font-weight: 600;
}

.sub {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 4px;
}

.action {
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.action.buy {
  background: #79efc7;
  color: #0d1d30;
}

.action.sell {
  background: #f4cf77;
  color: #1a2331;
}

.action.ghost {
  background: transparent;
  color: #b8cade;
  border-color: rgba(184, 202, 222, 0.35);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.hero-card,
.panel {
  border: 1px solid rgba(121, 156, 191, 0.25);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(19, 39, 58, 0.8), rgba(15, 31, 48, 0.55));
  box-shadow: 0 16px 28px rgba(3, 9, 15, 0.35);
}

.hero-card {
  padding: 14px;
}

.hero-card .label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-card h2 {
  margin: 10px 0 6px;
  font-size: 28px;
}

.delta {
  margin: 0;
  color: #95abc1;
  font-size: 13px;
}

.delta.up {
  color: var(--good);
}

.ticker {
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin: 10px 0 18px;
}

.ticker-track {
  display: inline-flex;
  gap: 28px;
  padding: 10px 0;
  white-space: nowrap;
  animation: glide 24s linear infinite;
}

.ticker-item {
  color: #b8cbdd;
  font-size: 14px;
}

.ticker-item b {
  color: #f3f8ff;
}

@keyframes glide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.performance,
.fundamentals {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.terminal-grid,
.documents {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.methodology {
  margin-top: 14px;
}

.formula {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.formula code {
  background: rgba(10, 22, 35, 0.7);
  border: 1px solid rgba(142, 250, 213, 0.15);
  border-radius: 8px;
  padding: 11px;
  color: #bfeeda;
  font-size: 12px;
  white-space: pre-wrap;
}

.assumption-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.assumption-grid div {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 11px;
  background: rgba(8, 18, 30, 0.55);
}

.assumption-grid h4 {
  margin: 0 0 8px;
  color: #f2f8ff;
}

.assumption-grid p {
  margin: 0;
  color: #a8bfd4;
  line-height: 1.55;
  font-size: 14px;
}

.panel {
  padding: 18px;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel header h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
}

.panel header p {
  margin: 8px 0 14px;
  color: var(--muted);
}

.chart-wrap {
  background: rgba(10, 24, 40, 0.62);
  border-radius: 10px;
  border: 1px solid rgba(122, 169, 203, 0.16);
  padding: 10px;
}

svg {
  width: 100%;
  height: auto;
  display: block;
}

.grid-lines line {
  stroke: rgba(130, 167, 199, 0.16);
  stroke-width: 1;
}

.chart-legend {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--muted);
}

.lg {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 7px;
  transform: translateY(-2px);
}

.lg.asset {
  background: #7cf0cb;
}

.lg.equity {
  background: #f4cf77;
}

.stack-bars {
  display: grid;
  gap: 12px;
}

.bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.bar span {
  color: #c8d8e7;
  font-size: 14px;
}

.bar em {
  position: relative;
  font-style: normal;
  padding: 7px 10px;
  width: 180px;
  text-align: right;
  border-radius: 999px;
  color: #0a1728;
  background: linear-gradient(90deg, #f4cf77, #ffebba);
}

.mini-kpis {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.mini-kpis li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.mini-kpis span {
  color: var(--muted);
}

.mini-kpis strong {
  color: #f5fbff;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 6px;
}

tbody td {
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.dividend-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dividend-list div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(8, 18, 30, 0.5);
}

.dividend-list span {
  font-size: 12px;
  color: var(--muted);
}

.dividend-list strong {
  display: block;
  font-size: 28px;
  margin: 4px 0;
}

.dividend-list small {
  color: #9cb2c7;
}

.ipo-band {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  background: linear-gradient(90deg, rgba(20, 38, 55, 0.8), rgba(31, 55, 69, 0.74));
}

.ipo-band h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
}

.ipo-band p {
  color: #c3d3e2;
  line-height: 1.6;
}

.score {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  align-self: center;
}

.score span {
  font-size: 12px;
  color: #a9c0d6;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.score strong {
  display: block;
  font-size: 40px;
  margin: 8px 0;
}

.score small {
  color: #d7ebff;
}

.spark {
  height: 90px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(138, 171, 203, 0.18);
  background: rgba(7, 17, 29, 0.6);
  overflow: hidden;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.doc-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  background: rgba(8, 18, 30, 0.55);
}

.doc-card .k {
  margin: 0;
  font-size: 11px;
  color: #9fc2db;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.doc-card h4 {
  margin: 8px 0;
  font-size: 17px;
}

.doc-card small {
  color: #93abc1;
}

.risk-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.risk-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.risk-list span {
  color: #bdd0e3;
}

.risk-list strong {
  color: #f4cf77;
}

.timeline {
  margin: 0;
  padding-left: 18px;
  color: #c4d6e7;
  display: grid;
  gap: 9px;
}

.timeline b {
  color: #f7fcff;
}

footer {
  width: min(1200px, 95vw);
  margin: 18px auto 28px;
  color: #8da4bc;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 380px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(8, 18, 30, 0.92);
  border: 1px solid rgba(121, 239, 199, 0.35);
  color: #dff7ed;
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.legal {
  margin-top: 14px;
}

.legal ul {
  margin: 0;
  padding-left: 20px;
  color: #bdd0e3;
  display: grid;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 14, 0.74);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(560px, 96vw);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(16, 31, 49, 0.98), rgba(10, 22, 35, 0.97));
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  padding: 16px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.modal-head h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
}

.modal-close {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #d9e7f4;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
}

.modal-note {
  margin: 8px 0 12px;
  color: #9ec0d8;
  font-size: 13px;
}

.lead-form {
  display: grid;
  gap: 10px;
}

.lead-form label {
  display: grid;
  gap: 6px;
}

.lead-form span {
  color: #b6cbde;
  font-size: 13px;
}

.lead-form input,
.lead-form textarea {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 17, 27, 0.88);
  color: #e8f2fa;
  padding: 10px;
  font-family: var(--sans);
}

.lead-form textarea {
  resize: vertical;
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .performance,
  .fundamentals,
  .terminal-grid,
  .documents,
  .assumption-grid,
  .ipo-band {
    grid-template-columns: 1fr;
  }

  .panel.wide {
    grid-column: auto;
  }

  .doc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .topnav {
    justify-content: flex-start;
    gap: 12px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    line-height: 1.12;
  }
}
