/* ==========================================================================
   DebtFlow FinTech Design System - Salary to Hourly Calculator
   Module: css/styles.css
   ========================================================================== */

:root {
  /* Color Palette - Slate / Indigo / Emerald */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --indigo-50: #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-200: #c7d2fe;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --indigo-900: #312e81;

  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;

  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --amber-700: #b45309;

  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-600: #e11d48;
  --rose-700: #be123c;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-sans);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Border Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container, main, section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header & Navigation */
.site-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  height: auto;
  padding: 0.5rem 0;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--slate-900);
  text-decoration: none;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--emerald-600), var(--indigo-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-200);
}

.brand-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--emerald-600);
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate-600);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--slate-900);
  background-color: var(--slate-100);
}

.nav-link.active {
  color: var(--emerald-700);
  background-color: var(--emerald-50);
  font-weight: 600;
}

/* Structured Tools Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background-color: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-dropdown-btn:hover {
  background-color: var(--slate-200);
  color: var(--slate-900);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.4rem;
  width: 320px;
  background-color: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 0.75rem;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.dropdown-sector {
  margin-bottom: 0.65rem;
}

.dropdown-sector:last-child {
  margin-bottom: 0;
}

.dropdown-sector-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  padding: 0.2rem 0.5rem;
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  color: var(--slate-700);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease;
}

.dropdown-item:hover {
  background-color: var(--slate-50);
  color: var(--emerald-600);
}

.dropdown-item.active {
  font-weight: 600;
  color: var(--emerald-700);
  background-color: var(--emerald-50);
}

/* Hero Section */
.hero-section {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--indigo-700);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--indigo-600) 0%, var(--emerald-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--slate-600);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Calculator Layout */
.calculator-section {
  padding: 1.5rem 0 4rem;
}

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

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

/* Cards */
.calc-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--slate-500);
}

/* Mode Switcher Pills */
.mode-switcher-container {
  display: flex;
  background: var(--slate-100);
  padding: 0.35rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  gap: 0.25rem;
}

.mode-pill {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-600);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.mode-pill:hover {
  color: var(--slate-900);
}

.mode-pill.active {
  background: #ffffff;
  color: var(--indigo-600);
  box-shadow: var(--shadow-sm);
}

/* Form Groups */
.form-group {
  margin-bottom: 1.35rem;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.4rem;
}

.field-hint {
  font-size: 0.775rem;
  color: var(--slate-500);
  font-weight: normal;
}

/* Inputs with Affixes */
.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-affix {
  position: absolute;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-400);
  pointer-events: none;
}

.input-affix.prefix {
  left: 0.95rem;
}

.input-affix.suffix {
  right: 0.95rem;
}

.text-input {
  width: 100%;
  height: 2.75rem;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-900);
  background: var(--slate-50);
  transition: all var(--transition-fast);
}

.text-input.has-prefix {
  padding-left: 2.25rem;
}

.text-input.has-suffix {
  padding-right: 3.5rem;
}

.text-input:focus {
  outline: none;
  border-color: var(--indigo-600);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Frequency Pill Selectors */
.freq-pills {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.freq-pill {
  border: 1px solid var(--slate-200);
  background: #ffffff;
  padding: 0.45rem 0.3rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.freq-pill:hover {
  border-color: var(--indigo-300);
  color: var(--indigo-600);
}

.freq-pill.active {
  background: var(--indigo-50);
  border-color: var(--indigo-500);
  color: var(--indigo-700);
  font-weight: 700;
}

/* Sliders & Range Controls */
.slider-group {
  margin-top: 0.5rem;
}

.range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--slate-200);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--indigo-600);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
  transition: transform var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.range-marks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--slate-400);
  margin-top: 0.25rem;
}

/* 2-Column Inline Form Grid */
.input-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Overtime Box (Collapsible / Toggleable) */
.toggle-card-box {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  margin-bottom: 1.35rem;
}

.toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.toggle-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-800);
}

/* Switch Toggle UI */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--slate-300);
  transition: .3s;
  border-radius: 22px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider-switch {
  background-color: var(--indigo-600);
}

input:checked + .slider-switch:before {
  transform: translateX(18px);
}

.toggle-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-200);
  display: none;
}

.toggle-content.visible {
  display: block;
}

/* Results Section */
.results-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Hero Rate Card */
.hero-rate-card {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--indigo-900) 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.hero-rate-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-rate-eyebrow {
  font-size: 0.825rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--indigo-200);
  margin-bottom: 0.5rem;
}

.hero-rate-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.hero-rate-amount {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.hero-rate-unit {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--indigo-200);
}

/* Adjusted Real Rate Badge */
.adjusted-rate-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.adjusted-rate-label {
  font-size: 0.85rem;
  color: var(--slate-200);
}

.adjusted-rate-value {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--emerald-200);
}

.adjusted-pill-tag {
  background: var(--emerald-500);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  margin-left: 0.4rem;
}

/* Multi-Frequency Conversion Matrix Table */
.matrix-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.matrix-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-export:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.conversion-table {
  width: 100%;
  border-collapse: collapse;
}

.conversion-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  padding: 0.65rem 0.75rem;
  border-bottom: 1.5px solid var(--slate-200);
}

.conversion-table td {
  padding: 0.85rem 0.75rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
}

.conversion-table tr:hover td {
  background: var(--slate-50);
}

.table-period-name {
  font-weight: 600;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-gross-val {
  font-weight: 700;
  color: var(--indigo-700);
  text-align: right;
}

.table-net-val {
  font-weight: 600;
  color: var(--emerald-700);
  text-align: right;
}

/* Take-Home Pay Estimator Box */
.takehome-box {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

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

.takehome-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tax-presets {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tax-preset-chip {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-600);
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tax-preset-chip:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.tax-preset-chip.active {
  background: var(--emerald-50);
  border-color: var(--emerald-500);
  color: var(--emerald-700);
  font-weight: 700;
}

.takehome-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.takehome-stat-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
}

.takehome-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.takehome-stat-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--emerald-600);
}

/* FAQ Accordion Section */
.faq-section {
  padding: 4.5rem 0 5rem;
  background: #ffffff;
  border-top: 1px solid var(--slate-200);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--indigo-600);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--indigo-300);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  color: var(--slate-400);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--indigo-600);
}

.faq-answer {
  padding: 0 1.5rem 1.35rem;
  color: var(--slate-600);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Footer */
.site-footer {
  background: var(--slate-900);
  color: var(--slate-400);
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--slate-800);
  font-size: 0.875rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
}

/* Responsive Table Styles */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
}

.conversion-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.conversion-table th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--slate-200);
  text-align: left;
  white-space: nowrap;
}

.conversion-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--slate-100);
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .calc-card, .matrix-card, .takehome-box, .hero-rate-card {
    padding: 1.25rem 1rem;
    min-width: 0;
  }
  .input-row-grid {
    grid-template-columns: 1fr;
  }
  .freq-pills {
    grid-template-columns: repeat(2, 1fr);
  }
  .takehome-stats-grid {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 0;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .freq-pills {
    grid-template-columns: 1fr;
  }
  .text-input {
    min-height: 44px;
  }
  .btn-submit, .btn-export-csv, .mode-pill {
    min-height: 44px;
    width: 100%;
  }
}
