:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-subtle: #f8fafb;
  --border: #d9e0e6;
  --border-strong: #bcc7d0;
  --text: #1d2933;
  --text-soft: #52616d;
  --text-muted: #73808a;
  --blue: #1769aa;
  --blue-soft: #eaf4fb;
  --green: #26734d;
  --green-soft: #eaf6ef;
  --amber: #9b5d00;
  --amber-soft: #fff6df;
  --red: #a53434;
  --red-soft: #fff0f0;
  --sidebar-width: 296px;
  --topbar-height: 64px;
  font-family:
    Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.72;
}

button,
input {
  font: inherit;
}

a {
  color: var(--blue);
}

kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-160%);
  padding: 8px 12px;
  background: #111;
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: 1fr minmax(320px, 760px) 1fr;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.search-wrap {
  position: relative;
  grid-column: 2;
}

.search-wrap input {
  width: 100%;
  height: 38px;
  padding: 0 46px 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  outline: none;
  background: var(--surface-subtle);
  color: var(--text);
}

.search-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.12);
  background: #fff;
}

.search-wrap kbd {
  position: absolute;
  top: 9px;
  right: 10px;
  min-width: 20px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #fff;
  color: var(--text-muted);
  text-align: center;
  line-height: 20px;
}

.topbar-actions {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.search-status {
  color: var(--text-muted);
  font-size: 12px;
}

.icon-button {
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  font-size: 22px;
}

.sidebar {
  position: fixed;
  z-index: 90;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #f8fafc;
}

.sidebar-head {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.sidebar-head strong,
.sidebar-head small {
  display: block;
}

.sidebar-head strong {
  color: #203542;
  font-size: 18px;
  line-height: 1.3;
}

.sidebar-head small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.sidebar nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 28px;
}

.nav-group + .nav-group {
  margin-top: 13px;
  padding-top: 16px;
  border-top: 1px solid #e4e9ed;
}

.nav-group p {
  margin: 0 0 8px;
  padding: 8px 12px;
  background: #e9eef2;
  border-left: 3px solid #78909e;
  border-radius: 2px;
  color: #263f4e;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.35;
}

.nav-group a {
  display: block;
  margin: 2px 0;
  padding: 8px 12px;
  border-left: 3px solid transparent;
  color: #2f424f;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}

.nav-group a:hover {
  background: var(--surface-subtle);
  color: var(--blue);
}

.nav-group a.active {
  border-left-color: var(--blue);
  background: #dceefa;
  color: #0d5f9d;
  font-weight: 750;
}

.sidebar-foot {
  display: flex;
  justify-content: space-between;
  padding: 13px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
}

.sidebar-foot strong {
  color: var(--text-soft);
}

.content {
  width: min(1120px, calc(100% - var(--sidebar-width) - 48px));
  margin: 0 auto 80px;
  padding-top: calc(var(--topbar-height) + 26px);
  padding-left: var(--sidebar-width);
}

.doc-section {
  position: relative;
  margin: 0 0 18px;
  padding: 46px 58px 54px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.doc-section[hidden] {
  display: none;
}

.lead-section {
  border-top: 4px solid #1f4055;
}

.section-index {
  position: absolute;
  top: 18px;
  right: 24px;
  color: #c2cbd2;
  font-size: 12px;
  font-weight: 800;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.25;
}

h2 {
  margin: 38px 0 14px;
  padding-top: 4px;
  font-size: 20px;
  line-height: 1.35;
}

h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

p {
  margin: 0 0 14px;
}

.lead,
.section-intro {
  max-width: 850px;
  color: var(--text-soft);
  font-size: 16px;
}

.baseline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 32px 0;
  border: 1px solid var(--border);
}

.baseline > div {
  min-width: 0;
  padding: 15px 17px;
}

.baseline > div + div {
  border-left: 1px solid var(--border);
}

.baseline span,
.baseline strong {
  display: block;
}

.baseline span {
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 11px;
}

.baseline strong {
  font-size: 14px;
}

.system-map {
  display: grid;
  grid-template-columns:
    minmax(130px, 1fr) 24px minmax(130px, 1fr) 24px minmax(130px, 1fr)
    24px minmax(130px, 1fr);
  align-items: center;
  margin: 20px 0 30px;
}

.system-map > div {
  min-height: 108px;
  padding: 17px;
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
}

.system-map > div:nth-of-type(2) {
  border-top: 3px solid var(--blue);
}

.system-map > div:nth-of-type(3) {
  border-top: 3px solid var(--green);
}

.system-map > div:nth-of-type(4) {
  border-top: 3px solid var(--amber);
}

.system-map b,
.system-map span {
  display: block;
}

.system-map span {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.system-map i {
  color: var(--text-muted);
  text-align: center;
  font-style: normal;
}

.notice {
  margin: 24px 0;
  padding: 15px 18px;
  border-left: 4px solid;
}

.notice strong {
  display: block;
  margin-bottom: 4px;
}

.notice p {
  margin: 0;
}

.notice.info {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.notice.warning {
  border-color: #d68b13;
  background: var(--amber-soft);
}

.notice.danger {
  border-color: var(--red);
  background: var(--red-soft);
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0 28px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f1f5f7;
  color: #394b57;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.procedure {
  margin: 28px 0 0;
  padding: 0;
  counter-reset: procedure;
  list-style: none;
}

.procedure li {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  counter-increment: procedure;
}

.procedure li::before {
  content: counter(procedure, decimal-leading-zero);
  position: relative;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.procedure li::after {
  content: "";
  position: absolute;
  top: 38px;
  bottom: 0;
  left: 19px;
  width: 1px;
  background: var(--border);
}

.procedure li:last-child::after {
  display: none;
}

.procedure li > div {
  padding: 5px 0 26px;
}

.procedure strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.procedure p {
  margin: 0;
  color: var(--text-soft);
}

.procedure.short li > div {
  padding-bottom: 18px;
}

.compact-steps {
  margin: 12px 0 24px;
  padding-left: 26px;
}

.compact-steps li {
  margin: 8px 0;
  padding-left: 6px;
}

.plain-list {
  margin: 12px 0 24px;
  padding-left: 22px;
}

.plain-list li {
  margin: 7px 0;
  padding-left: 3px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 20px 0;
  border: 1px solid var(--border);
}

.check-grid label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.check-grid label:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.check-grid label:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.check-grid input {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  accent-color: var(--green);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 22px 0 10px;
  border-top: 3px solid #294b61;
}

.timeline div {
  position: relative;
  padding: 16px 12px 10px 0;
}

.timeline div::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  width: 13px;
  height: 13px;
  border: 2px solid #294b61;
  border-radius: 50%;
  background: #fff;
}

.timeline span,
.timeline b,
.timeline small {
  display: block;
}

.timeline span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.timeline b {
  margin: 3px 0;
}

.timeline small,
.caption {
  color: var(--text-muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.split > div {
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}

.split p {
  margin: 0;
  color: var(--text-soft);
}

.flow-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 18px 0 28px;
  padding: 1px;
  background: var(--border);
  list-style: none;
}

.flow-list li {
  min-height: 98px;
  padding: 16px;
  background: #fff;
}

.flow-list b,
.flow-list span {
  display: block;
}

.flow-list b {
  margin-bottom: 5px;
}

.flow-list span {
  color: var(--text-soft);
  font-size: 13px;
}

details {
  margin: 12px 0;
  border: 1px solid var(--border);
  background: #fff;
}

summary {
  padding: 14px 18px;
  background: var(--surface-subtle);
  cursor: pointer;
  font-weight: 700;
}

details ol {
  margin: 8px 20px 18px 42px;
  padding: 0;
}

details li {
  margin: 7px 0;
}

.doc-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 46px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.doc-footer p {
  margin: 0;
}

.no-results {
  padding: 80px 30px;
  border: 1px solid var(--border);
  background: #fff;
  text-align: center;
}

.no-results strong {
  font-size: 18px;
}

.no-results p {
  color: var(--text-muted);
}

mark {
  padding: 0 2px;
  background: #ffe58f;
  color: inherit;
}

.mobile-only {
  display: none;
}

.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;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr minmax(280px, 620px) 1fr;
  }

  :root {
    --sidebar-width: 260px;
  }

  .content {
    width: calc(100% - var(--sidebar-width) - 32px);
  }

  .doc-section {
    padding: 42px 40px 48px;
  }

  .baseline {
    grid-template-columns: 1fr 1fr;
  }

  .baseline > div:nth-child(3) {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .baseline > div:nth-child(4) {
    border-top: 1px solid var(--border);
  }

  .system-map {
    grid-template-columns: 1fr 18px 1fr;
    gap: 10px 0;
  }

  .system-map i:nth-of-type(2) {
    display: none;
  }

  .system-map > div:nth-of-type(3) {
    grid-column: 1;
  }

  .system-map > div:nth-of-type(4) {
    grid-column: 3;
  }
}

@media (max-width: 820px) {
  :root {
    --topbar-height: 58px;
  }

  body {
    overflow-x: hidden;
  }

  .mobile-only {
    display: inline-grid;
    place-items: center;
  }

  .topbar {
    grid-template-columns: 38px 1fr;
    gap: 10px;
    height: auto;
    min-height: var(--topbar-height);
    padding: 9px 12px;
  }

  .topbar-actions {
    display: none;
  }

  .search-wrap {
    grid-column: 2;
  }

  .search-wrap input {
    height: 38px;
  }

  .search-wrap kbd {
    display: none;
  }

  .sidebar {
    top: 0;
    z-index: 160;
    width: min(320px, 86vw);
    transform: translateX(-102%);
    transition: transform 180ms ease;
    box-shadow: 12px 0 30px rgba(25, 40, 50, 0.18);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-head {
    min-height: 68px;
    padding: 10px 14px 10px 24px;
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 150;
    inset: 0;
    background: rgba(17, 29, 37, 0.42);
  }

  .content {
    min-width: 0;
    width: auto;
    margin: 0 10px 50px;
    padding-top: calc(var(--topbar-height) + 12px);
    padding-left: 0;
  }

  .doc-section {
    min-width: 0;
    margin-bottom: 10px;
    padding: 34px 22px 40px;
  }

  h1 {
    font-size: 25px;
  }

  h2 {
    font-size: 18px;
  }

  .baseline,
  .check-grid,
  .split,
  .flow-list {
    grid-template-columns: 1fr;
  }

  .system-map {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .system-map > div:nth-of-type(3),
  .system-map > div:nth-of-type(4) {
    grid-column: auto;
  }

  .system-map i,
  .system-map i:nth-of-type(2) {
    display: block;
    padding: 4px 0;
    transform: rotate(90deg);
  }

  .baseline > div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .check-grid label {
    border-right: 0 !important;
    border-bottom: 1px solid var(--border) !important;
  }

  .check-grid label:last-child {
    border-bottom: 0 !important;
  }

  .timeline {
    grid-template-columns: 1fr;
    border-top: 0;
    border-left: 3px solid #294b61;
  }

  .timeline div {
    padding: 0 12px 22px 18px;
  }

  .timeline div::before {
    top: 4px;
    left: -8px;
  }

  .doc-footer {
    display: block;
  }

  .doc-footer a {
    display: inline-block;
    margin-top: 12px;
  }
}

@media print {
  .topbar,
  .sidebar,
  .sidebar-scrim,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .content {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .doc-section {
    break-inside: avoid-page;
    margin: 0;
    padding: 24px 0;
    border: 0;
    border-bottom: 1px solid #bbb;
  }

  details {
    break-inside: avoid;
  }

  details > * {
    display: block !important;
  }
}
