/* ===== SalaryAfter Design System ===== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Palette */
  --navy: #0f172a;
  --navy-light: #1e293b;
  --navy-muted: #334155;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-pale: #dbeafe;
  --blue-bg: #eff6ff;
  --green: #16a34a;
  --green-light: #22c55e;
  --green-pale: #dcfce7;
  --green-bg: #f0fdf4;
  --red: #dc2626;
  --red-light: #ef4444;
  --red-pale: #fee2e2;
  --orange: #ea580c;
  --orange-light: #f97316;
  --orange-pale: #ffedd5;
  --purple: #7c3aed;
  --purple-light: #8b5cf6;
  --purple-pale: #ede9fe;
  --yellow: #ca8a04;
  --yellow-pale: #fef9c3;

  /* Neutrals */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Semantic */
  --bg: #ffffff;
  --bg-alt: var(--gray-50);
  --text: var(--navy);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-400);
  --border: var(--gray-200);
  --border-light: var(--gray-100);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.1), 0 16px 48px rgba(15, 23, 42, 0.08);

  /* Layout */
  --max-w-text: 800px;
  --max-w-wide: 1000px;
  --max-w-page: 1100px;
  --gutter: 1.25rem;
  --radius: 0.625rem;
  --radius-sm: 0.375rem;
  --radius-lg: 0.875rem;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 1.875rem; letter-spacing: -0.02em; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

.mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.text-orange { color: var(--orange); }
.text-purple { color: var(--purple); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-center { text-align: center; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-w-page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-text {
  max-width: var(--max-w-text);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--bg-alt);
  padding: 3rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* --- Nav / Header --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  max-width: var(--max-w-page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav-logo span { color: var(--blue); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.nav-links a:hover { color: var(--blue); text-decoration: none; }

.nav-mobile-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--navy);
}

/* --- Hero --- */
.hero {
  background: none;
  color: var(--text);
  padding: 2rem 0 1rem;
  text-align: center;
}

.hero h1 {
  color: var(--navy);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.hero h1 span.highlight {
  color: var(--blue);
}

.hero p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto 0.75rem;
  line-height: 1.6;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue-pale);
  border-radius: 2rem;
  padding: 0.3rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

.hero-stats span {
  color: var(--text-muted);
  font-weight: 500;
}

.hero-stats span::before {
  content: '✓ ';
  color: var(--green);
  font-weight: 700;
}

/* --- Cards --- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-elevated {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-highlight {
  background: linear-gradient(135deg, var(--green) 0%, #15803d 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(22, 163, 74, 0.25);
}

.card-highlight h3,
.card-highlight p { color: #fff; }
.card-highlight .label { color: rgba(255, 255, 255, 0.8); }

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card {
  text-align: center;
  padding: 1.25rem;
}

.stat-card .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card .label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- Calculator Form --- */
.calc-form {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-top: -2rem;
  position: relative;
  z-index: 10;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  appearance: none;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-input-lg {
  height: 3.25rem;
  font-size: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.input-prefix {
  position: relative;
}

.input-prefix .prefix {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 500;
  pointer-events: none;
}

.input-prefix .form-input {
  padding-left: 1.75rem;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

/* Toggle buttons */
.toggle-group {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.toggle-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.toggle-btn.active {
  background: var(--bg);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.toggle-btn:hover:not(.active) {
  color: var(--navy);
}

/* --- Tables --- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: var(--gray-50); }

.td-right { text-align: right; }

.td-money {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  text-align: right;
}

.td-green { color: var(--green); }
.td-red { color: var(--red); }

.table-compact td,
.table-compact th {
  padding: 0.5rem 0.75rem;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 1rem 0;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--blue);
}

.breadcrumbs .sep {
  color: var(--gray-300);
}

/* --- FAQ / Accordion --- */
.faq-list {
  max-width: var(--max-w-text);
  margin: 0 auto;
}

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

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
  gap: 1rem;
}

.faq-question:hover {
  color: var(--blue);
}

.faq-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 300ms var(--ease);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms var(--ease), padding 300ms var(--ease);
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* --- Tags / Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-blue { background: var(--blue-pale); color: var(--blue); }
.badge-green { background: var(--green-pale); color: var(--green); }
.badge-red { background: var(--red-pale); color: var(--red); }
.badge-orange { background: var(--orange-pale); color: var(--orange); }
.badge-purple { background: var(--purple-pale); color: var(--purple); }

/* --- Quick Facts Bar --- */
.quick-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.quick-fact {
  text-align: center;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
}

.quick-fact .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy);
}

.quick-fact .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* --- Job Grid --- */
.job-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: all var(--duration) var(--ease);
}

.job-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.job-card .job-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
}

.job-card .job-salary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--green);
}

/* --- Hourly Grid --- */
.hourly-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.hourly-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}

.hourly-link:hover {
  background: var(--blue-bg);
  border-color: var(--blue);
  color: var(--blue);
  text-decoration: none;
}

/* --- Donut Chart --- */
.chart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 0;
}

.chart-svg {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chart-legend-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.chart-legend-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-left: auto;
  color: var(--navy);
}

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 2rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
}

.footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.8125rem;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-light);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
}

.btn-outline:hover {
  background: var(--blue-bg);
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

/* --- Content / Editorial --- */
.content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light);
}

.content h3 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.content p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.content ul, .content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.content strong {
  color: var(--navy);
}

/* --- Callout Box --- */
.callout {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.callout-blue {
  background: var(--blue-bg);
  border-color: var(--blue);
}

.callout-green {
  background: var(--green-bg);
  border-color: var(--green);
}

.callout-yellow {
  background: var(--yellow-pale);
  border-color: var(--yellow);
}

/* --- Results Display --- */
.result-big {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
}

.result-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Progress / Bar --- */
.bar-track {
  width: 100%;
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 600ms var(--ease);
}

/* --- Tooltip --- */
.tooltip-wrap {
  position: relative;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
  z-index: 50;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--navy);
}

.tooltip-wrap:hover .tooltip {
  opacity: 1;
}

/* --- Skip link (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 200;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 0.5rem;
}

/* --- Schema / hidden --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== RESPONSIVE ===== */

/* Tablet (640px+) */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .quick-facts { grid-template-columns: repeat(4, 1fr); }
  .job-grid { grid-template-columns: repeat(3, 1fr); }
  .hourly-grid { grid-template-columns: repeat(6, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  h1 { font-size: 3rem; }
  .hero h1 { font-size: 2.5rem; }
}

/* Desktop (900px+) */
@media (min-width: 900px) {
  :root { --gutter: 2rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .job-grid { grid-template-columns: repeat(4, 1fr); }
  .hourly-grid { grid-template-columns: repeat(8, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }

  .calc-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: start;
  }

  .calc-sidebar {
    position: sticky;
    top: 5rem;
  }

  h1 { font-size: 3.25rem; }
  .hero h1 { font-size: 2.75rem; }
}

/* Large (1100px+) */
@media (min-width: 1100px) {
  .calc-layout {
    grid-template-columns: 360px 1fr;
    gap: 2rem;
  }
}

/* Mobile-only overrides */
@media (max-width: 639px) {
  .nav-links { display: none; }
  .nav-mobile-btn { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem var(--gutter);
    gap: 0.75rem;
    box-shadow: var(--shadow);
  }

  .hero { padding: 1.5rem 0 0.75rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.875rem; }
  .hero-stats { flex-wrap: wrap; gap: 0.375rem; }

  .chart-container {
    flex-direction: column;
    gap: 1.25rem;
  }

  .result-big { font-size: 1.75rem; }

  .table-wrap {
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  .section { padding: 2rem 0; }
  .section-alt { padding: 2rem 0; }
}

/* Print */
@media print {
  .nav, .footer, .calc-form, .faq-list { display: none; }
  body { font-size: 12pt; color: #000; }
  .hero { background: none; color: #000; padding: 1rem 0; }
  .hero h1 { color: #000; }
  .card, .card-elevated { box-shadow: none; border: 1px solid #ccc; }
}
