:root {
  --bg: #0a0b0f;
  --bg-elevated: #12141c;
  --bg-card: #161922;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f2f8;
  --text-muted: #8b92a8;
  --accent: #f0c419;
  --accent-light: #ffd84d;
  --accent-glow: rgba(240, 196, 25, 0.38);
  --brand-gold-muted: rgba(240, 196, 25, 0.12);
  --gradient: linear-gradient(135deg, #c9940a 0%, #f0c419 48%, #ffe066 100%);
  --gradient-text: linear-gradient(135deg, #f0c419 0%, #ffd84d 55%, #fff3b0 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-bg: rgba(10, 11, 15, 0.92);
  --shadow-color: rgba(0, 0, 0, 0.4);
  --input-bg: #161922;
  --danger: #f87171;
  --success: #4ade80;
}

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

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 300;
  padding: 12px 20px;
  background: var(--accent);
  color: #14110a;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus { top: 16px; }

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(240, 196, 25, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(255, 216, 77, 0.06), transparent);
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

#header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav { display: flex; align-items: center; gap: 16px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 20px);
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 28px);
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--accent-light); }

.nav-links .btn-primary {
  padding: 10px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f0c00;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.logo { display: inline-flex; align-items: center; text-decoration: none; }

.logo-img {
  display: block;
  height: 56px;
  width: auto;
  mix-blend-mode: screen;
  filter: brightness(1.06) saturate(1.08) drop-shadow(0 2px 10px rgba(240, 196, 25, 0.2));
}

.breadcrumb { padding: 12px 0 0; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.breadcrumb li + li::before { content: '/'; margin-right: 8px; }

.breadcrumb a { color: var(--text-muted); text-decoration: none; }

.breadcrumb a:hover { color: var(--accent-light); }

.breadcrumb [aria-current="page"] { color: var(--accent-light); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient);
  color: #0f0c00;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.hero-tool { padding: 56px 0 32px; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--brand-gold-muted);
  border: 1px solid rgba(240, 196, 25, 0.32);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--accent-light);
  margin-bottom: 20px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-tool h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.hero-tool > .container > p {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.chip {
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.calc-section { padding-bottom: 80px; }

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.calc-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: var(--transition);
  position: relative;
}

.calc-card:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--shadow-color);
}

.calc-card:disabled { opacity: 0.55; cursor: not-allowed; }

.calc-card .calc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-gold-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.calc-card h3 { font-size: 1.05rem; font-weight: 700; }

.calc-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.calc-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 100px;
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
}

.calc-badge.soon {
  background: rgba(139, 146, 168, 0.15);
  color: var(--text-muted);
}

.seo-section { padding-bottom: 80px; }

.seo-section h2 { font-size: 1.5rem; margin-bottom: 12px; }

.seo-intro {
  color: var(--text-muted);
  max-width: 640px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}

@media (max-width: 960px) {
  .seo-grid { grid-template-columns: 1fr; }
}

.seo-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.seo-block h3 { font-size: 1rem; margin-bottom: 12px; }

.seo-list {
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.seo-list li { margin-bottom: 8px; }

.faq-item { border-bottom: 1px solid var(--border); padding: 12px 0; }

.faq-item summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; }

.faq-item p { color: var(--text-muted); font-size: 0.88rem; margin-top: 8px; }

footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

footer a { color: var(--accent-light); text-decoration: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal.open { opacity: 1; visibility: visible; }

.modal-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(16px) scale(0.98);
  transition: var(--transition);
}

.modal.open .modal-dialog { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h2 { font-size: 1.1rem; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close:hover { color: var(--text); }

.modal-body {
  flex: 1;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.mode-tabs { display: flex; gap: 8px; margin-bottom: 20px; }

.mode-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.mode-tab:has(input:checked) {
  background: var(--brand-gold-muted);
  border-color: var(--accent);
  color: var(--accent-light);
}

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

.result-box {
  margin-top: 20px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.result-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.result-stat {
  padding: 14px;
  background: var(--input-bg);
  border-radius: var(--radius-sm);
  text-align: center;
}

.result-stat span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-stat strong {
  font-size: 1.25rem;
  color: var(--accent-light);
  font-family: 'JetBrains Mono', monospace;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.result-table th,
.result-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.result-table th { color: var(--text-muted); font-weight: 500; }

.result-table td:last-child {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}

.result-table tr:last-child th,
.result-table tr:last-child td {
  border-bottom: none;
  font-weight: 700;
  color: var(--text);
}

.calc-error { color: var(--danger); font-size: 0.88rem; margin-bottom: 12px; }

.calc-error[hidden] { display: none; }

.calc-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.5;
}

.coming-soon { text-align: center; padding: 24px 0; }

.coming-soon .calc-icon {
  margin: 0 auto 16px;
  width: 64px;
  height: 64px;
  font-size: 1.8rem;
}

.coming-soon p { color: var(--text-muted); font-size: 0.95rem; }

@media (max-width: 1100px) {
  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    width: min(100vw - 48px, 320px);
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    gap: 4px;
    box-shadow: 0 20px 60px var(--shadow-color);
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    white-space: normal;
  }

  .nav-links a:hover {
    background: rgba(240, 196, 25, 0.08);
  }

  .nav-links .btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
}

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

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

@media (max-width: 640px) {
  .row-2 { grid-template-columns: 1fr; }
  .logo-img { height: 48px; }
  .result-hero { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
}
