/* docs.aimixmedia.site — readable, semantic, same palette as the main site */
:root { --bg: #ffffff; --surface: #ffffff; --surface-2: #f7f7f8; --surface-3: #efeff1; --border: #e4e4e7; --text: #111111; --dim: #5c5c66; --violet: #111111; --blue: #27272a; --mint: #1a7f4b; --orange: #52525b; --pink: #b42318;
  --rainbow: linear-gradient(90deg, #111111, #111111); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: #111111; text-decoration: none; } a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 12px 22px; background: rgba(255,255,255,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 800; font-size: 1.05em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; margin-left: 1px; }
.brand .muted { color: var(--dim); font-weight: 600; font-size: .85em; margin-left: 4px; }
.brand-mark { width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(from 0deg, #d4d4d8, #111111); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.mnav { display: none; }
.layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); max-width: 1280px; margin: 0 auto; }
.side { position: sticky; top: 57px; align-self: start; height: calc(100vh - 57px); overflow-y: auto; padding: 22px 14px 40px 22px; border-right: 1px solid var(--border); font-size: .92em; }
.side h2, .mnav h2 { font-size: .72em; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); margin: 18px 0 6px 10px; }
.side section:first-child h2 { margin-top: 0; }
.side ul, .mnav ul { list-style: none; margin: 0; padding: 0; }
.side a, .mnav a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--text); opacity: .85; overflow-wrap: anywhere; }
.side a:hover, .mnav a:hover { background: var(--surface-2); text-decoration: none; opacity: 1; }
.side a[aria-current="page"], .mnav a[aria-current="page"] { background: var(--surface-3); opacity: 1; box-shadow: inset 3px 0 0 var(--violet); font-weight: 600; }
.m { display: inline-block; min-width: 38px; font: 700 .72em/1.6 ui-monospace, monospace; padding: 0 5px; border-radius: 5px; text-align: center; margin-right: 4px; vertical-align: 1px; }
.m-get { background: rgba(16,217,154,.14); color: var(--mint); } .m-post { background: rgba(17,17,17,0.072); color: #27272a; }
main { padding: 26px 40px 60px; min-width: 0; }
article { max-width: 860px; }
.page-tools { max-width: 860px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-bottom: 4px; }
.tool { font-family: inherit; font-size: .85em; font-weight: 600; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 13px; cursor: pointer; }
.tool:hover { border-color: var(--violet); text-decoration: none; }
.tool.ok { border-color: var(--mint); color: var(--mint); }
article h1 { font-size: clamp(1.6em, 4.5vw, 2.25em); line-height: 1.2; margin: 6px 0 10px; letter-spacing: -.01em; overflow-wrap: anywhere; }
article h2 { font-size: 1.45em; margin: 38px 0 12px; padding-top: 6px; border-top: 1px solid var(--border); scroll-margin-top: 70px; }
article h3 { font-size: 1.15em; margin: 26px 0 10px; scroll-margin-top: 70px; }
.anchor { color: var(--dim); opacity: 0; margin-left: -.9em; padding-right: .25em; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor { opacity: .7; text-decoration: none; }
/* (v5) first blockquote is no longer the lead: the lead is rendered as p.lead */
blockquote { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--orange); background: rgba(255,149,0,.06); border-radius: 0 10px 10px 0; }
blockquote p { margin: 0; }
p, ul, ol { margin: 0 0 14px; } li { margin-bottom: 5px; }
:not(pre) > code { background: var(--surface-3); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .86em; overflow-wrap: anywhere; }
pre { position: relative; background: #f6f6f7; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font-size: .84em; line-height: 1.55; margin: 0 0 18px; color: #1f1f23; }
pre code { background: none; border: 0; padding: 0; }
.copy { position: absolute; top: 8px; right: 8px; font-family: inherit; font-size: .78em; font-weight: 600; line-height: 1; padding: 6px 9px; border-radius: 8px; background: var(--surface-3); color: var(--dim); border: 1px solid var(--border); cursor: pointer; opacity: .85; }
.copy:hover { color: var(--text); border-color: var(--violet); }
.tbl { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--border); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .9em; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--surface-2); color: var(--dim); font-weight: 700; font-size: .85em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; }
strong { color: #fff; }
.pager { max-width: 860px; display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pager a { padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 600; font-size: .92em; }
.pager a:hover { border-color: var(--violet); text-decoration: none; }
footer { max-width: 860px; margin-top: 30px; color: var(--dim); font-size: .85em; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  main { padding: 16px 16px 50px; }
  .top { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .mnav { display: block; order: 3; width: 100%; }
  .mnav summary { cursor: pointer; list-style: none; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-weight: 600; font-size: .92em; }
  .mnav summary::-webkit-details-marker { display: none; }
  .mnav summary::before { content: '☰  '; }
  .mnav nav { max-height: 65vh; overflow-y: auto; padding: 8px 0; }
  .page-tools { justify-content: stretch; } .tool { flex: 1; text-align: center; }
  td:first-child { white-space: normal; }
  pre { font-size: .8em; }
}
/* v3: lang switch, TOC, try-it */
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; font-size: .8em; font-weight: 700; margin: 0 4px; }
.lang a, .lang span { padding: 6px 9px !important; border-radius: 0 !important; line-height: 1.2; }
.lang span { background: var(--surface-3); color: var(--text); }
.lang a { color: var(--dim) !important; }
.lang a:hover { color: var(--text) !important; background: var(--surface-2); text-decoration: none; }
.layout.has-toc { grid-template-columns: 270px minmax(0, 1fr) 220px; max-width: 1440px; }
.toc-col { position: sticky; top: 57px; align-self: start; max-height: calc(100vh - 57px); overflow-y: auto; padding: 28px 18px 40px 6px; font-size: .84em; }
.toc h2 { font-size: .78em; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); margin: 0 0 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li { margin: 0; }
.toc a { display: block; padding: 4px 10px; color: var(--dim); margin-left: -1px; border-left: 2px solid transparent; overflow-wrap: anywhere; }
.toc .toc-3 a { padding-left: 22px; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.on { color: var(--text); border-left-color: var(--violet); }
.tryit { margin: 0 0 26px; padding: 16px 18px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); display: grid; gap: 8px; }
.try-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.try-head b { font-size: 1.05em; margin-right: 6px; }
.tryit label { font-size: .85em; font-weight: 600; color: var(--dim); margin-top: 4px; }
.tryit input[type=text], .tryit input[type=password], .tryit textarea { width: 100%; font: .88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); background: #f6f6f7; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.tryit textarea { resize: vertical; min-height: 150px; }
.tryit input:focus, .tryit textarea:focus { outline: none; border-color: var(--violet); }
.tryit input[type=file] { font-size: .88em; color: var(--dim); }
.try-q { display: flex; align-items: center; gap: 6px; } .try-q span { color: var(--dim); font-family: ui-monospace, monospace; }
.try-note { margin: 0; font-size: .8em; color: var(--dim); } .try-note.warn { color: var(--orange); }
.tool.primary { justify-self: start; color: #fff; border: 0; background: #111111; padding: 10px 16px; margin-top: 6px; }
.tool.primary:disabled { opacity: .6; cursor: wait; }
.try-out pre { margin: 6px 0 0; max-height: 420px; }
.try-status { font: 600 .85em/1.4 ui-monospace, monospace; color: var(--dim); }
.try-status.ok { color: var(--mint); } .try-status.err { color: var(--pink); }
@media (max-width: 1200px) { .layout.has-toc { grid-template-columns: 270px minmax(0, 1fr); } .toc-col { display: none; } }
@media (max-width: 900px) { .layout.has-toc { grid-template-columns: minmax(0, 1fr); } .sright .lang { display: inline-flex; } .tool.primary { flex: none; } }
/* v4: code tabs, mode tabs */
.ctabs { margin: 0 0 18px; border: 1px solid var(--border); border-radius: 12px; background: #f6f6f7; overflow: hidden; }
.ctabs-bar { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--border); background: var(--surface); overflow-x: auto; }
.ctabs-bar button { font: 600 .82em/1 inherit; font-family: inherit; color: var(--dim); background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 12px 10px; cursor: pointer; white-space: nowrap; }
.ctabs-bar button:hover { color: var(--text); }
.ctabs-bar button.on { color: var(--text); border-bottom-color: var(--violet); }
.ctabs pre { margin: 0; border: 0; border-radius: 0; }
.ctabs-pane[data-off] { display: none; }
.mode-tabs { display: flex; gap: 4px; padding: 4px; margin: 28px 0 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); width: max-content; max-width: 100%; overflow-x: auto; position: sticky; top: 64px; z-index: 5; }
.mode-tabs a { padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: .92em; color: var(--dim); white-space: nowrap; }
.mode-tabs a:hover { color: var(--text); text-decoration: none; }
.mode-tabs a.on { color: #fff; background: #111111; }
.mode-pane > h2:first-child { border-top: 0; margin-top: 14px; }
@media (max-width: 900px) { .mode-tabs { width: 100%; top: 110px; } .mode-tabs a { flex: 1; text-align: center; } }
/* v5: redesign — calmer reading column, cards, header card, callouts, zebra tables */
body { font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.7; }
main { padding: 30px 48px 70px; }
article, .page-tools, .pager, footer { max-width: 760px; }
article { font-size: 1.02em; }
article h1 { font-size: clamp(1.7em, 4.6vw, 2.4em); font-weight: 800; letter-spacing: -.02em; margin: 4px 0 10px; }
article h2 { font-size: 1.5em; font-weight: 800; letter-spacing: -.01em; margin: 46px 0 14px; padding-top: 22px; }
article h3 { font-size: 1.12em; font-weight: 700; margin: 28px 0 10px; }
.lead { color: var(--dim); font-size: 1.14em; line-height: 1.6; margin: 0 0 26px; }
article p, article li { color: #1f1f23; }
article ul li::marker { color: var(--violet); }
.side { padding-top: 24px; }
.side h2 { color: #6b6b73; }
.side a { padding: 6px 12px; }
.side a[aria-current="page"], .mnav a[aria-current="page"] { background: #f4f4f5; box-shadow: inset 3px 0 0 var(--violet); color: #fff; }
.side-home { margin-bottom: 8px; }
/* code */
pre { background: #f6f6f7; border-radius: 14px; padding: 16px 18px; padding-right: 92px; font-size: .86em; box-shadow: inset 0 1px 0 rgba(0,0,0,.03); }
.ctabs { border-radius: 14px; background: #f6f6f7; }
.ctabs pre { padding-right: 92px; }
.copy { top: 10px; right: 10px; padding: 7px 11px; border-radius: 9px; }
/* tables: bordered + zebra */
.tbl { border-radius: 14px; background: var(--surface); }
th { background: var(--surface-3); color: #1f1f23; text-transform: none; letter-spacing: 0; }
tbody tr:nth-child(even) td { background: rgba(0,0,0,.022); }
tbody tr:hover td { background: rgba(17,17,17,0.03); }
td { line-height: 1.55; }
td code, th code { white-space: nowrap; }
/* callouts (every blockquote in the body) */
blockquote, .callout { position: relative; margin: 20px 0; padding: 14px 18px 14px 50px; border: 1px solid rgba(17,17,17,0.14); border-left: 1px solid rgba(17,17,17,0.14); background: rgba(17,17,17,0.032); border-radius: 14px; color: #e3e1ec; }
blockquote::before, .callout::before { content: 'i'; position: absolute; left: 16px; top: 15px; width: 22px; height: 22px; border-radius: 50%; background: var(--violet); color: #fff; font: 700 13px/22px Georgia, serif; text-align: center; }
.callout p { margin: 0; }
/* home */
.is-home main article { max-width: 980px; }
.home-hero { padding: 14px 0 6px; }
.home-hero h1 { font-size: clamp(1.9em, 5vw, 2.8em); }
.hcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 10px; }
.hcard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); color: var(--text); transition: border-color .2s, transform .2s; }
.hcard:hover { text-decoration: none; border-color: rgba(17,17,17,0.24); transform: translateY(-2px); }
.hcard b { font-size: 1.15em; }
.hcard span:not(.hcard-ic) { color: var(--dim); font-size: .94em; line-height: 1.5; padding-right: 20px; }
.hcard i { position: absolute; right: 20px; top: 22px; font-style: normal; color: var(--dim); }
.hcard-main { grid-column: 1 / -1; background: #f4f4f5; border-color: rgba(17,17,17,0.18); }
.hcard-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); border: 1px solid var(--border); margin-bottom: 4px; }
.hcard-main .hcard-ic { background: #111111; border-color: transparent; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.mcard { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); }
.mcard:hover { text-decoration: none; border-color: rgba(17,17,17,0.24); }
.mcard img { border-radius: 10px; background: var(--surface-3); padding: 4px; flex: 0 0 auto; }
.mcard-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mcard-t small { color: var(--dim); font-size: .82em; }
.mcard-p { text-align: right; font-weight: 800; white-space: nowrap; display: flex; flex-direction: column; }
.mcard-p small { color: var(--dim); font-weight: 600; font-size: .75em; }
/* model header card */
.mhead { margin: 4px 0 26px; padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface-2); }
.mhead-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mhead-top img { border-radius: 12px; background: var(--surface-3); padding: 6px; }
.mhead-top h1 { margin: 0; font-size: clamp(1.5em, 4.5vw, 2.1em); }
.mhead-vendor { color: var(--dim); font-size: .9em; }
.mhead-price { margin-left: auto; display: flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.mhead-price b { font-size: 1.3em; background: #111111; -webkit-background-clip: text; background-clip: text; color: transparent; }
.mhead-price small { color: var(--dim); }
.mhead .lead { margin: 14px 0 12px; font-size: 1.05em; }
.mhead-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 30px; border: 1px solid var(--border); background: var(--surface-2); font-size: .86em; color: var(--dim); }
.chip b { color: var(--text); }
/* mobile menu button */
.mnav summary { display: flex; align-items: center; gap: 10px; }
.mnav-ic { display: inline-flex; flex-direction: column; gap: 3px; } .mnav-ic i { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--text); }
.mnav summary::before { content: none !important; }
.mnav-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnav[open] summary { border-color: var(--violet); }
@media (max-width: 900px) {
  main { padding: 18px 16px 50px; }
  .mnav summary { padding: 11px 14px; border-radius: 12px; }
  .hcards, .mcards { grid-template-columns: minmax(0, 1fr); }
  .mhead { padding: 16px; }
  .mhead-price { margin-left: 0; width: 100%; }
  pre, .ctabs pre { padding-right: 16px; padding-top: 44px; }
  article { font-size: 1em; }
}
/* v6: compact sidebar so every group (incl. «Полезное») fits on screen without inner scrolling */
.side { padding: 18px 12px 24px 18px; font-size: .9em; line-height: 1.45; }
.side h2 { margin: 12px 0 3px 12px; }
.side a { padding: 4px 12px; }
.side-home { margin-bottom: 2px; }
/* ===== Site top menu (same as ai.aimixmedia.site) ===== */
.top { gap: 14px; }
.top .brand-mark { width: 30px; height: 30px; }
.top .ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.snav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.snav a { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); font-weight: 700; font-size: .93em; padding: 8px 12px; border-radius: 10px; }
.snav a:hover, .snav a.on { color: var(--text); background: var(--surface-2); text-decoration: none; }
.sright { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sauth { display: flex; align-items: center; gap: 8px; }
.sbtn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .9em; white-space: nowrap; }
.sbtn:hover { border-color: var(--violet); text-decoration: none; }
.sbtn.primary { border-color: transparent; background: #111111; color: #fff; }
.sbtn.mint { border-color: transparent; background: var(--mint); color: #fff; }
.sbal { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 30px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-weight: 800; white-space: nowrap; }
.sbal:hover { text-decoration: none; border-color: var(--mint); }
.sbal .ico { color: var(--mint); }
.sbal b { background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mnav .msite { margin-bottom: 6px; }
.mnav .msite a { display: flex; align-items: center; gap: 9px; }
[data-user][hidden] { display: none !important; }
.back-site { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 16px; border-radius: 12px; background: #111111; color: #fff; font-weight: 700; }
.back-site:hover { text-decoration: none; filter: brightness(1.08); }
.back-site .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1100px) { .snav a { padding: 8px 9px; } .snav a span { font-size: .95em; } }
@media (max-width: 900px) {
  .snav { display: none; }
  .top { padding: 10px 14px; }
  .sauth .sbtn span, .sauth .sadmin span { display: none; }
  .sauth .sbtn.primary span { display: inline; }
}
@media (max-width: 420px) { .sauth .sbtn.primary span { display: none; } .sright { gap: 6px; } .top .brand { font-size: .98em; } }

/* header v2: one row, stacked admin/top-up, profile menu (same as the site) */
.top { flex-wrap: nowrap; }
.snav { flex-wrap: nowrap; gap: 2px; }
.snav a { padding: 8px 10px; white-space: nowrap; }
.hstack { display: flex; flex-direction: column; gap: 3px; }
.hstack.two .sbtn { padding: 3px 10px; font-size: .74em; border-radius: 8px; gap: 5px; }
.hstack.two .ico { width: 13px; height: 13px; }
.pmenu summary.who { align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid var(--border); background: #fff; }
.who-name { font-weight: 800; font-size: .88em; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-wrap { position: relative; width: 32px; height: 32px; flex: none; }
img.avatar { width: 32px; height: 32px; object-fit: cover; display: block; }
.av-tg { background: #229ED9; color: #fff; }
.av-gh { background: #24292f; color: #fff; }
.avatar .brand-logo, .prov .brand-logo { width: 20px; height: 20px; }
.prov { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.snav .admin-nav { margin-left: 4px; color: #9a3412; background: #fff1f2; border: 1px solid #fecdd3; }
.snav .admin-nav:hover { color: #9f1239; background: #ffe4e6; text-decoration: none; }
@media (max-width: 420px) { .who-name { display: none; } .pmenu summary.who { padding: 0; border: 0; background: none; } }
.pmenu { position: relative; }
.pmenu summary { list-style: none; cursor: pointer; display: flex; }
.pmenu summary::-webkit-details-marker { display: none; }
.pmenu[open] .avatar, .pmenu summary:hover .avatar { border-color: var(--violet); }
.pmenu-list { position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; padding: 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(0,0,0,.08); z-index: 100; display: flex; flex-direction: column; }
.pmenu-name { padding: 8px 10px 6px; font-weight: 800; font-size: .9em; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmenu-list a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 10px; color: var(--text); font-weight: 700; font-size: .92em; }
.pmenu-list a:hover { background: var(--surface-3); text-decoration: none; }
.pmenu-list .ico { color: var(--dim); }
@media (max-width: 1180px) { .snav a .ico { display: none; } }
@media (max-width: 1060px) { .top { padding-left: 14px; padding-right: 14px; gap: 8px; } .snav a { padding: 8px; font-size: .9em; } }
@media (max-width: 900px) { .top { flex-wrap: wrap; } .pmenu { display: none; } }
@media (max-width: 420px) { .hstack.two .sbtn span { display: none; } }

/* brand: same component as the site (logo in a rainbow ring, two lines) */
.top .brand { gap: 11px; }
.top .brand-mark { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(90deg, #111111, #111111); padding: 2px; flex-shrink: 0; -webkit-mask: none; mask: none; }
.top .brand-mark i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #000 url('/static/img/logo.jpg') no-repeat center; background-size: cover; }
.brand-name { display: inline-flex; flex-direction: column; line-height: 1.05; font-weight: 800; }
.brand-name .brand-api { display: block; font-size: .92em; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== light theme (black & white) ===== */
html { color-scheme: light; }
strong { color: var(--text); }
article p, article li { color: #27272a; }
.side a[aria-current="page"], .mnav a[aria-current="page"] { background: var(--surface-3); box-shadow: inset 3px 0 0 #111; color: var(--text); }
.brand b, .brand-name .brand-api { background: none; color: #6b6b73; -webkit-text-fill-color: #6b6b73; }
.top .brand-mark { background: #e4e4e7; }
.brand-mark { -webkit-mask: none; mask: none; }
pre, .ctabs { box-shadow: none; }
blockquote, .callout { border-color: var(--border); background: var(--surface-2); }
blockquote::before, .callout::before { background: #111; color: #fff; }
.hcard-main .hcard-ic { background: #111; color: #fff; }
.hcard:hover, .mcard:hover { border-color: #a1a1aa; }
.sbtn.mint { background: #111; color: #fff; }
tbody tr:nth-child(even) td { background: #fafafa; }
tbody tr:hover td { background: #f4f4f5; }
th { color: #27272a; }
.m-get { background: rgba(26,127,75,.1); } .m-post { background: var(--surface-3); color: var(--text); }
a { color: #111; text-decoration: underline; text-decoration-color: #c4c4cc; text-underline-offset: 2px; }
.top a, .side a, .mnav a, .hcard, .mcard, .sbtn, .back-site, .tool, .ctabs a, .mode-tabs a, .pmenu a, .brand { text-decoration: none; }
