/*
   Stage page styles: extracted verbatim from the inline <style> block in
   guide.html (Phase 0 of the stage-page restructure). Shared by the Guide
   Hub (/guide) and every stage page under /guide/.
 */
  :root {
    --font-display: Georgia, 'Iowan Old Style', 'Times New Roman', Times, serif;
    --font-ui: 'Public Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Public Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-inverse: #ffffff;          /* text on gold buttons */
    --navy-mid: #233038;
    --blue: #3d5260;
    --bg: #f4efe6;
    --accent: #3e7188;
    --accent-light: #2f5a6e;
    --teal: #4f8573;
    --teal-light: #3f6b5c;
    --red: #b04a38;
    --text-primary: #1e1c17;         /* main text color */
    --text-secondary: #6a6560;
    --card-bg: #fdfaf3;
    --border: rgba(62,113,136,0.25);
    --border-subtle: rgba(62,113,136,0.12);
    /* Role colours (owner-specified, WCAG 2.2 checked): white text on each
       is 6.29-7.64:1; each is >= 5.07:1 on cream down to #EFE6D2. Beneficiary
       is green, kept distinct from the alert red (--red). Too dark
       for a dark background: define alternatives if dark mode is added. */
    --role-petitioner: #1A5FB4;
    --role-beneficiary: #1E6B34;
    --role-either: #6A3D9A;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  /* Section back-to-top */
  .section-top-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 0;
    margin-top: 8px;
    transition: color 0.15s;
    border: none;
    background: none;
    cursor: pointer;
  }
  .section-top-link:hover { color: var(--accent); }

  /* Accommodation cards */
  .accom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
    gap: 10px;
    margin-top: 10px;
  }
  .accom-card {
    background: #fdfaf3;
    border: 1px solid rgba(30,28,23,0.1);
    border-radius: 8px;
    padding: 12px 14px;
  }
  .accom-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 3px; }
  .accom-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

  /* Prep checklist items: two column label/detail layout */
  .prep-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(90,143,166,0.06);
  }
  .prep-item:last-child { border-bottom: none; }
  .prep-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
  .prep-detail { font-size: 13px; color: rgba(30,28,23,0.85); line-height: 1.6; }
  .prep-link { font-size: 12px; color: var(--teal-light); margin-top: 3px; display: inline-block; }
  .skip-link { position:absolute;top:-40px;left:16px;background:var(--accent);color:var(--text-inverse);font-weight:700;font-size:14px;padding:8px 16px;border-radius:0 0 8px 8px;z-index:9999;transition:top 0.15s;text-decoration:none; }
  .skip-link:focus { top: 0; }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
  a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .sub-acc-trigger:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .stage-pill:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .sidebar-nav a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .mobile-nav-toggle:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 4px; }
  .mobile-nav-drawer-close:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 2px; }

  body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Public Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.75;
  }


  /* Nav styles live in /css/nav.css (shared component) */

  /* Layout */
  .wrap {
    position: relative;
    z-index: 1;
    margin: 0;
    margin-left: 350px;
    padding: 0 20px 80px;
  }

  /* Mobile Navigation */
  .mobile-nav-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: var(--text-inverse);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(62,113,136,0.25);
    transition: all 0.15s;
  }

  .mobile-nav-toggle:active { transform: scale(0.95); }

  .mobile-nav-toggle.hidden {
    transform: translateY(120px);
    opacity: 0;
    pointer-events: none;
  }

  .mobile-nav-drawer {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }

  .mobile-nav-drawer.open {
    display: block;
  }

  .mobile-nav-drawer-content {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg);
    padding: 20px;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
  }

  .mobile-nav-drawer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
  }

  .mobile-nav-drawer .sidebar-label {
    margin-top: 40px;
  }

  /* Sticky Alert Banner */
  @media (max-width: 700px) {
    .wrap { grid-template-columns: 1fr; margin-left: 0; }
    .sidebar { display: none; }
    .mobile-nav-toggle { display: flex; align-items: center; justify-content: center; }
    .stage-jump { margin-bottom: 32px; }
    .page-hero, .page-header { display: none; }
  }

  /* Sidebar */
  .sidebar {
    position: fixed;
    left: 20px;
    top: 100px;
    width: 280px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-top: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 20px;
    z-index: 10;
  }

  .sidebar-label {
    font-family:var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    padding: 0 8px;
  }

  .sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .sidebar-nav a {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    line-height: 1.4;
    font-weight: 500;
  }

  .sidebar-nav a:hover {
    color: var(--text-primary);
    background: rgba(90,143,166,0.08);
    border-left-color: var(--accent);
  }

  .sidebar-nav a.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(90,143,166,0.12);
    font-weight: 600;
  }

  .sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
  }

  /* Main content */
  .main {
    padding-top: 40px;
    min-width: 0;
    max-width: 1064px;
  }

  /* Header */
  .page-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
  }

  .flag-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
  }

  .flag-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
  }

  h1 {
    font-family:var(--font-display);
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
  }

  h1 span { color: var(--accent); }

  .page-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 520px;
    margin-bottom: 20px;
  }

  .disclaimer {
    background: rgba(90,143,166,0.08);
    border: 1px solid rgba(90,143,166,0.2);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 12px;
    color: rgba(30,28,23,0.6);
    line-height: 1.5;
  }

  /* Stage jump */
  .stage-jump {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 48px;
  }

  .stage-jump-label {
    font-family:var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 14px;
  }

  .stage-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .stage-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(30,28,23,0.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 14px;
    text-decoration: none;
    transition: all 0.15s;
  }

  .stage-pill:hover {
    color: var(--text-primary);
    background: rgba(90,143,166,0.1);
    border-color: rgba(90,143,166,0.3);
  }

  /* Sections */
  .section {
    margin-bottom: 56px;
    scroll-margin-top: 72px;
  }

  .section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }


  .section-title {
    font-family:var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .section-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
  }

  /* Content blocks */
  h3 {
    font-family:var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 24px 0 10px;
  }

  h3:first-child { margin-top: 0; }

  p {
    color: rgba(30,28,23,0.85);
    margin-bottom: 12px;
  }

  p:last-child { margin-bottom: 0; }

  ul, ol {
    padding-left: 20px;
    color: rgba(30,28,23,0.85);
    margin-bottom: 12px;
  }

  li { margin-bottom: 4px; }

  a {
    color: var(--teal-light);
    text-decoration: none;
    transition: all 0.15s;
  }

  a:hover { text-decoration: underline; }

  /* External links */
  a[target="_blank"] {
    opacity: 0.9;
  }

  a[target="_blank"]::after {
    content: ' ↗';
    font-size: 0.85em;
    vertical-align: super;
  }

  a[target="_blank"]:hover {
    opacity: 1;
  }

  strong { color: var(--text-primary); font-weight: 500; }

  /* Info cards */
  .info-card {
    background: rgba(90,143,166,0.08);
    border: 1px solid rgba(90,143,166,0.25);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 16px 0;
    transition: all 0.15s;
  }

  .info-card:hover { border-color: rgba(90,143,166,0.4); }

  .info-card.warning {
    background: rgba(176,74,56,0.08);
    border-color: rgba(176,74,56,0.25);
  }

  .info-card.warning:hover { border-color: rgba(176,74,56,0.4); }

  .info-card.tip {
    background: rgba(79,133,115,0.08);
    border-color: rgba(79,133,115,0.25);
  }

  .info-card.tip:hover { border-color: rgba(79,133,115,0.4); }

  .info-card-head {
    font-family:var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .info-card.warning .info-card-head { color: var(--red); }
  .info-card.tip .info-card-head { color: var(--teal-light); }

  /* Interview cancellation notice (Aug 2026) */
  .alert-banner {
    background: rgba(176,74,56,0.09);
    border: 1px solid rgba(176,74,56,0.32);
    border-left: 4px solid var(--red);
    border-radius: 10px;
    padding: 20px 22px;
    margin: 0 0 28px;
  }

  .alert-banner__head {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
  }

  .alert-banner__title {
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--text-primary);
  }

  .alert-banner p { font-size: 13px; margin-bottom: 10px; }
  .alert-banner p:last-child { margin-bottom: 0; }

  .alert-banner__figure {
    margin: 16px 0 12px;
  }

  .alert-banner__figure img {
    max-width: min(100%, 520px);
    display: block;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
  }

  .alert-banner__figure figcaption {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
  }

  .alert-banner__meta {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
  }

  /* Compact per-stage repeat of the notice */
  .stage-alert {
    background: rgba(176,74,56,0.07);
    border: 1px solid rgba(176,74,56,0.25);
    border-left: 3px solid var(--red);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
  }

  .stage-alert__head {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
  }

  .stage-alert p {
    font-size: 12.5px;
    margin: 0 0 6px;
    color: rgba(30,28,23,0.85);
  }

  .stage-alert p:last-child { margin-bottom: 0; }

  /* Steps */
  .steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 16px 0;
  }

  .step {
    display: flex;
    gap: 16px;
    position: relative;
  }

  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: 0;
    width: 1px;
    background: rgba(62,113,136,0.45);
  }

  .step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(90,143,166,0.1);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family:var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.15s;
  }

  .step-num:hover { background: rgba(90,143,166,0.15); }

  .step-body {
    padding: 6px 0 20px;
    flex: 1;
    min-width: 0;
  }

  .step-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 14px;
  }

  .step-desc {
    font-size: 13px;
    color: rgba(30,28,23,0.85);
    line-height: 1.6;
  }

  /* Fee table */
  .fee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 16px 0;
  }

  .fee-table th {
    font-family:var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 12px 12px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    border-left: 3px solid var(--accent);
    background: rgba(30,28,23,0.08);
  }

  .fee-table tbody tr:nth-child(odd) td {
    background: rgba(30,28,23,0.04);
  }

  .fee-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(90,143,166,0.06);
    color: rgba(30,28,23,0.85);
    transition: background 0.15s;
  }

  .fee-table tr:last-child td { border-bottom: none; }
  .fee-table tr:hover td { background: rgba(30,28,23,0.06); }

  .fee-table td:last-child {
    font-weight: 500;
    color: var(--accent-light);
    text-align: right;
  }

  /* Table responsiveness */
  @media (max-width: 600px) {
    .fee-table {
      font-size: 12px;
    }

    .fee-table th, .fee-table td {
      padding: 8px 10px;
    }

    table {
      display: block;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      white-space: nowrap;
    }

    table thead {
      display: table;
      width: 100%;
    }

    table tbody {
      display: block;
      max-height: 500px;
      overflow-y: auto;
    }

    table tr {
      display: table;
      width: 100%;
    }
  }

  /* Checklist */
  .checklist {
    list-style: none;
    padding: 12px 14px;
    margin: 12px 0;
    background: rgba(30,28,23,0.02);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
  }

  .checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(90,143,166,0.06);
    font-size: 13px;
    color: rgba(30,28,23,0.85);
  }

  .checklist li:last-child { border-bottom: none; }

  .checklist li::before {
    content: '☑';
    color: var(--accent);
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
    font-weight: bold;
  }

  /* Two col */
  .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
  }

  @media (max-width: 600px) {
    .two-col { grid-template-columns: 1fr; }
  }

  /* Timeline pill */
  .timeline-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(79,133,115,0.1);
    border: 1px solid rgba(79,133,115,0.2);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--teal-light);
    margin: 2px 0;
  }

  /* Footer */

  .footer-note {
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.6;
  }

  .coffee-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--text-inverse);
    font-family:var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
  }

  .coffee-btn:hover { background: var(--accent-light); transform: translateY(-1px); }

  /* Sub-accordion (Option B) */
  .sub-acc-group { margin-bottom: 8px; }
  .sub-controls { display: flex; gap: 8px; margin: 0 0 12px; }
  .sub-ctrl { font-size: 11px; font-weight: 600; color: var(--text-secondary); background: rgba(30,28,23,0.04); border: 1px solid var(--border-subtle); border-radius: 5px; padding: 4px 12px; cursor: pointer; transition: all 0.15s; font-family:var(--font-ui); }
  .sub-ctrl:hover { color: var(--text-primary); border-color: var(--accent); }
  .sub-acc-item { border: 1px solid var(--border-subtle); border-left: 3px solid transparent; border-radius: 8px; margin-bottom: 5px; overflow: hidden; transition: all 0.2s; background: rgba(30,28,23,0.02); }
  .sub-acc-item:hover { background: rgba(30,28,23,0.04); }
  .sub-acc-item.open { border-color: rgba(90,143,166,0.2); border-left-color: var(--accent); background: #ffffff; }
  .sub-acc-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: transparent; border: none; cursor: pointer; text-align: left; transition: all 0.15s; }
  .sub-acc-trigger:hover { color: var(--accent); }
  .sub-acc-item.open .sub-acc-trigger { border-bottom: 1px solid var(--border-subtle); }
  .sub-acc-label { font-family:var(--font-ui); font-size: 14px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
  .sub-acc-item:not(.open) .sub-acc-label::before { content: '+'; font-weight: 800; opacity: 0.5; }
  .sub-acc-chevron { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: rgba(90,143,166,0.08); border-radius: 3px; color: var(--text-secondary); font-size: 11px; transition: all 0.25s; flex-shrink: 0; }
  .sub-acc-item.open .sub-acc-chevron { transform: rotate(180deg); color: var(--accent); background: rgba(90,143,166,0.15); }
  .sub-acc-body { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1); }
  .sub-acc-item.open .sub-acc-body { max-height: 9999px; }
  .sub-acc-content { padding: 16px 18px; background: rgba(30,28,23,0.025); }

  /* Inline code: stage pages do not load design-system.css, so style it here.
     Long values (URLs, receipt numbers) must wrap rather than overflow on mobile. */
  .stage-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: rgba(62,113,136,0.09);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 1px 5px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Shared page hero */
  .page-hero { padding: 64px 0 48px; border-bottom: 1px solid var(--border); margin-bottom: 56px; }
  .page-hero-eyebrow { font-family:var(--font-ui); font-size: 12px; font-weight: 700;color: var(--accent); margin-bottom: 12px; }
  .page-hero-h1 { font-family:var(--font-display); font-size: clamp(32px,7vw,52px); font-weight:700; line-height: 1.05; margin-bottom: 14px; }
  .page-hero-h1 span { color: var(--accent); font-style: italic; font-weight: 500; }
  .page-hero-sub { font-size: 15px; color: rgba(30,28,23,0.78); max-width: 560px; line-height: 1.7; }

  /* Shared footer */
  .site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 28px 0 20px; }
  .footer-inner { display: flex; flex-direction: column; gap: 10px; }
  .footer-note { font-size: 12px; color: var(--text-secondary); line-height: 1.6; max-width: 620px; }
  .footer-links { font-size: 12px; color: var(--text-secondary); }
  .footer-links a { color: var(--teal-light); text-decoration: none; }
  .footer-links a:hover { text-decoration: underline; }
  .coffee-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--text-inverse); font-family:var(--font-ui); font-size: 13px; font-weight: 700; padding: 10px 20px; border-radius: 999px; text-decoration: none; transition: opacity 0.15s; align-self: flex-start; }
  .coffee-btn:hover { opacity: 0.9; }


  /* ─── Stage pages (/guide/<stage>) ───────────────────────────────────
     Layout classes for the stage page template. Existing tokens only. */

  /* Content headings were promoted one level (h3 → h2, h4 → h3) so each
     page has a contiguous outline. Keep their previous appearance. */
  .stage-content h2 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 24px 0 10px;
  }
  .stage-content h2:first-child { margin-top: 0; }
  .stage-content h3 {
    font-family: var(--font-body);
    font-size: 1em;
    font-weight: 700;
    color: inherit;
    margin: 0;
  }

  .breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-secondary);
  }
  .breadcrumb li { margin: 0; }
  .breadcrumb li + li::before { content: '›'; margin-right: 6px; }
  .breadcrumb a { color: var(--accent); text-decoration: none; font-weight: 600; }
  .breadcrumb a:hover { text-decoration: underline; }

  .stage-h1 { margin-bottom: 10px; }

  .stage-meta {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
  }
  .stage-meta > span { display: inline-block; }
  .stage-meta > span + span::before { content: '·'; margin: 0 8px; color: var(--text-secondary); }

  .stage-bottomline {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
  }
  .stage-bottomline__label,
  .stage-actions h2,
  .stage-docs h2,
  .stage-verify h2 {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 8px;
  }
  .stage-bottomline p { font-size: 14px; margin: 0; }

  .stage-actions {
    margin-bottom: 20px;
  }
  .stage-actions ol { margin: 0; padding-left: 22px; }
  .stage-actions li { font-size: 16px; margin-bottom: 8px; }

  /* Role tag. Colour is never the only signal: the role name is always
     shown. 16px bold per the owner's accessibility rules. */
  .role {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    border-radius: 4px;
    padding: 0 8px;
    margin-right: 6px;
  }

  .role--petitioner  { background: var(--role-petitioner); }
  .role--beneficiary { background: var(--role-beneficiary); }
  .role--either      { background: var(--role-either); }

  .stage-docs {
    background: rgba(90,143,166,0.08);
    border: 1px solid rgba(90,143,166,0.25);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 36px;
  }
  .stage-docs ul { margin: 0; padding-left: 18px; }
  .stage-docs li { font-size: 14px; margin-bottom: 6px; }
  .stage-docs li:last-child { margin-bottom: 0; }
  .stage-docs a { font-weight: 600; }

  .stage-verify { margin: 8px 0 32px; }
  .stage-verify .checklist { margin-top: 0; }
  /* Body size, so the 16px role tags sit level with the text */
  .stage-verify .checklist li,
  .stage-verify .checklist li::before { font-size: 16px; }

  .stage-prevnext {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 40px;
  }
  .stage-prevnext a {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
  }
  .stage-prevnext a:hover { border-color: var(--accent); }
  .stage-prevnext a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .stage-prevnext small {
    display: block;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
  }
  .stage-prevnext .next { text-align: right; grid-column: 2; }
  @media (max-width: 600px) {
    .stage-prevnext { grid-template-columns: 1fr; }
    .stage-prevnext .next { grid-column: 1; }
  }

  /* Current stage in the sidebar: same look as the scroll-tracked .active */
  .sidebar-nav a[aria-current="page"] {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(90,143,166,0.12);
    font-weight: 600;
  }

  /* Same rule as design-system.css, which stage pages do not load */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* Interview question bank, rendered from /js/interview-questions.js */
  .qb-theme { margin: 18px 0 8px; }
  .stage-content .qb-theme h3 {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
  }
  .qb-count { color: var(--text-secondary); font-weight: 500; }
  .qb-list { font-size: 13px; margin: 0 0 8px; }
  .qb-list li { margin-bottom: 6px; }
  .qb-q { display: block; }
  .qb-tip { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

  /* ─── Guide Hub (/guide) ─────────────────────────────────────────── */
  .hub-reviewed { margin: 12px 0 0; }

  .hub-toc .section-title { margin-bottom: 8px; }
  .hub-toc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 12px 0 0;
  }
  .hub-toc-table thead th {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    background: rgba(30,28,23,0.06);
  }
  .hub-toc-table tbody th,
  .hub-toc-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-subtle);
    color: rgba(30,28,23,0.85);
  }
  .hub-toc-table tbody th { font-weight: 700; white-space: nowrap; }
  .hub-toc-table tbody th a { color: var(--accent); text-decoration: none; }
  .hub-toc-table tbody th a:hover { text-decoration: underline; }
  .hub-toc-table tbody tr:nth-child(odd) > * { background: rgba(30,28,23,0.025); }

  /* Phones: each stage becomes a card, labels from data-label */
  @media (max-width: 700px) {
    .hub-toc-table thead { position: absolute; left: -9999px; }
    .hub-toc-table, .hub-toc-table tbody, .hub-toc-table tr,
    .hub-toc-table tbody th, .hub-toc-table td { display: block; width: 100%; }
    .hub-toc-table tr {
      border: 1px solid var(--border);
      border-radius: 10px;
      margin-bottom: 10px;
      background: var(--card-bg);
      overflow: hidden;
    }
    /* Undo the generic ≤600px table rule (nowrap, scroll box, 500px tbody) */
    .hub-toc-table { white-space: normal; overflow: visible; }
    .hub-toc-table tbody { max-height: none; overflow: visible; }
    .hub-toc-table tbody tr:nth-child(odd) > * { background: transparent; }
    .hub-toc-table tbody th { white-space: normal; font-size: 15px; border-bottom: 1px solid var(--border-subtle); }
    .hub-toc-table td { border-bottom: none; padding: 4px 12px; }
    .hub-toc-table td:last-child { padding-bottom: 12px; }
    .hub-toc-table td::before {
      content: attr(data-label) ': ';
      font-family: var(--font-ui);
      font-size: 11px;
      font-weight: 700;
      color: var(--text-secondary);
    }
  }

  .hub-list { font-size: 14px; }
  .hub-list li { margin-bottom: 8px; }
  .hub-list a { font-weight: 600; }

  .hub-docs { font-size: 14px; margin: 0; }
  .hub-docs dt {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    margin-top: 14px;
  }
  .hub-docs dt:first-child { margin-top: 0; }
  .hub-docs dt a { color: var(--text-primary); }
  .hub-docs dd { margin: 4px 0 0; color: rgba(30,28,23,0.85); }
