/* СайтПорядок: стили. Бренд — founder/brand.md §4, решения — docs/DESIGN.md.
   Всё локально: шрифты Manrope и Inter лежат в /static/fonts (лицензия SIL OFL), внешних CDN нет (docs/COMPLIANCE.md).
   Статус всегда передаётся ещё и значком со словом, не только цветом. Тёмной темы на старте нет (бриф). */

@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --bg: #FAFAF7; --surface: #FFFFFF; --text: #1B2430; --muted: #52606D; --line: #D9DDD8; --border-ui: #78848F;
  --brand: #0B5D5B; --brand-dark: #084644; --brand-soft: #E3F0EF; --on-brand: #FFFFFF;
  --ok: #1B6E43; --ok-bg: #E6F4EC;
  --bad: #A8261E; --bad-bg: #FCE8E6;
  --warn: #7A4E00; --warn-bg: #FFF1CC;
  --grey-bg: #F0F1EE;
  --font-head: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(27,36,48,.06), 0 8px 24px rgba(27,36,48,.06);
  --ease: 180ms ease-out;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--font-body); min-height: 100vh;
       display: flex; flex-direction: column; }
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); line-height: 1.25; font-weight: 700; margin: 0 0 .6em; }
h3 { font-size: 1.05rem; line-height: 1.35; font-weight: 700; margin: 0; }
h4 { font-size: .8rem; line-height: 1.3; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 1.3em 0 .35em; }
p { margin: 0 0 .9em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.lead { font-size: 1.15rem; color: var(--muted); line-height: 1.55; }
.muted { color: var(--muted); font-size: .92rem; }
.plain { padding-left: 1.2em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }

/* фокус и доступность */
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -80px; background: var(--brand); color: var(--on-brand); padding: 12px 18px;
        border-radius: 0 0 10px 10px; z-index: 20; font-weight: 600; transition: top var(--ease); }
.skip:focus { top: 0; color: var(--on-brand); }

/* шапка */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; }
.logo img { height: 38px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 10px 2px; min-height: 44px;
         display: inline-flex; align-items: center; }
.nav a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 560px) { .nav .hide-sm { display: none; } .logo img { height: 34px; } }

/* кнопки и поля */
.btn, button { font: 700 1rem/1.2 var(--font-head); background: var(--brand); color: var(--on-brand); border: 0; border-radius: var(--radius-sm);
               padding: 14px 26px; min-height: 52px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
               justify-content: center; gap: 8px; transition: background var(--ease), transform var(--ease); }
.btn:hover, button:hover { background: var(--brand-dark); color: var(--on-brand); }
.btn:active, button:active { transform: translateY(1px); }
button.ghost, .btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
button.ghost:hover, .btn.ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn.small, button.small { min-height: 44px; padding: 10px 18px; font-size: .95rem; }
input[type=text], textarea { width: 100%; padding: 14px 16px; font: inherit; border: 2px solid var(--border-ui); border-radius: var(--radius-sm);
                              background: var(--surface); color: var(--text); min-height: 52px; transition: border-color var(--ease); }
input[type=text]:hover, textarea:hover { border-color: var(--text); }
input[type=text]:focus, textarea:focus { outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
::placeholder { color: #6A7682; }
input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--brand); flex: none; margin: 0; cursor: pointer; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* главная */
.hero { padding: 40px 0 24px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 920px) { .hero { padding: 64px 0 40px; } .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600;
           font-size: .88rem; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.scan-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-top: 26px; box-shadow: var(--shadow); }
.scan-form > label { display: block; font-weight: 700; font-family: var(--font-head); margin-bottom: 8px; }
.scan-form .row { display: grid; gap: 12px; }
@media (min-width: 600px) { .scan-form .row { grid-template-columns: 1fr auto; } .scan-form .row button { padding-inline: 32px; } }
.scan-form label.check { display: flex; gap: 12px; font-weight: 400; font-family: var(--font-body); margin: 16px 0 0; align-items: flex-start;
                         font-size: .92rem; color: var(--muted); cursor: pointer; }
.scan-form label.check input { margin-top: 2px; }
.alert { background: var(--bad-bg); color: var(--bad); padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; font-weight: 500;
         display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--bad); }
.notice { background: var(--ok-bg); color: var(--ok); padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--ok); font-weight: 500; }
.trust { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.trust li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .95rem; }
.trust .icon { color: var(--ok); margin-top: 2px; }

/* пример отчёта в первом экране */
.sample { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; position: relative; }
.sample-tag { position: absolute; top: -12px; left: 18px; background: var(--text); color: #fff; font-size: .78rem; font-weight: 700;
              padding: 3px 12px; border-radius: 999px; letter-spacing: .03em; }
.sample ul { list-style: none; margin: 0; padding: 0; }
.sample li { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.sample li:first-child { border-top: 0; }
.sample-links { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.demo-note { margin-bottom: 14px; }
.sample .t { font-weight: 600; font-size: .95rem; line-height: 1.35; }
.sample .d { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.sample .shot { background: var(--grey-bg); border-radius: 8px; height: 56px; margin-top: 8px; position: relative; overflow: hidden; }
.sample .shot::after { content: ""; position: absolute; left: 14px; right: 40%; top: 14px; bottom: 14px; border: 2px solid var(--bad); border-radius: 6px; }

/* статусы: значок + слово + цвет */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; padding: 3px 12px 3px 8px; border-radius: 999px;
         background: var(--grey-bg); color: var(--muted); white-space: nowrap; }
.badge .icon { width: 1.1em; height: 1.1em; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.violation { background: var(--warn-bg); color: var(--warn); }
.badge.important { background: var(--bad-bg); color: var(--bad); }
.badge.manual { background: var(--grey-bg); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border-ui); }

/* блоки главной (слой 2: раскрываются) */
.sections { padding-top: 16px; padding-bottom: 56px; display: grid; gap: 12px; }
details.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.panel > summary { list-style: none; cursor: pointer; padding: 18px 20px; min-height: 56px; display: flex; align-items: center; gap: 14px;
                          font: 700 1.1rem/1.3 var(--font-head); border-radius: var(--radius); }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after, details.card > summary::after { content: ""; width: 10px; height: 10px; margin-left: auto; flex: none;
  border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(45deg); transition: transform var(--ease); }
details[open] > summary::after { transform: rotate(-135deg); }
details.panel > summary:hover { background: var(--bg); }
details.panel .body { padding: 4px 20px 22px; }
section.panel.open { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
section.panel.open > h2 { margin: 0; padding: 18px 20px 8px; font: 700 1.1rem/1.3 var(--font-head); }
section.panel.open .body { padding: 4px 20px 22px; }
.steps3 { display: grid; gap: 16px; counter-reset: s; padding: 0; list-style: none; margin: 0; }
@media (min-width: 760px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.steps3 li { counter-increment: s; background: var(--bg); border-radius: var(--radius-sm); padding: 16px; }
.steps3 li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand);
                     color: var(--on-brand); font: 700 .95rem var(--font-head); margin-bottom: 10px; }
.steps3 b { display: block; font-family: var(--font-head); margin-bottom: 4px; }
.checklist { columns: 1; padding-left: 1.4em; margin: 0; }
@media (min-width: 760px) { .checklist { columns: 2; column-gap: 40px; } }
.checklist li { break-inside: avoid; margin-bottom: 8px; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; min-height: 48px; display: flex; align-items: center; }

/* ожидание */
.progress { height: 8px; background: var(--brand-soft); border-radius: 999px; overflow: hidden; margin: 22px 0 14px; max-width: 520px; }
.progress span { display: block; height: 100%; width: 38%; background: var(--brand); border-radius: 999px; animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(270%); } }
.state { display: flex; gap: 14px; align-items: flex-start; }
.state .icon { width: 2rem; height: 2rem; color: var(--brand); }

/* отчёт */
.report-head { padding: 28px 0 8px; }
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; list-style: none; padding: 0; margin: 18px 0; }
.counts li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .9rem; color: var(--muted); }
.counts b { display: block; font: 800 1.9rem/1.1 var(--font-head); color: var(--text); }
.counts .icon { margin-right: 4px; }
.c-violation .icon { color: var(--warn); } .c-manual .icon { color: var(--muted); } .c-ok .icon { color: var(--ok); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 6px 0 4px; }
.group { margin: 30px 0 8px; }
.group > h2 { display: flex; align-items: center; gap: 10px; }

details.card, article.card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--radius-sm);
                              margin: 12px 0; scroll-margin-top: 16px; }
.card.violation { border-left-color: var(--warn); } .card.violation.important { border-left-color: var(--bad); }
.card.manual { border-left-color: var(--border-ui); } .card.ok { border-left-color: var(--ok); } .card.na { border-left-color: var(--line); }
.card:target { box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow); }
details.card > summary, article.card > header { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; gap: 6px 14px; align-items: flex-start; min-height: 56px; }
article.card > header { cursor: default; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary:hover { background: var(--bg); }
.card .head { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.card .what { color: var(--muted); font-size: .95rem; margin: 0; }
.card .body { padding: 0 18px 16px; border-top: 1px solid var(--line); }
.card .body h4:first-child { margin-top: 1em; }
.evidence { background: var(--grey-bg); border-radius: 8px; padding: 10px 14px; margin: 10px 0; overflow-wrap: anywhere; }
.evidence p { margin: .2em 0; }
.evidence img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; margin-top: 8px; }
.plate { background: var(--warn-bg); color: var(--text); border: 1px solid var(--warn); border-radius: var(--radius-sm); padding: 12px 16px; }
section.plate h2 { margin-top: 0; font-size: 1.15rem; }
.fix { background: var(--brand-soft); border-radius: 8px; padding: 12px 16px; }
.fix p { margin: 0 0 .5em; } .fix p:last-child { margin: 0; }
.locked { color: var(--muted); font-style: italic; }
.locked-btn { background: var(--grey-bg); color: var(--muted); cursor: not-allowed; box-shadow: inset 0 0 0 1px var(--line); }
.locked-btn:hover { background: var(--grey-bg); color: var(--muted); }
.feedback { margin-top: 14px; } .feedback summary { cursor: pointer; color: var(--muted); font-size: .92rem; min-height: 44px; display: flex; align-items: center; }
.feedback form { margin-top: 8px; }
.feedback label { display: block; margin-bottom: 6px; }
.pd { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 20px; margin: 16px 0; }
.pd h2 { margin-top: .4em; font-size: 1.1rem; } .pd ul { padding-left: 1.2em; overflow-wrap: anywhere; }
.pd-yes { border-left: 6px solid var(--warn); } .pd-likely { border-left: 6px solid var(--border-ui); } .pd-none { border-left: 6px solid var(--ok); }
.disclaimer { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 14px; color: var(--muted); font-size: .9rem; }
abbr.term { text-decoration: underline dotted; cursor: help; position: relative; }
abbr.term:focus::after { content: attr(title); position: absolute; left: 0; top: 1.6em; z-index: 5; width: 260px; max-width: 80vw;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: .9rem;
  box-shadow: var(--shadow); text-decoration: none; }

/* служебные страницы */
.page { padding: 40px 0 56px; }

/* подвал */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; font-size: .9rem; color: var(--muted); }
.foot p { margin: .4em 0; }
.foot .links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot .links a { padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
.foot .brand-line { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.foot .brand-line img { height: 32px; width: auto; }

@media (max-width: 520px) { .card .head { gap: 4px; } details.card > summary { padding: 12px 14px; } .card .body { padding: 0 14px 14px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .progress span { width: 100%; transform: none; }
}
@media print {
  .top, .foot, .toolbar, .feedback, .skip, .scan-form { display: none !important; }
  body { background: #fff; }   /* закрытые <details> браузер не печатает: для печати открывайте отчёт с ?mode=full */
  details.card { break-inside: avoid; }
}

/* кабинет */
form.inline { display: inline; margin: 0; }
button.link { background: none; color: var(--text); font: 500 .95rem var(--font-body); padding: 10px 2px; min-height: 44px; text-decoration: none; }
button.link:hover { background: none; color: var(--brand); text-decoration: underline; }
.actions { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 12px; }
.action { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--brand); border-radius: var(--radius-sm); padding: 14px 18px;
          display: flex; gap: 12px 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.action h3 { margin: 2px 0 4px; } .action p { margin: 0; color: var(--muted); font-size: .95rem; }
.site-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; margin: 12px 0; }
.site-card header { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.site-card p { margin: 6px 0 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 20px; flex-wrap: wrap; }
.tabs a { padding: 12px 14px; min-height: 44px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.history { list-style: none; padding: 0; margin: 0 0 16px; }
.history li { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; }
.codebox { background: var(--grey-bg); border-radius: 8px; padding: 10px 14px; font: 500 .9rem/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.field { margin: 0 0 16px; } .field label { display: block; font-weight: 600; margin-bottom: 6px; } .field .muted { margin: 4px 0 0; }
.checks { display: grid; gap: 8px; } .checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; } .table th, .table td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.table th { color: var(--muted); font-weight: 600; border-top: 0; }
.scroll-x { overflow-x: auto; }
select { width: 100%; padding: 12px 14px; min-height: 48px; font: inherit; border: 2px solid var(--border-ui); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.field-error { display: flex; gap: 8px; align-items: flex-start; color: var(--bad); font-size: .92rem; font-weight: 500; margin: 6px 0 0; }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; } fieldset.field legend { padding: 0; margin-bottom: 8px; }
.counts.wide { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.top .wrap { flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }

/* юридические документы (/legal/*) */
.legal h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
.legal h2 { margin-top: 1.8em; }
.legal h3 { margin: 1.3em 0 .4em; }
.legal blockquote { margin: 0 0 1.4em; padding: .7em 1em; border-left: 4px solid var(--warn); background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); }
.legal mark { background: var(--warn-bg); color: inherit; padding: 0 .2em; border-radius: 3px; }
.legal ul { padding-left: 1.3em; margin: 0 0 1em; }
.legal li { margin-bottom: .35em; }
.draft-note { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); padding: .7em 1em; margin: 0 0 1.4em; font-size: .95rem; }

.table-wrap { overflow-x: auto; margin: 0 0 12px; }
