:root {
  --bg: #020617;
  --bg-elevated: #020617;
  --bg-soft: #0b1220;
  --bg-alt: #020617;
  --card: #020617;
  --card-alt: #020617;
  --card-border: #1e293b;
  --primary: #38bdf8;
  --primary-soft: rgba(56, 189, 248, 0.12);
  --primary-strong: #0ea5e9;
  --accent: #60a5fa;
  --accent-soft: rgba(96, 165, 250, 0.12);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;
  --danger: #fb7185;
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-pill: 999px;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.9);
  --shadow-card: 0 22px 55px rgba(15, 23, 42, 0.75);
  --border-subtle: 1px solid rgba(148, 163, 184, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #0f172a 0%, #020617 55%, #000 100%);
  color: var(--text-main);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

/* Layout */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  padding: 4.5rem 0;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 2rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 600px;
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.7));
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.2), 0 14px 35px rgba(15, 23, 42, 0.8);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e5f1ff;
}

.brand-tagline {
  font-size: 0.78rem;
  color: #9ca3af;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-nav a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.35rem 0;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.15rem;
  margin: 0 auto;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  transition: width 0.2s ease;
}

.main-nav a:hover {
  color: #e5f1ff;
}

.main-nav a:hover::after {
  width: 80%;
}

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.25rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #e5e7eb;
  border-radius: 999px;
  margin-bottom: 4px;
}

/* Hero */

.hero {
  padding: 3.75rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-copy h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 2.5rem;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.hero-copy p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 520px;
}

.accent {
  background: linear-gradient(to right, var(--primary), var(--accent), #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.btn {
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-primary {
  background: linear-gradient(to right, var(--primary), var(--accent));
  color: #0b1020;
  box-shadow: 0 20px 45px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 25px 55px rgba(37, 99, 235, 0.45);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
  margin-top: 1.5rem;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  background: radial-gradient(circle at left, rgba(56, 189, 248, 0.25), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.hero-stats dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #cbd5f5;
}

.hero-stats dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

/* Hero visual */

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-card {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.25), rgba(15, 23, 42, 1));
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: var(--shadow-card);
}

.hero-card-title {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #bfdbfe;
  margin: 0 0 0.75rem;
}

.hero-card-value {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
}

.hero-card-sub {
  margin: 0.4rem 0 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-mini-bars {
  display: grid;
  gap: 0.5rem;
}

.mini-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mini-bar span:first-child {
  font-size: 0.8rem;
  color: #cbd5f5;
  min-width: 130px;
}

.mini-bar-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.mini-bar-track span {
  display: block;
  height: 100%;
  background: linear-gradient(to right, #38bdf8, #6366f1);
}

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0;
  border: var(--border-subtle);
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.2), rgba(15, 23, 42, 0.95));
  box-shadow: var(--shadow-card);
}

.hero-image img {
  width: 100%;
  display: block;
}

.hero-image figcaption {
  padding: 0.75rem 1rem 1rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* Cards & inputs */

.card {
  background: radial-gradient(circle at top left, rgba(15, 118, 255, 0.16), rgba(15, 23, 42, 0.97));
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  padding: 1.75rem 1.6rem;
  box-shadow: var(--shadow-card);
}

.card-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  margin-bottom: 1.3rem;
}

.card-divider {
  border: 0;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
  margin: 1.5rem 0 1.25rem;
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  gap: 1.75rem;
}

.calc-card h3,
.results-card h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #e5e7eb;
}

.field-input {
  display: flex;
  align-items: stretch;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.45);
  overflow: hidden;
}

.field input,
.field select {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}

.field-input input,
.field-input select {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
}

.field-input .prefix,
.field-input .suffix {
  padding: 0 0.7rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
}

.field small {
  font-size: 0.75rem;
  color: var(--text-soft);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-soft);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: #111827;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(to right, #38bdf8, #6366f1);
  border: 2px solid #0b1120;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.35);
}

/* Results */

.results-card {
  position: sticky;
  top: 5.5rem;
  align-self: flex-start;
}

.results-main {
  display: grid;
  gap: 0.65rem;
}

.results-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.results-row span {
  color: var(--text-soft);
}

.results-row strong {
  font-size: 0.95rem;
}

.results-main .results-row:nth-child(2) strong {
  font-size: 1.15rem;
}

.results-pill {
  margin: 1rem 0 1.25rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  font-size: 0.78rem;
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.6);
}

.results-sub h4 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.results-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: grid;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 0.4rem;
}

.dot-pay {
  background: #38bdf8;
}
.dot-commute {
  background: #6366f1;
}
.dot-sleep {
  background: #a855f7;
}
.dot-stress {
  background: #fb7185;
}

.results-footnote {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.disclaimer {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 1.1rem;
}

/* Chart section */

.chart-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 1.75rem;
}

.chart-inputs h3,
.chart-visual h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.expenses-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.expense-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.expense-row input {
  width: 100%;
}

.expense-remove {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.55);
  color: #fecaca;
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.chart-note {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: 0.75rem;
}

.chart-visual {
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.25), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(96, 165, 250, 0.45);
  padding: 1.4rem 1.3rem 1.3rem;
  box-shadow: var(--shadow-card);
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  height: 220px;
  margin: 0.75rem 0 0.55rem;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.chart-bar-column {
  width: 100%;
  max-width: 46px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.chart-bar-fill {
  width: 100%;
  background: linear-gradient(to top, #38bdf8, #6366f1);
  transition: height 0.25s ease;
}

.chart-bar-label {
  font-size: 0.75rem;
  color: var(--text-soft);
  text-align: center;
}

.chart-bar-value {
  font-size: 0.78rem;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.legend-color {
  width: 18px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, #38bdf8, #6366f1);
}

.chart-summary {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

/* Info / guides / legal */

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

.info-block {
  background: rgba(15, 23, 42, 0.88);
  border-radius: 1.25rem;
  padding: 1.4rem 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.info-block h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.info-block p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.formula {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px dashed rgba(96, 165, 250, 0.6);
  color: #dbeafe;
  margin: 0.5rem 0 0.75rem;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.guide-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1.4rem 1.3rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

.guide-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 0.98rem;
}

.guide-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.guide-extra {
  margin-top: 2.25rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 1.25rem;
  padding: 1.6rem 1.5rem;
  border: 1px solid rgba(96, 165, 250, 0.45);
}

.guide-extra h3 {
  margin: 0 0 0.6rem;
}

.guide-extra p,
.guide-extra li {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* FAQ */

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}

.faq-list details {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 0.75rem 0.95rem;
}

.faq-list summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}

.faq-list p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Legal grid */

.legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr);
  gap: 2rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding: 2.25rem 0 2.5rem;
  background: radial-gradient(circle at bottom, rgba(56, 189, 248, 0.1), #020617);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: flex-start;
}

.footer-left {
  max-width: 460px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.footer-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(circle at center, #22d3ee, #1d4ed8);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
}

.footer-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: flex-start;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: #e5e7eb;
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-soft);
}

.footer-small {
  opacity: 0.85;
}

/* Responsive */

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

  .hero-visual {
    order: -1;
  }

  .calc-layout,
  .chart-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-card {
    position: static;
  }

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

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

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    inset: 56px 1rem auto 1rem;
    flex-direction: column;
    padding: 0.9rem 1rem;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .site-header.nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-toggle {
    display: inline-block;
  }

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

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

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

  .expense-row {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  }

  .expense-remove {
    margin-top: 0.25rem;
    justify-self: flex-start;
  }

  .hero-copy h1 {
    font-size: 2.1rem;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    border-radius: 1.25rem;
    flex-direction: column;
  }

  .hero-card {
    border-radius: 1.25rem;
  }
}


/* Extra mobile polish – does NOT affect desktop layout */
@media (max-width: 640px) {
  body {
    font-size: 0.98rem;
  }

  .container {
    padding-inline: 1.25rem;
  }

  .section,
  .section-alt {
    padding-top: 2.75rem;
    padding-bottom: 2.75rem;
  }

  .hero {
    padding-top: 2.75rem;
    padding-bottom: 3.25rem;
  }

  .hero-copy h1 {
    font-size: 1.9rem;
    line-height: 1.2;
  }

  .hero-copy p {
    font-size: 0.98rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .header-inner {
    gap: 0.75rem;
  }

  .site-header .cta-primary {
    padding-inline: 0.9rem;
    font-size: 0.86rem;
  }

  .card {
    padding: 1.4rem 1.3rem;
  }

  .field-grid {
    row-gap: 0.75rem;
  }

  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .input-row .input-help {
    margin-top: 0.35rem;
  }

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

  .hero-stats {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-main {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 1rem;
  }

  .hero-copy h1 {
    font-size: 1.75rem;
  }

  .site-logo-mark {
    width: 2.2rem;
    height: 2.2rem;
  }

  .site-logo-text span {
    font-size: 0.78rem;
  }
}
