/* 3D-Майстерня / 3D Workshop — learning resource. Visual language of the club:
   dark #161826 + lime accent, Oswald headings, IBM Plex Mono labels, Inter body, diagonal stripes. */

:root {
  --bg: #161826; --bg2: #1b1e31; --panel: #20243a; --panel2: #292d49; --line: #333859;
  --ink: #eceef8; --muted: #a4aac9; --link: #8ade6e; --accent: #8ade6e; --btn: #8ade6e; --btn-ink: #0f1f09;
  --warn: #f0a840; --bad: #e8636b; --z: #4f9fe0; --ok: #5fc98a;
  --accent-ink: #8ade6e; --edge: #4a5080; --glow: rgba(138,222,110,.18); --scrim: rgba(8,9,20,.68);
  --logo-top: #a9ea87; --logo-side: #356f26; --logo-edge: #eef1f6; --logo-dot: #f7faf5;
  --dur-fast: 120ms; --dur: 220ms; --dur-slow: 480ms; --ease-out: cubic-bezier(.2, .7, .2, 1);
  --f-head: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 12px; --shadow: 0 10px 30px rgba(0, 0, 0, .35); --header-h: 64px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f6fb; --bg2: #ecedf7; --panel: #ffffff; --panel2: #eff0fa; --line: #d8dbee;
  --ink: #171a2d; --muted: #555b7c; --link: #2b7412; --accent: #3f9a24; --accent-ink: #2b7412; --edge: #aab0cf; --glow: rgba(63,154,36,.16); --scrim: rgba(40,44,70,.35);
  --logo-top: #7ecd60; --logo-edge: #12180f; --logo-dot: #f2f7ee; --btn: #8ade6e; --btn-ink: #0f1f09;
  --warn: #9a5b00; --bad: #c8353f; --z: #1d6fbd; --ok: #237a4b; --shadow: 0 10px 30px rgba(30, 35, 80, .12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--f-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); margin-top: 2.2em; }
h3 { font-size: 1.25rem; margin-top: 1.6em; }
p { margin: 0 0 1em; }
.ico { flex: none; vertical-align: -.18em; }
.ico-sm { vertical-align: -.12em; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--btn); color: var(--btn-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { left: 12px; }
.eyebrow { font: 500 .8rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 .9em; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 62ch; line-height: 1.55; }

/* ------------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header__in { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: var(--header-h); display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand .logo { color: var(--accent); flex: none; width: 32px; height: 32px; }
.brand__t b { white-space: nowrap; }
.brand__t { display: flex; flex-direction: column; line-height: 1.1; }
.brand__t b { font: 700 1.2rem var(--f-head); text-transform: uppercase; letter-spacing: .04em; }
.brand__t small { font: 400 .68rem var(--f-mono); color: var(--muted); letter-spacing: .05em; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav__link { display: inline-flex; align-items: center; gap: 4px; padding: 8px 11px; border-radius: 8px; color: var(--muted); text-decoration: none; font: 500 .93rem var(--f-body); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.nav__link:hover, .nav__link.is-current, .nav__link[aria-current="page"] { color: var(--ink); background: var(--panel); }
.nav__link[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 8px 8px 0 0; }
.dd { position: relative; }
.dd__panel { position: absolute; top: calc(100% + 8px); left: 0; width: 360px; max-width: 92vw; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; display: none; }
.dd.open .dd__panel { display: block; }
.dd.open .dd__btn .ico { transform: rotate(180deg); }
.dd__item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.3; }
.dd__item:hover, .dd__item[aria-current="page"] { background: var(--panel2); }
.dd__num { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--bg2); color: var(--accent); font: 600 .82rem var(--f-mono); }
.tools { display: flex; align-items: center; gap: 6px; }
.iconbtn { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: none; border: 1px solid transparent; color: var(--muted); cursor: pointer; }
.iconbtn:hover { color: var(--ink); background: var(--panel); border-color: var(--line); }
.i-moon { display: none; } .i-sun { display: inline-flex; }
:root[data-theme="light"] .i-sun { display: none; } :root[data-theme="light"] .i-moon { display: inline-flex; }
.nav-toggle { display: none; } .i-shut { display: none; }
.langsw { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.langsw__opt { padding: 4px 11px; border-radius: 999px; font: 600 .78rem var(--f-mono); letter-spacing: .06em; color: var(--muted); text-decoration: none; }
.langsw__opt.is-on { background: var(--btn); color: var(--btn-ink); }
.langsw__opt:not(.is-on):hover { color: var(--ink); }

/* ------------------------------------------------------------------ layout */
.layout { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: block; }
.layout--wide { max-width: 1240px; }
.main { min-width: 0; padding: 28px 0 72px; }
.layout--side { display: grid; grid-template-columns: 250px minmax(0, 1fr); column-gap: 44px; align-items: start; }
.layout--side.has-toc { grid-template-columns: 250px minmax(0, 1fr) 220px; column-gap: 40px; }
.layout--toc { display: grid; grid-template-columns: minmax(0, 1fr) 220px; column-gap: 44px; align-items: start; }
.layout--side > .side, .toc-rail { position: sticky; top: calc(var(--header-h) + 22px); }
.layout--side > .side { padding-top: 28px; max-height: calc(100vh - var(--header-h) - 30px); overflow: auto; }
.toc-rail { padding-top: 28px; max-height: calc(100vh - var(--header-h) - 30px); overflow: auto; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; font: 400 .8rem var(--f-mono); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* sidebar */
.side__title, .toc summary { font: 600 .74rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.side__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.side__link { display: grid; grid-template-columns: 30px 1fr 18px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .9rem; line-height: 1.3; border: 1px solid transparent; }
.side__link:hover { background: var(--panel); color: var(--ink); }
.side__link.is-current { background: var(--panel); color: var(--ink); border-color: var(--line); box-shadow: inset 3px 0 0 var(--accent); }
.side__num { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--bg2); color: var(--accent); font: 600 .8rem var(--f-mono); }
.side__check { color: var(--ok); opacity: 0; } .side__check.is-done { opacity: 1; }
.progress { margin-top: 22px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.progress__label { font: 400 .74rem/1.4 var(--f-mono); color: var(--muted); margin: 0 0 10px; }
.progress__bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress__bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .4s ease; }
.progress__n { margin: 8px 0 0; font: 600 .82rem var(--f-mono); color: var(--ink); }
.progress--inline { display: flex; align-items: center; gap: 14px; padding: 0; margin: 0; background: none; border: 0; min-width: 210px; }
.progress--inline .progress__bar { flex: 1; } .progress--inline .progress__n { margin: 0; white-space: nowrap; }

/* toc */
.toc summary { cursor: pointer; list-style: none; } .toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); display: grid; gap: 2px; }
.toc a { display: block; padding: 5px 10px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .87rem; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--accent); }

/* ------------------------------------------------------------------ hero & home */
.hero { position: relative; padding: 58px 0 44px; overflow: hidden; isolation: isolate; }
.hero__stripes { position: absolute; z-index: -1; right: -40px; top: 0; bottom: 0; width: min(44%, 460px); background: repeating-linear-gradient(135deg, var(--accent) 0 11px, transparent 11px 30px); opacity: .13; -webkit-mask-image: linear-gradient(to left, #000 15%, transparent); mask-image: linear-gradient(to left, #000 15%, transparent); }
.hero__t { margin: 0 0 .35em; font-size: clamp(2.6rem, 7.5vw, 5.2rem); line-height: .98; }
.hero__t span { color: var(--accent); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.hero__note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .9rem; margin: 0; }
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font: 600 .98rem var(--f-body); cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.btn:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.btn--primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.btn--primary:hover { background: color-mix(in srgb, var(--btn) 88%, #fff); }
.sec { margin-top: 62px; }
.sec h2 { margin-top: 0; }
.sec__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; }
.sec__lede { color: var(--muted); max-width: 70ch; }
.ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.idea { position: relative; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--r); padding: 22px 22px 8px; }
.idea__n { position: absolute; right: 16px; top: 8px; font: 700 2.6rem var(--f-head); color: transparent; -webkit-text-stroke: 1px var(--line); }
.idea h3 { margin-top: 0; font-size: 1.5rem; text-transform: uppercase; }
.idea p { color: var(--muted); font-size: .98rem; }
.bgrid, .xgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); margin-top: 22px; }
.bcard, .xcard { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s; }
.bcard::before, .xcard::before { content: ""; position: absolute; left: 20px; right: 20px; top: -1px; height: 3px; background: var(--accent); border-radius: 0 0 3px 3px; transform: scaleX(.22); transform-origin: left; transition: transform .25s; }
.bcard:hover, .xcard:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.bcard:hover::before, .xcard:hover::before { transform: scaleX(1); }
.bcard__top, .xcard__top { display: flex; justify-content: space-between; align-items: center; color: var(--accent); }
.bcard__num { font: 700 2.4rem/1 var(--f-head); color: transparent; -webkit-text-stroke: 1.2px var(--accent); }
.bcard__t, .xcard__t { font: 600 1.28rem/1.2 var(--f-head); }
.bcard__d, .xcard__d { color: var(--muted); font-size: .93rem; line-height: 1.5; flex: 1; }
.bcard__meta, .xcard__m { display: flex; align-items: center; justify-content: space-between; font: 400 .76rem var(--f-mono); color: var(--muted); }
.bcard__meta span { display: inline-flex; gap: 6px; align-items: center; }
.bcard__done, [data-check].bcard__done { color: var(--ok); opacity: 0; } .bcard__done.is-done { opacity: 1; }
.bcard.is-done { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.tag { font: 600 .68rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }
.need { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.need li { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 4px; }
.need b { font: 600 1.15rem var(--f-head); text-transform: uppercase; color: var(--accent); }
.need span { color: var(--muted); font-size: .93rem; line-height: 1.5; }

/* ------------------------------------------------------------------ prose */
.prose-page > h1 { margin-bottom: .3em; }
.prose { max-width: 74ch; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--accent); }
.prose h2 { padding-top: .4em; border-top: 1px solid var(--line); }
.prose h2:first-child { border-top: 0; }
.prose h2 .anchor, .prose h3 .anchor { position: absolute; margin-left: -1.1em; opacity: 0; text-decoration: none; color: var(--accent); font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .anchor:focus { opacity: 1; }
.prose h2, .prose h3 { position: relative; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose code { font: 500 .88em var(--f-mono); background: var(--panel2); padding: .12em .42em; border-radius: 6px; border: 1px solid var(--line); }
.prose blockquote { margin: 0 0 1.2em; padding: .2em 1.2em; border-left: 3px solid var(--accent); color: var(--muted); }
kbd { font: 600 .82em var(--f-mono); background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .08em .48em; white-space: nowrap; }
.kbd-plus { margin: 0 .12em; color: var(--muted); font-family: var(--f-mono); }
a.term { color: inherit; text-decoration: none; border-bottom: 1.5px dotted var(--accent); }
a.term:hover { color: var(--accent); border-bottom-style: solid; }
a.xref { font-weight: 600; }
a.ext .ext-ico { margin-left: .15em; opacity: .7; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: .94rem; line-height: 1.5; }
th, td { text-align: left; padding: 11px 15px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font: 600 .74rem var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); background: var(--bg2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--panel2) 55%, transparent); }
.table--program td:first-child { font: 700 1.2rem var(--f-head); color: var(--accent); }
.callout { margin: 0 0 1.3em; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent)); border-radius: 10px; background: var(--panel); overflow: hidden; }
.callout__head { display: flex; gap: 9px; align-items: center; padding: 10px 16px 0; font: 600 .78rem var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--c, var(--accent)); }
.callout__body { padding: 6px 16px 4px; }
.callout__body > :last-child { margin-bottom: .7em; }
.callout--tip, .callout--idea { --c: var(--accent); } .callout--warn { --c: var(--warn); }
.callout--checkpoint { --c: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.callout--challenge { --c: var(--z); background: color-mix(in srgb, var(--z) 8%, var(--panel)); } .callout--note { --c: var(--muted); }


/* ---------- tool animations (5 tools, Block 1) ---------- */
.tanim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 1.6em 0; }
.tanim { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tanim svg { width: 68px; height: 68px; }
.tanim b { font: 600 .92rem var(--f-head); }
.tanim .tanim-key { font: 400 .74rem var(--f-mono); color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .tanim svg * { animation: none !important; } }

@keyframes ta-extrude { 0%, 12% { transform: translateY(40px); opacity: .35; } 50%, 82% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(40px); opacity: .35; } }
.ta-ex-top { animation: ta-extrude 2.6s ease-in-out infinite; }

@keyframes ta-inset { 0%, 12% { transform: scale(1); opacity: .5; } 50%, 82% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1); opacity: .5; } }
.ta-inset-r { transform-box: fill-box; transform-origin: center; animation: ta-inset 2.6s ease-in-out infinite; }

@keyframes ta-bevel-a { 0%, 12% { opacity: 1; } 50% { opacity: 0; } 88%, 100% { opacity: 1; } }
@keyframes ta-bevel-b { 0%, 12% { opacity: 0; } 50% { opacity: 1; } 88%, 100% { opacity: 0; } }
.ta-bevel-sharp { animation: ta-bevel-a 2.6s ease-in-out infinite; }
.ta-bevel-chamfer { animation: ta-bevel-b 2.6s ease-in-out infinite; }

@keyframes ta-loop { 0% { transform: translateX(-24px); opacity: 0; } 22% { opacity: 1; } 45%, 78% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(-24px); opacity: 0; } }
.ta-loop-l { animation: ta-loop 2.6s ease-in-out infinite; }

@keyframes ta-mirror { 0%, 10% { transform: scaleX(0); opacity: 0; } 45%, 80% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(0); opacity: 0; } }
.ta-mir-r { transform-box: fill-box; transform-origin: 0% 50%; animation: ta-mirror 2.6s ease-in-out infinite; }
.ta-mir-l { transform-box: fill-box; transform-origin: 100% 50%; animation: ta-mirror 2.6s ease-in-out infinite; }

/* ---------- tool animations (Block 2: Knife, Subdivision, Boolean, Merge) ---------- */
/* Subdivision reuses ta-bevel-a/b (sharp shape cross-fades into a round one); Boolean reuses ta-inset (cutter) + ta-bevel-b (hole reveal). */
@keyframes ta-knife-cut { 0%, 10% { stroke-dashoffset: 90; opacity: .35; } 50%, 82% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 90; opacity: .35; } }
.ta-knife-line { stroke-dasharray: 90; animation: ta-knife-cut 2.6s ease-in-out infinite; }

@keyframes ta-merge-move { 0%, 10% { transform: translateX(var(--mx)); opacity: .4; } 50%, 82% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(var(--mx)); opacity: .4; } }
.ta-merge-l { --mx: 16px; transform-box: fill-box; transform-origin: center; animation: ta-merge-move 2.6s ease-in-out infinite; }
.ta-merge-r { --mx: -16px; transform-box: fill-box; transform-origin: center; animation: ta-merge-move 2.6s ease-in-out infinite; }

.fig { margin: 1.5em 0; }
.fig img { width: 100%; display: block; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.fig figcaption { margin-top: .6em; font: 400 .85rem var(--f-mono); color: var(--muted); text-align: center; }
.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.5em 0; }
.fig-pair figure { margin: 0; }
.fig-pair img { width: 100%; display: block; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.fig-pair figcaption { margin-top: .5em; font: 400 .8rem var(--f-mono); color: var(--muted); text-align: center; }
@media (max-width: 640px) { .fig-pair { grid-template-columns: 1fr; } }
.codeblock { position: relative; margin: 0 0 1.3em; }
.codeblock pre { margin: 0; overflow-x: auto; background: #0e1020; color: #e3e6f7; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; font: 400 .85rem/1.6 var(--f-mono); }
:root[data-theme="light"] .codeblock pre { background: #1d2033; }
.codeblock pre code { background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.copy-btn { position: absolute; top: 8px; right: 8px; z-index: 1; padding: 4px 10px; border-radius: 7px; border: 1px solid #3a3f63; background: #1a1d33; color: #cfd3ee; font: 500 .72rem var(--f-mono); cursor: pointer; }
.copy-btn:hover { border-color: var(--accent); color: #fff; }

/* ------------------------------------------------------------------ block pages */
.bhero { position: relative; padding: 8px 0 26px; margin-bottom: 8px; overflow: hidden; border-bottom: 1px solid var(--line); }
.bhero__num { position: absolute; right: 0; top: -18px; font: 700 clamp(6rem, 16vw, 10.5rem)/1 var(--f-head); color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--accent) 45%, transparent); pointer-events: none; user-select: none; }
.bhero__ico { display: inline-grid; place-items: center; width: 82px; height: 82px; margin-bottom: 18px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); color: var(--accent); position: relative; }
.bhero__ico::after { content: ""; position: absolute; inset: -6px; border: 1px solid var(--accent); border-radius: 24px; opacity: .25; }
.bhero h1 { max-width: 16ch; font-size: clamp(1.9rem, 4.4vw, 3rem); }
.facts { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; margin: 26px 0 0; }
.facts > div:nth-child(3) { grid-column: 1 / -1; }
.facts > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.facts dt { display: flex; align-items: center; gap: 7px; font: 600 .7rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 5px; }
.facts dd { margin: 0; font-size: .92rem; line-height: 1.45; }
.block .prose { margin-top: 24px; }
.donebar { margin: 34px 0 6px; }
.btn--done .ico { opacity: .35; } .btn--done.is-done { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); } .btn--done.is-done .ico { opacity: 1; }
.related { margin-top: 40px; display: grid; gap: 4px; }
.related__sec h2 { font-size: 1.25rem; margin: 26px 0 4px; text-transform: uppercase; letter-spacing: .03em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip--sm { padding: 3px 10px; font-size: .8rem; margin: 2px 4px 2px 0; }
.chips--wide .chip { border-radius: 10px; }
.links { padding-left: 1.2em; } .links li { margin: .5em 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager--one { grid-template-columns: 1fr; }
.pager__a { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.pager__a:hover { border-color: var(--accent); text-decoration: none; }
.pager__a small { display: block; font: 500 .72rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pager__a b { display: block; font: 600 1.05rem/1.25 var(--f-head); }
.pager__a--next { justify-content: space-between; text-align: right; grid-column: 2; } .pager__a--prev { grid-column: 1; }
.pager__a--empty { visibility: hidden; }
.pager--one .pager__a--next { grid-column: 1; }
.pager__a .ico { color: var(--accent); }

/* ------------------------------------------------------------------ glossary */
.letters { position: sticky; top: var(--header-h); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 0; margin: 20px 0 8px; background: var(--bg); border-bottom: 1px solid var(--line); font: 400 .78rem var(--f-mono); color: var(--muted); }
.letters a { padding: 3px 9px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.letters a:hover { border-color: var(--accent); color: var(--accent); }
.glossary h2.letter { margin: 1.6em 0 .5em; font-size: 2rem; color: var(--accent); border: 0; }
.term-entry { padding: 16px 20px; margin-bottom: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); max-width: 78ch; scroll-margin-top: calc(var(--header-h) + 70px); }
.term-entry:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.term-entry h3 { margin: 0 0 .3em; font-size: 1.35rem; }
.term-entry p { margin: 0 0 .5em; color: var(--muted); }
.term-meta p { font-size: .86rem; margin: .35em 0 0; }
.term-meta b { font: 600 .68rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }

/* ------------------------------------------------------------------ search */
.search { position: fixed; inset: 0; z-index: 100; background: rgba(8, 9, 20, .68); backdrop-filter: blur(4px); display: grid; align-items: start; justify-items: center; padding: 11vh 16px 16px; }
.search[hidden] { display: none; }
.search__box { width: min(680px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.search__row { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search__row input { flex: 1; background: none; border: 0; outline: 0; color: var(--ink); font: 500 1.1rem var(--f-body); padding: 12px 0; min-width: 0; }
.search__results { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow: auto; }
.search__results a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.search__results a:hover, .search__results a.is-sel { background: var(--panel2); }
.search__results b { display: block; font: 600 1.02rem var(--f-head); }
.search__results span { display: block; font-size: .85rem; color: var(--muted); line-height: 1.4; }
.search__results mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; }
.search__hint { margin: 0; padding: 10px 18px; font: 400 .74rem var(--f-mono); color: var(--muted); border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------ footer & gate */
.site-footer { border-top: 1px solid var(--line); background: var(--bg2); margin-top: 20px; }
.site-footer__in { max-width: 1240px; margin: 0 auto; padding: 44px 20px 12px; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; } .site-footer a:hover { color: var(--ink); text-decoration: underline; }
.foot-brand { display: flex; align-items: center; gap: 10px; font: 700 1.2rem var(--f-head); text-transform: uppercase; margin-bottom: 12px; } .foot-brand .logo { color: var(--accent); }
.foot-org, .foot-note { color: var(--muted); font-size: .88rem; line-height: 1.55; max-width: 52ch; margin-bottom: .6em; }
.foot-h { font: 600 .74rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; }
.site-footer__c { max-width: 1240px; margin: 0 auto; padding: 18px 20px 28px; font: 400 .76rem var(--f-mono); color: var(--muted); }
.gate { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.gate__in { max-width: 560px; } .gate .logo { color: var(--accent); width: 64px; height: 64px; }
.gate h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); } .gate h1 span { color: var(--accent); } .gate .hero__cta { justify-content: center; }
.gate__wait { color: var(--muted); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .layout--side.has-toc { grid-template-columns: 240px minmax(0, 1fr); }
  .layout--toc { display: block; }
  .toc-rail { position: static; max-height: none; padding-top: 18px; grid-column: 1 / -1; order: -1; }
  .layout--side.has-toc > .toc-rail { grid-column: 2; grid-row: 1; padding: 22px 0 0; }
  .layout--side.has-toc > .main { grid-column: 2; grid-row: 2; padding-top: 0; }
  .layout--side.has-toc > .side { grid-row: 1 / span 2; }
  .toc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
  .toc summary { margin: 0; } .toc[open] summary { margin-bottom: 10px; }
}
@media (max-width: 1060px) {
  .nav-toggle { display: grid; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; z-index: 70; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 18px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - var(--header-h)); overflow: auto; display: none; }
  body.nav-open .nav { display: flex; }
  body.nav-open .i-open { display: none; } body.nav-open .i-shut { display: inline-flex; }
  .nav__link { padding: 12px 14px; font-size: 1rem; justify-content: space-between; }
  .nav__link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); border-radius: 8px; }
  .dd__panel { position: static; width: 100%; max-width: none; box-shadow: none; margin: 4px 0 8px; }
  .site-footer__in { grid-template-columns: 1fr 1fr; } .site-footer__in > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .layout--side, .layout--side.has-toc { display: flex; flex-direction: column; align-items: stretch; }
  .layout--side > * { min-width: 0; }
  .layout--side > .side, .layout--side.has-toc > .side { position: static; max-height: none; padding: 16px 0 0; grid-row: auto; }
  .layout--side.has-toc > .toc-rail, .layout--side.has-toc > .main { grid-column: auto; grid-row: auto; }
  .layout--side > .main { padding-top: 8px; }
  .side__list { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 6px; scrollbar-width: thin; }
  .side__link { grid-template-columns: auto; padding: 6px; } .side__t, .side__check { display: none; }
  .side__num { width: 34px; height: 34px; font-size: .9rem; }
  .side .progress { display: none; }
  .layout--side > .toc-rail { order: 1; } .layout--side > .main { order: 2; }
  .bhero__num { opacity: .55; }
}
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .facts { grid-template-columns: 1fr; } .facts > div:nth-child(3) { grid-column: auto; }
  .site-header__in { padding: 0 12px; gap: 4px; } .brand__t small { display: none; } .brand__t b { font-size: 1.02rem; } .brand { gap: 8px; }
  .iconbtn { width: 36px; height: 36px; } .tools { gap: 2px; }
  .layout { padding: 0 16px; }
  .hero { padding-top: 36px; }
  .pager { grid-template-columns: 1fr; } .pager__a--next, .pager__a--prev { grid-column: 1; }
  .pager__a--empty { display: none; }
  .prose table, .prose thead, .prose tbody, .prose tr, .prose td, .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .prose thead, .table-wrap thead { position: absolute; left: -9999px; }
  .table-wrap { border: 0; background: none; }
  .table-wrap tr { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
  .table-wrap td { border: 0; border-bottom: 1px dashed var(--line); padding: 9px 14px; }
  .table-wrap tr td:last-child { border-bottom: 0; }
  .table-wrap td::before { content: attr(data-label); display: block; font: 600 .68rem var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
  .table--program td:first-child { font-size: 1.05rem; }
  .site-footer__in { grid-template-columns: 1fr; }
  .langsw__opt { padding: 4px 9px; }
}
@media print {
  .site-header, .side, .toc-rail, .search, .site-footer, .pager, .donebar, .copy-btn { display: none !important; }
  body { background: #fff; color: #000; } .layout { display: block; max-width: none; } a { color: #000; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }


/* =================================================================== v2 · review 2026-09
   Brand mark, accessible colour roles, interaction states, motion. Everything below is additive;
   under prefers-reduced-motion every animated piece shows its final frame. */

/* ---- colour roles: accent as TEXT uses --accent-ink (AA in both themes) */
.eyebrow, .facts dt, .callout__head, .need b, .side__num, .dd__num, .bcard__top, .xcard__top,
.table-wrap td::before, .hero__t span, .idea__mode { color: var(--accent-ink); }
.callout--warn .callout__head { color: var(--warn); }
.btn, .search__row, .langsw { border-color: var(--edge); }
:root[data-theme="light"] .btn--primary { border-color: #3f9a24; }

/* ---- small text floor (12.5px) and touch targets */
.tag, .brand__t small, .bcard__meta, .xcard__m, .side__title, .toc summary, .progress__label { font-size: .78rem; }
@media (max-width: 720px) {
  .langsw__opt { padding: 8px 12px; }
  .toc a, .crumbs a, .chip--sm { min-height: 40px; display: flex; align-items: center; }
  .iconbtn { width: 44px; height: 44px; }
}

/* ---- logo: kit cube, shading follows the theme; assembles once per session (.lg-play set in <head>) */
.logo { overflow: visible; width: 28px; height: 32px; color: inherit; }
.brand .logo { width: 28px; height: 32px; }
.logo__top { fill: var(--logo-top); transition: fill .8s var(--ease-out); }
.logo__side { fill: var(--logo-side); }
.logo__edge { fill: none; stroke: var(--logo-edge); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
.logo__dot { fill: var(--logo-dot); transform-box: fill-box; transform-origin: center; }
.brand__t em, .foot-brand em { font-style: normal; color: var(--accent-ink); }
@keyframes lgTop { from { transform: translateY(-34px); opacity: 0; } }
@keyframes lgSide { from { transform: translateX(30px); opacity: 0; } }
@keyframes lgEdge { from { stroke-dashoffset: 1; } }
@keyframes lgDot { 0%, 60% { transform: scale(0); } 80% { transform: scale(1.5); } }
.lg-play .brand .logo__top { animation: lgTop .42s var(--ease-out) both; }
.lg-play .brand .logo__side { animation: lgSide .42s var(--ease-out) .08s both; }
.lg-play .brand .logo__edge { animation: lgEdge .5s var(--ease-out) .2s both; }
.lg-play .brand .logo__dot { animation: lgDot .7s var(--ease-out) both; }
.brand:hover .logo__dot { animation: lgDot .5s var(--ease-out); }

/* ---- header: Програма ▾ holds the block list */
.dd__all { display: block; margin-top: 4px; padding: 10px; border-top: 1px solid var(--line); color: var(--accent-ink); text-decoration: none; font: 500 .82rem var(--f-mono); }
.dd__btn .ico { transition: transform var(--dur) var(--ease-out); }
.dd.open .dd__btn .ico { transform: rotate(180deg); }
.nav__link:hover { box-shadow: inset 0 -2px 0 var(--edge); }
.nav__link:active { background: var(--panel2); }

/* ---- interaction states (hover = colour + ≤3px, press = down/shrink, focus = outline only) */
.btn { position: relative; overflow: hidden; transition: transform var(--dur-fast) var(--ease-out), background var(--dur), border-color var(--dur), color var(--dur), box-shadow var(--dur); }
.btn:hover { color: var(--accent-ink); }
.btn:active { transform: translateY(1px) scale(.98); background: var(--panel2); }
.btn--primary:hover { color: var(--btn-ink); background: color-mix(in srgb, var(--btn) 90%, #fff); box-shadow: 0 0 0 4px var(--glow); }
:root[data-theme="light"] .btn--primary:hover { background: color-mix(in srgb, var(--btn) 82%, #1f4d12); }
.btn--primary:active { background: color-mix(in srgb, var(--btn) 86%, #000); box-shadow: none; }
.btn .ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); pointer-events: none; transform: translate(-50%,-50%) scale(0); animation: ripple .55s var(--ease-out) forwards; }
@keyframes ripple { to { transform: translate(-50%,-50%) scale(1); opacity: 0; } }
.iconbtn { transition: background var(--dur), color var(--dur), border-color var(--dur), transform var(--dur-fast); }
.iconbtn:active { transform: scale(.92); background: var(--panel2); }
[data-theme-toggle] .ico { transition: transform .6s var(--ease-out); }
[data-theme-toggle]:active .ico { transform: rotate(-20deg); }
.langsw__opt { transition: background var(--dur), color var(--dur), transform var(--dur-fast); }
.langsw__opt:active { transform: scale(.94); }
.chip { transition: border-color var(--dur), color var(--dur), background var(--dur), transform var(--dur-fast); }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip:active { background: color-mix(in srgb, var(--accent) 15%, transparent); transform: scale(.97); }
.term { border-bottom: 1.5px dotted var(--accent); text-decoration: none; transition: color var(--dur), border-color var(--dur); }
.term:hover { color: var(--accent-ink); border-bottom-style: solid; }
kbd, .kbd { transition: transform 80ms, border-bottom-width 80ms; }
kbd:active, .kbd:active { transform: translateY(2px); border-bottom-width: 1px; }
.bcard:active, .xcard:active { transform: translateY(-1px) scale(.99); }
@media (hover: none) { .btn:hover, .bcard:hover, .xcard:hover { transform: none; } }

/* ---- block cards: number lights on hover, finished blocks are extruded; tilt set by site.js */
.bcard, .xcard { transform-style: preserve-3d; will-change: transform; }
.bcard__num { transition: color var(--dur), text-shadow .5s var(--ease-out); transform: translateZ(26px); }
.bcard__t { transform: translateZ(12px); }
.bcard:is(:hover, :focus-visible) .bcard__num { color: var(--accent); }
.bcard.is-done { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.bcard.is-done .bcard__num { color: var(--logo-top); text-shadow: 1px 1px 0 #6bc44e, 2px 2px 0 #4d7f3a, 3px 3px 0 #356f26, 4px 4px 0 #2c4a22, 5px 5px 0 #1b3313, 6px 6px 0 #1b3313; }
.bcard.is-next { border-color: var(--accent); }

/* ---- home hero: copy + assembling object */
.hero__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 36px; align-items: center; }
.hero__art { position: relative; aspect-ratio: 4 / 3; width: 100%; max-width: 560px; justify-self: center; }
.hero__art::before { content: ""; position: absolute; left: 12%; top: 10%; width: 76%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--glow) 0%, transparent 65%); transform: var(--px1, none); transition: transform .25s var(--ease-out); }
.hero__obj { position: absolute; inset: 6% 4%; transform: var(--px2, none); transition: transform .25s var(--ease-out); }
.hero__obj svg { width: 100%; height: 100%; display: block; overflow: visible; }
@keyframes asm { 0%, 16% { transform: translate(var(--fx), var(--fy)) rotate(var(--fr)); } 46%, 84% { transform: none; } 100% { transform: translate(var(--fx), var(--fy)) rotate(var(--fr)); } }
@keyframes lbl { 0%, 14% { opacity: 1; } 26%, 92% { opacity: 0; } 100% { opacity: 1; } }
.hero__cta[hidden], .cont[hidden], .cont__first[hidden] { display: none; }
.cont { max-width: 440px; display: grid; gap: 12px; margin: 26px 0 12px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r); }
.segs { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.segs i { height: 7px; border-radius: 4px; background: var(--line); transition: background var(--dur-slow) var(--ease-out); }
.segs i.is-done { background: var(--ok); }
.segs i.is-next { background: var(--accent); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.cont__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cont__n .progress__n { margin: 0; font: 400 .85rem var(--f-mono); color: var(--muted); }
.cont__first { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---- idea cards: each shows its step */
.idea { padding: 18px 20px 12px; display: flex; flex-direction: column; gap: 12px; }
.idea__vis { position: relative; aspect-ratio: 16 / 10; background: var(--bg2); border-radius: 10px; display: grid; place-items: center; overflow: hidden; padding: 10px; }
.idea__vis img { width: 52%; height: auto; transition: opacity .3s; }
.idea__vis--art svg { width: 100%; height: 100%; }
.idea__mode { position: absolute; left: 10px; top: 8px; font: 500 .78rem var(--f-mono); }
.idea__head { display: flex; justify-content: space-between; align-items: baseline; }
.idea__head h3 { margin: 0; }
.idea .idea__n { position: static; -webkit-text-stroke: 1px var(--edge); }
.phone { position: relative; height: clamp(120px, 15vw, 190px); aspect-ratio: 9 / 17; border: 3px solid var(--edge); border-radius: 18px; background: var(--bg); display: grid; place-items: center; }
.phone img { width: 74%; }
.phone i { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font: 600 .7rem var(--f-mono); font-style: normal; color: var(--btn-ink); background: var(--btn); border-radius: 99px; padding: 1px 8px; }
.prim { position: relative; color: var(--ink); text-decoration: none; border-bottom: 1.5px dotted var(--accent); }
.prim:hover, .prim:focus-visible { color: var(--accent-ink); border-bottom-style: solid; }
.prim__pop { position: absolute; left: 50%; bottom: calc(100% + 10px); width: 220px; transform: translate(-50%, 6px); opacity: 0; visibility: hidden; z-index: 20;
  display: grid; gap: 6px; padding: 10px; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow);
  color: var(--muted); font-size: .82rem; line-height: 1.45; text-align: left; transition: opacity var(--dur), transform var(--dur) var(--ease-out), visibility var(--dur); }
.prim:hover .prim__pop, .prim:focus-visible .prim__pop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.prim__vis { height: 88px; display: block; background: var(--bg2); border-radius: 8px; padding: 6px; }
.prim__vis svg { width: 100%; height: 100%; }
.prim__pop b { font: 600 .78rem var(--f-mono); color: var(--accent-ink); }
.xcard__vis { aspect-ratio: 16 / 9; background: var(--bg2); border-radius: 8px; display: grid; place-items: center; overflow: hidden; }
.xcard__vis img { width: 38%; height: auto; }

/* ---- block page: checkpoint toggle lives next to the checkpoint */
.facts__cp { display: flex; flex-direction: column; gap: 8px; }
.facts__cp .btn--sm { align-self: flex-start; padding: 8px 14px; font-size: .88rem; }
.btn--done.is-done { background: var(--ok); border-color: var(--ok); color: #0b2215; }

/* ---- mobile block rail: titles stay for screen readers */
@media (max-width: 900px) {
  .side__t { display: block !important; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---- theme change = moving the light */
.theme-sweep { position: fixed; inset: 0; z-index: 90; pointer-events: none; animation: sweep .9s var(--ease-out) forwards; }
@keyframes sweep { 0% { opacity: 0; transform: translateX(-8%); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateX(8%); } }
body { transition: background .6s, color .6s; }
.search { background: var(--scrim); }

/* ---- page transition card → block, scroll reveal, stripe drift */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: var(--dur-slow); animation-timing-function: var(--ease-out); }
@supports (animation-timeline: view()) {
  @keyframes rise { from { transform: translateY(14px); opacity: 0; } }
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes drift { to { transform: translateY(-40px); } }
  .hero__stripes, .bhero__num { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover, .bcard:hover, .xcard:hover { transform: none; }
  .hero__obj text { display: none; }
}
