/* Typologica — base and shared chrome. Tokens: design/DESIGN.md.
   The system hue arrives as --sys / --sys2 on <body>. Hover lives only under
   (hover: hover) and (pointer: fine). */

:root {
  --bg: #08090a; --s1: #0f1012; --s2: #15161a; --s3: #1c1d22; --card: #0d0e10;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.15);
  --tx: #f7f8f8; --tx-body: #d0d3d8; --tx2: #a0a5ae; --tx3: #767b84; --on-sys: #06080c;
  --sys: #4f8cff; --sys2: #6aa8ff;
  --r-badge: 8px; --r-ctl: 12px; --r-card: 16px; --r-pill: 999px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gut: 16px; --max: 1200px; --blk: 64px;
}
@media (min-width: 900px) { :root { --gut: 40px; --blk: 96px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); color-scheme: dark; scroll-padding-top: 76px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--tx); font: 400 17px/1.5 Inter, system-ui, sans-serif; font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
::selection { background: color-mix(in srgb, var(--sys) 55%, transparent); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; font-size: inherit; font-weight: inherit; }
img, svg { max-width: 100%; }
.main { flex: 1 0 auto; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; min-height: 48px; padding: 0 20px; border-radius: var(--r-ctl); font-size: 15px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; transition: background-color .15s, transform .15s; }
.btn:active { transform: scale(.98); }
.btn.pri { background: var(--tx); color: var(--bg); }
.btn.sec { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--line2); color: var(--tx); }

/* header: logo and the menu button */
.nav { position: relative; z-index: 3; border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 54px; }
.logo { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; min-height: 44px; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.logo svg { width: 20px; height: 20px; flex: none; }
.mb { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 44px; padding: 0 13px 0 11px; border-radius: var(--r-ctl); font-size: 15px; font-weight: 500; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .15s; }
.mb svg { width: 16px; height: 16px; flex: none; }

/* full-screen menu: opens via #menu (:target) without JS, via .on with JS */
.menu { position: fixed; inset: 0; z-index: 40; display: none; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); }
.menu:target, .menu.on { display: block; }
.js .menu:target:not(.on) { display: none; }
.menu .mt { font-size: 15px; color: var(--tx2); margin: 22px 0 10px; }
.mwrap { padding-bottom: 40px; }
.mhome { display: flex; align-items: center; min-height: 52px; margin-top: 12px; padding: 0 16px; border-radius: var(--r-ctl); font-size: 17px; font-weight: 500; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.mhome[aria-current="page"] { box-shadow: inset 0 0 0 1.5px var(--tx); }
.mhome + .mhome { margin-top: 6px; }
.pgl { display: flex; flex-wrap: wrap; column-gap: 22px; row-gap: 0; font-size: 15px; color: var(--tx2); }
/* menu: Information in two columns (three on desktop) */
.menu .pgl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.mwrap > .mt:first-child { margin-top: 16px; }
.pgl a { display: inline-flex; align-items: center; max-width: 100%; min-height: 44px; }
.pgl a[aria-current="page"] { color: var(--tx); font-weight: 600; }
.menu .sy { margin-top: 0; }
body.lock { overflow: hidden; }

/* language: a quiet dropdown that opens upward */
.lng { position: relative; display: inline-block; max-width: 100%; font-size: 15px; color: var(--tx2); }
.lng summary { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 44px; padding: 0 10px 0 8px; margin-left: -8px; border-radius: var(--r-ctl); cursor: pointer; list-style: none; }
.lng summary::-webkit-details-marker { display: none; }
.lng[open] summary { color: var(--tx); background: rgba(255,255,255,.06); }
.lng summary svg { width: 16px; height: 16px; flex: none; }
.lng summary svg:last-child { width: 14px; height: 14px; transition: transform .2s; }
.lng[open] summary svg:last-child { transform: rotate(180deg); }
.lng-l { position: absolute; z-index: 5; left: -8px; bottom: calc(100% + 6px); min-width: 188px; padding: 6px; border-radius: var(--r-ctl); background: var(--s2); box-shadow: inset 0 0 0 1px var(--line2), 0 16px 40px rgba(0,0,0,.5); }
.lng-l a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-badge); color: var(--tx-body); }
.lng-l a[aria-current="true"] { color: var(--tx); font-weight: 600; }
.lng-l a[aria-current="true"]::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: var(--r-pill); background: var(--tx); }
.lng-f { margin-top: 0; }

[hidden] { display: none !important; }

/* page blocks */
.blk { padding-top: var(--blk); }
.blk > .wrap > h2 { font-size: 28px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
@media (min-width: 900px) { .blk > .wrap > h2 { font-size: 38px; } }

/* test lists */
.tl { display: grid; gap: 8px; margin-top: 20px; }
.ti { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 64px; padding: 12px 16px; border-radius: var(--r-ctl); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .15s, box-shadow .15s; }
.ti b { display: block; font-size: 15px; font-weight: 500; letter-spacing: -.012em; line-height: 1.25; }
.ti span.m { display: block; margin-top: 2px; font-size: 13px; color: var(--tx2); }
.ti .res { flex: 0 1 auto; max-width: 48%; font-size: 15px; font-weight: 600; line-height: 1.25; text-align: right; overflow-wrap: break-word; color: var(--sys); }
.ti > div { min-width: 0; }
.ti.done { background: color-mix(in srgb, var(--sys) 14%, var(--s1)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sys) 40%, transparent); }
.ti .go { flex: none; font-size: 15px; color: var(--tx2); }
@media (min-width: 900px) { .tl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }

/* system cards */
.sy { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: 8px; margin-top: 20px; }
.sc { --c: #888; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .15s, box-shadow .15s; }
.sc .gl { flex: none; width: 42px; height: 42px; color: var(--c); }
.sc b { display: block; font-size: 15px; font-weight: 500; line-height: 1.22; letter-spacing: -.012em; }
.sc span { display: block; margin-top: 2px; font-size: 13px; color: var(--tx2); }
.sc span.dn { color: var(--c); font-weight: 600; }
.sc.done { background: color-mix(in srgb, var(--c) 14%, var(--s1)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.sc[aria-current="page"] { box-shadow: inset 0 0 0 1.5px var(--tx); }

/* path line above the H1 */
.path { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 0; margin: -6px 0 8px; font-size: 13px; color: var(--tx2); }
.path a { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 44px; }
.path .pi { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; white-space: nowrap; }
.path .pi:last-child { white-space: normal; } /* a long test title wraps instead of overflowing */
.path .ps { color: var(--tx-body); }
.path .gl { width: 20px; height: 20px; flex: none; color: var(--c); }
.path .sep { color: var(--tx3); }
@media (max-width: 899px) { .path .pm .pl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .path .pm { min-width: 32px; } }

/* static system glow behind a hero */
.glow { position: absolute; left: 50%; top: -240px; width: min(1500px, 200vw); height: 720px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(44% 44% at 36% 50%, color-mix(in srgb, var(--sys) 62%, transparent), transparent 100%), radial-gradient(38% 40% at 66% 44%, color-mix(in srgb, var(--sys2) 44%, transparent), transparent 100%);
  -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000 40%, transparent 100%); mask-image: radial-gradient(50% 50% at 50% 50%, #000 40%, transparent 100%); }

/* footer */
.foot { margin-top: 64px; padding: 30px 0 90px; border-top: 1px solid var(--line); font-size: 15px; color: var(--tx2); }
.foot .fg { display: grid; gap: 24px; }
.foot h2 { margin-bottom: 6px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--tx); }
.foot .fs, .foot .fl { columns: 2; column-gap: 20px; }
.foot .fg > div { min-width: 0; }
/* the narrowest screens: "Конфиденциальность" does not fit half the width */
@media (max-width: 379px) { .foot .fl { columns: 1; } }
/* bottom row: copyright and language */
.fbot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 24px; row-gap: 8px; margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); }
.fbot p { margin: 0; font-size: 13px; color: var(--tx3); }
.foot .fs a, .foot .fl a { display: flex; align-items: center; min-height: 44px; break-inside: avoid; line-height: 1.3; }
@media (min-width: 900px) { .foot { padding-bottom: 34px; } .foot .fg { grid-template-columns: 3fr 2fr; gap: 48px; } .fbot { margin-top: 32px; } .menu .pgl { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* hover only where a real pointer can hover */
@media (hover: hover) and (pointer: fine) {
  .btn.pri:hover { background: #fff; }
  .btn.sec:hover { background: rgba(255,255,255,.12); }
  .mb:hover { background: rgba(255,255,255,.12); }
  .mhome:hover { background: var(--s2); }
  .pgl a:hover { color: var(--tx); }
  .lng summary:hover { color: var(--tx); background: rgba(255,255,255,.06); }
  .lng-l a:hover { background: rgba(255,255,255,.07); color: var(--tx); }
  .sc:hover, .ti:hover { background: var(--s2); box-shadow: inset 0 0 0 1px var(--line2); }
  .sc[aria-current="page"]:hover { box-shadow: inset 0 0 0 1.5px var(--tx); }
  .path a:hover, .foot a:hover { color: var(--tx); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
