/* ALPERN · Alpine glass design system v2 (main design from 10.10.2026, source: the client space /space/).
   Day = misty morning (concept 1C), night = blue hour (concept 1A); theme set before paint by alpine.js (auto 07–17 = day).
   Fonts: Fraunces (headings, key numbers) · Manrope (everything you read) · IBM Plex Mono (codes, figures) — assets/fonts-c.css.
   Contrast: all text ≥ 5:1 on the glass over the brightest part of either background (measured 10.10.2026). */
:root { --display: 'Fraunces', Georgia, serif; --text: 'Manrope', -apple-system, sans-serif; --mono: 'IBM Plex Mono', Menlo, monospace;
  --ink: #F3F1EC; --soft: #E2DFD8; --muted: #CFCBC3; --gold: #E2C48A; --gold2: #F2DFB4; --acc: #E2C48A; --acc2: #F2DFB4; --cyan: #6FD6F2;
  --glass: rgba(30,32,38,.70); --glass-hi: rgba(44,46,52,.76); --row: rgba(255,255,255,.045); --line: rgba(255,255,255,.10); --hair: rgba(226,196,138,.42); --hair-hi: rgba(236,208,150,.85);
  --hi: #FF9A8F; --hi-bg: rgba(255,120,110,.14); --ok: #8BE3B8; --ok-bg: rgba(139,227,184,.13); --warn: #F3C76F; --warn-bg: rgba(243,199,111,.14);
  --r: 18px; --blur: saturate(130%) blur(20px); --glow: 0 0 0 1px var(--hair-hi), 0 10px 30px -10px rgba(226,196,138,.55); }
body.night { --glass: rgba(10,20,46,.55); --glass-hi: rgba(18,32,66,.66); --row: rgba(140,180,255,.06); --line: rgba(160,190,255,.13); --hair: rgba(214,190,140,.40);
  --muted: #A3B0C8; --soft: #D0D7E4; --acc: #3FC3EE; --acc2: #8FE0F7; --glow: 0 0 0 1px var(--hair-hi), 0 10px 30px -10px rgba(63,195,238,.5); }
* { box-sizing: border-box; }
html { background: #11151c; scrollbar-gutter: stable; }
body.alp { margin: 0; color: var(--ink); font: 400 16px/1.6 var(--text); background: transparent; -webkit-font-smoothing: antialiased; }
body.alp a { color: inherit; }
body.alp :focus-visible { outline: none; box-shadow: var(--glow) !important; }
/* scenery */
.plate { position: fixed; inset: 0; z-index: -2; background: #1d222a url('space/bg-day.webp') 62% 38% / cover no-repeat; }
body.night .plate { background-image: url('space/bg-night.webp'); background-color: #0a1430; }
@media (min-resolution: 1.2dppx), (min-width: 1300px) { .plate { background-image: url('space/bg-day@2x.webp'); } body.night .plate { background-image: url('space/bg-night@2x.webp'); } }
.veil { position: fixed; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14,16,20,.62) 0%, rgba(14,16,20,.35) 40%, rgba(14,16,20,.15) 75%), linear-gradient(180deg, rgba(14,16,20,0) 30%, rgba(14,16,20,.55) 100%); }
body.night .veil { background: linear-gradient(90deg, rgba(4,10,28,.55) 0%, rgba(4,10,28,.28) 40%, rgba(4,10,28,.1) 75%), linear-gradient(180deg, rgba(4,10,28,0) 30%, rgba(4,10,28,.55) 100%); }
.glass { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--hair); box-shadow: 0 24px 60px -30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.07); }
/* top bar */
.abar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; max-width: 1240px; margin: 0 auto; padding: 16px 24px; }
.abar .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 8px 14px; border-radius: 999px; }
.abar .brand img { width: 30px; } .abar .brand b { font: 400 19px var(--display); letter-spacing: .26em; color: var(--gold2); }
.abar .sp { flex: 1; }
.abar nav { display: flex; gap: 6px; padding: 5px; border-radius: 999px; }
.abar nav a { padding: 8px 14px; border-radius: 999px; font: 600 14px var(--text); color: var(--soft); text-decoration: none; transition: all .18s; }
.abar nav a:hover { background: rgba(255,255,255,.08); color: #fff; } .abar nav a.on { background: linear-gradient(180deg, rgba(242,223,180,.30), rgba(206,168,96,.18)); color: #fff; box-shadow: inset 0 0 0 1px rgba(236,208,150,.7); }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); cursor: pointer; padding: 0; font: inherit; transition: all .18s; }
.iconbtn:hover { box-shadow: var(--glow); } .iconbtn svg { width: 20px; height: 20px; }
/* type */
.sc { font: 600 12px var(--text); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.h1 { font: 400 52px/1.05 var(--display); letter-spacing: -.01em; color: #fff; margin: 10px 0 0; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.rule { display: block; width: 52px; height: 2px; margin: 18px 0 14px; background: var(--gold); border-radius: 2px; }
.lead { margin: 0; max-width: 680px; font-size: 17.5px; color: #ECE9E2; text-shadow: 0 1px 12px rgba(0,0,0,.5); }
/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; font: 600 15px/1 var(--text); border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap; flex-shrink: 0; color: var(--ink);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.22); transition: background .18s, box-shadow .18s, border-color .18s, transform .18s; position: relative; overflow: hidden; isolation: isolate; }
.btn:hover { background: rgba(255,255,255,.12); border-color: var(--hair-hi); box-shadow: var(--glow); transform: translateY(-1px); }
.btn.gold { color: #fff; background: linear-gradient(180deg, rgba(242,223,180,.30), rgba(206,168,96,.18)); border-color: rgba(236,208,150,.7); }
.btn.gold:hover { background: linear-gradient(180deg, rgba(242,223,180,.42), rgba(206,168,96,.28)); }
.btn.gold::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.32) 50%, transparent 58%); background-size: 300% 100%; background-position: 100% 0; background-repeat: no-repeat; transition: background-position .9s cubic-bezier(.2,.7,.2,1); }
.btn.gold:hover::after { background-position: 0 0; } .btn:active { transform: scale(.98); }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
/* cards */
.card { border-radius: var(--r); padding: 24px 26px; }
.card h2 { font: 400 26px/1.2 var(--display); color: #fff; margin: 0 0 12px; }
/* footer */
.afoot { max-width: 1240px; margin: 40px auto 30px; padding: 16px 26px; border-radius: var(--r); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: 14px; color: var(--soft); }
.afoot b { font: 400 17px var(--display); letter-spacing: .14em; color: var(--ink); } .afoot a { color: var(--soft); text-decoration: none; } .afoot a:hover { color: #fff; } .afoot small { width: 100%; color: var(--muted); font-size: 12.5px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.rise > * { animation: rise .55s cubic-bezier(.2,.7,.2,1) backwards; }   /* backwards, not both: after the animation the element leaves its GPU layer, so Windows keeps sharp ClearType text (12.10.2026) */ .rise > :nth-child(2) { animation-delay: .06s; } .rise > :nth-child(3) { animation-delay: .12s; } .rise > :nth-child(n+4) { animation-delay: .18s; }
@media (max-width: 760px) { .h1 { font-size: 36px; } .abar nav { display: none; } .abar { padding: 12px 14px; } .card { padding: 20px 18px; } }
/* phones (12.10.2026): the top bar slides away while reading down and comes back on scroll up, so it never sits on the content */
@media (max-width: 760px) { .abar { transition: transform .25s ease, opacity .25s ease; } .abar.away { transform: translateY(-120%); opacity: 0; pointer-events: none; } .abar.solid { background: rgba(8,14,26,.78); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 12px 30px -18px rgba(0,0,0,.8); } }
@media (prefers-reduced-transparency: reduce) { .glass { background: rgba(22,26,34,.95); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* hover shine (Sergey 11.10.2026, revised 11.10.2026): the shine moves by background-position, not transform, and nothing blends or gets its own layer,
   so Chrome never draws a square around a button inside frosted glass */
.btn::after, .btn::before, .tool::after, .tb::after, .st::after, .btn > .lt { border-radius: inherit; }
.btn:hover { transform: translateY(-1px); }
/* no single words left alone on the last line of a paragraph or heading (audit 11.10.2026) */
h1, h2, h3, h4, .vh p, .lead { text-wrap: balance; }
p, li, small, dd, figcaption { text-wrap: pretty; }

/* running text justified on every screen (Sergey 11.10.2026); zero specificity, so any element that sets its own alignment keeps it */
:where(body.alp) :where(p, li, dd, .lead, blockquote) { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 6 3 2; }
/* text pages (12.10.2026: legal pages, toolkit pages and the certificate moved from the v1 vellum design): hero + one glass reading card */
.dpage { max-width: 960px; margin: 0 auto; padding: 18px 24px 10px; }
.dhero { padding: 26px 4px 22px; } .dhero .lead { text-align: left; hyphens: manual; }
.doc { border-radius: var(--r); padding: 30px 36px; font-size: 16px; line-height: 1.65; color: var(--soft); }
.doc h2 { font: 400 25px/1.2 var(--display); color: #fff; margin: 30px 0 10px; } .doc h2:first-child, .doc .dmeta + h2 { margin-top: 0; }
.doc h3 { font: 600 16px/1.3 var(--text); color: #fff; margin: 22px 0 8px; }
.doc p { margin: 0 0 12px; } .doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; } .doc li { margin: 0 0 6px; }
.doc strong, .doc b { color: #fff; } .doc a { color: var(--gold2); text-decoration: none; border-bottom: 1px dotted rgba(242,223,180,.5); } .doc a:hover { color: #fff; }
.doc code { font: 500 13.5px var(--mono); background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; color: #fff; }
.dmeta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 22px; padding: 0 0 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.doc .tw { overflow-x: auto; margin: 6px 0 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.doc th { text-align: left; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,.05); padding: 10px 14px; }
.doc td { vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; }
@media (max-width: 760px) { .dpage { padding: 6px 14px 10px; } .doc { padding: 22px 18px; }
  .doc thead { display: none; } .doc tr, .doc td { display: block; } .doc tr { border-top: 1px solid var(--line); padding: 8px 0; } .doc tr:first-child { border-top: 0; }
  .doc td { border: 0; padding: 4px 14px; } .doc td::before { content: attr(data-h); display: block; font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); } }
@media screen and (max-width: 760px) { .doc h2.dfh { position: relative; cursor: pointer; margin: 8px 0 0 !important; padding: 12px 40px 12px 14px; border-radius: 12px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); font-size: 19px; }
  .doc h2.dfh::after { content: ''; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--gold2); border-bottom: 2px solid var(--gold2); transform: translateY(-70%) rotate(45deg); }
  .doc h2.dfh.open::after { transform: translateY(-30%) rotate(-135deg); } .doc h2.dfh:not(.open) + .dfold { display: none; } .doc .dfold { padding-top: 10px; } }
/* phones, usability audit (12.10.2026): every tap target at least 40 px high (Apple: 44 pt; Google: 48 dp); labels unchanged */
@media screen and (max-width: 760px) {
  .rnav button, #snav button, #quick > button, .cchips button, .ex button, .seg3 button, .lt-chips button, .lt-co-more,
  .devbar a, .acts .lib, .acts .ssb, .wprint, .lt-f a, .wf a, .top a.sc, .wstrip a, article.sp a.more { min-height: 40px !important; display: inline-flex !important; align-items: center; }
  details.cdet > summary, details.lt-more > summary, details.lt-hist > summary, details.sources > summary { min-height: 40px; display: flex !important; align-items: center; }
  label.qin input { min-height: 44px !important; font-size: 16px !important; }   /* 16 px also stops iOS zooming into the field */
  .afoot a, footer.mini a, footer.mini span a, footer > .wrap a { display: inline-block; padding: 10px 6px; }
}
.abar .mspace { display: none; text-decoration: none; }
@media screen and (max-width: 760px) { .abar .mspace { display: grid; } .abar { gap: 8px; } .abar .brand { padding: 8px 12px; } .abar .brand b { font-size: 17px; letter-spacing: .2em; } }

/* Windows (Sergey 12.10.2026: "not sharp in Edge"): Chromium on Windows draws text inside a backdrop-filter layer without ClearType.
   On Windows only, the glass loses its blur and becomes denser, so all text is painted sharply; Mac and phones keep the frosted glass. */
html.win *, html.win *::before, html.win *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.win body, html.win body.alp, html.win body.day { --glass: rgba(26,28,34,.90); --glass-hi: rgba(38,40,46,.93); }
html.win body.night { --glass: rgba(10,18,40,.88); --glass-hi: rgba(16,28,58,.91); }
/* phones (Sergey 12.10.2026): a pinned section menu sits right under the top bar and moves up with it when the bar slides away, so no strip of text scrolls above it */
@media (max-width: 760px) {
  .rnav, nav.snav, .wstrip { top: 76px !important; transition: top .25s ease; }
  body:has(.abar.away) :is(.rnav, nav.snav, .wstrip) { top: 8px !important; }
}
