:root {
  --background: hsl(0 0% 0%);
  --foreground: hsl(0 0% 98%);
  --muted: hsl(0 0% 66%);
  --line: hsl(0 0% 100% / 0.11);
  --primary: hsl(145 76% 48%);
  --primary-soft: hsl(148 73% 40%);
  --danger: #ff6b6b;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Exo 2", "Segoe UI", sans-serif;
  min-height: 100vh;
  color: var(--foreground);
  background:
    linear-gradient(to bottom, hsl(0 0% 3%) 0%, hsl(0 0% 1.5%) 38%, hsl(0 0% 0%) 100%),
    radial-gradient(circle at 12% 0%, hsl(145 76% 48% / 0.04), transparent 50%),
    radial-gradient(circle at 92% 18%, hsl(145 76% 48% / 0.035), transparent 45%),
    var(--background);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  opacity: 0.24;
  background-image: radial-gradient(hsl(0 0% 100% / 0.18) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.orb {
  position: absolute;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.28;
}

.orb-a {
  top: -10rem;
  left: -8rem;
  background: var(--primary);
}

.orb-b {
  right: -12rem;
  top: 20%;
  background: var(--primary-soft);
}

.shell {
  width: min(980px, calc(100vw - 1.5rem));
  margin-inline: auto;
}

.calculator-shell {
  width: min(335px, calc(100vw - 1.25rem));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: hsl(0 0% 0% / 0.64);
  border-bottom: 1px solid hsl(0 0% 100% / 0.08);
  backdrop-filter: blur(16px);
}

.site-header .shell {
  width: min(1180px, calc(100vw - 2.1rem));
}

.nav-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--foreground);
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
}

.main-nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 240px;
  background: hsl(0 0% 5% / 0.95);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  display: grid;
  gap: 0.45rem;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 60;
}

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

.main-nav a {
  display: block;
  padding: 0.52rem 0.6rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 180ms ease, background-color 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--foreground);
  background: hsl(145 76% 48% / 0.14);
}

.nav-extras {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.55rem;
}

.nav-extras .nav-cta {
  display: block;
  text-align: center;
  color: hsl(0 0% 100%);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid hsl(145 76% 48% / 0.45);
  background: hsl(145 76% 48% / 0.14);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}

.nav-extras .nav-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding-inline: 0.72rem;
}

.nav-extras .nav-x svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-left: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--foreground);
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  font: inherit;
  font-weight: 700;
  line-height: 1;
}

.menu-icon {
  display: inline-grid;
  gap: 3px;
}

.menu-icon span {
  display: block;
  width: 13px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}

.calculator-main {
  padding: 2rem 0 1.6rem;
}

.hero {
  text-align: center;
  margin-bottom: 0.9rem;
}

.kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  color: hsl(0 0% 96% / 0.84);
  font-weight: 700;
}

h1 {
  margin: 0.65rem 0 0;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.06;
}

h2 {
  margin: 0;
  font-size: 1.05rem;
}

.lead {
  margin: 0.65rem auto 0;
  max-width: 64ch;
  color: var(--muted);
  line-height: 1.6;
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, hsl(0 0% 8% / 0.95), hsl(0 0% 5% / 0.92));
  box-shadow: 0 10px 30px hsl(0 0% 0% / 0.35);
}

.calculator-card {
  padding: 0.9rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.ghost-btn {
  border: 1px solid hsl(0 0% 100% / 0.16);
  background: hsl(0 0% 100% / 0.04);
  color: var(--foreground);
  border-radius: 9px;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.ghost-btn:hover {
  border-color: hsl(145 76% 48% / 0.55);
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.mode-btn {
  border: 1px solid hsl(0 0% 100% / 0.16);
  background: hsl(0 0% 100% / 0.03);
  color: var(--muted);
  border-radius: 9px;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.mode-btn.is-active {
  color: var(--foreground);
  border-color: hsl(145 76% 48% / 0.65);
  background: hsl(145 76% 48% / 0.13);
}

.label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: hsl(145 76% 48% / 0.06);
  border: 1px solid hsl(145 76% 48% / 0.55);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.9rem;
  box-shadow: inset 0 0 0 1px hsl(145 76% 48% / 0.14), 0 0 0 1px hsl(145 76% 48% / 0.12);
}

.input-row:focus-within {
  border-color: hsl(145 76% 48% / 0.9);
  box-shadow: inset 0 0 0 1px hsl(145 76% 48% / 0.3), 0 0 0 3px hsl(145 76% 48% / 0.22);
}

.input-row input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 1.14rem;
  font-weight: 700;
  outline: none;
}

.suffix {
  color: var(--muted);
  font-weight: 700;
}

.metrics {
  display: grid;
  gap: 0.5rem;
}

.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid hsl(0 0% 100% / 0.08);
  background: hsl(0 0% 3.8%);
  border-radius: 10px;
  padding: 0.66rem 0.78rem;
}

.metric-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-value {
  font-weight: 700;
}

.accent {
  color: var(--primary);
}

.progress-wrap {
  margin-top: 0.85rem;
}

.calc-note {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: hsl(0 0% 100% / 0.16);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, hsl(145 76% 48% / 0.65), hsl(145 76% 48%));
  transition: width 180ms ease-out;
}

.metric-value.error {
  color: var(--danger);
}

.is-hidden {
  display: none;
}

.site-footer {
  border-top: 1px solid hsl(0 0% 100% / 0.08);
  padding: 1.25rem 0 1.8rem;
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.footer-shell p {
  margin: 0;
  color: var(--muted);
}

.footer-shell a {
  color: hsl(0 0% 100%);
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 760px) {
  .main-nav {
    right: 1rem;
  }

  .nav-extras .nav-cta {
    padding: 0.48rem 0.75rem;
    font-size: 0.82rem;
  }

  .menu-toggle {
    padding: 0.46rem 0.75rem;
    font-size: 0.84rem;
  }

  .brand-name {
    display: none;
  }
}
