/* MSP for Canada: shared styles for every page. Colors are tokens; dark mode redefines them. */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f3f1ed;
  --ink: #16202e;
  --ink-2: #435063;
  --ink-3: #6b7788;
  --line: #e2ded6;
  --brand: #14365c;
  --brand-ink: #ffffff;
  --accent: #b5232f;
  --accent-soft: #f8e5e6;
  --ok: #1f7a4d;
  --focus: #2f6fd6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 46, .06), 0 8px 24px rgba(22, 32, 46, .06);
  --max: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151d;
    --surface: #161e29;
    --surface-2: #1c2633;
    --ink: #e9edf2;
    --ink-2: #b5c0cd;
    --ink-3: #8794a5;
    --line: #2a3644;
    --brand: #8fb6e3;
    --brand-ink: #0f151d;
    --accent: #ef6b74;
    --accent-soft: #3a1d22;
    --ok: #5cc493;
    --focus: #8fb6e3;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 {
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-2); }
ul { padding-left: 1.2em; color: var(--ink-2); }
li { margin: .3em 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Top bar and header */
.topbar { background: var(--brand); color: var(--brand-ink); font-size: .85rem; }
.topbar .wrap { display: flex; gap: 18px; justify-content: space-between; align-items: center; min-height: 36px; flex-wrap: wrap; }
.topbar a { color: inherit; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; color: inherit; }
.topbar .hide-sm { display: none; }
@media (min-width: 720px) { .topbar .hide-sm { display: inline; } }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; line-height: 1.1; }
.brand-name small { display: block; font-family: "Inter", sans-serif; font-weight: 500; font-size: .72rem; color: var(--ink-3); letter-spacing: .02em; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer;
}
.nav { display: none; }
.nav.open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 18px;
}
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 10px 4px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .97rem; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav .btn { margin-top: 8px; text-align: center; }
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav, .nav.open { display: flex; position: static; padding: 0; border: 0; align-items: center; gap: 4px; }
  .nav ul { display: flex; gap: 2px; }
  .nav a { padding: 8px 12px; border-radius: 8px; }
  .nav a:hover { background: var(--surface-2); color: var(--ink); }
  .nav .btn { margin: 0 0 0 10px; }
}

/* Buttons */
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  border: 1px solid transparent; font-size: .97rem; line-height: 1.2; cursor: pointer; font-family: inherit;
}
.btn:hover { filter: brightness(1.08); color: #fff; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--surface-2); color: var(--ink); filter: none; }
.nav a.btn, .nav a.btn:hover { color: #fff; background: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn, :root:not([data-theme="light"]) .nav a.btn { color: #1a0d0f; }
}

/* Sections */
section { padding: 64px 0; }
@media (min-width: 720px) { section { padding: 88px 0; } }
.alt { background: var(--surface-2); }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46em; }
.section-head { max-width: 760px; margin-bottom: 40px; }

.hero { padding: 56px 0 64px; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .hero { padding: 88px 0 96px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.25fr 1fr; gap: 56px; } }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.hero-card h3 { font-size: 1rem; margin-bottom: 14px; }
.status-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: .93rem; }
.status-row span:first-child { color: var(--ink-2); }
.status-row strong { color: var(--ink); font-weight: 700; text-align: right; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: middle; }

.page-hero { padding: 56px 0 48px; border-bottom: 1px solid var(--line); background: var(--surface); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-3); }

/* Grids and cards */
.grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: repeat(2, 1fr); } .grid.three { grid-template-columns: repeat(2, 1fr); } .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
a.card { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--brand); transform: translateY(-2px); color: inherit; }
.card .more { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--brand); font-size: .93rem; }
.icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 22px; height: 22px; }

.stats { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 960px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat strong { display: block; font-family: "Manrope", sans-serif; font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat span { color: var(--ink-3); font-size: .92rem; }

.split { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }

.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 28px; margin: .55em 0; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23b5232f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

.steps { counter-reset: step; display: grid; gap: 20px; }
@media (min-width: 960px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { counter-increment: step; border-top: 3px solid var(--brand); padding-top: 18px; }
.step::before { content: "0" counter(step); font-family: "Manrope", sans-serif; font-weight: 800; color: var(--accent); font-size: .9rem; letter-spacing: .08em; }
.step h3 { margin-top: 6px; }

/* Plans */
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); }
.plan .tag { align-self: flex-start; background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.price { font-family: "Manrope", sans-serif; font-size: 2.1rem; font-weight: 800; color: var(--ink); margin: 6px 0 2px; }
.price small { font-size: .9rem; font-weight: 600; color: var(--ink-3); }
.plan .checks { flex: 1; }
.plan .btn { margin-top: 18px; text-align: center; }
.fine { font-size: .85rem; color: var(--ink-3); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; color: var(--ink); }
td { color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin: 12px 0 0; }

/* CTA band */
.cta-band { background: var(--brand); color: var(--brand-ink); border-radius: 16px; padding: 40px 28px; display: grid; gap: 20px; align-items: center; }
@media (min-width: 960px) { .cta-band { grid-template-columns: 1.6fr auto; padding: 48px 56px; } }
.cta-band h2, .cta-band p { color: inherit; }
.cta-band p { opacity: .85; margin: 0; }
.cta-band .btn.secondary { color: var(--brand-ink); border-color: currentColor; }
.cta-band .btn.secondary:hover { background: rgba(255, 255, 255, .1); }

/* Forms */
form .field { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--ink); }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem;
}
textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 720px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* Prose pages */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; }

/* Footer */
.site-footer { background: #0e1621; color: #c3ccd7; padding: 56px 0 28px; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #c3ccd7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; color: inherit; }
.site-footer p { color: #c3ccd7; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-bottom { border-top: 1px solid #253244; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; color: #8795a7; font-size: .85rem; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-name small { color: #8795a7; }
