/* CTRP Staff Resources theme. Mintlify-style docs layout, dark-first. --primary comes from docs.json. */

@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --primary: #E11414;
  --header-h: 56px;
  --sidebar-w: 307px;
  --content-w: 662px;
  --toc-w: 240px;
  --gap: 89px;
  --radius: 16px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  /* light */
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-soft: rgba(0, 0, 0, .035);
  --bg-hover: rgba(0, 0, 0, .05);
  --border: rgba(0, 0, 0, .08);
  --border-strong: rgba(0, 0, 0, .14);
  --text: #3f3f46;
  --text-strong: #09090b;
  --muted: #71717a;
  --nav: #52525b;
  --code-bg: #fafafa;
  --glow: 7%;
  --shadow: 0 16px 48px -12px rgba(0, 0, 0, .18);
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #040404;
  --bg-elev: #0e0e0e;
  --bg-soft: rgba(255, 255, 255, .04);
  --bg-hover: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --text: rgba(255, 255, 255, .72);
  --text-strong: #ffffff;
  --muted: rgba(255, 255, 255, .5);
  --nav: rgba(255, 255, 255, .72);
  --code-bg: #0b0b0b;
  --glow: 17%;
  --shadow: 0 16px 48px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.75 var(--font); font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.icon { width: 1em; height: 1em; flex: none; display: block; }
.icon-lucide { stroke-width: 2; }
.i { display: inline-flex; align-items: center; justify-content: center; }
.i .icon { width: 100%; height: 100%; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- header -- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 40;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 36px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-right { justify-content: flex-end; }
.brand { display: flex; align-items: center; min-width: 0; }
.logo { height: 24px; width: auto; display: block; }
.logo-text { font-weight: 600; color: var(--text-strong); font-size: 15px; }
[data-theme='dark'] .logo-light, [data-theme='light'] .logo-dark, html:not([data-theme]) .logo-dark { display: none; }

.search-trigger {
  width: 384px; height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  border-radius: 999px; background: var(--bg-soft); color: var(--muted); font-size: 15px; text-align: left;
  transition: background .15s;
}
[data-theme='dark'] .search-trigger { background: #121212; }
.search-trigger:hover { background: var(--bg-hover); }
.search-trigger .icon { width: 16px; height: 16px; color: var(--text); }
.search-trigger span { flex: 1; }
.search-trigger kbd, .search-field kbd { font: 500 12px var(--font); color: var(--muted); }

.nav-link { font-size: 14px; font-weight: 500; color: var(--nav); padding: 6px 4px; white-space: nowrap; }
.nav-link:hover { color: var(--text-strong); }
.nav-primary {
  display: inline-flex; align-items: center; gap: 4px; height: 35px; padding: 0 10px 0 13px; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: filter .15s;
}
.nav-primary:hover { filter: brightness(1.1); }
.nav-primary .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-strong); flex: none;
}
.icon-btn .icon { width: 16px; height: 16px; }
.theme-toggle { background: var(--bg-soft); }
[data-theme='dark'] .theme-toggle { background: #1a1a1a; }
.theme-toggle:hover { background: var(--bg-hover); }
[data-theme='dark'] .theme-toggle .sun, [data-theme='light'] .theme-toggle .moon { display: none; }
.menu-btn, .search-mobile { display: none; }

/* ---------------------------------------------------------------- sidebar -- */
.shell { padding-top: var(--header-h); }
.sidebar {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w); z-index: 30;
  display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--border);
}
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 20px 20px 32px; overscroll-behavior: contain; scrollbar-width: thin; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 32px; padding: 5px 16px; margin: 1px 0;
  border-radius: 12px; font-size: 14px; line-height: 1.45; color: var(--nav); transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--bg-soft); color: var(--text-strong); }
.nav-item.active { color: var(--primary); background: color-mix(in srgb, var(--primary) 13%, transparent); }
[data-theme='dark'] .nav-item.active { background: color-mix(in srgb, var(--primary) 16%, #000); }
.nav-icon { width: 16px; height: 16px; display: inline-flex; flex: none; color: var(--muted); }
.nav-item.active .nav-icon { color: var(--primary); }
.nav-icon .icon { width: 16px; height: 16px; }
.nav-icon .icon-lucide { stroke-width: 2; }
.nav-top .nav-item { font-size: 14px; }
.nav-divider { height: 1px; background: var(--border); margin: 16px 0 20px; }
.nav-group { margin-top: 20px; }
.nav-section-title + .nav-group, .nav-section-title + .nav-item { margin-top: 0; }
.nav-group-title {
  display: flex; align-items: center; gap: 8px; padding: 0 16px; margin-bottom: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-strong); line-height: 1.4;
}
.nav-group-title .nav-icon { color: var(--text-strong); }
.nav-section-title {
  display: flex; align-items: center; gap: 12px; padding: 0 16px; margin-bottom: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.nav-section-icon { width: 16px; height: 16px; display: inline-flex; flex: none; color: var(--muted); }
.nav-section-icon .icon { width: 16px; height: 16px; }
.nav-section-icon .icon-lucide { stroke-width: 2; }
.nav-sub summary { list-style: none; cursor: pointer; }
.nav-sub summary::-webkit-details-marker { display: none; }
.nav-sub summary > span:not(.nav-icon) { flex: 1; }
.nav-chev { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; }
.nav-sub[open] > summary .nav-chev { transform: rotate(90deg); }
.nav-sub ul { margin-left: 23px !important; padding-left: 8px !important; border-left: 1px solid var(--border); }
.nav-sub ul .nav-item { padding-left: 12px; }

.sidebar-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 20px 12px 36px; border-top: 1px solid var(--border); font-size: 13px;
}
.role-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; }
.role-badge .icon { width: 14px; height: 14px; }
.role-hr { color: var(--primary); }
.signout { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.signout:hover { color: var(--text-strong); background: var(--bg-soft); }
.signout .icon { width: 14px; height: 14px; }
.scrim { display: none; }

/* ------------------------------------------------------------------- main -- */
.main { position: relative; margin-left: var(--sidebar-w); min-height: calc(100vh - var(--header-h)); isolation: isolate; }
.glow {
  position: absolute; inset: 0 0 auto 0; height: 1000px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 22% 0%, color-mix(in srgb, var(--primary) var(--glow), transparent), transparent 75%),
    radial-gradient(ellipse 45% 40% at 70% 10%, color-mix(in srgb, var(--primary) calc(var(--glow) * .55), transparent), transparent 75%);
}
.login-body .glow { position: fixed; height: 100vh;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, color-mix(in srgb, var(--primary) var(--glow), transparent), transparent 75%); }
.main-inner {
  display: flex; align-items: flex-start; gap: var(--gap);
  max-width: calc(var(--gap) + var(--content-w) + var(--gap) + var(--toc-w) + 80px);
  margin: 0 auto; padding: 40px 0 0 var(--gap);
}
.no-toc .main-inner { max-width: calc(var(--gap) * 2 + var(--content-w) + 160px); }
.page { flex: 0 1 var(--content-w); min-width: 0; }
.no-toc .page { flex-basis: calc(var(--content-w) + 160px); }

.eyebrow { font-size: 14px; font-weight: 600; color: var(--primary); line-height: 1.5; margin-bottom: 8px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-header h1 {
  margin: 0; font-size: 2.25rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.022em; color: var(--text-strong);
  overflow-wrap: anywhere;
}
.description { margin: 12px 0 0; font-size: 18px; line-height: 1.6; color: var(--muted); }

.copy-page { position: relative; display: inline-flex; flex: none; height: 34px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.copy-page button { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--text-strong); border-radius: 11px; }
.copy-page button:hover { background: var(--bg-soft); }
.copy-page .icon { width: 15px; height: 15px; }
.copy-page-main { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.copy-page-more { border-left: 1px solid var(--border) !important; padding: 0 9px !important; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.copy-page-more .icon { color: var(--muted); }
.copy-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; padding: 6px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
.copy-menu > * { display: flex !important; align-items: flex-start !important; gap: 10px !important; width: 100%; padding: 8px 10px !important; border-radius: 10px !important; text-align: left; height: auto; }
.copy-menu > *:hover { background: var(--bg-soft); }
.copy-menu .icon { margin-top: 3px; color: var(--muted); }
.copy-menu span { display: flex; flex-direction: column; line-height: 1.4; }
.copy-menu strong { font-size: 14px; font-weight: 500; color: var(--text-strong); }
.copy-menu small { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ prose -- */
.prose { margin-top: 32px; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 1.25em 0; }
.prose strong { color: var(--text-strong); font-weight: 600; }
.prose a:not(.card):not(.tile):not(.anchor):not(.btn) {
  color: var(--text-strong); font-weight: 600; text-decoration: none;
  border-bottom: 1.5px solid var(--primary); transition: border-color .15s, color .15s;
}
.prose a:not(.card):not(.tile):not(.anchor):hover { border-bottom-width: 2px; }
.prose h2, .prose h3, .prose h4 { color: var(--text-strong); position: relative; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2 { font-size: 1.5rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.012em; margin: 2.5rem 0 1rem; }
.prose h3 { font-size: 1.25rem; line-height: 1.4; font-weight: 600; margin: 2rem 0 .75rem; }
.prose h4 { font-size: 1rem; line-height: 1.5; font-weight: 600; margin: 1.5rem 0 .5rem; }
.anchor {
  position: absolute; left: -32px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center; opacity: 0; color: var(--muted);
  border: 1px solid var(--border); background: var(--bg); transition: opacity .12s;
}
.anchor .i, .anchor .icon { width: 12px; height: 12px; }
.heading:hover .anchor, .anchor:focus { opacity: 1; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }
.prose ul, .prose ol { padding-left: 1.5rem; margin: 1.25em 0; }
.prose li { margin: .5em 0; padding-left: .25em; }
.prose li::marker { color: var(--muted); }
.prose li > p { margin: .5em 0; }
.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul { margin: .5em 0; }
.prose blockquote { margin: 1.5em 0; padding: 0 0 0 1rem; border-left: 3px solid var(--border-strong); color: var(--muted); }
.prose :not(pre) > code {
  font: 500 .875em var(--mono); color: var(--text-strong); background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 6px; padding: .12em .38em; overflow-wrap: anywhere;
}
.prose img { border-radius: 12px; height: auto; }
.prose video { max-width: 100%; border-radius: 12px; }
.prose iframe { max-width: 100%; border: 0; border-radius: 12px; }
.prose kbd { font: 500 .8em var(--mono); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; padding: .1em .4em; color: var(--text-strong); }
.prose mark { background: color-mix(in srgb, var(--primary) 25%, transparent); color: var(--text-strong); border-radius: 3px; padding: 0 2px; }
.prose details:not(.accordion):not(.expandable) { margin: 1em 0; }

.table-wrap { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--border); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.prose th { text-align: left; font-weight: 600; color: var(--text-strong); background: var(--bg-soft); }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }

/* -------------------------------------------------------------- callouts -- */
.callout {
  --c: #0ea5e9; display: flex; gap: 12px; margin: 1.25em 0; padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--c) 8%, transparent); font-size: 15px; line-height: 1.7;
  color: color-mix(in srgb, var(--c) 30%, var(--text-strong));
}
.callout-note { --c: #0ea5e9; } .callout-info { --c: #a1a1aa; } .callout-tip { --c: #10b981; }
.callout-warning { --c: #f59e0b; } .callout-check { --c: #22c55e; } .callout-danger { --c: #ef4444; }
.callout-custom { --c: var(--callout, var(--primary)); }
[data-theme='light'] .callout-info { --c: #71717a; }
[data-theme='light'] .callout { color: color-mix(in srgb, var(--c) 55%, #18181b); }
.callout-icon { width: 16px; height: 16px; flex: none; margin-top: 5px; color: var(--c); }
.callout-body { min-width: 0; flex: 1; }
.callout-body > :first-child { margin-top: 0; }
.callout-body > :last-child { margin-bottom: 0; }
.callout-body p { margin: .5em 0; }
.callout a { color: inherit !important; border-bottom-color: currentColor !important; }
.callout pre { white-space: pre-wrap; font-size: 13px; }

/* ----------------------------------------------------------------- cards -- */
.card-group { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 16px; margin: 1.5em 0; }
.card-group > .card { margin: 0; }
.card {
  display: block; position: relative; margin: 1.25em 0; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg); transition: border-color .15s; font-weight: 400 !important;
}
.card-link:hover { border-color: var(--primary); }
.card-img { display: block; width: 100%; border-radius: 0 !important; }
.card-content { padding: 20px 24px; position: relative; }
.card-icon { width: 22px; height: 22px; color: var(--muted); margin-bottom: 14px; }
.card-icon img { width: 22px; height: 22px; }
.card-title { font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--text-strong); }
.card-desc { font-size: 15px; line-height: 1.65; color: var(--text); margin-top: 4px; }
.card-desc > :first-child { margin-top: 0; } .card-desc > :last-child { margin-bottom: 0; }
.card-cta { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--primary); }
.card-arrow { position: absolute; top: 20px; right: 20px; width: 16px; height: 16px; color: var(--muted); }
.card-horizontal .card-content { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.card-horizontal .card-icon { margin: 0; }
.card-horizontal .card-arrow { position: static; margin-left: auto; }
.tile { display: block; }
.tile-media { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; background: var(--bg-soft); }
.panel { border-left: 1px solid var(--border); padding-left: 1rem; }

/* ----------------------------------------------------------------- steps -- */
.steps { margin: 1.75em 0; }
.step { position: relative; display: flex; gap: 16px; padding-bottom: 24px; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before {
  content: ''; position: absolute; left: 13.5px; top: 36px; bottom: 6px; width: 1px; background: var(--border-strong);
}
.step-marker {
  width: 28px; height: 28px; flex: none; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-hover); color: var(--text-strong); font-size: 13px; font-weight: 600; line-height: 1;
}
.step-marker .i { width: 14px; height: 14px; }
.step-body { min-width: 0; flex: 1; padding-top: 1px; }
.step-title { font-weight: 600; color: var(--text-strong); line-height: 1.6; }
.steps-h2 .step-title { font-size: 1.5rem; } .steps-h3 .step-title { font-size: 1.25rem; }
.step-content > :first-child { margin-top: 8px; }
.step-content > :last-child { margin-bottom: 0; }
.step-content:empty { display: none; }

/* ------------------------------------------------------------ accordions -- */
.accordion, .expandable { margin: 1em 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion summary, .expandable summary {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none;
  color: var(--text-strong); font-weight: 500; line-height: 1.5;
}
.accordion summary::-webkit-details-marker, .expandable summary::-webkit-details-marker { display: none; }
.accordion summary:hover, .expandable summary:hover { background: var(--bg-soft); }
.chev { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; flex: none; }
details[open] > summary .chev { transform: rotate(90deg); }
.acc-icon { width: 16px; height: 16px; color: var(--muted); }
.acc-head { display: flex; flex-direction: column; }
.acc-desc { font-size: 14px; color: var(--muted); font-weight: 400; }
.accordion-body { padding: 2px 18px 16px 42px; }
.accordion-body > :first-child { margin-top: 0; } .accordion-body > :last-child { margin-bottom: 0; }
.accordion-group { margin: 1.25em 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion-group .accordion { margin: 0; border: 0; border-radius: 0; }
.accordion-group .accordion + .accordion { border-top: 1px solid var(--border); }
.expandable { border-radius: 12px; }
.expandable summary { padding: 8px 14px; font-size: 14px; }
.expandable-body { padding: 0 14px 4px; border-top: 1px solid var(--border); }

/* ------------------------------------------------------------------ tabs -- */
.tabs { margin: 1.5em 0; }
.tab-list { display: flex; gap: 22px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; margin-bottom: -1px; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent;
}
.tab-btn:hover { color: var(--text-strong); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn .i { width: 14px; height: 14px; }
.tab-panel { padding-top: 4px; }
.tab-panel > :first-child { margin-top: 1em; }

/* ------------------------------------------------------------------ code -- */
.code-block, .code-group { position: relative; margin: 1.25em 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.code-header, .code-tabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px 0 16px; min-height: 40px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.code-tabs { justify-content: flex-start; gap: 18px; }
.code-tabs .copy-code { margin-left: auto; }
.code-tabs .tab-btn { font-size: 13px; padding: 10px 0; }
.code-title { font-weight: 500; color: var(--text-strong); }
.code-group .tab-panel { padding: 0; }
.code-group .tab-panel > :first-child { margin-top: 0; }
.prose pre {
  margin: 0; padding: 14px 16px; overflow-x: auto; background: transparent !important;
  font: 13.5px/1.7 var(--mono); tab-size: 2;
}
.prose pre code { font: inherit; background: none; border: 0; padding: 0; }
.shiki, .shiki span { color: var(--shiki-light); }
[data-theme='dark'] .shiki, [data-theme='dark'] .shiki span { color: var(--shiki-dark); }
.copy-code { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--muted); }
.copy-code:hover { color: var(--text-strong); background: var(--bg-hover); }
.copy-code .i, .copy-code .icon { width: 14px; height: 14px; }
.copy-code.floating { position: absolute; top: 8px; right: 8px; opacity: 0; background: var(--code-bg); border: 1px solid var(--border); transition: opacity .12s; }
.code-block:hover .copy-code.floating, .copy-code.floating:focus { opacity: 1; }
.copy-code.copied { color: #22c55e; }

/* ----------------------------------------------------------- misc blocks -- */
.frame { margin: 1.5em 0; }
.frame-inner { padding: 8px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-soft); }
.frame-inner img, .frame-inner video { display: block; width: 100%; border-radius: 12px; margin: 0; }
.frame-inner > p { margin: 0; }
.frame figcaption, .frame-hint { font-size: 14px; color: var(--muted); text-align: center; margin-top: 10px; }
.frame-hint { text-align: left; margin: 0 0 10px; }
.inline-icon { display: inline-flex; vertical-align: -0.125em; width: 1em; height: 1em; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; vertical-align: middle;
  font-size: 12px; font-weight: 600; line-height: 1.6; color: var(--badge, var(--primary));
  background: color-mix(in srgb, var(--badge, var(--primary)) 14%, transparent);
}
.badge-lg { font-size: 14px; padding: 2px 10px; } .badge-sm { font-size: 11px; padding: 0 6px; }
.tooltip { position: relative; border-bottom: 1px dashed var(--muted); cursor: help; }
.tooltip::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: 260px; padding: 6px 10px; border-radius: 8px; font-size: 13px; line-height: 1.5; font-weight: 400;
  background: var(--text-strong); color: var(--bg); opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 10;
}
.tooltip:hover::after, .tooltip:focus::after { opacity: 1; }
.update { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; padding: 32px 0; border-bottom: 1px solid var(--border); }
.update-label { display: inline-block; font-size: 13px; font-weight: 600; color: var(--primary); background: color-mix(in srgb, var(--primary) 13%, transparent); padding: 2px 10px; border-radius: 8px; }
.update-desc { font-size: 13px; color: var(--muted); margin-top: 8px; }
.update-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.update-body > :first-child { margin-top: 0; }
.field { padding: 14px 0; border-bottom: 1px solid var(--border); }
.field-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.field-name { color: var(--primary) !important; font-weight: 600 !important; }
.field-type { color: var(--muted); font-family: var(--mono); }
.field-required { color: #ef4444; font-weight: 500; }
.field-default, .field-deprecated { color: var(--muted); }
.field-body { font-size: 15px; }
.field-body > :first-child { margin-top: 6px; } .field-body > :last-child { margin-bottom: 0; }
.unknown-component { display: contents; }
.prose a.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; margin: .25em 0; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 600; border: 0; transition: filter .15s;
}
.prose a.btn:hover { filter: brightness(1.1); border: 0; }
.prose a.btn .inline-icon { width: 15px; height: 15px; vertical-align: 0; }

/* ----------------------------------------------------------- pager/footer -- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.pager-card {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s;
}
.pager-card:hover { border-color: var(--primary); }
.pager-next { text-align: right; align-items: flex-end; grid-column: 2; }
.pager-title { font-weight: 500; color: var(--text-strong); line-height: 1.4; }
.pager-dir { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.pager-dir .icon { width: 14px; height: 14px; }
.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding: 32px 0 48px;
  border-top: 1px solid var(--border); font-size: 14px; color: var(--muted);
}

/* -------------------------------------------------------------------- toc -- */
.toc { position: sticky; top: calc(var(--header-h) + 40px); flex: 0 0 var(--toc-w); max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; scrollbar-width: none; padding-bottom: 24px; }
.toc-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--text-strong); margin-bottom: 10px; }
.toc-title .icon { width: 15px; height: 15px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a { display: block; margin-left: -1px; padding: 5px 0 5px 16px; border-left: 1.5px solid transparent; font-size: 14px; line-height: 1.55; color: var(--nav); transition: color .12s; }
.toc a:hover { color: var(--text-strong); }
.toc a.active { color: var(--primary); border-left-color: var(--primary); }
.toc-l3 a { padding-left: 30px; }

/* ----------------------------------------------------------------- search -- */
.search-modal { position: fixed; inset: 0; z-index: 100; }
.search-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.search-panel {
  position: relative; width: min(640px, calc(100vw - 32px)); margin: 12vh auto 0; background: var(--bg-elev);
  border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 54px; border-bottom: 1px solid var(--border); }
.search-field .icon { width: 18px; height: 18px; color: var(--muted); }
.search-field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font: 16px var(--font); color: var(--text-strong); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field kbd { cursor: pointer; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.search-results { max-height: min(60vh, 520px); overflow-y: auto; padding: 8px; }
.search-results:empty { display: none; }
.sr-item { display: block; padding: 10px 12px; border-radius: 12px; }
.sr-item.sel { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.sr-crumb { font-size: 12px; color: var(--muted); line-height: 1.4; }
.sr-title { font-size: 15px; font-weight: 600; color: var(--text-strong); line-height: 1.45; }
.sr-item.sel .sr-title { color: var(--primary); }
.sr-snip { font-size: 13px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-snip mark { background: none; color: var(--text-strong); font-weight: 600; }
.sr-empty { padding: 28px 12px; text-align: center; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ login -- */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; isolation: isolate; }
.login-body .glow { z-index: -1; }
.login-top { position: fixed; top: 16px; right: 20px; }
.login { width: min(380px, 100%); text-align: center; }
.login-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.login-logo-img { height: 48px; width: auto; }
.login-logo-img-text { font-size: 22px; font-weight: 700; color: var(--text-strong); }
.login h1 { margin: 0; font-size: 1.6rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.02em; color: var(--text-strong); }
.login-sub { margin: 8px 0 28px; color: var(--muted); font-size: 15px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-field {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--bg-elev); transition: border-color .15s;
}
.login-field:focus-within { border-color: var(--primary); }
.login-field .icon { width: 16px; height: 16px; color: var(--muted); }
.login-field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font: 15px var(--font); color: var(--text-strong); }
.login-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px;
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 600; transition: filter .15s;
}
.login-btn:hover { filter: brightness(1.1); }
.login-btn .icon { width: 16px; height: 16px; }
.login-error { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 14px; color: #f87171; }
.login-error .icon { width: 15px; height: 15px; }
.login-foot { margin-top: 28px; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ------------------------------------------------------------- responsive -- */
@media (max-width: 1340px) {
  :root { --gap: 56px; }
}
@media (max-width: 1240px) {
  .toc { display: none; }
  .main-inner { max-width: calc(var(--gap) * 2 + var(--content-w) + 120px); }
  .page { flex-basis: calc(var(--content-w) + 120px); }
}
@media (max-width: 1100px) {
  .search-trigger { width: 280px; }
  .nav-link { display: none; }
}
@media (max-width: 1023px) {
  .menu-btn { display: inline-flex; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: min(var(--sidebar-w), 86vw); z-index: 60; top: 0; }
  .sidebar-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .sidebar-open .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .5); }
  .main { margin-left: 0; }
  .main-inner { padding: 32px 24px 0; max-width: calc(var(--content-w) + 120px + 48px); }
  .topbar { padding: 0 16px 0 12px; grid-template-columns: auto 1fr auto; }
}
@media (max-width: 720px) {
  .search-trigger { display: none; }
  .search-mobile { display: inline-flex; }
  .main-inner { padding: 24px 16px 0; }
  .page-header h1 { font-size: 1.875rem; }
  .title-row { flex-wrap: wrap; align-items: flex-start; }
  .copy-page-main span { display: none; }
  .card-group { grid-template-columns: 1fr; }
  .update { grid-template-columns: 1fr; gap: 12px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
  .anchor { display: none; }
  .nav-primary { font-size: 14px; height: 32px; padding: 0 8px 0 10px; }
}
