/* startbiz.css — the "starting a business" section (component-scoped; tokens from the .gcx- house palette,
   each with a fallback so the page renders even where the page does not define them). */
.sb {
  --sb-ink: var(--gcx-ink, #1a1a1a);
  --sb-ink-2: var(--gcx-ink-2, #40403a);
  --sb-forest: var(--gcx-forest, #1a3d2e);
  --sb-line: var(--gcx-line, #e6dcc8);
  --sb-mute: #5b6b62;
  --sb-paper: #ffffff;
  --sb-tint: var(--gcx-parchment, #fcf6e9);
}

/* Tool A */
.sb-unlock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 8px; }
.sb-unlock label { font-weight: 600; color: var(--sb-ink, #1a1a1a); }
.sb-unlock select {
  font: inherit; font-size: 16px; /* ≥16px: no iOS zoom */
  min-height: 44px; padding: 8px 12px; border: 1px solid var(--sb-line, #e6dcc8); border-radius: 8px;
  background: var(--sb-paper, #fff); color: var(--sb-ink, #1a1a1a); max-width: 100%;
}
.sb-unlock select:focus-visible { outline: 3px solid var(--sb-forest, #1a3d2e); outline-offset: 2px; }
.sb-unlock__result section { padding: 4px 0 12px; border-top: 1px solid var(--sb-line, #e6dcc8); }
.sb-unlock__result section h3 { margin: 12px 0 6px; font-size: 1.05rem; color: var(--sb-forest, #1a3d2e); }
.sb-unlock__result--js section { border-top: 0; }
.sb-note { font-size: 0.875rem; color: var(--sb-mute, #5b6b62); }

/* Programme tables (Tool A and the stage islands) */
.sb-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 0.95rem; }
.sb-table caption { text-align: left; font-size: 0.875rem; color: var(--sb-mute, #5b6b62); padding-bottom: 6px; }
.sb-table th, .sb-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--sb-line, #e6dcc8); vertical-align: top; }
.sb-table thead th { font-size: 0.8rem; color: var(--sb-ink-2, #40403a); font-weight: 600; }
.sb-table tbody th { font-weight: 600; }
.sb-table a { color: var(--sb-forest, #1a3d2e); text-decoration: underline; text-underline-offset: 2px; }

/* Phones: each row becomes a small card, never a horizontally scrolling table (a clipped amount is a trust killer) */
@media (max-width: 640px) {
  .sb-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sb-table, .sb-table tbody, .sb-table tr, .sb-table th, .sb-table td { display: block; width: 100%; }
  .sb-table tr { padding: 10px 0; border-bottom: 1px solid var(--sb-line, #e6dcc8); }
  .sb-table th, .sb-table td { border: 0; padding: 2px 0; }
  .sb-table td { color: var(--sb-ink-2, #40403a); font-size: 0.9rem; }
}

/* Dateline */
.sb-dateline { font-size: 0.85rem; color: var(--sb-mute, #5b6b62); }

/* ---- page layout ---- */
.sb { background: var(--sb-paper, #fff); color: var(--sb-ink, #1a1a1a); font-family: var(--gcx-sans, 'DM Sans', system-ui, -apple-system, sans-serif); }
.sb-main { max-width: 760px; margin: 0 auto; padding: 88px 16px 32px; line-height: 1.65; font-size: 1.0625rem; }
.sb-main a { color: var(--sb-forest, #1a3d2e); text-underline-offset: 2px; }
.sb-crumbs { font-size: 0.875rem; color: var(--sb-mute, #5b6b62); margin: 0 0 12px; }
.sb-crumbs a { color: inherit; }
.sb-hero h1 { font-family: var(--gcx-serif, 'Fraunces', Georgia, serif); font-weight: 600; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; margin: 0 0 16px; color: var(--sb-ink, #1a1a1a); letter-spacing: -0.01em; }
.sb-answer { border-left: 3px solid var(--sb-forest, #1a3d2e); padding: 4px 0 4px 16px; margin: 0 0 12px; }
.sb-answer p { margin: 0; font-size: 1.125rem; }
.sb-byline { font-size: 0.85rem; color: var(--sb-mute, #5b6b62); margin: 0 0 16px; }
.sb-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 8px; background: var(--sb-forest, #1a3d2e); color: #fff !important; text-decoration: none; font-weight: 600; }
.sb-btn:hover { background: var(--gcx-forest-dk, #0f2a1f); }
.sb-btn:focus-visible { outline: 3px solid var(--gcx-sienna, #a85a3c); outline-offset: 2px; }
.sb-section { margin: 40px 0 0; }
.sb-section h2 { font-family: var(--gcx-serif, 'Fraunces', Georgia, serif); font-weight: 600; font-size: 1.5rem; line-height: 1.25; margin: 0 0 12px; }
.sb-list { padding-left: 1.2em; }
.sb-list li { margin: 0 0 8px; }
.sb-source { font-size: 0.85rem; color: var(--sb-mute, #5b6b62); }

/* comparison table (4 columns; stacks on phones) */
.sb-compare { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.sb-compare caption { text-align: left; font-size: 0.85rem; color: var(--sb-mute, #5b6b62); padding-bottom: 8px; }
.sb-compare th, .sb-compare td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--sb-line, #e6dcc8); }
.sb-compare thead th { font-size: 0.8rem; font-weight: 600; color: var(--sb-ink-2, #40403a); }
.sb-compare tbody td:last-child { font-weight: 600; color: var(--sb-forest, #1a3d2e); }
@media (max-width: 640px) {
  .sb-compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sb-compare, .sb-compare tbody, .sb-compare tr, .sb-compare th, .sb-compare td { display: block; width: 100%; }
  .sb-compare tr { padding: 12px 0; border-bottom: 1px solid var(--sb-line, #e6dcc8); }
  .sb-compare th, .sb-compare td { border: 0; padding: 3px 0; }
  .sb-compare tbody th { font-size: 1.02rem; }
  .sb-compare td[data-label]::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 600; color: var(--sb-mute, #5b6b62); }
}

/* FAQ */
.sb-faq { border-bottom: 1px solid var(--sb-line, #e6dcc8); }
.sb-faq summary { cursor: pointer; list-style: none; padding: 14px 28px 14px 0; position: relative; min-height: 44px; }
.sb-faq summary::-webkit-details-marker { display: none; }
.sb-faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.3rem; color: var(--sb-forest, #1a3d2e); }
.sb-faq[open] summary::after { content: "−"; }
.sb-faq summary h3 { display: inline; font-size: 1.05rem; font-weight: 600; margin: 0; }
.sb-faq summary:focus-visible { outline: 3px solid var(--sb-forest, #1a3d2e); outline-offset: 2px; }
.sb-faq__a p { margin: 0 0 14px; }

/* end matter + footer */
.sb-end { margin: 48px 0 0; padding-top: 16px; border-top: 1px solid var(--sb-line, #e6dcc8); font-size: 0.9rem; color: var(--sb-ink-2, #40403a); }
.sb-disclosure, .sb-related { margin: 8px 0; }
.sb-footer { max-width: 760px; margin: 32px auto 0; padding: 24px 16px 96px; border-top: 1px solid var(--sb-line, #e6dcc8); font-size: 0.875rem; color: var(--sb-mute, #5b6b62); }
.sb-footer__brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--sb-ink, #1a1a1a); margin: 0 0 8px; }
.sb-footer__links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.sb-footer__links a { color: inherit; display: inline-flex; min-height: 44px; align-items: center; }

/* captions must span the table width even when the table becomes block on phones */
@media (max-width: 640px) { .sb-table caption, .sb-compare caption { display: block; width: 100%; } }

/* hub step list + stage islands: numbered timeline (hub + Ontario steps) */
.sb-steps { list-style: none; counter-reset: sbstep; padding-left: 0; margin: 16px 0 0; }
.sb-steps > li { counter-increment: sbstep; position: relative; padding-left: 48px; margin: 0 0 18px; min-height: 32px; }
.sb-steps > li::before { content: counter(sbstep); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--sb-forest, #1a3d2e); color: #fff; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; }
.sb-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 38px; bottom: -14px; width: 2px; background: var(--sb-line, #e6dcc8); }
.sb-steps--big > li { margin-bottom: 26px; }
.sb-steps--big h3 { font-size: 1.1rem; margin: 4px 0 6px; line-height: 1.3; }
.sb-steps--big p { margin: 0 0 8px; }
.sb-provinces { margin-top: 8px; }
.sb-stage { margin: 16px 0 8px; }
.sb-stage h3 { font-size: 1.1rem; margin: 20px 0 6px; color: var(--sb-forest, #1a3d2e); }
.sb-years td, .sb-years th { vertical-align: middle; }
@media (max-width: 640px) {
  .sb-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; font-size: 0.8rem; }
}

/* phones: standalone links (programme names in stacked tables, breadcrumb) get a 44px tap area */
@media (max-width: 640px) {
  .sb-table tbody th a, .sb-crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* hub: the first-year chart (the page's one signature element) */
.sb-chart { margin: 20px 0 24px; padding: 20px; background: var(--sb-tint, #fcf6e9); border: 1px solid var(--sb-line, #e6dcc8); border-radius: 12px; }
.sb-headline { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.sb-headline__num { font-family: var(--gcx-serif, 'Fraunces', Georgia, serif); font-weight: 600; font-size: clamp(2.6rem, 8vw, 3.4rem); line-height: 1; color: var(--sb-forest, #1a3d2e); }
.sb-headline__text { flex: 1 1 260px; font-size: 1rem; color: var(--sb-ink-2, #40403a); }
.sb-bar { display: block; width: 100%; height: 28px; }
.sb-legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9rem; color: var(--sb-ink-2, #40403a); }
.sb-legend li { display: inline-flex; align-items: center; gap: 6px; }
.sb-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sb-chart figcaption { margin-top: 10px; font-size: 0.8rem; color: var(--sb-mute, #5b6b62); }

.sb-data { margin: 0 0 20px; }
.sb-data summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 0.9rem; color: var(--sb-forest, #1a3d2e); text-decoration: underline; text-underline-offset: 2px; }
