@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Public Sans', Arial, Helvetica, sans-serif; color: #1f2937; background: #fff; font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.layout { display: flex; min-height: 100vh; }

.sidebar { width: 264px; flex-shrink: 0; background: #001a70; color: #dfe2f2; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { padding: 26px 24px 20px; border-bottom: 1px solid rgba(255,255,255,.12); flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.brand img { display: block; width: 156px; height: auto; }
.brand .tag { color: #ff9d7a; font-size: 12px; margin-top: 8px; letter-spacing: .14em; text-transform: uppercase; }
.brand a:hover { text-decoration: none; }
.nav { padding: 14px 14px 24px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav .cat { display: block; padding: 9px 12px; border-radius: 6px; font-size: 14px; font-weight: 600; color: #dfe2f2; }
.nav .cat:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav .cat.active { background: rgba(255,255,255,.1); color: #ff9d7a; }
.nav .subs { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 8px 18px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.16); }
.nav .sub { display: block; padding: 6px 10px; border-radius: 5px; font-size: 13px; color: #aab2d9; }
.nav .sub .mono { font-size: 12.5px; }
.nav .sub:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav .sub.active { color: #ff9d7a; font-weight: 600; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; background: #fff; height: 60px; flex-shrink: 0; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 24px; padding: 0 32px; }
.breadcrumb { font-size: 13px; color: #6b7280; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.breadcrumb a { color: #6b7280; }
.breadcrumb a:hover { color: #111827; }
.breadcrumb .sep { color: #c1c5cc; }
.breadcrumb b { color: #111827; font-weight: 600; }

.search { position: relative; width: 360px; flex-shrink: 0; }
.search input { width: 100%; height: 32px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 12px 0 34px; font: inherit; font-size: 13px; color: #111827; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat 11px center; }
.search input::placeholder { color: #9ca3af; }
.search input:focus { outline: none; border-color: #001a70; box-shadow: 0 0 0 3px rgba(0,26,112,.08); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search .results { display: none; position: absolute; right: 0; width: min(560px, calc(100vw - 40px)); top: calc(100% + 6px); background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.1); max-height: 60vh; overflow-y: auto; z-index: 20; }
.search.open .results { display: block; }
.search .result { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: baseline; padding: 9px 14px; font-size: 13px; border-bottom: 1px solid #f1f2f4; color: #1f2937; }
.search .result:last-child { border-bottom: 0; }
.search .result:hover, .search .result.sel { background: #f5f6fa; text-decoration: none; }
.search .result .code { font-size: 12px; font-weight: 600; color: #001a70; }
.search .result .cat { display: block; margin-top: 1px; font-size: 11.5px; color: #9ca3af; }
.search .status { padding: 12px 14px; color: #9ca3af; font-size: 13px; }

.version-switcher { position: relative; flex-shrink: 0; }
.version-switcher summary { list-style: none; cursor: pointer; height: 32px; font-size: 12.5px; font-weight: 600; color: #374151; border: 1px solid #d1d5db; padding: 0 10px 0 12px; border-radius: 6px; display: flex; align-items: center; gap: 8px; background: #fff; }
.version-switcher summary:hover { border-color: #9ca3af; }
.version-switcher summary::-webkit-details-marker { display: none; }
.version-switcher summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid #6b7280; border-bottom: 1.5px solid #6b7280; transform: rotate(45deg) translate(-1px, -2px); }
.version-switcher .menu { position: absolute; right: 0; top: calc(100% + 6px); width: 224px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.1); overflow: hidden; z-index: 10; padding: 4px 0; }
.version-switcher .group-label { padding: 8px 14px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #9ca3af; }
.version-switcher .group-label + .group-label, .version-switcher .item + .group-label { border-top: 1px solid #f1f2f4; margin-top: 4px; padding-top: 10px; }
.version-switcher .item { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; font-size: 13px; }
.version-switcher a.item { color: #1f2937; }
.version-switcher a.item:hover { background: #f5f6fa; text-decoration: none; }
.version-switcher .item.current { color: #001a70; font-weight: 600; }
.version-switcher .item.disabled { color: #c1c5cc; }
.version-switcher .item .hint { margin-left: 8px; font-size: 11px; color: #c1c5cc; font-weight: 400; }

.content { flex: 1; padding: 36px 48px 64px; width: 100%; max-width: 1120px; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 2px solid #e85130; margin-bottom: 6px; }
.page-head h1 { margin: 0; font-size: 22px; line-height: 1.3; color: #111827; font-weight: 700; letter-spacing: -.01em; }
.page-head .count { font-size: 13px; color: #6b7280; white-space: nowrap; }
.intro { margin: 10px 0 30px; color: #6b7280; font-size: 14.5px; max-width: 640px; }

.doc-list { display: flex; flex-direction: column; }
.group-heading { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 28px 0 10px; font-size: 12px; font-weight: 700; color: #001a70; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid #001a70; user-select: none; }
.group:first-child .group-heading { padding-top: 12px; }
.group-heading::-webkit-details-marker { display: none; }
.group-heading::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid #e85130; border-bottom: 1.5px solid #e85130; transform: rotate(-45deg); flex-shrink: 0; margin-right: 2px; transition: transform .15s; }
.group[open] > .group-heading::before { transform: rotate(45deg) translateY(-2px); }
.group-heading .group-count { color: #9ca3af; font-weight: 500; text-transform: none; letter-spacing: 0; }
.group-heading:hover .group-count { color: #6b7280; }
.doc-row { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: baseline; padding: 11px 12px; margin: 0 -12px; border-bottom: 1px solid #eceef1; }
.doc-row:hover { background: #f5f6fa; text-decoration: none; }
.doc-row:hover .code { color: #e85130; }
.doc-row:hover .title { text-decoration: underline; text-underline-offset: 2px; }
.doc-row .code { font-size: 12.5px; font-weight: 600; color: #001a70; }
.doc-row .title { font-size: 14px; color: #1f2937; }

.cat-list { display: flex; flex-direction: column; margin-top: 8px; }
.cat-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 12px; margin: 0 -12px; border-bottom: 1px solid #eceef1; }
.cat-row:hover { background: #f5f6fa; text-decoration: none; }
.cat-row:hover .cat-title { color: #e85130; }
.cat-row .cat-title { font-size: 16px; font-weight: 600; color: #111827; }
.cat-row .cat-subs { margin-top: 4px; font-size: 12px; color: #6b7280; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cat-row .count { font-size: 13px; color: #6b7280; white-space: nowrap; }

.footer { padding: 20px 48px; border-top: 1px solid #e5e7eb; font-size: 12.5px; color: #9ca3af; }
.footer a { color: #6b7280; }

@media (max-width: 1100px) {
  .search { width: 240px; }
  .breadcrumb { display: none; }
}
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { position: static; width: auto; height: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav .subs { display: none; }
  .topbar { padding: 0 20px; gap: 12px; }
  .search { flex: 1; width: auto; }
  .content, .footer { padding-left: 20px; padding-right: 20px; }
  .doc-row { grid-template-columns: 1fr; gap: 2px; }
}
