/* OntarioTerminationPayCalc.ca — Main Stylesheet */
/* Gold standard: matches ontariocommissiontaxcalc.ca exactly */
/* Fonts: IBM Plex Sans (body/UI) + IBM Plex Mono (numbers/results) */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ─── CSS VARIABLES ─────────────────────────────────────────────────────────── */
:root {
  --bg:         #f5f5f0;
  --surface:    #ffffff;
  --surface-2:  #f9f9f6;
  --border:     #e0dfd8;
  --border-2:   #c8c7be;

  --text-primary:   #1a1a18;
  --text-secondary: #4a4a46;
  --text-muted:     #7a7a74;

  --accent:       #1a4f2e;
  --accent-light: #e8f2ec;
  --accent-mid:   #2d7a47;
  --accent-hover: #153d24;

  --red:    #c0392b;
  --amber:  #c47a00;

  --radius:    6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

  --max-width:     960px;
  --content-width: 760px;
}

/* ─── RESET ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────────── */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ─── HEADER ─────────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--accent);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-logo:hover { color: rgba(255,255,255,0.85); text-decoration: none; }
.logo-maple { font-size: 1.3rem; line-height: 1; }
.logo-text { font-size: 0.95rem; font-weight: 700; }
.logo-text span { font-weight: 300; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.site-nav a:hover { color: #fff; text-decoration: none; }

/* ─── HERO ───────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--accent);
  color: #fff;
  padding: 32px 20px 28px;
  border-bottom: 3px solid var(--accent-mid);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.95);
}
.hero h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
  color: #fff;
}
.hero p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.82);
  max-width: 620px;
  line-height: 1.6;
}

/* ─── CALCULATOR CARD ───────────────────────────────────────────────────────── */
.calc-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 28px;
}
.calc-header {
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.calc-header h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}
.calc-icon { font-size: 1.2rem; }
.calc-body { padding: 24px; }

/* ─── TRUST STRIP ───────────────────────────────────────────────────────────── */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.ts-item { display: flex; align-items: center; gap: 4px; }
.ts-item span { color: var(--accent-mid); font-weight: 700; }
.ts-item strong { font-weight: 600; color: var(--text-primary); }
.ts-sep { color: var(--border-2); font-size: 0.75rem; }

/* ─── FORM / INPUTS ─────────────────────────────────────────────────────────── */
.input-group { margin-bottom: 16px; }
.input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.label-sub {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap-dollar .input-prefix {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
  font-family: 'IBM Plex Mono', monospace;
}
.input-group input[type="number"],
.input-group input[type="date"],
.input-group select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.input-group input[type="date"] {
  font-family: 'IBM Plex Sans', sans-serif;
}
.input-group select {
  font-family: 'IBM Plex Sans', sans-serif;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7a74' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--accent-mid);
  box-shadow: 0 0 0 3px rgba(45,122,71,0.12);
}
/* Dollar-prefix inputs need extra left padding to clear the $ symbol */
.input-wrap-dollar input[type="number"] { padding-left: 36px; }
.optional-inputs {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
}
.optional-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ─── CALCULATE BUTTON ──────────────────────────────────────────────────────── */
.btn-calculate {
  display: block;
  width: 100%;
  padding: 15px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
  font-family: 'IBM Plex Sans', sans-serif;
}
.btn-calculate:hover { background: var(--accent-hover); box-shadow: var(--shadow); }
.btn-calculate:active { transform: scale(0.99); }

/* ─── ERROR ─────────────────────────────────────────────────────────────────── */
.calc-error {
  display: none;
  background: #fdecea;
  border: 1px solid #e57373;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--red);
  margin-top: 12px;
}

/* ─── RESULTS ───────────────────────────────────────────────────────────────── */
.results-section { margin-top: 24px; display: none; }
.results-divider {
  border: none;
  border-top: 2px solid var(--border);
  margin-bottom: 20px;
}
.results-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.results-primary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.result-row:last-child { border-bottom: none; }
.result-bold { background: var(--accent-light); font-weight: 600; }
.result-highlight {
  background: var(--accent);
  color: #fff;
}
.result-highlight .rr-label,
.result-highlight .rr-value,
.result-highlight .rr-sub { color: #fff; }
.rr-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex: 1;
}
.rr-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.rr-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.rr-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
}

/* ─── RATE BLOCKS ───────────────────────────────────────────────────────────── */
.rates-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.rate-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: center;
}
.rate-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.rate-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.rate-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── RESULTS NOTE / DISCLAIMER ────────────────────────────────────────────── */
.results-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: #fffbf0;
  border: 1px solid #f0d98a;
  border-radius: var(--radius);
  padding: 10px 14px;
  line-height: 1.5;
}
.results-note ul {
  padding-left: 18px;
  margin-top: 6px;
}
.results-note li {
  margin-bottom: 3px;
}
.threshold-note {
  font-size: 0.78rem;
  color: var(--accent-mid);
  background: var(--accent-light);
  border: 1px solid #b2d9bf;
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-top: 8px;
  line-height: 1.5;
}

/* ─── AD UNITS ──────────────────────────────────────────────────────────────── */
.ad-unit { margin: 20px 0; min-height: 0; }
.ad-inactive { display: none; }

/* ─── AUTHORITY SECTIONS ────────────────────────────────────────────────────── */
.authority-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px 28px 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.authority-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.authority-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin: 18px 0 8px;
}
.authority-section p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.65;
}
.authority-section ul,
.authority-section ol {
  padding-left: 20px;
  margin-bottom: 10px;
}
.authority-section li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.6;
}

/* ─── FORMULA DISPLAY ───────────────────────────────────────────────────────── */
.formula-display {
  background: var(--surface-2);
  border-left: 3px solid var(--accent-mid);
  padding: 10px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-primary);
  margin: 12px 0;
}

/* ─── FAQ ITEMS ─────────────────────────────────────────────────────────────── */
.faq-item {
  margin-bottom: 16px;
}
.faq-q {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.faq-a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.faq-a p { margin-bottom: 8px; }

/* ─── EXAMPLE BLOCK ─────────────────────────────────────────────────────────── */
.example-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-mid);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 12px 0;
}
.example-block h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ─── NOTICE-WEEK TABLE ─────────────────────────────────────────────────────── */
.notice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 12px 0;
}
.notice-table th {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.notice-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.notice-table tr:nth-child(even) td {
  background: var(--surface-2);
}

/* ─── PAGE HERO (support pages) ────────────────────────────────────────────── */
.page-hero {
  background: var(--accent);
  color: #fff;
  padding: 28px 0 24px;
  border-bottom: 3px solid var(--accent-mid);
}
.page-hero .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.page-hero h1 {
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #fff;
}
.page-hero p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.82);
  max-width: 580px;
  line-height: 1.5;
  margin: 0;
}
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.content-col {
  max-width: 760px;
  margin: 0 auto;
}

.page-content {
  padding: 32px 20px 56px;
}
.page-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 8px;
}
.page-content h2:first-child { margin-top: 0; }
.page-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin: 18px 0 6px;
}
.page-content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}
.page-content ul, .page-content ol {
  margin: 8px 0 12px 20px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.page-content li { margin-bottom: 4px; }
.page-content a { color: var(--accent-mid); }
.page-content a:hover { color: var(--accent-hover); }

/* ─── FOOTER ────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--accent);
  color: rgba(255,255,255,0.7);
  padding: 28px 20px;
  margin-top: 20px;
  font-size: 0.82rem;
}
.site-footer .container {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 20px;
}
.footer-brand .logo {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 10px;
  display: block;
}
.footer-brand p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin: 0;
  line-height: 1.5;
}
.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  margin-bottom: 6px;
  text-decoration: none;
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.more-tools-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
}
.more-tools-link:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.65); }
.footer-bottom a:hover { color: #fff; }

/* ── Hamburger ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger span + span { margin-top: 6px; }
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── Mobile nav overlay ── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-nav-overlay.active {
  display: block;
  opacity: 1;
}

/* ── Mobile nav panel ── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 58px;
  right: 0;
  width: 260px;
  max-width: 80vw;
  height: calc(100vh - 58px);
  background: var(--accent);
  z-index: 105;
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.mobile-nav.active {
  display: block;
  transform: translateX(0);
}
.mobile-nav a {
  display: block;
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  text-decoration: none;
  transition: color 0.15s;
}
.mobile-nav a:hover { color: #fff; }

/* ── Contact form ── */
.info-box {
  background: var(--accent-light);
  border: 1px solid #b8d8c4;
  border-left: 4px solid var(--accent-mid);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 14px 0 20px;
}
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 20px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form .field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-mid);
  box-shadow: 0 0 0 3px rgba(45,122,71,0.12);
}
.contact-form textarea {
  min-height: 110px;
  resize: vertical;
}
.calc-btn {
  display: inline-block;
  padding: 13px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, box-shadow 0.15s;
}
.calc-btn:hover { background: var(--accent-hover); box-shadow: var(--shadow); }
.calc-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* ── Methodology link ── */
.methodology-link {
  display: block;
  text-align: center;
  margin: 24px 0 8px;
  font-size: 0.88rem;
}
.methodology-link a {
  color: var(--accent);
  font-weight: 500;
}

/* ─── UTILITY ───────────────────────────────────────────────────────────────── */
code {
  font-family: 'IBM Plex Mono', monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.85em;
  color: var(--accent);
}

/* ─── RESPONSIVE ────────────────────────────────────────────────────────────── */

/* 1280px */
@media (max-width: 1280px) {
  .footer-grid { gap: 24px; }
}

/* 1100px */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 20px; }
}

/* 1024px — hamburger breakpoint */
@media (max-width: 1024px) {
  .hamburger { display: flex; flex-direction: column; justify-content: center; gap: 0; }
  .site-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* 834px */
@media (max-width: 834px) {
  .hero h1 { font-size: clamp(1.2rem, 3.5vw, 1.8rem); }
  .hero p { font-size: 0.9rem; }
}

/* 768px */
@media (max-width: 768px) {
  .main-content { padding: 20px 16px 48px; }
  .calc-body { padding: 16px; }
  .calc-header { padding: 14px 16px; }
  .trust-strip { margin: 0 16px 16px; padding: 8px 12px; font-size: 0.75rem; }
  .ts-sep { display: none; }
  .hero { padding: 24px 16px 20px; }
  .authority-section { padding: 20px 16px; }
  .page-hero { padding: 22px 0 18px; }
  .page-hero h1 { font-size: 1.2rem; }
  .page-content { padding: 24px 16px 48px; }
  .input-row { grid-template-columns: 1fr; }
  .rates-row { grid-template-columns: 1fr; gap: 8px; }
  .rate-value { font-size: 1.2rem; }
}

/* 640px */
@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ad-unit { min-height: 0; }
}

/* 480px */
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-brand { grid-column: unset; }
  .header-inner { padding: 0 14px; }
  .site-logo .logo-text { font-size: 0.85rem; }
  .calc-btn { width: 100%; }
  .example-block { padding: 14px; }
}

/* 430px */
@media (max-width: 430px) {
}

/* 390px */
@media (max-width: 390px) {
  .hero h1 { font-size: 1.15rem; }
}

/* 375px */
@media (max-width: 375px) {
  .site-logo .logo-text { font-size: 0.8rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* 360px */
@media (max-width: 360px) {
  .header-inner { padding: 0 10px; }
  .hero { padding: 18px 12px 16px; }
  .calc-body { padding: 12px; }
  .calc-header { padding: 12px; }
  .trust-strip { margin: 0 12px 12px; }
}

/* 320px */
@media (max-width: 320px) {
  html { font-size: 14px; }
  .site-logo .logo-text { font-size: 0.75rem; }
  .mobile-nav { width: 100%; max-width: 100vw; }
}
