/* TaxClear Canada — Shared Stylesheet */
:root {
  --maple: #D1362F;
  --maple-dark: #A52B25;
  --bg: #FAFAFA;
  --white: #FFFFFF;
  --navy: #0A1628;
  --slate: #1E3A5F;
  --muted: #6B7280;
  --border: #E5E7EB;
  --green: #15803D;
  --amber: #D97706;
  --surface: #F3F4F6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Source Sans 3', sans-serif; background: var(--bg); color: var(--navy); }

/* ---- HEADER / NAV ---- */
header { position: sticky; top: 0; z-index: 100; }
nav { background: var(--navy); padding: 0 40px; display: flex; align-items: center; justify-content: space-between; height: 64px; position: relative; }
.logo { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; color: white; display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.maple-leaf { color: var(--maple); font-size: 22px; }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a { color: #8A9BB0; font-size: 14px; text-decoration: none; transition: color 0.2s; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav-links a:hover { color: white; background: rgba(255,255,255,0.06); }
.nav-dropdown { position: relative; }
.nav-dropdown-btn { color: #8A9BB0; font-size: 14px; background: none; border: none; cursor: pointer; padding: 8px 12px; border-radius: 8px; display: flex; align-items: center; gap: 4px; font-family: 'Source Sans 3', sans-serif; white-space: nowrap; }
.nav-dropdown-btn:hover, .nav-dropdown:hover .nav-dropdown-btn { color: white; background: rgba(255,255,255,0.06); }
.nav-dropdown-menu { position: absolute; top: calc(100% + 4px); left: 0; background: white; border: 1px solid var(--border); border-radius: 12px; padding: 8px; min-width: 220px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); display: none; z-index: 200; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 8px 12px; color: var(--navy); font-size: 14px; text-decoration: none; border-radius: 8px; }
.nav-dropdown-menu a:hover { background: var(--surface); color: var(--maple); }
.menu-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); padding: 6px 12px 2px; }
.nav-mobile-toggle { display: none; background: none; border: none; color: white; font-size: 24px; cursor: pointer; padding: 8px; line-height: 1; }
@media(max-width: 860px) {
  nav { padding: 0 20px; }
  .nav-mobile-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); border-top: 1px solid rgba(255,255,255,0.08); flex-direction: column; align-items: stretch; padding: 12px 16px 16px; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-btn { width: 100%; justify-content: space-between; padding: 10px 12px; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; border-radius: 8px; background: rgba(255,255,255,0.05); margin: 4px 0 8px; padding: 4px; display: block; }
  .nav-dropdown-menu a { color: #8A9BB0; }
  .nav-dropdown-menu a:hover { color: white; background: rgba(255,255,255,0.06); }
  .menu-label { color: rgba(255,255,255,0.3); }
}

/* ---- BREADCRUMB ---- */
.breadcrumb { max-width: 1100px; margin: 0 auto; padding: 14px 20px 0; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--maple); }
.breadcrumb span { margin: 0 6px; color: var(--border); }

/* ---- HERO ---- */
.hero { background: var(--navy); padding: 48px 40px 64px; text-align: center; }
.hero-eyebrow { display: inline-block; background: rgba(209,54,47,0.15); border: 1px solid rgba(209,54,47,0.3); color: var(--maple); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 6px 16px; border-radius: 100px; margin-bottom: 20px; }
.hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(28px, 4.5vw, 52px); font-weight: 800; color: white; line-height: 1.1; max-width: 720px; margin: 0 auto 16px; }
.hero h1 span { color: var(--maple); }
.hero p { color: #8A9BB0; font-size: 16px; max-width: 540px; margin: 0 auto 32px; line-height: 1.6; }
.hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.hero-stat-val { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800; color: white; }
.hero-stat-label { font-size: 12px; color: #8A9BB0; margin-top: 2px; }
@media(max-width: 600px) { .hero { padding: 36px 20px 48px; } .hero-stats { gap: 24px; } }

/* ---- CALCULATOR LAYOUT ---- */
.main { max-width: 1100px; margin: -32px auto 0; padding: 0 20px 64px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
@media(max-width: 768px) { .main { grid-template-columns: 1fr; margin-top: 0; } }

/* ---- PANELS ---- */
.panel { background: white; border-radius: 20px; padding: 32px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.panel-title { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: 10px; }
.panel-icon { font-size: 22px; }

/* ---- FORM FIELDS ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.helper-text { font-size: 12px; color: var(--muted); margin-top: 4px; }
.input-wrap { position: relative; }
.input-wrap span.prefix { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; pointer-events: none; }
.input-wrap input, .input-wrap select { width: 100%; padding: 12px 14px 12px 28px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; font-family: 'Source Sans 3', sans-serif; color: var(--navy); background: var(--bg); transition: border-color 0.2s; }
.input-wrap.no-prefix input, .input-wrap.no-prefix select { padding-left: 14px; }
.input-wrap input:focus, .input-wrap select:focus { outline: none; border-color: var(--maple); background: white; }
.province-select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; font-family: 'Source Sans 3', sans-serif; color: var(--navy); background: var(--bg); }
.province-select:focus { outline: none; border-color: var(--maple); }
.section-divider { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--maple); margin: 24px 0 16px; }
.range-wrap { display: flex; align-items: center; gap: 12px; }
.range-wrap input[type="range"] { flex: 1; accent-color: var(--maple); cursor: pointer; }
.range-val { font-weight: 700; color: var(--navy); min-width: 52px; text-align: right; font-size: 15px; }

/* ---- BUTTONS ---- */
.calc-btn { width: 100%; padding: 16px; background: var(--maple); color: white; font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; border: none; border-radius: 12px; cursor: pointer; transition: background 0.2s; margin-top: 8px; }
.calc-btn:hover { background: var(--maple-dark); }
.calc-btn-secondary { background: var(--navy); margin-top: 8px; }
.calc-btn-secondary:hover { background: var(--slate); }

/* ---- RESULTS PANEL (income tax calculator) ---- */
.results-panel { display: flex; flex-direction: column; gap: 20px; }
.tax-breakdown { background: var(--navy); border-radius: 16px; padding: 28px; color: white; }
.tax-breakdown h3 { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; color: #8A9BB0; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 20px; }
.tax-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px; }
.tax-row:last-child { border-bottom: none; }
.tax-row-label { color: #8A9BB0; }
.tax-row-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.tax-row-val.deduction { color: #4ADE80; }
.tax-row-val.tax { color: #F87171; }
.tax-row.total { margin-top: 8px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.15); border-bottom: none; }
.tax-row.total .tax-row-label { color: white; font-weight: 700; font-size: 16px; }
.tax-row.total .tax-row-val { font-size: 22px; font-family: 'Syne', sans-serif; color: #FBBF24; }
.rate-card { background: white; border: 1.5px solid var(--border); border-radius: 16px; padding: 24px; }
.rate-card h3 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.rate-bars { display: flex; flex-direction: column; gap: 10px; }
.rate-bar-row { font-size: 13px; }
.rate-bar-label { display: flex; justify-content: space-between; margin-bottom: 4px; }
.rate-bar-label span:last-child { font-weight: 600; color: var(--navy); }
.rate-bar-track { background: var(--surface); border-radius: 100px; height: 8px; overflow: hidden; }
.rate-bar-fill { height: 100%; border-radius: 100px; background: var(--maple); transition: width 0.6s ease; }
.rate-bar-fill.federal { background: var(--slate); }
.rrsp-card { background: linear-gradient(135deg, #15803D, #166534); border-radius: 16px; padding: 24px; color: white; }
.rrsp-card h3 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.rrsp-card p { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 16px; }
.rrsp-stat { display: flex; justify-content: space-between; background: rgba(255,255,255,0.1); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; font-size: 14px; }
.rrsp-stat:last-child { margin-bottom: 0; }
.rrsp-stat span:last-child { font-weight: 700; font-family: 'Syne', sans-serif; }

/* ---- GENERIC RESULT CARD (tool pages) ---- */
.result-card { background: var(--navy); border-radius: 16px; padding: 28px; color: white; }
.result-card h3 { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: #8A9BB0; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px; }
.result-big { font-family: 'Syne', sans-serif; font-size: 40px; font-weight: 800; color: #FBBF24; line-height: 1; margin-bottom: 4px; }
.result-label { font-size: 13px; color: #8A9BB0; margin-bottom: 20px; }
.result-rows { display: flex; flex-direction: column; }
.result-row { display: flex; justify-content: space-between; font-size: 14px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.result-row:last-child { border-bottom: none; }
.result-row .rl { color: #8A9BB0; }
.result-row .rv { font-weight: 600; }
.rv.green { color: #4ADE80; }
.rv.red { color: #F87171; }
.rv.yellow { color: #FBBF24; }
.result-row.rt { padding-top: 14px; margin-top: 6px; border-top: 1px solid rgba(255,255,255,0.15); border-bottom: none; }
.result-row.rt .rl { color: white; font-weight: 700; }
.result-row.rt .rv { font-family: 'Syne', sans-serif; font-size: 18px; color: #FBBF24; }

/* ---- INFO CARD ---- */
.info-card { background: white; border: 1.5px solid var(--border); border-radius: 16px; padding: 24px; }
.info-card h3 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.info-card p { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 10px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card ul { font-size: 14px; color: var(--muted); line-height: 1.8; padding-left: 20px; }
.highlight-box { background: rgba(209,54,47,0.05); border: 1px solid rgba(209,54,47,0.15); border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; }
.highlight-box .hl { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--maple); margin-bottom: 4px; }
.highlight-box .hv { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--navy); }
.highlight-box .hv.green { color: var(--green); }

/* ---- SCENARIO CARDS (Salary vs Dividend) ---- */
.scenarios { display: flex; flex-direction: column; gap: 12px; }
.scenario-grid { display: flex; flex-direction: column; gap: 12px; }
.scenario-card { border-radius: 14px; padding: 20px; border: 2px solid var(--border); background: white; transition: border-color 0.2s; }
.scenario-card.best { border-color: var(--green); background: rgba(21,128,61,0.03); }
.scenario-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.best-badge { font-size: 11px; font-weight: 700; background: var(--green); color: white; padding: 2px 8px; border-radius: 100px; letter-spacing: 0.5px; }
.scenario-amount { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--navy); margin: 4px 0; }
.scenario-sub { font-size: 13px; color: var(--muted); }
.sc-icon { font-size: 26px; margin-bottom: 8px; }
.sc-title { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0.5px; margin-bottom: 4px; }
.sc-val { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1.1; margin-bottom: 2px; }
.sc-label { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.sc-rows { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.sc-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.sc-row.highlight { color: var(--green); font-weight: 600; }

/* ---- PROJECTION BARS (RRSP) ---- */
.proj-chart { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.proj-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.proj-bar-label { min-width: 52px; color: var(--muted); text-align: right; }
.proj-bar-track { flex: 1; background: var(--surface); border-radius: 4px; height: 20px; overflow: hidden; }
.proj-bar-fill { height: 100%; background: linear-gradient(90deg, var(--slate), var(--maple)); border-radius: 4px; transition: width 0.6s ease; display: flex; align-items: center; padding-left: 8px; }
.proj-bar-val { font-size: 11px; font-weight: 700; color: white; white-space: nowrap; }

/* ---- CHIP / BADGE ---- */
.rate-chip { display: inline-block; background: rgba(209,54,47,0.1); color: var(--maple); font-weight: 700; padding: 2px 9px; border-radius: 4px; font-size: 13px; }
.rate-chip.green { background: rgba(21,128,61,0.1); color: var(--green); }
.rate-chip.blue { background: rgba(30,58,95,0.1); color: var(--slate); }

/* ---- SHARE BAR ---- */
.share-bar { max-width: 1100px; margin: 0 auto; padding: 12px 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.share-label { font-size: 13px; color: var(--muted); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1.5px solid var(--border); background: white; color: var(--navy); text-decoration: none; transition: all 0.2s; font-family: 'Source Sans 3', sans-serif; }
.share-btn:hover { border-color: var(--maple); color: var(--maple); }

/* ---- AD SLOT ---- */
.ad-slot { max-width: 1100px; margin: 0 auto; padding: 0 20px 24px; }
.ad-leaderboard { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px 20px; text-align: center; }

/* ---- TOOL CARD GRID ---- */
.section-heading { max-width: 1100px; margin: 0 auto; padding: 48px 20px 24px; }
.section-heading h2 { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.section-heading p { color: var(--muted); font-size: 15px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; max-width: 1100px; margin: 0 auto; padding: 0 20px 48px; }
.tool-card { background: white; border: 1.5px solid var(--border); border-radius: 16px; padding: 22px; text-decoration: none; color: var(--navy); transition: all 0.2s; display: block; }
.tool-card:hover { border-color: var(--maple); box-shadow: 0 4px 20px rgba(209,54,47,0.08); transform: translateY(-1px); }
.tool-card-icon { font-size: 26px; margin-bottom: 10px; }
.tool-card h3 { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.tool-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---- PROVINCE LINK GRID ---- */
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 20px; }
.prov-link { display: block; background: white; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--navy); font-size: 14px; font-weight: 600; transition: all 0.2s; }
.prov-link:hover { border-color: var(--maple); color: var(--maple); }
.prov-abbr { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 800; color: var(--maple); display: block; margin-bottom: 2px; }

/* ---- COMPARE TABLE ---- */
.compare-wrap { overflow-x: auto; border-radius: 14px; border: 1.5px solid var(--border); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th { background: var(--navy); color: white; padding: 12px 16px; text-align: left; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 0.5px; white-space: nowrap; cursor: pointer; user-select: none; }
.compare-table th:hover { background: var(--slate); }
.compare-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); background: white; white-space: nowrap; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr.best td { background: rgba(21,128,61,0.05); }
.compare-table tr.best td:first-child { font-weight: 700; }
.compare-table tr:hover td { background: var(--surface); }

/* ---- BRACKETS TABLE ---- */
.brackets-table { width: 100%; border-collapse: collapse; font-size: 14px; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--border); }
.brackets-table th { background: var(--navy); color: white; padding: 10px 16px; text-align: left; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 0.5px; }
.brackets-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); background: white; }
.brackets-table tr:last-child td { border-bottom: none; }

/* ---- CONTENT / FAQ ---- */
.content-section { padding: 48px 20px; }
.content-section.alt { background: var(--surface); }
.content-inner { max-width: 860px; margin: 0 auto; }
.content-inner h2 { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 16px; }
.content-inner h3 { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 700; color: var(--navy); margin: 28px 0 12px; }
.content-inner p { color: var(--muted); font-size: 15px; line-height: 1.8; margin-bottom: 14px; }
.content-inner p:last-child { margin-bottom: 0; }
.content-inner strong { color: var(--navy); }
.content-inner ul, .content-inner ol { padding-left: 24px; color: var(--muted); font-size: 15px; line-height: 1.8; margin-bottom: 14px; }
.faq-section { background: white; border-top: 1px solid var(--border); padding: 56px 20px; }
.faq-inner { max-width: 820px; margin: 0 auto; }
.faq-inner > h2 { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.faq-inner > p { color: var(--muted); font-size: 15px; margin-bottom: 36px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 22px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.faq-item p { color: var(--muted); font-size: 15px; line-height: 1.75; }
.faq-item strong { color: var(--navy); }

/* ---- NOTICE CARD ---- */
.notice { background: rgba(209,54,47,0.05); border: 1px solid rgba(209,54,47,0.18); border-radius: 10px; padding: 14px 18px; font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.notice strong { color: var(--maple); }

/* ---- BRACKETS TAB SECTION ---- */
.prov-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.prov-tab { padding: 7px 14px; border-radius: 8px; border: 1.5px solid var(--border); background: white; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); transition: all 0.2s; font-family: 'Source Sans 3', sans-serif; }
.prov-tab.active, .prov-tab:hover { border-color: var(--maple); color: var(--maple); background: rgba(209,54,47,0.04); }
.prov-bracket-panel { display: none; }
.prov-bracket-panel.active { display: block; }

/* ---- INCOME SLIDER (compare page) ---- */
.income-control { background: var(--navy); padding: 32px 20px; }
.income-control-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.income-control h2 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: white; margin-bottom: 8px; }
.income-control p { color: #8A9BB0; font-size: 14px; margin-bottom: 24px; }
.income-display { font-family: 'Syne', sans-serif; font-size: 48px; font-weight: 800; color: #FBBF24; margin-bottom: 16px; }
.income-slider { width: 100%; accent-color: var(--maple); cursor: pointer; }

/* ---- FOOTER ---- */
footer { background: var(--navy); color: #4B5E74; font-size: 12px; text-align: center; padding: 40px 20px; }
footer p { margin-bottom: 10px; line-height: 1.6; }
footer p:last-child { margin-bottom: 0; }
footer a { color: #8A9BB0; text-decoration: none; }
footer a:hover { color: white; }
.footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { font-size: 13px; }
