@font-face {
  font-family: "Chalet";
  src: url("/avatar/Chalet-LondonNineteenSixty-Regular.otf") format("opentype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070a0e;
  --bg-soft: #0a0f15;
  --surface: #0e151d;
  --surface-raised: #121b25;
  --surface-hover: #17222d;
  --text: #eff8f4;
  --muted: #8fa1ac;
  --subtle: #667782;
  --line: #23313c;
  --line-strong: #344654;
  --accent: #6ef0bd;
  --accent-strong: #30c993;
  --accent-soft: rgba(110, 240, 189, .11);
  --blue: #67b8ff;
  --blue-soft: rgba(103, 184, 255, .12);
  --orange: #ffb86b;
  --danger: #ff857f;
  --code: #060a0e;
  --paper: var(--bg);
  --paper-deep: var(--surface);
  --ink: var(--text);
  --blue-dark: #0a2232;
  --mint: var(--accent);
  --white: var(--surface);
  --shadow: 0 26px 80px rgba(0, 0, 0, .35);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 34px; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 75% -10%, rgba(41, 139, 126, .2), transparent 34rem),
    radial-gradient(circle at 32% 35%, rgba(31, 83, 119, .12), transparent 42rem),
    var(--bg);
  font-family: "Chalet", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 153, 166, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 153, 166, .035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

::selection { color: #06110d; background: var(--accent); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code, pre, .route, .method, .tag {
  font-family: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  padding: 24px 18px;
  overflow: auto;
  color: var(--text);
  background: rgba(7, 11, 15, .87);
  border: 0;
  border-right: 1px solid rgba(129, 160, 173, .16);
  backdrop-filter: blur(20px) saturate(140%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 21px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  color: #06110d;
  background: linear-gradient(145deg, #97f8d3, var(--accent-strong));
  border: 0;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(48, 201, 147, .25);
  font-size: 1rem;
  font-weight: 900;
}
.brand strong {
  display: block;
  font-size: .98rem;
  letter-spacing: .01em;
}
.brand small {
  display: block;
  color: var(--muted);
  font: 600 .7rem/1.4 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.search {
  width: 100%;
  margin: 20px 0 12px;
  padding: 10px 12px 10px 36px;
  color: var(--text);
  background:
    linear-gradient(90deg, transparent 0 34px, var(--line) 34px 35px, transparent 35px),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.search::placeholder { color: var(--subtle); }
.search:focus {
  border-color: rgba(110, 240, 189, .65);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
nav { display: grid; gap: 2px; }
nav .label {
  margin: 18px 11px 6px;
  color: var(--subtle);
  font: 700 .64rem/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
nav a {
  position: relative;
  padding: 8px 11px;
  color: #aebbc3;
  border-radius: 9px;
  text-decoration: none;
  font-size: .89rem;
  transition: color .18s ease, background .18s ease;
}
nav a::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 2px;
  height: 0;
  content: "";
  background: var(--accent);
  border-radius: 4px;
  transform: translateY(-50%);
  transition: height .18s ease;
}
nav a:hover, nav a.active {
  color: var(--text);
  background: var(--accent-soft);
}
nav a:hover::before, nav a.active::before { height: 18px; }
.side-footer {
  margin-top: 22px;
  padding: 18px 10px 0;
  color: var(--subtle);
  border-top: 1px solid var(--line);
  font-size: .7rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.side-footer strong {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .72rem;
  text-transform: none;
}

main {
  min-width: 0;
  padding: 34px clamp(22px, 5vw, 76px) 90px;
}
.wrap { width: min(1180px, 100%); margin: 0 auto; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  min-height: 440px;
  align-items: end;
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(32px, 5vw, 64px);
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 18%, rgba(110, 240, 189, .2), transparent 22rem),
    radial-gradient(circle at 18% 80%, rgba(103, 184, 255, .12), transparent 30rem),
    linear-gradient(145deg, #111a23 0%, #0b1118 70%);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -5%;
  width: min(42vw, 540px);
  aspect-ratio: 1;
  content: "";
  background:
    linear-gradient(rgba(110, 240, 189, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 240, 189, .08) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid rgba(110, 240, 189, .14);
  border-radius: 50%;
  transform: translateY(-50%) rotate(18deg);
  mask-image: radial-gradient(circle, black, transparent 69%);
}
.hero::after {
  position: absolute;
  top: 0;
  left: 10%;
  width: 36%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 22px var(--accent);
}
.kicker, .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font: 700 .7rem/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.kicker::before, .section-kicker::before {
  width: 18px;
  height: 1px;
  content: "";
  background: currentColor;
}
.hero h1 {
  max-width: 780px;
  margin: 18px 0 22px;
  color: var(--text);
  background: linear-gradient(115deg, #fff 15%, #bcddcf 88%);
  background-clip: text;
  font-size: clamp(3.4rem, 7.2vw, 7rem);
  font-weight: 800;
  line-height: .87;
  letter-spacing: -.055em;
  -webkit-text-fill-color: transparent;
}
.hero p {
  max-width: 680px;
  margin: 0;
  color: #a8bac4;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  color: #06110d;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(48, 201, 147, .18);
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover {
  background: #91f4cf;
  box-shadow: 0 12px 32px rgba(48, 201, 147, .3);
  transform: translateY(-2px);
}
.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.button.secondary:hover { background: rgba(255, 255, 255, .08); }
.status-card {
  padding: 22px;
  color: var(--text);
  background: rgba(5, 10, 14, .63);
  border: 1px solid rgba(142, 174, 186, .22);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
  backdrop-filter: blur(16px);
}
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.status-card p { margin: 12px 0 0; color: var(--muted); font-size: .88rem; }
.status-dot {
  width: 8px;
  height: 8px;
  background: #67747d;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(103, 116, 125, .12);
}
.status-dot.online {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(110, 240, 189, .1), 0 0 20px rgba(110, 240, 189, .6);
}
.status-card code {
  display: block;
  margin-top: 20px;
  padding: 12px 13px;
  overflow-wrap: anywhere;
  color: var(--accent);
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 36px 0 92px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.stat {
  padding: 18px 20px;
  background: rgba(14, 21, 29, .94);
  border: 0;
  border-radius: 0;
}
.stat strong {
  display: block;
  color: var(--text);
  font: 700 1.55rem/1 "SFMono-Regular", Consolas, monospace;
}
.stat span { color: var(--muted); font-size: .76rem; }

.doc-section { margin: 0 0 100px; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .65fr);
  align-items: end;
  gap: 32px;
  margin-bottom: 28px;
}
.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(2.25rem, 4.5vw, 4.2rem);
  font-weight: 750;
  line-height: .95;
  letter-spacing: -.04em;
}
.section-head p { margin: 0; color: var(--muted); }
.quick-grid, .project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.info-card, .project-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
  color: var(--text);
  background: linear-gradient(145deg, var(--surface-raised), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.info-card::before {
  position: absolute;
  top: 0;
  left: 22px;
  width: 36px;
  height: 1px;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 16px rgba(110, 240, 189, .5);
}
.info-card:nth-child(2) { transform: none; }
.info-card h3, .project-card h3 { margin: 0 0 8px; font-size: 1rem; }
.info-card p, .project-card p { margin: 0; color: var(--muted); font-size: .91rem; }
.project-card {
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.project-card:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
  box-shadow: none;
  transform: translateY(-3px);
}
.project-card span { display: inline-block; margin-top: 16px; color: var(--accent); font-weight: 800; }

.console {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.25fr);
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .23);
}
.console-form { padding: 26px; background: var(--surface-raised); }
.console-form label, .qr-controls label {
  display: block;
  margin: 14px 0 7px;
  color: #c5d1d7;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
}
.console-form select, .console-form input,
.qr-controls select, .qr-controls input, .qr-controls textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  background: #0a1016;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
}
.console-form select:focus, .console-form input:focus,
.qr-controls select:focus, .qr-controls input:focus, .qr-controls textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.console-form button { margin-top: 18px; }
.console-output {
  min-height: 330px;
  margin: 0;
  padding: 27px;
  color: #a8d6c4;
  background: var(--code);
  border: 0;
  border-radius: 0;
  overflow: auto;
  white-space: pre-wrap;
}

.endpoint-list { display: grid; gap: 18px; }
.endpoint {
  overflow: hidden;
  background: rgba(14, 21, 29, .94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 45px rgba(0, 0, 0, .11);
}
.endpoint[hidden] { display: none; }
.endpoint-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  background: linear-gradient(90deg, rgba(19, 29, 39, .98), rgba(13, 20, 28, .98));
  border-bottom: 1px solid var(--line);
}
.method {
  padding: 5px 8px;
  color: #06110d;
  background: var(--accent);
  border-radius: 6px;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .05em;
}
.method.post { color: #091017; background: var(--blue); }
.route {
  min-width: 0;
  color: #e5f1ec;
  overflow-wrap: anywhere;
  font-size: clamp(.87rem, 2vw, 1.02rem);
  font-weight: 700;
}
.tag {
  padding: 4px 8px;
  color: var(--muted);
  background: rgba(143, 161, 172, .08);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.endpoint-body { padding: 24px; }
.endpoint-body > p:first-child { margin-top: 0; color: var(--muted); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr);
  align-items: start;
  gap: 22px;
}
.parameters { width: 100%; border-collapse: collapse; }
.parameters th, .parameters td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.parameters th {
  color: var(--subtle);
  font: 700 .64rem/1.4 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.parameters td { color: #b7c4ca; font-size: .87rem; }
.parameters td:first-child {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 700;
}
.code-block { position: relative; }
pre {
  margin: 0;
  padding: 20px;
  color: #a9d6c5;
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  font-size: .8rem;
  line-height: 1.62;
}
:not(pre) > code {
  padding: 2px 6px;
  color: #9bf2d0;
  background: rgba(110, 240, 189, .09);
  border: 1px solid rgba(110, 240, 189, .1);
  border-radius: 5px;
  font-size: .86em;
}
.copy {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  padding: 6px 9px;
  color: #b6c3c9;
  background: #111a22;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: .68rem;
}
.copy:hover { color: var(--text); border-color: var(--accent); }
.note {
  margin-top: 16px;
  padding: 14px 16px;
  color: #b9c9c3;
  background: var(--accent-soft);
  border: 1px solid rgba(110, 240, 189, .17);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}

.qr-lab {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 1px;
  margin-top: 22px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.qr-controls { padding: 22px; background: var(--surface-raised); }
.qr-controls textarea { min-height: 92px; resize: vertical; }
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.color-input { position: relative; }
.color-input input[type="color"] {
  min-height: 43px;
  padding: 5px;
  cursor: pointer;
}
.qr-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.qr-preview {
  display: grid;
  min-height: 390px;
  place-items: center;
  padding: 30px;
  background:
    radial-gradient(circle, rgba(103, 184, 255, .08), transparent 60%),
    #0a0f15;
}
.qr-preview-frame {
  display: grid;
  width: min(100%, 310px);
  aspect-ratio: 1;
  place-items: center;
  padding: 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .42);
}
.qr-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qr-meta {
  margin: 14px 0 0;
  color: var(--subtle);
  font: .7rem/1.5 "SFMono-Regular", Consolas, monospace;
  text-align: center;
}

.lobby {
  padding: clamp(24px, 4vw, 46px);
  color: var(--text);
  background:
    radial-gradient(circle at 95% 5%, rgba(103, 184, 255, .13), transparent 28rem),
    linear-gradient(145deg, #101b25, #0b1219);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.lobby h2 {
  margin: 10px 0 16px;
  color: var(--text);
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  line-height: .92;
  letter-spacing: -.04em;
}
.lobby h3 { margin-top: 32px; color: var(--text); }
.lobby p, .lobby li { color: var(--muted); }
.lobby .parameters th, .lobby .parameters td { border-color: var(--line); }
.lobby .parameters th { color: var(--subtle); }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.action {
  padding: 15px;
  color: var(--muted);
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.action strong { color: var(--blue); }

.linker {
  position: relative;
  padding: clamp(24px, 4vw, 46px);
  overflow: hidden;
  background:
    radial-gradient(circle at 4% 2%, rgba(110, 240, 189, .11), transparent 26rem),
    radial-gradient(circle at 96% 28%, rgba(103, 184, 255, .1), transparent 30rem),
    linear-gradient(145deg, #0d171c, #0a1016 64%);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.linker::before {
  position: absolute;
  top: 0;
  left: 16%;
  width: 36%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 22px rgba(110, 240, 189, .65);
}
.linker h2 {
  margin: 10px 0 0;
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  line-height: .92;
  letter-spacing: -.04em;
}
.linker > h3 { margin: 38px 0 14px; font-size: 1.22rem; }
.linker h4 { margin: 0 0 10px; color: #d8e7e1; }
.linker > p { color: var(--muted); }
.linker-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0 20px;
}
.linker-flow article {
  position: relative;
  min-height: 170px;
  padding: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.linker-flow article::after {
  position: absolute;
  right: -12px;
  bottom: -37px;
  content: attr(data-step);
  color: rgba(110, 240, 189, .035);
  font: 800 7rem/1 "SFMono-Regular", Consolas, monospace;
}
.linker-flow article > span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(110, 240, 189, .18);
  border-radius: 8px;
  font: 700 .68rem/1 "SFMono-Regular", Consolas, monospace;
}
.linker-flow h3 { margin: 18px 0 7px; font-size: .98rem; }
.linker-flow p { margin: 0; color: var(--muted); font-size: .87rem; }
.linker .endpoint { background: rgba(11, 18, 24, .88); }
.linker-response { align-items: stretch; margin-top: 24px; }
.linker-response > div {
  padding: 18px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.response-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: .84rem;
}
.response-line strong { margin-right: 5px; color: var(--text); }
.linker-endpoints { margin-top: 18px; }
.command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.command-grid > div {
  display: grid;
  align-content: start;
  min-height: 105px;
  gap: 9px;
  padding: 15px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.command-grid code { width: max-content; color: var(--blue); }
.command-grid span { color: var(--muted); font-size: .83rem; line-height: 1.45; }
.security-callout {
  display: grid;
  grid-template-columns: minmax(150px, .3fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  padding: 18px;
  color: #e8d5b9;
  background: rgba(255, 184, 107, .07);
  border: 1px solid rgba(255, 184, 107, .24);
  border-radius: 12px;
}
.security-callout strong { color: var(--orange); }
.security-callout span { color: #bcae9b; }

.compat {
  width: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-collapse: separate;
  border-radius: 14px;
  border-spacing: 0;
}
.compat th, .compat td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; }
.compat th {
  color: var(--subtle);
  background: var(--surface-raised);
  font: 700 .67rem/1.4 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.compat td { color: var(--muted); }
.compat tr:last-child td { border-bottom: 0; }
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  color: var(--subtle);
  border-top: 1px solid var(--line);
  font-size: .8rem;
}
footer a { color: var(--muted); }
.empty {
  display: none;
  padding: 30px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  text-align: center;
}

@media (max-width: 1050px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    height: auto;
    padding: 12px 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand { padding: 0 0 10px; }
  .brand-mark { width: 34px; border-radius: 9px; }
  .search, .side-footer, nav .label { display: none; }
  nav { display: flex; gap: 5px; margin-top: 10px; padding-bottom: 3px; overflow-x: auto; }
  nav a { flex: 0 0 auto; padding: 7px 10px; background: rgba(255, 255, 255, .025); }
  nav a::before { display: none; }
  main { padding-top: 22px; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .status-card { max-width: 430px; }
}

@media (max-width: 760px) {
  main { padding: 15px 12px 60px; }
  .hero { padding: 30px 21px; border-radius: 20px; }
  .hero h1 { font-size: clamp(3rem, 18vw, 5.2rem); }
  .stats { grid-template-columns: repeat(2, 1fr); margin-bottom: 70px; }
  .section-head, .split, .console, .qr-lab, .security-callout { grid-template-columns: 1fr; }
  .quick-grid, .project-grid, .action-grid, .linker-flow { grid-template-columns: 1fr; }
  .command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .endpoint-head { grid-template-columns: auto minmax(0, 1fr); padding: 15px 14px; }
  .endpoint-head .tag { display: none; }
  .endpoint-body { padding: 18px 14px; }
  .parameters { font-size: .8rem; }
  .parameters th, .parameters td { padding: 8px 6px; }
  .console-output { min-height: 240px; }
  .qr-preview { min-height: 310px; }
  footer { display: block; }
}

@media (max-width: 460px) {
  .field-row { grid-template-columns: 1fr; }
  .command-grid { grid-template-columns: 1fr; }
  .hero-actions, .qr-actions { display: grid; }
  .button { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero > *, .stats, .doc-section {
    animation: reveal .65s cubic-bezier(.22, 1, .36, 1) both;
  }
  .hero > :nth-child(2) { animation-delay: .09s; }
  .stats { animation-delay: .14s; }
  .doc-section { animation-delay: .2s; }
  @keyframes reveal {
    from { opacity: 0; transform: translateY(18px); }
  }
}
