.op-page {
  container-type: inline-size;
}
.op-page .page-head { margin-bottom: 17px; }
.op-page h2, .op-page h3, .op-page p { margin: 0; }
.op-page .badge { border-radius: 16px; white-space: nowrap; }
.op-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--paper);
}
.op-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: var(--control-radius);
  color: #556176;
  font-size: var(--type-ui);
  font-weight: 580;
  white-space: nowrap;
}
.op-nav a:hover { background: #f5f5fa; }
.op-nav a[aria-current] { color: #4b419e; background: var(--blue-soft); font-weight: 675; }
.op-nav svg, .op-search svg, .op-inline svg, .op-chevron svg { width: 16px; height: 16px; flex: none; }
.op-tools, .op-capability-controls, .op-choices, .op-search, .op-choices label > span {
  display: flex;
  align-items: center;
}
.op-filter-actions { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.op-tools { justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin: 0 0 18px; }
.op-capability-controls { flex-wrap: wrap; gap: 8px 18px; }
.op-capability-controls h2 { font-size: 18px; }
.op-search { position: relative; min-width: 0; }
.op-search svg { position: absolute; left: 12px; color: #758097; pointer-events: none; }
.op-page .op-search input, .op-request-form select {
  min-height: 39px;
  max-width: 100%;
  border: 1px solid #d4dae5;
  border-radius: var(--control-radius);
  background-color: white;
  font-size: var(--type-ui);
  color: var(--ink);
}
.op-page .op-search input { width: clamp(225px, 21vw, 320px); padding: 8px 10px 8px 37px; }
.op-choices { flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; border: 0; min-width: 0; }
.op-choices label { position: relative; cursor: pointer; }
.op-sr, .op-choices input[type=radio] {
  position: absolute; clip-path: inset(50%); width: 1px; height: 1px; min-height: 0;
  padding: 0; margin: -1px; border: 0; overflow: hidden; white-space: nowrap;
}
.op-choices label > span {
  gap: 7px; min-height: 35px; padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: var(--type-ui); font-weight: 610; color: var(--muted);
}
.op-choices label:hover > input:not(:checked) + span { background: #ebedf4; }
.op-choices label b {
  min-width: 19px; border-radius: var(--radius-panel); padding: 0 5px; background: #e3e6ee;
  color: #556178; font-size: var(--small-label); line-height: 19px; text-align: center; font-variant-numeric: tabular-nums;
}
.op-choices :checked + span { background: var(--blue-strong); color: white; }
.op-choices :checked + span b { background: #ffffff30; color: white; }
.op-choices :focus-visible + span { outline: 2px solid var(--blue-strong); outline-offset: 2px; }
.op-catalog-section { margin: 24px 0; }
.op-catalog-section > header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.op-catalog-section h3 { font-size: 17px; letter-spacing: -.035em; }
.op-catalog-section header > span, .op-cap-copy small, .op-path-count,
.op-section-head p, .op-base-paths dt, .op-phases span,
.op-empty p { color: var(--muted); font-size: var(--type-caption); }
.op-card-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
}
.op-capability, .op-surface, .op-audit, .op-empty {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--paper);
  box-shadow: var(--panel-shadow);
}
.op-capability { overflow: hidden; --op-fill: #eeebfb; --op-color: #5b4eae; }
.op-lilac { --op-fill: #e7e0f8; --op-color: #61489d; background: linear-gradient(120deg,#f7f4fc,#fff); }
.op-teal { --op-fill: #d8eae7; --op-color: #316a64; background: linear-gradient(120deg,#f1f7f6,#fff); }
.op-peach { --op-fill: #f7e2d4; --op-color: #955c36; background: linear-gradient(120deg,#fcf6f1,#fff); }
.op-capability summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas: "glyph count arrow" "copy copy copy";
  align-items: center;
  gap: 9px;
  padding: 16px 18px;
  list-style: none;
  cursor: pointer;
}
.op-page summary::-webkit-details-marker { display: none; }
.op-capability:has(summary:hover), .op-capability[open] { border-color: #bcb8d7; }
.op-capability summary:focus-visible { outline-offset: -3px; }
.op-tile {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px;
  border-radius: var(--radius-panel); background: var(--op-fill,#eeebfa); color: var(--op-color,#6353ab);
}
.op-tile svg { width: 18px; height: 18px; }
.op-capability .op-tile { grid-area: glyph; }
.op-cap-copy { display: grid; gap: 4px; grid-area: copy; min-width: 0; }
.op-cap-copy strong { font-size: var(--type-subheading); line-height: 1.4; }
.op-cap-copy small { line-height: 1.45; }
.op-chevron { grid-area: arrow; display: flex; color: #737e92; }
.op-capability[open] .op-chevron { transform: rotate(90deg); }
.op-path-count { grid-area: count; font-size: var(--small-label); font-variant-numeric: tabular-nums; }
.op-read { --op-fill: #eff1f9; --op-color: #5c6480; }
.op-read summary { grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "glyph copy arrow" "glyph count arrow"; gap: 3px 12px; }
.op-read .op-cap-copy strong { font-size: 15px; }
.op-cap-details { background: white; border-top: 1px solid #e4e6ef; }
.op-cap-details .op-rule { padding: 12px 15px 5px; color: var(--muted); font-size: var(--type-caption); }
.op-paths, .op-audit, .op-phases { margin: 0; padding: 0; list-style: none; }
.op-paths { padding: 4px 14px; }
.op-paths li { display: flex; gap: 8px; align-items: baseline; padding: 8px 0; }
.op-paths li + li { border-top: 1px solid #edf0f5; }
.op-page code { font: 12px/1.55 var(--mono); color: #414c65; overflow-wrap: anywhere; white-space: normal; }
.op-method { font: 650 10px/1.7 var(--mono); padding: 0 5px; border-radius: var(--radius-small); flex: none; }
.op-method-get { background: #e2f0eb; color: #2b6555; }
.op-method-post { background: #ede8fb; color: #604b9f; }
.op-method-put { background: #f7ebdd; color: #875124; }
.op-page .op-inline {
  min-height: 32px; font-size: var(--type-caption); border-radius: var(--control-radius);
}
.op-page .op-inline { border: 0; background: var(--blue-soft); color: #50449a; }
.op-cap-details .op-inline { margin: 5px 14px 13px; }
.op-page .btn.primary { background: var(--blue-strong); border-color: var(--blue-strong); color: white; border-radius: var(--control-radius); }
.op-page .btn.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.op-empty { display: grid; place-items: center; align-content: center; gap: 10px; padding: 42px 16px; text-align: center; }
.op-empty h2 { font-size: var(--type-subheading); }
.op-console, .op-service { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: stretch; }
.op-section-head { display: flex; align-items: center; gap: 11px; padding: 17px 18px; }
.op-section-head h2 { font-size: var(--type-subheading); overflow-wrap: anywhere; }
.op-section-head p { display: block; margin-top: 3px; }
.op-section-head .badge { margin-left: auto; }
.op-base-paths { margin: 0; padding: 0 18px 11px; }
.op-base-paths > div { display: grid; grid-template-columns: minmax(74px, auto) 1fr; gap: 12px; padding: 7px 0; align-items: baseline; }
.op-base-paths dd { margin: 0; font-size: var(--type-ui); overflow-wrap: anywhere; }
.op-audit li { display: grid; grid-template-columns: minmax(0,1fr) auto 74px; align-items: center; gap: 18px; padding: 13px 16px; }
.op-audit li + li { border-top: 1px solid #e8ebf2; }
.op-log-request { min-width: 0; }
.op-log-request strong { font-size: var(--type-body); }
.op-log-request > code { margin-left: 8px; color: var(--muted); }
.op-log-request > span { display: block; margin-top: 3px; }
.op-audit time { font: 12px var(--mono); color: var(--muted); text-align: right; }
.op-section-head { border-bottom: 1px solid #e8ebf2; }
.op-request-form, .op-json { padding: 17px 18px; }
.op-request-form .form-grid { gap: 10px 12px; margin: 14px 0; }
.op-request-form .field { min-width: 0; margin: 0; }
.op-request-form .field select { width: 100%; }
.op-request-form .write-help { margin: 0 0 12px; font-size: var(--type-caption); }
.op-response #api-response:empty::after {
  content: "运行模拟请求后，可在这里查看状态码和响应内容。";
  display: block; padding: 30px 18px; color: var(--muted); font-size: var(--type-ui);
}
.op-response-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.op-json pre { margin: 14px 0; background: #25293c; color: #eef0fa; border-radius: var(--control-radius); }
.op-service .op-base-paths { padding-block: 11px; }
.op-page .op-use-token { padding: 14px 18px 0; font-size: var(--type-ui); color: var(--muted); }
.op-phases { counter-reset: op-step; padding: 14px 18px 18px; }
.op-phases li { counter-increment: op-step; position: relative; display: grid; gap: 2px; margin-left: 11px; padding: 3px 0 15px 24px; border-left: 1px solid #dedcec; }
.op-phases li:last-child { border-color: transparent; padding-bottom: 0; }
.op-phases li::before {
  content: counter(op-step); position: absolute; top: 4px; left: -11px; display: grid; place-items: center;
  width: 21px; height: 21px; border-radius: 50%; background: #eeebf9; color: #574a9c; font-size: var(--type-caption); font-weight: 650;
}
.op-phases b { font-size: var(--type-body); }
@container (max-width: 850px) {
  .op-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .op-console, .op-service { grid-template-columns: 1fr; }
}
@container (max-width: 650px) {
  .op-nav { gap: 1px; margin-bottom: 17px; }
  .op-nav a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; min-height: 47px; padding: 3px 0; font-size: var(--small-label); }
  .op-tools { gap: 10px; }
  .op-filter-actions { flex: 1 1 100%; }
  .op-filter-actions .op-search { flex: 1; }
  .op-page .op-search input { width: 100%; }
  .op-catalog-section { margin: 18px 0; }
  .op-audit li { grid-template-columns: minmax(0,1fr) auto; gap: 3px 8px; }
  .op-audit time { grid-column: 2; font-size: var(--small-label); }
  .op-log-request { grid-row: 1 / 3; }
}
@container (max-width: 520px) {
  .op-card-grid { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .op-capability summary { min-height: 69px; padding: 11px 12px; grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "glyph copy arrow" "glyph count arrow"; gap: 2px 10px; }
  .op-cap-copy { gap: 1px; }
  .op-cap-copy strong { font-size: 15px; }
  .op-cap-copy small, .op-read .op-path-count { font-size: var(--small-label); }
  .op-choices label > span { padding-inline: 8px; gap: 5px; }
  .op-nav svg { width: 15px; height: 15px; }
  .op-request-form .form-grid { grid-template-columns: 1fr; }
}
