/* =====================================================================
   SilentBot documentation (templates/docs.html + templates/docs/*).
   Built on the Silent Night tokens (--sn-*), so it follows the site theme.
   Motion is transform/opacity only; nothing animates forever off-screen.
   ===================================================================== */

.docs { --docs-nav: 272px; --docs-read: 880px; position: relative; }
.docs code { font-family: var(--sn-mono); font-size: .86em; }
.docs :not(pre) > code {
  padding: .12em .42em; border-radius: 6px; color: var(--sn-ice-soft);
  background: var(--sn-ice-a08); border: 1px solid var(--sn-ice-a14); overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.docs kbd {
  display: inline-block; min-width: 1.6em; padding: .05em .45em; border-radius: 6px; text-align: center;
  font: 600 .78em var(--sn-mono); color: var(--sn-text); background: var(--sn-s2);
  border: 1px solid var(--sn-line-2); box-shadow: 0 2px 0 var(--sn-line-2);
}
.docs em { font-style: normal; color: var(--sn-ice); }
.prose a:not([class]) { color: var(--sn-ice); text-decoration: underline; text-decoration-color: var(--sn-ice-a30); text-underline-offset: 3px; }
.prose a:not([class]):hover { text-decoration-color: currentColor; }

/* ---------------- hero ---------------- */
.docs-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; padding: clamp(2rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.docs-hero__copy { max-width: 860px; }
.docs-hero__title { margin-top: 1.1rem; font-size: clamp(2.3rem, 5.4vw, 4.6rem); }
.docs-hero__lead { margin-top: 1.4rem; max-width: 40rem; font-size: clamp(1.02rem, 1.4vw, 1.18rem); line-height: 1.7; color: var(--sn-muted); }
.docs-hero__visual { position: relative; display: none; min-height: 440px; }
@media (min-width: 1180px) {
  .docs-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .docs-hero__visual { display: block; }
}
.hero-card { position: absolute; border-radius: 18px; box-shadow: 0 40px 80px -40px rgb(0 0 0 / .9); animation: docs-float 8s ease-in-out infinite; }
.hero-card--code { top: 4%; left: 0; width: 78%; animation-delay: -1s; }
.docs .hero-card--code .code pre { font-size: 12.5px; white-space: pre-wrap !important; overflow-wrap: anywhere !important; word-break: break-word !important; }
.hero-card--dc { right: 0; bottom: 4%; width: 74%; animation-delay: -5s; }
.hero-card--dc .dc { box-shadow: 0 0 0 1px rgb(130 224 255 / .18); }
.docs-hero.is-offscreen .hero-card { animation-play-state: paused; }
.chip-float {
  position: absolute; z-index: 2; left: var(--x); top: var(--y); padding: .4rem .75rem; border-radius: 12px;
  font: 500 .78rem var(--sn-mono); color: var(--sn-ice-soft); white-space: nowrap;
  background: color-mix(in srgb, var(--sn-s1) 88%, transparent); border: 1px solid var(--sn-ice-a14);
  box-shadow: 0 12px 30px -18px rgb(0 0 0 / .8); opacity: 0;
  animation: docs-chip-in .9s var(--sn-ease) forwards, docs-float 7s ease-in-out infinite;
  animation-delay: calc(.8s - var(--d) / 6), var(--d);
}
.docs-hero.is-offscreen .chip-float { animation-play-state: paused; }
@keyframes docs-chip-in { to { opacity: .9; } }
@keyframes docs-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.docs-search {
  margin-top: 2rem; width: min(100%, 560px); display: flex; align-items: center; gap: .8rem;
  padding: .95rem 1.1rem; border-radius: 16px; text-align: left; color: var(--sn-subtle);
  background: var(--sn-s1); border: 1px solid var(--sn-line-2); box-shadow: var(--sn-shadow);
  transition: border-color .25s, box-shadow .25s, transform .25s var(--sn-ease);
}
.docs-search i { color: var(--sn-ice); }
.docs-search span { flex: 1; }
.docs-search:hover { border-color: var(--sn-ice-a30); box-shadow: var(--sn-glow); transform: translateY(-2px); }

.docs-stats { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; padding-top: 1.5rem; border-top: 1px solid var(--sn-line); max-width: 760px; }
.docs-stats dt { font: .68rem var(--sn-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sn-subtle); }
.docs-stats dd { margin-top: .3rem; font: 500 1.6rem var(--sn-display); color: var(--sn-text); font-variant-numeric: tabular-nums; }

/* ---------------- roadmap ---------------- */
.roadmap { margin: 1rem 0 4.5rem; }
.roadmap__head { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem 2rem; align-items: end; margin-bottom: 1.6rem; }
.roadmap__head p { color: var(--sn-muted); max-width: 36rem; line-height: 1.6; }
.roadmap__meter { position: relative; min-width: 150px; padding-top: 12px; font: 600 .85rem var(--sn-mono); color: var(--sn-muted); text-align: right; }
.roadmap__meter::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 6px; background: var(--sn-s2); }
.roadmap__meter #roadmapMeter { position: absolute; top: 0; left: 0; height: 6px; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--sn-ok), var(--sn-ice)); transition: width .8s var(--sn-ease); }
.roadmap__meter b { color: var(--sn-text); }
.roadmap__track { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.roadmap__stage {
  position: relative; padding: 1.2rem; border-radius: var(--sn-radius-lg);
  background: linear-gradient(180deg, var(--sn-s1), color-mix(in srgb, var(--sn-s1) 60%, transparent));
  border: 1px solid var(--sn-line);
}
.roadmap__stage::after {
  content: ""; position: absolute; top: 2.05rem; right: -1rem; width: 1rem; height: 2px;
  background: linear-gradient(90deg, var(--sn-line-2), transparent);
}
.roadmap__stage:last-child::after { display: none; }
.roadmap__stage-head { display: grid; grid-template-columns: auto 1fr; gap: .1rem .75rem; align-items: center; margin-bottom: .9rem; }
.roadmap__stage-head b { font: 600 1.05rem var(--sn-display); color: var(--sn-text); }
.roadmap__stage-head small { grid-column: 2; color: var(--sn-subtle); font-size: .8rem; }
.lvl { grid-row: span 2; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 700 1rem var(--sn-display); color: var(--sn-on-ice); }
.lvl-1 { --lvl: var(--sn-ok); } .lvl-2 { --lvl: var(--sn-ice); } .lvl-3 { --lvl: var(--sn-aurora); }
.lvl { background: var(--lvl); box-shadow: 0 10px 24px -12px var(--lvl); }
.roadmap__stage ol { display: grid; gap: .3rem; }
.roadmap__stage a {
  display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: 10px;
  color: var(--sn-muted); font-size: .9rem; transition: background .2s, color .2s, transform .25s var(--sn-ease);
}
.roadmap__stage a > i:first-child { width: 1.1rem; text-align: center; color: var(--sn-subtle); transition: color .2s; }
.roadmap__stage a span { flex: 1; }
.roadmap__stage a:hover { background: var(--sn-s2); color: var(--sn-text); transform: translateX(3px); }
.roadmap__stage a:hover > i:first-child { color: var(--sn-ice); }
.roadmap__done { opacity: 0; color: var(--sn-ok); transform: scale(.5); transition: opacity .3s, transform .4s var(--sn-ease); }
.is-done .roadmap__done { opacity: 1; transform: none; }
.is-done > a > i:first-child { color: var(--sn-ok) !important; }

/* ---------------- layout ---------------- */
.docs-layout { display: grid; grid-template-columns: var(--docs-nav) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.docs-main { min-width: 0; max-width: var(--docs-read); }

.docs-nav { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain; padding: .25rem .5rem 2rem 0; scrollbar-width: thin; }
.docs-nav__part + .docs-nav__part { margin-top: 1.4rem; }
.docs-nav__part > p { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; font: 600 .7rem var(--sn-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--sn-subtle); }
.docs-nav__part > p i { color: var(--sn-ice); }
.docs-nav ul { display: grid; gap: 1px; border-left: 1px solid var(--sn-line); }
.docs-nav a {
  position: relative; display: flex; align-items: center; gap: .5rem; margin-left: -1px; padding: .4rem .7rem;
  border-left: 2px solid transparent; font-size: .88rem; line-height: 1.35; color: var(--sn-muted);
  transition: color .2s, border-color .2s, background .2s;
}
.docs-nav a span { flex: 1; }
.docs-nav a i { font-size: .7rem; color: var(--sn-ok); opacity: 0; transition: opacity .3s; }
.docs-nav a.is-done i { opacity: .9; }
.docs-nav a:hover { color: var(--sn-text); }
.docs-nav a.is-active { color: var(--sn-ice); border-left-color: var(--sn-ice); background: linear-gradient(90deg, var(--sn-ice-a08), transparent); }

/* ---------------- parts & chapters ---------------- */
.docs-part__head { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 0 .9rem; align-items: center; margin: 4.5rem 0 .5rem; padding-bottom: 1.2rem; }
.docs-part:first-child .docs-part__head { margin-top: 0; }
.docs-part__head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--sn-ice-a30), var(--sn-line) 40%, transparent); }
.docs-part__head > i { grid-row: span 2; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 1.15rem; color: var(--sn-on-ice); background: linear-gradient(135deg, var(--sn-ice), var(--sn-ice-2)); box-shadow: var(--sn-glow); }
.docs-part__head span { font: 600 .72rem var(--sn-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sn-ice); }
.docs-part__head h2 { font: 600 clamp(1.5rem, 3vw, 2.1rem) var(--sn-display); letter-spacing: -.02em; color: var(--sn-text); }

.chapter { padding-top: 3.2rem; scroll-margin-top: 72px; }
.chapter__end { height: 1px; }
.chapter__head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.4rem; }
.chapter__icon {
  flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.2rem;
  color: var(--sn-ice); background: var(--sn-s1); border: 1px solid var(--sn-ice-a14);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .05); transition: box-shadow .4s, color .4s, background .4s;
}
.chapter.is-active .chapter__icon { color: var(--sn-on-ice); background: linear-gradient(135deg, var(--sn-ice), var(--sn-ice-2)); box-shadow: var(--sn-glow); }
.chapter__meta { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; font-size: .78rem; color: var(--sn-subtle); }
.chapter__title { margin-top: .3rem; font: 600 clamp(1.4rem, 2.6vw, 1.95rem) var(--sn-display); letter-spacing: -.02em; line-height: 1.2; }
.chapter__title a { color: var(--sn-text); }
.chapter__title a:hover { color: var(--sn-ice); }
.lvl-chip { padding: .15rem .6rem; border-radius: 999px; font-weight: 700; color: var(--lvl); background: color-mix(in srgb, var(--lvl) 14%, transparent); border: 1px solid color-mix(in srgb, var(--lvl) 35%, transparent); }

/* ---------------- prose ---------------- */
.prose { color: color-mix(in srgb, var(--sn-text) 86%, var(--sn-muted)); font-size: 1rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1rem; }
.prose p.lead { font-size: 1.1rem; color: var(--sn-text); }
.prose p.muted { font-size: .85rem; color: var(--sn-subtle); }
.prose h3 { position: relative; margin-top: 2.4rem; padding-left: .9rem; font: 600 1.2rem var(--sn-display); letter-spacing: -.01em; color: var(--sn-text); }
.prose h3::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 3px; border-radius: 3px; background: linear-gradient(var(--sn-ice), var(--sn-aurora)); }
.prose h3 i { color: var(--sn-ice); margin-right: .3rem; }
.prose b { color: var(--sn-text); font-weight: 650; }

.checks { display: grid; gap: .55rem; }
.checks li { position: relative; padding-left: 1.7rem; }
.checks li::before { content: "\f00c"; font: 900 .72rem "Font Awesome 6 Free"; position: absolute; left: 0; top: .42em; width: 1.1rem; height: 1.1rem; border-radius: 50%; display: grid; place-items: center; color: var(--sn-on-ice); background: var(--sn-ok); }

.rules { counter-reset: r; display: grid; gap: .7rem; }
.rules li { counter-increment: r; position: relative; padding: .8rem 1rem .8rem 3.2rem; border-radius: 14px; background: var(--sn-s1); border: 1px solid var(--sn-line); }
.rules li::before { content: counter(r); position: absolute; left: .9rem; top: .8rem; width: 1.6rem; height: 1.6rem; border-radius: 8px; display: grid; place-items: center; font: 700 .85rem var(--sn-display); color: var(--sn-ice); background: var(--sn-ice-a08); border: 1px solid var(--sn-ice-a30); }

.steps { counter-reset: s; position: relative; display: grid; gap: 1.1rem; padding-left: 2.8rem; }
.steps::before { content: ""; position: absolute; left: 1rem; top: .6rem; bottom: .6rem; width: 2px; background: linear-gradient(var(--sn-ice), var(--sn-line) 80%); border-radius: 2px; }
.steps li { counter-increment: s; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: -2.8rem; top: 0; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font: 700 .9rem var(--sn-display); color: var(--sn-on-ice); background: var(--sn-ice); box-shadow: 0 0 0 5px var(--sn-bg); }

/* cards */
.cards-2, .cards-3 { display: grid; gap: .9rem; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.15rem; border-radius: 18px; overflow: hidden;
  background: var(--sn-s1); border: 1px solid var(--sn-line); color: var(--sn-muted); font-size: .92rem; line-height: 1.6;
  transition: border-color .3s, transform .35s var(--sn-ease), box-shadow .35s;
}
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--sn-ice-a08), transparent 70%); }
.card:hover { border-color: var(--sn-ice-a30); transform: translateY(-3px); box-shadow: var(--sn-shadow); }
.card:hover::before { opacity: 1; }
.card > i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--sn-ice); background: var(--sn-ice-a08); border: 1px solid var(--sn-ice-a14); margin-bottom: .2rem; }
.card b { color: var(--sn-text); font-size: 1rem; }

/* callouts */
.callout { --cc: var(--sn-ice); display: flex; gap: .9rem; padding: 1rem 1.15rem; border-radius: 16px; font-size: .95rem; background: color-mix(in srgb, var(--cc) 7%, var(--sn-s1)); border: 1px solid color-mix(in srgb, var(--cc) 28%, transparent); }
.callout > div { min-width: 0; }
.callout > i { flex: none; margin-top: .2rem; color: var(--cc); font-size: 1.05rem; }
/* Only the callout's own title; bold words inside its text stay inline. */
.callout > div > b:first-child { display: block; margin-bottom: .25rem; color: var(--cc); }
.callout > div > * + * { margin-top: .55rem; }
.callout ul { display: grid; gap: .4rem; padding-left: 1.1rem; list-style: disc; }
.callout.is-tip { --cc: var(--sn-ok); } .callout.is-warn { --cc: var(--sn-warn); } .callout.is-mistake { --cc: var(--sn-danger); } .callout.is-pro { --cc: var(--sn-aurora); }

/* tasks */
.task { border-radius: 16px; border: 1px dashed var(--sn-line-2); background: var(--sn-s1); overflow: hidden; }
.task summary { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .9rem 1.1rem; cursor: pointer; list-style: none; color: var(--sn-text); font-weight: 600; }
.task summary::-webkit-details-marker { display: none; }
.task summary > i { margin-left: auto; color: var(--sn-subtle); transition: transform .3s var(--sn-ease); }
.task[open] summary > i { transform: rotate(180deg); }
.task__badge { padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; color: var(--sn-aurora); background: color-mix(in srgb, var(--sn-aurora) 14%, transparent); }
.task__body { padding: 0 1.1rem 1.1rem; animation: docs-open .35s var(--sn-ease); }
.task__body > * + * { margin-top: .8rem; }
@keyframes docs-open { from { opacity: 0; transform: translateY(-6px); } }

/* ---------------- code ---------------- */
.code { margin: 0; border-radius: 14px; overflow: hidden; background: #0a1120; border: 1px solid #1d2940; }
.code figcaption { display: flex; align-items: center; justify-content: space-between; padding: .45rem .5rem .45rem .9rem; font: 600 .7rem var(--sn-mono); letter-spacing: .06em; text-transform: uppercase; color: #7f8ba0; background: #0e1628; border-bottom: 1px solid #1d2940; }
.code__copy { width: 28px; height: 26px; border-radius: 7px; color: #7f8ba0; transition: background .2s, color .2s; }
.code__copy:hover { color: #e6f6ff; background: #1b2740; }
.code__copy.is-done { color: #5fe0a8; }
.code pre { margin: 0; padding: .9rem 1rem; overflow-x: auto; font: 13px/1.65 var(--sn-mono); color: #d6e2f0; white-space: pre; tab-size: 2; }
/* the site-wide pre style (custom.css) adds its own box; the docs code panel already has one */
.docs .code pre { position: static; margin: 0; padding: .9rem 1rem !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; white-space: pre !important; }
.docs pre code { display: block; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; white-space: inherit; }
.tk-directive { color: #facc15; } .tk-block { color: #f472b6; font-weight: 600; } .tk-func { color: #7dd3fc; }
.tk-var { color: #a5b4fc; } .tk-string { color: #86efac; } .tk-number { color: #fdba74; } .tk-color { color: #d8b4fe; }
.tk-brace { color: #64748b; } .tk-op { color: #f472b6; }

/* ---------------- examples ---------------- */
.example { padding: 1rem; border-radius: 20px; background: linear-gradient(180deg, var(--sn-s1), color-mix(in srgb, var(--sn-s1) 55%, transparent)); border: 1px solid var(--sn-line); }
.example__title { display: flex; align-items: center; gap: .55rem; margin: -.1rem 0 .8rem .2rem; font: 600 .95rem var(--sn-display); color: var(--sn-text); }
.example__title i { color: var(--sn-aurora); }
.example__grid { display: grid; gap: .9rem; }
.example__code { display: grid; gap: .6rem; min-width: 0; }
.example__opts { font-size: .82rem; color: var(--sn-muted); }
.example__opts i { color: var(--sn-ice); margin-right: .2rem; }
.example__label { display: flex; align-items: center; justify-content: space-between; margin: 0 .2rem .45rem; font: 600 .7rem var(--sn-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--sn-subtle); }
.example__label i { color: #8b95f9; margin-right: .3rem; }
.example__label small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--sn-ice); }
.example__label small::before { content: "● "; animation: docs-blink 2s ease-in-out 3; }
@keyframes docs-blink { 50% { opacity: .2; } }
.example__note { margin-top: .7rem; font-size: .88rem; color: var(--sn-muted); }
@media (min-width: 1400px) {
  .docs { --docs-read: 1040px; }
  .example__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
}

/* ---------------- Discord preview ---------------- */
.dc { position: relative; padding: .9rem .9rem .8rem; border-radius: 14px; background: #313338; color: #dbdee1; font: 15px/1.375 "gg sans", "Onest", system-ui, sans-serif; border: 1px solid #1e1f22; }
.dc-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 .85rem; padding: .35rem 0; }
.dc-msg.is-bot { animation: dc-in .45s var(--sn-ease); }
@keyframes dc-in { from { opacity: 0; transform: translateY(8px); } }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.dc-avatar.is-user { display: grid; place-items: center; font-weight: 700; color: #fff; background: #5865f2; }
.dc-msg__main { min-width: 0; }
.dc-msg__head { display: flex; align-items: center; gap: .4rem; }
.dc-msg__head b { color: #f2f3f5; font-weight: 600; }
.dc-msg__head time { font-size: .72rem; color: #949ba4; }
.dc-tag { padding: 0 .3rem; border-radius: 3px; font-size: .62rem; font-weight: 700; line-height: 1.4; color: #fff; background: #5865f2; }
.dc-text { margin-top: .1rem; white-space: normal; overflow-wrap: anywhere; }
.dc-cmd { color: #c9cdfb; background: rgb(88 101 242 / .3); border-radius: 3px; padding: 0 .2rem; }
.dc b { color: #f2f3f5; }
.dc code { padding: .1em .3em; border-radius: 4px; font-size: .85em; color: #dbdee1; background: #1e1f22; border: 0; white-space: pre-wrap; }
.dc pre { margin: .3rem 0; padding: .5rem; border-radius: 4px; background: #1e1f22; font: 13px var(--sn-mono); white-space: pre-wrap; }
.dc-mention { padding: 0 .15rem; border-radius: 3px; color: #c9cdfb; background: rgb(88 101 242 / .3); font-weight: 500; }
.dc-time { padding: 0 .2rem; border-radius: 3px; background: rgb(255 255 255 / .06); }
.dc-quote { display: block; padding-left: .7rem; border-left: 4px solid #4e5058; }
.dc-h { display: block; font-weight: 700; color: #f2f3f5; } .dc-h1 { font-size: 1.4em; } .dc-h2 { font-size: 1.2em; }
.dc-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; transition: color .2s; }
.dc-spoiler:hover { color: inherit; }
.dc a:not(.dc-btn) { color: #00a8fc; }

.dc-embed { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; max-width: 520px; margin-top: .35rem; padding: .6rem 1rem .8rem .85rem; border-radius: 4px; background: #2b2d31; border-left: 4px solid var(--bar); }
.dc-embed__body { min-width: 0; display: grid; gap: .45rem; font-size: .875rem; }
.dc-embed__author { display: flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; color: #f2f3f5; }
.dc-embed__author img, .dc-embed__footer img { width: 20px; height: 20px; border-radius: 50%; }
.dc-embed__title { font-size: 1rem; font-weight: 700; color: #f2f3f5; }
.dc-embed__title.is-link { color: #00a8fc; }
.dc-embed__desc { white-space: normal; overflow-wrap: anywhere; }
.dc-embed__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem .6rem; }
.dc-field { grid-column: 1 / -1; min-width: 0; }
.dc-field.is-inline { grid-column: auto; }
.dc-field__name { font-weight: 700; color: #f2f3f5; }
.dc-field__value { overflow-wrap: anywhere; }
.dc-embed__image { max-width: 100%; border-radius: 4px; margin-top: .2rem; }
.dc-embed__thumb { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; }
.dc-embed__footer { display: flex; align-items: center; gap: .45rem; font-size: .75rem; color: #b5bac1; }
.dc-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.dc-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 32px; padding: 0 1rem; border-radius: 4px; font-size: .875rem; font-weight: 500; color: #fff; background: #4e5058; transition: filter .15s, transform .12s; }
.dc-btn.is-primary { background: #5865f2; } .dc-btn.is-success { background: #248046; } .dc-btn.is-danger { background: #da373c; }
.dc-btn.is-link { background: #4e5058; color: #fff; }
.dc-break { flex-basis: 100%; height: 0; } .dc-btn.is-link i { font-size: .7rem; }
.dc-btn:hover { filter: brightness(1.12); }
.dc-btn:active { transform: translateY(1px); }
.dc-btn[disabled] { opacity: .5; cursor: not-allowed; }
.dc-btn.is-pressed { box-shadow: 0 0 0 2px #fff inset; }
.dc-select { position: relative; display: flex; align-items: center; justify-content: space-between; max-width: 420px; margin-top: .5rem; padding: .55rem .75rem; border-radius: 4px; color: #949ba4; background: #1e1f22; border: 1px solid #1e1f22; cursor: pointer; }
.dc-select__menu { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 2; padding: .3rem; border-radius: 4px; background: #2b2d31; box-shadow: 0 8px 16px rgb(0 0 0 / .4); }
.dc-select__menu span { display: block; padding: .45rem .6rem; border-radius: 3px; color: #dbdee1; }
.dc-select__menu span:hover { background: #35373c; }
.dc-select.is-open .dc-select__menu { display: block; animation: dc-in .2s var(--sn-ease); }
.dc-msg.is-ephemeral { margin: .3rem -.9rem 0; padding-left: .9rem; padding-right: .9rem; background: rgb(88 101 242 / .08); border-left: 2px solid #5865f2; }
.dc-msg.is-ephemeral .dc-msg__main::after { content: "👁 Только вы видите это сообщение"; display: block; margin-top: .3rem; font-size: .72rem; color: #949ba4; }
.dc-modal { display: grid; place-items: center; padding: 1rem 0 .3rem; animation: dc-in .3s var(--sn-ease); }
.dc-modal__box { width: min(100%, 380px); padding: 1rem; border-radius: 8px; background: #313338; box-shadow: 0 0 0 1px #1e1f22, 0 16px 40px rgb(0 0 0 / .5); display: grid; gap: .7rem; }
.dc-modal__box b { font-size: 1.1rem; color: #f2f3f5; }
.dc-modal__box label { display: grid; gap: .3rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; color: #b5bac1; }
.dc-modal__box label em { color: #f23f42; }
.dc-modal__box label span { height: 36px; border-radius: 3px; background: #1e1f22; }
.dc-modal__box label span.is-long { height: 72px; }
.dc-modal__foot { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .3rem; font-size: .85rem; }
.dc-modal__foot span { padding: .45rem 1rem; border-radius: 3px; color: #fff; }
.dc-modal__foot .is-primary { background: #5865f2; }
.dc-reset { position: absolute; top: .55rem; right: .6rem; display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 999px; font-size: .72rem; color: #dbdee1; background: #1e1f22; transition: background .2s; }
.dc-reset:hover { background: #404249; }

/* ---------------- small grids ---------------- */
.fn-mini, .ops, .directive-map, .ref-table { display: grid; gap: .45rem; }
.fn-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fn-mini > div, .directive-map > div, .ref-table > div { display: flex; flex-direction: column; gap: .2rem; padding: .6rem .8rem; border-radius: 12px; background: var(--sn-s1); border: 1px solid var(--sn-line); font-size: .86rem; color: var(--sn-muted); line-height: 1.45; }
.fn-mini code, .directive-map code, .ref-table code { align-self: flex-start; white-space: normal !important; overflow-wrap: anywhere; }
.ops { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ops > div { display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: .35rem .6rem; padding: .5rem .7rem; border-radius: 12px; background: var(--sn-s1); border: 1px solid var(--sn-line); font-size: .85rem; color: var(--sn-muted); }
/* An operator never breaks; when it and its label don't fit side by side, the label moves below. */
.ops code { font-weight: 700; flex: none; white-space: nowrap; }
.directive-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ref-table { grid-template-columns: 1fr; }
.ref-table > div { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ref-table > div > span { flex: none; max-width: 40%; text-align: right; }
.ref-table > div > code { background: transparent !important; border: 0 !important; padding: 0 !important; }

.btn-legend, .outcomes { display: grid; gap: .6rem; }
.btn-legend > div, .outcomes > div { display: grid; grid-template-columns: 110px 1fr; gap: .8rem; padding: .75rem .9rem; border-radius: 14px; background: var(--sn-s1); border: 1px solid var(--sn-line); font-size: .9rem; color: var(--sn-muted); }
.btn-legend b { color: var(--sn-text); }
.sw { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin: 0 .25rem 0 .5rem; vertical-align: -.05rem; }
.sw.is-primary { background: #5865f2; } .sw.is-success { background: #248046; } .sw.is-danger { background: #da373c; } .sw.is-secondary { background: #4e5058; }
.outcomes > div { grid-template-columns: auto 1fr; align-items: start; }
.outcomes small { display: block; margin-top: .25rem; font-size: .86rem; line-height: 1.55; }
.outcomes__n { width: 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; font: 700 .9rem var(--sn-display); color: var(--sn-on-ice); background: var(--sn-ice); }

.var-table { display: grid; gap: .8rem; }
.var-table__group { padding: 1rem 1.1rem; border-radius: 16px; background: var(--sn-s1); border: 1px solid var(--sn-line); }
.var-table__group > b { display: block; margin-bottom: .7rem; font-size: .95rem; }
.var-table__group > b i { color: var(--sn-ice); margin-right: .3rem; }
.var-table dl { display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: .45rem 1rem; font-size: .9rem; }
.var-table dt { font: 600 .82rem var(--sn-mono); color: var(--sn-ice-soft); }
.var-table dd { color: var(--sn-muted); }

.tabs-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.tabs-map > div { display: grid; align-content: start; gap: .3rem; padding: .85rem 1rem; border-radius: 14px; background: var(--sn-s1); border: 1px solid var(--sn-line); font-size: .88rem; color: var(--sn-muted); line-height: 1.55; }
.tabs-map b { color: var(--sn-text); }
.tabs-map b i { color: var(--sn-ice); width: 1.3rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips span { padding: .3rem .75rem; border-radius: 999px; font-size: .82rem; color: var(--sn-text); background: var(--sn-s2); border: 1px solid var(--sn-line); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.stat-grid > div { display: grid; gap: .25rem; padding: .9rem 1rem; border-radius: 14px; background: var(--sn-s1); border: 1px solid var(--sn-line); }
.stat-grid b { font: 600 1.3rem var(--sn-display); color: var(--sn-ice); }
.stat-grid span { font-size: .84rem; color: var(--sn-muted); line-height: 1.45; }

.clan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .5rem; }
.clan-grid > div { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; padding: .7rem .8rem; border-radius: 14px; background: var(--sn-s1); border: 1px solid var(--sn-line); transition: transform .3s var(--sn-ease), border-color .3s; }
.clan-grid > div:hover { transform: translateY(-2px); border-color: var(--sn-ice-a30); }
.clan-grid span { grid-row: span 2; font-size: 1.3rem; }
.clan-grid b { color: var(--sn-text); font-size: .9rem; }
.clan-grid small { color: var(--sn-subtle); font-size: .78rem; line-height: 1.4; }

.events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.events > div { display: grid; gap: .2rem; padding: .75rem .9rem; border-radius: 14px; background: var(--sn-s1); border: 1px solid var(--sn-line); }
.events code { justify-self: start; font-size: .75rem !important; }
.events b { color: var(--sn-text); font-size: .9rem; }
.events small { color: var(--sn-muted); font-size: .8rem; line-height: 1.45; }

.cmd-list { display: grid; border-radius: 16px; overflow: hidden; border: 1px solid var(--sn-line); background: var(--sn-s1); }
.cmd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .3rem 1rem; padding: .6rem .9rem; font-size: .88rem; }
.cmd + .cmd { border-top: 1px solid var(--sn-line); }
.cmd:hover { background: var(--sn-s2); }
.cmd__name { background: transparent !important; border: 0 !important; padding: 0 !important; color: var(--sn-ice) !important; font-weight: 600; white-space: normal !important; }
.cmd__name span { color: var(--sn-muted); font-weight: 500; }
.cmd__name span.is-opt { color: var(--sn-subtle); }
.cmd__desc { color: var(--sn-muted); }

.settings { border-radius: 16px; border: 1px solid var(--sn-line); background: var(--sn-s1); overflow: hidden; }
.settings__head { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; background: var(--sn-s2); font-size: .9rem; }
.settings__head i { color: var(--sn-ice); }
.settings__head span { margin-left: auto; font-size: .75rem; color: var(--sn-subtle); }
.settings ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem 1rem; padding: .7rem 1rem .8rem; }
.settings li { display: grid; grid-template-columns: auto 1fr; gap: 0 .55rem; padding: .3rem 0; font-size: .85rem; line-height: 1.45; }
.settings li b { font-weight: 500; color: var(--sn-text); }
.settings li small { grid-column: 2; color: var(--sn-subtle); font-size: .78rem; }
.settings__type { margin-top: .45rem; width: 8px; height: 8px; border-radius: 2px; background: var(--sn-ice); }
.settings__type.is-bool { border-radius: 50%; background: var(--sn-ok); }
.settings__type:is(.is-text, .is-textarea) { background: var(--sn-aurora); }
.settings__type:is(.is-channel, .is-channels, .is-voice_channel, .is-category) { background: var(--sn-warn); }
.settings__type:is(.is-role, .is-roles, .is-role_map) { background: var(--sn-danger); }
.settings__ph { padding: .6rem 1rem; border-top: 1px solid var(--sn-line); font-size: .8rem; color: var(--sn-muted); }
.settings__ph i { color: var(--sn-ice); margin-right: .3rem; }

.fn-mini > div code, .ref-table code { font-size: .8rem !important; }

/* anatomy of a function call */
.anatomy { padding: 1.2rem; border-radius: 18px; background: #0a1120; border: 1px solid #1d2940; font: 600 clamp(.95rem, 2.2vw, 1.25rem) var(--sn-mono); text-align: center; overflow-x: auto; }
.anatomy > span { display: inline-block; padding: .15rem .1rem; }
.a-brace { color: #64748b; } .a-p, .a-sep { color: #94a3b8; }
.a-fn { color: #7dd3fc; border-bottom: 2px solid #7dd3fc; }
.a-arg { color: #a5b4fc; border-bottom: 2px solid #a5b4fc; }
.a-str { color: #86efac; border-bottom: 2px solid #86efac; }
.anatomy__legend { margin-top: 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; font: 500 .8rem var(--sn-font); color: #94a3b8; }
.anatomy__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; background: currentColor; }
.anatomy__legend i.a-fn { color: #7dd3fc; } .anatomy__legend i.a-arg { color: #a5b4fc; } .anatomy__legend i.a-str { color: #86efac; }

/* blocks illustration */
.blocks-demo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.1fr); gap: 1rem; align-items: center; padding: 1rem; border-radius: 20px; background: var(--sn-s1); border: 1px solid var(--sn-line); }
.blocks-demo__arrow { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--sn-on-ice); background: var(--sn-ice); box-shadow: var(--sn-glow); }
.blocks-demo__blocks { display: grid; gap: 6px; padding: .9rem; border-radius: 16px; background: #0a0d15 radial-gradient(rgb(148 163 184 / .12) 1px, transparent 1.2px) 0 0 / 18px 18px; }
.bk, .bk-hat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .35);
  background: linear-gradient(180deg, rgb(255 255 255 / .2), transparent 50%), linear-gradient(135deg, color-mix(in srgb, var(--c) 62%, transparent), color-mix(in srgb, var(--c) 34%, transparent));
  border: 1px solid color-mix(in srgb, var(--c) 55%, rgb(255 255 255 / .45)); }
.bk-hat { margin-top: 6px; border-radius: 16px 16px 8px 8px; font-size: 13px; }
.bk-hat:first-child { margin-top: 0; }
.bk { margin-left: 14px; }
.bk-in { padding: 2px 8px; border-radius: 8px; font-weight: 600; background: rgb(5 7 14 / .45); border: 1px solid rgb(255 255 255 / .22); }
.bk-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 55%, transparent); border: 1px solid color-mix(in srgb, var(--c) 60%, #fff); }
.bk-dd { padding: 2px 8px; border-radius: 8px; background: rgb(0 0 0 / .3); }

/* projects */
.project-steps { position: relative; display: grid; gap: 1rem; }
.project-steps::before { content: ""; position: absolute; left: 1.2rem; top: 1rem; bottom: 1rem; width: 2px; background: linear-gradient(var(--sn-ok), var(--sn-ice), var(--sn-aurora)); opacity: .5; }
.pstep { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 1rem; margin-top: 1.4rem; }
.pstep__n { position: relative; z-index: 1; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font: 700 1.05rem var(--sn-display); color: var(--sn-on-ice); background: var(--sn-ice); box-shadow: 0 0 0 6px var(--sn-bg), var(--sn-glow); }
.pstep h3 { margin-top: .2rem !important; padding-left: 0 !important; }
.pstep h3::before { display: none; }
.pstep p { margin-top: .4rem; }
.project-steps > .example { margin-left: 3.4rem; }

/* reference */
.ref-filter { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-radius: 14px; background: var(--sn-s1); border: 1px solid var(--sn-line-2); }
.ref-filter i { color: var(--sn-ice); }
.ref-filter input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--sn-text); font-size: .95rem; }
.ref-filter span { font: .78rem var(--sn-mono); color: var(--sn-subtle); }
.ref { display: grid; gap: 1.6rem; margin-top: 1.2rem; }
.ref__group h3 { margin-top: 0 !important; }
.ref__rows { display: grid; margin-top: .7rem; border-radius: 16px; overflow: hidden; border: 1px solid var(--sn-line); background: var(--sn-s1); }
.ref__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: .3rem 1.2rem; padding: .65rem .95rem; scroll-margin-top: 90px; }
.ref__row + .ref__row { border-top: 1px solid var(--sn-line); }
.ref__row:target, .ref__row.is-flash { animation: docs-flash 1.8s var(--sn-ease); }
@keyframes docs-flash { 0%, 40% { background: var(--sn-ice-a14); } }
.ref__sig { background: transparent !important; border: 0 !important; padding: 0 !important; color: #d6e2f0 !important; white-space: normal !important; overflow-wrap: anywhere; font-size: .82rem !important; }
html.light .ref__sig { color: var(--sn-text) !important; }
.ref__note { font-size: .86rem; color: var(--sn-muted); line-height: 1.55; }
.ref__note code { font-size: .8rem; }
[data-ref-row][hidden], [data-ref-group][hidden] { display: none; }

.faq { display: grid; gap: .5rem; }
.faq__item { border-radius: 14px; background: var(--sn-s1); border: 1px solid var(--sn-line); }
.faq__item summary { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; cursor: pointer; list-style: none; color: var(--sn-text); font-weight: 600; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary i { color: var(--sn-subtle); transition: transform .3s var(--sn-ease); }
.faq__item[open] summary i { transform: rotate(45deg); color: var(--sn-ice); }
.faq__item p { padding: 0 1rem .95rem; color: var(--sn-muted); animation: docs-open .3s var(--sn-ease); }

.docs-end { margin: 5rem 0 2rem; padding: clamp(1.5rem, 4vw, 2.6rem); border-radius: 26px; text-align: center; background: radial-gradient(120% 140% at 50% 0%, var(--sn-ice-a14), transparent 60%), var(--sn-s1); border: 1px solid var(--sn-ice-a14); }
.docs-end > i { font-size: 1.8rem; color: var(--sn-ice); }
.docs-end h2 { margin-top: .6rem; font: 600 1.6rem var(--sn-display); color: var(--sn-text); }
.docs-end p { margin: .7rem auto 1.4rem; max-width: 34rem; color: var(--sn-muted); }

/* ---------------- search palette ---------------- */
.docs-palette { position: fixed; inset: 0; z-index: 10000; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 1rem 1rem; background: rgb(2 6 18 / .6); animation: docs-fade .2s ease; }
.docs-palette[hidden] { display: none; }
@keyframes docs-fade { from { opacity: 0; } }
.docs-palette__box { width: min(100%, 640px); max-height: 70vh; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--sn-s1); border: 1px solid var(--sn-line-2); box-shadow: 0 40px 80px -30px rgb(0 0 0 / .8); animation: docs-pop .3s var(--sn-ease); }
@keyframes docs-pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.docs-palette__input { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--sn-line); }
.docs-palette__input i { color: var(--sn-ice); }
.docs-palette__input input, .ref-filter input { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; padding: 0; background: transparent !important; border: 0 !important; outline: none !important; box-shadow: none !important; color: var(--sn-text); font-size: 1.05rem; }
.docs input[type=search]::-webkit-search-cancel-button { display: none; }
.docs-palette__list { overflow-y: auto; padding: .4rem; }
.docs-palette__list li a { display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; padding: .6rem .75rem; border-radius: 12px; color: var(--sn-text); }
.docs-palette__list li a > i { grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--sn-ice); background: var(--sn-ice-a08); }
.docs-palette__list li a small { color: var(--sn-subtle); font-size: .78rem; }
.docs-palette__list li a mark { background: var(--sn-ice-a30); color: inherit; border-radius: 3px; }
.docs-palette__list li a.is-sel { background: var(--sn-s2); }
.docs-palette__empty { padding: 1.5rem; text-align: center; color: var(--sn-subtle); }

/* ---------------- floating buttons ---------------- */
.docs-top { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 60; width: 44px; height: 44px; border-radius: 14px; color: var(--sn-ice); background: var(--sn-s1); border: 1px solid var(--sn-line-2); box-shadow: var(--sn-shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .35s var(--sn-ease), border-color .2s; }
.docs-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.docs-top:hover { border-color: var(--sn-ice-a30); }
.docs-toc-btn, .docs-sheet-back { display: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .roadmap__head { grid-template-columns: 1fr; }
  .roadmap__meter { text-align: left; max-width: 260px; }
}
@media (max-width: 1023px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-nav {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 9000; max-height: 72vh; padding: 1rem 1.2rem calc(1.5rem + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0; background: var(--sn-s1); border-top: 1px solid var(--sn-line-2); box-shadow: 0 -24px 60px rgb(0 0 0 / .55);
    transform: translateY(105%); transition: transform .4s var(--sn-ease); visibility: hidden;
  }
  .docs-nav.is-open { transform: none; visibility: visible; }
  .docs-nav::before { content: ""; display: block; width: 44px; height: 4px; margin: 0 auto 1rem; border-radius: 4px; background: var(--sn-line-2); }
  .docs-sheet-back { display: block; position: fixed; inset: 0; z-index: 8999; background: rgb(2 6 18 / .55); animation: docs-fade .2s ease; }
  .docs-sheet-back[hidden] { display: none; }
  .docs-toc-btn {
    display: flex; align-items: center; gap: .55rem; position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 70;
    max-width: calc(100vw - 7rem); padding: .7rem 1.1rem; border-radius: 999px; transform: translateX(-50%);
    color: var(--sn-text); font-size: .88rem; font-weight: 600; background: var(--sn-s2); border: 1px solid var(--sn-line-2); box-shadow: var(--sn-shadow);
  }
  .docs-toc-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .docs-toc-btn i { color: var(--sn-ice); }
  .docs-top { bottom: calc(1rem + env(safe-area-inset-bottom)); right: 1rem; }
  .roadmap__track { grid-template-columns: 1fr; }
  .roadmap__stage::after { display: none; }
}
@media (max-width: 760px) {
  .cards-2, .cards-3, .fn-mini, .directive-map, .tabs-map, .events, .settings ul { grid-template-columns: minmax(0, 1fr); }
  .cmd { grid-template-columns: 1fr; }
  .var-table dl { grid-template-columns: 1fr; gap: .1rem; }
  .var-table dd { margin-bottom: .45rem; }
  .ref__row { grid-template-columns: 1fr; }
  .ref-table > div { flex-direction: column; }
  .ref-table > div > span { max-width: none; text-align: left; }
  .btn-legend > div { grid-template-columns: 1fr; gap: .2rem; }
  .blocks-demo { grid-template-columns: minmax(0, 1fr); }
  .blocks-demo__arrow { justify-self: center; transform: rotate(90deg); }
  .project-steps > .example { margin-left: 0; }
  .project-steps::before { display: none; }
  .example { padding: .7rem; margin-left: -.25rem; margin-right: -.25rem; }
  .dc { padding: .7rem .6rem; font-size: 14px; }
  .dc-msg { grid-template-columns: 32px minmax(0, 1fr); gap: 0 .6rem; }
  .dc-avatar { width: 32px; height: 32px; }
  .dc-embed { grid-template-columns: minmax(0, 1fr); padding: .55rem .7rem .7rem; }
  .dc-embed__thumb { display: none; }
  .code pre { font-size: 12px; padding: .75rem .8rem; }
  .docs-stats { gap: 1rem 1.8rem; }
  .docs-stats dd { font-size: 1.3rem; }
  .chapter__icon { width: 44px; height: 44px; border-radius: 14px; }
  .steps { padding-left: 2.5rem; }
  .steps li::before { left: -2.5rem; }
  .steps::before { left: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .chip-float, .hero-card, .dc-msg.is-bot, .task__body, .docs-palette, .docs-palette__box, .example__label small::before { animation: none !important; opacity: .8; }
  .docs-nav, .docs-top, .card, .roadmap__stage a { transition: none !important; }
}

/* light theme: code panels and Discord stay dark on purpose */
html.light .chip-float { background: rgb(255 255 255 / .85); }

/* «Открыть в редакторе» under every example */
.example__foot { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.example__foot .example__note { flex: 1 1 16rem; }
.example__open { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; padding: .35rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 600; color: #7dd3fc; background: rgba(56, 189, 248, .1); border: 1px solid rgba(56, 189, 248, .3); text-decoration: none; transition: background .15s, transform .15s; }
.example__open:hover { background: rgba(56, 189, 248, .2); transform: translateY(-1px); }
html.light .example__open { color: #075985; background: #e0f2fe; border-color: #7cc4e8; }
/* English docs: the Russian command name under the English one */
.cmd__ru { display: inline-block; margin-left: .35rem; font-size: .72em; opacity: .55; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Memory chapter: the "address" of a stored record, and plain bullet lists in chapter text. */
.doc-list { display: grid; gap: .55rem; padding-left: 1.2rem; list-style: disc; margin: 1rem 0; color: var(--sn-muted); line-height: 1.6; }
.doc-list b { color: var(--sn-text); }
.mem-addr { display: grid; gap: .6rem; margin: 1rem 0; }
.mem-addr__row { display: flex; flex-wrap: wrap; align-items: stretch; gap: .45rem; padding: .7rem; border-radius: 14px; background: var(--sn-s1); border: 1px solid var(--sn-line); }
.mem-addr__tag { align-self: center; min-width: 7.5rem; font: 700 .82rem var(--sn-mono, ui-monospace, monospace); color: var(--sn-ice); }
.mem-addr__part { display: flex; flex-direction: column; justify-content: center; gap: .1rem; padding: .35rem .6rem; border-radius: 10px; font-size: .8rem; color: var(--sn-muted); border: 1px dashed var(--sn-line-2); }
.mem-addr__part small { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--sn-text); opacity: .75; }
.mem-addr__part.is-key { border-style: solid; border-color: color-mix(in srgb, var(--sn-ice) 55%, transparent); background: var(--sn-ice-a14); }
.mem-addr__plus, .mem-addr__eq { align-self: center; font-weight: 800; color: var(--sn-muted); }
.mem-addr__val { align-self: center; padding: .35rem .7rem; border-radius: 10px; font: 700 .85rem var(--sn-mono, ui-monospace, monospace); color: var(--sn-text); background: color-mix(in srgb, var(--sn-ok, #34d399) 16%, transparent); }
@media (max-width: 640px) {
  .mem-addr__tag { min-width: 100%; }
  .mem-addr__part { flex: 1 1 100%; }
  .mem-addr__plus { display: none; }
}
.mem-addr__part code { align-self: flex-start; }
.dc-emoji { display: inline-block; width: 1.375em; height: 1.375em; object-fit: contain; vertical-align: -0.3em; }
