/* MyEI.ca layout and components */
:root {
  --primary: #0b57d0; --primary-hover: #0842a0; --primary-soft: #e8f0fe;
  --text: #1f1f1f; --muted: #444746; --border: #dde2ea; --border-strong: #c4c7c5;
  --bg: #f8fafd; --panel: #fff; --surface: #f0f4f9; --surface-2: #e8eaed;
  --ok: #137333; --ok-bg: #e6f4ea; --warn: #8a5300; --warn-bg: #fef7e0; --bad: #c5221f; --bad-bg: #fce8e6;
  --radius: 16px; --control: 12px; --wrap: 1600px; --gutter: 24px; --header-height: 64px;
  --shadow: 0 1px 2px rgba(60,64,67,.06), 0 2px 8px rgba(60,64,67,.06);
  --font: "Google Sans", Roboto, "Segoe UI", system-ui, -apple-system, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: Roboto, "Segoe UI", system-ui, -apple-system, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--body); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .h3, .h4 { font-family: var(--font); line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 .5em; color: var(--text); }
h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 600; margin-top: 1.6em; }
h3, .h3 { font-size: 1.2rem; font-weight: 600; }
h4, .h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; }
table { border-collapse: collapse; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* visually hidden until focused: clipped, not moved off-screen (an off-screen box overflows the page in right-to-left languages) */
.skip-link { position: absolute; top: 8px; inset-inline-start: 8px; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { width: auto; height: auto; overflow: visible; clip: auto; }
:focus-visible { outline: 3px solid rgba(26,115,232,.45); outline-offset: 2px; }

/* header */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--panel); border-bottom: 1px solid var(--border); }
.topbar-row { display: flex; align-items: center; gap: 24px; min-height: var(--header-height); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 1.15rem/1 var(--font); white-space: nowrap; }
.brand b { color: var(--primary); font-weight: 700; }
.brand small { font-size: .8em; color: var(--muted); font-weight: 500; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; font: 700 .85rem/1 var(--font); }
#primary-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
#primary-nav a { color: var(--muted); text-decoration: none; font: 500 .92rem/1 var(--font); padding: 10px 12px; border-radius: 999px; white-space: nowrap; }
#primary-nav a:hover { background: var(--surface); color: var(--text); }
#primary-nav a[aria-current] { background: var(--primary-soft); color: var(--primary); }
#primary-nav a.btn { color: #fff; background: var(--primary); margin-left: 6px; }
#primary-nav a.btn:hover { background: var(--primary-hover); }
.nav-toggle { display: none; flex: none; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--panel); border-radius: 10px; padding: 7px 10px; font: 500 .9rem var(--font); color: var(--text); cursor: pointer; white-space: nowrap; }
.lang-switch { display: flex; flex: none; align-items: center; gap: 6px; font: 500 .85rem/1.2 var(--font); white-space: nowrap; }
.lang-switch label { color: var(--muted); }
.lang-switch select { min-height: 36px; max-width: 11rem; padding: 6px 30px 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.lang-switch select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lang-switch noscript { display: flex; gap: 8px; flex-wrap: wrap; }
.lang-switch noscript a { color: var(--primary); }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border-radius: var(--control); border: 1px solid var(--primary); background: var(--primary); color: #fff; font: 500 1rem/1.3 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s; }
.btn:hover { background: var(--primary-hover); color: #fff; box-shadow: 0 1px 3px rgba(60,64,67,.3); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: 12px 28px; font-size: 1.05rem; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--border); }
.btn-outline:hover { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--primary); border-color: transparent; }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
.linklike { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
form.tool { display: grid; gap: 14px; }
.field { display: grid; align-content: start; gap: 6px; margin: 0; }
.field > label, legend { font: 500 .95rem/1.35 var(--font); color: var(--text); }
input[type=text], input[type=email], input[type=date], input[type=number], select {
  width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--control); background: var(--panel); color: var(--text); font: 16px/1.3 var(--body); }
input:focus, select:focus { border-color: var(--primary); outline: 2px solid rgba(26,115,232,.25); outline-offset: 0; }
.hint { margin: 0; color: var(--muted); font-size: .85rem; }
fieldset.radios { min-width: 0; border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.radios legend { width: 100%; margin-bottom: 6px; padding: 0; }
.radio { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: .95rem; background: #fff; }
.radio:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: #174ea6; }
.radio input { accent-color: var(--primary); margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; margin: 6px 0; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
details.optional { border: 1px dashed var(--border); border-radius: var(--control); padding: 10px 14px; }
details.optional summary { cursor: pointer; color: var(--muted); font-size: .95rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-error { color: var(--bad); background: var(--bad-bg); border-radius: var(--control); padding: 10px 14px; margin: 0; font-size: .95rem; }
.form-ok { color: var(--ok); background: var(--ok-bg); border-radius: var(--control); padding: 10px 14px; margin: 0; font-size: .95rem; }
.privacy-note { margin: 0; color: var(--muted); font-size: .82rem; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* layout pieces */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card-quiet { background: var(--surface); }
.cards { display: grid; gap: 16px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
a.card { text-decoration: none; color: var(--text); display: grid; gap: 6px; align-content: start; transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--primary); box-shadow: 0 1px 6px rgba(60,64,67,.15); color: var(--text); }
a.card strong { font: 600 1.05rem/1.35 var(--font); }
a.card span { color: var(--muted); font-size: .92rem; }
.eyebrow { font: 500 .78rem/1.3 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin: 0 0 8px; }
a.card .eyebrow { margin: 0; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 760px; }
.section { padding: clamp(32px, 5vw, 64px) 0; }
.section-alt { background: var(--panel); border-block: 1px solid var(--border); }
.section h2 { margin-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.more { font-weight: 500; text-decoration: none; white-space: nowrap; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.page { padding-top: 12px; padding-bottom: 56px; }
.narrow { max-width: 720px; }
.prose { max-width: 820px; }
.notice { background: var(--warn-bg); border: 1px solid #f9e2a6; border-radius: 12px; padding: 12px 16px; font-size: .95rem; }
.callout { background: var(--primary-soft); border-radius: 12px; padding: 12px 16px; }
.callout.strong { border-left: 4px solid var(--primary); }
.crumbs { font-size: .88rem; color: var(--muted); margin: 6px 0 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; text-decoration: none; color: var(--text); font-size: .92rem; }
.chips a:hover { border-color: var(--primary); color: var(--primary); }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.link-list a { text-decoration: none; }
.link-list a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; font-size: .95rem; }
.table caption { text-align: left; color: var(--muted); font-size: .85rem; padding-bottom: 8px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font: 500 .85rem/1.3 var(--font); color: var(--muted); background: var(--surface); }
.table.compact td, .table.compact th { padding: 6px 12px; }

/* hero */
.hero { padding: 48px 0 28px; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px; align-items: center; }
.hero-illustration { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.hero .eyebrow { display: inline-flex; padding: 5px 12px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--primary-soft); }
.hero .lead, .tool-intro .lead { margin-bottom: 0; }
.hero h1 em { font-style: normal; color: var(--primary); }
.facts-strip { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.facts-strip li { display: grid; align-content: start; gap: 2px; padding: 12px; background: var(--surface); border-radius: var(--control); }
.facts-strip strong { font: 700 1.3rem/1.2 var(--font); color: var(--text); }
.facts-strip span { font-size: .82rem; color: var(--muted); }
.why h3 { font-size: 1.05rem; }
.why p { color: var(--muted); font-size: .93rem; margin: 0; }
.tool-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); display: inline-block; position: relative; }
.tool-icon::after { content: "$"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--primary); font: 700 1rem var(--font); }
.tool-icon[data-icon=eligibility]::after { content: "✓"; }
.tool-icon[data-icon=selfemployed]::after { content: "⌂"; }
.tool-icon[data-icon=parental]::after { content: "♥"; }
.tool-icon[data-icon=timeline]::after { content: "⏱"; }
.tool-icon[data-icon=sickness]::after { content: "+"; }
.tool-icon[data-icon=working]::after { content: "½"; }

/* standalone calculators */
.tool-intro { margin-bottom: 24px; }
.calc-layout { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.home .calc-layout { grid-template-columns: minmax(0, 54fr) minmax(0, 46fr); margin-bottom: 40px; }
.home .calc-output { container: home-output / inline-size; }
.calc-output, .calc-related { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.calc-output > .notice { margin: 0; }
.calc-output > .ad { margin: 0; }
.calc-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc-related .card-quiet { grid-column: 1 / -1; }
.calc-inputs h2, .calc-empty h2, .calc-related h2 { margin-top: 0; }
.calc-inputs .linklike { justify-self: start; text-align: start; }
.calc-inputs .region-field .hint:empty { display: none; }

/* Decorative icons alongside the homepage calculator labels. */
.home .calc-inputs {
  --pin-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M19 10c0 5-7 10-7 10S5 15 5 10a7 7 0 1 1 14 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.3'/%3E%3C/svg%3E");
  --clock-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
  --pay-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='6' width='18' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M6.5 12h.5m10 0h.5'/%3E%3C/svg%3E");
  --calendar-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='4' y='5.5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3.5v4m8-4v4M4 10h16m-11 5h2'/%3E%3C/svg%3E");
}
.home .calc-inputs label[for="c-postal"] { --label-icon: var(--pin-icon); }
.home .calc-inputs :is(label[for="c-hours"], label[for="c-hpw"]) { --label-icon: var(--clock-icon); }
.home .calc-inputs label[for="c-pay"] { --label-icon: var(--pay-icon); }
.home .calc-inputs label[for="c-last"] { --label-icon: var(--calendar-icon); }
.home .calc-inputs legend {
  --label-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3Cpath d='M8 5v4m8 1v4m-6 1v4' stroke-width='2.5'/%3E%3C/svg%3E");
}
.home .calc-inputs .optional summary {
  --label-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='3'/%3E%3Cpath d='M8 12h8m-4-4v8'/%3E%3C/svg%3E");
}
.home .calc-inputs .check:has([name="family"]) span {
  --label-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 19v-1a5 5 0 0 1 5-5h2a5 5 0 0 1 5 5v1m1-13a2.5 2.5 0 0 1 0 5m1 3a4 4 0 0 1 4 4v1'/%3E%3C/svg%3E");
}
.home .calc-inputs .check:has([name="separation"]) span { --label-icon: var(--pay-icon); }
.home .calc-inputs :is(.field:not(.radios) > label:not(.sr-only), legend, .optional summary, .check span)::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-inline-end: .4em;
  vertical-align: -.17em;
  background: var(--primary);
  mask: var(--label-icon) center / contain no-repeat;
}

.result { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--header-height) + 16px); }
.calc-output > .result { margin-top: 0; }
.calc-output > .result:not([hidden]) + .calc-empty { display: none; }
.result:focus { outline: none; }
.result h3 { margin-top: 1.4em; }
.bigs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0 16px; }
.big { background: var(--surface); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; }
.big-label { font-size: .82rem; color: var(--muted); }
.big-value { font: 700 clamp(1.35rem, 2.5vw, 2rem)/1.15 var(--font); color: var(--primary); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.big-sub { font-size: .8rem; color: var(--muted); }
@container home-output (max-width: 599px) {
  .facts-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container home-output (max-width: 510px) {
  .bigs { grid-template-columns: minmax(0, 1fr); }
  .big { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .big-value { grid-column: 2; grid-row: 1 / span 2; }
}
@container home-output (max-width: 395px) {
  .facts-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.verdict { display: inline-block; font: 600 1.15rem/1.3 var(--font); padding: 8px 14px; border-radius: 10px; margin: 0 0 12px; }
.verdict-yes { color: var(--ok); background: var(--ok-bg); }
.verdict-risk { color: var(--warn); background: var(--warn-bg); }
.verdict-no { color: var(--bad); background: var(--bad-bg); }
.ok-list li::marker { content: "✓  "; color: var(--ok); }
.risk-list li::marker { content: "!  "; color: var(--warn); font-weight: 700; }
.x-list li::marker { content: "✕  "; color: var(--bad); }
details.how { background: var(--surface); border-radius: 12px; padding: 12px 16px; margin: 12px 0; }
details.how summary { cursor: pointer; font-weight: 500; }
details.how ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: .93rem; }
.dates { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dates li { display: grid; grid-template-columns: 170px 1fr; gap: 2px 16px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.dates li span { color: var(--muted); font-size: .88rem; }
.dates li em { grid-column: 2; font-style: normal; color: var(--muted); font-size: .88rem; }
.next { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.result-note { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 16px; }
.planner-box, .reminder-box { border: 1px solid var(--primary); background: #f8fbff; border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; }
.planner-box h3, .reminder-box h3 { margin-top: 0; }
.planner-form, .reminder-form { display: grid; gap: 10px; max-width: 460px; }
.planner-form label, .reminder-form label { display: grid; gap: 6px; font-weight: 500; font-size: .93rem; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare-col { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.compare-col h3 { margin: 0 0 8px; }
.facts { padding-left: 18px; margin: 10px 0 0; font-size: .93rem; }
.flow { margin: 8px 0 16px; display: grid; gap: 10px; }
.flow-row { display: grid; grid-template-columns: 80px 1fr; gap: 10px; align-items: end; }
.flow-label { font-size: .85rem; color: var(--muted); }
.flow-bars { display: flex; align-items: flex-end; gap: 2px; height: 70px; border-bottom: 1px solid var(--border); }
.flow-bar { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; min-width: 3px; }
.flow-row:nth-child(2) .flow-bar { background: #8ab4f8; }
.timeline { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 0; border-left: 2px solid var(--primary-soft); }
.timeline li { position: relative; padding: 0 0 18px 22px; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }
.timeline li.past::before { background: var(--border); }
.timeline li.past { color: var(--muted); }
.timeline .tl-date { font-size: .85rem; color: var(--primary); font-weight: 500; }
.timeline li p { margin: 0; }

/* articles */
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 300px; gap: 48px; align-items: start; }
.article-side { display: grid; gap: 16px; position: sticky; top: 88px; }
.article-side .card { padding: 18px 20px; }
.article-side h2 { margin-top: 0; }
.meta { color: var(--muted); font-size: .9rem; }
.answer { background: var(--primary-soft); border-radius: var(--radius); padding: 18px 22px; margin: 18px 0 24px; font-size: 1.08rem; }
.answer p:last-child { margin-bottom: 0; }
.answer-label { font: 600 .8rem/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: #174ea6; margin-bottom: 10px; }
.embed { margin: 24px 0; }
.embed > h2 { margin-top: 0; }
.article-main table { width: 100%; font-size: .95rem; margin: 12px 0 20px; display: block; overflow-x: auto; }
.article-main th, .article-main td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.article-main th { background: var(--surface); font-weight: 500; }
.module { margin-top: 8px; }
.checklist { list-style: none; padding: 0; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border: 2px solid var(--primary); border-radius: 4px; }
.steps { padding-left: 22px; display: grid; gap: 8px; }
.steps h3 { font-size: 1.05rem; margin: 0 0 4px; }
.steps .time { font: 500 .8rem var(--font); color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.mistakes { padding-left: 22px; }
.mistakes h3 { font-size: 1.05rem; margin: 0 0 4px; }
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq summary { cursor: pointer; font: 500 1.02rem/1.4 var(--font); }
.faq details div { padding-top: 8px; }
.sources ul { font-size: .92rem; }
.contact { background: var(--surface); border-radius: 12px; padding: 14px 18px; font-size: .95rem; }
.guide-group h2 { font-size: 1.3rem; }
.region-group h2 { font-size: 1.25rem; }
.ad { margin: 28px 0; }
.ad-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 4px; }

/* planner report */
.planner-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 16px; }
.plan h2 { font-size: 1.3rem; }

/* footer */
.footer { background: var(--panel); border-top: 1px solid var(--border); padding: 40px 0 28px; margin-top: 24px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
.footer-brand { font: 600 1.25rem var(--font); margin: 0 0 6px; }
.footer-brand b { color: var(--primary); }
.footer-col { display: grid; gap: 8px; align-content: start; }
.footer-col a { color: var(--text); text-decoration: none; }
.footer-col a:hover { color: var(--primary); text-decoration: underline; }
.footer-h { font: 600 .82rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 4px; }
.disclaimer { margin: 28px 0 8px; color: var(--muted); font-size: .85rem; max-width: 90ch; }

@media (1100px < width <= 1240px) {
  .topbar-row { gap: 16px; }
  #primary-nav a:not(.btn) { padding-inline: 8px; }
}
@media (max-width: 1100px) {
  .topbar-row { gap: 10px; }
  .lang-switch { margin-inline-start: auto; }
  .nav-toggle { display: inline-flex; order: 1; }
  #primary-nav { display: none; position: absolute; inset: 100% 0 auto; max-height: calc(100dvh - var(--header-height)); overflow-y: auto; background: var(--panel); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); padding: 8px var(--gutter) 16px; flex-direction: column; align-items: stretch; }
  #primary-nav.open { display: flex; }
  #primary-nav a { padding: 12px 8px; border-radius: 8px; }
  #primary-nav a.btn { margin: 8px 0 0; }
}
@media (max-width: 980px) {
  .split, .calc-layout, .home .calc-layout, .article-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 30%); gap: 24px; }
  .article-side { position: static; }
  .cards-3, .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .hero { padding: 18px 0 14px; }
  .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hero-illustration { max-width: 420px; }
  .hero .eyebrow { margin-bottom: 10px; }
  .lead { font-size: 1rem; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .card { padding: 16px; }
  .grid2, .cards-3, .cards-4, .calc-related, .compare, .footer-grid, .bigs { grid-template-columns: minmax(0, 1fr); }
  .big { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .big-value { grid-column: 2; grid-row: 1 / span 2; }
  .dates li { grid-template-columns: 1fr; }
  .dates li em { grid-column: 1; }
  .section-head { flex-direction: column; align-items: start; }
  .planner-head { flex-direction: column; }
}
@media (max-width: 480px) {
  .topbar-row { gap: 6px; }
  .brand { gap: 6px; }
  .brand-mark { width: 24px; height: 24px; }
  .lang-switch > * { padding-inline: 6px; }
  .nav-toggle { padding-inline: 8px; }
}
@media print {
  .topbar, .footer, .no-print, .ad, .crumbs { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .card, .big { border: 1px solid #ccc; box-shadow: none; }
  a { color: inherit; text-decoration: none; }
  details.how { display: block; }
}

/* Newcomer journey bar (Richscripts matrix v2, step 7 of 10) */
.journey { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 16px 18px; margin: 0 0 16px; }
.journey-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.journey-step { margin: 0; font-size: .92rem; color: var(--muted); }
.journey-step strong { color: var(--text); }
.journey-dots { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.journey-dots li { width: 18px; height: 6px; border-radius: 3px; background: var(--border); }
.journey-dots li.done { background: #a8c7fa; }
.journey-dots li.here { background: var(--primary); width: 28px; }
.journey-links { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; }
.journey-links a { display: grid; gap: 4px; align-content: start; text-decoration: none; color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.journey-links a:hover { border-color: var(--primary); color: var(--text); }
.journey-links strong { font: 600 1rem/1.3 var(--font); }
.journey-links span { font-size: .88rem; color: var(--muted); }
.journey-links .journey-label { font: 500 .78rem/1.2 var(--font); color: var(--primary); text-transform: uppercase; letter-spacing: .06em; }
.journey-next { background: var(--primary-soft); border-color: #a8c7fa !important; }
.planner-feature .checklist { margin: 0; }
.attribution { color: inherit; }
@media (max-width: 640px) { .journey-links { grid-template-columns: minmax(0, 1fr); } }
/* language menu: compact on phones so the header fits in every language (also right-to-left) */
@media (max-width: 640px) { .lang-switch label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .lang-switch select { max-width: 8.5rem; font-size: .85rem; } }
