@font-face { font-family: Golos; src: url('/static/fonts/golos-text-cyrillic.woff2') format('woff2'); font-style: normal; font-weight: 400 900; font-display: swap; unicode-range: U+0400-04FF, U+2116; }
@font-face { font-family: Golos; src: url('/static/fonts/golos-text-latin.woff2') format('woff2'); font-style: normal; font-weight: 400 900; font-display: swap; }
:root { --ink:#121111; --paper:#fafafa; --surface:#fff; --muted:#696767; --line:#e6e2e2; --brand:#ff474a; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:Golos,Arial,sans-serif; line-height:1.55; }
.delegation-course { max-width:1440px; margin:auto; padding:24px 48px 40px; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); column-gap:64px; align-items:start; }
.delegation-heading { grid-column:1/-1; display:flex; align-items:center; gap:24px; padding:0 0 22px; margin:0 0 32px; border-bottom:1px solid var(--line); }
.delegation-heading img { width:96px; height:auto; }
.delegation-heading h1 { margin:0; font-size:24px; line-height:1.2; font-weight:500; }
#error,#busy,.demo-footer { grid-column:1/-1; }
.error { background:#fff1ef; color:#8e2118; padding:14px; border-radius:8px; }
#start { grid-column:1/-1; width:min(760px,100%); margin:30px auto; }
#start h2 { font-size:clamp(30px,4vw,48px); line-height:1.12; letter-spacing:-.03em; font-weight:500; }
#start h3 { margin-top:36px; }
h2 { font-size:24px; line-height:1.25; font-weight:500; }
h3 { font-size:19px; font-weight:500; }
p { margin:0 0 16px; }
#start > p:first-child, #case-step, #dialogue-section > p:first-child, #question-section > p:first-child { color:var(--muted); font-size:14px; }
#case-section { grid-column:1; position:sticky; top:28px; min-width:0; }
#case-section > .delegation-panel { background:transparent; padding:0; }
#case-role { background:#f1eeee; border-radius:8px; padding:12px 16px; }
#case-facts { padding-top:20px; border-top:1px solid var(--line); color:var(--muted); font-size:14px; }
#choose-section,#dialogue-section,#question-section { grid-column:2; min-width:0; }
#result-section { grid-column:1/-1; width:100%; }
.delegation-grid { display:grid; gap:12px; }
.delegation-grid .delegation-panel, #criteria li { display:block; padding:20px; margin:0; background:var(--surface); border:1px solid var(--line); border-radius:8px; }
.delegation-grid .delegation-panel h3 { margin:0; }
.delegation-grid .delegation-panel p:nth-of-type(1) { color:var(--muted); font-size:14px; }
.delegation-grid .delegation-panel p:nth-of-type(2) { margin-top:12px; }
.delegation-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 20px; border:1px solid var(--ink); border-radius:8px; background:var(--ink); color:#fff; font:inherit; font-weight:500; cursor:pointer; }
#start-button,#finish-button { border-color:#d22d30; background:#d22d30; }
button:disabled { opacity:.55; cursor:default; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline:3px solid #a72023; outline-offset:3px; }
.delegation-form label { display:grid; gap:8px; margin:16px 0; }
.delegation-form input,.delegation-form textarea { width:100%; max-width:100%; padding:12px 14px; border:1px solid #b8b2b2; border-radius:8px; background:#fff; color:var(--ink); font:inherit; font-size:16px; }
.delegation-form textarea { min-height:110px; resize:vertical; }
.messages { display:grid; gap:12px; min-height:180px; max-height:55vh; overflow:auto; padding:20px; background:#fff; border:1px solid var(--line); border-radius:8px; }
.message { padding:12px 16px; background:#f1eeee; border-radius:8px; white-space:pre-wrap; }
.message strong { display:block; margin-bottom:5px; }
#message-count { color:var(--muted); font-variant-numeric:tabular-nums; font-size:14px; margin-top:14px; }
.delegation-score { font-size:40px; line-height:1.2; font-weight:500; }
.delegation-criteria { display:grid; gap:12px; padding:0; list-style:none; }
#feedback { background:#fff9f4; border:1px solid #eadfd7; border-radius:8px; padding:24px; }
#feedback blockquote { color:#514c4c; }
#feedback .delegation-panel { border-top:1px solid #eadfd7; padding-top:16px; }
#busy { font-weight:600; }
.demo-footer { border-top:1px solid var(--line); margin-top:48px; padding-top:24px; }
.demo-footer img { width:105px; height:auto; }
@media (hover:hover) { .delegation-button:hover { opacity:.85; } .delegation-grid .delegation-panel:hover { border-color:var(--brand); } }
@media (max-width:850px) { .delegation-course { grid-template-columns:minmax(0,1fr); padding:20px 24px 32px; } .delegation-heading,#case-section,#choose-section,#dialogue-section,#question-section,#result-section,#start { grid-column:1; } #case-section { position:static; } #choose-section,#dialogue-section,#question-section { border-top:1px solid var(--line); margin-top:24px; padding-top:24px; } }
@media (max-width:380px) { .delegation-course { padding-inline:16px; } .delegation-heading { gap:12px; } .delegation-button { width:100%; margin-bottom:8px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; } }
/* Переопределения существующих стилей курса для нового каркаса. */
.delegation-heading { justify-content:flex-start; align-items:center; }
.delegation-course h1 { font-size:24px; font-weight:500; }
.delegation-course h2 { font-size:24px; font-weight:500; }
.delegation-grid { grid-template-columns:minmax(0,1fr); }
@media (hover:hover) { .delegation-button:not(:disabled):hover { background:#333; border-color:#333; color:#fff; } }
