/* Visual instructions keep the source document and the next action together. */
.task-visual-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 13px; margin: 10px 14px 7px 0; min-height: 46px; border: 1px solid #174c9a; border-radius: 5px; background: #174c9a; color: #fff; font-size: 16px; font-weight: 600; line-height: 1.6; }
.task-visual-link:hover { background: #103c7d; border-color: #103c7d; }
.task-visual-link svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; }
.doc-field-explanation { scroll-margin-top: 22px; }
.doc-page { padding: 28px 0 64px; color: #17202d; font-size: 17px; line-height: 1.8; }
.doc-page .container { width: min(1240px, calc(100% - 64px)); }
.doc-page p, .doc-page dd, .doc-page li { overflow-wrap: anywhere; }
.doc-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 30px; font-size: 16px; }
.doc-breadcrumb a { display: inline-flex; align-items: center; gap: 8px; color: #174c9a; text-decoration: underline; text-underline-offset: 4px; }
.doc-breadcrumb svg { width: 18px; height: 18px; }
.doc-breadcrumb > span { color: #64748b; }
.doc-heading { max-width: 1040px; margin-bottom: 30px; }
.doc-scope { color: #475569; font-size: 16px; line-height: 1.7; margin-bottom: 14px; }
.doc-title-line { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.doc-kind { display: inline-block; background: #edf4ff; color: #234a7f; border: 1px solid #c4d5ee; border-radius: 3px; padding: 2px 9px; font-size: 14px; font-weight: 600; line-height: 1.65; }
.doc-kind.conditional { background: #fff8e8; color: #6b4d17; border-color: #dac695; }
.doc-kind.reference { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.doc-position { color: #64748b; font-size: 15px; }
.doc-heading h1 { font-size: clamp(30px, 3.1vw, 41px); line-height: 1.45; letter-spacing: -.025em; }
.doc-intro { margin-top: 13px; font-size: 18px; line-height: 1.85; color: #334155; max-width: 920px; }
.doc-preparation-facts { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px 28px; padding: 20px 23px; margin: 24px 0 0; background: #f6f8fb; border-left: 3px solid #174c9a; }
.doc-preparation-facts div { min-width: 0; }
.doc-preparation-facts dt { color: #475569; font-size: 15px; margin-bottom: 3px; }
.doc-preparation-facts dd { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.7; }
.doc-viewer { border: 1px solid #bdcbdc; border-radius: 7px; overflow: hidden; background: #fff; }
.doc-viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 25px 18px; }
.doc-viewer-top h2 { font-size: 24px; line-height: 1.5; margin: 0 0 4px; }
.doc-viewer-top p { color: #475569; font-size: 16px; line-height: 1.7; }
.doc-zoom-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: #fff; color: #174c9a; border: 1px solid #9db0c9; border-radius: 5px; padding: 10px 13px; min-height: 44px; font-size: 16px; white-space: nowrap; }
.doc-zoom-button:hover { background: #edf4ff; }
.doc-zoom-button svg { width: 20px; height: 20px; }
.doc-page-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 25px 19px; }
.doc-page-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 7px 12px; background: #fff; color: #334155; border: 1px solid #aabbd0; border-radius: 4px; font-size: 16px; text-align: left; }
.doc-page-tabs button > span { display: grid; place-items: center; width: 23px; height: 23px; background: #eef2f7; border-radius: 3px; font-size: 14px; flex-shrink: 0; }
.doc-page-tabs button.is-active { color: #fff; background: #174c9a; border-color: #174c9a; }
.doc-page-tabs button.is-active > span { background: #fff; color: #174c9a; }
.doc-single-page-label { font-size: 16px; color: #475569; padding: 0 25px 16px; }
.doc-viewer-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, 1fr); border-top: 1px solid #cbd5e1; align-items: start; }
.doc-figure { min-width: 0; margin: 0; padding: 24px; background: #eef2f6; align-self: stretch; }
.doc-image-surround { width: 100%; max-width: 730px; margin: 0 auto; }
.doc-image-sheet { position: relative; background: #fff; border: 1px solid #c8d1dc; box-shadow: 0 2px 8px #21344a0d; line-height: 0; }
.doc-image-sheet > img { display: block; width: 100%; height: auto; user-select: none; }
.doc-hotspot { position: absolute; padding: 0; min-height: 10px; min-width: 10px; background: #174c9a05; border: 1px solid #215daf73; border-radius: 2px; color: #fff; transition: background .12s; }
.doc-hotspot > span { display: grid; place-items: center; position: absolute; left: -11px; top: -11px; width: 27px; height: 27px; border: 2px solid #fff; border-radius: 50%; background: #174c9a; color: #fff; font-size: 14px; font-weight: 700; line-height: 1; box-shadow: 0 1px 3px #17202d30; }
.doc-hotspot:hover, .doc-hotspot.is-active { background: #2168c51c; border: 2px solid #174c9a; z-index: 2; }
.doc-hotspot.is-active > span { width: 31px; height: 31px; left: -13px; top: -13px; background: #103c7d; box-shadow: 0 0 0 2px #103c7d; }
.doc-hotspot:focus-visible { outline: 3px solid #f7ad24; outline-offset: 2px; }
.doc-figure figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin-top: 14px; font-size: 14px; line-height: 1.7; }
.doc-image-kind { color: #475569; }
.doc-source-link { display: inline-flex; align-items: baseline; gap: 6px; color: #174c9a; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; line-height: 1.8; overflow-wrap: anywhere; }
.doc-source-link svg { width: 14px; height: 14px; flex-shrink: 0; align-self: center; }
.doc-field-panel { padding: 23px; min-width: 0; }
.doc-field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.doc-field-heading h3 { font-size: 19px; }
.doc-field-heading > span { font-size: 15px; color: #475569; flex-shrink: 0; }
.doc-field-list { display: flex; flex-wrap: wrap; gap: 7px; }
.doc-field-choice { display: inline-flex; align-items: center; gap: 7px; text-align: left; padding: 7px 9px; min-height: 42px; border: 1px solid #c1cedd; background: #fff; color: #334155; font-size: 15px; line-height: 1.6; border-radius: 4px; }
.doc-field-choice > span { display: grid; place-items: center; width: 23px; height: 23px; flex-shrink: 0; border-radius: 50%; background: #edf2f8; color: #334155; font-size: 13px; font-weight: 600; }
.doc-field-choice:hover { background: #f4f8fe; border-color: #7295c4; }
.doc-field-choice.is-active { color: #174c9a; border-color: #174c9a; background: #edf4ff; box-shadow: inset 0 0 0 1px #174c9a; font-weight: 600; }
.doc-field-choice.is-active > span { color: #fff; background: #174c9a; }
.doc-field-explanation { margin-top: 24px; border-top: 2px solid #174c9a; padding-top: 19px; }
.doc-explanation-number { font-size: 14px; font-weight: 600; color: #174c9a; margin-bottom: 6px; }
.doc-field-explanation h3 { font-size: 21px; line-height: 1.55; margin-bottom: 11px; }
.doc-field-explanation > p:not(.doc-explanation-number) { font-size: 17px; line-height: 1.9; color: #334155; white-space: pre-line; }
.doc-example { margin-top: 20px; border-left: 3px solid #89a3c6; background: #f2f6fc; padding: 15px 17px; }
.doc-example strong { color: #475569; font-size: 14px; font-weight: 500; }
.doc-example p { font-size: 17px; color: #17202d; font-weight: 600; line-height: 1.85; margin-top: 6px; white-space: pre-line; }
.doc-field-navigation { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; border-top: 1px solid #d9e1eb; padding-top: 15px; }
.doc-field-navigation button { display: inline-flex; gap: 5px; align-items: center; border: 0; color: #174c9a; background: none; padding: 6px 0; min-height: 42px; font-size: 15px; }
.doc-field-navigation button svg { width: 18px; height: 18px; }
.doc-field-navigation button:disabled { color: #7a8798; background: none; }
.doc-below-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(330px, 1fr); gap: 50px; margin-top: 42px; }
.doc-below-grid h2 { font-size: 24px; margin-bottom: 22px; line-height: 1.55; }
.doc-preparation-steps ol { list-style: none; padding: 0; margin: 0; }
.doc-preparation-steps li { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 25px; }
.doc-step-number { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: #edf4ff; color: #174c9a; font-size: 16px; font-weight: 600; margin-top: 1px; }
.doc-preparation-steps h3 { font-size: 19px; line-height: 1.65; margin-bottom: 6px; }
.doc-preparation-steps p { color: #475569; font-size: 17px; line-height: 1.85; white-space: pre-line; }
.doc-notes { border-top: 1px solid #cbd5e1; padding-top: 20px; }
.doc-notes h2 { font-size: 20px; margin-bottom: 11px; }
.doc-notes ul { margin: 0; padding-left: 1.2em; color: #475569; }
.doc-notes li { margin-bottom: 11px; font-size: 16px; line-height: 1.85; }
.doc-sources { margin-top: 26px; border-top: 1px solid #cbd5e1; padding-top: 20px; }
.doc-sources h2 { font-size: 19px; margin-bottom: 12px; }
.doc-sources ul { list-style: none; padding: 0; margin: 0; }
.doc-sources li { margin-bottom: 9px; }
.doc-review-note { color: #64748b; font-size: 14px; margin-top: 15px; }
.doc-review-note span { padding: 0 5px; }
.doc-bottom-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; border-top: 1px solid #cbd5e1; margin-top: 38px; padding-top: 25px; }
.doc-bottom-navigation a { display: flex; flex-direction: column; align-items: flex-start; color: #174c9a; padding: 8px 0; }
.doc-bottom-navigation a > span { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: #475569; margin-bottom: 5px; }
.doc-bottom-navigation a svg { width: 18px; height: 18px; }
.doc-bottom-navigation strong { font-size: 18px; font-weight: 600; line-height: 1.6; }
.doc-bottom-navigation a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.doc-bottom-navigation .doc-next { text-align: right; align-items: flex-end; }
.doc-index .doc-heading { margin-bottom: 33px; }
.doc-index-list { list-style: none; margin: 0; padding: 0; border: 1px solid #bac9db; border-radius: 6px; overflow: hidden; }
.doc-index-list li + li { border-top: 1px solid #cbd5e1; }
.doc-index-link { display: grid; grid-template-columns: 113px minmax(0, 1fr); align-items: center; gap: 28px; padding: 23px 28px; background: #fff; }
.doc-index-link:hover { background: #f5f8fc; }
.doc-index-preview { width: 113px; height: 135px; overflow: hidden; position: relative; background: #e8eef5; border: 1px solid #d2dbe6; padding: 11px 18px 0; }
.doc-index-preview img { width: 100%; height: auto; display: block; border: 1px solid #cbd5e1; }
.doc-index-number { position: absolute; left: 7px; top: 7px; background: #174c9a; border: 2px solid #fff; color: #fff; font-size: 13px; font-weight: 600; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; }
.doc-page-symbol { display: block; width: 74px; height: 110px; background: repeating-linear-gradient(to bottom, #fff 0, #fff 13px, #d5ddea 14px, #fff 15px); border: 1px solid #b7c7d9; }
.doc-index-copy h2 { font-size: 23px; margin-top: 6px; line-height: 1.6; }
.doc-index-copy p { margin-top: 5px; font-size: 16px; color: #475569; line-height: 1.75; max-width: 900px; }
.doc-index-action { display: inline-flex; align-items: center; gap: 9px; color: #174c9a; margin-top: 12px; font-size: 16px; font-weight: 600; }
.doc-index-action svg { width: 18px; height: 18px; }
.doc-index-note { font-size: 16px; line-height: 1.8; color: #475569; margin-top: 25px; max-width: 980px; }
.doc-image-dialog { width: min(1400px, calc(100% - 40px)); max-width: none; height: calc(100dvh - 40px); max-height: none; border-radius: 6px; border: 1px solid #a6b9d1; overflow: hidden; padding: 0; background: #fff; }
.doc-image-dialog[open] { display: flex; flex-direction: column; }
.doc-image-dialog::backdrop { background: #0c172ac9; backdrop-filter: blur(3px); }
.doc-zoom-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 23px; border-bottom: 1px solid #cbd5e1; }
.doc-zoom-header p { color: #475569; font-size: 14px; }
.doc-zoom-header h2 { font-size: 21px; line-height: 1.5; margin-top: 3px; }
.doc-zoom-header > button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid #a6b9d1; border-radius: 4px; background: #fff; }
.doc-zoom-header svg { width: 21px; height: 21px; }
.doc-zoom-tools { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 23px; }
.doc-zoom-tools p { font-size: 15px; line-height: 1.6; color: #475569; }
.doc-zoom-tools button { border: 1px solid #a6b9d1; background: #fff; color: #174c9a; font-size: 15px; border-radius: 4px; padding: 7px 11px; white-space: nowrap; min-height: 42px; }
.doc-zoom-tools button[aria-pressed="true"] { color: #fff; background: #174c9a; border-color: #174c9a; }
.doc-zoom-stage { flex: 1; min-height: 0; overflow: auto; background: #e7ecf3; padding: 24px; overscroll-behavior: contain; }
.doc-zoom-stage img { display: block; max-width: none; height: auto; background: #fff; box-shadow: 0 1px 8px #17202d20; }
.doc-image-dialog.is-fitted .doc-zoom-stage img { max-width: 100%; height: auto; margin: 0 auto; }
.doc-zoom-source { padding: 10px 23px; }
@media (min-width: 1100px) { .doc-field-panel { position: sticky; top: 24px; } }
@media (max-width: 1000px) {
  .doc-viewer-grid { grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); }
  .doc-figure, .doc-field-panel { padding: 18px; }
  .doc-below-grid { gap: 30px; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); }
}
@media (max-width: 760px) {
  .doc-page .container { width: calc(100% - 36px); }
  .doc-page { padding-top: 22px; }
  .doc-breadcrumb { font-size: 15px; gap: 7px 12px; margin-bottom: 24px; }
  .doc-heading h1 { font-size: 30px; }
  .doc-intro { font-size: 17px; }
  .doc-preparation-facts { grid-template-columns: 1fr; padding: 16px 18px; gap: 14px; }
  .doc-viewer-grid { grid-template-columns: 1fr; }
  .doc-viewer-top { align-items: flex-start; padding: 18px; gap: 12px; }
  .doc-viewer-top h2 { font-size: 22px; }
  .doc-zoom-button { padding: 9px 10px; }
  .doc-page-tabs { padding: 0 18px 17px; gap: 7px; }
  .doc-single-page-label { padding: 0 18px 15px; }
  .doc-figure { padding: 21px; }
  .doc-field-panel { border-top: 1px solid #cbd5e1; padding: 20px; }
  .doc-field-choice { min-height: 44px; font-size: 16px; }
  .doc-field-list { gap: 8px; }
  .doc-field-explanation { margin-top: 21px; }
  .doc-below-grid { grid-template-columns: 1fr; gap: 23px; margin-top: 32px; }
  .doc-notes-sources { max-width: none; }
  .doc-bottom-navigation { gap: 22px; }
  .doc-bottom-navigation strong { font-size: 16px; }
  .doc-index-link { grid-template-columns: 82px minmax(0, 1fr); gap: 19px; padding: 20px; align-items: start; }
  .doc-index-preview { width: 82px; height: 111px; padding: 12px 10px 0; margin-top: 6px; }
  .doc-index-copy h2 { font-size: 20px; }
  .doc-index-action { font-size: 16px; }
  .doc-image-dialog { width: calc(100% - 16px); height: calc(100dvh - 16px); }
  .doc-zoom-header { padding: 13px 15px; }
  .doc-zoom-header h2 { font-size: 18px; }
  .doc-zoom-tools { padding: 10px 15px; }
  .doc-zoom-tools p { font-size: 14px; }
  .doc-zoom-stage { padding: 15px; }
  .doc-zoom-source { padding: 10px 15px; }
}
@media (max-width: 460px) {
  .doc-scope { font-size: 15px; }
  .doc-heading h1 { font-size: 28px; }
  .doc-viewer-top { flex-wrap: wrap; }
  .doc-zoom-button { width: 100%; }
  .doc-page-tabs button { padding: 8px 9px; font-size: 16px; }
  .doc-hotspot > span { width: 24px; height: 24px; font-size: 13px; left: -9px; top: -9px; }
  .doc-hotspot.is-active > span { width: 27px; height: 27px; left: -10px; top: -10px; }
  .doc-field-panel { padding: 18px; }
  .doc-field-explanation h3 { font-size: 20px; }
  .doc-example { padding: 13px; }
  .doc-index-link { grid-template-columns: 58px minmax(0, 1fr); gap: 15px; padding: 18px 15px; }
  .doc-index-preview { width: 58px; height: 85px; padding: 13px 5px 0; }
  .doc-index-number { width: 24px; height: 24px; top: 3px; left: 3px; font-size: 11px; }
  .doc-index-copy h2 { font-size: 19px; }
  .doc-index-copy .doc-kind { font-size: 13px; }
  .doc-index-action { gap: 7px; }
  .doc-index-action svg { flex-shrink: 0; }
  .doc-preparation-steps li { gap: 13px; }
  .doc-step-number { width: 28px; height: 28px; }
  .doc-zoom-tools { align-items: flex-start; }
}
@media print {
  .doc-breadcrumb, .doc-page-tabs, .doc-zoom-button, .doc-field-list, .doc-field-navigation, .doc-bottom-navigation, .doc-image-dialog { display: none !important; }
  .doc-page .container { width: 100%; }
  .doc-viewer-grid, .doc-below-grid { display: block; }
  .doc-figure { max-width: 580px; margin: auto; }
  .doc-viewer { border: 0; }
  .doc-preparation-facts, .doc-example { background: #f5f5f5; }
}

.doc-viewer-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
@media (max-width: 760px) { .doc-viewer-top { flex-wrap: wrap; } .doc-viewer-actions { width: 100%; } .doc-viewer-actions .doc-zoom-button { flex: 1; width: auto; } }

/* A procedure directory, with the entry visa kept separate from the COE. */
.doc-route-matrix { border-top: 2px solid #1b2a40; margin: 36px 0; }
.doc-route-row { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 30px; padding: 28px 0; border-bottom: 1px solid #cbd5e1; align-items: center; }
.doc-route-row h2 { font-size: 23px; line-height: 1.5; margin: 0; }
.doc-route-row > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.doc-route-row a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 76px; padding: 16px; border: 1px solid #a6b8d0; border-radius: 8px; color: #184b96; font-size: 17px; font-weight: 700; background: #fff; }
.doc-route-row a:hover { border-color: #184b96; background: #edf4ff; }
.doc-route-row svg, .doc-entry-next svg, .doc-catalog-shortcut svg { width: 20px; height: 20px; flex-shrink: 0; }
.doc-entry-next { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 26px; margin-top: 32px; background: #eef4fc; border-left: 4px solid #194d97; }
.doc-entry-next h2 { font-size: 23px; line-height: 1.5; margin: 0 0 8px; }
.doc-entry-next p { margin: 0; color: #38465b; line-height: 1.8; }
.doc-entry-next .button { flex-shrink: 0; font-size: 17px; }
.doc-catalog-shortcut { margin: 0 0 22px; }
.doc-catalog-shortcut a { display: inline-flex; gap: 10px; align-items: center; color: #184b96; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 900px) {
  .doc-route-row { grid-template-columns: 1fr; gap: 18px; }
  .doc-entry-next { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .doc-route-row > div { grid-template-columns: 1fr; }
  .doc-route-row a { min-height: 58px; }
  .doc-entry-next { padding: 20px; }
  .doc-entry-next .button { width: 100%; }
}
