:root {
  --ink: #0a0810;
  --surface: #100c18;
  --surface-2: #171220;
  --text: #f0e8d8;
  --muted: #aaa18f;
  --low: #70695d;
  --green: #4ade80;
  --green-bright: #86efac;
  --gold: #d4af6d;
  --amber: #ffb547;
  --hair: rgba(240, 232, 216, 0.13);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: inherit; }
button { font: inherit; }
.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 4%, rgba(74, 222, 128, 0.09), transparent 28%),
    radial-gradient(circle at 88% 48%, rgba(212, 175, 109, 0.035), transparent 30%);
}
.site-head, main, footer { position: relative; z-index: 1; }
.site-head {
  max-width: 1240px;
  height: 76px;
  margin: 0 auto;
  padding: 0 30px;
  border-bottom: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: 27px;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.brand span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}
.site-head nav { display: flex; gap: 24px; }
.site-head nav a {
  color: var(--muted);
  font: 700 9px var(--mono);
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-head nav a:hover { color: var(--text); }
main { max-width: 1240px; margin: 0 auto; padding: 0 30px 90px; }
.license-hero {
  padding: 48px 0 42px;
  border-bottom: 1px solid var(--hair);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 44px;
  align-items: end;
}
.license-hero > * { min-width: 0; }
.eyebrow, .section-kicker {
  margin: 0 0 18px;
  color: var(--green);
  font: 700 9px var(--mono);
  letter-spacing: 0.19em;
  text-transform: uppercase;
}
.license-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(52px, 7vw, 92px);
  font-weight: 200;
  letter-spacing: -0.055em;
  line-height: 0.92;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.hero-copy {
  max-width: 720px;
  margin: 27px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.tag-row span {
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font: 700 8px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.user-count {
  padding: 25px;
  border: 1px solid var(--hair);
  background: var(--surface);
}
.user-count span, .user-count small {
  display: block;
  color: var(--low);
  font: 700 8px var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.user-count strong {
  display: block;
  margin: 12px 0;
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 200;
  letter-spacing: -0.045em;
}
.user-count small { color: var(--green); }
.license-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  padding-top: 36px;
}
.evidence-column { min-width: 0; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--hair);
}
.stat-cell {
  min-height: 106px;
  padding: 18px 20px;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.stat-cell:nth-child(3n) { border-right: 0; }
.stat-cell:nth-last-child(-n + 3) { border-bottom: 0; }
.stat-cell span {
  display: block;
  color: var(--low);
  font: 700 8px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stat-cell strong {
  display: block;
  margin-top: 9px;
  font-size: 27px;
  font-weight: 300;
}
.stat-cell.warn strong { color: var(--amber); }
.chart-card {
  margin-top: 27px;
  padding: 24px;
  border: 1px solid var(--hair);
  background: linear-gradient(160deg, rgba(255,255,255,0.035), transparent), var(--surface);
}
.chart-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.chart-head .section-kicker { margin-bottom: 8px; }
.chart-head h2, .info-panel h2, .conditions h2, .activation-card h2, .broker-modal h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 300;
  letter-spacing: -0.025em;
}
.chart-head p:last-child {
  margin: 7px 0 0;
  color: var(--low);
  font: 600 8px var(--mono);
  line-height: 1.5;
}
.chart-legend { color: var(--green); font: 700 8px var(--mono); white-space: nowrap; }
.chart-legend::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  margin-right: 7px;
  background: var(--green);
  vertical-align: middle;
}
.chart-wrap { position: relative; min-height: 330px; margin-top: 17px; }
.chart-wrap svg { display: block; width: 100%; height: 330px; overflow: visible; }
.chart-grid-line { stroke: rgba(240,232,216,0.08); stroke-width: 1; }
.chart-axis { fill: var(--low); font: 10px var(--mono); }
.chart-area { fill: url(#equityFill); }
.chart-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(74,222,128,0.35));
}
.chart-empty {
  min-height: 330px;
  border: 1px dashed var(--hair);
  color: var(--muted);
  display: grid;
  place-items: center;
  font: 700 10px var(--mono);
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}
.chart-empty[hidden] { display: none; }
.strategy-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 20px; margin-top: 26px; }
.info-panel { padding: 25px; border: 1px solid var(--hair); background: rgba(255,255,255,0.015); }
.info-panel.risk { border-color: rgba(255,181,71,0.35); background: rgba(255,181,71,0.035); }
.info-panel.risk .section-kicker { color: var(--amber); }
.info-panel p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.72;
}
.conditions { margin-top: 27px; padding-top: 25px; border-top: 1px solid var(--hair); }
.conditions .section-kicker { margin-bottom: 8px; }
.condition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 17px;
  border: 1px solid var(--hair);
  background: var(--hair);
}
.condition-cell { padding: 15px; background: var(--ink); }
.condition-cell span { display: block; color: var(--low); font: 700 8px var(--mono); text-transform: uppercase; letter-spacing: 0.11em; }
.condition-cell strong { display: block; margin-top: 7px; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.disclaimer { margin: 19px 0 0; color: var(--low); font-size: 10px; line-height: 1.65; }
.activation-card {
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 24px;
  border: 1px solid rgba(74,222,128,0.35);
  background: var(--surface);
  box-shadow: 0 24px 75px rgba(0,0,0,0.4);
}
.activation-heading { display: flex; justify-content: space-between; gap: 14px; }
.activation-heading span { color: var(--green); font: 700 8px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.activation-card > p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.activation-steps { margin: 18px 0 0; padding: 0; list-style: none; }
.activation-steps li { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--hair); font-size: 11px; line-height: 1.45; }
.activation-steps span { color: var(--green); font: 700 9px var(--mono); }
.primary-action, .download-action, .pending-connection button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  font: 800 9px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.primary-action { margin-top: 14px; background: var(--green); color: #07100a; cursor: pointer; }
.primary-action:hover { background: var(--green-bright); }
.text-action { width: 100%; border: 0; background: none; color: var(--muted); padding: 13px 4px; font: 600 8px var(--mono); cursor: pointer; }
.download-action { border: 1px solid var(--hair); border-radius: 0; background: transparent; color: var(--low); }
.connection-note { margin-bottom: 0; color: var(--low) !important; font-size: 9px !important; }
footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 30px 42px;
  border-top: 1px solid var(--hair);
  display: flex;
  gap: 22px;
  color: var(--low);
  font: 700 8px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 24px;
  background: rgba(4,3,7,0.82);
  backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
}
.modal-backdrop[hidden] { display: none; }
.broker-modal {
  width: min(610px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 31px;
  border: 1px solid var(--hair);
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0,0,0,0.65);
}
.modal-close { float: right; border: 0; background: transparent; color: var(--muted); font: 700 9px var(--mono); text-transform: uppercase; cursor: pointer; }
.broker-modal > p:not(.section-kicker) { color: var(--muted); font-size: 13px; line-height: 1.65; }
.broker-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.broker-options a { padding: 20px; border: 1px solid var(--hair); text-decoration: none; background: var(--ink); }
.broker-options a:hover { border-color: var(--green); }
.broker-options strong, .broker-options span, .broker-options em { display: block; }
.broker-options strong { font-size: 19px; font-weight: 400; }
.broker-options span { margin-top: 8px; color: var(--low); font: 600 8px var(--mono); }
.broker-options em { margin-top: 20px; color: var(--green); font: 700 9px var(--mono); font-style: normal; text-transform: uppercase; }
.pending-connection { margin-top: 20px; padding: 18px; border: 1px dashed var(--hair); }
.pending-connection p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.pending-connection button { border: 1px solid var(--hair); border-radius: 0; background: transparent; color: var(--low); }
.not-found { max-width: 720px; margin: 90px auto; text-align: center; }
.not-found h1 { font-size: clamp(42px, 8vw, 80px); font-weight: 200; }
.not-found a { color: var(--green); font: 700 10px var(--mono); text-transform: uppercase; }

@media (max-width: 900px) {
  .license-hero, .license-layout { grid-template-columns: 1fr; }
  .user-count { max-width: 320px; }
  .activation-card { position: static; }
  .strategy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .site-head, main, footer { padding-left: 20px; padding-right: 20px; }
  .site-head nav a:last-child { display: none; }
  .license-hero { padding-top: 38px; }
  .license-hero h1 { font-size: clamp(40px, 13vw, 58px); }
  .stat-grid, .condition-grid { grid-template-columns: 1fr 1fr; }
  .stat-cell:nth-child(n) { border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
  .stat-cell:nth-child(2n) { border-right: 0; }
  .stat-cell:nth-last-child(-n + 2) { border-bottom: 0; }
  .chart-card { padding: 17px; }
  .chart-head { align-items: flex-start; flex-direction: column; }
  .chart-wrap, .chart-wrap svg, .chart-empty { min-height: 235px; height: 235px; }
  .broker-options { grid-template-columns: 1fr; }
  footer { flex-wrap: wrap; }
}
