/* ==========================================================================
   AUTO LEASE CALCULATOR - PREMIUM STYLESHEET
   Pure CSS3 - Zero Frameworks, Zero Dependencies
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Theme Variables)
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colors */
  --primary: #1e5b8f;
  --primary-hover: #164a75;
  --primary-light: #eef5fb;
  --primary-subtle: #dbeaf6;
  --dark: #102a43;
  --secondary: #2f6b9a;
  --accent: #2e7d32;
  --accent-hover: #236327;
  --accent-light: #e8f5e9;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;

  /* Neutrals & Surfaces */
  --bg-page: #f5f8fb;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-input: #ffffff;
  --border-color: #d9e2ec;
  --border-light: #e2e8f0;
  --border-focus: #1e5b8f;
  --text-main: #17212b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Elevation & Shadows */
  --shadow-sm: 0 1px 2px rgba(16, 42, 67, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(16, 42, 67, 0.08), 0 2px 4px -2px rgba(16, 42, 67, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(16, 42, 67, 0.1), 0 4px 6px -4px rgba(16, 42, 67, 0.05);
  --shadow-xl: 0 20px 30px -5px rgba(16, 42, 67, 0.12), 0 8px 10px -6px rgba(16, 42, 67, 0.04);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout & Sizing */
  --container-max: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.25s ease-in-out;
}

/* Dark Mode Overrides (Optional user toggle & system preference) */
[data-theme="dark"] {
  --bg-page: #0b1320;
  --bg-card: #152238;
  --bg-subtle: #1c2d4a;
  --bg-input: #101c30;
  --border-color: #2b3d5c;
  --border-light: #24344e;
  --border-focus: #4b92d6;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --primary-light: #162b46;
  --primary-subtle: #1e3a5f;
  --accent-light: #123321;
  --warning-light: #382806;
  --danger-light: #3b1414;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
}

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

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

img, svg {
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* --------------------------------------------------------------------------
   3. Layout & Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.main-content {
  flex: 1 0 auto;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
}

[data-theme="dark"] .brand-logo {
  color: #ffffff;
}

.brand-logo:hover {
  text-decoration: none;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
}

.brand-name {
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--primary);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

.nav-link {
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  text-decoration: none;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-subtle);
  border-color: var(--primary);
}

.theme-toggle-btn svg {
  width: 1.2rem;
  height: 1.2rem;
}

.mobile-menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
}

/* Mobile Navigation Drawer */
.mobile-nav {
  display: none;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.mobile-nav.open {
  display: block;
}

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

.mobile-nav-link {
  display: block;
  padding: 0.75rem 0.5rem;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.875rem;
  border: 1px solid var(--primary-subtle);
}

.hero-title {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .hero-title {
  color: #ffffff;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 46rem;
  margin: 0 auto 1.5rem;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary);
  color: var(--text-inverse);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.hero-cta-btn:hover {
  background-color: var(--primary-hover);
  color: var(--text-inverse);
  text-decoration: none;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   6. Main Calculator Card & Layout
   -------------------------------------------------------------------------- */
.calculator-section {
  padding: 1rem 0 3.5rem;
}

.calculator-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Top Information Banner */
.calc-info-banner {
  background-color: var(--primary-light);
  border-bottom: 1px solid var(--primary-subtle);
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.info-banner-content {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
}

.info-banner-content svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.calc-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-action-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.btn-action-sm:hover {
  background-color: var(--bg-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-action-sm svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Calculator Tabs Header */
.calc-tabs-wrapper {
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.calc-tab-btn {
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-tab-btn:hover {
  color: var(--text-main);
}

.calc-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: var(--bg-card);
}

/* Two-Column Grid Layout */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
}

/* Left Column: Form Inputs */
.calc-inputs-panel {
  padding: 2rem;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 1.35rem;
}

.tab-pane.active {
  display: flex;
}

/* Form Groups & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.input-helper-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.input-affix-prefix,
.input-affix-suffix {
  position: absolute;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  pointer-events: none;
  user-select: none;
}

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

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

.form-input {
  width: 100%;
  height: 2.75rem;
  padding: 0.5rem 0.875rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.form-input.has-suffix {
  padding-right: 4.5rem;
}

.form-input.has-suffix-sm {
  padding-right: 2rem;
}

.form-input:hover {
  border-color: #cbd5e1;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(30, 91, 143, 0.15);
  outline: none;
}

.form-input.is-invalid {
  border-color: var(--danger);
  background-color: var(--danger-light);
}

.form-error-msg {
  font-size: 0.75rem;
  color: var(--danger);
  display: none;
  font-weight: 500;
}

.form-error-msg.visible {
  display: block;
}

/* Quick Term Selector Pills */
.term-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.term-pill {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.term-pill:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-subtle);
}

.term-pill.active {
  background-color: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

/* Money Factor Helper Conversion Box */
.mf-helper-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0.625rem;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.mf-apr-badge {
  font-weight: 600;
  color: var(--primary);
}

/* Form Action Buttons */
.calc-buttons-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-primary {
  flex: 1;
  height: 3rem;
  background-color: var(--primary);
  color: var(--text-inverse);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  height: 3rem;
  padding: 0 1.25rem;
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

/* Right Column: Results Panel */
.calc-results-panel {
  padding: 2rem;
  background-color: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.results-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dark);
}

[data-theme="dark"] .results-title {
  color: #ffffff;
}

.results-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background-color: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(46, 125, 50, 0.2);
}

/* Prominent Primary Result Card */
.main-payment-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.main-payment-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.main-payment-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.main-payment-value {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

[data-theme="dark"] .main-payment-value {
  color: #60a5fa;
}

.main-payment-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Visual Breakdown Bar */
.visual-breakdown-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.breakdown-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.breakdown-bar {
  height: 12px;
  width: 100%;
  border-radius: var(--radius-full);
  background-color: var(--border-color);
  display: flex;
  overflow: hidden;
}

.breakdown-segment {
  height: 100%;
  transition: width var(--transition-normal);
}

.seg-depreciation {
  background-color: var(--primary);
}

.seg-finance {
  background-color: #f59e0b;
}

.seg-tax {
  background-color: var(--accent);
}

.breakdown-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-depreciation {
  background-color: var(--primary);
}

.dot-finance {
  background-color: #f59e0b;
}

.dot-tax {
  background-color: var(--accent);
}

/* Detailed Results Table / List */
.results-data-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.data-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.data-row.highlight-row {
  font-weight: 700;
  color: var(--dark);
  font-size: 0.95rem;
  padding-top: 0.375rem;
}

[data-theme="dark"] .data-row.highlight-row {
  color: #ffffff;
}

.data-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.data-value {
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-family);
}

/* Warning & Alerts Box */
.calc-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  display: none;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}

.calc-alert.visible {
  display: flex;
}

.calc-alert-warning {
  background-color: var(--warning-light);
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, 0.3);
}

[data-theme="dark"] .calc-alert-warning {
  color: #fde68a;
}

/* Result Action Buttons (Copy / Print) */
.results-actions-row {
  display: flex;
  gap: 0.5rem;
}

.btn-outline {
  flex: 1;
  height: 2.5rem;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  transition: all var(--transition-fast);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--bg-card);
}

.btn-outline svg {
  width: 1rem;
  height: 1rem;
}

/* --------------------------------------------------------------------------
   7. Tooltips (Pure CSS + Accessible JS fallback)
   -------------------------------------------------------------------------- */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--border-color);
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  position: relative;
  border: none;
  transition: all var(--transition-fast);
}

.tooltip-trigger:hover,
.tooltip-trigger:focus {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.tooltip-box {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--dark);
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  width: 240px;
  text-align: left;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  z-index: 200;
}

.tooltip-box::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--dark) transparent transparent transparent;
}

.tooltip-trigger:hover .tooltip-box,
.tooltip-trigger:focus .tooltip-box,
.tooltip-trigger.active .tooltip-box {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   8. Toast Notification (Copy to clipboard feedback)
   -------------------------------------------------------------------------- */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--dark);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 999;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast-notice svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #4ade80;
}

/* --------------------------------------------------------------------------
   9. AdSense-Ready Placement Containers
   -------------------------------------------------------------------------- */
.ad-slot-wrapper {
  margin: 2.5rem 0;
  text-align: center;
}

.ad-slot-placeholder {
  min-height: 90px;
  max-width: 728px;
  margin: 0 auto;
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--text-muted);
}

.ad-slot-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.ad-slot-desc {
  font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   10. Educational & SEO Content Sections
   -------------------------------------------------------------------------- */
.edu-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
}

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

.edu-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.section-header {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 2.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .section-title {
  color: #ffffff;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

.article-content {
  color: var(--text-main);
  line-height: 1.7;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin: 2rem 0 1rem;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .article-content h2 {
  color: #ffffff;
}

.article-content h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--dark);
  margin: 1.5rem 0 0.5rem;
}

[data-theme="dark"] .article-content h3 {
  color: #f1f5f9;
}

.article-content p {
  margin-bottom: 1.125rem;
}

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

.article-content li {
  margin-bottom: 0.375rem;
}

/* Formula Block Component */
.formula-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.formula-item {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.formula-name {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 0.375rem;
}

.formula-math {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--bg-card);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  word-break: break-word;
}

/* Step-by-Step Example Box */
.example-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.example-header {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .example-header {
  color: #ffffff;
}

.example-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.example-step {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.example-step-title {
  font-weight: 700;
  color: var(--primary);
}

.example-step-calc {
  font-family: var(--font-mono);
  color: var(--text-main);
}

/* Comparison Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background-color: var(--bg-card);
  font-size: 0.9375rem;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
  background-color: var(--bg-subtle);
  color: var(--dark);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

[data-theme="dark"] .comparison-table th {
  color: #ffffff;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background-color: var(--bg-subtle);
}

/* --------------------------------------------------------------------------
   11. FAQ Accordion
   -------------------------------------------------------------------------- */
.faq-section {
  padding: 3.5rem 0;
}

.faq-list {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--primary-subtle);
}

.faq-trigger {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-main);
  background: none;
  gap: 1rem;
  transition: color var(--transition-fast);
}

.faq-trigger:hover {
  color: var(--primary);
}

.faq-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
  max-height: 400px;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   12. Final CTA & Disclaimer Strip
   -------------------------------------------------------------------------- */
.final-cta-section {
  padding: 3.5rem 0;
  text-align: center;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.cta-box {
  max-width: 40rem;
  margin: 0 auto;
}

.cta-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .cta-title {
  color: #ffffff;
}

.cta-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.disclaimer-strip {
  padding: 1.5rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--dark);
  color: #94a3b8;
  padding: 3.5rem 0 2rem;
  font-size: 0.875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-desc {
  max-width: 22rem;
  line-height: 1.6;
}

.footer-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-bottom: 1rem;
}

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

.footer-link {
  color: #94a3b8;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   14. Static Content Pages (About, Contact, Legal, Privacy, etc.)
   -------------------------------------------------------------------------- */
.page-hero {
  padding: 3rem 0 2rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

.page-title {
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .page-title {
  color: #ffffff;
}

.page-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 44rem;
}

.page-body-container {
  max-width: 50rem;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.page-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

/* Contact Form UI */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-textarea {
  width: 100%;
  min-height: 140px;
  padding: 0.75rem 0.875rem;
  font-size: 1rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  resize: vertical;
}

.form-textarea:focus {
  border-color: var(--border-focus);
  outline: none;
}

.contact-status-notice {
  padding: 1rem;
  background-color: var(--primary-light);
  border: 1px solid var(--primary-subtle);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--primary);
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   15. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }

  .calc-inputs-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .edu-grid-2 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .calc-inputs-panel,
  .calc-results-panel {
    padding: 1.25rem;
  }

  .calc-info-banner {
    padding: 0.75rem 1rem;
  }

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

  .page-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .calc-buttons-row {
    flex-direction: column;
  }

  .results-actions-row {
    flex-direction: column;
  }

  .calc-tabs-wrapper {
    padding: 0 0.5rem;
  }

  .calc-tab-btn {
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
  }
}

/* --------------------------------------------------------------------------
   16. Dedicated Print Stylesheet (@media print)
   -------------------------------------------------------------------------- */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .site-header,
  .mobile-nav,
  .hero-section,
  .calc-tabs-wrapper,
  .calc-quick-actions,
  .calc-buttons-row,
  .results-actions-row,
  .ad-slot-wrapper,
  .edu-section,
  .faq-section,
  .final-cta-section,
  .site-footer,
  .theme-toggle-btn,
  .mobile-menu-toggle,
  .toast-notice {
    display: none !important;
  }

  .calculator-section {
    padding: 0 !important;
  }

  .calculator-card {
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .calc-grid {
    grid-template-columns: 1fr 1fr !important;
    display: grid !important;
  }

  .calc-inputs-panel,
  .calc-results-panel {
    padding: 1rem !important;
    background: transparent !important;
  }

  .main-payment-card {
    border: 2px solid #000000 !important;
    box-shadow: none !important;
    padding: 1rem !important;
  }

  .main-payment-value {
    color: #000000 !important;
  }

  .print-header-banner {
    display: block !important;
    border-bottom: 2px solid #000000;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
  }
}

.print-header-banner {
  display: none;
}
