/* Дизайн сайта — направление А «Рушник» (docs/CONTENT_SEO_BRAND.md §5.1).
   Обычный CSS на токенах, без сборки. Мобильный в первую очередь (360–400 px).
   Правила орнамента: ≤10% экрана, никогда под текстом, сетка 8 px. */

:root {
  --linen: #F4EFE6; --paper: #FBF8F2; --ink: #1F1A17; --ink-soft: #6E6259;
  --madder: #A8322D; --indigo: #2C3E6B; --olive: #5E6B3A; --ochre: #B8892B; --ochre-text: #8C6A1F;
  --line: rgba(31, 26, 23, .16); --white: #fff;
  --f-head: "Forum", "Times New Roman", serif;
  --f-text: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 4px; --gap: 16px;
}
@media (prefers-color-scheme: dark) {
  :root { --linen: #15120F; --paper: #1D1915; --ink: #EFE7DA; --ink-soft: #A89C8F; --madder: #E07A6E;
          --indigo: #8FA3D6; --ochre: #D9B26A; --ochre-text: #D9B26A; --olive: #A9B87A; --line: rgba(239, 231, 218, .18); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--linen); color: var(--ink); font: 400 16px/1.5 var(--f-text); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--indigo); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-style: dashed; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 400; line-height: 1.12; margin: 0 0 12px; }
h1 { font-size: 30px; } h2 { font-size: 24px; margin-top: 32px; } h3 { font-size: 20px; margin-top: 24px; }
@media (min-width: 720px) { h1 { font-size: 40px; } h2 { font-size: 28px; } body { font-size: 17px; } }
p { margin: 0 0 12px; }
.mono, .deg { font-family: var(--f-mono); font-weight: 500; font-size: .92em; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* --- шапка, подвал --- */
.kayma-top { height: 12px; background: url(/static/img/kayma.svg) repeat-x center / 24px 12px; opacity: .9; }
.site-head { padding: 12px 0; border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 400 24px var(--f-head); }
.logo img { width: 32px; height: 32px; }
.nav { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 14px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a.on { color: var(--madder); }
.site-foot { margin-top: 48px; padding: 24px 0 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; }
.site-foot a { color: var(--ink-soft); }
.disclaimer { max-width: 62ch; }

/* --- орнамент --- */
.begunok { height: 16px; margin: 28px 0; background: url(/static/img/begunok.svg) repeat-x center / 32px 16px; }
.personal { position: relative; padding-left: 32px; }
.personal::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px;
  background: url(/static/img/rhomb.svg) no-repeat center / contain; }
.card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 16px; margin: 16px 0; }
/* Уголки — ромб-стежок (CONTENT_SEO_BRAND §5), а не крестик: крестик читался как кнопка «закрыть». Декор, pointer-events нет. */
.card.corners::before, .card.corners::after { content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
  background: url(/static/img/corner-stitch.svg) no-repeat center / contain; }
.card.corners::before { top: 6px; left: 6px; } .card.corners::after { bottom: 6px; right: 6px; }
@media (min-width: 720px) { .card { padding: 24px 28px; } }

/* --- кнопки и формы --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px;
  border-radius: var(--r); border: 0; font: 600 16px var(--f-text); cursor: pointer; text-decoration: none; position: relative; }
.btn-main { background: var(--madder); color: var(--white); }
.btn-main::after { content: ""; position: absolute; inset: 3px; border: 1px dashed rgba(244, 239, 230, .75); border-radius: 2px; pointer-events: none; }
.btn-main:disabled { opacity: .45; cursor: not-allowed; }
.btn-sec { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-wide { width: 100%; }
.btn-small { min-height: 40px; font-size: 14px; padding: 0 14px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 720px) { .btn { min-height: 48px; } }

.field { margin-bottom: 16px; }
.field > label:not(.choice):not(.check), .label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.err { font-size: 14px; color: var(--madder); margin-top: 4px; font-weight: 500; }
input[type=text], input[type=email], input[type=search], input[type=number], select {
  width: 100%; min-height: 52px; padding: 0 12px; font: 400 16px var(--f-text); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding: 0 24px 0 10px; }
input:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.row3 { display: grid; grid-template-columns: 1fr 1.45fr 1.15fr; gap: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 10px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--madder); }
.choice { display: block; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 8px 0; background: var(--paper); cursor: pointer; }
.choice input { accent-color: var(--madder); margin-right: 8px; }
.choice:has(input:checked) { border-color: var(--madder); box-shadow: inset 0 0 0 1px var(--madder); }
.choice .price { float: right; font-family: var(--f-mono); }
.choice .desc { display: block; font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.suggest { position: relative; }
.suggest-list { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 0; list-style: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); max-height: 280px; overflow-y: auto; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.suggest-list li { padding: 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 15px; }
.suggest-list li:last-child { border-bottom: 0; }
.suggest-list li:hover, .suggest-list li.active { background: var(--linen); }
.suggest-list .hist { display: block; font-size: 12px; color: var(--ink-soft); }
/* Кнопка формы стоит в потоке, не sticky: закреплённая кнопка перекрывала текст согласия на ПДн (проверка CEO, 375 px). */
.form-cta { padding: 12px 0 8px; }

/* --- главная --- */
.hero { padding: 24px 0 8px; }
.hero .sub { color: var(--ink-soft); }
.benefits { display: grid; gap: 12px; padding: 0; list-style: none; }
.benefits li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
@media (min-width: 720px) { .benefits { grid-template-columns: repeat(3, 1fr); } }
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
.steps { padding-left: 20px; } .steps li { margin-bottom: 8px; }

/* --- карта --- */
.wheel-box { position: relative; max-width: 560px; margin: 0 auto; }
.wheel-box svg { width: 100%; height: auto; display: block; }
.wheel-rosette { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; transform: translate(-50%, -50%); pointer-events: none; }
.big3 { display: grid; gap: 10px; }
@media (min-width: 720px) { .big3 { grid-template-columns: repeat(3, 1fr); } }
.big3 .item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.big3 .glyph { font-size: 26px; color: var(--madder); line-height: 1; }
.big3 b { display: block; font-family: var(--f-head); font-size: 20px; font-weight: 400; margin: 6px 0 2px; }
.el-bars { display: grid; gap: 6px; }
.el-bars .bar { display: grid; grid-template-columns: 74px 1fr 24px; gap: 8px; align-items: center; font-size: 14px; }
.el-bars progress { width: 100%; height: 10px; appearance: none; border: 0; background: var(--line); border-radius: 0; }
.el-bars progress::-webkit-progress-bar { background: var(--line); }
.el-bars progress.fire::-webkit-progress-value { background: var(--madder); } .el-bars progress.fire::-moz-progress-bar { background: var(--madder); }
.el-bars progress.earth::-webkit-progress-value { background: var(--olive); } .el-bars progress.earth::-moz-progress-bar { background: var(--olive); }
.el-bars progress.air::-webkit-progress-value { background: var(--ochre); } .el-bars progress.air::-moz-progress-bar { background: var(--ochre); }
.el-bars progress.water::-webkit-progress-value { background: var(--indigo); } .el-bars progress.water::-moz-progress-bar { background: var(--indigo); }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 600; color: var(--ink-soft); font-size: 13px; }
.tbl .g { color: var(--madder); font-size: 16px; width: 22px; }
.r-mark { color: var(--madder); font-family: var(--f-mono); font-size: 12px; font-weight: 700; margin-left: 4px; }
.asp-harm { color: var(--indigo); } .asp-tense { color: var(--madder); }
.tz-box { background: var(--paper); border: 1px solid var(--ochre); border-left-width: 4px; border-radius: var(--r); padding: 14px; margin: 16px 0; font-size: 15px; }
.tz-box form { display: inline; }
.tz-edit { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tz-edit select { width: auto; min-width: 140px; min-height: 44px; }
.date-plate { font-family: var(--f-mono); font-size: .9em; border-bottom: 2px solid var(--ochre); white-space: nowrap; }

/* --- предложение и чекаут --- */
.offer-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .offer-grid { grid-template-columns: 1fr 1fr; } }
.offer { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; display: flex; flex-direction: column; }
.offer h3 { margin-top: 0; }
.offer .price { font-family: var(--f-mono); font-size: 20px; margin: 4px 0 8px; }
.offer .price s { color: var(--ink-soft); font-size: 15px; margin-left: 6px; }
.offer ul { padding-left: 18px; margin: 0 0 14px; font-size: 14px; }
.offer .btn { margin-top: auto; }
.offer.featured { border-color: var(--madder); box-shadow: inset 0 0 0 1px var(--madder); }
.toc-locked { list-style: none; padding: 0; }
.toc-locked li { padding: 8px 0 8px 26px; border-bottom: 1px dashed var(--line); position: relative; }
.toc-locked li::before { content: ""; position: absolute; left: 0; top: 11px; width: 16px; height: 16px; background: url(/static/img/lock.svg) no-repeat center / contain; }
.stitch-stub { height: 8px; margin: 6px 0; background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 16px); }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-weight: 600; }

/* --- ожидание --- */
.progress-wrap progress { width: 100%; height: 12px; }
.progress-list { list-style: none; padding: 0; } .progress-list li { padding: 6px 0; }
.progress-list li::before { content: "✓ "; color: var(--olive); font-weight: 700; }
.spinner { width: 48px; height: 48px; margin: 12px auto; background: url(/static/img/rosette.svg) no-repeat center / contain; animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.htmx-indicator { display: none; } .htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: block; }

/* --- отчёт --- */
.chapter { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 16px; margin: 20px 0; position: relative; }
.chapter::before, .chapter::after { content: ""; position: absolute; width: 12px; height: 12px; background: url(/static/img/corner-stitch.svg) no-repeat center / contain; }
.chapter::before { top: 6px; left: 6px; } .chapter::after { bottom: 6px; right: 6px; }
.chapter .num { font-family: var(--f-head); font-variant: small-caps; letter-spacing: .08em; color: var(--ochre-text); font-size: 15px; }
.chapter h2 { margin-top: 4px; }
.chapter h3 { font-size: 19px; }
.chapter p, .chapter li { font-size: 17px; line-height: 1.65; }
@media (min-width: 720px) { .chapter { padding: 28px 32px; } }
.demo-badge { display: inline-block; font: 600 12px var(--f-text); text-transform: uppercase; letter-spacing: .06em;
  color: var(--madder); border: 1px solid var(--madder); border-radius: 3px; padding: 2px 6px; vertical-align: middle; }
.notice { background: var(--paper); border: 1px dashed var(--madder); border-radius: var(--r); padding: 12px 14px; margin: 16px 0; font-size: 14px; }
.draft-banner { background: var(--madder); color: var(--white); padding: 10px 16px; font-weight: 600; text-align: center; }
.toc { padding-left: 20px; } .toc li { margin: 4px 0; }
.legal-body h1 { font-size: 26px; } .legal-body h2 { font-size: 21px; } .legal-body { font-size: 15px; }
.legal-body table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.legal-body td, .legal-body th { border: 1px solid var(--line); padding: 6px; }

/* --- cookie-баннер --- */
.cookie-bar { position: static; background: var(--paper); border-bottom: 2px solid var(--ochre); padding: 10px 0; font-size: 14px; }
.cookie-bar .btn-small { min-height: 40px; }
.cookie-bar .wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }

/* --- колесо движка: стили вместо встроенного <style> (вырезается в engine_client.wheel_svg) --- */
.aw-root { font-family: "DejaVu Sans", "Segoe UI Symbol", "Noto Sans Symbols", "Apple Symbols", sans-serif; }
.aw-bg { fill: var(--paper); }
.aw-line { stroke: var(--ink); fill: none; }
.aw-faint { stroke: var(--line); fill: none; }
.aw-text { fill: var(--ink); font-family: var(--f-mono); }
.aw-muted { fill: var(--ink-soft); font-family: var(--f-mono); }
.aw-fire { fill: #EFD9D2; } .aw-earth { fill: #E3E4D2; } .aw-air { fill: #F1E6CC; } .aw-water { fill: #D9DDE8; }
.aw-glyph-fire { fill: #A8322D; } .aw-glyph-earth { fill: #5E6B3A; } .aw-glyph-air { fill: #8C6A1F; } .aw-glyph-water { fill: #2C3E6B; }
.aw-planet { fill: var(--ink); }
.aw-axis { stroke: var(--ink); stroke-width: 2.5; }
.aw-asp-conjunction { stroke: #B8892B; }
.aw-asp-opposition, .aw-asp-square { stroke: #A8322D; }
.aw-asp-trine, .aw-asp-sextile { stroke: #2C3E6B; stroke-dasharray: 4 3; }
@media (prefers-color-scheme: dark) {
  .aw-fire { fill: #3A2320; } .aw-earth { fill: #2C2E22; } .aw-air { fill: #3A3122; } .aw-water { fill: #222838; }
  .aw-glyph-fire { fill: #E07A6E; } .aw-glyph-earth { fill: #A9B87A; } .aw-glyph-air { fill: #D9B26A; } .aw-glyph-water { fill: #8FA3D6; }
  .aw-asp-opposition, .aw-asp-square { stroke: #E07A6E; } .aw-asp-trine, .aw-asp-sextile { stroke: #8FA3D6; }
}

/* --- печать (печатная версия отчёта = «PDF» локально) --- */
@media print {
  .site-head, .site-foot, .no-print, .cookie-bar { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .chapter { break-inside: auto; border: 0; padding: 0; margin: 0 0 18pt; }
  .chapter + .chapter { break-before: page; }
  a { color: #000; text-decoration: none; }
}
.pre { white-space: pre-wrap; font-family: var(--f-mono); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
legend { padding: 0; }
.choice { padding: 12px 14px; }
.choice .desc { display: none; }
.choice:has(input:checked) .desc { display: block; }
.chapter h4 { font-family: var(--f-head); font-weight: 400; font-size: 17px; margin: 16px 0 8px; }

.combo-badge { display: inline-block; margin: 0 0 6px; padding: 2px 8px; border: 1px solid var(--madder); color: var(--madder); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; border-radius: var(--r); }
