:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --accent: #06b6d4;
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #24344d;
  --border-color: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: 600;
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.logo span strong {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 16px;
  overflow-x: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: #ffffff;
  background-color: var(--primary);
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 40px 0 24px;
}

.hero-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
}

/* Calculator Grid */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0 40px;
}

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

.calc-card, .results-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.calc-card h2, .results-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

/* Form controls */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-main);
}

.highlight-val {
  color: var(--accent);
  font-weight: 700;
}

.segmented-control {
  display: flex;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.segment-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
  height: 6px;
  border-radius: 4px;
  background-color: #334155;
  outline: none;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: rgba(15, 23, 42, 0.6);
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--accent);
}

.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-prefix .prefix {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  font-weight: 600;
}

.input-with-prefix input {
  padding-left: 30px;
}

.helper-text {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* Metric Display Cards */
.metric-box {
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.hero-metric {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(6, 182, 212, 0.15));
  border-color: rgba(79, 70, 229, 0.4);
  margin-bottom: 16px;
  padding: 20px;
  text-align: center;
}

.metric-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.metric-value.small {
  font-size: 1.35rem;
  color: #ffffff;
}

.results-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.disclosure-box {
  background-color: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--warning);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.disclosure-box strong {
  color: var(--text-muted);
}

/* Affiliate Box */
.affiliate-box {
  background: linear-gradient(135deg, #1e1b4b, #172554);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
}

.affiliate-box h4 {
  font-size: 0.95rem;
  color: #e0e7ff;
  margin-bottom: 4px;
}

.affiliate-box p {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.affiliate-cta {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.15s;
}

.affiliate-cta:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* SEO / Info Section */
.info-section {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
}

.info-section h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  text-align: center;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #ffffff;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Ad Unit Containers */
.ad-placeholder {
  width: 100%;
  min-height: 90px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

