/* ToolGale — one stylesheet for every page (design B, 25.09.2026).
   Rules it serves: site-ship SKILL §Вёрстка и UI — one main action per page ([data-primary]), one card size
   ([data-cards]), no clipped text, mobile-first from 360 px, tap targets >= 44 px, ad slots hidden until html.ads. */
@font-face { font-family:"Geist"; font-style:normal; font-weight:400 800; font-display:swap; src:url(/fonts/geist-latin.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:"Geist"; font-style:normal; font-weight:400 800; font-display:swap; src:url(/fonts/geist-latin-ext.woff2) format("woff2"); unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family:"Geist Mono"; font-style:normal; font-weight:400 700; font-display:swap; src:url(/fonts/geistmono-latin.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:"Geist Mono"; font-style:normal; font-weight:400 700; font-display:swap; src:url(/fonts/geistmono-latin-ext.woff2) format("woff2"); unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg:#F2F4F7; --surface:#fff; --fg:#0D1117; --muted:#556070; --line:#D5DCE4; --ink:#0D1117;
  --accent:#D0233A; --accent-hover:#AE1B2F; --accent-fg:#fff; --tint:#FCEEF0; --chip:#E7EBF0;
  --ok:#17804C; --warn:#A15C00; --shadow:0 8px 24px rgba(13,17,23,.07);
  --w:820px; --sans:"Geist",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; --mono:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color-scheme:light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg:#0D1117; --surface:#161B22; --fg:#E6EAF0; --muted:#9AA4B2; --line:#2B333E; --ink:#E6EAF0;
  --accent:#FF5B6E; --accent-hover:#FF8391; --accent-fg:#0D1117; --tint:#2A151A; --chip:#1F262F;
  --ok:#4CC38A; --warn:#F0A44B; --shadow:0 8px 24px rgba(0,0,0,.35); color-scheme:dark; } }
:root[data-theme="dark"] {
  --bg:#0D1117; --surface:#161B22; --fg:#E6EAF0; --muted:#9AA4B2; --line:#2B333E; --ink:#E6EAF0;
  --accent:#FF5B6E; --accent-hover:#FF8391; --accent-fg:#0D1117; --tint:#2A151A; --chip:#1F262F;
  --ok:#4CC38A; --warn:#F0A44B; --shadow:0 8px 24px rgba(0,0,0,.35); color-scheme:dark; }

* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; min-height:100vh; display:flex; flex-direction:column; background:var(--bg); color:var(--fg); font:16px/1.55 var(--sans); }
body.wide { --w:1080px; }
a { color:var(--accent); text-underline-offset:2px; }
a:hover { color:var(--accent-hover); }
:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
h1, h2, h3 { overflow-wrap:anywhere; text-wrap:balance; }
p, li, dd, td, th, summary { overflow-wrap:anywhere; }
.wrap { width:100%; max-width:calc(var(--w) + 32px); margin:0 auto; padding:0 16px; }
main.wrap { flex:1; position:relative; }

/* header */
.top .wrap { display:flex; align-items:center; gap:8px; min-height:64px; }
.brand { display:inline-flex; align-items:center; gap:10px; min-height:44px; font:800 20px/1 var(--sans); letter-spacing:-.03em; color:var(--fg); text-decoration:none; }
.brand:hover { color:var(--fg); }
.brand i { position:relative; flex:none; width:26px; height:26px; border-radius:8px; background:var(--accent); }
.brand i::after { content:""; position:absolute; inset:6px; border:2px solid #fff; border-radius:3px; }
.nav { margin-left:auto; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:2px; }
.nav a { display:inline-flex; align-items:center; min-height:44px; min-width:44px; justify-content:center; padding:0 12px; border-radius:10px; color:var(--muted); font-weight:500; font-size:15px; text-decoration:none; }
.nav a:hover { color:var(--fg); background:var(--chip); }
/* phones: language codes live in the footer line (same links), so the header stays one row */
.nav a[hreflang] { display:none; }
@media (min-width:480px) { .nav a[hreflang] { display:inline-flex; } }

/* ad slots: in every template, closed until <html class="ads"> (site-ship §Вёрстка и UI, п. 7) */
.ad { display:none; }
html.ads .ad { display:block; }
html.ads .ad[data-slot="top"] { min-height:100px; margin:8px auto 0; }
html.ads .ad[data-slot="inline"] { min-height:280px; margin:48px 0; }
html.ads .ad[data-slot="rail"] { display:none; }
@media (min-width:768px) { html.ads .ad[data-slot="top"] { min-height:90px; } }
@media (min-width:1480px) {
  html.ads main > .ad[data-slot="rail"] { display:block; position:absolute; top:0; bottom:0; left:calc(100% + 8px); width:300px; }
  html.ads main > .ad[data-slot="rail"] > * { position:sticky; top:16px; }
}

/* page intro */
h1 { font:800 clamp(30px,5.4vw,50px)/1.06 var(--sans); letter-spacing:-.045em; margin:28px 0 10px; }
.lead { margin:0 0 22px; color:var(--muted); font-size:17px; max-width:50rem; }
.hero { text-align:center; padding:12px 0 8px; }
.hero h1 { margin-top:24px; }
.hero .lead { margin-left:auto; margin-right:auto; max-width:60ch; }

/* search + chips (home) */
.find { position:relative; max-width:640px; margin:0 auto; }
.find input { width:100%; min-height:56px; border-radius:16px; border:2px solid var(--ink); padding:0 16px 0 48px; font:500 17px var(--sans); background:var(--surface); color:var(--fg); box-shadow:var(--shadow); -webkit-appearance:none; appearance:none; }
.find input::placeholder { color:var(--muted); }
.find input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.find svg { position:absolute; left:17px; top:18px; pointer-events:none; }
.chips { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:14px 0 0; padding:0; list-style:none; }
.chips button { min-height:44px; padding:0 16px; border-radius:999px; border:1px solid var(--line); background:var(--surface); font:500 15px var(--sans); color:var(--fg); cursor:pointer; }
.chips button:hover { border-color:var(--ink); }
.chips button[aria-pressed="true"] { background:var(--ink); color:var(--bg); border-color:var(--ink); }
.empty { text-align:center; color:var(--muted); margin:24px 0 0; }

/* rows = the one card type of the site: spec badge · title + one line · Open */
.list { list-style:none; margin:24px 0 0; padding:0; display:grid; gap:10px; grid-template-columns:minmax(0,1fr); }
@media (min-width:900px) { .list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.list > li { display:flex; min-width:0; max-width:none; }
.list > li:only-child { grid-column:1 / -1; }
.card { flex:1; min-width:0; display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:8px; min-height:108px; padding:12px 10px;
  background:var(--surface); border:1px solid var(--line); border-radius:14px; color:var(--fg); text-decoration:none; position:relative;
  transition:border-color .12s ease, background-color .12s ease, transform .08s ease; }
.card::before { content:""; position:absolute; left:-1px; top:16px; bottom:16px; width:4px; border-radius:0 4px 4px 0; background:var(--accent); opacity:0; transition:opacity .12s ease; }
.card:hover { color:var(--fg); border-color:var(--accent); background:var(--tint); }
.card:hover::before, .card:focus-visible::before { opacity:1; }
.card:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.card:active { transform:scale(.985); }
.spec { width:44px; height:52px; border-radius:10px; background:var(--bg); border:1px solid var(--line); display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; font:700 12px/1.1 var(--mono); letter-spacing:-.03em; color:var(--fg); }
.spec small { font:500 11px/1.1 var(--mono); color:var(--muted); }
.txt { min-width:0; }
.t { display:block; font-weight:650; font-size:15px; line-height:1.25; overflow-wrap:anywhere; }
.m { display:block; margin-top:4px; font:12px/1.4 var(--mono); color:var(--muted); overflow-wrap:anywhere; }
.go { display:inline-flex; align-items:center; justify-content:center; min-height:44px; min-width:44px; padding:0 10px; border-radius:10px; font-weight:650; font-size:15px; background:var(--ink); color:var(--bg); }
.card:hover .go, .card:focus-visible .go { background:var(--accent); color:var(--accent-fg); }
@media (min-width:480px) { .card { grid-template-columns:60px minmax(0,1fr) auto; gap:14px; padding:12px; } .spec { width:60px; height:56px; font-size:13px; } .go { padding:0 18px; } .t { font-size:16px; } .m { font-size:13px; } }
/* one height for every row: 12+12 padding + title 2×20 + 4 + meta 2×17.5 = 103 -> 108; more than 2+2 lines fails ui_check */

/* the tool: one frame, one primary button */
.frame { position:relative; margin:4px 0 0; padding:20px 16px 0; background:var(--surface); border:2px solid var(--ink); border-radius:18px; box-shadow:var(--shadow); text-align:center; }
.frame::before, .frame::after, .frame .marks::before, .frame .marks::after { content:""; position:absolute; width:14px; height:14px; border:0 solid var(--accent); pointer-events:none; }
.frame::before { top:8px; left:8px; border-top-width:2px; border-left-width:2px; border-top-left-radius:4px; }
.frame::after { top:8px; right:8px; border-top-width:2px; border-right-width:2px; border-top-right-radius:4px; }
.frame .marks::before { bottom:8px; left:8px; border-bottom-width:2px; border-left-width:2px; border-bottom-left-radius:4px; }
.frame .marks::after { bottom:8px; right:8px; border-bottom-width:2px; border-right-width:2px; border-bottom-right-radius:4px; }
.frame.drag { outline:3px dashed var(--accent); outline-offset:-10px; background:var(--tint); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:56px; width:100%; max-width:360px; padding:0 28px; border:0; border-radius:14px; background:var(--accent); color:var(--accent-fg); font:700 18px/1.2 var(--sans); cursor:pointer; transition:background-color .12s ease, transform .08s ease; }
.btn:hover { background:var(--accent-hover); }
.btn:active { transform:scale(.98); }
.btn:focus-visible { outline:3px solid var(--ink); outline-offset:3px; }
.btn svg { flex:none; }
.frame:has(.pt-item) .btn { background:transparent; color:var(--fg); border:1.5px solid var(--ink); min-height:48px; font-size:16px; }
.note { margin:10px auto 0; max-width:52ch; font-size:14px; color:var(--muted); }
.size { margin:0 0 16px; text-align:left; }
.size > label { display:block; margin:0 0 6px; font-size:13px; font-weight:600; color:var(--muted); }
.pick { position:relative; display:flex; align-items:center; min-height:52px; padding:10px 44px 10px 14px; border:1px solid var(--line); border-radius:12px; background:var(--bg); font-weight:600; font-size:15px; line-height:1.3; }
.pick::after { content:""; position:absolute; right:18px; top:50%; width:9px; height:9px; margin-top:-7px; border:solid var(--fg); border-width:0 2px 2px 0; transform:rotate(45deg); pointer-events:none; }
.pick:hover { border-color:var(--ink); }
.pick:focus-within { outline:3px solid var(--accent); outline-offset:2px; }
.pick-v { overflow-wrap:anywhere; }
.pick select { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; font-size:16px; -webkit-appearance:none; appearance:none; }
.results { margin-top:6px; text-align:left; }
.ticket { margin:18px -16px 0; padding:12px 28px 18px; border-top:1px dashed var(--line); font:13px/1.45 var(--mono); color:var(--muted); text-align:left; overflow-wrap:anywhere; }
@media (min-width:640px) { .frame { padding:28px 28px 0; } .ticket { margin:24px -28px 0; padding:12px 32px 18px; } .btn { width:auto; min-width:260px; } }

/* reference sections below the tool */
section { margin:44px 0; }
h2 { font:750 24px/1.2 var(--sans); letter-spacing:-.02em; margin:0 0 12px; }
p, li { max-width:68ch; }
ol, ul { padding-left:22px; }
ol li, main ul:not([class]) li { margin:4px 0; }
.checked { font-size:13px; color:var(--muted); }
.checked a { color:var(--muted); }
.tbl { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:12px 0; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.tbl table { border-collapse:collapse; width:100%; min-width:520px; font-size:14px; }
.tbl th, .tbl td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
.tbl tr:last-child td { border-bottom:0; }
.tbl th { font-weight:650; background:var(--bg); }
#faq details { border:1px solid var(--line); border-radius:12px; background:var(--surface); margin:8px 0; }
#faq summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:12px; min-height:52px; padding:12px 16px; font-weight:650; }
#faq summary::-webkit-details-marker { display:none; }
#faq summary::after { content:""; flex:none; margin-left:auto; width:9px; height:9px; margin-top:-4px; border:solid var(--muted); border-width:0 2px 2px 0; transform:rotate(45deg); transition:transform .15s ease; }
#faq details[open] summary::after { transform:rotate(-135deg); margin-top:4px; }
#faq summary:hover { color:var(--accent); }
#faq details > :not(summary) { margin:0; padding:0 16px 14px; max-width:none; }
.more h2 { margin-bottom:0; }

/* text pages (about, privacy, contact) */
.prose h2 { font-size:21px; margin-top:32px; }
.updated, .summary { color:var(--muted); }

/* footer */
.foot { margin-top:48px; border-top:1px solid var(--line); background:var(--surface); }
.foot .wrap { padding-top:16px; padding-bottom:24px; }
.fnav, .langs { display:flex; flex-wrap:wrap; align-items:center; gap:0 4px; margin:0; max-width:none; }
.fnav a, .langs a { display:inline-flex; align-items:center; min-height:44px; padding:0 8px; color:var(--fg); font-size:14px; }
.fnav a:first-child, .langs > a:first-child { margin-left:-8px; }
.langs { color:var(--muted); font-size:14px; }
.fine { margin:8px 0 0; color:var(--muted); font-size:13px; max-width:none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition:none !important; } }
.group { margin:40px 0 0; }
