/* Volod X Academy: графіт + помаранчевий, системний шрифт, без зовнішніх запитів */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efeeea;
  --text: #1b1b1d;
  --muted: #5b5b62;
  --line: #e1dfd9;
  --accent: #c2410c;       /* контраст з білим ~5.2 */
  --accent-ink: #ffffff;
  --accent-soft: #fff0e3;
  --accent-line: rgba(194, 65, 12, .35);
  --code-bg: #f3f2ee;
  --danger: #b4443f;
  --danger-soft: #fbeceb;
  --shadow: 0 10px 30px rgba(30, 20, 10, .10);
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --head: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111113;
    --surface: #1a1a1d;
    --surface-2: #232327;
    --text: #ececee;
    --muted: #a2a2aa;
    --line: #2e2e33;
    --accent: #fb923c;
    --accent-ink: #1a1208;
    --accent-soft: #2a1d12;
    --accent-line: rgba(251, 146, 60, .4);
    --code-bg: #0f0f11;
    --danger: #e2807b;
    --danger-soft: #2a1819;
    --shadow: 0 10px 34px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --bg: #111113;
  --surface: #1a1a1d;
  --surface-2: #232327;
  --text: #ececee;
  --muted: #a2a2aa;
  --line: #2e2e33;
  --accent: #fb923c;
  --accent-ink: #1a1208;
  --accent-soft: #2a1d12;
  --accent-line: rgba(251, 146, 60, .4);
  --code-bg: #0f0f11;
  --danger: #e2807b;
  --danger-soft: #2a1819;
  --shadow: 0 10px 34px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 18px; }
.wrap.wide { max-width: 1180px; }
.mono { font-family: var(--mono); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; text-decoration: none; letter-spacing: -0.01em; }
.mark { width: 24px; height: 24px; border-radius: 7px; background: var(--accent); position: relative; }
.mark::after { content: ""; position: absolute; left: 6px; top: 7px; width: 12px; height: 10px; border-left: 3px solid var(--accent-ink); border-top: 3px solid var(--accent-ink); transform: rotate(45deg) scale(.7); transform-origin: center; }
.theme { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.theme:hover { border-color: var(--accent); color: var(--accent); }

/* головна */
.hero { position: relative; padding: 52px 0 12px; }
.hero::before { content: ""; position: absolute; right: 0; top: -120px; width: 560px; height: 560px; background: radial-gradient(closest-side, rgba(251, 146, 60, .28), rgba(251, 146, 60, 0) 70%); pointer-events: none; }
.hero .wrap { position: relative; }
.kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .14em; color: var(--accent); font-weight: 700; }
.hero h1 { font-size: clamp(2.3rem, 9vw, 4rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 900; margin: 12px 0 14px; text-transform: uppercase; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0; max-width: 32em; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; font-family: var(--mono); font-size: .84rem; color: var(--muted); }
.stats b { color: var(--text); }
.sect { font-size: .86rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text); font-weight: 800; margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.sect::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.count, .pill { font-family: var(--mono); font-size: .72rem; font-weight: 600; border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; letter-spacing: .04em; color: var(--muted); order: 1; }
.catrow { margin: 40px 0 0; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 24px; grid-template-columns: 1fr; }
.gcard { display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none; height: 100%; }
.thumb { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1200 / 630; background: #17171a; transition: transform .18s, box-shadow .18s, border-color .18s; }
.thumb img { display: block; width: 100%; height: 100%; }
.gcard:hover .thumb { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(251, 146, 60, .22); }
.gtitle { font-weight: 800; font-size: 1.22rem; line-height: 1.25; letter-spacing: -0.01em; margin-top: 4px; }
.gcard:hover .gtitle { color: var(--accent); }
.gdesc { color: var(--muted); font-size: .96rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.soon { margin-bottom: 64px; }
.soon-card { display: flex; flex-direction: column; gap: 8px; border: 1.5px dashed var(--line); border-radius: 16px; padding: 22px; opacity: .8; }
.lockbox { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--muted); }

/* сторінка гайда */
.article { padding-top: 22px; }
.crumbs { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.layout { display: block; }
.cover { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 20px; border: 1px solid var(--line); background: #17171a; box-shadow: var(--shadow); }
.article h1 { font-size: clamp(1.45rem, 6vw, 2.5rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 900; text-transform: uppercase; margin: 28px 0 14px; overflow-wrap: break-word; hyphens: auto; }
.metaline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.metaline .mono { font-size: .78rem; }
.badge { font-family: var(--mono); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px; color: var(--text); }
.badge.lvl { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.by b { color: var(--text); }

.learn { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 20px 8px; margin: 0 0 26px; }
.learn h2 { font-size: .8rem; letter-spacing: .14em; margin: 0 0 14px; color: var(--accent); font-weight: 800; }
.learn ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px 28px; }
.learn li { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0 12px; line-height: 1.45; font-weight: 600; font-size: .98rem; }
.tick { flex: none; margin-top: 1px; }

.toc-m { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin: 0 0 28px; }
.toc-m summary { cursor: pointer; padding: 13px 16px; font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); list-style: none; display: flex; justify-content: space-between; }
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary::after { content: "+"; font-size: 1.1rem; line-height: 1; color: var(--accent); }
.toc-m[open] summary::after { content: "–"; }
.toc-m .toc-list { padding: 0 16px 14px; }

.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { line-height: 1.35; }
.toc-list a { display: block; text-decoration: none; color: var(--muted); font-size: .9rem; padding: 7px 0 7px 14px; border-left: 2px solid transparent; }
.toc-list li.l3 a { padding-left: 28px; font-size: .86rem; }
.toc-list a:hover { color: var(--text); }
.toc-list a.active { color: var(--text); font-weight: 700; border-left-color: var(--accent); }

.side { display: none; }

.prose { overflow-wrap: break-word; }
.prose h2 { display: flex; gap: 14px; align-items: baseline; font-size: clamp(1.25rem, 4.9vw, 1.85rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 900; text-transform: uppercase; margin: 2.3em 0 .7em; hyphens: auto; }
.prose h2 .hn { font-family: var(--mono); font-size: .62em; letter-spacing: 0; color: var(--accent); font-weight: 700; flex: none; transform: translateY(-.12em); }
.prose h3 { font-size: 1.12rem; margin: 1.9em 0 .55em; font-weight: 800; letter-spacing: .01em; }
.prose h3::before { content: "// "; color: var(--accent); font-family: var(--mono); }
.prose p { margin: 0 0 1.1em; }
.prose ul { list-style: none; padding: 0; margin: 0 0 1.2em; }
.prose ul li { position: relative; padding-left: 26px; margin-bottom: .5em; }
.prose ul li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 12px; height: 2px; background: var(--accent); border-radius: 2px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border-radius: 5px; padding: 1px 5px; }
.prose strong { font-weight: 800; }

/* нумеровані кроки */
ol.steps { list-style: none; counter-reset: st; margin: 1.3em 0 1.6em; padding: 0; }
ol.steps > li { counter-increment: st; position: relative; padding: 14px 0 14px 58px; min-height: 70px; border-bottom: 1px solid var(--line); }
ol.steps > li:last-child { border-bottom: 0; }
ol.steps > li::before { content: counter(st, decimal-leading-zero); position: absolute; left: 0; top: 14px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); font: 700 .92rem var(--mono); }

/* картки-підказки */
.callout { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 4px; margin: 1.5em 0; background: var(--surface); }
.callout .lab { font-family: var(--mono); font-size: .76rem; letter-spacing: .1em; font-weight: 800; text-transform: uppercase; margin-bottom: 6px; }
.callout p { margin: 0 0 .8em; }
.callout.tip { border-color: var(--accent-line); background: var(--accent-soft); }
.callout.tip .lab { color: var(--accent); }
.callout.warn { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: var(--danger-soft); }
.callout.warn .lab { color: var(--danger); }
.callout.note .lab { color: var(--muted); }
.callout.formula { border: 1px solid var(--accent-line); border-left: 5px solid var(--accent); background: var(--accent-soft); font-size: 1.08rem; font-weight: 600; }
.callout.formula .lab { color: var(--accent); }
.callout.quote { margin-left: 0; margin-right: 0; border-left: 4px solid var(--accent); border-radius: 4px 14px 14px 4px; position: relative; padding: 14px 18px 4px 52px; font-size: 1.05rem; }
.callout.quote::before { content: "\201C"; position: absolute; left: 14px; top: 2px; font-size: 3.2rem; line-height: 1; color: var(--accent); font-family: Georgia, serif; }

/* промпти */
.code { margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.code-head span { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.code pre { margin: 0; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.code pre code { background: none; padding: 0; font-size: .86rem; line-height: 1.65; }
.copy { font: inherit; font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.copy:hover { filter: brightness(1.1); }

/* таблиці */
.table-wrap { overflow-x: auto; margin: 0 0 .4em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
.table-hint { margin: 0 0 1.4em; font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; color: var(--muted); text-align: right; }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: .92rem; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
tr:last-child td { border-bottom: 0; }

.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.4em; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* інфографіка (завжди темна, як обкладинки) */
.info { margin: 1.8em 0 .6em; padding: 22px 20px 20px; border-radius: 22px; border: 1px solid #2f2f35; color: #f4f4f5; background: radial-gradient(520px 260px at 92% 0%, rgba(251, 146, 60, .28), rgba(251, 146, 60, 0) 70%), #17171a; }
.info-top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; color: #9a9aa3; }
.info-brand::before { content: "●"; color: #fb923c; margin-right: 8px; }
.info h3 { margin: 14px 0 18px; font-size: clamp(1.25rem, 5.4vw, 1.95rem); line-height: 1.08; letter-spacing: -0.02em; font-weight: 900; text-transform: uppercase; color: #fff; }
.info h3::before { content: none; }
.info .hi { color: #fb923c; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.info-card { position: relative; background: #202025; border: 1px solid #34343b; border-radius: 14px; padding: 14px 13px 14px; overflow: hidden; }
.info-card::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 44%; background: linear-gradient(90deg, #fb923c, rgba(251, 146, 60, 0)); }
.info-card .tag { display: block; font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; color: #fb923c; font-weight: 700; margin-bottom: 8px; }
.info-card b { display: block; font-size: 1rem; line-height: 1.15; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; margin-bottom: 6px; color: #fff; }
.info-card p { margin: 0; font-size: .8rem; line-height: 1.4; color: #a9a9b2; }

/* матеріали, кнопки, пейджер, CTA */
.file { display: flex; align-items: center; gap: 14px; margin: 2.2em 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.file-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.file-name { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.file-name b { font-size: .95rem; overflow-wrap: anywhere; }
.pillbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 20px; border-radius: 99px; border: 1.5px solid var(--accent); color: var(--accent); font-family: var(--mono); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; background: transparent; white-space: nowrap; }
.pillbtn:hover { background: var(--accent); color: var(--accent-ink); }
.pillbtn.big { width: 100%; min-height: 48px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none; border: 1.5px solid var(--accent); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.pager { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin: 28px 0 22px; }
.pager .btn { flex: 1 1 160px; }
.cta { display: flex; align-items: center; gap: 18px; margin: 0 0 56px; padding: 14px; border-radius: 20px; border: 1px solid #2f2f35; background: radial-gradient(420px 200px at 0% 0%, rgba(251, 146, 60, .22), rgba(251, 146, 60, 0) 70%), #17171a; color: #f4f4f5; text-decoration: none; transition: border-color .15s; }
.cta:hover { border-color: #fb923c; }
.cta img { flex: none; width: 120px; height: auto; border-radius: 10px; aspect-ratio: 1200 / 630; display: block; }
.cta-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cta-text b { font-size: 1.05rem; line-height: 1.25; text-decoration: underline; text-decoration-color: #fb923c; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.cta-text .mono { font-size: .74rem; color: #a9a9b2; line-height: 1.4; }

.foot { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: .88rem; }
.foot p { margin: 0; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learn ul { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
  .info { padding: 26px 24px 24px; }
  .cta img { width: 168px; }
}
@media (min-width: 720px) {
  body { font-size: 18px; }
  .wrap { padding: 0 24px; }
  .hero { padding: 84px 0 16px; }
  .info-card { padding: 16px 14px; }
}
@media (min-width: 980px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
  .main { min-width: 0; }
  .toc-m { display: none; }
  .side { display: block; position: sticky; top: 84px; align-self: start; }
  .side-card { border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 20px 18px 18px; max-height: calc(100vh - 108px); overflow-y: auto; }
  .side-label { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; color: var(--muted); margin: 0 0 10px 2px; }
  .side-sep { height: 1px; background: var(--line); margin: 16px 0; }
  .side-file { display: flex; gap: 10px; align-items: flex-start; color: var(--text); text-decoration: none; font-size: .86rem; line-height: 1.35; margin: 0 0 16px 2px; overflow-wrap: anywhere; }
  .side-file svg { flex: none; color: var(--accent); margin-top: 1px; }
  .side-file em { display: block; font-style: normal; margin-top: 2px; }
  .side-file:hover { color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .thumb, .cta { transition: none; }
  .gcard:hover .thumb { transform: none; }
}

@media (max-width: 519px) {
  .pager .btn { flex-basis: 100%; }
  .cta { flex-direction: column; align-items: stretch; gap: 12px; }
  .cta img { width: 100%; }
  .file { flex-wrap: wrap; }
  .file .pillbtn { width: 100%; }
}
