:root {
  --bg0: #02040b;
  --bg1: #08111f;
  --bg2: #0d1728;
  --card: rgba(9, 14, 26, 0.9);
  --card-strong: rgba(12, 19, 34, 0.98);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f6ff;
  --muted: #8c98b7;
  --muted-strong: #d0d8ea;
  --accent: #68f0bd;
  --accent2: #5f8dff;
  --accent3: #ffb14e;
  --danger: #ff7474;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, rgba(104, 240, 189, 0.12), transparent 18%),
    radial-gradient(circle at 86% 8%, rgba(95, 141, 255, 0.14), transparent 20%),
    radial-gradient(circle at 64% 80%, rgba(255, 177, 78, 0.08), transparent 18%),
    linear-gradient(145deg, var(--bg0), var(--bg1) 55%, var(--bg2));
  font-family: "Inter", "Segoe UI Variable", "Aptos", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 0%, black 45%, transparent 100%);
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(64px);
  opacity: 0.34;
  pointer-events: none;
}
.orb-a { width: 340px; height: 340px; background: rgba(104, 240, 189, 0.20); top: -120px; left: -110px; }
.orb-b { width: 440px; height: 440px; background: rgba(95, 141, 255, 0.18); top: 12%; right: -170px; }
.orb-c { width: 250px; height: 250px; background: rgba(255, 177, 78, 0.12); bottom: 8%; left: 18%; }

.shell {
  width: min(1360px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 18px 0 44px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.topbar-links {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-links a {
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
}

.topbar-links a.active,
.topbar-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(105, 227, 179, 0.95), rgba(120, 166, 255, 0.9));
  color: #08111d;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(105, 227, 179, 0.2);
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.topbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-strong);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(105, 227, 179, 0.12);
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
}

.hero {
  padding: 22px;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 16px;
  overflow: hidden;
}

.hero-copy { padding: 6px 4px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 800;
}

h1 {
  margin: 12px 0 10px;
  font-size: clamp(36px, 5.2vw, 68px);
  line-height: 0.92;
  letter-spacing: -0.06em;
  max-width: 11ch;
}

.lede {
  max-width: 68ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.68;
  margin: 0;
}

.searchbar {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.searchbar input {
  flex: 1 1 280px;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 10, 22, 0.76);
  color: var(--text);
  padding: 0 16px;
  font-size: 15px;
  outline: none;
}

.searchbar input::placeholder { color: #9aa7c7; }
.searchbar input:focus {
  border-color: rgba(120, 166, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(120, 166, 255, 0.15);
}

.searchbar button,
.chip {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.searchbar button {
  color: #06111c;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  box-shadow: 0 18px 32px rgba(95, 141, 255, 0.16);
}

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.chip {
  min-height: 38px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.chip-ghost {
  background: transparent;
  color: var(--muted-strong);
}

.searchbar button:hover,
.chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.hero-aside {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 12px;
  align-self: start;
}

.aside-card {
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: rgba(6, 10, 20, 0.78);
  border: 1px solid var(--line);
  min-height: 144px;
}

.snapshot-card {
  min-height: auto;
}

.aside-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.price-chip {
  min-width: 118px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  text-align: right;
}

.price-chip-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.price-chip-value {
  margin-top: 6px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.price-chip-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

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

.snapshot-grid div {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}

.snapshot-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.snapshot-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  font-weight: 750;
  color: var(--text);
}

.chart-card {
  padding-bottom: 14px;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.chart-title {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 800;
}

.chart-controls {
  display: inline-flex;
  gap: 8px;
}

.chart-toggle {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.chart-toggle.active {
  background: rgba(104, 240, 189, 0.12);
  color: #dbffee;
  border-color: rgba(104, 240, 189, 0.24);
}

.chart-svg {
  width: 100%;
  height: 220px;
  display: block;
  overflow: hidden;
}

.aside-card.accent {
  background: linear-gradient(145deg, rgba(105, 227, 179, 0.12), rgba(120, 166, 255, 0.14));
  border-color: rgba(120, 166, 255, 0.22);
}

.aside-label,
.strip-label,
.metric-label,
.section-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.aside-value {
  margin-top: 12px;
  font-size: 27px;
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.aside-sub {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

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

.strip-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(7, 11, 19, 0.76);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.strip-value {
  margin-top: 8px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.45;
}

.results {
  padding: 18px;
  margin-top: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-head.compact {
  margin-bottom: 10px;
}

.section-head h2,
.panel-wrap h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-kicker {
  color: var(--muted-strong);
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
}

.panels {
  display: grid;
  gap: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
}

.empty-state {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.12);
  color: var(--muted);
}

.panel h3 {
  margin-bottom: 10px;
}

.panel-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
}

.putscreen-panel {
  min-height: 100%;
}

.idea-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.idea-form {
  min-height: 100%;
}

.idea-controls {
  margin-top: 0;
}

.idea-controls input {
  min-width: 0;
  flex: 1 1 160px;
}

.idea-result {
  min-height: 100%;
}

.idea-focus-grid {
  margin-top: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: top;
}

.table th {
  color: #dbe6ff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.table td { color: var(--text); }
.muted { color: var(--muted); }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 12px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.split.split-3 {
  grid-template-columns: 1fr 1fr 1.2fr;
}

.split.split-2 {
  grid-template-columns: 0.95fr 1.05fr;
}

.putscreen-shell {
  width: min(1400px, calc(100vw - 24px));
}

.putscreen-hero {
  grid-template-columns: 1.15fr 0.85fr;
}

.putscreen-focus-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.table-shell {
  overflow-x: auto;
}

.putscreen-table tbody tr.row-focus {
  background: rgba(104, 240, 189, 0.08);
}

.putscreen-table tbody tr.row-focus td {
  border-bottom-color: rgba(104, 240, 189, 0.16);
}

.good { color: var(--accent); }
.bad { color: var(--danger); }

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

  .split.split-3 {
    grid-template-columns: 1fr;
  }

  .split.split-2 {
    grid-template-columns: 1fr;
  }

  .idea-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .hero-aside {
    position: static;
  }

  h1 {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 18px, 1240px);
    padding-top: 12px;
  }

  .hero,
  .results {
    padding: 14px;
    border-radius: 18px;
  }

  .aside-value {
    font-size: 23px;
  }

  .table {
    font-size: 13px;
  }
}
