:root {
  --bg: #070b0d;
  --bg-2: #0d1515;
  --ink: #edf8f2;
  --muted: #8ea19a;
  --panel: rgba(13, 22, 21, 0.78);
  --panel-strong: rgba(16, 29, 27, 0.94);
  --line: rgba(165, 255, 216, 0.16);
  --line-strong: rgba(147, 255, 211, 0.34);
  --green: #50f2a7;
  --green-dark: #0db976;
  --cyan: #58d8ff;
  --amber: #ffbf5f;
  --red: #ff6f61;
  --violet: #b39cff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  overflow-x: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(80, 242, 167, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 216, 255, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, #050807 0%, #0b1212 48%, #10130e 100%);
  background-size: 46px 46px, 46px 46px, auto;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1500px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  position: relative;
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: end;
  overflow: hidden;
  padding: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(110deg, rgba(4, 9, 9, 0.9), rgba(9, 20, 19, 0.5) 58%, rgba(7, 10, 8, 0.78)),
    url("https://images.unsplash.com/photo-1596176530529-78163a4f7af2?auto=format&fit=crop&w=1800&q=85")
      center/cover;
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(80, 242, 167, 0.26) 49%, transparent 50%),
    linear-gradient(0deg, transparent 0 72%, rgba(88, 216, 255, 0.18) 73%, transparent 74%);
  background-size: 96px 96px;
  mix-blend-mode: screen;
  opacity: 0.32;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 900;
  color: var(--green);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 880px;
  margin-bottom: 18px;
  font-size: 5.8rem;
  line-height: 0.92;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.lede {
  max-width: 820px;
  margin-bottom: 0;
  color: #d5e6df;
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 12px;
  margin-top: 28px;
}

.hero-stats div,
.hero-meter,
.market-strip,
.panel,
.result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-stats div {
  min-height: 86px;
  padding: 16px;
  border-radius: 8px;
}

.hero-stats strong {
  display: block;
  font-size: 1.75rem;
  color: white;
}

.hero-stats span,
.hero-meter span,
.result-card span,
.details-grid span,
.market-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-meter {
  padding: 22px;
  border-radius: 8px;
}

.hero-meter strong {
  display: block;
  margin: 10px 0 16px;
  font-size: 1.9rem;
}

.hero-meter small {
  display: block;
  margin-top: 12px;
  color: #b7c9c1;
}

.meter-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.meter-fill {
  height: 100%;
  width: 54%;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--amber));
  box-shadow: 0 0 24px rgba(80, 242, 167, 0.7);
}

.workspace {
  display: grid;
  grid-template-columns: 410px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  align-items: start;
  min-width: 0;
}

.panel,
.result-card,
.market-strip {
  border-radius: 8px;
  min-width: 0;
}

.controls {
  position: sticky;
  top: 16px;
  padding: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

label,
fieldset {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #d9e7e1;
  font-size: 0.88rem;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(165, 255, 216, 0.2);
  border-radius: 6px;
  padding: 0 12px;
  color: #102019;
  background: rgba(236, 255, 246, 0.94);
}

input::placeholder {
  color: #51665d;
}

select option {
  color: #101a16;
  background: #f2fff8;
}

.field-help {
  display: block;
  margin-top: -2px;
  color: #b6c9c1;
  font-size: 0.75rem;
  line-height: 1.35;
  font-weight: 600;
}

input:focus,
select:focus,
button:focus {
  outline: 3px solid rgba(80, 242, 167, 0.18);
  border-color: var(--green);
}

.input-unit {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid rgba(165, 255, 216, 0.2);
  border-radius: 6px;
  background: rgba(236, 255, 246, 0.94);
}

.input-unit input {
  border: 0;
  background: transparent;
  color: #102019;
}

.input-unit small {
  padding-right: 12px;
  color: #33483e;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label {
  min-height: 42px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 6px;
  color: #a8bab3;
  cursor: pointer;
}

.segmented input:checked + label {
  background: linear-gradient(135deg, rgba(80, 242, 167, 0.22), rgba(88, 216, 255, 0.18));
  color: white;
  border: 1px solid var(--line-strong);
}

fieldset {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.survey-box {
  background: rgba(88, 216, 255, 0.055);
}

legend {
  padding: 0 6px;
  color: var(--green);
}

.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 650;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green-dark);
}

.ghost-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(80, 242, 167, 0.08);
  color: var(--green);
  cursor: pointer;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.glow-button {
  box-shadow: 0 0 26px rgba(80, 242, 167, 0.18);
}

.live-toggle {
  margin-top: -4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(80, 242, 167, 0.06);
}

.results {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.microcopy {
  margin: 7px 0 0;
  color: #aebfb8;
  font-size: 0.82rem;
  line-height: 1.45;
}

.live-panel {
  border-color: rgba(88, 216, 255, 0.32);
  background:
    linear-gradient(135deg, rgba(88, 216, 255, 0.08), rgba(80, 242, 167, 0.05)),
    var(--panel);
}

.live-grid,
.radar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.live-grid div,
.source-dock a,
.news-card,
.radar-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.live-grid div {
  min-height: 118px;
  padding: 14px;
}

.live-grid span,
.radar-card span,
.news-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.live-grid strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.6rem;
  color: white;
}

.live-grid small,
.news-card small,
.radar-card small {
  color: #aebfb8;
  line-height: 1.4;
}

.source-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.source-dock a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  color: #dffaf0;
  text-decoration: none;
}

.source-dock a:hover {
  border-color: var(--green);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.news-card {
  min-height: 112px;
  padding: 14px;
  color: inherit;
  text-decoration: none;
}

.news-card strong {
  display: block;
  margin: 8px 0;
  color: white;
  text-decoration: none;
  line-height: 1.35;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
}

.chart-card,
.doc-card {
  min-height: 210px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.chart-card span,
.doc-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.svg-chart {
  min-height: 178px;
  margin-top: 8px;
}

.svg-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.compact-chart {
  display: grid;
  place-items: center;
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
}

.market-strip div {
  min-height: 96px;
  padding: 18px;
  background: rgba(10, 19, 18, 0.78);
}

.market-strip strong {
  display: block;
  margin-top: 10px;
  font-size: 1.35rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.result-card {
  position: relative;
  min-height: 140px;
  overflow: hidden;
  padding: 18px;
}

.result-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 88px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green));
}

.result-card strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 2rem;
  line-height: 1;
  color: white;
}

.result-card small {
  color: #aebfb8;
  line-height: 1.35;
}

.main-card {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(80, 242, 167, 0.18), rgba(88, 216, 255, 0.1)),
    var(--panel-strong);
  border-color: rgba(80, 242, 167, 0.42);
}

.main-card strong {
  color: var(--green);
  text-shadow: 0 0 28px rgba(80, 242, 167, 0.36);
}

.panel {
  padding: 20px;
}

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(80, 242, 167, 0.15);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.badge.muted {
  background: rgba(88, 216, 255, 0.12);
  color: #bdeeff;
}

.bar-chart {
  display: grid;
  gap: 12px;
  margin: 8px 0 20px;
}

.bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 112px;
  gap: 12px;
  align-items: center;
  font-size: 0.86rem;
}

.bar-row span {
  color: #ccddd6;
}

.bar-bg {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar {
  height: 100%;
  width: 20%;
  border-radius: inherit;
  box-shadow: 0 0 18px currentColor;
}

.bar-row strong {
  text-align: right;
  color: white;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.details-grid div,
.signal,
.scenario,
.doc-card {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.details-grid strong {
  display: block;
  margin-top: 8px;
  color: white;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.scenario {
  min-height: 142px;
}

.scenario span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scenario strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 1.75rem;
}

.scenario small {
  color: #aebfb8;
  line-height: 1.4;
}

.scenario:nth-child(1) strong {
  color: var(--amber);
}

.scenario:nth-child(2) strong {
  color: var(--green);
}

.scenario:nth-child(3) strong {
  color: var(--cyan);
}

.radar-card {
  position: relative;
  min-height: 138px;
  padding: 14px;
  overflow: hidden;
}

.radar-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--amber));
}

.radar-card strong {
  display: block;
  margin: 12px 0 8px;
  color: white;
  line-height: 1.3;
}

.radar-card em {
  color: var(--green);
  font-style: normal;
}

.doc-options {
  display: grid;
  gap: 4px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.doc-card {
  min-height: 128px;
}

.doc-card strong {
  display: block;
  margin: 10px 0 8px;
  color: white;
  line-height: 1.25;
}

.doc-card small {
  color: #aebfb8;
  line-height: 1.4;
}

.story {
  max-width: 890px;
  color: #c5d6cf;
  line-height: 1.62;
}

.signal-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.signal strong {
  display: block;
  margin-bottom: 4px;
  color: white;
}

.signal small {
  color: #aebfb8;
  line-height: 1.4;
}

.caution {
  border-left: 5px solid var(--amber);
}

.caution p {
  margin-bottom: 0;
  color: #dcc9a5;
  line-height: 1.55;
}

.sources {
  margin-top: 24px;
  padding: 22px 4px 8px;
  color: #9aaba4;
  line-height: 1.55;
}

.sources h2 {
  color: var(--ink);
}

.signature {
  display: grid;
  place-items: center;
  min-height: 56px;
  margin-top: 22px;
  padding: 14px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(13, 22, 21, 0.62);
}

.signature strong {
  color: #dcece6;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.print-report {
  display: none;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--green);
}

@media (max-width: 1120px) {
  .workspace,
  .hero {
    grid-template-columns: 1fr;
  }

  .controls {
    position: static;
  }

  .summary-grid,
  .details-grid,
  .market-strip,
  .live-grid,
  .radar-grid,
  .chart-grid,
  .doc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  h1 {
    font-size: 4.4rem;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 12px;
  }

  .hero {
    min-height: 600px;
    padding: 20px;
  }

  h1 {
    font-size: 2.42rem;
    line-height: 1;
  }

  .eyebrow {
    font-size: 0.62rem;
    line-height: 1.35;
  }

  .result-card strong {
    font-size: 1.55rem;
  }

  .hero-stats,
  .grid-two,
  .segmented,
  .summary-grid,
  .details-grid,
  .signal-list,
  .scenario-grid,
  .news-grid,
  .live-grid,
  .radar-grid,
  .chart-grid,
  .doc-grid,
  .market-strip {
    grid-template-columns: 1fr;
  }

  .signature {
    display: grid;
  }

  .main-card {
    grid-column: auto;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bar-row strong {
    text-align: left;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: #ffffff !important;
    color: #121a16 !important;
  }

  body > *:not(.app-shell),
  .hero,
  .workspace,
  .sources,
  .signature {
    display: none !important;
  }

  .app-shell {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .print-report {
    display: block !important;
    width: 100%;
    color: #121a16;
    background: #ffffff;
    font-family:
      "Aptos Display", "Segoe UI", Arial, sans-serif;
  }

  .print-page {
    min-height: 270mm;
    page-break-after: always;
    padding: 0;
  }

  .print-page:last-child {
    page-break-after: auto;
  }

  .print-cover {
    min-height: 270mm;
    display: grid;
    align-content: space-between;
    padding: 16mm;
    color: #ffffff;
    background:
      linear-gradient(135deg, rgba(9, 28, 23, 0.94), rgba(10, 68, 57, 0.86)),
      linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
      linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: auto, 12mm 12mm, 12mm 12mm;
    border-radius: 0;
  }

  .print-kicker {
    margin: 0 0 8mm;
    color: #79ffd0;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 10pt;
    font-weight: 800;
  }

  .print-cover h1 {
    margin: 0;
    max-width: 150mm;
    color: #ffffff;
    font-size: 44pt;
    line-height: 0.95;
    letter-spacing: 0;
  }

  .print-cover p {
    max-width: 150mm;
    color: #dff7ed;
    font-size: 13pt;
    line-height: 1.55;
  }

  .print-byline {
    display: flex;
    justify-content: space-between;
    gap: 10mm;
    border-top: 1px solid rgba(255,255,255,.24);
    padding-top: 8mm;
    color: #dff7ed;
  }

  .print-byline strong {
    display: block;
    color: #ffffff;
    font-size: 13pt;
  }

  .print-header {
    display: flex;
    justify-content: space-between;
    gap: 12mm;
    align-items: flex-start;
    margin-bottom: 8mm;
    padding-bottom: 5mm;
    border-bottom: 2px solid #0f6b4d;
  }

  .print-header h2 {
    margin: 0;
    color: #0d251c;
    font-size: 22pt;
  }

  .print-header span,
  .print-card span,
  .print-table th {
    color: #527065;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 8pt;
    font-weight: 800;
  }

  .print-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4mm;
    margin-bottom: 6mm;
  }

  .print-grid.two {
    grid-template-columns: 1fr 1fr;
  }

  .print-card {
    min-height: 24mm;
    padding: 5mm;
    border: 1px solid #d7e4dd;
    border-radius: 4mm;
    background: #f7fbf8;
  }

  .print-card.feature {
    background: #0d2c22;
    color: #ffffff;
  }

  .print-card.feature span {
    color: #9fffd8;
  }

  .print-card strong {
    display: block;
    margin-top: 3mm;
    color: #102019;
    font-size: 16pt;
    line-height: 1.05;
  }

  .print-card.feature strong {
    color: #ffffff;
    font-size: 20pt;
  }

  .print-card small {
    display: block;
    margin-top: 2mm;
    color: #52665d;
    line-height: 1.35;
  }

  .print-card.feature small {
    color: #d7f7e9;
  }

  .print-section {
    margin-top: 8mm;
  }

  .print-section h3 {
    margin: 0 0 4mm;
    color: #0d251c;
    font-size: 15pt;
  }

  .print-chart {
    padding: 4mm;
    border: 1px solid #d7e4dd;
    border-radius: 4mm;
    background: #ffffff;
  }

  .print-chart svg {
    display: block;
    width: 100%;
    height: auto;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 4mm;
  }

  .print-table th,
  .print-table td {
    padding: 3.2mm;
    border: 1px solid #d7e4dd;
    text-align: left;
    vertical-align: top;
    font-size: 10pt;
  }

  .print-table th {
    background: #eef7f1;
  }

  .print-note {
    margin-top: 6mm;
    padding: 4mm;
    border-left: 4px solid #d9902e;
    background: #fff7e8;
    color: #4b3b20;
    line-height: 1.45;
  }

  .print-footer-name {
    margin-top: 12mm;
    text-align: center;
    color: #40544b;
    font-size: 9pt;
    letter-spacing: 0.05em;
  }
}
