/* Шрифти лежать на самому сайті (assets/fonts, ліцензія OFL у LICENSE.txt): жодних запитів до сторонніх серверів.
   unicode-range розділяє кирилицю й латиницю, тож браузер вантажить лише потрібне. */
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500; font-display: swap;
    src: url("/assets/fonts/cormorant-cyrillic-500-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500; font-display: swap;
    src: url("/assets/fonts/cormorant-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 500; font-display: swap;
    src: url("/assets/fonts/cormorant-cyrillic-500-italic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 500; font-display: swap;
    src: url("/assets/fonts/cormorant-latin-500-italic.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("/assets/fonts/spectral-cyrillic-400-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("/assets/fonts/spectral-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 400; font-display: swap;
    src: url("/assets/fonts/spectral-cyrillic-400-italic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 400; font-display: swap;
    src: url("/assets/fonts/spectral-latin-400-italic.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("/assets/fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
    src: url("/assets/fonts/ibm-plex-mono-cyrillic-500-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
    src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Рукописні примітки на полях: лише кілька слів (клас .hand) */
@font-face { font-family: "Marck Script"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("/assets/fonts/marck-script-cyrillic-400-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Marck Script"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("/assets/fonts/marck-script-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* InkReel — сайт. Два кольори: --paper і --ink. Палітри перемикаються атрибутом data-palette на <html>.
   Палітра задає --bg і --fg (прості hex #rrggbb: їх читає assets/site.js).
   Клас .inv міняє пару місцями: «чорна смуга» на білій сторінці (і навпаки), як інь і ян. */
:root {
    --bg: #f7f5ef;
    --fg: #13110e;
    --paper: var(--bg);
    --ink: var(--fg);
    --gut: clamp(1rem, 4vw, 2rem);
    --wrap: 1180px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --display: "Cormorant", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
    --hand: "Marck Script", "Segoe Script", "Bradley Hand", "Lucida Handwriting", cursive;
    color-scheme: light;
}
:root, .inv {
    --dim: color-mix(in srgb, var(--ink) 66%, var(--paper));
    --line: color-mix(in srgb, var(--ink) 22%, var(--paper));
    --faint: color-mix(in srgb, var(--ink) 5%, var(--paper));
}
/* колір друкарських міток не залежить від .inv: це колір самої сторінки */
:root { --mark: color-mix(in srgb, var(--ink) 72%, var(--paper)); }
.inv { --paper: var(--fg); --ink: var(--bg); background: var(--paper); color: var(--ink); }
html[data-palette="night"]  { --bg: #0b0b0b; --fg: #ece9e1; color-scheme: dark; }
html[data-palette="amber"]  { --bg: #0e0a04; --fg: #ffb347; color-scheme: dark; }
html[data-palette="moss"]   { --bg: #050c07; --fg: #8ee08e; color-scheme: dark; }
html[data-palette="indigo"] { --bg: #070a1c; --fg: #a9bcff; color-scheme: dark; }

/* Вивертання: світло й тінь міняються місцями в будь-якій палітрі (слово-кнопка, клавіша I).
   Смуги .inv і кадр .film міняються назад, щоб лишатися протилежними до сторінки. */
html[data-flip] { --paper: var(--fg); --ink: var(--bg); color-scheme: dark; }
html[data-flip][data-palette="night"], html[data-flip][data-palette="amber"], html[data-flip][data-palette="moss"], html[data-flip][data-palette="indigo"] { color-scheme: light; }
html[data-flip] .inv, html[data-flip] .film { --paper: var(--bg); --ink: var(--fg); }
/* поки йде хвиля вивертання, нічого не «доходить» плавно: зникне муть на межі */
html.vt *, html.vt *::before, html.vt *::after { transition: none !important; }
html.vt::view-transition-old(root), html.vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.4rem; -webkit-text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 55%, var(--paper)) var(--paper); }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(1.02rem, 0.3vw + 1rem, 1.14rem);
    line-height: 1.7;
    transition: background-color 0.6s var(--ease), color 0.6s var(--ease);
    overflow-x: hidden;
    /* футер притиснуто до низу вікна, навіть коли сторінка коротша за екран (великі монітори) */
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > footer { flex: none; }
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
img, svg, canvas { max-width: 100%; }
h1, h2, h3, h4 { font-weight: 500; margin: 0; }
h1, h2, h3, .brand, .mega, .num, blockquote, summary, .zeros b { font-family: var(--display); font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* Зерно плівки: ледь помітне, як фактура паперу */
body::after {
    content: "";
    position: fixed;
    inset: -10%;
    z-index: 60;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.3 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1.2s steps(1) infinite;
}
html:not([data-palette]) body::after, html[data-palette="paper"] body::after { opacity: 0.045; }
html[data-palette="paper"][data-flip] body::after { opacity: 0.07; }
@keyframes grain {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-3%, 2%); }
    40% { transform: translate(2%, -3%); }
    60% { transform: translate(-2%, -1%); }
    80% { transform: translate(3%, 3%); }
}
/* Слід пера за курсором (полотно додає site.js, лише для миші) */
.trail { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; z-index: 70; pointer-events: none; mix-blend-mode: difference; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 90%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .in { max-width: var(--wrap); margin: 0 auto; padding: 0.7rem var(--gut); display: flex; align-items: center; gap: 1.4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.75rem; line-height: 1; letter-spacing: 0.005em; text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.top nav { margin-left: auto; display: flex; gap: 1.4rem; font: 500 0.7rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.top nav a { position: relative; color: var(--dim); text-decoration: none; transition: color 0.3s; }
.top nav a:hover { color: var(--ink); }
.top nav a::after {
    content: ""; position: absolute; left: -3px; right: -3px; bottom: -10px; height: 8px; background: var(--ink);
    -webkit-mask: url("/assets/pen/u3.svg") 0 50% / 100% 100% no-repeat; mask: url("/assets/pen/u3.svg") 0 50% / 100% 100% no-repeat;
    clip-path: inset(0 100% 0 0); transition: clip-path 0.55s var(--ease);
}
.top nav a:hover::after, .top nav a:focus-visible::after { clip-path: inset(0); }
/* лінія читання: тягнеться за пером і тоншає на кінці (значення --read від 0 до 1 ставить site.js) */
.top::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
    background: linear-gradient(90deg, var(--ink) calc(var(--read, 0) * 100% - 48px), transparent calc(var(--read, 0) * 100%));
}
.tools { display: flex; align-items: center; gap: 1rem; }
.pal { display: flex; gap: 0.5rem; }
.pal button { width: 16px; height: 16px; padding: 0; border-radius: 50%; cursor: pointer; border: 1px solid var(--ink); background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); }
.pal button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
/* кнопка «світло ⇄ тінь»: колечко з половиною чорнила, при вивертанні перевертається */
.flipbtn { display: none; width: 18px; height: 18px; padding: 0; flex: none; border-radius: 50%; border: 1px solid var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--line); cursor: pointer; transition: transform 0.8s var(--ease); }
.js .flipbtn { display: block; }
.flipbtn:hover { transform: rotate(90deg); }
.flipbtn[aria-pressed="true"] { transform: rotate(180deg); }
.flipbtn[aria-pressed="true"]:hover { transform: rotate(270deg); }
.lang { display: flex; gap: 0.2rem; font: 500 0.7rem/1 var(--mono); letter-spacing: 0.1em; }
.lang a { padding: 0.2rem 0.4rem; text-decoration: none; color: var(--dim); border: 1px solid transparent; }
.lang a[aria-current="true"] { color: var(--paper); background: var(--ink); }
.lang a:not([aria-current]):hover { border-color: var(--ink); color: var(--ink); }
.top.no-nav .tools { margin-left: auto; }
@media (max-width: 1000px) { .top nav { display: none; } .tools { margin-left: auto; } }
@media (max-width: 400px) {
    .top .in { gap: 0.7rem; }
    .brand { font-size: 1.5rem; gap: 0.45rem; }
    .brand svg { width: 22px; height: 22px; }
    .tools { gap: 0.6rem; }
    .pal { gap: 0.4rem; }
    .lang a { padding: 0.2rem 0.3rem; }
    .js .flipbtn { display: none; }
}
@media (max-width: 340px) {
    html { scroll-padding-top: 6rem; }
    .top .in { flex-wrap: wrap; row-gap: 0.55rem; }
    .tools { width: 100%; justify-content: space-between; margin-left: 0; }
}

/* Кнопки: заливка «набігає» знизу */
.btn {
    display: inline-flex; align-items: center; gap: 0.75rem;
    padding: 0.95rem 1.5rem;
    border: 1px solid var(--ink); color: var(--ink);
    background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 100% / 100% 0%;
    font: 500 0.76rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
    text-decoration: none; cursor: pointer;
    transition: background-size 0.45s var(--ease), color 0.3s var(--ease), translate 0.45s var(--ease), scale 0.2s var(--ease);
}
.btn:active { scale: 0.975; }
.btn:hover { background-size: 100% 100%; color: var(--paper); text-decoration: none; }
.btn.solid { background: linear-gradient(var(--paper), var(--paper)) no-repeat 0 100% / 100% 0%, var(--ink); color: var(--paper); }
.btn.solid:hover { background-size: 100% 100%, auto; color: var(--ink); }
.ar { width: 1.15em; height: 0.65em; flex: none; transition: transform 0.35s var(--ease); }
.btn:hover .ar, a:hover > .ar { transform: translateX(4px); }
.btn:hover .ar.l, a:hover > .ar.l { transform: translateX(-4px); }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
/* Чорнильні краплі: на наведення з-під головної кнопки стікають краплі (маска drops.svg, колір бере з --ink) */
.btn { position: relative; }
.btn::after {
    content: ""; position: absolute; left: 16%; top: calc(100% - 1px); width: 40px; aspect-ratio: 72 / 48; pointer-events: none;
    background: var(--ink); -webkit-mask: url("/assets/pen/drops.svg") center / 100% 100% no-repeat; mask: url("/assets/pen/drops.svg") center / 100% 100% no-repeat;
    opacity: 0; transform: translateY(-10px) scale(0.5); transform-origin: 50% 0; filter: blur(4px);
    transition: opacity 0.4s var(--ease), transform 0.7s var(--ease), filter 0.5s var(--ease);
}
@media (hover: hover) {
    .btn:is(:hover, :focus-visible)::after { opacity: 1; transform: none; filter: none; }
}
.ctl .btn::after { display: none; }

/* Загальне */
.wrap { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
section { position: relative; padding: clamp(5.5rem, 12vw, 10rem) 0; }
.eyebrow { display: flex; align-items: center; gap: 0.7rem; font: 500 0.7rem/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin: 0; }
.eyebrow::before { content: ""; flex: none; width: 0.85em; height: 0.85em; border-radius: 50%; border: 1px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
h2 { font-size: clamp(2.5rem, 5.8vw, 4.9rem); line-height: 0.98; letter-spacing: -0.015em; margin: 0.32em 0 0.6em; }
h2 > .pen { margin: 0.32em 0 0 -2px; }
.lead { max-width: 38rem; font-size: clamp(1.12rem, 0.9vw + 0.95rem, 1.42rem); line-height: 1.55; color: var(--dim); margin: 0; }

/* Слово навиворіт: один колір усередині іншого */
.nw { white-space: nowrap; }
.flip { display: inline-block; background: linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 100% no-repeat; color: var(--paper); line-height: 0.86; padding: 0.06em 0.12em 0.1em; margin: 0 0.02em; }
button.flip { font: inherit; letter-spacing: inherit; text-transform: inherit; border: 0; border-radius: 0; -webkit-appearance: none; appearance: none; transition: rotate 0.5s var(--ease), translate 0.5s var(--ease), scale 0.2s var(--ease); }
.js button.flip { cursor: pointer; }
.js button.flip:hover { rotate: -1.6deg; translate: 0 -0.03em; }
.js button.flip:active { scale: 0.97; }
button.flip:focus-visible { outline: 2px solid var(--ink); outline-offset: 0.12em; }

/* Рукописні примітки на полях (Marck Script) і службові класи */
.hand { font-family: var(--hand); font-weight: 400; font-style: normal; letter-spacing: 0; text-transform: none; line-height: 1.2; font-synthesis: none; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Чорні (або білі) смуги з плавною S-кривою на межі */
.wavy { position: relative; }
.wavy::before, .wavy::after {
    content: ""; position: absolute; left: 0; right: 0; height: clamp(28px, 4.4vw, 64px);
    background: var(--paper); pointer-events: none;
    -webkit-mask: url("/assets/wave.svg") 0 0 / 100% 100% no-repeat;
    mask: url("/assets/wave.svg") 0 0 / 100% 100% no-repeat;
}
.wavy::before { bottom: 100%; margin-bottom: -1px; }
.wavy::after { top: 100%; margin-top: -1px; transform: scaleY(-1); }
.wavy.no-after::after { display: none; }

/* Кутки-дужки, намальовані пером (як обрізні мітки): будь-який блок із класом .crop */
.crop { position: relative; --c: var(--mark); }
.crop::before {
    content: ""; position: absolute; inset: -15px; pointer-events: none; z-index: 2; background: var(--c);
    -webkit-mask: url("/assets/pen/corner-tl.svg") 0 0 / 30px 30px no-repeat, url("/assets/pen/corner-tr.svg") 100% 0 / 30px 30px no-repeat,
        url("/assets/pen/corner-bl.svg") 0 100% / 30px 30px no-repeat, url("/assets/pen/corner-br.svg") 100% 100% / 30px 30px no-repeat;
    mask: url("/assets/pen/corner-tl.svg") 0 0 / 30px 30px no-repeat, url("/assets/pen/corner-tr.svg") 100% 0 / 30px 30px no-repeat,
        url("/assets/pen/corner-bl.svg") 0 100% / 30px 30px no-repeat, url("/assets/pen/corner-br.svg") 100% 100% / 30px 30px no-repeat;
}

/* Герой: текст ліворуч, «пластина» праворуч (один кадр у позитиві й негативі, розділений S-кривою) */
.hero-wrap { position: relative; overflow: hidden; overflow: clip; }
.hero { position: relative; max-width: var(--wrap); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) var(--gut) clamp(3.5rem, 7vw, 6rem); display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(3.3rem, 8.6vw, 8.1rem); line-height: 0.88; letter-spacing: -0.028em; margin: 0.32em 0 0.34em; }
.hero .lead { max-width: 33rem; }
.hero .flip { animation: wipe 1.1s var(--ease) 0.85s both; }
@keyframes wipe { from { background-size: 0% 100%; color: var(--ink); } to { background-size: 100% 100%; color: var(--paper); } }
.hero-text > * { animation: rise 1s var(--ease) both; }
.hero-text > h1 { animation: none; }
/* слова заголовка проступають із чорнила по одному (без JS теж: це чисте CSS) */
.wd { display: inline-block; animation: ink-in 1.1s var(--ease) calc(0.14s + var(--i, 0) * 0.1s) both; }
@keyframes ink-in { from { opacity: 0; transform: translateY(0.14em); filter: blur(9px); } to { opacity: 1; transform: none; filter: blur(0); } }
.hero-text > :nth-child(2) { animation-delay: 0.08s; }
.hero-text > :nth-child(3) { animation-delay: 0.18s; }
.hero-text > :nth-child(4) { animation-delay: 0.28s; }
.hero-text > :nth-child(5) { animation-delay: 0.38s; }
.hero-text > :nth-child(6) { animation-delay: 0.46s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.specs { display: flex; flex-wrap: wrap; gap: 0.6rem 0; margin: 2.4rem 0 0; padding: 0; list-style: none; font: 500 0.7rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.specs li { padding: 0 1rem; border-left: 1px solid var(--line); }
.specs li:first-child { padding-left: 0; border-left: 0; }

.plate-col { position: relative; display: grid; place-items: center; padding: 1.2rem 0; animation: rise 1.2s var(--ease) 0.2s both; }
.plate { position: relative; width: min(100%, 420px); margin: 0; }
.plate-lbl { display: flex; justify-content: space-between; margin: 0 0 1.3rem; font: 500 0.66rem/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.plate-lbl span { display: inline-flex; align-items: center; gap: 0.5rem; }
.plate-lbl span::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 1px solid var(--ink); }
.plate-lbl span + span::before { background: var(--ink); }
.plate .view { position: relative; overflow: hidden; background: linear-gradient(90deg, var(--ink) 50%, var(--paper) 50%); }
.plate canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; image-rendering: pixelated; }
.scan { position: absolute; inset: 0; overflow: hidden; pointer-events: none; mix-blend-mode: difference; }
.scan i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.28) 96%, #fff 96%, #fff 100%); transform: translateX(-100%); animation: scan 9s var(--ease) 1.2s infinite alternate; }
@keyframes scan { to { transform: translateX(100%); } }
.scale { display: grid; grid-template-columns: repeat(9, 1fr); margin-top: 1.4rem; border: 1px solid var(--ink); }
.scale i { height: 16px; background: radial-gradient(circle, var(--ink) calc(var(--k) * 0.62px), transparent calc(var(--k) * 0.62px + 0.7px)) 0 0 / 7px 7px; }
.scale i + i { border-left: 1px solid var(--line); }
.plate figcaption { margin-top: 0.9rem; font: 500 0.66rem/1.5 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
@media (max-width: 1000px) {
    .hero { grid-template-columns: 1fr; padding-top: 2rem; }
    .plate-col { padding: 2.2rem 0 0.5rem; }
    .plate { width: min(100%, 380px); }
}
@media (max-width: 480px) {
    .hero h1 { font-size: clamp(3rem, 15vw, 4.2rem); }
    .specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1rem; }
    .specs li, .specs li:first-child { padding: 0; border-left: 0; }
}

/* Плівка з кадрами: повільно пливе ліворуч (лише transform, без роботи для процесора) */
.reel { display: none; position: relative; overflow: hidden; }
.js .reel { display: block; }
.reel-track { position: relative; display: flex; width: max-content; padding: 40px 0 34px; animation: reel 110s linear infinite; }
.reel-track::before, .reel-track::after {
    content: ""; position: absolute; left: 0; right: 0; height: 16px; background: var(--ink); opacity: 0.85;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='16'%3E%3Crect x='7' y='3' width='14' height='10' rx='2.5'/%3E%3C/svg%3E") 0 center / 28px 16px repeat-x;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='16'%3E%3Crect x='7' y='3' width='14' height='10' rx='2.5'/%3E%3C/svg%3E") 0 center / 28px 16px repeat-x;
}
.reel-track::before { top: 11px; }
.reel-track::after { bottom: 8px; }
.reel figure { flex: none; width: 182px; margin: 0 14px 0 0; }
.reel canvas { display: block; width: 182px; height: 124px; background: var(--paper); }
.reel figcaption { display: flex; justify-content: space-between; margin-top: 0.55rem; font: 500 0.58rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
@keyframes reel { to { transform: translateX(-50%); } }

/* Демонстрація: кадр плівки протилежного тону до сторінки */
.frame { max-width: var(--wrap); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) var(--gut) 0; }
.frame-head { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between; align-items: baseline; margin-bottom: 1.8rem; }
.frame-head p { margin: 0; }
.film { --paper: var(--fg); --ink: var(--bg); position: relative; background: var(--paper); padding: 22px 46px; --c: var(--mark); }
.film::before, .film::after {
    content: ""; position: absolute; top: 8px; bottom: 8px; width: 18px; background: var(--ink); opacity: 0.8;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='30'%3E%3Crect x='3' y='8' width='12' height='14' rx='3'/%3E%3C/svg%3E") center / 18px 30px repeat-y;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='30'%3E%3Crect x='3' y='8' width='12' height='14' rx='3'/%3E%3C/svg%3E") center / 18px 30px repeat-y;
}
.film::before { left: 14px; }
.film::after { right: 14px; }
.film canvas { display: block; width: 100%; height: auto; margin: 0 auto; aspect-ratio: 3 / 2; background: var(--paper); touch-action: pan-y; }
.tc { position: absolute; left: 58px; top: 32px; font: 500 0.66rem/1 var(--mono); letter-spacing: 0.12em; background: var(--paper); color: var(--ink); padding: 0.3rem 0.45rem; pointer-events: none; }
.ctl { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; justify-content: space-between; margin-top: 1.4rem; font: 500 0.7rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.seg { display: inline-flex; border: 1px solid var(--ink); }
.seg button { display: inline-flex; align-items: center; gap: 0.55rem; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink); background: none; border: 0; padding: 0.7rem 1rem; cursor: pointer; transition: background-color 0.25s, color 0.25s; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg i { flex: none; display: block; width: 0.95rem; height: 0.95rem; border-radius: 50%; border: 1px solid currentColor; }
@property --cut { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --dr { syntax: "<length>"; inherits: false; initial-value: 0.9px; }
.seg [data-mode="bin"] i { background: linear-gradient(90deg, currentColor var(--cut), transparent var(--cut)); }
.seg [data-mode="dot"] i { background: radial-gradient(circle, currentColor var(--dr), transparent calc(var(--dr) + 0.4px)) 0 0 / 4px 4px; }
.seg [data-mode="ink"] i { background: repeating-linear-gradient(45deg, currentColor 0 1px, transparent 1px 3px); }
.seg [data-mode="sym"] i { border-radius: 2px; background: linear-gradient(currentColor, currentColor) 50% 35% / 60% 1px no-repeat, linear-gradient(currentColor, currentColor) 50% 65% / 40% 1px no-repeat; }
/* Ховер режимів: кнопка на мить показує, що робить режим. Поріг: межа чорного й білого їздить туди-сюди.
   Растр: крапки наливаються, як півтон темнішає. Штрихи: перо штрихує зліва направо. Символи: літери біжать рядком. */
.seg button { position: relative; isolation: isolate; overflow: hidden; --o: 0.3; }
.seg button::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease), clip-path 0.7s var(--ease); }
.seg [data-mode="bin"] { --o: 0.22; }
.seg [data-mode="bin"]::before { background: linear-gradient(90deg, currentColor var(--cut), transparent var(--cut)); }
.seg [data-mode="dot"]::before { background: radial-gradient(circle, currentColor var(--dr), transparent calc(var(--dr) + 0.5px)) 0 0 / 6px 6px; }
.seg [data-mode="ink"]::before { background: repeating-linear-gradient(115deg, currentColor 0 1px, transparent 1px 6px); clip-path: inset(0 100% 0 0); }
.seg [data-mode="sym"] { --o: 0.34; }
.seg [data-mode="sym"]::before {
    inset: 0 auto 0 0; width: max-content; display: flex; align-items: center; white-space: pre;
    content: "01 # % & @ + : / \\ = * ;   01 # % & @ + : / \\ = * ;   01 # % & @ + : / \\ = * ;   01 # % & @ + : / \\ = * ;   ";
    font: 500 0.62rem/1 var(--mono); letter-spacing: 0.34em;
}
@keyframes m-cut { from { --cut: 16%; } to { --cut: 84%; } }
@keyframes m-swell { from { --dr: 0.2px; } to { --dr: 2.1px; } }
@keyframes m-hatch { to { background-position: 4.24px 0; } }
@keyframes m-run { to { transform: translateX(-50%); } }
@keyframes m-glyph {
    0% { background-size: 60% 1px, 40% 1px; }
    34% { background-size: 36% 1px, 78% 1px; }
    67% { background-size: 82% 1px, 28% 1px; }
    100% { background-size: 60% 1px, 40% 1px; }
}
@media (hover: hover) {
    .seg button:is(:hover, :focus-visible)::before { opacity: var(--o); }
    .seg [data-mode="bin"]:is(:hover, :focus-visible)::before, .seg [data-mode="bin"]:is(:hover, :focus-visible) i { animation: m-cut 2.2s var(--ease) infinite alternate; }
    .seg [data-mode="dot"]:is(:hover, :focus-visible)::before, .seg [data-mode="dot"]:is(:hover, :focus-visible) i { animation: m-swell 1.8s var(--ease) infinite alternate; }
    .seg [data-mode="ink"]:is(:hover, :focus-visible)::before { clip-path: inset(0); animation: m-hatch 1.4s linear infinite; }
    .seg [data-mode="ink"]:is(:hover, :focus-visible) i { animation: m-hatch 1.1s linear infinite; }
    .seg [data-mode="sym"]:is(:hover, :focus-visible)::before { animation: m-run 5s steps(24) infinite; }
    .seg [data-mode="sym"]:is(:hover, :focus-visible) i { animation: m-glyph 0.9s steps(1) infinite; }
}
.slider { display: inline-flex; align-items: center; gap: 0.7rem; }
.slider input { width: 9rem; accent-color: var(--ink); }
.ctl .btn { padding: 0.7rem 1rem; font-size: 0.7rem; }
.ctl-act { display: inline-flex; flex-wrap: wrap; gap: 0.7rem; }
/* власне фото чи відео: рамка пунктиром при перетягуванні і рядок стану */
.dropmsg { position: absolute; z-index: 3; inset: 22px 46px; display: none; place-items: center; text-align: center; padding: 1rem; border: 2px dashed var(--ink); background: color-mix(in srgb, var(--paper) 84%, transparent); color: var(--ink); font-size: clamp(1.6rem, 3.4vw, 2.6rem); pointer-events: none; }
.film.drop .dropmsg { display: grid; }
.src { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.4rem; margin: 1.1rem 0 0; font: 500 0.7rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.src[hidden] { display: none; }
.src-name { display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; max-width: 100%; }
.src-name::before { content: ""; flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--ink); }
.src-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.src-act { display: inline-flex; gap: 1.2rem; }
.lnk { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink); background: none; border: 0; padding: 0.2rem 0; cursor: pointer; border-bottom: 1px solid currentColor; }
.lnk:hover { border-bottom-width: 2px; }
.lnk[hidden] { display: none; }
.srcmsg { margin: 0.8rem 0 0; min-height: 0; font: 500 0.74rem/1.5 var(--mono); color: var(--ink); }
.srcmsg:empty { display: none; }
@media (max-width: 600px) { .dropmsg { inset: 14px 30px; } }
.rd { display: block; margin: 1.1rem 0 0; font: 500 0.68rem/1.6 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.note { max-width: 46rem; margin: 0.7rem 0 0; font: 400 0.76rem/1.7 var(--mono); color: var(--dim); }
@media (max-width: 600px) {
    .seg { display: flex; width: 100%; }
    .seg button { flex: 1; justify-content: center; padding: 0.7rem 0.3rem; font-size: 0.66rem; }
    .seg i { display: none; }
    .film { padding: 14px 30px; }
    .film::before { left: 6px; width: 14px; }
    .film::after { right: 6px; width: 14px; }
    .tc { left: 38px; top: 22px; }
}

/* Завиток під головним заголовком і рукописні підказки */
.under { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1.4rem; margin: -0.2rem 0 1.1rem -0.3rem; }
.under .flourish { margin: 0; flex: 0 1 auto; }
.tip { display: none; align-items: flex-end; gap: 0.55rem; margin: 0; color: var(--ink); rotate: -2deg; transform-origin: 0 50%; }
.tip .hand { font-size: clamp(1.3rem, 1.8vw, 1.6rem); }
.tip .pen { width: 40px; margin-bottom: 0.35rem; }
.pen.up { rotate: 180deg; }
.js .tip { display: flex; animation: tip-in 1.2s var(--ease) 3.2s both; }
.js .tip .pen::before { transition-delay: 3.5s; }
html.seen .tip { display: none; }
@keyframes tip-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.frame-head .hint { display: flex; align-items: flex-start; gap: 0.7rem; font-family: var(--hand); font-style: normal; font-weight: 400; font-size: clamp(1.3rem, 1.9vw, 1.65rem); line-height: 1.15; letter-spacing: 0; text-transform: none; color: var(--ink); rotate: -1.5deg; }
.frame-head .hint .pen { width: 42px; margin-top: 0.2rem; }
@media (max-width: 700px) { .frame-head .hint .pen { display: none; } }
/* Перо: штрихи з assets/pen/*.svg (малює pen.py) служать маскою, колір бере з --ink, тож працюють у всіх палітрах.
   Усі штрихи декоративні (aria-hidden), на текст не налазять: їхнє місце — поля, проміжки й підкреслення. */
.pen { position: relative; display: block; flex: none; pointer-events: none; }
.pen::before { content: ""; position: absolute; inset: 0; background: var(--ink); -webkit-mask: var(--m) center / 100% 100% no-repeat; mask: var(--m) center / 100% 100% no-repeat; }
.pen.u1 { --m: url("/assets/pen/u1.svg"); width: clamp(150px, 16vw, 230px); aspect-ratio: 240 / 30; }
.pen.u2 { --m: url("/assets/pen/u2.svg"); width: clamp(160px, 17vw, 250px); aspect-ratio: 260 / 28; }
.pen.u3 { --m: url("/assets/pen/u3.svg"); width: clamp(140px, 15vw, 210px); aspect-ratio: 210 / 32; }
.pen.swash { --m: url("/assets/pen/swash.svg"); width: min(calc(var(--wrap) - 2 * var(--gut)), calc(100% - 2 * var(--gut))); height: 48px; margin: 0 auto; }
.pen.swash::before { -webkit-mask-size: cover; mask-size: cover; }
.pen.swash-s { --m: url("/assets/pen/swash-s.svg"); width: min(100%, 420px); aspect-ratio: 560 / 38; }
.pen.flourish { --m: url("/assets/pen/flourish.svg"); width: min(100%, 400px); aspect-ratio: 460 / 70; }
.pen.arrow-r { --m: url("/assets/pen/arrow-r.svg"); width: 46px; aspect-ratio: 96 / 64; }
.pen.arrow-l { --m: url("/assets/pen/arrow-l.svg"); width: 46px; aspect-ratio: 96 / 64; }
.pen.hatch { --m: url("/assets/pen/hatch.svg"); width: 56px; aspect-ratio: 1; }
.pen.drops { --m: url("/assets/pen/drops.svg"); width: 72px; aspect-ratio: 72 / 48; }
.pen.tick { --m: url("/assets/pen/tick.svg"); width: 34px; aspect-ratio: 56 / 48; }
.pen.cross { --m: url("/assets/pen/cross.svg"); width: 30px; aspect-ratio: 1; }

/* Штрих «пишеться» при появі: відкривається по ходу руки (лише з JS і без prefers-reduced-motion) */
.js .dr::before { clip-path: inset(-8px 100% -8px -8px); transition: clip-path 1.5s var(--ease) 0.25s; }
.js .dr.in::before, .js .in .dr::before { clip-path: inset(-8px); }
.js .dr.v::before { clip-path: inset(-8px -8px 100% -8px); transition-duration: 2.2s; }
.js .dr.v.in::before, .js .in .dr.v::before { clip-path: inset(-8px); }

/* Ліва риска «світло — тінь» у філософії: висока S-крива пером */
.scurve-pen { position: relative; }
.scurve-pen::before {
    content: ""; position: absolute; left: 50%; top: 0; height: 100%; max-height: 700px; aspect-ratio: 90 / 640; transform: translateX(-50%);
    background: var(--ink); -webkit-mask: url("/assets/pen/s-tall.svg") center top / 100% 100% no-repeat; mask: url("/assets/pen/s-tall.svg") center top / 100% 100% no-repeat;
}

/* Висока S-крива «пишеться» разом із прокручуванням (--p від 0 до 1 ставить site.js); без JS лінія видна вся */
.js .scurve-pen[data-scrub]::before { clip-path: inset(-8px -8px calc(100% - var(--p, 0) * 100%) -8px); }

/* Галочки пером у списках завантаження: «проступають» по черзі, коли блок з'являється; попередження SmartScreen позначене хрестиком */
.box li { position: relative; padding-left: 2.15rem; }
.box li::before {
    content: ""; position: absolute; left: 0; top: 0.2em; width: 24px; height: 21px; background: var(--ink);
    -webkit-mask: url("/assets/pen/tick.svg") 0 0 / 100% 100% no-repeat; mask: url("/assets/pen/tick.svg") 0 0 / 100% 100% no-repeat;
}
.box li.warn::before { left: 2px; top: 0.26em; width: 18px; height: 18px; -webkit-mask-image: url("/assets/pen/cross.svg"); mask-image: url("/assets/pen/cross.svg"); }
.js .box li::before { clip-path: inset(-4px 100% -4px -4px); transition: clip-path 0.8s var(--ease) calc(0.7s + var(--i, 0) * 0.24s); }
.js .in .box li::before { clip-path: inset(-4px); }

/* Штрихування в куті картки з'являється, коли на неї наводять */
.card::after {
    content: ""; position: absolute; right: 12px; bottom: 12px; width: 54px; height: 54px; pointer-events: none;
    background: var(--paper); -webkit-mask: url("/assets/pen/hatch.svg") center / 100% 100% no-repeat; mask: url("/assets/pen/hatch.svg") center / 100% 100% no-repeat;
    opacity: 0; transform: translate(8px, 8px); transition: opacity 0.4s var(--ease), transform 0.6s var(--ease);
}
.card:hover::after { opacity: 0.85; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .js .dr::before, .js .dr.v::before { clip-path: none; transition: none; }
    .js .scurve-pen[data-scrub]::before { clip-path: none; }
    .js .box li::before { clip-path: none; transition: none; }
    .card::after { transition: none; }
    .top nav a::after { transition: none; }
}
@media print { .pen, .card::after, .scurve-pen::before, .box li::before, .top::after, .top nav a::after { display: none; } }

/* Великий контурний номер розділу */
.num { display: block; width: fit-content; margin: -0.1em 0 0.9rem -0.05em; padding: 0.12em 0.05em 0.06em; font-size: clamp(5.5rem, 13vw, 10rem); font-weight: 700; line-height: 0.78; letter-spacing: -0.03em; color: transparent; -webkit-text-fill-color: transparent; background: radial-gradient(circle, var(--ink) 1.15px, transparent 1.65px) 0 0 / 5px 5px; -webkit-background-clip: text; background-clip: text; user-select: none; }

/* 01 Філософія */
.mani { display: grid; grid-template-columns: 1fr clamp(56px, 6vw, 84px) 1.1fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: stretch; }
.mani .scurve { min-height: 100%; }
.mani blockquote { margin: 2.2rem 0 0; padding: 0; font-size: clamp(1.9rem, 3.2vw, 2.7rem); font-style: italic; line-height: 1.14; }
.mani .txt p { margin: 0 0 1.45em; font-size: 1.08em; }
.mani .txt p:first-child::first-letter { float: left; font: 500 5.4em/0.74 var(--display); padding: 0.05em 0.1em 0 0; }
@media (max-width: 860px) { .mani { grid-template-columns: 1fr; } .mani .scurve { display: none; } }

/* 02 Можливості */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 3rem; }
.card { position: relative; padding: 1.9rem 1.7rem 2.4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color 0.35s var(--ease), color 0.35s var(--ease); }
.card::before { content: "+"; position: absolute; left: -0.34em; top: -0.58em; font: 400 0.95rem/1 var(--mono); color: var(--dim); }
.card:hover { background: var(--ink); color: var(--paper); }
.card > * { position: relative; z-index: 1; }
/* пляма світла з крапок, що йде за курсором усередині картки (--gx, --gy ставить site.js) */
.card > .glow { position: absolute; z-index: 0; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s var(--ease);
    background: radial-gradient(circle, var(--paper) 1.15px, transparent 1.7px) 0 0 / 6px 6px;
    -webkit-mask: radial-gradient(circle 150px at var(--gx, 50%) var(--gy, 50%), rgba(0, 0, 0, 0.5), transparent 72%);
    mask: radial-gradient(circle 150px at var(--gx, 50%) var(--gy, 50%), rgba(0, 0, 0, 0.5), transparent 72%); }
.card:hover > .glow { opacity: 1; }
.card .row { display: flex; justify-content: space-between; align-items: flex-start; }
.card .k { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.14em; opacity: 0.7; }
.card h3 { font-size: 2.05rem; line-height: 1.02; margin: 1.5rem 0 0.6rem; }
.card p { margin: 0; color: var(--dim); font-size: 0.98rem; transition: color 0.35s; }
.card:hover p { color: inherit; }
.ico { width: 46px; height: 46px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ico .f { fill: currentColor; stroke: none; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* 03 Почерки (смуга навиворіт) */
#modes { padding: clamp(6.5rem, 14vw, 11rem) 0; }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 3.4rem; border-top: 1px solid var(--line); }
.mode { padding: 2rem 1.6rem 0 0; }
.mode + .mode { padding-left: 1.6rem; border-left: 1px solid var(--line); }
.sw { display: block; position: relative; width: 96px; height: 96px; margin-bottom: 1.5rem; border-radius: 50%; border: 1px solid var(--ink); overflow: hidden; }
.sw::before { content: ""; position: absolute; inset: 0; background: var(--pat); }
.sw.bin { --pat: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.sw.dot { --pat: radial-gradient(circle, var(--ink) 2.3px, transparent 2.9px) 0 0 / 9px 9px; }
.sw.ink { --pat: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 5px); }
.sw.sym::before { content: "@%#*+=-:. @%#*+=-:. @%#*+=-:."; display: grid; place-items: center; padding: 10px; font: 500 13px/1.05 var(--mono); letter-spacing: 1px; text-align: center; word-break: break-all; color: var(--ink); background: none; }
.mode h3 { font-size: 2.1rem; line-height: 1; }
.mode p { margin: 0.7rem 0 0; color: var(--dim); font-size: 0.98rem; }
@media (max-width: 900px) {
    .modes { grid-template-columns: repeat(2, 1fr); }
    .mode:nth-child(3) { padding-left: 0; border-left: 0; }
    .mode:nth-child(n + 3) { margin-top: 2.4rem; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
    .modes { grid-template-columns: 1fr; }
    .mode, .mode + .mode { padding: 1.8rem 0 0; border-left: 0; }
    .mode + .mode { margin-top: 1.8rem; border-top: 1px solid var(--line); }
}

/* 04 Рівні */
.ladder { list-style: none; margin: 3.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
.ladder li { position: relative; text-align: center; }
.ladder li::before { content: ""; position: absolute; top: 32px; left: -50%; width: 100%; border-top: 1px dotted var(--ink); }
.ladder li:first-child::before { display: none; }
.ladder li.br::before { border-top-style: dashed; }
.disc { display: block; position: relative; z-index: 1; width: 64px; height: 64px; margin: 0 auto; border: 1px solid var(--ink); border-radius: 50%; background-color: var(--paper); overflow: hidden; }
.disc.l1 { background-image: radial-gradient(circle, var(--ink) 1.1px, transparent 1.6px); background-size: 10px 10px; }
.disc.l2 { background-image: radial-gradient(circle, var(--ink) 1.6px, transparent 2.1px); background-size: 8px 8px; }
.disc.l3 { background-image: repeating-linear-gradient(0deg, var(--ink) 0 1px, transparent 1px 5px); }
.disc.l4 { background-image: repeating-linear-gradient(45deg, var(--ink) 0 1px, transparent 1px 5px), repeating-linear-gradient(-45deg, var(--ink) 0 1px, transparent 1px 5px); }
.disc.l5 { background: var(--ink); box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--ink); }
.disc.dia { width: 46px; height: 46px; margin-top: 9px; border-radius: 0; border-style: dashed; transform: rotate(45deg); background-image: linear-gradient(var(--ink) 1px, transparent 1px), linear-gradient(90deg, var(--ink) 1px, transparent 1px); background-size: 8px 8px; }
.ladder .lbl { display: block; margin-top: 1rem; font: 500 0.78rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.ladder .sub { display: block; margin-top: 0.2rem; font-size: 0.86rem; color: var(--dim); }
.notes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; margin-top: 3.4rem; }
.notes div { border-top: 1px solid var(--line); padding-top: 1rem; }
.notes h4 { font: 500 0.74rem/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.notes p { margin: 0.6rem 0 0; color: var(--dim); font-size: 0.98rem; }
@media (max-width: 900px) { .notes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
    .ladder { grid-template-columns: repeat(3, 1fr); row-gap: 1.8rem; }
    .ladder li::before { display: none; }
    .notes { grid-template-columns: 1fr; }
}

/* Пауза: одна фраза на весь екран */
.inter { padding: clamp(4rem, 9vw, 7rem) 0; text-align: center; }
.inter blockquote { margin: 0 auto; max-width: 15ch; font-size: clamp(2.8rem, 8vw, 6.8rem); font-style: italic; line-height: 0.98; letter-spacing: -0.02em; }
.inter blockquote span { font-style: normal; }
.inter .pen { margin: clamp(1.4rem, 3vw, 2.4rem) auto 0; }

/* 05 Завантаження */
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.8rem, 3.4vw, 2.8rem); margin-top: 3.2rem; }
.box { position: relative; border: 1px solid var(--ink); padding: clamp(1.5rem, 3vw, 2.4rem); display: flex; flex-direction: column; gap: 1rem; }
.box.inv { border-color: var(--paper); }
.box .ico { position: absolute; right: clamp(1.4rem, 3vw, 2.2rem); top: clamp(1.4rem, 3vw, 2.2rem); width: 56px; height: 56px; }
.box h3 { font-size: clamp(2.1rem, 3.6vw, 3rem); line-height: 1; }
.tag { align-self: flex-start; font: 500 0.66rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid currentColor; padding: 0.35rem 0.6rem; }
.box ul { margin: 0; padding-left: 0; list-style: none; color: var(--dim); font-size: 0.98rem; }
.box li { margin: 0 0 0.45rem; }
.box .actions { margin-top: auto; padding-top: 0.6rem; }
.box small { font: 400 0.74rem/1.6 var(--mono); color: var(--dim); }
.sys { margin: 2.4rem 0 0; font: 400 0.8rem/1.8 var(--mono); color: var(--dim); }
@media (max-width: 820px) { .dl { grid-template-columns: 1fr; } }

/* 06 Запитання */
.faq { margin-top: 2.6rem; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); padding: 1.3rem 0; }
summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; font-size: clamp(1.45rem, 2.3vw, 1.85rem); line-height: 1.15; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 28px; height: 28px; background: var(--ink); -webkit-mask: url("/assets/pen/cross.svg") center / contain no-repeat; mask: url("/assets/pen/cross.svg") center / contain no-repeat; rotate: 45deg; transition: rotate 0.55s var(--ease), scale 0.3s var(--ease); }
summary:hover::after { scale: 1.14; }
details[open] summary::after { rotate: 0deg; }
details p { margin: 0.9rem 0 0; max-width: 46rem; color: var(--dim); }

/* Підвал (смуга навиворіт) */
footer { position: relative; display: flow-root; margin-top: clamp(3rem, 6vw, 5rem); padding: clamp(3.5rem, 7vw, 6rem) 0 0; font: 400 0.78rem/1.8 var(--mono); letter-spacing: 0.05em; color: var(--dim); }
footer.inv { color: var(--dim); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.foot h4 { font: 500 0.78rem/1.8 var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink); margin-bottom: 0.6rem; }
.foot a { display: block; text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.ps { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; margin: 2.4rem 0 0; }
.ps p { margin: 0; max-width: 34rem; font-size: clamp(1.4rem, 2.2vw, 1.8rem); color: var(--ink); rotate: -1deg; transform-origin: 0 50%; }
.ps-act { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.mini { display: none; font: 500 0.68rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); background: none; border: 1px solid var(--ink); padding: 0.7rem 0.95rem; cursor: pointer; transition: background-color 0.25s, color 0.25s; }
.js .mini { display: inline-block; }
.mini[hidden] { display: none; }
.mini:hover { background: var(--ink); color: var(--paper); }
.mini[aria-pressed="false"][data-pen] { color: var(--dim); border-style: dashed; }
.mega { margin: 2.2rem 0 0; font-size: clamp(5rem, 21vw, 18rem); line-height: 0.82; letter-spacing: -0.035em; color: color-mix(in srgb, var(--ink) 9%, var(--paper)); user-select: none; white-space: nowrap; overflow: hidden; }
.perf { height: 16px; margin: 1.6rem 0 10px; background: var(--ink); opacity: 0.5; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='16'%3E%3Crect x='7' y='3' width='14' height='10' rx='2.5'/%3E%3C/svg%3E") 0 center / 28px 16px repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='16'%3E%3Crect x='7' y='3' width='14' height='10' rx='2.5'/%3E%3C/svg%3E") 0 center / 28px 16px repeat-x; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr; } }

/* «Місяць» у півтонах: малює site.js (canvas[data-ht]) */
.moon { display: none; position: absolute; right: var(--gut); top: clamp(1rem, 4vw, 3rem); width: 280px; height: 280px; image-rendering: pixelated; pointer-events: none; opacity: 0.9; }
@media (min-width: 1100px) { .moon { display: block; } #modes h2 { max-width: 11em; } }

/* Текстові сторінки (політика) */
.doc { max-width: 46rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--gut) 6rem; counter-reset: sec; }
.doc h1 { font-size: clamp(2.9rem, 8.5vw, 5.6rem); line-height: 0.94; letter-spacing: -0.02em; margin: 0.34em 0 0.5em; }
.doc .big { margin: 2rem 0 2.6rem; padding-left: 1.3rem; border-left: 1px solid var(--ink); font: 500 clamp(1.45rem, 2.6vw, 1.9rem)/1.32 var(--display); }
.doc h2 { font-size: clamp(1.8rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -0.01em; margin: 2.6em 0 0.5em; counter-increment: sec; }
.doc h2::before { content: counter(sec, decimal-leading-zero) "\00a0\00b7\00a0"; font: 500 0.78rem/1 var(--mono); letter-spacing: 0.1em; color: var(--dim); vertical-align: middle; }
.doc > .pen { margin: 0.4rem 0 0.8rem -2px; }
.doc p, .doc li { color: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 0 0 0.5em; }
code { font: 400 0.86em var(--mono); background: var(--faint); border: 1px solid var(--line); padding: 0.05em 0.35em; }
.back { display: inline-flex; align-items: center; gap: 0.7rem; margin-top: 3rem; font: 500 0.76rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }

/* 404 */
.lost { position: relative; overflow: hidden; overflow: clip; min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 4rem 1rem; }
.lost > div { position: relative; }
.lost h1 { font-size: clamp(5.5rem, 22vw, 16rem); line-height: 0.82; letter-spacing: -0.035em; }
.lost .pen { margin: clamp(1.2rem, 3vw, 2rem) auto 0; }
.lost .flip { padding: 0.04em 0.12em 0.08em; }
.lost p { color: var(--dim); max-width: 30rem; margin: 1rem auto 0; }
.lost .tip { margin: 1.6rem auto 0; justify-content: center; color: var(--ink); text-align: left; max-width: none; }
.lost .tip .pen { margin: 0 0 0.35rem; }
.js .lost .tip { animation-delay: 1.6s; }
.js .lost .tip .pen::before { transition-delay: 1.9s; }

/* Поява при прокручуванні (лише з JS): повільно, без поспіху */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
/* Заголовки секцій проступають, як чорнило крізь папір: з розмиття до різкості */
.js .rv h2 { filter: blur(9px); transition: filter 1.5s var(--ease) 0.2s; }
.js .rv.in h2 { filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    body::after { animation: none; }
    .js .rv { opacity: 1; transform: none; transition: none; }
    body, .card, .btn { transition: none; }
    .hero .flip, .hero-text > *, .plate-col, .wd, .tip, .js .tip { animation: none; }
    .btn, button.flip, .flipbtn, summary::after { transition: none; }
    .scan i { animation: none; display: none; }
    .reel-track { animation: none; }
    .js .rv h2 { filter: none; transition: none; }
    .seg button::before, .seg i, .btn::after { animation: none !important; transition: none; }
}
@media print {
    body::after, .top, .film::before, .film::after, .wavy::before, .wavy::after, .reel, .scan, .trail, .ps-act, .glow, .tip { display: none; }
}
