/* karmazvezd: «Таблица столпов». Миллиметровка, кобальт, пять стихий только заливкой. */
@font-face { font-family: 'Geo'; src: url('/st/f/geologica-cyrillic-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0400-045F, U+2116; }
@font-face { font-family: 'Geo'; src: url('/st/f/geologica-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Geo'; src: url('/st/f/geologica-cyrillic-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0400-045F, U+2116; }
@font-face { font-family: 'Geo'; src: url('/st/f/geologica-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Geo'; src: url('/st/f/geologica-cyrillic-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0400-045F, U+2116; }
@font-face { font-family: 'Geo'; src: url('/st/f/geologica-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Mono'; src: url('/st/f/jetbrains-mono-cyrillic-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0400-045F; }
@font-face { font-family: 'Mono'; src: url('/st/f/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }

@font-face { font-family: 'HZ'; src: url('/st/f/hz-700.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+3000-303F, U+3400-9FFF, U+F900-FAFF; }
@font-face { font-family: 'Unb'; src: url('/st/f/unbounded-cyrillic-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0400-045F, U+2116; }
@font-face { font-family: 'Unb'; src: url('/st/f/unbounded-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Unb'; src: url('/st/f/unbounded-cyrillic-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0400-045F, U+2116; }
@font-face { font-family: 'Unb'; src: url('/st/f/unbounded-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --bg: #F4EFE6; --grid: #EDE6D9; --grid2: #E3DACB; --ink: #1B1A17; --soft: #6B6458; --line: #1B1A17; --hair: #D9CFBF;
  --cob: #2D4BFF; --cob-ink: #fff; --panel: #FBF8F2; --kin: #2D4BFF; --btn: #2D4BFF; /* кобальт с 18.11 (решение владельца), был красный #B5301C */ --edge: #8C8270;
  --wood: #3E7D52; --fire: #C04A2B; --earth: #B0863A; --metal: #7A838E; --water: #2E4A7A;
  --hz: 'HZ', 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Songti SC', 'SimSun', 'STSong', serif;
  --ease: cubic-bezier(.3, .7, .2, 1);
  color-scheme: light;
}
/* тёмной темы нет с 18.11: все спутники светлые (решение владельца) */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; color: var(--ink); font: 400 1.0625rem/1.65 'Geo', system-ui, sans-serif;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
}
a { color: var(--ink); text-decoration-color: var(--kin); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
a:hover { color: var(--kin); }
:focus-visible { outline: 3px solid var(--cob); outline-offset: 2px; }
/* якоря и результат не прячутся под липкой шапкой */
[id] { scroll-margin-top: 5rem; }
summary { padding-block: .55rem; }
input, select, textarea { min-height: 44px; }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 1.25rem; height: 1.25rem; accent-color: var(--btn); }
h1, h2, h3 { font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 400px) { h1 { overflow-wrap: anywhere; } }
/* ссылки в ячейках таблиц: зона касания 44 px без изменения строки */
td a, th a, li > a:only-child { display: inline-block; padding: .7rem .35rem; margin: -.7rem -.35rem; }
.hd li > a:only-child, .ft li > a:only-child, .rels li > a:only-child { padding: 0; margin: 0; }
.card .h3 { font-family: 'Geo', system-ui, sans-serif; font-size: 1.1rem; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; margin: .2rem 0 .4rem; }
.card:hover .h3 { text-decoration: underline; text-decoration-color: var(--kin); text-underline-offset: .2em; }
h1, h2 { font-family: 'Unb', 'Geo', sans-serif; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.08; margin: .2em 0 .4em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.85rem); font-weight: 600; margin: 2em 0 .6em; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 1.4em 0 .4em; }
.w { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.txt { max-width: 42rem; }
.mono, code { font-family: 'Mono', ui-monospace, monospace; font-size: .92em; }
.hz { font-family: var(--hz); font-weight: 700; }
.tag { display: inline-flex; align-items: center; gap: .55em; font: 600 .82rem/1.2 'Geo', sans-serif; letter-spacing: .04em; color: var(--kin); }
.tag::before { content: ''; width: .62em; height: .62em; background: var(--kin); border-radius: 1px; transform: rotate(45deg); flex: none; }
.ans { position: relative; background: var(--panel); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--grid2); padding: 1.6rem 0 1.1rem; margin: 1.4rem 0 2.2rem; font-size: 1.14rem; line-height: 1.6; }
.ans::before { content: 'Коротко'; position: absolute; top: -.75em; left: 0; background: var(--bg); padding-right: .6em; font: 600 .78rem 'Geo', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--kin); }
.ans { background: transparent; }
.note { font-size: .95rem; color: var(--soft); }
table { border-collapse: collapse; width: 100%; margin: 1rem 0 2rem; background: var(--panel); }
th, td { border: 1px solid var(--hair, var(--grid2)); padding: .6rem .75rem; text-align: left; vertical-align: top; }
th { font: 600 .78rem/1.25 'Geo', sans-serif; text-transform: uppercase; letter-spacing: .07em; background: var(--grid); color: var(--soft); }
thead th { border-bottom: 2px solid var(--ink); }
.tw { overflow-x: auto; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); margin: 1rem 0 2rem; }
.card { display: block; text-decoration: none; color: inherit; background: var(--panel); border: 1px solid var(--hair, var(--grid2)); border-top: 2px solid var(--ink); padding: 1.1rem 1.2rem; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.card:hover { border-color: var(--kin); }
.card:hover h3 { text-decoration: underline; text-decoration-color: var(--kin); text-underline-offset: .2em; }
.card h3 { margin: .2rem 0 .4rem; }
.card p { margin: 0; color: var(--soft); font-size: .95rem; }
.big-hz { font-family: var(--hz); font-weight: 700; font-size: 2.4rem; line-height: 1; }
.btn { display: inline-block; font: 600 1rem/1 'Geo', sans-serif; background: var(--btn); color: #FBF3EA; border: 0; border-radius: 2px; padding: 1em 1.5em; cursor: pointer; text-decoration: none; transition: background .15s; }
.btn:hover { background: #8F2414; color: #fff; }
.el-0 { --c: var(--wood); } .el-1 { --c: var(--fire); } .el-2 { --c: var(--earth); } .el-3 { --c: var(--metal); } .el-4 { --c: var(--water); }
.chip { display: inline-block; padding: .15em .5em; background: var(--c); color: #fff; font: 400 .8rem/1.4 'Mono', monospace; }
.crumbs { font-size: .88rem; color: var(--soft); margin-block: 1.4rem .6rem; }
.crumbs a { color: inherit; }
.faq details { border-bottom: 1px solid var(--hair); padding: .15rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── эмблемы стихий ─────────────────────────────────────── */
.emb { width: 3.2rem; height: 3.2rem; color: var(--c); display: block; }
.emb * { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.emb .z { fill: currentColor; stroke: none; opacity: .18; }

/* ── карточки ───────────────────────────────────────────── */
.card { position: relative; overflow: hidden; }
.card .big-hz { display: inline-block; font-size: 2.6rem; color: var(--ink); }
.card { transition: border-color .2s; }

/* ── небо: главный экран. С 18.11 светлое: звёздная карта тушью на миллиметровке ── */
.nebo { position: relative; isolation: isolate; color: var(--ink); overflow: hidden; border-bottom: 1px solid var(--hair);
  background: radial-gradient(ellipse at 70% 45%, #FFFFFF 0%, transparent 60%), linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px, var(--bg); }
.nebo canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.nebo-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: center; min-height: min(88vh, 46rem); padding: 3rem 0 3.5rem; }
.nebo .tag { color: var(--kin); } .nebo .tag::before { background: var(--kin); }
.nebo h1 { color: var(--ink); margin-top: .4rem; }
.nebo h1 em { font-style: normal; color: var(--cob); }
.nebo .lead { color: var(--soft); font-size: 1.15rem; max-width: 34rem; }
.nebo-kn { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.6rem; }
.nebo .btn { background: #3A57FF; }
.nebo .btn:hover { background: #2A44D9; }
.btn.prizrak { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 35%, transparent); }
.btn.prizrak:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.koleso { position: relative; aspect-ratio: 1; width: min(100%, 34rem); justify-self: center; }
.koleso svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.koleso .krug { transform-origin: 50% 50%; transform: rotate(var(--rot, 0deg)); transition: transform .2s linear; }
.koleso .avto { transform-origin: 300px 300px; animation: vrash 240s linear infinite; }
@keyframes vrash { to { transform: rotate(-360deg); } }
.koleso text { font-family: var(--hz); font-weight: 700; font-size: 17px; fill: color-mix(in srgb, var(--c) 80%, var(--ink)); opacity: .5; }
.koleso text.seychas { opacity: 1; font-size: 22px; fill: var(--cob); }
.koleso .orb { fill: none; stroke: color-mix(in srgb, var(--cob) 28%, transparent); }
.koleso .orb.t { stroke-dasharray: 2 6; }
.minuta { position: absolute; inset: 22%; display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; align-content: center; }
.minuta-z { grid-column: 1 / -1; text-align: center; font: 400 .72rem/1.3 'Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--cob); margin: 0 0 .3rem; }
.pl { display: grid; justify-items: center; gap: .1rem; padding: .55rem .2rem .45rem; border-radius: 2px; background: color-mix(in srgb, var(--c) 16%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--panel)); border-top: 3px solid var(--c); }
.pl b { font-family: var(--hz); font-size: clamp(1.35rem, 3.2vw, 2rem); line-height: 1.05; color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.pl span { font: 400 .62rem/1.2 'Mono', monospace; color: var(--soft); text-transform: uppercase; letter-spacing: .06em; }
.pl.dm { outline: 2px solid var(--cob); outline-offset: 2px; }
.minuta-n { grid-column: 1 / -1; text-align: center; font-size: .78rem; color: var(--soft); margin: .4rem 0 0; }
@media (max-width: 860px) {
  .nebo-in { grid-template-columns: 1fr; min-height: 0; padding: 2rem 0 2.5rem; }
  .koleso { width: min(100%, 26rem); order: -1; margin-top: -.5rem; }
}

/* ── столпы в результате ───────────────────────────────── */
.pillars td.c { background: linear-gradient(165deg, color-mix(in srgb, var(--c) 30%, var(--panel)), color-mix(in srgb, var(--c) 8%, var(--panel))) !important; box-shadow: inset 0 -6px 0 var(--c), inset 0 1px 0 rgba(255,255,255,.5) !important; }
.pillars .r-s td .stamp, .pillars .r-b td .stamp { text-shadow: 0 2px 0 color-mix(in srgb, var(--c) 35%, transparent); }

/* ── появление при прокрутке ───────────────────────────── */
.js .vsplyv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .vsplyv.vidno { opacity: 1; transform: none; }

/* ── печать (印章): красная квадратная печать с неровным краем ── */
.pechat { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; background: var(--btn); color: #FBF3EA; font: 700 1.35rem/1 var(--hz); border-radius: 3px; filter: url(#nerovno); transform: rotate(-4deg); box-shadow: inset 0 0 0 2px var(--btn), inset 0 0 0 4px #FBF3EA; }
.pechat.bol { width: 3.6rem; height: 3.6rem; font-size: 2.1rem; }
/* «Что дальше» в конце статей и «Чего нет в бесплатной карте» под калькулятором */
.dalshe { max-width: 46rem; margin: 3rem 0 0; border-top: 2px solid var(--ink); padding-top: 1rem; }
.dalshe-z { font: 600 .8rem 'Geo', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--kin); margin: 0 0 .7rem; }
.dalshe-shag { min-height: 44px; display: grid; gap: .25rem; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--hair); border-left: 3px solid var(--kin); padding: .9rem 1.1rem; }
.dalshe-shag b { font-size: 1.05rem; } .dalshe-shag b::after { content: ' →'; color: var(--kin); }
.dalshe-shag span { color: var(--soft); font-size: .95rem; }
.dalshe-shag:hover { border-color: var(--kin); }
.dalshe-razbor { font-size: .92rem; color: var(--soft); margin: .9rem 0 0; }
.netv { background: var(--panel); border: 1px solid var(--hair); border-top: 3px solid var(--ink); padding: 1.3rem 1.4rem; margin: 2rem 0 1rem; max-width: 52rem; }
.netv h3 { margin: 0 0 .5rem; }
.netv ul { margin: .4rem 0 1rem; padding-left: 1.2rem; } .netv li { margin-bottom: .35rem; }
.netv-kn { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin: 0; }
.netv .note { margin: .8rem 0 0; }

/* поля ввода: рамка различима (3:1) в обеих темах */
.calc input, .calc select, .md-forma input, .md-forma select, #md-zametka { border-color: var(--edge) !important; }
.el-2 .chip, .el-3 .chip { color: #1B1A17; }
