:root {
      --goc-blue: #26374a;
      --goc-link: #284162;
      --goc-link-hover: #0535d2;
      --goc-red: #eb0000;
      --goc-bg: #fff;
      --goc-border: #e1e4e7;
      --goc-muted: #5c5c5c;
      --annot: #c41e3a;
      --page-w: 720px;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
      font-size: 16px;
      line-height: 1.5;
      color: #333;
      min-height: 100vh;
      background:
        linear-gradient(180deg, rgba(250, 248, 243, .24), #faf8f3 520px) no-repeat,
        #faf8f3 url("/images/heroes/docs-library-hero.webp") right top / max(100%, 960px) auto no-repeat;
    }
    .stage {
      max-width: var(--page-w);
      margin: 24px auto 48px;
      background: var(--goc-bg);
      box-shadow: 0 1px 4px rgba(0,0,0,.18);
      position: relative;
    }
    /* —— Canada.ca chrome —— */
    .brand-bar {
      background: #000;
      color: #fff;
      padding: 10px 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .brand-bar .wordmark {
      display: flex;
      align-items: center;
      gap: 8px;
      font-weight: 700;
      letter-spacing: .02em;
    }
    .brand-bar .flag {
      width: 34px;
      height: 18px;
      background: #a50000;
      border: 1px solid #ccc;
      color: #fff;
      font-size: 9px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      letter-spacing: 0;
      padding: 0 4px;
    }
    .brand-bar a { color: #fff; text-decoration: underline; font-size: 14px; }
    .app-bar {
      background: var(--goc-blue);
      color: #fff;
      padding: 12px 16px;
      font-size: 18px;
      font-weight: 600;
    }
    .breadcrumb {
      padding: 12px 16px 0;
      font-size: 14px;
      color: var(--goc-muted);
    }
    .breadcrumb a { color: var(--goc-link); }
    main { padding: 8px 16px 28px; }
    h1 {
      font-size: 1.9rem;
      font-weight: 700;
      border-bottom: 1px solid var(--goc-border);
      padding-bottom: 8px;
      margin: 12px 0 16px;
      color: #333;
    }
    .lead { margin: 0 0 20px; max-width: 58ch; }
    h2 {
      font-size: 1.25rem;
      margin: 28px 0 12px;
      color: #333;
    }
    .most-requested {
      border: 1px solid var(--goc-border);
      background: #f5f5f5;
      padding: 16px 18px;
      margin: 0 0 8px;
    }
    .annot-target {
      padding: 4px 6px;
    }
    .most-requested ul {
      margin: 0;
      padding-left: 1.2em;
    }
    .most-requested li { margin: 6px 0; }
    .most-requested a {
      color: var(--goc-link);
      font-weight: 600;
      text-decoration: underline;
    }
    .cards {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 8px;
    }
    .card {
      border: 1px solid var(--goc-border);
      padding: 14px;
      background: #fff;
    }
    .card h3 { margin: 0 0 8px; font-size: 1.05rem; }
    .card p { margin: 0; font-size: 14px; color: #555; }
    .card a { color: var(--goc-link); font-weight: 600; }
    footer.goc {
      border-top: 4px solid var(--goc-blue);
      background: #eee;
      padding: 12px 16px;
      font-size: 12px;
      color: #555;
    }

    /* —— 手把手红笔标注（叠在复原页上） —— */
    .annot-target {
      position: relative;
      display: inline-block;
      outline: 2.5px solid var(--annot);
      outline-offset: 3px;
      background: rgba(196, 30, 58, 0.06);
      padding: 4px 6px;
    }
    .annot-note {
      position: absolute;
      left: calc(100% + 14px);
      top: -6px;
      width: 118px;
      color: var(--annot);
      font-family: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
      font-size: 17px;
      font-weight: 700;
      line-height: 1.25;
      white-space: nowrap;
      pointer-events: none;
      text-shadow: 0 0 1px #fff, 0 0 2px #fff;
    }
    .annot-note::before {
      content: "";
      position: absolute;
      left: -12px;
      top: 10px;
      width: 10px;
      height: 2px;
      background: var(--annot);
    }
    .stage-wrap {
      max-width: calc(var(--page-w) + 140px);
      margin: 0 auto;
      padding: 0 12px;
    }
    .caption {
      max-width: var(--page-w);
      margin: 0 auto 8px;
      padding: 12px 4px 0;
      font-size: 14px;
      color: #222;
    }
    .caption strong { color: var(--annot); }
    @media (max-width: 860px) {
      .annot-note {
        position: static;
        display: block;
        margin-top: 6px;
        white-space: normal;
      }
      .annot-note::before { display: none; }
      .cards { grid-template-columns: 1fr; }
    }
.stage { margin-top: 12px; overflow-wrap: anywhere; }
a { color: var(--goc-link); }
a:hover { color: var(--goc-link-hover); }
:focus-visible { outline: 3px solid #0535d2; outline-offset: 3px; }
.portal-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px 4px; font-size: 14px; }
.steps { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; padding: 0; margin: 10px 16px 4px; }
.steps a { display: block; background: #e7eaf2; color: #26374a; padding: 7px 9px; font-size: 12px; text-decoration: none; }
.steps a[aria-current] { background: var(--goc-blue); color: #fff; font-weight: 700; }
.steps a:hover { text-decoration: underline; }
.screen + .screen { border-top: 1px solid var(--goc-border); margin-top: 26px; padding-top: 4px; }
h3 { margin: 20px 0 8px; font-size: 1.05rem; }
.field { margin: 14px 0; }
.field label, .label, legend { font-weight: 700; }
fieldset.field { padding: 0; border: 0; min-inline-size: 0; }
fieldset .option { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 400; margin: 4px 16px 0 0; }
fieldset.stacked .option { display: flex; }
.required { color: #9b1717; font-size: .8em; white-space: nowrap; }
.control { display: block; width: min(100%, 380px); margin-top: 5px; border: 1px solid #6f7983; background: #fff; border-radius: 3px; padding: 7px 9px; color: #222; font: inherit; }
textarea.control { width: 100%; }
input[type="date"], input[type="month"] { min-width: 0; }
.help { display: block; margin: 4px 0; color: #52575d; font-size: .875rem; }
.check { display: block; margin: 12px 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 4px; }
.button { display: inline-block; background: #26374a; color: #fff; border: 1px solid #26374a; border-radius: 2px; font: inherit; font-size: .92rem; padding: 7px 12px; text-decoration: none; }
.button:hover { background: #172534; color: #fff; }
.button.secondary { background: #eaebed; color: #25374c; border-color: #d3d6db; }
.button:disabled { opacity: .65; }
.callout { padding: 10px 13px; border-left: 4px solid #287194; background: #e7f5fb; margin: 13px 0; }
.callout.warning { border-color: #a77310; background: #fbf3d6; }
.mark { display: grid; grid-template-columns: minmax(0, 1fr) minmax(112px, 160px); align-items: start; gap: 16px; margin: 15px 3px; }
.mark .annot-target { display: block; min-width: 0; }
.mark .annot-target .field { margin: 4px 0; }
.mark .annot-note { position: relative; left: auto; top: auto; width: auto; white-space: normal; padding-top: 4px; display: block; margin: 0; }
.mark .annot-note::before { display: block; top: 13px; }
details { margin: 12px 0; }
summary { cursor: pointer; }
.editor { padding: 0 12px 12px; border: 1px solid #8e9aac; margin: 12px 0; }
.editor > summary { background: var(--goc-blue); color: #fff; padding: 7px 12px; margin: 0 -12px 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 10px; }
th, td { text-align: left; padding: 8px; border: 1px solid #dfe3e8; vertical-align: top; }
thead th { background: #354963; color: #fff; }
tfoot th, tfoot td { font-weight: 700; background: #eef0f3; }
.empty { color: #5c5c5c; text-align: center; }
.guide-nav { padding: 0 16px 18px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) {
  .stage-wrap { padding: 0 8px; }
  .mark, .two { grid-template-columns: minmax(0, 1fr); }
  .mark { gap: 8px; }
  .mark .annot-note::before { display: none; }
  .caption { overflow-wrap: anywhere; }
}

/* The note follows its control in reading order, and sits beside it where space allows. */
.field-guidance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(185px, 37%);
  align-items: start;
  gap: 12px;
  margin: 12px 0;
}
.field-guidance > .annot-target {
  display: block;
  min-width: 0;
  padding: 0;
  outline: none;
  background: none;
}
.field-guidance .field,
.field-guidance .check { margin: 0; }
.field-guidance > .annot-note,
.document-note {
  position: static;
  display: block;
  width: auto;
  color: #a61934;
  border-inline-start: 2px solid var(--annot);
  padding-inline-start: 8px;
  font: 600 .875rem/1.55 "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  white-space: normal;
  text-shadow: none;
  pointer-events: auto;
}
.field-guidance > .annot-note::before { display: none; }
.field-guidance-key > .annot-target {
  padding: 6px;
  outline: 2px solid var(--annot);
  outline-offset: 1px;
  background: #fff2f4;
}
.document-note { margin-top: 4px; }
.two > .field-guidance {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
@media (max-width: 570px) {
  .field-guidance {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}
