/* Arcanum.Life East и API — общий стиль. Основа: тёмное небо сайта (#070B1A), шафран и нефрит. */
/* Шрифты лежат на нашем сервере (/static/east-fonts, лицензия SIL OFL) — без обращений к Google Fonts. */
@font-face { font-family: "Golos Text"; src: url("/static/east-fonts/GolosText.ttf") format("truetype");
  font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Philosopher"; src: url("/static/east-fonts/Philosopher-Bold.ttf") format("truetype");
  font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/east-fonts/JetBrainsMono.ttf") format("truetype");
  font-weight: 100 800; font-display: swap; }
:root {
  --ink: #070b1a;
  --night: #0e1533;
  --night-2: #141c40;
  --line: #27315c;
  --text: #ece6d8;
  --muted: #a5adca;
  --saffron: #f2a93b;
  --saffron-ink: #2a1702;
  --jade: #63d2b0;
  --rose: #e58aa0;
  --gold: #f1cf7a; /* заголовки и ссылки — как на странице West */
  --radius-s: 6px;
  --radius-l: 18px;
  --display: "Philosopher", Georgia, serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --code: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 400 17px/1.6 var(--body);
  background-image: radial-gradient(1200px 600px at 85% -10%, #1a2352 0%, transparent 60%);
  background-repeat: no-repeat;
}
a { color: var(--saffron); text-underline-offset: 3px; }
a:hover { color: #ffc56b; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--saffron); color: var(--saffron-ink); padding: 8px 14px; border-radius: var(--radius-s); z-index: 10; }
.skip:focus { left: 16px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 5; background: rgba(7, 11, 26, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.logo { font: 700 21px/1 var(--display); color: var(--text); text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.logo b { color: var(--saffron); font-weight: 700; }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.langs { display: flex; gap: 2px; font-size: 13px; }
.langs a { color: var(--muted); text-decoration: none; padding: 4px 7px; border-radius: var(--radius-s); }
.langs a[aria-current] { color: var(--text); background: var(--night-2); }
@media (max-width: 900px) { .nav { display: none; } .langs { margin-left: auto; } .top .btn { display: none; } }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 16px/1 var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-main { background: var(--saffron); color: var(--saffron-ink); }
.btn-main:hover { background: #ffbd5a; color: var(--saffron-ink); }
.btn-ghost { color: var(--text); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.tg { width: 20px; height: 20px; flex: none; }

/* типографика */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0; color: var(--text); }
h1 { font-size: clamp(36px, 5.4vw, 64px); letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 18px; }
h3 { font-size: 22px; margin-bottom: 6px; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 36em; margin: 22px 0 30px; }
.sec { padding: clamp(64px, 9vw, 112px) 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.intro { color: var(--muted); max-width: 40em; margin: 0 0 40px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* герой страницы бота: колесо накшатр */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.wheel { position: relative; width: min(100%, 470px); margin-inline: auto; aspect-ratio: 1; }
.wheel svg { width: 100%; height: 100%; display: block; }
.wheel .seg { fill: none; stroke: var(--line); stroke-width: 1; }
.wheel .tick { stroke: #3a4680; stroke-width: 1.2; }
.wheel .ring { fill: none; stroke: #2f3a6b; }
.wheel .rashi { fill: var(--muted); font: 500 11px var(--body); }
.wheel .now { fill: var(--saffron); }
.wheel .arc { fill: none; stroke: var(--saffron); stroke-width: 10; stroke-linecap: round; opacity: .9; }
.wheel-cap { text-align: center; color: var(--muted); font-size: 15px; margin-top: 10px; min-height: 2.6em; }
.wheel-cap b { color: var(--text); font-weight: 600; }
.wheel-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.wheel-center span { font: 700 clamp(22px, 3vw, 30px)/1.1 var(--display); max-width: 7.5em; }
.wheel-center small { display: block; font: 400 13px var(--body); color: var(--muted); margin-top: 6px; }

/* системы: список, не сетка одинаковых карточек */
.systems { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
@media (max-width: 760px) { .systems { grid-template-columns: 1fr; } }
.sys { display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.sys .glyph { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--night-2); font-size: 24px; }
.sys p { margin: 4px 0 10px; color: var(--muted); }
.sys .free { font-size: 14px; color: var(--jade); }
.sys .paid { font-size: 14px; color: var(--saffron); }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: s; padding: 0; list-style: none; margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: s; padding-top: 16px; border-top: 2px solid var(--saffron); }
.steps li::before { content: counter(s); font: 700 34px/1 var(--display); color: var(--saffron); display: block; margin-bottom: 12px; }
.steps p { color: var(--muted); margin: 6px 0 0; }

/* точность */
.proof { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .proof { grid-template-columns: 1fr; } }
.proof dl { margin: 0; display: grid; gap: 18px; }
.proof dt { font-weight: 600; }
.proof dd { margin: 2px 0 0; color: var(--muted); }
.sample { background: var(--night); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px 24px; font-size: 15.5px; }
.sample .msg { white-space: pre-line; }
.sample .msg b { color: var(--text); }
.sample .from { color: var(--muted); font-size: 13px; margin-bottom: 10px; }

/* цены */
.prices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .prices { grid-template-columns: 1fr; } }
.price { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; display: flex; flex-direction: column; gap: 8px; background: var(--night); }
.price.hot { border-color: var(--saffron); }
.price .amt { font: 700 34px/1.1 var(--display); }
.price .amt small { font: 400 15px var(--body); color: var(--muted); }
.price p { color: var(--muted); margin: 0; font-size: 15px; }
.price .btn { margin-top: auto; }
.note { color: var(--muted); font-size: 15px; margin-top: 22px; }

/* вопросы */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--saffron); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 12px 0 0; max-width: 48em; }

/* финал и подвал */
.final { text-align: center; }
.final .lead { margin-inline: auto; }
.final .actions { justify-content: center; }
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: grid; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--muted); }

/* ---------- страница API ---------- */
.api-hero .wrap { grid-template-columns: 1fr 1fr; }
@media (max-width: 960px) { .api-hero .wrap { grid-template-columns: 1fr; } }
.term { background: #050816; border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; min-width: 0; }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.term-bar .verb { font: 600 12px var(--code); color: var(--saffron-ink); background: var(--jade); padding: 2px 7px; border-radius: 4px; }
.term-bar .verb.post { background: var(--saffron); }
.term-bar .path { font-family: var(--code); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-bar .ms { margin-left: auto; color: var(--jade); font-family: var(--code); white-space: nowrap; }
pre { margin: 0; padding: 16px 18px; overflow: auto; font: 400 13.5px/1.55 var(--code); color: #cfd6f2; max-height: 440px; tab-size: 2; }
.j-k { color: #9fb4ff; } .j-s { color: var(--jade); } .j-n { color: var(--saffron); } .j-b { color: var(--rose); }

.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
@media (max-width: 900px) { .feats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feats { grid-template-columns: 1fr; } }
.feat { padding: 24px 0; border-top: 1px solid var(--line); }
.feat p { color: var(--muted); margin: 6px 0 0; font-size: 16px; }

/* документация */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr) minmax(0, 1.05fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: var(--night); }
@media (max-width: 1080px) { .docs { grid-template-columns: 210px minmax(0, 1fr); } .docs .code-col { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 720px) { .docs { grid-template-columns: 1fr; } .docs .ep-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 260px; } }
.ep-list { border-right: 1px solid var(--line); padding: 12px 0; overflow: auto; max-height: 760px; }
.ep-group { padding: 10px 18px 4px; font-size: 13px; color: var(--muted); }
.ep-btn { display: flex; gap: 8px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 7px 18px; font: 400 14px/1.35 var(--body); cursor: pointer; }
.ep-btn:hover { background: var(--night-2); }
.ep-btn[aria-current="true"] { background: var(--night-2); box-shadow: inset 3px 0 0 var(--saffron); }
.ep-btn .m { font: 600 10.5px var(--code); color: var(--jade); min-width: 32px; }
.ep-btn .m.post { color: var(--saffron); }
.ep-btn .lock { margin-left: auto; color: var(--muted); font-size: 12px; }
.ep-main { padding: 26px 28px; min-width: 0; }
.ep-main h3 { font-size: 24px; }
.ep-path { font: 500 14px var(--code); color: var(--text); background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; margin: 12px 0 16px; overflow-wrap: anywhere; }
.ep-path .m { color: var(--saffron); margin-right: 8px; }
.ep-main p { color: var(--muted); }
.params { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 14px; }
.params th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); }
.params td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.params code { font-family: var(--code); font-size: 13px; color: var(--text); }
.params .req { color: var(--saffron); font-size: 12px; }
.params .type { color: var(--muted); font: 12px var(--code); }
.auth-note { font-size: 14px; color: var(--muted); border-left: 2px solid var(--jade); padding-left: 12px; margin-top: 20px; }
.code-col { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; background: #050816; }
.tabs { display: flex; gap: 2px; padding: 10px 12px 0; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; color: var(--muted); font: 500 14px var(--body); padding: 8px 12px 10px; cursor: pointer; border-bottom: 2px solid transparent; }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--saffron); }
.copy { margin-left: auto; align-self: center; background: var(--night-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-s); font: 500 13px var(--body); padding: 5px 10px; cursor: pointer; margin-bottom: 8px; }
.copy.done { color: var(--jade); border-color: var(--jade); }
.resp-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.resp-bar .status { font-family: var(--code); color: var(--jade); }
.resp-bar .btn { margin-left: auto; }

/* тарифы API */
.billing { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 28px; }
.billing button { background: none; border: 0; color: var(--muted); font: 500 15px var(--body); padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.billing button[aria-pressed="true"] { background: var(--night-2); color: var(--text); }
.billing .save { color: var(--jade); font-size: 13px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 28px; background: var(--night); display: flex; flex-direction: column; gap: 10px; }
.plan.hot { border-color: var(--saffron); }
.plan ul { margin: 6px 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); font-size: 15.5px; }
.plan li::before { content: "✓"; color: var(--jade); margin-right: 10px; }
.plan .btn { margin-top: auto; }

/* ---------- единый вид с главной West ---------- */
h1, h2 { color: var(--gold); }
.logo { color: var(--gold); }
.logo b { color: var(--text); }
.nav a.other { color: var(--gold); }
.btn-main { background: linear-gradient(180deg, #ffd56b, #f2a93b); }
.btn-west { background: linear-gradient(180deg, #f8e7a8, #e9cf7c); color: var(--saffron-ink); }
.btn-west:hover { background: #fbefc4; color: var(--saffron-ink); }
.two-bots { color: var(--muted); font-size: 15.5px; max-width: 38em; margin: 22px 0 6px; }
.two-bots b { color: var(--text); }
.small { color: var(--muted); font-size: 14.5px; margin: 6px 0 0; }
.small a { color: var(--gold); }

/* карточки разделов со ссылкой в нужный раздел бота */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius-l);
  border: 1px solid rgba(241, 207, 122, .28); background: linear-gradient(160deg, #1b2a6b 0%, #141c48 60%, #10173a 100%); }
.card .cglyph { font-size: 30px; line-height: 1; color: var(--gold); margin-bottom: 6px; }
.card h3 { color: var(--gold); }
.card p { color: #cdd3ea; margin: 0; font-size: 15.5px; }
.card .free, .card .paid { font-size: 13px; }
.card-link { margin-top: auto; padding-top: 14px; color: var(--gold); font-weight: 600; text-decoration: underline; }
.card-link:hover { color: #fff1c4; }

/* таблица цен — как на West */
.ptable { width: 100%; border-collapse: collapse; }
.ptable th, .ptable td { text-align: left; padding: 20px 12px 20px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable thead th { color: var(--muted); font-weight: 500; font-size: 14px; padding-top: 0; }
.ptable tbody th { font: 700 22px/1.2 var(--display); color: var(--gold); width: 30%; }
.ptable td { color: #cdd3ea; }
.ptable .pr { text-align: right; white-space: nowrap; }
.ptable td.pr b { font-size: 22px; color: var(--text); }
.ptable td.pr small { display: block; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .ptable thead { display: none; } .ptable tr { display: grid; grid-template-columns: 1fr auto; }
  .ptable tbody th { grid-column: 1; border: 0; padding-bottom: 4px; } .ptable td.pr { grid-column: 2; grid-row: 1; border: 0; padding-bottom: 4px; }
  .ptable td:not(.pr) { grid-column: 1 / -1; padding-top: 0; } }
.pnotes { color: var(--muted); font-size: 15px; margin: 24px 0 0; padding-left: 20px; display: grid; gap: 8px; max-width: 52em; }
.pnotes li::marker { color: var(--saffron); }

/* ---------- страница API в стиле главной: шрифты Forum/Manrope и золото сайта ---------- */
@font-face { font-family: "Forum"; src: url("/static/fonts/forum.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope.woff") format("woff"); font-weight: 200 800; font-display: swap; }
:root { --display: "Forum", Georgia, serif; --body: "Manrope", "Segoe UI", Roboto, Arial, sans-serif; --gold: #F1D79C; --line: rgba(215, 181, 109, .22); }
body { background-image: none; }
h1, h2, h3 { font-weight: 400; }
.logo { font-weight: 400; font-size: 1.55rem; }
.btn-main { background: #f2a93b; color: #2a1702; }
.btn-main:hover { background: #f7c06b; }
.btn-west { background: #D7B56D; color: #070B1A; }
.btn-west:hover { background: #F1D79C; color: #070B1A; }
.langs a[aria-current] { color: #070B1A; background: #D7B56D; }
.term-bar .verb, .ep-btn .m, .params code, .ep-path, pre { font-family: var(--code); }
