:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-soft: #f2eee6;
  --text: #17211e;
  --muted: #56635e;
  --primary: #17211e;
  --primary-hover: #263832;
  --accent: #0b7a5c;
  --accent-soft: #e6f5ef;
  --maple: #b8321e;
  --maple-soft: #fdf2f0;
  --amber: #e29628;
  --prov-col: #d95b43;
  --pay-col: #3a7ca5;
  --blue: #e29628;
  --indigo: #d95b43;
  --danger: #3a7ca5;
  --border: #e5dfd3;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-1: 0 1px 2px rgba(23, 33, 30, 0.05);
  --shadow-2: 0 4px 16px rgba(23, 33, 30, 0.06);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--primary);
  color: var(--surface);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
}

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

/* Warm Paper Minimal Header (no heavy GPU backdrop-filter) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.site-nav a[aria-current="page"] {
  color: var(--surface);
  background: var(--primary);
  font-weight: 600;
}

/* Compact Tool-First Hero with Soft Warm Radial Glow */
.calc-hero {
  padding: 26px 0 42px;
  background: radial-gradient(900px 380px at 82% 8%, rgba(11, 122, 92, 0.07), transparent 65%),
              radial-gradient(640px 320px at 12% 18%, rgba(217, 72, 50, 0.055), transparent 60%),
              var(--bg);
}

.hero-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.page-freshness {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
}

.page-freshness a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-freshness a:hover {
  color: var(--text);
}

.page-freshness--banner {
  margin: 12px 0 0;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Split Stage: Compact Inputs Left + Receipt Card Right */
.calc-stage {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  gap: 32px;
  align-items: start;
}

.calc-inputs {
  min-width: 0;
}

.input-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  gap: 10px;
  margin-bottom: 14px;
}

.field {
  margin-bottom: 14px;
  min-width: 0;
}

.input-row-top .field {
  margin-bottom: 0;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
}

.field-label-row .field-label {
  margin-bottom: 0;
}

.field-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.field-select,
.field-input {
  width: 100%;
  min-height: 44px;
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.25L6 7.75L9.5 4.25' stroke='%2352525b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.field-select:hover,
.field-input:hover {
  border-color: var(--muted);
}

.field-select:focus,
.field-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--surface-soft);
  outline: none;
}

/* Unified Income + Unit Combo Input */
.income-combo {
  display: flex;
  align-items: center;
  min-height: 52px;
  background: var(--surface);
  border: 1.5px solid var(--text);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.income-combo-sm {
  min-height: 44px;
  border: 1px solid var(--border);
}

.income-combo:focus-within {
  box-shadow: 0 0 0 3px var(--surface-soft);
}

.combo-prefix {
  padding-left: 14px;
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}

.income-combo-sm {
  border-width: 1.5px;
  border-color: rgba(23, 33, 30, 0.22);
  background: var(--surface);
}

.income-combo-sm .combo-prefix {
  font-size: 15px;
}

.combo-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 8px;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  outline: none;
}

.income-combo-sm .combo-input {
  font-size: 16px;
  font-weight: 600;
}

.combo-unit {
  flex-shrink: 0;
  height: 36px;
  margin-right: 7px;
  padding: 0 28px 0 10px;
  border: 0;
  border-radius: 8px;
  background-color: var(--surface-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.25L6 7.75L9.5 4.25' stroke='%2352525b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.hourly-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.sub-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.sub-input {
  width: 60px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px 6px;
  text-align: right;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Lightweight Quick Amount Text Links */
.quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quick-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.quick-btn:hover {
  border-color: var(--primary);
  color: var(--text);
}

.quick-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
}

/* Always-Visible Lightweight RRSP & Employment Section */
.calc-extras {
  padding-top: 14px;
  margin-top: 14px;
  margin-bottom: 12px;
  border-top: 1px solid var(--border);
}

.calc-extras .field:last-child {
  margin-bottom: 0;
}

.opt-tag {
  font-weight: 400;
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.seg-btn {
  min-height: 36px;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.seg-btn:hover:not(.is-active) {
  background: rgba(23, 33, 30, 0.07);
}

.seg-btn.is-active {
  background: var(--primary);
  color: var(--surface);
  font-weight: 700;
  box-shadow: var(--shadow-1);
}

.calc-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
}

/* Right: Clean Paystub Receipt Card */
.calc-results {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  box-shadow: var(--shadow-2);
  padding: 24px 26px;
}

.res-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.res-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.period-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-soft);
  border-radius: 9px;
}

.ptab {
  min-height: 28px;
  padding: 2px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ptab:hover:not(.is-active) {
  background: rgba(23, 33, 30, 0.08);
}

.ptab.is-active {
  background: var(--primary);
  color: var(--surface);
  font-weight: 700;
}

.res-hero-num {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.res-net {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: transform 0.16s ease, color 0.16s ease;
}

.res-net.is-pop {
  transform: scale(1.025);
  color: var(--accent);
}

.res-yoy {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.res-yoy.is-negative {
  color: var(--maple);
  background: var(--maple-soft);
}

.res-sub {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

/* Tactile 10px Proportion Bar */
.split-bar {
  display: flex;
  gap: 2px;
  height: 10px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-soft);
  margin: 14px 0 12px;
}

.sb-seg {
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.sb-seg:hover,
.sb-seg.is-hi {
  filter: brightness(1.06);
  transform: scaleY(1.15);
}

.sb-net { background: var(--accent); }
.sb-rrsp { background: var(--accent); opacity: 0.42; }
.sb-fed { background: var(--amber); }
.sb-prov { background: var(--prov-col); }
.sb-pay { background: var(--pay-col); }

/* Playful Human-Relatable Strip */
.fun-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent-soft) 0%, #fcf5ea 100%);
  border: 1px solid rgba(11, 122, 92, 0.12);
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.fun-item strong {
  color: var(--accent);
  font-weight: 700;
}

.fun-dot {
  color: var(--border);
}

.fun-prov-btn {
  margin-left: auto;
  border: 1px solid rgba(217, 72, 50, 0.28);
  background: var(--surface);
  color: var(--maple);
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.fun-prov-btn:hover {
  background: var(--maple);
  color: var(--surface);
  transform: translateY(-1px);
}

/* Clean 4-Row Receipt */
.receipt {
  display: grid;
  gap: 2px;
}

.r-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 12px;
  padding: 7px 6px;
  margin: 0 -6px;
  border-radius: 8px;
  border-bottom: 1px solid var(--surface-soft);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.14s ease;
}

.r-row:hover,
.r-row.is-hi {
  background: var(--bg);
}

.r-row-net {
  border-bottom: 0;
  padding-top: 10px;
  font-weight: 600;
}

.r-row-rrsp {
  border-bottom: 0;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.r-label {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: var(--text);
}

.r-sub-note {
  display: inline;
  margin-left: 5px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.r-pct {
  font-size: 13px;
  color: var(--muted);
}

.r-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  min-width: 78px;
}

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

.sw {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.sw-net { background: var(--accent); }
.sw-fed { background: var(--amber); }
.sw-prov { background: var(--prov-col); }
.sw-pay { background: var(--pay-col); }

/* Single Compact Inline Rate Strip */
.rate-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.rate-inline strong {
  color: var(--text);
}

.rate-cta {
  margin-left: auto;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  white-space: nowrap;
}

.rate-cta:hover {
  color: var(--primary);
}

.sep {
  color: var(--border);
}

/* Direct 1-Click Detail Trigger Buttons (Raised Tactile Keycap Style) */
.calc-details-wrap {
  margin-bottom: 14px;
}

.detail-triggers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dtrig {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.dtrig-lead {
  flex-shrink: 0;
  box-sizing: content-box;
  padding: 6px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dtrig-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dtrig:hover:not(.is-active) {
  border-color: var(--accent);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.dtrig:active {
  transform: translateY(0);
}

.dtrig.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}

.dtrig.is-active .dtrig-lead {
  background: var(--accent);
  color: var(--surface);
}

.dtrig-ico {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.15s ease;
}

.dtrig:hover .dtrig-ico,
.dtrig.is-active .dtrig-ico {
  color: var(--accent);
}

.dtrig.is-active .dtrig-ico {
  transform: rotate(180deg);
}

.calc-details-body {
  margin-top: 10px;
  padding: 10px 14px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow-x: auto;
}

.ledger {
  padding-top: 4px;
}

.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--surface-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ledger-row strong {
  font-weight: 600;
  color: var(--text);
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.mini-table th,
.mini-table td {
  padding: 7px 6px;
  text-align: left;
  border-bottom: 1px solid var(--surface-soft);
  white-space: nowrap;
}

.mini-table th:last-child,
.mini-table td:last-child,
.mini-table th.num,
.mini-table td.num {
  text-align: right;
}

.mini-table th {
  color: var(--muted);
  font-weight: 600;
}

.waterfall-title {
  margin: 12px 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.info-banner {
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 12px;
  color: var(--muted);
}

.info-banner strong {
  color: var(--text);
}

/* Lightweight Footer Utility Row (Clean Borderless Icon Actions) */
.res-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  margin-top: 2px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
}

.res-tools {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-soft);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tool-pill-btn svg {
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.15s ease;
}

.tool-pill-btn:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--accent);
}

.tool-pill-btn:hover svg {
  color: var(--accent);
}

.text-btn {
  border: 0;
  background: none;
  padding: 4px 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

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

.text-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.text-link:hover {
  color: var(--primary);
}

.res-footer .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.res-footer .text-link:hover {
  background: var(--accent);
  color: var(--surface);
}

.action-toast {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* Contextual Next-Step Calculator Strip */
.next-steps-bar {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.next-steps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.next-steps-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.next-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 10px;
}

.next-step-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.next-step-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.next-step-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.next-step-body strong {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.next-step-body span {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
}

.next-step-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.next-step-card:hover .next-step-arrow {
  background: var(--accent);
  color: var(--surface);
}

/* Buttons used by Comments / 404 */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--surface);
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--surface);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-soft);
}

/* Page Banner (Legal / About) */
.page-banner {
  padding: 44px 0 36px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text);
}

.page-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 66ch;
}

/* Editorial Prose Content */
.content-section {
  padding: 64px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.prose {
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.prose h2 {
  margin: 48px 0 14px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 28px 0 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.prose p {
  margin: 0 0 16px;
  max-width: 100%;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
  max-width: 100%;
}

.prose li {
  margin-bottom: 8px;
}

.prose blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--surface-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  max-width: 100%;
}

/* Scannable 2x2 Policy Changes Cards */
.changes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 24px;
}

.change-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
}

.change-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.change-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.3;
}

.change-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose figure,
.chart-frame {
  margin: 28px 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prose figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Overflow-Safe Full-Width Tables (Zero Horizontal Scroll on Desktop) */
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
}

.prose > table {
  display: table;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin: 20px 0 28px;
  overflow: hidden;
}

.prose th,
.prose td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--surface-soft);
  white-space: normal;
  line-height: 1.45;
  vertical-align: top;
}

.prose thead th {
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
  vertical-align: bottom;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.prose tbody tr:hover {
  background: var(--surface-soft);
}

/* Example Cards Grid */
.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}

.example-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 18px;
}

.example-card p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
}

.example-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.example-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
}

.prov-jump-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 32px;
}

.prov-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.prov-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.prov-card strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
}

.prov-card span {
  color: var(--muted);
  font-size: 13px;
}

/* Related Panel */
.related-panel {
  max-width: 100%;
  margin: 48px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related-heading {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.related-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.related-card strong {
  color: var(--text);
  font-size: 16px;
}

.related-card span {
  color: var(--muted);
  font-size: 14px;
}

/* FAQ Section */
.faq-section {
  padding: 64px 0;
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
}

.section-heading {
  margin: 0 0 24px;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 100%;
  margin: 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.faq-q {
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.faq-q::after {
  content: "+";
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-item[open] .faq-q::after {
  content: "\2212";
}

.faq-a {
  padding: 0 22px 20px;
  color: var(--muted);
}

.faq-a p {
  margin: 0;
  max-width: 68ch;
}

/* Comments Section */
.comments-section {
  padding: 36px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.comments-head {
  max-width: 100%;
  margin: 0 0 20px;
}

.comments-sub {
  margin: 0;
  color: var(--muted);
}

.comment-form {
  max-width: 100%;
  margin: 0 0 24px;
  background: var(--surface-soft);
  border-radius: 18px;
  padding: 22px;
}

.comment-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.comment-fields textarea {
  resize: vertical;
  min-height: 88px;
}

.comment-submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-msg {
  font-size: 14px;
  color: var(--muted);
}

.comment-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 14px;
}

.btn-link {
  border: 0;
  background: none;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.comment-list {
  display: grid;
  gap: 12px;
  max-width: 100%;
  margin: 0;
}

.comment-empty {
  display: none;
  margin: 0;
  padding: 20px;
  background: var(--surface-soft);
  border-radius: 14px;
  color: var(--muted);
}

.comment-list[data-gf-empty] .comment-empty {
  display: block;
}

.comment-card,
.comment-reply-card {
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 16px 18px;
}

.comment-card[data-gf-owner],
.comment-reply-card[data-gf-owner] {
  background: var(--accent-soft);
}

.comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.comment-meta strong {
  color: var(--text);
  font-size: 14px;
}

.owner-tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--surface);
  font-size: 12px;
  font-weight: 600;
}

.comment-body {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.comment-replies {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 10px;
}

/* 404 */
.not-found {
  padding: 72px 0;
}

.eyebrow-404 {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
}

.not-found h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 38px;
}

.not-found p {
  max-width: 60ch;
  color: var(--muted);
}

.actions-404 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* Footer */
.site-footer {
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
  padding: 52px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 52ch;
}

.footer-col h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-col a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom p {
  margin: 0;
}

/* Payroll Deduction Breakdown Card (/cpp-ei-rates-2027) */
.payroll-summary-card {
  margin-top: 18px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pay-col);
  border-radius: 16px;
  box-shadow: var(--shadow-1);
}

.ps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.ps-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.ps-total-pill {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 11px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.ps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ps-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
}

.ps-item--er {
  background: var(--surface-soft);
}

.ps-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.ps-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.ps-sub {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ps-se-note {
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Data Status Callout (Quebec & CPP/EI) */
.status-callout {
  margin: 0 0 28px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.status-callout--pending {
  border-left-color: var(--amber);
  background: var(--surface-soft);
}

.status-callout--confirmed {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.status-callout-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
}

.status-callout--pending .status-badge {
  background: var(--maple-soft);
  color: var(--maple);
}

.status-callout p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
}

.status-callout code {
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-soft);
}

/* All 13 Provinces & Territories Directory */
.province-directory {
  margin: 44px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.prov-dir-head {
  margin-bottom: 16px;
}

.prov-dir-heading {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.prov-dir-sub {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.prov-dir-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.prov-dir-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  min-width: 0;
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

a.prov-dir-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.prov-dir-item.is-current {
  background: var(--accent-soft);
  border-color: rgba(11, 122, 92, 0.35);
}

.prov-dir-item strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.prov-dir-item.is-current strong {
  color: var(--accent);
}

.prov-dir-item span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

/* Collapsible Comments Section */
.comments-fold {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.comments-fold-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.comments-fold-summary::-webkit-details-marker {
  display: none;
}

.comments-fold-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.comments-fold-hint {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.comments-fold-hint::after {
  content: "+";
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.comments-fold[open] .comments-fold-hint::after {
  content: "\2212";
}

.comments-fold-body {
  padding: 0 22px 22px;
}

/* Site-Wide Trust Strip Above Footer */
.trust-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 0;
}

.trust-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.trust-strip-inner a {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.trust-strip-inner a:hover {
  text-decoration: underline;
}

.trust-sep {
  color: var(--border);
}

/* Responsive Tablet & Mobile */
@media (max-width: 960px) {
  .calc-stage {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .ps-grid,
  .prov-dir-grid,
  .prov-jump-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .prose > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .prose th,
  .prose td {
    padding: 10px 12px;
    font-size: 13.5px;
    min-width: 104px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 0;
    gap: 6px;
  }
  .site-nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding-bottom: 2px;
  }
  .site-nav a {
    flex-shrink: 0;
    padding: 6px 11px;
    font-size: 13px;
  }
  .calc-hero {
    padding: 14px 0 28px;
  }
  .hero-bar {
    margin-bottom: 12px;
    gap: 4px;
  }
  .hero-title {
    font-size: 22px;
  }
  .page-title {
    font-size: 28px;
  }
  .calc-results {
    padding: 18px 16px;
    border-radius: 16px;
  }
  .res-net {
    font-size: 36px;
  }
  .dtrig {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 68px;
    padding: 8px 4px;
    font-size: 12px;
    text-align: center;
  }
  .dtrig-text {
    flex: 0 0 auto;
    max-width: 100%;
  }
  .dtrig-ico {
    display: none;
  }
  .rate-cta,
  .fun-prov-btn {
    margin-left: 0;
  }
  .example-grid,
  .changes-grid,
  .ps-grid,
  .prov-dir-grid {
    grid-template-columns: 1fr;
  }
  .payroll-summary-card {
    padding: 16px;
  }
  .comments-fold-summary {
    padding: 16px;
  }
  .comments-fold-body {
    padding: 0 16px 16px;
  }
  .next-steps-bar {
    margin-top: 16px;
    padding-top: 14px;
  }
  .next-steps-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .next-step-card {
    padding: 10px 12px;
  }
  .prose h2,
  .section-heading {
    font-size: 24px;
  }
}
