:root {
  --bg: #08111f;
  --bg-2: #101d34;
  --panel: rgba(8, 17, 31, 0.62);
  --panel-strong: rgba(12, 23, 42, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --text: #e5eefb;
  --muted: #93a4be;
  --teal: #2dd4bf;
  --cyan: #67e8f9;
  --lime: #bef264;
  --amber: #fbbf24;
  --pink: #f472b6;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(45, 212, 191, 0.18), transparent 24%),
    radial-gradient(circle at 85% 18%, rgba(103, 232, 249, 0.18), transparent 24%),
    radial-gradient(circle at 50% 80%, rgba(244, 114, 182, 0.1), transparent 28%),
    linear-gradient(180deg, #060d18 0%, #091221 38%, #101b31 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.56), transparent 88%);
}

.shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.hero,
.workspace,
.stats-strip,
.guide-panel,
.comments-panel {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.panel,
.stats-strip article {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 21, 38, 0.84), rgba(8, 17, 31, 0.68));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.panel {
  border-radius: 30px;
}

.hero-copy {
  padding: 44px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-kicker {
  margin-bottom: 12px;
  color: var(--lime);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

h1 {
  max-width: 13ch;
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 62ch;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.hero-actions,
.hero-badges,
.inline-actions,
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-link,
.primary-button,
.ghost-button,
.preset-chip {
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.primary-link,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border: 0;
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(45, 212, 191, 0.28);
}

.ghost-button,
.preset-chip {
  padding: 13px 17px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.primary-link:hover,
.primary-button:hover,
.ghost-button:hover,
.preset-chip:hover {
  transform: translateY(-1px);
}

.count-pill,
.hero-highlights article {
  border: 1px solid rgba(103, 232, 249, 0.16);
}

.count-pill {
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.hero-highlights article {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.hero-highlights strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.98rem;
}

.hero-highlights span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
}

.hero-metric {
  padding: 26px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.24), transparent 42%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(103, 232, 249, 0.14);
}

.hero-metric span,
.hero-mini-grid span,
.result-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-metric strong {
  display: block;
  max-width: 100%;
  margin: 10px 0 8px;
  font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.hero-metric p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-note {
  padding: 18px 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.hero-note strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.98rem;
}

.hero-note p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.hero-mini-grid article,
.result-card,
.subpanel,
.guide-grid article,
.scenario-item,
.compare-row {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.hero-mini-grid article {
  padding: 18px;
  border-radius: 22px;
}

.hero-mini-grid strong {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.ad-band,
.ad-grid {
  margin-top: 24px;
}

.ad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stats-strip article {
  padding: 18px 20px;
  border-radius: 22px;
}

.stats-strip span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.stats-strip strong {
  font-size: 1.1rem;
}

.ad-slot {
  padding: 22px;
  border: 1px dashed rgba(103, 232, 249, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.08), rgba(103, 232, 249, 0.03)),
    rgba(255, 255, 255, 0.02);
}

.ad-slot-wide {
  min-height: 140px;
}

.ad-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-slot strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.ad-slot p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 24px;
  margin-top: 24px;
}

.secondary-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
}

.panel {
  padding: 28px;
}

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

.section-head h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
  line-height: 1.08;
}

.preset-row {
  margin-bottom: 22px;
}

.preset-chip.is-active {
  border-color: rgba(45, 212, 191, 0.4);
  background: rgba(45, 212, 191, 0.12);
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.calculator-grid label {
  display: grid;
  gap: 8px;
}

.calculator-grid span {
  font-size: 0.92rem;
  font-weight: 700;
}

.calculator-grid input,
.calculator-grid select {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.calculator-grid input:focus,
.calculator-grid select:focus {
  outline: 2px solid rgba(103, 232, 249, 0.18);
  border-color: rgba(103, 232, 249, 0.34);
}

.save-status {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.save-status.is-saved {
  color: var(--lime);
}

.save-status.is-warning {
  color: var(--amber);
}

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

.result-card {
  min-height: 154px;
  padding: 20px;
  border-radius: 24px;
}

.result-card strong {
  display: block;
  max-width: 100%;
  margin: 14px 0 10px;
  font-size: clamp(1.05rem, 2vw, 1.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.result-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.result-card-primary {
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.18), transparent 36%),
    rgba(255, 255, 255, 0.05);
}

.section-subgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.subpanel {
  padding: 20px;
  border-radius: 24px;
}

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

.subpanel-head h3 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.subpanel-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.breakdown-list,
.breakdown-list div {
  margin: 0;
}

.breakdown-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.12);
}

.breakdown-list dt,
.breakdown-list dd {
  margin: 0;
}

.breakdown-list dt {
  color: var(--muted);
}

.breakdown-list dd {
  font-weight: 700;
  max-width: 100%;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.insight-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.scenario-list {
  display: grid;
  gap: 12px;
}

.scenario-item {
  padding: 16px;
  border-radius: 22px;
}

.scenario-item.is-selected {
  border-color: rgba(103, 232, 249, 0.34);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.18);
}

.scenario-top,
.scenario-meta,
.scenario-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.scenario-top {
  align-items: start;
  margin-bottom: 10px;
}

.scenario-top h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.scenario-top p,
.scenario-meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.scenario-meta {
  margin-bottom: 14px;
}

.scenario-actions {
  flex-wrap: wrap;
}

.mini-button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.compare-empty,
.compare-row {
  border-radius: 22px;
}

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.compare-empty {
  padding: 22px;
  color: var(--muted);
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--line-strong);
}

.compare-table {
  display: grid;
  gap: 12px;
}

.is-hidden {
  display: none !important;
}

.compare-table.is-hidden {
  display: none;
}

.compare-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
}

.compare-row span {
  color: var(--muted);
}

.compare-row strong {
  max-width: 100%;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.compare-row strong.is-positive {
  color: var(--lime);
}

.compare-row strong.is-negative {
  color: var(--pink);
}

.guide-panel,
.comments-panel {
  margin-top: 24px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-grid article {
  padding: 20px;
  border-radius: 24px;
}

.guide-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
}

#disqus_thread {
  min-height: 180px;
}

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

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

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1280px);
    padding: 14px 0 42px;
  }

  .hero-copy,
  .panel,
  .hero-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-copy {
    padding-top: 28px;
  }

  .calculator-grid,
  .summary-grid,
  .guide-grid,
  .stats-strip,
  .hero-mini-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .scenario-top,
  .scenario-meta,
  .scenario-actions {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    max-width: none;
  }
}
