* { box-sizing: border-box; }

body { min-height: 100vh; }

button { font: inherit; }

.docs-shell { min-height: 100vh; }

.docs-topbar {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1220px, calc(100% - 40px));
  min-height: 65px;
  margin: 14px auto 0;
  padding: 10px 12px 10px 17px;
}

.docs-brand-group,
.docs-brand,
.docs-top-actions,
.api-status,
.docs-brand-divider,
.hero-actions,
.doc-card-head,
.view-heading,
.credit-example-grid,
.docs-mobile-bar {
  display: flex;
  align-items: center;
}

.docs-brand-group { gap: 12px; min-width: 0; }
.docs-brand { min-width: 0; text-decoration: none; }
.docs-brand-mark.noah-brand-mark { width: 31px; height: 31px; }
.docs-brand-context { color: var(--noah-soft); font: 500 10px var(--noah-font-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.docs-top-actions { gap: 8px; }
.docs-nav-link { padding: 8px 9px; border-radius: 9px; color: var(--noah-muted); font-size: 12px; font-weight: 700; transition: color .2s ease, background .2s ease; }
.docs-nav-link:hover { color: var(--noah-text); background: rgba(255,255,255,.05); }
.docs-account-link { min-height: 38px; padding: 8px 13px; border-radius: 11px; font-size: 12px; }

.api-status { gap: 7px; margin-right: 5px; color: var(--noah-muted); font: 10px var(--noah-font-mono); white-space: nowrap; }
.api-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--noah-amber); box-shadow: 0 0 10px rgba(255, 157, 103, .5); }
.api-status.online i { background: var(--noah-lime); box-shadow: 0 0 10px rgba(34, 197, 94, .6); }
.api-status.error i { background: var(--noah-rose); box-shadow: 0 0 10px rgba(251, 113, 133, .6); }

.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 30px; width: min(1220px, calc(100% - 40px)); margin: 26px auto 0; padding-bottom: 72px; }
.docs-sidebar { position: sticky; top: 98px; align-self: start; padding: 14px; }
.docs-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 15px; color: var(--noah-soft); font: 600 10px var(--noah-font-mono); letter-spacing: .11em; text-transform: uppercase; }
.docs-close { display: none; border: 0; color: var(--noah-muted); background: transparent; }
.docs-close svg, .docs-menu svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.docs-nav { display: grid; gap: 4px; }
.docs-nav-item { display: flex; align-items: center; gap: 10px; min-height: 39px; padding: 9px 10px; border: 1px solid transparent; border-radius: 11px; color: var(--noah-muted); background: transparent; font-size: 12px; font-weight: 700; text-align: left; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s var(--noah-ease); }
.docs-nav-item:hover { color: var(--noah-text); border-color: var(--noah-border); background: rgba(255,255,255,.04); transform: translateX(2px); }
.docs-nav-item.active { color: #07110d; background: linear-gradient(135deg, var(--noah-lime), var(--noah-cyan)); box-shadow: 0 9px 20px rgba(34, 197, 94, .13); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; }
.nav-dot.lime { background: var(--noah-lime); }.nav-dot.cyan { background: var(--noah-cyan); }.nav-dot.amber { background: var(--noah-amber); }
.docs-sidebar-foot { display: grid; gap: 6px; margin: 22px 5px 4px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.docs-sidebar-foot span { color: var(--noah-soft); font: 600 9px var(--noah-font-mono); letter-spacing: .1em; text-transform: uppercase; }
.docs-sidebar-foot strong { color: var(--noah-text); font: 600 11px var(--noah-font-mono); }
.docs-sidebar-foot a { margin-top: 5px; color: var(--noah-cyan); font-size: 11px; font-weight: 700; }
.docs-sidebar-foot a:hover { color: var(--noah-lime); }

.docs-content { min-width: 0; padding: 30px 0 0; }
.docs-view { display: none; contain: layout style; }
.docs-view.active { display: block; }
.docs-mobile-bar { display: none; }

.docs-hero { max-width: 780px; margin-bottom: 33px; }
.docs-hero .noah-kicker, .view-heading .noah-kicker { margin-bottom: 15px; }
.docs-hero .noah-kicker i, .view-heading .noah-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--noah-lime); box-shadow: 0 0 10px var(--noah-lime); }
.docs-hero h1, .view-heading h1 { margin: 0; color: var(--noah-text); font: 700 clamp(38px, 5.3vw, 66px) / .96 var(--noah-font-mono); letter-spacing: -.09em; }
.docs-hero h1 em { color: var(--noah-cyan); font-style: normal; }
.docs-hero p, .view-heading p { max-width: 720px; margin: 20px 0 0; color: var(--noah-muted); font-size: 15px; line-height: 1.75; }
.hero-actions { gap: 10px; margin-top: 24px; }
.hero-actions .noah-button { min-height: 42px; padding: 10px 15px; font-size: 12px; }

.docs-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.docs-stat { padding: 17px; transition: transform .22s var(--noah-ease), border-color .22s ease; }
.docs-stat:hover, .doc-card:hover, .doc-step:hover, .credit-example:hover, .sse-card:hover { transform: translateY(-3px); border-color: var(--noah-border-strong); }
.docs-stat span { display: block; margin-bottom: 12px; color: var(--noah-soft); font: 600 9px var(--noah-font-mono); letter-spacing: .1em; text-transform: uppercase; }
.docs-stat strong { display: block; overflow: hidden; margin-bottom: 7px; color: var(--noah-text); font: 700 15px var(--noah-font-mono); letter-spacing: -.05em; text-overflow: ellipsis; white-space: nowrap; }
.docs-stat small { color: var(--noah-muted); font-size: 11px; line-height: 1.5; }

.doc-card { margin-top: 14px; padding: 21px; transition: transform .22s var(--noah-ease), border-color .22s ease; }
.doc-card-head { justify-content: space-between; gap: 14px; min-width: 0; }
.doc-card-head > div { display: flex; align-items: center; min-width: 0; gap: 10px; }
.doc-card-head code, .view-heading code, .doc-card p code { color: var(--noah-text); font: 600 13px var(--noah-font-mono); white-space: nowrap; }
.method { display: inline-grid; place-items: center; min-width: 46px; padding: 5px 7px; border: 1px solid var(--noah-border); border-radius: 7px; font: 700 9px var(--noah-font-mono); letter-spacing: .04em; }
.method.get { color: #b8ffcf; border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.1); }
.method.post { color: #bbf7ff; border-color: rgba(134,232,220,.3); background: rgba(134,232,220,.1); }
.copy-button { flex: 0 0 auto; min-height: 31px; padding: 6px 9px; border: 1px solid var(--noah-border); border-radius: 9px; color: var(--noah-cyan); background: rgba(255,255,255,.03); font: 600 10px var(--noah-font-mono); transition: color .2s ease, border-color .2s ease, background .2s ease; }
.copy-button:hover { color: var(--noah-lime); border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); }
.doc-card p { margin: 15px 0 17px; color: var(--noah-muted); font-size: 13px; line-height: 1.7; }
.doc-card p code { color: var(--noah-cyan); font-size: 11px; }
pre { overflow-x: auto; margin: 0; padding: 15px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; color: #d8ffe6; background: rgba(0,0,0,.25); }
pre code { font: 500 11px/1.7 var(--noah-font-mono); white-space: pre; }

.docs-step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.doc-step { display: flex; flex-direction: column; min-height: 208px; padding: 19px; transition: transform .22s var(--noah-ease), border-color .22s ease; }
.doc-step > span { display: grid; place-items: center; width: 31px; height: 31px; margin-bottom: 27px; border-radius: 9px; color: #07110d; background: var(--noah-lime); font: 700 10px var(--noah-font-mono); }
.doc-step:nth-child(2) > span { background: var(--noah-cyan); }.doc-step:nth-child(3) > span { background: var(--noah-amber); }
.doc-step h2 { margin: 0 0 8px; color: var(--noah-text); font: 700 15px var(--noah-font-mono); letter-spacing: -.05em; }
.doc-step p { flex: 1; margin: 0; color: var(--noah-muted); font-size: 11px; line-height: 1.65; }
.text-doc-link { align-self: flex-start; margin-top: 16px; padding: 0; border: 0; color: var(--noah-cyan); background: transparent; font-size: 11px; font-weight: 700; }
.text-doc-link:hover { color: var(--noah-lime); }

.view-heading { display: block; margin: 7px 0 28px; }
.view-heading h1 { font-size: clamp(34px, 4.5vw, 56px); }
.credit-example-grid { align-items: stretch; gap: 13px; margin-bottom: 15px; }
.credit-example { flex: 1; min-height: 180px; padding: 20px; transition: transform .22s var(--noah-ease), border-color .22s ease; }
.credit-label { display: inline-flex; margin-bottom: 22px; padding: 5px 8px; border-radius: 999px; font: 600 9px var(--noah-font-mono); letter-spacing: .05em; text-transform: uppercase; }
.credit-label.lime { color: #b8ffcf; background: rgba(34,197,94,.1); }.credit-label.cyan { color: #bbf7ff; background: rgba(134,232,220,.1); }
.credit-example strong { display: block; margin-bottom: 9px; color: var(--noah-text); font: 700 18px var(--noah-font-mono); letter-spacing: -.06em; }.credit-example p { margin: 0; color: var(--noah-muted); font-size: 12px; line-height: 1.6; }
.callout { display: flex; align-items: flex-start; gap: 9px; padding: 14px 15px; margin-top: 14px; border: 1px solid rgba(255,157,103,.25); border-radius: 14px; color: #ffd1af; background: rgba(255,157,103,.08); font-size: 12px; line-height: 1.55; }.callout strong { flex: 0 0 auto; }
.sse-card { display: grid; gap: 11px; margin-top: 14px; padding: 19px; transition: transform .22s var(--noah-ease), border-color .22s ease; }.sse-card > div { display: flex; gap: 14px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.08); }.sse-card code { min-width: 165px; color: var(--noah-cyan); font: 600 11px var(--noah-font-mono); }.sse-card div span { color: var(--noah-muted); font-size: 12px; }

.docs-scrim { display: none; }

html.docs-drawer-open, body.docs-drawer-open { overflow: hidden; overscroll-behavior: none; }

@media (max-width: 900px) {
  .docs-topbar, .docs-layout { width: min(100% - 26px, 720px); }
  .docs-layout { display: block; margin-top: 14px; }
  .docs-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(300px, calc(100% - 36px)); border-top: 0; border-bottom: 0; border-left: 0; border-radius: 0; transform: translateX(-100%); transition: transform .3s var(--noah-ease); }
  .docs-sidebar.open { transform: none; }
  .docs-close { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
  .docs-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
  .docs-scrim.open { display: block; }
  .docs-content { padding-top: 15px; }
  .docs-mobile-bar { display: flex; justify-content: space-between; padding: 9px 0 20px; color: var(--noah-soft); font: 600 10px var(--noah-font-mono); text-transform: uppercase; letter-spacing: .08em; }
  .docs-menu { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--noah-border); border-radius: 9px; color: var(--noah-text); background: rgba(255,255,255,.03); font: 600 10px var(--noah-font-mono); }
}

@media (max-width: 620px) {
  .docs-topbar { position: relative; top: 0; display: block; margin-top: 12px; padding: 13px; }
  .docs-top-actions { margin-top: 13px; flex-wrap: wrap; }
  .api-status { display: none; }
  .docs-nav-link { padding: 7px 6px; font-size: 11px; }
  .docs-account-link { margin-left: auto; }
  .docs-brand-context { display: none; }
  .docs-layout { width: min(100% - 24px, 520px); }
  .docs-hero h1 { font-size: clamp(37px, 12vw, 55px); }
  .docs-hero p, .view-heading p { font-size: 13px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .docs-stat-grid, .docs-step-grid { grid-template-columns: 1fr; }
  .credit-example-grid { display: grid; grid-template-columns: 1fr; }
  .doc-card { padding: 16px; }
  .doc-card-head { align-items: flex-start; }
  .doc-card-head > div { display: grid; gap: 7px; }
  .doc-card-head code { overflow: hidden; max-width: 210px; text-overflow: ellipsis; }
  pre { padding: 12px; }
  pre code { font-size: 10px; }
  .sse-card > div { display: grid; gap: 5px; }.sse-card code { min-width: 0; }
}

/* API reference follows the compact product surface used by dashboard/admin. */
.docs-topbar {
  top: 0;
  width: min(1160px, calc(100% - 44px));
  min-height: 60px;
  margin: 0 auto;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  background: rgba(22,24,29,.94);
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 26px; width: min(1160px, calc(100% - 44px)); margin-top: 20px; }
.docs-sidebar, .doc-card, .docs-stat, .doc-step, .credit-example, .sse-card { background: #20242c; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.docs-sidebar { border-radius: 14px; }
.docs-nav-item.active { color: var(--noah-text); background: rgba(255,255,255,.09); box-shadow: none; }
.docs-hero h1, .view-heading h1 { font-family: var(--noah-font-sans); letter-spacing: -.06em; }
.docs-hero h1 em { color: var(--noah-text); }
.docs-account-link { color: #121418 !important; background: var(--noah-lime) !important; box-shadow: none !important; }
.docs-stat:hover, .doc-card:hover, .doc-step:hover, .credit-example:hover, .sse-card:hover { transform: translate3d(0,-2px,0); }
@media (max-width: 900px) {
  .docs-topbar, .docs-layout { width: min(100% - 26px, 720px); }
}
