:root {
  color-scheme: dark;
  --bg: #07101f;
  --surface: #0d1930;
  --surface-2: #12213d;
  --border: #263a5e;
  --text: #edf4ff;
  --muted: #a8b8d3;
  --blue: #76a8ff;
  --cyan: #55d8d2;
  --green: #69d39d;
  --amber: #f4c46c;
  --red: #ff8d9a;
  --shadow: 0 18px 55px rgba(0, 0, 0, .25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: radial-gradient(circle at 70% -10%, #17315d 0, transparent 35%), var(--bg); color: var(--text); line-height: 1.65; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #b7d0ff; }
button, input, select { font: inherit; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { overflow-wrap: anywhere; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 20; background: white; color: #081322; padding: .7rem 1rem; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }

.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 3.5rem); border-bottom: 1px solid var(--border); background: rgba(7, 16, 31, .92); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #06111e; font-weight: 900; font-size: 1.35rem; }
.brand span:last-child { display: grid; line-height: 1.15; }
.brand small { color: var(--muted); margin-top: .2rem; }
.topbar nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.topbar nav a { color: var(--muted); text-decoration: none; font-weight: 650; }

.searchbar { padding: 1rem clamp(1rem, 4vw, 3.5rem); border-bottom: 1px solid var(--border); background: #0a1528; }
.searchbar label { display: block; font-weight: 750; margin-bottom: .45rem; }
.search-row { display: flex; gap: .6rem; max-width: 1000px; }
.search-row input { width: 100%; background: #07101f; border: 1px solid #355079; color: var(--text); border-radius: .7rem; padding: .75rem .9rem; }
.search-row input:focus, select:focus, button:focus, a:focus { outline: 3px solid rgba(118, 168, 255, .4); outline-offset: 2px; }
button, .button { border: 1px solid #3a5277; border-radius: .65rem; padding: .65rem .9rem; background: #152744; color: var(--text); cursor: pointer; text-decoration: none; font-weight: 720; }
button:hover, .button:hover { background: #1c3458; color: white; }
.button.primary { color: #07101f; background: linear-gradient(135deg, var(--blue), var(--cyan)); border: 0; }
.muted { color: var(--muted); }

.layout { display: grid; grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); max-width: 1540px; margin: 0 auto; }
.sidebar { padding: 1.5rem 1.2rem 2rem; border-right: 1px solid var(--border); min-height: calc(100vh - 145px); }
.sidebar nav { position: sticky; top: 105px; max-height: calc(100vh - 130px); overflow: auto; padding-right: .5rem; }
.nav-group { margin-bottom: 1.35rem; }
.nav-group strong { display: block; color: var(--muted); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .4rem; }
.nav-group a { display: block; color: #cbd8ed; text-decoration: none; padding: .28rem 0; }
.nav-group a:hover { color: white; }
.release-card { margin-top: 2rem; border: 1px solid var(--border); border-radius: .8rem; background: var(--surface); padding: 1rem; font-size: .9rem; }
.release-card code { display: block; color: var(--cyan); margin: .35rem 0; }

main { min-width: 0; padding: clamp(1.2rem, 4vw, 3.5rem); }
.hero { border: 1px solid var(--border); border-radius: 1.2rem; padding: clamp(1.4rem, 4vw, 3.2rem); background: linear-gradient(145deg, rgba(25, 50, 91, .88), rgba(11, 25, 48, .95)); box-shadow: var(--shadow); }
.hero h1 { max-width: 900px; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.03; letter-spacing: -.04em; margin: .4rem 0 1rem; }
.hero > p { max-width: 850px; font-size: 1.12rem; color: #c6d5ed; }
.eyebrow { color: var(--cyan); font-size: .82rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 2rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; gap: .75rem; }
.facts div { border-top: 1px solid #385278; padding-top: .7rem; min-width: 0; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: .25rem 0 0; }

.guide { padding: 2.5rem 0; border-bottom: 1px solid var(--border); }
.guide h2, .api-section h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.025em; margin: .3rem 0 .65rem; }
.guide h3 { margin: 1.8rem 0 .45rem; font-size: 1.2rem; }
.guide-intro { color: #c2d1e9; max-width: 900px; font-size: 1.05rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.card { padding: 1.05rem; border: 1px solid var(--border); border-radius: .85rem; background: var(--surface); }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.steps { counter-reset: steps; list-style: none; padding: 0; }
.steps li { position: relative; padding: .2rem 0 1.25rem 3rem; }
.steps li::before { counter-increment: steps; content: counter(steps); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: #1d3b67; color: var(--cyan); font-weight: 850; }
.callout, .notice { border-left: 4px solid var(--blue); background: #0e203d; padding: .85rem 1rem; border-radius: .3rem .7rem .7rem .3rem; margin: 1rem 0; }
.callout.warning { border-color: var(--amber); }
.callout.success { border-color: var(--green); }
.code-block { position: relative; margin: .9rem 0; }
pre { margin: 0; background: #030a14; border: 1px solid #263c5e; color: #d9e8ff; border-radius: .75rem; padding: 1rem; overflow: auto; font-size: .9rem; line-height: 1.55; }
.copy { position: absolute; top: .55rem; right: .55rem; padding: .3rem .55rem; font-size: .8rem; background: #152947; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); padding: .75rem; }
th { color: var(--cyan); background: #0c1a31; }

.api-section { padding-top: 3rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.api-controls { min-width: 220px; }
.api-controls label { display: block; color: var(--muted); font-size: .85rem; }
select { width: 100%; color: var(--text); background: #0c1930; border: 1px solid #355079; padding: .65rem 2rem .65rem .7rem; border-radius: .6rem; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.api-group { margin: 2rem 0; }
.api-group > h3 { font-size: 1.35rem; color: var(--cyan); }
.operation { border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); margin: .75rem 0; overflow: clip; }
.operation summary { display: grid; grid-template-columns: 5.3rem minmax(220px, .9fr) minmax(240px, 1fr); align-items: center; gap: .75rem; cursor: pointer; padding: .8rem 1rem; }
.operation summary:hover { background: var(--surface-2); }
.method { display: inline-grid; place-items: center; border-radius: .4rem; padding: .22rem .45rem; color: #06101d; font-weight: 900; font-size: .8rem; }
.method-get { background: var(--cyan); }
.method-post { background: var(--green); }
.method-put, .method-patch { background: var(--amber); }
.method-delete { background: var(--red); }
.path { color: #dce9ff; font-weight: 700; overflow-wrap: anywhere; }
.summary-text { color: var(--muted); }
.operation-body { border-top: 1px solid var(--border); padding: 1rem; }
.operation-body h4 { margin: 1.25rem 0 .4rem; color: #cfe0fa; }
.badge { display: inline-block; font-size: .78rem; border: 1px solid #3a5277; border-radius: 999px; padding: .12rem .48rem; margin: .15rem; color: #c8d7ed; }
.required { color: var(--red); font-weight: 800; }
.response-code { color: var(--green); font-weight: 850; }
.schema { margin: .4rem 0; }
.schema summary { cursor: pointer; color: var(--blue); }
.empty-state { border: 1px dashed #3d5375; border-radius: .8rem; padding: 1.2rem; color: var(--muted); }
[hidden] { display: none !important; }

footer { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem clamp(1rem, 4vw, 3.5rem); border-top: 1px solid var(--border); color: var(--muted); }

@media (max-width: 900px) {
  .layout { display: block; }
  .sidebar { min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar nav { position: static; max-height: none; columns: 2; }
  .release-card { display: none; }
  .facts { grid-template-columns: 1fr; }
  .operation summary { grid-template-columns: 4.7rem 1fr; }
  .summary-text { grid-column: 2; }
}

@media (max-width: 620px) {
  .topbar { align-items: flex-start; }
  .topbar nav { display: none; }
  .sidebar { padding-block: 1rem; }
  .sidebar nav { columns: auto; max-height: 13rem; overflow-y: auto; padding-right: .75rem; }
  .section-heading, footer { display: block; }
  .api-controls { margin-top: 1rem; }
  .operation summary { grid-template-columns: 1fr; }
  .summary-text { grid-column: 1; }
  main { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
