/* Shared components of the generated pages (SPEC §0.4, §2), in the site's paper language: hairlines, mono labels, square chips, no
   rounded cards, no shadows. Loaded on every page after styles.css (the base). Owned by the platform; page CSS goes into
   css/home.css, css/ai.css, css/led.css. Conventions:
   - gutters: var(--gut) = 24 px, 16 px at ≤ 720 px; a section is .sec (top hairline, vertical rhythm var(--sec-y))
   - type scale: --t-h1 (page H1), --t-h2 (section titles, as the old About h2), --t-lead, --t-body; titles are bold uppercase,
     labels are .label.mono (accent), body copy is #3a3f4a on paper
   - CTAs: .cta.primary = the accent chip (the form's Send), .cta.secondary = the hairline chip (the hero's hint), in a .ctas row
   - the page's scroll padding clears the fixed header: anchors, glides (scroll.js) and keyboard focus stop below it; nothing may
     scroll sideways at 390, 768 or 1440 */
:root{--gut:24px;--sec-y:88px;--t-h1:clamp(32px,5vw,64px);--t-h2:clamp(28px,4vw,46px);--t-lead:clamp(17px,1.5vw,20px);--t-body:16px;--hair:1px solid var(--line);--body-ink:#3a3f4a}
@media (max-width:720px){:root{--gut:16px;--sec-y:56px}}
/* scroll-padding, not a margin per [id]: the browser also keeps a focused element (Tab, Shift+Tab) clear of the header, with room for its
   ring; anchor jumps and scroll.js glides use the same offset. The home's tiles also clear the sticky filter bar (css/home.css) */
html{scroll-padding-top:calc(var(--header) + 12px)}
h2.label,h3.label{font-weight:400}

/* skip link: off-screen until focused */
.skip{position:fixed;left:8px;top:8px;z-index:60;background:var(--ink);color:var(--paper);padding:8px 12px;transform:translateY(-200%)}
.skip:focus{transform:none}

/* ---- header nav (SPEC §3): the current page in accent; phones get «Menu» and a full-width panel (site/js/nav.js) */
nav.top a[aria-current="page"]{color:var(--accent)}
header.site .menu{display:none}
@media (max-width:1100px){header.site .tag{display:none}}
@media (max-width:860px){
  header.site .menu{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:10px;cursor:pointer;min-height:40px;padding:0 0 0 12px;color:var(--ink);font-family:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase}
  header.site .menu::after{content:'';width:14px;height:5px;border-top:1px solid currentColor;border-bottom:1px solid currentColor;transition:height .2s}
  header.site .menu:hover,header.site.open .menu{color:var(--accent)}
  header.site.open .menu::after{height:0;border-bottom:0}
  header.site .menu:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
  header.site nav.top{display:none;position:fixed;left:0;right:0;top:var(--header);flex-direction:column;gap:0;background:var(--paper);border-bottom:var(--hair);padding:4px var(--gut) 16px;max-height:calc(100dvh - var(--header));overflow-y:auto}
  header.site.open nav.top{display:flex}
  header.site nav.top a{font-family:"Instrument Sans","Onest",system-ui,sans-serif;font-size:26px;font-weight:600;letter-spacing:-.02em;text-transform:none;padding:14px 0;border-bottom:var(--hair)}
  header.site nav.top a:last-child{border-bottom:0}
}

/* ---- footer: contacts, the nav + privacy, © and the mark */
footer.site .f-nav{display:flex;flex-wrap:wrap;gap:10px 22px}
footer.site .f-nav a:hover{color:var(--accent)}
footer.site .f-nav a[href$="privacy.html"]{color:var(--mid)}
@media (max-width:720px){footer.site{flex-direction:column;align-items:flex-start;gap:32px}footer.site .fine{align-items:flex-start}}

/* ---- page frame and sections */
main.page{padding-top:var(--header)}
.sec{padding:var(--sec-y) var(--gut);border-top:var(--hair)}
main.page>.sec:first-child{border-top:0}
.sec-head{margin:0 0 40px;max-width:72ch}
.sec-title{font-size:var(--t-h2);line-height:1.02;letter-spacing:-.03em;margin:0;font-weight:700;text-transform:uppercase}
.sec-lead{font-size:var(--t-lead);line-height:1.4;margin:18px 0 0;max-width:58ch;color:var(--body-ink)}
.page-hero h1{font-size:var(--t-h1);line-height:1;letter-spacing:-.035em;margin:0;font-weight:700;text-transform:uppercase;max-width:20ch;overflow-wrap:break-word}
.page-hero .sec-lead{margin-top:24px}
.alias{display:block;height:0}

/* ---- calls to action */
.ctas{display:flex;flex-wrap:wrap;gap:12px 14px;margin-top:32px}
.cta{display:inline-flex;align-items:center;gap:10px;padding:10px 22px;border:1px solid transparent;transition:color .2s,background .2s,border-color .2s}
.cta.primary{color:var(--paper);background:var(--accent)}
.cta.primary:hover{background:var(--ink)}
.cta.secondary{color:var(--ink);background:var(--paper);border-color:var(--line)}
.cta.secondary:hover{color:var(--accent);border-color:var(--accent)}

/* ---- media figure: the box keeps the image ratio (width/height attributes); a play button opens the modal player */
figure.media{margin:0;display:grid;gap:10px;min-width:0}
figure.media img{display:block;width:100%;height:auto;background:#E4E6EB}
figure.media figcaption{color:var(--mid)}
.media-play{all:unset;box-sizing:border-box;cursor:pointer;position:relative;display:block}
.media-play:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.media-play .play-mark{position:absolute;left:12px;bottom:12px;color:var(--paper);background:var(--ink);padding:6px 10px;transition:background .2s}
.media-play:hover .play-mark,.media-play:focus-visible .play-mark{background:var(--accent)}
/* a work card's preview loop (js/card-previews.js): over the poster, in the poster's own box and crop, shown once it has a frame */
figure.sw .media-play video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity .4s;pointer-events:none}
figure.sw.playing .media-play video{opacity:1}
@media (prefers-reduced-motion:reduce){figure.sw .media-play video{display:none}}

/* ---- numbered steps */
.steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));border-top:var(--hair)}
.steps li{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;padding:16px 20px 18px 0;border-bottom:var(--hair);align-items:baseline}
.steps b{font-weight:600;font-size:17px;letter-spacing:-.01em}
.steps p{margin:6px 0 0;color:var(--body-ink);font-size:15px;line-height:1.45;max-width:46ch}

/* ---- FAQ as <details> */
.faq{border-top:var(--hair);max-width:80ch}
.faq details{border-bottom:var(--hair)}
.faq summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:baseline;gap:24px;padding:18px 0;font-size:18px;font-weight:600;letter-spacing:-.01em}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:'+';flex:0 0 auto;color:var(--accent);font-family:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:400}
.faq details[open] summary::after{content:'−'}
.faq summary:hover{color:var(--accent)}
.faq .a{padding:0 0 20px;max-width:64ch}
.faq .a p{margin:0 0 10px;font-size:var(--t-body);line-height:1.5;color:var(--body-ink)}

/* ---- specs table and credits list */
table.specs{border-collapse:collapse;width:100%;max-width:720px}
table.specs th,table.specs td{border-top:var(--hair);padding:10px 16px 10px 0;text-align:left;vertical-align:top}
table.specs tr:last-child>*{border-bottom:var(--hair)}
table.specs th{color:var(--mid);font-weight:400;white-space:nowrap;width:1%}
table.specs td{font-size:15px;line-height:1.45}
ul.credits{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:15px;line-height:1.4}
ul.credits li{display:flex;flex-wrap:wrap;gap:2px 12px}
ul.credits .mono{color:var(--mid);min-width:14ch}

/* ---- the home grid's server-rendered list of works (the no-JS base; main.js replaces it with the grid) */
.worklist{list-style:none;margin:0;padding:6px 0 0;columns:3 260px;column-gap:24px}
.worklist li{break-inside:avoid;border-top:var(--hair)}
.worklist a{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:10px 0}
.worklist a:hover{color:var(--accent)}
.worklist b{font-weight:600;font-size:15px;letter-spacing:-.01em;min-width:0}
.worklist .mono{color:var(--mid);white-space:nowrap}

/* ---- the privacy notice and the 404 page */
.legal{max-width:calc(43em + 2 * var(--gut));margin:0 auto;padding:var(--sec-y) var(--gut) 96px}   /* the notice is one reading column in the middle of the page (the owner, 2026-10-10: «по центру лучше»; it stood on the grid's left edge before). 43em = the old 64ch in Instrument Sans: a ch follows the font that is loaded, so the whole column widened when the web font swapped in (CLS 0.39 at 768) */
.legal h1{font-size:clamp(28px,4vw,40px);line-height:1.02;letter-spacing:-.03em;margin:0 0 28px;font-weight:700;text-transform:uppercase}
.legal p:not(.label){font-size:17px;line-height:1.5;margin:0 0 16px}
.legal h2.label{margin-top:40px}
.legal ul{list-style:none;margin:0 0 16px;padding:0;border-top:var(--hair)}   /* the notice's lists: rows under hairlines, like every list of the site */
.legal li{font-size:17px;line-height:1.5;padding:11px 0 12px;border-bottom:var(--hair)}
.legal li b{font-weight:600}
.legal p.updated{margin:40px 0 0;color:var(--mid)}
.legal a{border-bottom:1px solid var(--line)}
.legal a:hover{color:var(--accent);border-bottom-color:var(--accent)}
.nf{min-height:calc(100svh - var(--header) - 220px)}

/* ---- «Copy link» to a work's share URL (parts.mjs copyLink, site/js/page.js; SPEC §8.1): a mono text button on a hairline, the
   confirmation beside it in the accent; without the Clipboard API a selected read-only field with the URL appears under it */
.copy{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:8px 14px;max-width:100%}
.copy-link{all:unset;box-sizing:border-box;cursor:pointer;font-family:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;line-height:1.4;color:var(--ink);border-bottom:1px solid var(--line);padding-bottom:2px;transition:color .2s,border-color .2s}
.copy-link:hover,.copy-link[data-state="copied"]{color:var(--accent);border-bottom-color:var(--accent)}
.copy-link:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.copy-msg{color:var(--accent)}
.copy-field{flex:1 1 100%;min-width:0;box-sizing:border-box;margin:0;padding:9px 10px;border:1px solid var(--accent);border-radius:0;background:var(--paper);color:var(--ink);font-size:12px;letter-spacing:.02em;text-transform:none}
@media (prefers-reduced-motion:reduce){.copy-link{transition:none}}
/* an anchor target focused after a glide (scroll.js) gets no ring: the focus is for screen readers and the next Tab */
section[tabindex="-1"]:focus,[id][tabindex="-1"]:focus{outline:none}

/* ---- one product across the pages (the integrate pass): rules that were repeated per page live here once.
   Type: h1 / h2 titles are bold uppercase; h3 item titles (a work's title, a step, a use) keep their own case; headings never leave
   an orphan word on their last line and leads wrap evenly. */
main :is(h1,h2,h3),.faq summary{text-wrap:balance}
/* the 01 / 02 numbers of steps, uses, types and examples */
main .n.mono{color:var(--accent)}
.sec-lead,.svc-line,.hero-lead{text-wrap:pretty}
/* a work's title in a page body (the landings' cards and examples, the home's crafts): the catalog's own case, as the player and the
   grid show it; it opens the player in place (page.js / main.js) */
.inst-title,.ex-text h3{font-size:clamp(22px,2.1vw,30px);line-height:1.08;letter-spacing:-.02em;font-weight:700;overflow-wrap:break-word}
.inst-title a,.ex-text h3 a{transition:color .2s}
.inst-title a:hover,.ex-text h3 a:hover{color:var(--accent)}
.inst-title a:focus-visible,.ex-text h3 a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
/* mono controls: the hairline chip that opens an item in the player (button.chip) and the underlined text button (.playlink) */
button.chip,.playlink{all:unset;box-sizing:border-box;cursor:pointer;font-family:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink);transition:color .2s,border-color .2s}
button.chip{padding:9px 12px;border:1px solid var(--line);background:var(--paper);line-height:1.2}
button.chip:hover{color:var(--accent);border-color:var(--accent)}
button.chip:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.playlink{white-space:nowrap;border-bottom:1px solid var(--line)}
.playlink:hover{color:var(--accent);border-bottom-color:var(--accent)}
.playlink:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
/* a media caption under a picture: mono, quiet, the title on the left and a player link on the right (the home's services and crafts) */
.media-cap{display:flex;justify-content:space-between;align-items:baseline;gap:6px 16px;flex-wrap:wrap;color:var(--mid);margin:10px 0 0}
@media (prefers-reduced-motion:reduce){button.chip,.playlink,.inst-title a,.ex-text h3 a{transition:none}}
/* the loading screen (js/boot.js): <html class="booting"> is covered by paper from the first paint; the script lifts the cover (at once
   when the page is ready in time, after its mark animation otherwise). If the script never arrives the cover lifts itself after 6 s;
   without scripts css/nojs.css removes it */
html.booting::before{content:"";position:fixed;inset:0;z-index:2147483000;background:var(--paper);animation:nb-boot-failsafe 1ms linear 4s forwards}
@keyframes nb-boot-failsafe{to{visibility:hidden}}
html.boot-on{overflow:hidden}
