@font-face {
  font-family: Montserrat;
  src: url("assets/fonts/montserrat-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #003865;
  --blue: #006ba6;
  --sky: #41b6e6;
  --pale: #e6f3f7;
  --light: #f2f8fb;
  --ink: #15334c;
  --muted: #516477;
  --border: #cfdee8;
  --white: #fff;
  --canvas: #f7fbfd;
  --connector: #537b99;
  --connector-incoming: #08747d;
  --connector-outgoing: var(--navy);
  --action-line: #699abc;
  --decision-line: #337da8;
  --handoff-fill: #e1f1fa;
  --handoff-line: #367ba8;
  --gap-fill: #fff3e3;
  --gap-line: #ad6b27;
  --gap-text: #713b0a;
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f8fbfd;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
a { color: var(--blue); }
button, input, output { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .42; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 5; padding: 12px; background: white; }
.wrap { width: min(100%, 1450px); margin-inline: auto; padding-inline: clamp(16px, 3.1vw, 45px); }
.site-header { flex: none; }

.masthead { background: var(--white); border-bottom: 1px solid var(--border); }
.mast-inner { min-height: 68px; display: grid; grid-template-areas: "brand title actions"; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(12px, 1.9vw, 26px); padding-block: 9px; }
.brand { display: block; grid-area: brand; justify-self: start; }
.brand img { display: block; width: 174px; height: auto; }
.mast-actions { display: flex; grid-area: actions; justify-self: end; gap: 10px; align-items: center; }
.header-button { display: flex; align-items: center; gap: 9px; padding: 9px 14px; min-height: 40px; background: var(--white); border: 1px solid var(--border); border-radius: 6px; color: var(--navy); font-size: .875rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.header-button:hover { background: var(--light); border-color: var(--blue); }
.search-button { background: var(--navy); border-color: var(--navy); color: var(--white); }
.search-button:hover { background: #005486; }
.search-icon { width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; margin-right: 3px; }
.search-icon::after { position: absolute; content: ""; width: 6px; height: 1.5px; background: currentColor; rotate: 45deg; top: 10px; left: 9px; }

.workflow-nav { background: var(--white); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: stretch; justify-content: space-between; gap: 14px; }
#map-nav, .nav-reference { display: flex; align-items: center; gap: 3px; }
.workflow-nav a { display: flex; align-items: center; min-height: 47px; padding: 10px 12px 8px; border-block-end: 3px solid transparent; color: var(--navy); font-size: .84rem; font-weight: 650; line-height: 1.28; text-decoration: none; }
.workflow-nav a:hover { background: var(--light); }
.workflow-nav a[aria-current="page"] { background: var(--light); border-block-end-color: var(--blue); font-weight: 750; }
.workflow-nav a:focus-visible { outline-offset: -4px; }
.nav-reference { flex-shrink: 0; }
.nav-reference a { color: var(--blue); font-size: .8125rem; }
.tab-short { display: none; }

h1 { grid-area: title; margin: 0; color: var(--navy); font-size: clamp(1.25rem, 2.2vw, 1.875rem); line-height: 1.16; letter-spacing: -.032em; font-weight: 750; }
#main { flex: 1; min-height: 0; overflow: hidden; }
.main-inner { height: 100%; padding-block: 17px 14px; }
#main[data-page="reference"] { overflow: auto; overscroll-behavior: contain; }
#main[data-page="reference"] .main-inner { height: auto; min-height: 100%; }
#map-view { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.map-heading { margin-bottom: 13px; }
.map-heading h2, #reference-title { margin: 0 0 6px; font-size: clamp(1.28rem, 2.15vw, 1.95rem); letter-spacing: -.025em; color: var(--navy); }
.map-heading p, .ref-intro { max-width: 92ch; text-wrap: pretty; color: var(--muted); margin: 0; font-size: 1rem; line-height: 1.5; }

.workbench {
  --split-direction: side-by-side;
  --divider-size: clamp(17px, 1.65vw, 25px);
  --default-detail-size: min(325px, 42%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--divider-size) var(--detail-size, var(--default-detail-size));
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}
.pane-divider { position: relative; display: grid; place-items: center; cursor: col-resize; touch-action: none; outline-offset: -2px; border-radius: 5px; }
.pane-divider::before, .pane-divider::after { content: ""; }
.pane-divider::before { position: absolute; width: 1px; height: 100%; background: var(--border); }
.pane-divider::after { position: relative; width: 6px; height: 31px; border: 1px solid var(--action-line); border-radius: 5px; background: var(--handoff-fill); }
.pane-divider[aria-orientation="horizontal"] { cursor: row-resize; }
.pane-divider[aria-orientation="horizontal"]::before { width: 100%; height: 1px; }
.pane-divider[aria-orientation="horizontal"]::after { width: 31px; height: 6px; }
.pane-divider:hover::after, .pane-divider:focus-visible::after, .workbench[data-resizing] .pane-divider::after { border-color: var(--blue); background: var(--blue); }
.workbench[data-resizing] { user-select: none; }
.map-card, .detail, .reference-card { min-width: 0; border: 1px solid var(--border); border-radius: 9px; background: var(--white); }
.map-card { display: flex; flex-direction: column; min-height: 0; overflow: clip; }
.map-bar { display: flex; flex: none; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 8px 12px; min-height: 53px; }
.view-switch, .zoom { display: flex; gap: 4px; align-items: center; padding: 3px; background: var(--light); border: 1px solid var(--border); border-radius: 7px; }
.view-switch button { min-height: 32px; padding: 4px 10px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 680; }
.view-switch button:hover { color: var(--navy); background: var(--white); }
.view-switch button[aria-pressed="true"] { border-color: var(--border); background: var(--white); color: var(--navy); }
.zoom button, .close { border: 1px solid var(--border); border-radius: 5px; background: var(--white); color: var(--navy); font-weight: 650; padding: 3px 9px; min-width: 35px; min-height: 34px; }
.zoom button { min-height: 32px; border-radius: 4px; }
.zoom button:focus-visible { outline-offset: -3px; }
.zoom button:hover:not(:disabled), .close:hover { background: var(--pale); border-color: var(--blue); }
.step-legend-link { display: inline-flex; align-items: center; min-height: 28px; margin-inline-start: auto; color: var(--muted); font-size: .8125rem; text-underline-offset: 3px; white-space: nowrap; }
.step-legend-link:hover { color: var(--blue); }
.zoom output { font-size: .8125rem; color: var(--muted); text-align: center; min-width: 43px; font-variant-numeric: tabular-nums; }
#diagram-view { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.viewport { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; outline-offset: -3px; background: var(--canvas); border-block: 1px solid var(--border); }
#spacer { position: relative; overflow: hidden; min-width: 0; margin-inline: auto; }
#diagram { position: absolute; transform-origin: top left; }
.connections { position: absolute; inset: 0; overflow: visible; }
.connections polyline { fill: none; stroke: var(--connection-color, var(--connector)); stroke-width: 2.5; stroke-linejoin: round; }
[data-direction="incoming"] { --connection-color: var(--connector-incoming); }
[data-direction="outgoing"] { --connection-color: var(--connector-outgoing); }
.connections polyline:is([data-direction="incoming"], [data-direction="outgoing"]) { stroke-width: 4.5; }
.connections polyline[data-direction="incoming"] { stroke-dasharray: .1 7; stroke-dashoffset: -3.5; stroke-linecap: round; }
.connections .arrowhead { fill: var(--connection-color, var(--connector)); }
.branch-label { fill: var(--navy); font-size: 15px; font-weight: 670; }
.branch-label:is([data-direction="incoming"], [data-direction="outgoing"]) { fill: var(--connection-color); font-weight: 750; paint-order: stroke; stroke: var(--canvas); stroke-width: 3px; stroke-linejoin: round; }
.lane-rule { stroke: var(--border); stroke-width: 1.5; }
.lane-title { position: absolute; margin: 0; left: 28px; font-size: 19px; font-weight: 700; color: var(--navy); }
.node {
  --node-stroke: var(--action-line);
  --selection-top: 7px;
  --selection-end: 7px;
  position: absolute;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--node-gap);
  padding: var(--node-padding-y) var(--node-padding-x);
  border: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--node-stroke);
  color: var(--navy);
  background: var(--white);
  font-size: var(--node-label-size);
  font-weight: 700;
  line-height: var(--node-label-leading);
  text-align: center;
}
.node-label span { display: block; white-space: nowrap; }
.node-id { font-size: var(--node-id-size); line-height: var(--node-id-leading); font-weight: 700; color: var(--blue); letter-spacing: .055em; }
.node.handoff, .node.reference { --node-stroke: var(--handoff-line); background: var(--handoff-fill); }
.node.gap { --node-stroke: var(--gap-line); background: var(--gap-fill); color: var(--gap-text); }
.node.gap .node-id { color: var(--gap-text); }
.node:hover { --node-stroke: var(--blue); background: var(--pale); }
.node.gap:hover { --node-stroke: var(--gap-line); background: #ffedd4; }
.node[aria-current="step"], .step-row[aria-current="step"] { background: var(--navy); color: var(--white); }
.node[aria-current="step"] { --node-stroke: var(--navy); }
.node.gap[aria-current="step"] { --node-stroke: var(--gap-text); --selection-badge: var(--gap-line); --selection-ring: var(--gap-fill); background: var(--gap-text); }
.node[aria-current="step"] .node-id { color: var(--pale); }
.node.decision { --selection-top: 15px; --selection-end: 19%; }
.node.decision, .node.decision[aria-current="step"] { background: transparent; box-shadow: none; isolation: isolate; }
.decision-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: -1; fill: var(--pale); stroke: var(--decision-line); stroke-width: 2px; stroke-linejoin: round; }
.node.decision:hover .decision-shape { fill: #d2edfa; }
.node.decision[aria-current="step"] .decision-shape { fill: var(--navy); stroke: var(--navy); }
:is(.node, .step-row)[aria-current="step"]::before, :is(.node, .step-row)[aria-current="step"]::after { content: ""; position: absolute; pointer-events: none; }
:is(.node, .step-row)[aria-current="step"]::before { inset-block-start: var(--selection-top); inset-inline-end: var(--selection-end); width: 20px; height: 20px; border: 1px solid var(--selection-ring, var(--sky)); border-radius: 50%; background: var(--selection-badge, var(--blue)); }
:is(.node, .step-row)[aria-current="step"]::after { inset-block-start: calc(var(--selection-top) + 6px); inset-inline-end: calc(var(--selection-end) + 5px); width: 10px; height: 6px; border: solid var(--white); border-width: 0 0 2px 2px; rotate: -45deg; }

.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 12px 15px; font-size: .8125rem; font-weight: 530; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 12px; height: 10px; border-radius: 2px; border: 1px solid var(--action-line); background: var(--white); }
.key.connection-key { width: 19px; height: 0; border: 0; border-top: 3px solid var(--connection-color); border-radius: 0; background: none; }
.connection-key[data-direction="incoming"] { border-top-style: dotted; }
.key.decision { width: 13px; height: 10px; border: 0; background: var(--decision-line); }
.key.decision, .key.decision::after { clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.key.decision::after { content: ""; display: block; width: 9px; height: 8px; margin: 1px auto; background: var(--pale); }
.key.handoff { background: var(--handoff-fill); border-color: var(--handoff-line); }
.key.gap { background: var(--gap-fill); border-color: var(--gap-line); }
.diagram-hint { margin: 0; padding: 0 15px 11px; font-size: .8125rem; color: var(--muted); }

.step-list { display: grid; flex: 1; min-height: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); align-content: start; gap: 8px; margin: 0; padding: 12px; border-top: 1px solid var(--border); list-style: none; background: var(--canvas); overflow: auto; overscroll-behavior: contain; outline-offset: -3px; }
.step-list-heading { grid-column: 1 / -1; }
.step-list-heading h3 { margin: 4px 0; color: var(--navy); font-size: .875rem; }
.step-row { --selection-top: 10px; --selection-end: 10px; position: relative; display: flex; align-items: flex-start; gap: 11px; width: 100%; min-height: 68px; padding: 11px; padding-inline-end: 38px; text-align: left; border: 1px solid var(--border); border-radius: 6px; background: var(--white); color: var(--navy); }
.step-row:hover { border-color: var(--blue); }
.step-row[aria-current="step"] { border-color: var(--navy); }
.step-row-id { flex: none; padding: 4px 5px; color: var(--blue); background: var(--light); border-radius: 4px; font-size: .75rem; font-weight: 750; }
.step-row[aria-current="step"] .step-row-id { color: var(--navy); background: var(--pale); }
.step-row-copy { display: grid; gap: 4px; min-width: 0; font-size: .9rem; line-height: 1.34; }
.step-row-copy span { color: var(--muted); font-size: .8125rem; }
.step-row[aria-current="step"] .step-row-copy span { color: var(--pale); }

@media (forced-colors: active) {
  .connections, .legend {
    --connector: CanvasText;
    --connector-incoming: Highlight;
    --connector-outgoing: Highlight;
    --canvas: Canvas;
    --navy: CanvasText;
  }
  .node[aria-current="step"], .node.gap[aria-current="step"], .step-row[aria-current="step"] {
    --node-stroke: Highlight;
    --selection-badge: Highlight;
    --selection-ring: HighlightText;
    forced-color-adjust: none;
    background: Highlight;
    border-color: Highlight;
    color: HighlightText;
    outline-color: CanvasText;
  }
  .node.decision[aria-current="step"] { background: transparent; }
  .decision-shape, .node.decision:hover .decision-shape { fill: Canvas; stroke: ButtonText; }
  .node.decision[aria-current="step"] .decision-shape { fill: Highlight; stroke: Highlight; }
  .node[aria-current="step"] .node-id, .step-row[aria-current="step"] .step-row-copy span { color: HighlightText; }
  .step-row[aria-current="step"] .step-row-id { color: Highlight; background: HighlightText; }
  :is(.node, .step-row)[aria-current="step"]::after { border-color: HighlightText; }
}

.detail-pane { display: grid; grid-template-rows: minmax(0, 1fr); min-width: 0; min-height: 0; }
.detail { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; overflow: hidden; border-top: 3px solid var(--blue); }
.detail-content { overflow: auto; overscroll-behavior: contain; outline-offset: -3px; }
.detail-title { margin: 0; padding: 12px 17px; background: var(--light); border-bottom: 1px solid var(--border); color: var(--navy); font-size: 1.15rem; line-height: 1.24; letter-spacing: -.018em; text-wrap: balance; }
.detail-overview { padding: 12px 0; border-bottom: 1px solid var(--border); }
.detail-meta { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; color: var(--muted); font-weight: 680; font-size: .8rem; }
.detail-jump { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; margin-inline-start: auto; padding: 0 2px; border: 0; background: transparent; color: var(--blue); font-size: inherit; font-weight: 680; text-decoration: underline; text-underline-offset: 3px; }
.detail-jump:hover { color: var(--navy); }
.detail-jump span { font-size: 1rem; line-height: 1; }
.step-id { padding: 4px 7px; border-radius: 4px; background: var(--navy); color: var(--white); font-variant-numeric: tabular-nums; }
.detail h4, .reference-card h3, .reference-card h4 { font-size: .94rem; margin: 16px 0 6px; color: var(--navy); }
.detail p, .detail li, .detail blockquote, .reference-card p { font-size: .925rem; line-height: 1.54; }
.detail p { margin: 0; }
.detail-overview p { margin-top: 7px; }
.detail-body { padding: 0 17px 14px; }
.detail ul { padding-left: 18px; margin: 6px 0 0; }
.detail li + li { margin-top: 6px; }
.detail-callout { margin: 14px 0 0; border-left: 3px solid var(--gap-line); background: var(--gap-fill); padding: 9px 11px; color: var(--gap-text); }
.detail-callout h4 { margin-top: 0; color: inherit; }
.detail blockquote { margin: 6px 0; padding: 7px 10px; border-left: 3px solid var(--blue); background: var(--pale); }
.detail-paths { border-top: 1px solid var(--border); margin-top: 16px; }
.detail-paths h4 { margin-top: 12px; }
.detail-overview + .detail-paths { border-top: 0; margin-top: 0; }
.detail-paths .detail-callout { margin-top: 8px; }
.detail-paths .detail-callout h4 { margin-top: 0; }
.detail-end { color: var(--muted); }
.detail .next { list-style: none; padding: 0; }
.next a { position: relative; display: grid; align-content: center; gap: 3px; text-decoration: none; padding: 9px 28px 9px 11px; min-height: 44px; border: 1px solid var(--border); border-radius: 5px; line-height: 1.35; }
.next a::after { content: ""; position: absolute; top: calc(50% - 4px); right: 12px; width: 7px; height: 7px; border: solid var(--blue); border-width: 2px 2px 0 0; rotate: 45deg; }
.next a:hover, .search-result:hover { background: var(--pale); border-color: var(--blue); }
.next-condition { font-size: .8125rem; font-weight: 700; color: var(--navy); }
.next-workflow { font-size: .8125rem; color: var(--muted); }
.detail-footer { display: flex; gap: 8px; padding: 10px 17px; background: var(--light); border-top: 1px solid var(--border); }
.detail-pdf, .detail-return { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 5px 9px; border: 1px solid var(--blue); border-radius: 5px; font-size: .8125rem; font-weight: 680; text-align: center; text-decoration: none; color: var(--navy); background: var(--white); }
.detail-pdf:hover, .detail-return:hover { background: var(--pale); }
.detail-return { display: none; }
#reference-view { max-width: 1020px; }
.reference-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.reference-files a { min-height: 44px; white-space: normal; }
.markdown-toolbar, .pdf-toolbar { flex: none; background: var(--white); border-bottom: 1px solid var(--border); }
:is(.markdown-toolbar, .pdf-toolbar) nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; padding-block: 10px; }
.pdf-viewer { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.pdf-viewer iframe { flex: 1; width: 100%; min-height: 0; border: 0; }
.markdown-main { flex: 1; min-height: 0; overflow: auto; outline-offset: -3px; }
.markdown-main .wrap { max-width: 1120px; padding-block: clamp(14px, 3vw, 32px); }
.markdown-main .ref-intro { margin-top: 5px; }
.markdown-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.markdown-layout:has(.markdown-outline) { grid-template-columns: 205px minmax(0, 1fr); }
.markdown-outline { position: sticky; top: 12px; align-self: start; overflow: auto; max-height: calc(100dvh - 112px); padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); }
.markdown-outline h2 { margin: 0 0 7px; color: var(--navy); font-size: .95rem; }
.markdown-outline ul { margin: 0; padding: 0; list-style: none; }
.markdown-outline a { display: block; min-height: 28px; padding: 5px 0; font-size: .8125rem; font-weight: 650; line-height: 1.35; text-underline-offset: 3px; }
.markdown-source {
  margin: 0;
  padding: clamp(12px, 2.1vw, 24px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font: .875rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.markdown-source code { font: inherit; }
.markdown-source :is(.gh, .gu, .gs) { color: var(--navy); font-weight: 700; }
.markdown-heading { display: block; scroll-margin-block-start: 12px; }
.markdown-heading-1 { font-size: 1.24em; line-height: 1.4; }
.markdown-heading-2 { border-block-start: 1px solid var(--border); margin-block-start: .35em; padding-block: .25em; font-size: 1.16em; line-height: 1.42; }
.markdown-diagram-heading { border-block-start: 3px solid var(--blue); padding: .45em .65em; background: var(--pale); }
.markdown-heading-3 { margin-block-start: .2em; font-size: 1.05em; line-height: 1.5; }
.markdown-heading-4 { font-size: .94em; }
.markdown-heading-4 .gu { color: var(--muted); }
.markdown-source .ge { font-style: italic; }
.markdown-source :is(.k, .nt) { color: var(--blue); font-weight: 650; }
.markdown-source :is(.s, .s2, .sb) { color: #226247; }
.markdown-source :is(.m, .mi, .mf) { color: #704187; }
.markdown-source .p { color: var(--muted); }
.reference-card { padding: 19px 22px; margin-bottom: 13px; }
.reference-card h3 { font-size: 1.08rem; }
.reference-card h3:first-child { margin-top: 0; }
.reference-card p { margin: 3px 0 0; }
.issue-list { display: grid; gap: 0; padding: 0; margin: 6px 0 0; list-style: none; }
.issue-list li { padding: 9px 0; }
.issue-list li + li { border-top: 1px solid var(--border); }
.issue-list a { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; min-height: 24px; font-weight: 700; text-underline-offset: 3px; }
.issue-id { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.workflow-dialog { width: min(560px, calc(100% - 24px)); border: 1px solid var(--border); border-radius: 8px; padding: 19px; color: var(--ink); }
.workflow-dialog::backdrop { background: #00386580; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-header h2 { font-size: 1.2rem; margin: 0; }
.close { font-size: 1.15rem; }
#step-codes-dialog { width: min(410px, calc(100% - 24px)); }
#step-codes-description { margin: 8px 0 14px; color: var(--muted); font-size: .875rem; line-height: 1.48; }
.step-code-list { display: grid; grid-template-columns: 3.25em minmax(0, 1fr); gap: 0 10px; margin: 0; font-size: .9rem; line-height: 1.4; }
.step-code-list > * { margin: 0; padding-block: 7px; border-block-start: 1px solid var(--border); }
.step-code-list dt { font-weight: 750; color: var(--navy); }
#search-input { width: 100%; margin-top: 13px; padding: 9px 11px; border: 1px solid var(--action-line); border-radius: 4px; }
#search-count { color: var(--muted); font-size: .875rem; margin: 12px 0 6px; }
#search-results { max-height: min(51dvh, 365px); overflow-y: auto; }
.search-result { display: grid; gap: 3px; min-height: 44px; text-decoration: none; border: 1px solid var(--border); border-radius: 5px; padding: 9px 10px; margin: 6px 4px; line-height: 1.35; }
.search-result strong { color: var(--navy); font-size: .9rem; }
.search-result span { display: block; font-size: .8125rem; color: var(--muted); }

@media (max-width: 680px) {
  .markdown-layout:has(.markdown-outline) { grid-template-columns: minmax(0, 1fr); }
  .markdown-outline { position: static; max-height: none; }
  .markdown-outline ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
}

@media (max-width: 1090px) {
  .workflow-nav a { padding-inline: 8px; }
  .nav-inner, #map-nav, .nav-reference { gap: 2px; }
}
@media (max-width: 950px) {
  .nav-inner { flex-wrap: wrap; }
  .nav-reference { margin-inline-start: auto; }
  .nav-reference a { min-height: 39px; }
}
@media (max-width: 850px) {
  .workbench {
    --split-direction: stacked;
    --divider-size: 20px;
    --default-detail-size: calc((100% - var(--divider-size)) / 2);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) var(--divider-size) var(--detail-size, var(--default-detail-size));
  }
  .detail-return { display: inline-flex; }
  .mast-inner { grid-template-areas: "brand actions" "title title"; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .brand img { width: 162px; }
}
@media (max-width: 650px) {
  .mast-inner { gap: 8px; padding-block: 8px; }
  .brand img { width: clamp(91px, 31vw, 140px); }
  .mast-actions { gap: 6px; }
  .header-button { min-height: 36px; gap: 6px; padding-inline: 8px; font-size: .75rem; }
  .nav-inner { padding-inline: 16px; }
  #map-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .workflow-nav a { min-height: 38px; padding-block: 6px 4px; }
  .nav-reference { margin-inline-start: 0; }
  .nav-reference a { min-height: 34px; }
  .tab-full { display: none; }
  .tab-short { display: inline; }
  h1 { font-size: clamp(1.2rem, 4.85vw, 1.65rem); }
  .main-inner { padding-block: 11px 8px; }
  .map-heading { margin-bottom: 9px; }
  .map-heading h2 { font-size: 1.15rem; }
  .map-bar { padding: 5px 8px; gap: 5px; min-height: 0; }
  .view-switch, .zoom { padding-block: 2px; }
  .zoom { gap: 2px; }
  .zoom button { min-width: 31px; padding-inline: 6px; }
  .zoom output { min-width: 38px; }
  .view-switch button { padding-inline: 8px; }
  .step-list { grid-template-columns: 1fr; }
  .view-switch button, .zoom button { min-height: 35px; }
  .detail-pdf, .detail-return { min-height: 37px; }
  .detail-title { padding: 8px 12px; font-size: 1rem; }
  .legend { flex-wrap: nowrap; gap: 6px 10px; padding: 7px 9px; font-size: .75rem; overflow-x: auto; }
  .legend span { flex: none; }
}
@media (max-width: 370px) {
  #search-open span:last-child, #zoom-level { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #search-open { min-width: 36px; justify-content: center; }
  .view-switch button { padding-inline: 3px; font-size: .75rem; }
  .step-legend-link { font-size: .75rem; }
  .zoom button { min-width: 28px; padding-inline: 5px; }
  .detail-title { padding: 5px 10px; font-size: .9rem; }
  .detail-footer { padding: 5px 10px; }
  .detail-pdf, .detail-return { padding-block: 2px; }
}
@media (max-height: 600px) {
  .main-inner { padding-block: 7px; }
  .map-heading { margin-bottom: 7px; }
  .diagram-hint { display: none; }
}
@media (max-width: 650px), (max-height: 600px) {
  .map-heading p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-height: 460px) {
  #map-view { grid-template-rows: minmax(0, 1fr); }
  .map-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .detail-title { padding: 5px 10px; font-size: .9rem; }
  .detail-footer { padding: 5px 10px; }
}
@media (max-height: 460px) and (max-width: 559px) {
  h1 { font-size: 1rem; }
}
@media (max-height: 460px) and (min-width: 560px) {
  .workbench {
    --split-direction: side-by-side;
    --divider-size: 19px;
    --default-detail-size: 38%;
    grid-template-columns: minmax(0, 1fr) var(--divider-size) var(--detail-size, var(--default-detail-size));
    grid-template-rows: minmax(0, 1fr);
  }
  .mast-inner, .workflow-nav a { min-height: 36px; }
  .mast-inner { padding-block: 4px; }
  .brand img { width: 132px; }
  .map-bar { padding-block: 4px; }
  .legend { padding-block: 5px; }
}
