:root{
  --ink:#12203B; --ink-soft:#5B6B7C; --paper:#F5F6F3; --card:#FFFFFF;
  --line:#DDE2E6; --brass:#A9762F; --brass-soft:#F1E6D3; --good:#1F6E4A; --bad:#8A2E2E;
}
*{box-sizing:border-box;}
body{ margin:0; background:var(--paper); color:var(--ink); font-family:'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif; line-height:1.6; }
.serif{ font-family:'Source Serif 4', Georgia, serif; }
.mono{ font-family:'IBM Plex Mono', ui-monospace, monospace; }
.wrap{ max-width:1080px; margin:0 auto; padding:0 20px; }
.wrap.narrow{ max-width:760px; }

/* Header / nav */
header.site{ border-bottom:1px solid var(--line); padding:18px 0; }
header.site .wrap{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.wordmark{ font-size:20px; font-weight:600; letter-spacing:-0.01em; }
.wordmark span{ color:var(--brass); }
.wordmark a{ color:inherit; text-decoration:none; }
nav.main{ display:flex; gap:20px; }
nav.main a{ font-size:14px; color:var(--ink-soft); text-decoration:none; }
nav.main a:hover{ color:var(--ink); }
.tagline{ color:var(--ink-soft); font-size:14px; }

main{ padding:40px 0 80px; }
.kicker{ font-size:13px; color:var(--brass); font-weight:600; margin-bottom:10px; }
h1.hero{ font-size:clamp(26px,4vw,42px); font-weight:600; margin:0 0 14px; letter-spacing:-0.01em; max-width:760px; }
p.lede{ color:var(--ink-soft); font-size:16px; margin:0 0 8px; max-width:640px; }
.updated{ font-size:13px; color:var(--ink-soft); margin-bottom:30px; font-family:'IBM Plex Mono',monospace; }

/* Two-column tool layout */
.grid{ display:grid; grid-template-columns: 1fr 1fr; gap:28px; align-items:start; margin-top:20px; }
@media (max-width:860px){ .grid{ grid-template-columns:1fr; } }
.panel{ background:var(--card); border:1px solid var(--line); border-radius:4px; padding:28px; }
.panel h2{ font-size:15px; font-weight:600; margin:0 0 20px; }
.field{ margin-bottom:18px; }
.field label{ display:block; font-size:13px; color:var(--ink-soft); margin-bottom:6px; }
.field input[type=number], .field input[type=date], .field select{
  width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:3px;
  font-size:15px; font-family:'IBM Plex Mono', monospace; background:#FCFCFB; color:var(--ink);
}
.field select{ font-family:'IBM Plex Sans', sans-serif; }
.field input:focus, .field select:focus{ outline:2px solid var(--brass); outline-offset:1px; border-color:var(--brass); }
.hint{ font-size:12.5px; color:var(--ink-soft); margin-top:5px; }

.toggle-row{ display:flex; gap:8px; flex-wrap:wrap; }
.toggle-row button{
  flex:1; min-width:110px; padding:9px 10px; border:1px solid var(--line); background:#FCFCFB;
  border-radius:3px; font-size:13px; cursor:pointer; color:var(--ink-soft);
}
.toggle-row button.active{ background:var(--ink); border-color:var(--ink); color:#fff; }
.visa-note{ margin-top:14px; padding:12px 14px; background:var(--brass-soft); border-radius:3px; font-size:13px; color:#5C3E14; }

/* Disclaimer / status boxes */
.disclaimer{ background:#FBF3E7; border:1px solid #E8D3A9; border-radius:4px; padding:12px 16px; margin-bottom:14px; font-size:13px; color:#5C3E14; }
.status-box{ background:var(--ink); color:#fff; border-radius:4px; padding:24px 26px; margin-bottom:32px; }
.status-box .label{ font-size:12.5px; color:#9FB0C4; text-transform:uppercase; letter-spacing:0.04em; margin-bottom:8px; }
.status-box .verdict{ font-size:20px; font-weight:600; font-family:'Source Serif 4',serif; margin-bottom:10px; }
.status-box p{ color:#C9D3DF; font-size:14.5px; margin:0; }
.status-box a{ color:#F1D9A8; }
.callout-box{ background:var(--brass-soft); border-radius:3px; padding:16px 18px; font-size:14.5px; color:#5C3E14; margin:20px 0; }
.warn-box{ background:#FBEAEA; border:1px solid #E8B4B4; border-radius:3px; padding:16px 18px; font-size:14.5px; color:#7A2020; margin:20px 0; }

/* Result stub (calculator) */
.stub{ background:var(--ink); color:#fff; border-radius:4px; padding:28px 28px 8px; }
.stub .net-label{ font-size:13px; color:#9FB0C4; margin-bottom:6px; }
.stub .net-amount{ font-size:clamp(34px,4.5vw,48px); font-weight:700; font-family:'Source Serif 4', serif; line-height:1; }
.stub .net-sub{ color:#9FB0C4; font-size:13px; margin-top:8px; }
.period-row{ display:flex; gap:18px; margin-top:22px; padding-top:18px; border-top:1px solid rgba(255,255,255,0.15); flex-wrap:wrap; }
.period-row div{ min-width:90px; }
.period-row .amt{ font-family:'IBM Plex Mono',monospace; font-size:16px; font-weight:600; }
.period-row .lbl{ font-size:12px; color:#9FB0C4; }

/* Verdict box (Canada checker) */
.verdict-box{ border-radius:4px; padding:26px 28px; color:#fff; }
.verdict-box.pass{ background:var(--good); }
.verdict-box.fail{ background:var(--bad); }
.verdict-box .pct-label{ font-size:13px; opacity:0.85; margin-bottom:6px; }
.verdict-box .pct{ font-size:clamp(32px,4.5vw,44px); font-weight:700; font-family:'Source Serif 4', serif; line-height:1; }
.verdict-box .verdict-text{ margin-top:10px; font-size:15px; font-weight:500; }

/* Line-item / breakdown tables */
.lineitems, .breakdown{ background:var(--card); border:1px solid var(--line); border-top:none; border-radius:0 0 4px 4px; padding:22px 28px 26px; }
.lineitems table, .breakdown table{ width:100%; border-collapse:collapse; }
.lineitems td, .breakdown td{ padding:9px 0; border-bottom:1px dashed var(--line); font-size:14px; }
.lineitems tr:last-child td, .breakdown tr:last-child td{ border-bottom:none; }
.lineitems td:last-child, .breakdown td:last-child{ text-align:right; font-family:'IBM Plex Mono', monospace; color:var(--ink); }
.lineitems td.deduct{ color:#8A2E2E; }
.lineitems tr.total td, .breakdown tr.total td{ font-weight:600; border-top:1px solid var(--ink); padding-top:12px; }
.callout{ margin-top:14px; font-size:12.5px; color:var(--ink-soft); }

/* Article typography */
article h2{ font-size:21px; font-weight:600; margin:38px 0 12px; }
article h3{ font-size:16px; font-weight:600; margin:24px 0 8px; }
article p{ font-size:15.5px; color:#2C3B52; margin:0 0 14px; }
article ul{ padding-left:20px; margin:0 0 16px; }
article li{ font-size:15.5px; color:#2C3B52; margin-bottom:8px; }
article a{ color:var(--brass); }

.timeline{ border-left:2px solid var(--line); padding-left:20px; margin:20px 0 28px; }
.timeline .ev{ margin-bottom:16px; }
.timeline .date{ font-family:'IBM Plex Mono',monospace; font-size:12.5px; color:var(--brass); font-weight:600; }
.timeline .desc{ font-size:14.5px; color:var(--ink-soft); }

table.compare{ width:100%; border-collapse:collapse; margin:16px 0 24px; font-size:14px; }
table.compare th{ text-align:left; padding:8px 10px; background:var(--ink); color:#fff; font-weight:500; font-size:13px; }
table.compare td{ padding:9px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
table.compare tr:nth-child(even) td{ background:#FAFAF8; }

/* FAQ (Alpine-driven and native <details> variants) */
section.faq{ margin-top:48px; max-width:760px; }
section.faq h2{ font-size:22px; font-weight:600; margin-bottom:6px; }
section.faq p.intro{ color:var(--ink-soft); font-size:14px; margin-bottom:24px; }
.qa{ border-top:1px solid var(--line); }
.qa:last-child{ border-bottom:1px solid var(--line); }
.qa button, .qa summary{
  width:100%; text-align:left; background:none; border:none; padding:16px 4px; font-size:15px;
  font-weight:500; color:var(--ink); cursor:pointer; display:flex; justify-content:space-between;
  align-items:center; font-family:inherit; list-style:none;
}
.qa summary::-webkit-details-marker{ display:none; }
.qa summary::after{ content:'+'; color:var(--brass); font-family:'IBM Plex Mono',monospace; font-size:18px; }
.qa[open] summary::after{ content:'−'; }
.qa .plus{ color:var(--brass); font-size:18px; font-family:'IBM Plex Mono',monospace; }
.qa .a{ padding:0 4px 18px; color:var(--ink-soft); font-size:14.5px; max-width:680px; }

/* Home / pillar page */
.tool-cards{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:20px; margin-top:28px; }
@media (max-width:860px){ .tool-cards{ grid-template-columns:1fr; } }
.tool-card{ background:var(--card); border:1px solid var(--line); border-radius:4px; padding:24px; text-decoration:none; display:block; }
.tool-card .tc-kicker{ font-size:12px; color:var(--brass); font-weight:600; margin-bottom:8px; }
.tool-card h3{ font-size:17px; font-weight:600; color:var(--ink); margin:0 0 8px; }
.tool-card p{ font-size:13.5px; color:var(--ink-soft); margin:0; }

.sources{ font-size:12.5px; color:var(--ink-soft); margin-top:30px; padding-top:16px; border-top:1px solid var(--line); }
.sources a{ color:var(--ink-soft); }

footer.site{ border-top:1px solid var(--line); padding:26px 0; color:var(--ink-soft); font-size:12.5px; }
