:root {
  --bg: #0a0b0f;
  --bg-2: #0f1117;
  --surface: #13161e;
  --surface-2: #191d27;
  --line: #232837;
  --line-2: #2e3446;
  --text: #e9ebf1;
  --muted: #9aa1b4;
  --dim: #6b7287;
  --accent: #f4b740;      /* saffron */
  --accent-2: #ffcf6b;
  --accent-ink: #1a1305;
  --teal: #3dd6c4;
  --violet: #9b8cff;
  --red: #ff6b6b;
  --green: #4ade80;
  --radius: 14px;
  --radius-sm: 9px;
  --font: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 10px 40px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15.5px; line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre, kbd, .mono { font-family: var(--mono); }
:not(pre) > code {
  direction: ltr; unicode-bidi: isolate; background: var(--surface-2); border: 1px solid var(--line);
  padding: .1em .45em; border-radius: 6px; font-size: .86em; color: #ffd78a; white-space: nowrap;
}
.ltr { direction: ltr; unicode-bidi: isolate; }
::selection { background: rgba(244,183,64,.3); }

/* ---------- top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px);
  background: rgba(10,11,15,.72); border-bottom: 1px solid var(--line);
}
.nav-in { max-width: 1240px; margin: 0 auto; padding: 0 22px; height: 62px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: conic-gradient(from 210deg, var(--accent), #ff8a3d, var(--violet), var(--teal), var(--accent));
  color: var(--accent-ink); font-family: var(--mono); font-size: 14px; font-weight: 800; box-shadow: 0 0 24px -4px rgba(244,183,64,.55);
}
.brand small { color: var(--dim); font-weight: 500; font-family: var(--mono); font-size: 12px; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a { color: var(--muted); padding: 6px 12px; border-radius: 8px; font-size: 14.5px; }
.nav-links a:hover, .nav-links a.on { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-cta { display: flex; gap: 8px; }
@media (max-width: 760px) { .nav-links { display: none; } .nav-in { gap: 12px; } .brand small { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font: 600 14.5px var(--font); cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #3c4459; background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- landing ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 80% 0%, rgba(244,183,64,.16), transparent 70%),
    radial-gradient(500px 300px at 10% 30%, rgba(155,140,255,.10), transparent 70%),
    linear-gradient(transparent 0 0);
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
}
.hero-in { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 84px 22px 90px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 980px) { .hero-in { grid-template-columns: 1fr; padding-top: 56px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--accent-2);
  border: 1px solid rgba(244,183,64,.3); background: rgba(244,183,64,.07); padding: 4px 12px; border-radius: 999px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
h1.display { font-size: clamp(34px, 5vw, 54px); line-height: 1.3; margin: 20px 0 18px; font-weight: 900; letter-spacing: -.02em; }
h1.display em { font-style: normal; background: linear-gradient(90deg, var(--accent), #ff8a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 18px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-actions .btn { height: 48px; padding: 0 24px; font-size: 15.5px; }
.endpoint-pill {
  margin-top: 28px; display: inline-flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); font-family: var(--mono); font-size: 14px; direction: ltr;
}
.endpoint-pill span.k { color: var(--dim); }

.terminal { border: 1px solid var(--line-2); border-radius: var(--radius); background: #0c0e14; box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.02) inset; overflow: hidden; direction: ltr; }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2b3040; }
.terminal-bar i:nth-child(1) { background: #ff5f57; } .terminal-bar i:nth-child(2) { background: #febc2e; } .terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar .tabs { margin-left: 14px; display: flex; gap: 2px; }

.section { max-width: 1240px; margin: 0 auto; padding: 90px 22px; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 8px 0 10px; line-height: 1.4; letter-spacing: -.01em; }
.section-head p { color: var(--muted); margin: 0; font-size: 16.5px; }
.kicker { font-family: var(--mono); font-size: 12.5px; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }

.grid { display: grid; gap: 16px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid.c3, .grid.c4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid.c3, .grid.c4, .grid.c2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.card h3 { margin: 14px 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--accent); }
.icon svg { width: 20px; height: 20px; }

.providers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .providers { grid-template-columns: 1fr; } }
.provider { border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg-2)); border-radius: var(--radius); padding: 26px; }
.provider .tag { font-family: var(--mono); font-size: 12.5px; color: var(--dim); direction: ltr; text-align: right; }
.provider h3 { margin: 6px 0 8px; font-size: 21px; display: flex; align-items: center; gap: 10px; }
.provider .status { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.provider .status.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.provider ul { margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.provider li { padding: 5px 0; border-top: 1px dashed var(--line); }
.provider li code { font-size: 12.5px; }

.steps { counter-reset: s; display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.step::before { counter-increment: s; content: counter(s); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-family: var(--mono); font-weight: 700; color: var(--accent); }
.step h4 { margin: 6px 0 2px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

.cta-band { border: 1px solid var(--line-2); border-radius: 20px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: radial-gradient(500px 200px at 0% 100%, rgba(244,183,64,.14), transparent 70%), var(--surface); }
.cta-band h2 { margin: 0 0 6px; font-size: 26px; }
.cta-band p { margin: 0; color: var(--muted); }

.footer { border-top: 1px solid var(--line); color: var(--dim); font-size: 13.5px; }
.footer-in { max-width: 1240px; margin: 0 auto; padding: 28px 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

/* ---------- code blocks ---------- */
.code { position: relative; border: 1px solid var(--line); border-radius: 12px; background: #0c0e14; margin: 16px 0 22px; overflow: hidden; direction: ltr; }
.code-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--bg-2); padding: 0 8px 0 4px; min-height: 40px; }
.code-tabs { display: flex; gap: 2px; overflow-x: auto; }
.code-tab { background: none; border: 0; color: var(--dim); font: 500 12.5px var(--mono); padding: 11px 12px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.code-tab.on { color: var(--text); border-bottom-color: var(--accent); }
.code-title { color: var(--dim); font: 500 12.5px var(--mono); padding: 0 10px; }
.copy { background: none; border: 1px solid transparent; color: var(--dim); font: 500 12px var(--mono); padding: 4px 9px; border-radius: 7px; cursor: pointer; }
.copy:hover { color: var(--text); border-color: var(--line-2); }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 13.2px; line-height: 1.7; }
.code pre code { background: none !important; padding: 0 !important; }
.code .pane { display: none; } .code .pane.on { display: block; }
.hljs { color: #d7dbe7; background: transparent; }
.hljs-string { color: #b9e38c; } .hljs-keyword, .hljs-built_in { color: #c792ea; } .hljs-attr, .hljs-property { color: #82c9ff; }
.hljs-number, .hljs-literal { color: #ffb86b; } .hljs-comment { color: #5f6880; font-style: italic; } .hljs-title, .hljs-title.function_ { color: #ffd37a; }
.hljs-variable, .hljs-params { color: #e9ebf1; } .hljs-meta { color: #3dd6c4; }

/* ---------- docs layout ---------- */
.docs { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 260px minmax(0, 1fr) 210px; gap: 40px; padding: 0 22px; }
@media (max-width: 1200px) { .docs { grid-template-columns: 240px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .sidebar { position: static !important; height: auto !important; border: 0 !important; } }
.sidebar { position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; padding: 28px 0 40px; border-left: 1px solid var(--line); padding-left: 18px; }
.sidebar h5 { margin: 22px 0 6px; font-size: 12px; color: var(--dim); letter-spacing: .06em; font-family: var(--mono); text-transform: uppercase; }
.sidebar h5:first-child { margin-top: 0; }
.sidebar a { display: block; color: var(--muted); padding: 5px 12px; border-radius: 8px; font-size: 14.2px; }
.sidebar a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.sidebar a.on { color: var(--accent-2); background: rgba(244,183,64,.08); }
.sidebar .method { font: 600 10.5px var(--mono); padding: 1px 6px; border-radius: 5px; margin-left: 6px; background: rgba(61,214,196,.12); color: var(--teal); }
.sidebar .method.get { background: rgba(155,140,255,.14); color: var(--violet); }
.doc-body { padding: 40px 0 120px; min-width: 0; }
.doc-body section { scroll-margin-top: 80px; padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.doc-body section:last-child { border-bottom: 0; }
.doc-body h1 { font-size: 36px; margin: 0 0 10px; line-height: 1.35; letter-spacing: -.01em; }
.doc-body h2 { font-size: 25px; margin: 0 0 12px; line-height: 1.45; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.doc-body h3 { font-size: 18px; margin: 28px 0 8px; }
.doc-body p, .doc-body li { color: #c9cddb; }
.doc-body .lead { font-size: 17px; }
.endpoint { display: inline-flex; align-items: center; gap: 10px; direction: ltr; font: 500 14px var(--mono); background: var(--bg-2); border: 1px solid var(--line-2); padding: 7px 14px; border-radius: 10px; margin: 4px 0 14px; }
.verb { font-weight: 700; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.verb.post { background: rgba(61,214,196,.14); color: var(--teal); }
.verb.get { background: rgba(155,140,255,.16); color: var(--violet); }
.toc { position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; padding: 40px 0; font-size: 13.5px; }
.toc h6 { margin: 0 0 10px; color: var(--dim); font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.toc a { display: block; color: var(--dim); padding: 3px 0; }
.toc a:hover { color: var(--text); }

.callout { border: 1px solid var(--line-2); border-right: 3px solid var(--accent); background: rgba(244,183,64,.05); border-radius: 10px; padding: 14px 18px; margin: 18px 0; font-size: 14.5px; }
.callout.info { border-right-color: var(--teal); background: rgba(61,214,196,.05); }
.callout.warn { border-right-color: var(--red); background: rgba(255,107,107,.05); }
.callout strong { color: var(--text); }
.callout p { margin: 0; }

table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 14px 0 22px; }
.tbl th { text-align: right; background: var(--bg-2); color: var(--muted); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: #c9cddb; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child code { white-space: nowrap; }
.tbl .req { color: var(--red); font-size: 11.5px; font-family: var(--mono); margin-right: 6px; }
.tbl-wrap { overflow-x: auto; }

/* ---------- app (admin / dashboard) ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
@media (max-width: 860px) { .app { grid-template-columns: 1fr; } .app-side { position: static !important; height: auto !important; } }
.app-side { position: sticky; top: 0; height: 100vh; border-left: 1px solid var(--line); background: var(--bg-2); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
.app-side .brand { padding: 4px 8px 18px; }
.app-side a.item { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 9px 12px; border-radius: 9px; font-size: 14.5px; }
.app-side a.item svg { width: 18px; height: 18px; opacity: .85; }
.app-side a.item:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.app-side a.item.on { background: var(--surface-2); color: var(--text); box-shadow: inset -2px 0 0 var(--accent); }
.app-side .spacer { flex: 1; }
.app-main { padding: 28px 34px 80px; min-width: 0; }
@media (max-width: 640px) { .app-main { padding: 20px 16px 60px; } }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 26px; font-weight: 800; margin-top: 4px; font-family: var(--mono); direction: ltr; text-align: right; letter-spacing: -.02em; }
.stat .sub { color: var(--dim); font-size: 12.5px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 15.5px; }
.panel-body { padding: 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.table th { text-align: right; color: var(--dim); font-weight: 600; font-size: 12.5px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255,255,255,.015); }
.table .num { font-family: var(--mono); direction: ltr; text-align: left; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--green); border-color: rgba(74,222,128,.3); background: rgba(74,222,128,.06); }
.badge.off { color: var(--red); border-color: rgba(255,107,107,.3); background: rgba(255,107,107,.06); }
.badge.p-openai { color: #7ee2b8; } .badge.p-anthropic { color: #f0a77a; } .badge.p-openrouter { color: #a99bff; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--dim); }
.input, select.input, textarea.input {
  height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font: 14px var(--font); outline: none; width: 100%; transition: border-color .15s;
}
textarea.input { height: auto; min-height: 80px; padding: 10px 12px; font-family: var(--mono); font-size: 13px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(244,183,64,.12); }
.input.mono { font-family: var(--mono); font-size: 13px; direction: ltr; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.modal-bg { position: fixed; inset: 0; background: rgba(4,5,8,.72); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-start; gap: 8px; flex-direction: row-reverse; }
@keyframes fade { from { opacity: 0; } }
.keybox { direction: ltr; font-family: var(--mono); font-size: 14px; background: var(--bg); border: 1px dashed var(--accent); padding: 14px; border-radius: 10px; word-break: break-all; color: var(--accent-2); }

.toast { position: fixed; bottom: 24px; left: 24px; background: var(--surface-2); border: 1px solid var(--line-2); padding: 12px 18px; border-radius: 10px; z-index: 200; box-shadow: var(--shadow); font-size: 14px; animation: fade .2s; }
.toast.err { border-color: var(--red); }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; direction: ltr; padding-top: 10px; }
.bars .b { flex: 1; background: linear-gradient(180deg, var(--accent), rgba(244,183,64,.35)); border-radius: 4px 4px 1px 1px; min-height: 2px; position: relative; }
.bars .b:hover { background: var(--accent-2); }
.bars .b:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 6px; background: var(--bg); border: 1px solid var(--line-2); padding: 4px 8px; border-radius: 6px; font: 11.5px var(--mono); white-space: nowrap; color: var(--text); z-index: 5; }
.bars-x { display: flex; justify-content: space-between; direction: ltr; color: var(--dim); font: 11px var(--mono); margin-top: 6px; }
.empty { text-align: center; color: var(--dim); padding: 40px 16px; font-size: 14px; }
.meter { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent)); }
.switch { position: relative; width: 38px; height: 22px; display: inline-block; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; cursor: pointer; transition: .15s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; top: 3px; right: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { right: 19px; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(600px 300px at 50% 0%, rgba(244,183,64,.12), transparent 70%); }
.login { width: min(400px, 100%); }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.tiny { font-size: 12.5px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 500 12.5px var(--mono); border: 1px solid var(--line-2); padding: 3px 10px; border-radius: 99px; color: var(--muted); cursor: pointer; background: transparent; }
.chip.on { border-color: var(--accent); color: var(--accent-2); background: rgba(244,183,64,.08); }
/* Persian labels must not use letter-spacing (breaks glyph joining) */
.sidebar h5, .toc h6 { font-family: var(--font); letter-spacing: 0; text-transform: none; font-size: 12.5px; }
