/* ==========================================================================
   Портал ученического совета «Алгоритм» — дизайн-система
   Стиль: Accessible & Ethical. Институционально, документно, спокойно.
   Сетка отступов 4/8. Брейкпоинты: 768 / 1024 / 1280.
   ========================================================================== */

/* ---------- Токены ---------- */
:root {
  /* бренд */
  --brand: #3B523D; /* цвет логотипа */
  --green-900: #1F2E22;
  --green-800: #1C4630;
  --green-700: #26593B; /* основной цвет из ТЗ */
  --green-600: #2F6D48;
  --green-100: #DCEBE0;
  --green-50:  #EEF5F0;

  /* нейтральные, тёплые */
  --ink:        #1B1F1C; /* графит */
  --ink-2:      #3A403C;
  --muted:      #5A615C; /* 6.0:1 на фоне */
  --subtle:     #7A817C; /* только для крупных/декоративных */
  --line:       #E2DED5;
  --line-2:     #D3CEC2;
  --bg:         #F7F5F0; /* тёплый off-white */
  --bg-2:       #EFECE4;
  --surface:    #FFFFFF;

  /* семантика */
  --primary: var(--green-700);
  --primary-hover: var(--green-800);
  --on-primary: #FFFFFF;
  --focus: #1E5FB4;
  --danger: #A3262A;
  --danger-bg: #FBECEC;
  --warn-bg: #FDF4E3;
  --warn-ink: #7A4B00;

  /* статусы: фон / текст / рамка — контраст текста ≥ 4.5:1 */
  --st-neutral-bg: #EEEDE8; --st-neutral-fg: #3A403C; --st-neutral-bd: #D6D3CA;
  --st-blue-bg:    #E7EEF8; --st-blue-fg:    #1D4A85; --st-blue-bd:    #C3D3EA;
  --st-amber-bg:   #FCF1DC; --st-amber-fg:   #7A4B00; --st-amber-bd:   #EDD39F;
  --st-green-bg:   #E5F1E8; --st-green-fg:   #1F5233; --st-green-bd:   #BFDAC7;
  --st-teal-bg:    #E2F1F0; --st-teal-fg:    #0E5754; --st-teal-bd:    #B5D9D6;
  --st-success-bg: #26593B; --st-success-fg: #FFFFFF; --st-success-bd: #26593B;
  --st-red-bg:     #F9E9E9; --st-red-fg:     #8E1F24; --st-red-bd:     #EBC3C4;
  --st-dark-bg:    #FFFFFF; --st-dark-fg:    #3A403C; --st-dark-bd:    #9EA49F;

  /* типографика */
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 0.8125rem;  /* 13 */
  --fs-sm: 0.875rem;   /* 14 */
  --fs-md: 1rem;       /* 16 */
  --fs-lg: 1.125rem;   /* 18 */
  --fs-xl: 1.25rem;    /* 20 */
  --fs-2xl: 1.5rem;    /* 24 */
  --fs-h2: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem);  /* 26 → 36 */
  --fs-h1: clamp(2rem, 1.3rem + 2.8vw, 3.25rem);      /* 32 → 52 */

  /* отступы (4/8) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;
  --section: var(--s16);
  --gutter: var(--s4);

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-1: 0 1px 2px rgba(27, 31, 28, .05);
  --shadow-2: 0 6px 24px -8px rgba(27, 31, 28, .14);
  --shadow-3: 0 18px 48px -16px rgba(27, 31, 28, .28);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 200ms;
  --container: 1200px;
  --header-h: 64px;

  --z-header: 40; --z-drawer: 60; --z-sheet: 80; --z-toast: 100;
}

@media (min-width: 768px) {
  :root { --gutter: var(--s8); --section: var(--s20); }
}
@media (min-width: 1024px) {
  :root { --section: var(--s24); --header-h: 72px; }
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -0.035em; font-weight: 750; }
h2 { font-size: var(--fs-h2); line-height: 1.12; letter-spacing: -0.03em; font-weight: 750; }
h3 { font-size: var(--fs-xl); line-height: 1.3; letter-spacing: -0.01em; }
h4 { font-size: var(--fs-lg); line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--s3); }
ul, ol { margin: 0; padding: 0; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
b, strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* программный фокус после перехода страницы — без рамки */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
::selection { background: var(--green-100); }
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: -0.25em; }
a:has(> .icon:last-child):not(.btn):not(.doc-link):not(.chip-link) { display: inline-flex; align-items: center; gap: 6px; }
a:has(> .icon:last-child):not(.btn) > .icon:last-child { width: 18px; height: 18px; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 200;
  background: var(--ink); color: #fff; padding: var(--s3) var(--s4); border-radius: var(--radius);
}
.skip-link:focus { top: var(--s3); color: #fff; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(760px + var(--gutter) * 2); }
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .66); }
.section--alt { background: var(--bg-2); }
.section--line { padding-top: 0; }
.stack > * + * { margin-top: var(--s4); }
.stack-lg > * + * { margin-top: var(--s8); }

.eyebrow, .kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0;
  color: var(--muted); margin-bottom: var(--s4);
}
.eyebrow::before, .kicker::before { content: ''; flex: none; width: 10px; height: 10px; background: var(--brand); border-radius: 2px; }
.lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--muted); max-width: 62ch; }
.label { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: var(--s2); }
.prose { max-width: 68ch; }
.prose p + p { margin-top: var(--s4); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: var(--s2); }

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: #BDB7A9;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  border: 1px solid var(--btn-bd); border-radius: var(--radius);
  letter-spacing: -0.01em;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: var(--fs-md); line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform 120ms var(--ease);
  touch-action: manipulation;
}
.btn:hover { --btn-bd: var(--ink); --btn-bg: var(--surface); color: var(--btn-fg); }
.btn:active { transform: scale(.98); }
.btn--primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: var(--primary); }
.btn--primary .icon { transition: transform var(--dur) var(--ease); }
.btn--primary:hover .icon:last-child { transform: translateX(3px); }
.btn--primary:hover { --btn-bg: var(--primary-hover); --btn-bd: var(--primary-hover); }
.btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn--danger:hover { --btn-bg: #861E21; --btn-bd: #861E21; }
.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; color: var(--primary); --btn-fg: var(--primary); padding-inline: var(--s3); }
.btn--ghost:hover { --btn-bg: var(--green-50); --btn-bd: transparent; }
.btn--sm { min-height: 40px; padding: 0 var(--s4); font-size: var(--fs-sm); }
.btn--lg { min-height: 56px; padding: 0 var(--s6); font-size: var(--fs-lg); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent; color: var(--ink);
  transition: background-color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--bg-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---------- Бета-полоса ---------- */
.beta {
  background: var(--ink); color: #E4E6E1; font-size: var(--fs-sm);
}
.beta__inner { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding-block: var(--s2); }
.beta__tag { flex: none; font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 4px; background: rgba(255,255,255,.14); color: #fff; }
.beta__text { flex: 1; }
.beta__full { display: none; }
@media (min-width: 900px) { .beta__short { display: none; } .beta__full { display: inline; } }
.beta .icon-btn { color: #fff; width: 36px; height: 36px; }
.beta .icon-btn:hover { background: rgba(255,255,255,.1); }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(250, 248, 244, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: var(--s6); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: var(--s3); color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 36px; height: 36px; }
.brand__logo { width: 56px; height: auto; flex: none; }
.brand__text { padding-left: var(--s3); border-left: 1px solid var(--line-2); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.brand__sub { font-size: 13px; color: var(--muted); }
.nav { display: none; }
.nav__list { display: flex; gap: var(--s1); list-style: none; }
.nav__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); border-radius: var(--radius-sm);
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__link:hover { background: var(--bg-2); color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.header__cta { display: none; }
@media (min-width: 560px) { .header__cta { display: inline-flex; } }
@media (min-width: 1240px) {
  .nav { display: block; }
  .header__burger { display: none; }
}

/* Мобильное меню */
.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); }
.drawer[hidden] { display: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(20, 24, 21, .5); opacity: 0; transition: opacity var(--dur) var(--ease); }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw);
  background: var(--surface); padding: var(--s4) var(--s4) var(--s8); overflow-y: auto;
  transform: translateX(100%); transition: transform 260ms var(--ease);
  display: flex; flex-direction: column; gap: var(--s6);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; }
.drawer__list { list-style: none; display: grid; gap: var(--s1); }
.drawer__list a {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 var(--s3);
  border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 500; font-size: var(--fs-lg);
}
.drawer__list a:hover { background: var(--bg-2); }
.drawer__list a[aria-current="page"] { background: var(--green-50); color: var(--primary); font-weight: 600; }
.drawer__group-title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 var(--s3); margin-bottom: var(--s2); }

/* ---------- Подвал ---------- */
.footer { margin-top: auto; background: var(--brand); color: #CFDDD3; padding-block: var(--s16) var(--s10); font-size: var(--fs-sm); }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; color: #fff; }
.footer__grid { display: grid; gap: var(--s10); grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s8); } }
.footer__logo { display: inline-block; }
.footer__logo img { width: 112px; height: auto; }
.footer__brand .brand { color: #fff; }
.footer__brand .brand__sub { color: #A9BEB0; }
.footer__about { margin-top: var(--s4); max-width: 36ch; line-height: 1.6; }
.footer__title { color: #C5D2C6; font-family: var(--mono); font-weight: 500; font-size: 13px; margin-bottom: var(--s4); }
.footer__list { list-style: none; display: grid; gap: var(--s3); }
.footer__bottom { margin-top: var(--s12); padding-top: var(--s6); border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); justify-content: space-between; color: #A9BEB0; }

/* ---------- Бейдж статуса ---------- */
.badge {
  --bg: var(--st-neutral-bg); --fg: var(--st-neutral-fg); --bd: var(--st-neutral-bd);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font-weight: 600; line-height: 1.2; border-radius: var(--radius-sm);
}
.badge--xs { font-size: 12px; padding: 2px 7px; gap: 4px; }
.badge--xs .icon { width: 14px; height: 14px; }
.badge--sm { font-size: 13px; padding: 4px 9px; }
.badge--sm .icon { width: 16px; height: 16px; }
.badge--md { font-size: 14px; padding: 6px 11px; }
.badge--md .icon { width: 18px; height: 18px; }
.badge--lg { font-size: 16px; padding: 10px 16px; border-width: 1.5px; border-radius: var(--radius); gap: 8px; letter-spacing: -0.005em; }
.badge--lg .icon { width: 22px; height: 22px; }
.badge--neutral { --bg: var(--st-neutral-bg); --fg: var(--st-neutral-fg); --bd: var(--st-neutral-bd); }
.badge--blue    { --bg: var(--st-blue-bg);    --fg: var(--st-blue-fg);    --bd: var(--st-blue-bd); }
.badge--amber   { --bg: var(--st-amber-bg);   --fg: var(--st-amber-fg);   --bd: var(--st-amber-bd); }
.badge--green   { --bg: var(--st-green-bg);   --fg: var(--st-green-fg);   --bd: var(--st-green-bd); }
.badge--teal    { --bg: var(--st-teal-bg);    --fg: var(--st-teal-fg);    --bd: var(--st-teal-bd); }
.badge--success { --bg: var(--st-success-bg); --fg: var(--st-success-fg); --bd: var(--st-success-bd); }
.badge--red     { --bg: var(--st-red-bg);     --fg: var(--st-red-fg);     --bd: var(--st-red-bd); }
.badge--dark    { --bg: var(--st-dark-bg);    --fg: var(--st-dark-fg);    --bd: var(--st-dark-bd); border-style: dashed; }

.type-tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.type-tag .icon { width: 18px; height: 18px; color: var(--primary); }

/* ---------- Срок обновления ---------- */
.deadline { display: flex; align-items: flex-start; gap: var(--s2); font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
.deadline .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--muted); }
.deadline__note { display: block; font-weight: 400; color: var(--danger); margin-top: 2px; }
.deadline--soon .icon { color: var(--warn-ink); }
.deadline--overdue { color: var(--danger); }
.deadline--overdue .icon { color: var(--danger); }

/* ---------- Карточка обращения в списке ---------- */
.grid { display: grid; gap: var(--s4); }
.grid--cards { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid--cards { grid-template-columns: repeat(2, 1fr); gap: var(--s5); } }
@media (min-width: 1100px) { .grid--cards-3 { grid-template-columns: repeat(3, 1fr); } }
.grid--list { grid-template-columns: 1fr; gap: var(--s3); }

.rcard {
  --tone: var(--st-neutral-fg);
  position: relative; display: flex; flex-direction: column; gap: var(--s3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--s5); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  box-shadow: inset 3px 0 0 var(--tone);
}
.rcard--blue { --tone: var(--st-blue-fg); } .rcard--amber { --tone: #C98A12; } .rcard--green { --tone: var(--st-green-fg); }
.rcard--teal { --tone: var(--st-teal-fg); } .rcard--success { --tone: var(--primary); } .rcard--red { --tone: #B4473F; } .rcard--dark { --tone: #9EA49F; }
@media (min-width: 768px) { .rcard { padding: var(--s6); } }
.rcard:hover { border-color: var(--ink); }
.rcard:has(.stretched:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.rcard__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.rcard__num { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); }
.rcard__meta { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }
.rcard__title { font-size: var(--fs-xl); line-height: 1.25; font-weight: 650; letter-spacing: -0.02em; }
.rcard__title a { color: var(--ink); text-decoration: none; }
.stretched::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.stretched:focus-visible { outline: none; }
.rcard__status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.rcard__date { font-size: var(--fs-sm); color: var(--muted); }
.rcard__next { display: flex; gap: var(--s2); font-size: var(--fs-sm); color: var(--ink-2); padding-top: var(--s3); border-top: 1px solid var(--line); margin-top: auto; }
.rcard__next .icon { width: 18px; height: 18px; color: var(--primary); margin-top: 1px; }
.rcard__next--result .icon { color: var(--green-600); }
.rcard--restricted .rcard__next .icon { color: var(--muted); }

.rcard--skeleton { gap: var(--s4); min-height: 180px; }
.sk { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-2), #ECE8E0, var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.sk--sm { width: 30%; } .sk--md { width: 55%; } .sk--lg { width: 90%; height: 20px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Герой ---------- */
.hero { padding-block: var(--s10) 0; background: var(--bg); }
@media (min-width: 1024px) { .hero { padding-block: var(--s16) 0; } }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s12); align-items: start; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s16); } }
.hero__title { font-size: clamp(2.5rem, 1.3rem + 3.6vw, 4.25rem); line-height: 1; letter-spacing: -0.045em; font-weight: 800; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__title .line > span { display: block; }
.hero__title .line--brand { color: var(--brand); }
.hero__lead { margin-top: var(--s5); font-size: var(--fs-lg); color: var(--ink-2); max-width: 52ch; }
@media (min-width: 768px) { .hero__lead { font-size: var(--fs-xl); } }
.hero__actions { margin-top: var(--s8); display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero__actions .btn { flex: 1 1 220px; }
@media (min-width: 560px) { .hero__actions .btn { flex: 0 0 auto; } }
.hero__find { margin-top: var(--s8); max-width: 480px; }
.hero__visual { position: relative; }

/* Поиск по номеру */
.numsearch { display: flex; gap: var(--s2); }
.numsearch__field { position: relative; flex: 1; min-width: 0; }
.numsearch__field .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.numsearch input { padding-left: 44px; }
.field-hint { margin-top: var(--s2); font-size: var(--fs-sm); color: var(--muted); }

/* Демонстрационная карточка в герое */
.case {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3); overflow: hidden;
}
.case__head { padding: var(--s6) var(--s6) var(--s5); border-bottom: 1px solid var(--line); }
.case__num { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); }
.case__title { margin-top: var(--s2); font-size: var(--fs-xl); line-height: 1.3; }
.case__status { margin-top: var(--s4); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; }
.case__body { padding: var(--s5) var(--s6) var(--s6); display: grid; gap: var(--s4); }
.case__row .label { margin-bottom: var(--s1); }
.case__row p { font-size: var(--fs-md); color: var(--ink-2); }
.case__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s4) var(--s6); background: var(--bg); border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.case__steps { display: flex; gap: 4px; }
.case__foot a { white-space: nowrap; font-weight: 600; text-decoration: none; }
.case__steps span { width: 22px; height: 4px; border-radius: 2px; background: var(--line-2); }
.case__steps span.is-done { background: var(--primary); }

/* ---------- Шаги процесса ---------- */
.steps { list-style: none; display: grid; gap: var(--s3); counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(5, 1fr); gap: var(--s4); } }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s5); display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s4); align-items: start; }
@media (min-width: 900px) { .step { grid-template-columns: 1fr; padding: var(--s6); gap: var(--s3); } }
.step__n { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .step__n { grid-row: auto; margin-bottom: var(--s2); } }
.step__title { font-size: var(--fs-md); font-weight: 600; line-height: 1.35; }
.step__text { font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Заголовок секции ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s4) var(--s8); margin-bottom: var(--s8); }
@media (min-width: 768px) { .section-head { margin-bottom: var(--s10); } }
.section-head__text { max-width: 720px; }
.section-head--indexed { display: grid; grid-template-columns: 1fr; align-items: end; padding-top: var(--s4); border-top: 1px solid var(--ink); }
@media (min-width: 900px) { .section-head--indexed { grid-template-columns: 120px minmax(0, 1fr) auto; gap: var(--s6); } }
.section-head__index { font-family: var(--mono); font-size: 13px; color: var(--muted); align-self: start; padding-top: 6px; }
.section-head--indexed .section-head__action { align-self: end; }
.section-head .lead { margin-top: var(--s3); }

/* ---------- Инфо-блоки ---------- */
.tiles { display: grid; gap: var(--s4); }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: var(--s5); } }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s6); display: flex; flex-direction: column; gap: var(--s3); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.tile:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.tile__icon { width: 44px; height: 44px; border-radius: var(--radius); background: var(--green-50); color: var(--primary); display: grid; place-items: center; margin-bottom: var(--s2); }
.tile__icon .icon { width: 22px; height: 22px; }
.tile h3 a { color: var(--ink); text-decoration: none; }
.tile p { color: var(--muted); font-size: var(--fs-md); }
.tile__more { margin-top: auto; padding-top: var(--s2); display: inline-flex; align-items: center; gap: var(--s1); font-weight: 600; font-size: var(--fs-sm); color: var(--primary); }
.tile__more .icon { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.tile:hover .tile__more .icon { transform: translateX(3px); }

/* Плашки-подсказки */
.note { display: flex; gap: var(--s3); padding: var(--s5); border-radius: var(--radius-lg); background: var(--green-50); border: 1px solid var(--green-100); color: var(--ink-2); }
.note .icon { color: var(--primary); margin-top: 2px; }
.note__title { font-weight: 600; color: var(--ink); margin-bottom: var(--s1); }
.note--warn { background: var(--warn-bg); border-color: #EFDDB6; }
.note--warn .icon { color: var(--warn-ink); }

/* ---------- Баннеры приватности ---------- */
.banner { display: flex; gap: var(--s3); padding: var(--s4) var(--s5); border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: var(--bg-2); }
.banner .icon { margin-top: 2px; color: var(--ink-2); }
.banner__title { font-weight: 600; margin-bottom: 2px; }
.banner p { font-size: var(--fs-sm); color: var(--ink-2); }
.banner--merged { background: var(--st-blue-bg); border-color: var(--st-blue-bd); }
.banner--merged .icon { color: var(--st-blue-fg); }
.banner--pending { background: var(--warn-bg); border-color: #EFDDB6; }

/* ---------- Страница: заголовок ---------- */
.page-head { padding-block: var(--s10) var(--s8); border-bottom: 1px solid var(--ink); }
@media (min-width: 1024px) { .page-head { padding-block: var(--s16) var(--s12); } }
.page-head .lead { margin-top: var(--s4); }
.page-head__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s6); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); list-style: none; font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--s5); }
.crumbs a { color: var(--muted); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }
.crumbs .icon { width: 14px; height: 14px; }
.page-body { padding-block: var(--s10) var(--section); }
@media (min-width: 1024px) { .page-body { padding-block: var(--s12) var(--section); } }

/* ---------- Карточка обращения (страница) ---------- */
.case-page__head { padding-block: var(--s8) var(--s8); border-bottom: 1px solid var(--ink); background: var(--bg); }
@media (min-width: 1024px) { .case-page__head { padding-block: var(--s12) var(--s10); } }
.case-page__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-bottom: var(--s3); }
.case-page__num { font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--ink); padding: 3px 8px; border: 1px solid var(--ink); border-radius: var(--radius-sm); }
.case-page__title { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); line-height: 1.15; max-width: 24ch; }
.case-page__status { margin-top: var(--s6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.case-page__updated { font-size: var(--fs-sm); color: var(--muted); }
.case-layout { display: grid; gap: var(--s10); }
@media (min-width: 1024px) {
  .case-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s12); align-items: start; }
  .case-layout__aside { position: sticky; top: calc(var(--header-h) + var(--s6)); order: 2; }
}
.case-layout__main > section + section { margin-top: var(--s10); padding-top: var(--s10); border-top: 1px solid var(--line); }
.case-layout__main h2 { font-size: var(--fs-2xl); margin-bottom: var(--s4); }
.case-text { font-size: var(--fs-lg); line-height: 1.6; color: var(--ink-2); max-width: 64ch; }
.case-text + .label { margin-top: var(--s6); }

.next-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.next-box__main { padding: var(--s6); border-top: 4px solid var(--primary); }
.next-box__main .label { color: var(--primary); }
.next-box__text { font-size: var(--fs-lg); font-weight: 600; line-height: 1.4; color: var(--ink); }
.next-box__main .deadline { margin-top: var(--s4); }
.next-box__group { padding: var(--s4) var(--s6); background: var(--bg); border-top: 1px solid var(--line); display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-sm); color: var(--ink-2); }
.next-box__group .icon { color: var(--muted); }
.next-box--final .next-box__main { border-top-color: var(--green-600); }
.next-box--rejected .next-box__main { border-top-color: var(--danger); }
.next-box--rejected .next-box__main .label { color: var(--danger); }
.next-box--closed .next-box__main { border-top-color: var(--subtle); }
.next-box--closed .next-box__main .label { color: var(--muted); }
.next-box--clarify .next-box__main { border-top-color: var(--danger); }
.next-box--clarify .next-box__main .label { color: var(--danger); }
.aside-actions { margin-top: var(--s4); display: grid; gap: var(--s2); }

.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 768px) { .meta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.meta-grid__item { background: var(--surface); padding: var(--s4) var(--s5); }
.meta-grid dt { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; margin-bottom: var(--s1); }
.meta-grid dd { margin: 0; font-weight: 600; font-size: var(--fs-md); line-height: 1.35; overflow-wrap: anywhere; }

/* Хронология */
.timeline { list-style: none; position: relative; }
.timeline__item { position: relative; padding-left: var(--s8); padding-bottom: var(--s6); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before { content: ''; position: absolute; left: 7px; top: 22px; bottom: -2px; width: 2px; background: var(--line); }
.timeline__item:last-child::before { display: none; }
.timeline__dot { position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.timeline__item.is-current .timeline__dot { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px var(--green-50); }
.timeline__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s1); }
.timeline__head time { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.timeline__kind { font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 7px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.timeline__text { color: var(--ink-2); }

/* Связанные документы */
.docs { list-style: none; display: grid; gap: var(--s2); }
.doc-link { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); min-height: 56px; transition: border-color var(--dur) var(--ease); }
.doc-link:hover { border-color: var(--primary); color: var(--ink); }
.doc-link .icon { color: var(--primary); }
.doc-link__num { font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--ink); flex: none; }
.doc-link__text { flex: 1; font-size: var(--fs-sm); color: var(--ink-2); }
.doc-link .icon:last-child { color: var(--muted); width: 18px; }
.version { margin-top: var(--s10); font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Решения ---------- */
.decision { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s6); display: grid; gap: var(--s4); scroll-margin-top: calc(var(--header-h) + 24px); }
@media (min-width: 768px) { .decision { padding: var(--s8); } }
.decision:target { border-color: var(--primary); box-shadow: 0 0 0 3px var(--green-50); }
.decision__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); align-items: center; }
.decision__num { display: inline-flex; gap: var(--s2); align-items: center; font-family: var(--mono); font-weight: 600; color: var(--ink); }
.decision__num .icon { color: var(--brand); }
.decision__date { font-size: var(--fs-sm); color: var(--muted); }
.decision__text { font-size: var(--fs-lg); font-weight: 600; line-height: 1.45; max-width: 64ch; }
.decision__reason { color: var(--ink-2); max-width: 68ch; }
.decision__links { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.decision__links .label { width: 100%; margin-bottom: 0; }
.chip-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s3); border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--ink); text-decoration: none; }
.chip-link:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.vote { display: grid; gap: var(--s3); }
.vote__bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--bg-2); gap: 2px; }
.vote__seg--for { background: var(--primary); }
.vote__seg--against { background: #B4473F; }
.vote__seg--abstain { background: #B9B5AA; }
.vote__legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: var(--fs-sm); color: var(--ink-2); }
.vote__legend li { display: inline-flex; align-items: center; gap: var(--s2); }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot--for { background: var(--primary); } .dot--against { background: #B4473F; } .dot--abstain { background: #B9B5AA; }

/* ---------- Формы ---------- */
.form { display: grid; gap: var(--s8); }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
/* legend не участвует в grid-gap — задаём отступ явно, крупнее, чем у обычной подписи: под ним группа кнопок */
.fieldset > legend { margin-bottom: var(--s3); }
.form-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s6) var(--s5); display: grid; gap: var(--s6); }
@media (min-width: 768px) { .form-section { padding: var(--s8); } }
.form-section__head { display: flex; gap: var(--s4); align-items: flex-start; }
.form-section__n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--green-50); color: var(--primary); font-weight: 700; display: grid; place-items: center; font-size: var(--fs-sm); }
.form-section__title { font-size: var(--fs-xl); }
.form-section__desc { margin-top: var(--s1); color: var(--muted); font-size: var(--fs-sm); }
.field { display: grid; gap: var(--s2); }
.field__label, legend.field__label { font-weight: 600; font-size: var(--fs-md); color: var(--ink); padding: 0; }
.field__opt { display: block; margin-top: 2px; font-weight: 400; font-size: var(--fs-sm); color: var(--muted); }
.field__req { color: var(--danger); margin-left: 2px; }
.field__help { font-size: var(--fs-sm); color: var(--muted); }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.field__count { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: none; }
.field__count.is-over { color: var(--danger); font-weight: 600; }
.field__error { display: none; align-items: flex-start; gap: var(--s2); font-size: var(--fs-sm); color: var(--danger); font-weight: 500; }
.field__error .icon { width: 18px; height: 18px; margin-top: 1px; }
.field.has-error .field__error { display: flex; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: var(--s3) var(--s4);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  font-size: var(--fs-md); line-height: 1.4; color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: #8C928D; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--subtle); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(38, 89, 59, .18); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; }
.textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.textarea--sm { min-height: 104px; }
.select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A615C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; cursor: pointer; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field.has-error .input:focus, .field.has-error .textarea:focus { box-shadow: 0 0 0 3px rgba(163, 38, 42, .16); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Карточки выбора типа */
.choice-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .choice-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice__box { height: 100%; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--surface); transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.choice__box .icon { width: 24px; height: 24px; color: var(--primary); }
.choice__title { font-weight: 600; }
.choice__hint { font-size: var(--fs-sm); color: var(--muted); line-height: 1.4; hyphens: auto; overflow-wrap: break-word; }
.choice input:hover + .choice__box { border-color: var(--subtle); }
.choice input:checked + .choice__box { border-color: var(--primary); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--primary); }
.choice input:focus-visible + .choice__box { outline: 3px solid var(--focus); outline-offset: 2px; }
.field.has-error .choice__box { border-color: #E3B3B5; }

/* Пилюли (radio) */
.pills { display: flex; flex-wrap: wrap; gap: var(--s2); }
/* равные колонки: без «осиротевшего» последнего варианта на отдельной строке */
.pills--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .pills--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 559px) { .pills--grid .pill:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.pills--grid .pill span { width: 100%; justify-content: center; text-align: center; padding-inline: var(--s3); }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-weight: 500; font-size: var(--fs-sm); transition: all var(--dur) var(--ease); }
.pill input:hover + span { border-color: var(--subtle); }
.pill input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Режим публикации */
.options { display: grid; gap: var(--s3); }
.option { position: relative; display: flex; gap: var(--s3); padding: var(--s4); border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.option:hover { border-color: var(--subtle); }
.option input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex: none; cursor: pointer; }
.option:has(input:checked) { border-color: var(--primary); background: var(--green-50); }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.option__title { font-weight: 600; }
.option__text { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }

/* Файлы */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); text-align: center; padding: var(--s6); border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--bg); transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.dropzone:hover, .dropzone.is-over { border-color: var(--primary); background: var(--green-50); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.dropzone .icon { color: var(--primary); width: 24px; height: 24px; }
.dropzone__title { font-weight: 600; }
.dropzone__hint { font-size: var(--fs-sm); color: var(--muted); }
.files { list-style: none; display: grid; gap: var(--s2); }
.files li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: var(--fs-sm); }
.files li .icon { color: var(--muted); }
.files__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files__size { color: var(--muted); font-variant-numeric: tabular-nums; }

.error-summary { padding: var(--s5); border: 1.5px solid var(--danger); border-radius: var(--radius-lg); background: var(--danger-bg); }
.error-summary h2 { font-size: var(--fs-lg); color: var(--danger); margin-bottom: var(--s2); }
.error-summary ul { padding-left: 1.2em; display: grid; gap: var(--s1); }
.error-summary a { color: var(--danger); font-weight: 500; text-decoration-thickness: 1px; }

.form-submit { display: grid; gap: var(--s4); }
@media (min-width: 768px) { .form-submit { grid-template-columns: auto 1fr; align-items: center; gap: var(--s6); } }
.form-submit p { font-size: var(--fs-sm); color: var(--muted); max-width: 52ch; }

.submit-layout { display: grid; gap: var(--s10); }
@media (min-width: 1024px) { .submit-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s12); align-items: start; } .submit-layout__aside { position: sticky; top: calc(var(--header-h) + var(--s6)); } }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s6); }
.aside-card + .aside-card { margin-top: var(--s4); }
.aside-card h2, .aside-card h3 { font-size: var(--fs-lg); margin-bottom: var(--s4); }
.checklist { list-style: none; display: grid; gap: var(--s3); font-size: var(--fs-sm); color: var(--ink-2); }
.checklist li { display: flex; gap: var(--s3); }
.checklist .icon { width: 18px; height: 18px; color: var(--primary); margin-top: 1px; }

/* Экран успеха */
.success { text-align: center; max-width: 620px; margin-inline: auto; }
.success__icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto var(--s6); display: grid; place-items: center; background: var(--green-50); color: var(--primary); }
.success__icon .icon { width: 36px; height: 36px; }
.success__num { margin-top: var(--s8); padding: var(--s6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: var(--s4); justify-items: center; }
.success__number { font-family: var(--mono); font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.success .btn-row .btn { flex: 1 1 220px; }
@media (min-width: 560px) { .success .btn-row .btn { flex: 0 0 auto; } }
.secret { margin-top: var(--s4); text-align: left; padding: var(--s6); border-radius: var(--radius-lg); border: 1px solid #EFDDB6; background: var(--warn-bg); display: grid; gap: var(--s3); }
.secret__title { display: flex; gap: var(--s2); align-items: center; font-weight: 600; }
.secret__title .icon { color: var(--warn-ink); }
.secret__url { display: flex; gap: var(--s2); }
.secret__url .input { min-width: 0; font-size: var(--fs-sm); font-family: ui-monospace, 'SF Mono', Menlo, monospace; background: #fff; }
.success__next { margin-top: var(--s8); text-align: left; }

/* ---------- Реестр ---------- */
.registry { display: grid; gap: var(--s8); }
@media (min-width: 1024px) { .registry { grid-template-columns: 280px minmax(0, 1fr); gap: var(--s10); align-items: start; } .registry__filters { position: sticky; top: calc(var(--header-h) + var(--s6)); } }
.registry__filters { display: none; }
@media (min-width: 1024px) { .registry__filters { display: block; } .registry__mobile-filter { display: none !important; } }
.filters { display: grid; gap: var(--s6); }
.filters .field__label { font-size: var(--fs-sm); }
.toolbar { display: grid; gap: var(--s3); margin-bottom: var(--s6); }
.toolbar__row { display: flex; gap: var(--s2); }
.toolbar__search { position: relative; flex: 1; min-width: 0; }
.toolbar__search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.toolbar__search .input { padding-left: 44px; }
.toolbar__meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); font-size: var(--fs-sm); color: var(--muted); }
.segmented { display: inline-flex; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); gap: 2px; max-width: 100%; }
.segmented button { min-height: 40px; padding: 0 var(--s4); border: 0; border-radius: 7px; background: transparent; font-weight: 500; font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; transition: background-color var(--dur) var(--ease); }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.active-filters { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tag-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s2) 0 var(--s3); border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-size: var(--fs-sm); color: var(--ink-2); }
.tag-btn .icon { width: 16px; height: 16px; }
.tag-btn:hover { border-color: var(--danger); color: var(--danger); }
.jump { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--s5); margin-bottom: var(--s4); border-radius: var(--radius-lg); border: 1px solid var(--primary); background: var(--green-50); }
.jump p { font-weight: 500; }

/* Пустые состояния */
.empty { text-align: center; padding: var(--s12) var(--s6); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); background: var(--surface); display: grid; justify-items: center; gap: var(--s2); }
.empty > .icon { width: 32px; height: 32px; color: var(--subtle); margin-bottom: var(--s2); }
.empty__title { font-weight: 600; font-size: var(--fs-lg); }
.empty__text { color: var(--muted); max-width: 46ch; }
.empty .btn { margin-top: var(--s4); }

/* ---------- Шторка ---------- */
.sheet { position: fixed; inset: 0; z-index: var(--z-sheet); }
.sheet[hidden] { display: none; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(20, 24, 21, .5); opacity: 0; transition: opacity var(--dur) var(--ease); }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: 18px 18px 0 0; transform: translateY(100%); transition: transform 260ms var(--ease); padding-bottom: env(safe-area-inset-bottom); }
.sheet__panel:focus { outline: none; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet.is-open .sheet__panel { transform: none; }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: var(--s2) auto 0; }
.sheet__head { display: flex; justify-content: space-between; align-items: center; padding: var(--s2) var(--s2) var(--s2) var(--s5); border-bottom: 1px solid var(--line); }
.sheet__head h2 { font-size: var(--fs-lg); }
.sheet__body { overflow-y: auto; padding: var(--s5); }
.sheet__foot { display: flex; gap: var(--s3); padding: var(--s4) var(--s5); border-top: 1px solid var(--line); }
.sheet__foot .btn { flex: 1; }

/* ---------- Диалог ---------- */
.dialog { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-3); color: var(--ink); }
.dialog::backdrop { background: rgba(20, 24, 21, .5); }
.dialog__body { padding: var(--s6); }
.dialog__body h2 { font-size: var(--fs-xl); margin-bottom: var(--s2); }
.dialog__body p { color: var(--ink-2); }
.dialog__foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--s3); padding: var(--s4) var(--s6); background: var(--bg); border-top: 1px solid var(--line); }

/* ---------- Тосты ---------- */
.toasts { position: fixed; z-index: var(--z-toast); left: 50%; bottom: max(var(--s4), env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: var(--s2); width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--ink); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-3); font-size: var(--fs-sm); opacity: 0; transform: translateY(8px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.toast.is-in { opacity: 1; transform: none; }
.toast .icon { color: #9FD3AF; width: 18px; height: 18px; margin-top: 1px; }
.toast--error { background: var(--danger); }
.toast--error .icon { color: #fff; }

/* ---------- Глоссарий статусов, видимость ---------- */
.status-table { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.status-row { display: grid; gap: var(--s2); padding: var(--s5); background: var(--surface); }
@media (min-width: 768px) { .status-row { grid-template-columns: 240px 1fr 1fr; gap: var(--s6); align-items: start; } }
.status-row__when { color: var(--ink-2); }
.status-row__req { color: var(--muted); font-size: var(--fs-sm); }
.status-row__req b { color: var(--ink-2); font-weight: 600; display: block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
@media (min-width: 768px) { .status-row__req b { display: none; } }
.status-head { display: none; }
@media (min-width: 768px) { .status-head { display: grid; grid-template-columns: 240px 1fr 1fr; gap: var(--s6); padding: var(--s3) var(--s5); background: var(--bg-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); } }

.vis-grid { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .vis-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s5); } }
.vis { padding: var(--s6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: var(--s3); align-content: start; }
.vis__head { display: flex; align-items: center; gap: var(--s3); }
.vis__head .icon { width: 22px; height: 22px; color: var(--primary); }
.vis__title { font-weight: 700; }
.vis p { color: var(--ink-2); font-size: var(--fs-md); }
.vis ul { list-style: none; display: grid; gap: var(--s2); font-size: var(--fs-sm); color: var(--muted); padding-top: var(--s3); border-top: 1px solid var(--line); }
.vis li { display: flex; gap: var(--s2); }
.vis li .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--primary); }
.vis li.is-no .icon { color: var(--muted); }

.flow { list-style: none; display: grid; gap: var(--s2); }
@media (min-width: 900px) { .flow { grid-template-columns: repeat(5, 1fr); gap: 0; } }
.flow li { position: relative; padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; font-size: var(--fs-sm); display: flex; gap: var(--s3); align-items: center; }
@media (min-width: 900px) {
  .flow li { border-radius: 0; border-right-width: 0; justify-content: center; text-align: center; min-height: 72px; }
  .flow li:first-child { border-radius: var(--radius) 0 0 var(--radius); }
  .flow li:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-right-width: 1px; }
}
.flow__n { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--green-50); color: var(--primary); font-size: 12px; display: grid; place-items: center; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 64px; padding-block: var(--s4); cursor: pointer; font-weight: 600; font-size: var(--fs-lg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--muted); transition: transform var(--dur) var(--ease); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq__a { padding-bottom: var(--s6); color: var(--ink-2); max-width: 68ch; }

/* ---------- Совет ---------- */
.people { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .people { grid-template-columns: repeat(3, 1fr); } }
.person { padding: var(--s6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: flex; gap: var(--s4); align-items: center; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--primary); font-weight: 700; }
.person__name { font-weight: 600; }
.person__role { font-size: var(--fs-sm); color: var(--muted); }
.groups { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .groups { grid-template-columns: repeat(2, 1fr); gap: var(--s5); } }
.group-card { padding: var(--s6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: var(--s4); align-content: start; }
.group-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.group-card__code { font-family: var(--mono); font-weight: 500; color: var(--muted); font-size: 13px; }
.group-card h3 { margin-top: var(--s1); }
.group-card__goal { color: var(--ink-2); }
.group-card__members { font-size: var(--fs-sm); color: var(--muted); }
.group-card__links { display: flex; flex-wrap: wrap; gap: var(--s2); }

.principles { display: grid; gap: var(--s4); }
@media (min-width: 768px) { .principles { grid-template-columns: repeat(2, 1fr); gap: var(--s5); } }
@media (min-width: 1100px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principle { padding: var(--s6); border-top: 2px solid var(--primary); background: var(--surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg); border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle h3 { font-size: var(--fs-lg); margin-bottom: var(--s2); }
.principle p { color: var(--muted); }

/* ---------- Заседания и прецеденты ---------- */
.meeting { padding: var(--s6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: var(--s5); scroll-margin-top: calc(var(--header-h) + 24px); }
@media (min-width: 768px) { .meeting { padding: var(--s8); grid-template-columns: 200px 1fr; gap: var(--s8); } }
.meeting--upcoming { border-color: var(--primary); background: linear-gradient(0deg, var(--surface), var(--surface)); box-shadow: 0 0 0 3px var(--green-50); }
.meeting__date { display: grid; gap: var(--s1); align-content: start; }
.meeting__n { font-family: var(--mono); font-weight: 500; color: var(--muted); font-size: 13px; }
.meeting__day { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.meeting__time { color: var(--muted); font-size: var(--fs-sm); }
.meeting__body { display: grid; gap: var(--s5); min-width: 0; }
.meeting__agenda { padding-left: 1.2em; display: grid; gap: var(--s1); color: var(--ink-2); }
.minutes summary { cursor: pointer; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; list-style: none; }
.minutes summary::-webkit-details-marker { display: none; }
.minutes summary .icon { width: 18px; transition: transform var(--dur) var(--ease); }
.minutes[open] summary .icon { transform: rotate(180deg); }
.minutes__text { padding: var(--s4) var(--s5); border-left: 3px solid var(--line-2); color: var(--ink-2); background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; }

.precedent { padding: var(--s6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: var(--s5); }
@media (min-width: 768px) { .precedent { padding: var(--s8); } }
.precedent__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); }
.precedent__num { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.precedent__grid { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .precedent__grid { grid-template-columns: repeat(3, 1fr); gap: var(--s6); } }
.precedent__grid p { color: var(--ink-2); }
.pill-static { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }
.pill-static--muted { background: var(--bg-2); color: var(--ink-2); border-color: var(--line); }

/* ---------- Статистика ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); gap: var(--s4); } }
.kpi { padding: var(--s5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.kpi__value { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi__label { margin-top: var(--s2); font-size: var(--fs-sm); color: var(--muted); hyphens: auto; overflow-wrap: break-word; }
.kpi--accent .kpi__value { color: var(--primary); }
.bars { list-style: none; display: grid; gap: var(--s3); }
.bars li { display: grid; grid-template-columns: minmax(0, 190px) 1fr 32px; gap: var(--s3); align-items: center; font-size: var(--fs-sm); }
.bars__track { height: 12px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.bars__fill { height: 100%; border-radius: 6px; background: var(--primary); }
.bars__val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.panel { padding: var(--s6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
@media (min-width: 768px) { .panel { padding: var(--s8); } }
.panel h2, .panel h3 { font-size: var(--fs-xl); margin-bottom: var(--s5); }
.two-col { display: grid; gap: var(--s5); }
@media (min-width: 1024px) { .two-col { grid-template-columns: 1.4fr 1fr; } }

/* ---------- Страница автора ---------- */
.author-raw { padding: var(--s5); border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); white-space: pre-wrap; color: var(--ink-2); }
.thread { list-style: none; display: grid; gap: var(--s3); }
.msg { max-width: 88%; padding: var(--s3) var(--s4); border-radius: var(--radius-lg); background: var(--bg-2); }
.msg--author { margin-left: auto; background: var(--green-50); border: 1px solid var(--green-100); }
.msg__meta { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 2px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-block: var(--s20); max-width: 560px; margin-inline: auto; }
.notfound__code { font-size: 4rem; font-weight: 700; color: var(--green-100); letter-spacing: -0.04em; line-height: 1; margin-bottom: var(--s4); }
.notfound .lead { margin: var(--s4) auto 0; }
.notfound .btn-row { justify-content: center; margin-top: var(--s8); }

/* ==========================================================================
   Админка
   ========================================================================== */
.admin { display: grid; min-height: calc(100dvh - var(--header-h)); }
@media (min-width: 1024px) { .admin { grid-template-columns: 260px minmax(0, 1fr); } }
.admin__side { background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--s4) var(--gutter); }
@media (min-width: 1024px) { .admin__side { border-bottom: 0; border-right: 1px solid var(--line); padding: var(--s6) var(--s4); position: sticky; top: var(--header-h); height: calc(100dvh - var(--header-h)); overflow-y: auto; } }
.admin__user { display: flex; gap: var(--s3); align-items: center; padding: var(--s3); border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.admin__user .avatar { width: 40px; height: 40px; font-size: var(--fs-sm); }
.admin__user-name { font-weight: 600; font-size: var(--fs-sm); line-height: 1.3; }
.admin__user-role { font-size: var(--fs-xs); color: var(--muted); }
.admin__nav { list-style: none; display: none; gap: 2px; margin-top: var(--s5); }
@media (min-width: 1024px) { .admin__nav { display: grid; } .admin__mnav { display: none; } }
.admin__nav a { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 0 var(--s3); border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); }
.admin__nav a:hover { background: var(--bg-2); color: var(--ink); }
.admin__nav a[aria-current="page"] { background: var(--green-50); color: var(--primary); font-weight: 600; }
.admin__nav .icon { width: 18px; height: 18px; }
.admin__nav .count { margin-left: auto; font-size: 12px; font-weight: 600; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.admin__nav .count--alert { background: var(--danger); color: #fff; }
.admin__mnav { margin-top: var(--s3); }
.admin__sep { height: 1px; background: var(--line); margin: var(--s3) 0; }
.admin__main { padding: var(--s8) var(--gutter) var(--s16); min-width: 0; }
@media (min-width: 1024px) { .admin__main { padding: var(--s10) var(--s10) var(--s16); } }
.admin__title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s4); margin-bottom: var(--s8); }
.admin__title h1 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem); }
.admin__title p { color: var(--muted); margin-top: var(--s2); }

.widgets { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .widgets { grid-template-columns: repeat(4, 1fr); gap: var(--s4); } }
.widget { position: relative; display: grid; gap: var(--s2); padding: var(--s5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.widget:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); color: var(--ink); }
.widget__value { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.widget__label { font-weight: 600; font-size: var(--fs-sm); hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 599px) { .widget { padding: var(--s4); } }
.widget__hint { font-size: var(--fs-xs); color: var(--muted); }
.widget--alert { border-color: #E9C2C3; background: #FFF8F8; }
.widget--alert .widget__value { color: var(--danger); }
.widget--zero .widget__value { color: var(--subtle); }

.atable { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; font-size: var(--fs-sm); }
.atable th { text-align: left; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--bg); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.atable td { padding: var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; }
.atable tr:last-child td { border-bottom: 0; }
.atable tbody tr { transition: background-color var(--dur) var(--ease); }
.atable tbody tr:hover { background: var(--bg); }
.atable__num { font-family: var(--mono); font-weight: 600; color: var(--ink); white-space: nowrap; }
.atable__num a { color: var(--ink); }
.atable__title a { color: var(--ink); font-weight: 600; text-decoration: none; }
.atable__title a:hover { text-decoration: underline; }
.atable__sub { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--danger); }
.flag .icon { width: 14px; height: 14px; }
.flag--muted { color: var(--muted); }
/* на мобильном таблица превращается в карточки — без горизонтального скролла */
@media (max-width: 899px) {
  .atable, .atable tbody, .atable tr, .atable td { display: block; width: 100%; }
  .atable thead { display: none; }
  .atable { border: 0; background: transparent; }
  .atable tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s4); margin-bottom: var(--s3); display: grid; gap: var(--s2); }
  .atable td { padding: 0; border: 0; }
  .atable td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
}

.admin-case { display: grid; gap: var(--s6); }
@media (min-width: 1200px) { .admin-case { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s8); align-items: start; } }
.admin-case__aside { display: grid; gap: var(--s4); }
@media (min-width: 1200px) { .admin-case__aside { position: sticky; top: calc(var(--header-h) + var(--s6)); } }
.acard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s6); display: grid; gap: var(--s5); }
.acard__head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.acard__head h2 { font-size: var(--fs-lg); display: flex; align-items: center; gap: var(--s2); }
.acard__head h2 .icon { color: var(--primary); }
.acard--private { border-color: #EFDDB6; background: #FFFCF5; }
.acard--private .acard__head h2 .icon { color: var(--warn-ink); }
.kv { display: grid; grid-template-columns: 1fr; gap: var(--s3); font-size: var(--fs-sm); }
@media (min-width: 640px) { .kv { grid-template-columns: 160px 1fr; gap: var(--s3) var(--s4); } }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.form-row { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.toggle { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); cursor: pointer; min-height: 44px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--primary); }
.req-hint { font-size: var(--fs-xs); color: var(--muted); padding: var(--s3) var(--s4); border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.comment-list { list-style: none; display: grid; gap: var(--s3); font-size: var(--fs-sm); }
.comment-list li { padding: var(--s3) var(--s4); border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.comment-list__meta { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 2px; }
.history-list .timeline__text { font-size: var(--fs-sm); }
.history-list .private-tag { font-size: 11px; font-weight: 600; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid #EFDDB6; padding: 1px 6px; border-radius: 4px; }

.login { max-width: 640px; margin: var(--s12) auto var(--s20); padding-inline: var(--gutter); }
.login__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s8) var(--s6); display: grid; gap: var(--s6); }
@media (min-width: 768px) { .login__card { padding: var(--s10); } }
.roles { display: grid; gap: var(--s3); }
.role-btn { display: flex; align-items: center; gap: var(--s4); width: 100%; padding: var(--s4); border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); text-align: left; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.role-btn:hover { border-color: var(--primary); background: var(--green-50); }
.role-btn .avatar { width: 40px; height: 40px; font-size: var(--fs-sm); }
.role-btn__name { font-weight: 600; }
.role-btn__role { font-size: var(--fs-sm); color: var(--muted); }
.role-btn > .icon { margin-left: auto; color: var(--muted); }

/* ---------- Движение ---------- */
.fade-in { animation: fadeIn 260ms var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }


@media print {
  .header, .footer, .beta, .aside-actions, .btn { display: none !important; }
  body { background: #fff; }
}


/* ==========================================================================
   Главная: журнал, факты, процесс, результаты, ссылки
   ========================================================================== */
.hero__main { padding-bottom: var(--s4); }
.hero__lead { color: var(--ink-2); }

.ledger { background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius-lg); overflow: hidden; }
.ledger__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s1) var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--ink); }
.ledger__title { font-size: var(--fs-md); font-weight: 700; letter-spacing: -0.01em; }
.ledger__note { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ledger__list { list-style: none; }
@media (max-width: 899px) { .ledger__row:nth-child(n+5) { display: none; } }
.ledger__row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); transition: background-color var(--dur) var(--ease); }
.ledger__row:hover { background: var(--bg); }
.ledger__date { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.ledger__body { display: grid; gap: var(--s2); justify-items: start; min-width: 0; }
.ledger__link { color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.4; }
.ledger__link:hover { color: var(--ink); text-decoration: underline; }
.ledger__num { font-family: var(--mono); font-size: 13px; font-weight: 600; margin-right: var(--s2); }
.ledger__more { display: flex !important; justify-content: space-between; padding: var(--s4) var(--s5); font-weight: 600; font-size: var(--fs-sm); color: var(--ink); text-decoration: none; }
.ledger__more:hover { background: var(--bg); color: var(--ink); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: var(--s12) 0 0; border-top: 1px solid var(--ink); }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, 1fr); margin-top: var(--s16); } }
.facts__item { padding: var(--s5) var(--s4) var(--s6) 0; border-bottom: 1px solid var(--line); }
.facts__item:nth-child(even) { padding-left: var(--s4); border-left: 1px solid var(--line); }
@media (min-width: 900px) {
  .facts__item { border-bottom: 0; padding: var(--s6) var(--s6) var(--s10); }
  .facts__item:first-child { padding-left: 0; }
  .facts__item + .facts__item { border-left: 1px solid var(--line); }
}
.facts dt { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.facts dd { order: -1; margin: 0; font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.facts dd small { font-size: .45em; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.facts__item { display: flex; flex-direction: column; gap: var(--s2); }

.process { background: var(--brand); color: #E3EAE3; padding-block: var(--s16); }
@media (min-width: 1024px) { .process { padding-block: var(--s20); } }
.process__head { display: grid; gap: var(--s3); margin-bottom: var(--s10); }
@media (min-width: 900px) { .process__head { grid-template-columns: 1fr 1fr; align-items: end; gap: var(--s8); margin-bottom: var(--s12); } }
.process h2 { color: #fff; }
.process__head p { color: #C5D2C6; font-size: var(--fs-lg); max-width: 40ch; }
@media (min-width: 900px) { .process__head p { justify-self: end; text-align: right; } }
.process__steps { list-style: none; display: grid; gap: 0; }
@media (min-width: 900px) { .process__steps { grid-template-columns: repeat(5, 1fr); } }
.process__step { display: grid; grid-template-columns: 48px 1fr; gap: 2px var(--s3); padding: var(--s5) 0; border-top: 1px solid rgba(255,255,255,.22); }
@media (min-width: 900px) { .process__step { grid-template-columns: 1fr; gap: var(--s2); padding: var(--s5) var(--s6) 0 0; } }
.process__n { grid-row: span 2; font-family: var(--mono); font-size: 13px; color: #A9BAAA; padding-top: 3px; }
@media (min-width: 900px) { .process__n { grid-row: auto; margin-bottom: var(--s6); } }
.process__title { color: #fff; font-weight: 650; font-size: var(--fs-lg); letter-spacing: -0.01em; line-height: 1.3; }
.process__text { color: #C5D2C6; font-size: var(--fs-sm); }

.link-arrow { display: inline-flex !important; align-items: center; gap: var(--s2); min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.link-arrow:hover { color: var(--ink); text-decoration: underline; }

.results { list-style: none; border-top: 1px solid var(--line); }
.results__row { position: relative; display: grid; grid-template-columns: 1fr; gap: var(--s2) var(--s6); padding: var(--s5) 0; border-bottom: 1px solid var(--line); transition: background-color var(--dur) var(--ease); }
@media (min-width: 900px) { .results__row { grid-template-columns: 120px minmax(0, 1fr) 180px; align-items: start; padding: var(--s6) 0; } }
.results__row:hover { background: var(--surface); }
.results__num { font-family: var(--mono); font-size: 13px; font-weight: 600; padding-top: 4px; }
.results__title { font-size: var(--fs-xl); line-height: 1.3; letter-spacing: -0.02em; font-weight: 650; }
.results__title a { color: var(--ink); text-decoration: none; }
.results__row:hover .results__title a { text-decoration: underline; }
.results__text { margin-top: var(--s2); color: var(--muted); max-width: 70ch; }
@media (min-width: 900px) { .results__status { justify-self: end; padding-top: 2px; } }

.links { list-style: none; display: grid; }
@media (min-width: 900px) { .links { grid-template-columns: repeat(3, 1fr); } }
.links__item { position: relative; padding: var(--s6) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .links__item { padding: var(--s2) var(--s8) var(--s4) 0; border-bottom: 0; } .links__item + .links__item { padding-left: var(--s8); border-left: 1px solid var(--line); } }
.links__title { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); font-size: var(--fs-xl); letter-spacing: -0.02em; }
.links__title a { color: var(--ink); text-decoration: none; }
.links__title .icon { color: var(--brand); transition: transform var(--dur) var(--ease); }
.links__item:hover .links__title .icon { transform: translateX(4px); }
.links__item:hover .links__title a { text-decoration: underline; }
.links__text { margin-top: var(--s3); color: var(--muted); max-width: 40ch; }


/* ==========================================================================
   Движение
   ========================================================================== */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);   /* мягкое торможение */
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* появление при прокрутке */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 600ms var(--ease-out) var(--d, 0ms), transform 700ms var(--ease-out) var(--d, 0ms),
              border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.ledger__row.reveal { transform: translateX(10px); }
.ledger__row.reveal.is-in { transform: none; }

/* переход между страницами */
.page-enter { animation: pageIn 420ms var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* первая загрузка: заголовок выезжает построчно, логотип проявляется слева направо */
.is-first-load .hero__title .line > span { animation: lineUp 900ms var(--ease-out) both; }
.is-first-load .hero__title .line:nth-child(2) > span { animation-delay: 90ms; }
.is-first-load .hero .kicker,
.is-first-load .hero__lead,
.is-first-load .hero__actions,
.is-first-load .hero__find { animation: fadeUp 800ms var(--ease-out) both; }
.is-first-load .hero .kicker { animation-delay: 0ms; }
.is-first-load .hero__lead { animation-delay: 220ms; }
.is-first-load .hero__actions { animation-delay: 300ms; }
.is-first-load .hero__find { animation-delay: 380ms; }
.is-first-load .ledger { animation: fadeUp 900ms var(--ease-out) 250ms both; }
.is-first-load .brand__logo { animation: wipe 900ms var(--ease-out) 100ms both; }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* шапка при прокрутке */
.header { transition: box-shadow 250ms var(--ease), background-color 250ms var(--ease); }
.header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(27, 31, 28, .25); }

/* статус на странице обращения ставится как штамп */
.case-page__status .badge--lg { animation: stamp 520ms var(--ease-spring) 180ms both; }
@keyframes stamp {
  0% { opacity: 0; transform: scale(1.35) rotate(-4deg); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

/* полоса статуса на карточке и стрелки реагируют на наведение */
.rcard { transition: border-color var(--dur) var(--ease), box-shadow 250ms var(--ease-out); }
.rcard:hover { box-shadow: inset 6px 0 0 var(--tone); }
.rcard__next .icon { transition: transform 250ms var(--ease-out); }
.rcard:hover .rcard__next .icon { transform: translateX(3px); }
.link-arrow .icon, .ledger__more .icon { transition: transform 250ms var(--ease-out); }
.link-arrow:hover .icon, .ledger__more:hover .icon { transform: translateX(4px); }

/* шаги процесса: линия прорисовывается слева направо */
.process__step { position: relative; border-top-color: transparent; }
.process__step::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: rgba(255,255,255,.28); transform-origin: left; }
.process__step.reveal::before { transform: scaleX(0); }
.process__step.reveal.is-in::before { transform: none; transition: transform 900ms var(--ease-out) var(--d, 0ms); }

/* хронология: точка «загорается» */
.timeline__item.reveal .timeline__dot { transform: scale(.4); }
.timeline__item.reveal.is-in .timeline__dot { transform: none; transition: transform 500ms var(--ease-spring) calc(var(--d, 0ms) + 120ms); }
.timeline__item.is-current .timeline__dot::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--primary); opacity: 0; animation: ping 2.4s var(--ease-out) 1s 2; }
@keyframes ping { 0% { opacity: .6; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }

/* голосование и столбики растут, когда попадают в экран */
.reveal .vote__bar, .panel.reveal .bars__fill { clip-path: inset(0 100% 0 0); }
.reveal.is-in .vote__bar, .panel.reveal.is-in .bars__fill { clip-path: inset(0 0 0 0); transition: clip-path 1100ms var(--ease-out) calc(var(--d, 0ms) + 200ms); }

/* раскрытие протоколов и вопросов — плавно (где браузер поддерживает) */
:root { interpolate-size: allow-keywords; }
.faq details::details-content, .minutes::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size 350ms var(--ease-out), content-visibility 350ms allow-discrete;
}
.faq details[open]::details-content, .minutes[open]::details-content { block-size: auto; }

/* галочка на экране успеха прорисовывается */
.icon.draw path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 600ms var(--ease-out) 250ms forwards; }
.success__icon { animation: pop 500ms var(--ease-spring) both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* выбор типа обращения: иконка слегка подпрыгивает */
.choice input:checked + .choice__box .icon { animation: nudge 420ms var(--ease-spring); }
@keyframes nudge { 0% { transform: scale(.8); } 100% { transform: none; } }

/* «Уменьшить движение»: никаких сдвигов, масштабов и прорисовки —
   остаются только короткие проявления по прозрачности */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .ledger__row.reveal { transform: none !important; }
  .reveal.is-in { transition: opacity 450ms ease var(--d, 0ms) !important; }
  .page-enter,
  .is-first-load .hero__title .line > span,
  .is-first-load .hero .kicker, .is-first-load .hero__lead, .is-first-load .hero__actions,
  .is-first-load .hero__find, .is-first-load .ledger,
  .case-page__status .badge--lg, .success__icon { animation-name: fadeOnly !important; animation-duration: 450ms !important; }
  .is-first-load .brand__logo, .choice input:checked + .choice__box .icon, .timeline__item.is-current .timeline__dot::after { animation: none !important; }
  .process__step.reveal::before, .timeline__item.reveal .timeline__dot { transform: none !important; transition: none !important; }
  .reveal .vote__bar, .panel.reveal .bars__fill { clip-path: none !important; transition: none !important; }
  .icon.draw path { stroke-dashoffset: 0; animation: none; }
  .drawer__panel, .sheet__panel, .toast, .btn, .rcard__next .icon, .link-arrow .icon, .tile__more .icon, .links__title .icon { transition-property: opacity, background-color, border-color, color !important; }
  .faq details::details-content, .minutes::details-content { transition: none; }
}
@keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }



/* ==========================================================================
   Мероприятие 23 октября — тёмная праздничная тема
   ========================================================================== */
:root {
  --e-bg: #121212;
  --e-bg-2: #171717;
  --e-surface: #1C1C1C;
  --e-line: #2E2E2E;
  --e-line-2: #3D3D3D;
  --e-text: #F4F1EC;
  --e-muted: #B3AEA6;   /* 8.6:1 на фоне */
  --e-orange: #FF7518;
  --e-orange-2: #FF9F43;
  --e-error: #FF8A80;
}

/* вкладка в меню */
.nav__link--event { gap: 6px; color: var(--e-orange-2) !important; background: var(--e-bg); border-radius: var(--radius) !important; padding: 0 var(--s3); min-height: 36px; align-self: center; font-weight: 600; box-shadow: none !important; }
.nav__link--event:hover { background: #262626; color: var(--e-orange-2); }
.nav__link--event .icon { width: 16px; height: 16px; }
.nav__link--event[aria-current="page"] { background: var(--e-orange); color: var(--e-bg) !important; }
.drawer__list a.drawer__event { background: var(--e-bg); color: var(--e-orange-2); font-weight: 600; }
.drawer__list a.drawer__event span { display: inline-flex; align-items: center; gap: 8px; }
.drawer__list a.drawer__event:hover { background: #262626; }

/* шапка на странице мероприятия */
body[data-theme="event"] { background: var(--e-bg); }
body[data-theme="event"] .header { background: rgba(18, 18, 18, .9); border-bottom-color: var(--e-line); }
body[data-theme="event"] .header.is-scrolled { box-shadow: 0 1px 0 var(--e-line), 0 8px 24px -16px rgba(0,0,0,.8); }
body[data-theme="event"] .brand, body[data-theme="event"] .brand:hover { color: var(--e-text); }
body[data-theme="event"] .brand__logo { filter: brightness(0) invert(1); }
body[data-theme="event"] .brand__text { border-left-color: var(--e-line-2); }
body[data-theme="event"] .brand__sub { color: var(--e-muted); }
body[data-theme="event"] .nav__link { color: #D6D1C9; }
body[data-theme="event"] .nav__link:hover { background: #1F1F1F; color: #fff; }
body[data-theme="event"] .icon-btn { color: var(--e-text); }
body[data-theme="event"] .icon-btn:hover { background: #1F1F1F; }

/* каркас страницы */
.event { position: relative; overflow: hidden; background: var(--e-bg); color: var(--e-text); }
.event h1, .event h2, .event h3 { color: #fff; }
.event a { color: var(--e-orange-2); }
.event .muted { color: var(--e-muted); }

/* падающие листья: только в верхней части, медленно и редко */
.event__leaves { position: absolute; inset: 0 0 auto 0; height: 100vh; max-height: 980px; pointer-events: none; overflow: hidden; z-index: 0; }
.leaf { display: block; }
.leaf--fall { position: absolute; top: -40px; width: var(--size, 24px); height: var(--size, 24px); opacity: .45; animation: leafFall var(--dur, 18s) linear var(--delay, 0s) infinite; }
@keyframes leafFall {
  0% { transform: translate3d(0, -40px, 0) rotate(0deg); }
  25% { transform: translate3d(28px, 25vh, 0) rotate(90deg); }
  50% { transform: translate3d(-18px, 50vh, 0) rotate(180deg); }
  75% { transform: translate3d(22px, 75vh, 0) rotate(270deg); }
  100% { transform: translate3d(0, 105vh, 0) rotate(360deg); opacity: 0; }
}

/* кнопки мероприятия */
.ebtn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5); border-radius: var(--radius); border: 1px solid var(--e-line-2);
  background: transparent; color: var(--e-text); font-weight: 600; font-size: var(--fs-md); text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform 120ms var(--ease);
  touch-action: manipulation;
}
.ebtn:hover { border-color: var(--e-text); color: #fff; }
.ebtn:active { transform: scale(.98); }
.ebtn--primary { background: var(--e-orange); border-color: var(--e-orange); color: var(--e-bg) !important; }
.ebtn--primary:hover { background: var(--e-orange-2); border-color: var(--e-orange-2); color: var(--e-bg); }
.ebtn--ghost { border-color: transparent; color: var(--e-orange-2); }
.ebtn--ghost:hover { border-color: var(--e-line-2); color: var(--e-orange-2); }
.ebtn--lg { min-height: 56px; padding: 0 var(--s6); font-size: var(--fs-lg); }
.ebtn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.ebtn .spinner { border-color: currentColor; border-right-color: transparent; }

/* главный экран */
.ehero { position: relative; z-index: 1; padding-block: var(--s12) var(--s16); }
@media (min-width: 1024px) { .ehero { padding-block: var(--s20) var(--s20); } }
.ehero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s10); align-items: center; }
@media (min-width: 900px) { .ehero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--s12); } }
.ehero__kicker { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s6); font-family: var(--mono); font-size: 13px; color: var(--e-muted); }
.ehero__kicker img { width: 44px; height: auto; }
.ehero__kicker span { padding-left: var(--s3); border-left: 1px solid var(--e-line-2); }
.ehero__title { font-size: clamp(2.75rem, 1rem + 6.2vw, 5.75rem); line-height: .94; letter-spacing: -0.045em; font-weight: 800; text-transform: uppercase; }
.ehero__title .line { display: block; overflow: hidden; padding-bottom: .05em; margin-bottom: -.05em; }
.ehero__title .line > span { display: block; animation: lineUp 900ms var(--ease-out) both; }
.ehero__title .line:nth-child(2) > span { animation-delay: 90ms; }
.ehero__title .line:nth-child(3) > span { animation-delay: 180ms; }
.ehero__title em { font-style: normal; color: var(--e-orange); }
.ehero__lead { margin-top: var(--s6); max-width: 46ch; font-size: var(--fs-lg); color: #D6D1C9; animation: fadeUp 800ms var(--ease-out) 260ms both; }
@media (min-width: 768px) { .ehero__lead { font-size: var(--fs-xl); } }
.ehero__actions { margin-top: var(--s8); display: flex; flex-wrap: wrap; gap: var(--s3); animation: fadeUp 800ms var(--ease-out) 340ms both; }
.ehero__actions .ebtn { flex: 1 1 220px; }
@media (min-width: 560px) { .ehero__actions .ebtn { flex: 0 0 auto; } }
.ehero__count { margin-top: var(--s6); font-family: var(--mono); font-size: 13px; color: var(--e-muted); animation: fadeUp 800ms var(--ease-out) 420ms both; }
.ehero__count-n { color: var(--e-orange); font-weight: 600; font-size: 15px; }

.ehero__art { position: relative; width: min(100%, 420px); aspect-ratio: 1; justify-self: center; animation: fadeUp 1000ms var(--ease-out) 200ms both; }
@media (max-width: 899px) { .ehero__art { width: 128px; order: -1; justify-self: start; margin: 0 0 var(--s4) -12px; } .ehero__grid { gap: 0; } .ehero { padding-top: var(--s6); } }
.ehero__disc { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #3B523D 0%, #2B3D2D 55%, #1B261C 100%); box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 40px 120px -40px rgba(255, 117, 24, .45); }
.pumpkin { position: absolute; left: 16%; right: 16%; top: 22%; width: 68%; height: auto; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 24px 30px rgba(0,0,0,.45)); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.ehero__art .leaf { position: absolute; }
.leaf--a { width: 22%; top: 2%; right: 6%; color: var(--e-orange); transform: rotate(24deg); animation: sway 7s ease-in-out infinite; }
.leaf--b { width: 14%; bottom: 10%; left: 2%; color: var(--e-orange-2); transform: rotate(-30deg); animation: sway 8s ease-in-out -2s infinite; }
.leaf--c { width: 12%; top: 18%; left: 4%; color: #C45A12; transform: rotate(-12deg); animation: sway 9s ease-in-out -4s infinite; }
@keyframes sway { 0%, 100% { rotate: 0deg; } 50% { rotate: 10deg; } }

/* информационный блок */
.einfo { position: relative; z-index: 1; padding-bottom: var(--s16); }
.einfo__box { display: grid; gap: var(--s4); padding: var(--s6); border: 1px solid var(--e-line); border-left: 3px solid var(--e-orange); border-radius: var(--radius-lg); background: var(--e-surface); }
@media (min-width: 900px) { .einfo__box { grid-template-columns: 200px 1fr; padding: var(--s8); gap: var(--s8); align-items: start; } }
.einfo__badge { display: inline-flex; align-items: center; gap: var(--s2); font-family: var(--mono); font-size: 13px; color: var(--e-orange-2); }
.einfo__badge .icon { width: 18px; height: 18px; }
.einfo p { font-size: var(--fs-lg); line-height: 1.6; color: #E6E1D8; max-width: 62ch; }

/* секции с формами */
.esection { position: relative; z-index: 1; padding-block: var(--s16); border-top: 1px solid var(--e-line); }
@media (min-width: 1024px) { .esection { padding-block: var(--s20); } }
.esection--alt { background: var(--e-bg-2); }
.esection__grid { display: grid; gap: var(--s8); align-items: start; }
@media (min-width: 1024px) { .esection__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s12); } .erules { position: sticky; top: calc(var(--header-h) + var(--s6)); margin-top: 108px; } }
@media (min-width: 1024px) { .esection__grid--wish { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.esection__n { font-family: var(--mono); font-size: 13px; color: var(--e-orange-2); margin-bottom: var(--s3); }
.esection h2 { font-size: var(--fs-h2); }
.esection__lead { margin-top: var(--s3); margin-bottom: var(--s8); color: var(--e-muted); font-size: var(--fs-lg); max-width: 48ch; }
.esection__grid--wish .esection__lead { margin-bottom: 0; }
.ecard { background: var(--e-surface); border: 1px solid var(--e-line); border-radius: var(--radius-lg); padding: var(--s6) var(--s5); }
@media (min-width: 768px) { .ecard { padding: var(--s8); } }

/* тёмные поля формы */
.event .field__label, .event legend.field__label { color: var(--e-text); }
.event .field__opt, .event .field__help, .event .field__count { color: var(--e-muted); }
.event .field__req { color: var(--e-orange-2); }
.event .field__error { color: var(--e-error); }
.event .field__count.is-over { color: var(--e-error); }
.event .input, .event .textarea, .event .select { background: var(--e-bg); border-color: var(--e-line-2); color: var(--e-text); }
.event .input::placeholder, .event .textarea::placeholder { color: #8A857D; }
.event .input:hover, .event .textarea:hover { border-color: #5A5A5A; }
.event .input:focus, .event .textarea:focus { border-color: var(--e-orange); box-shadow: 0 0 0 3px rgba(255, 117, 24, .22); }
.event .field.has-error .input, .event .field.has-error .textarea { border-color: var(--e-error); }
.event .pill span { background: var(--e-bg); border-color: var(--e-line-2); color: #E6E1D8; }
.event .pill input:hover + span { border-color: #6A6A6A; }
.event .pill input:checked + span { background: var(--e-orange); border-color: var(--e-orange); color: var(--e-bg); }
.event :focus-visible { outline-color: var(--e-orange-2); }
.eform { display: grid; gap: var(--s6); }
.eform__row { display: grid; gap: var(--s6); }
@media (min-width: 640px) { .eform__row { grid-template-columns: 1fr 1fr; gap: var(--s5); } }
.eform__submit { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); padding-top: var(--s2); }
.eform__submit p { font-size: var(--fs-sm); color: var(--e-muted); max-width: 36ch; }
@media (max-width: 559px) { .eform__submit .ebtn { width: 100%; } }

/* правила отбора */
.erules { border: 1px solid var(--e-line); border-radius: var(--radius-lg); padding: var(--s6); background: var(--e-bg); }
.erules h3 { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-lg); margin-bottom: var(--s5); }
.erules h3 .icon { color: var(--e-orange-2); }
.erules ol { list-style: none; counter-reset: rule; display: grid; gap: var(--s4); }
.erules li { counter-increment: rule; display: grid; grid-template-columns: 28px 1fr; gap: var(--s2); font-size: var(--fs-sm); line-height: 1.55; color: #D6D1C9; }
.erules li::before { content: counter(rule, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--e-orange-2); padding-top: 2px; }
.erules__note { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--e-line); font-size: var(--fs-sm); color: var(--e-muted); }

/* состояния */
.esuccess { display: grid; justify-items: center; text-align: center; gap: var(--s4); padding: var(--s8) var(--s4); outline: none; }
.esuccess__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--e-orange); color: var(--e-bg); animation: pop 500ms var(--ease-spring) both; }
.esuccess__icon .icon { width: 32px; height: 32px; stroke-width: 2.4; }
.esuccess__text { font-size: var(--fs-xl); font-weight: 650; letter-spacing: -0.02em; color: #fff; max-width: 30ch; }
.eclosed { display: flex; gap: var(--s3); padding: var(--s5); border: 1px dashed var(--e-line-2); border-radius: var(--radius-lg); color: var(--e-muted); }
.eclosed .icon { color: var(--e-orange-2); margin-top: 2px; }
.eclosed__title { color: #fff; font-weight: 600; margin-bottom: 2px; }
.eclosed--big { padding: var(--s8); font-size: var(--fs-lg); }

.eprivacy { position: relative; z-index: 1; border-top: 1px solid var(--e-line); padding-block: var(--s8); }
.eprivacy__inner { display: flex; gap: var(--s3); align-items: flex-start; color: var(--e-muted); font-size: var(--fs-sm); }
.eprivacy__inner .icon { color: #8FB58F; margin-top: 1px; }
.eprivacy p { max-width: 80ch; }

/* анонс на главной */
.eteaser { background: var(--e-bg); color: var(--e-text); overflow: hidden; }
.eteaser__inner { position: relative; display: grid; gap: var(--s6); padding-block: var(--s10); align-items: center; }
@media (min-width: 768px) { .eteaser__inner { grid-template-columns: minmax(0, 1fr) auto 140px; gap: var(--s8); } }
.eteaser__date { font-family: var(--mono); font-size: 13px; color: var(--e-orange-2); margin-bottom: var(--s2); }
.eteaser h2 { color: #fff; font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem); text-transform: uppercase; letter-spacing: -0.035em; font-weight: 800; }
.eteaser__text > p:last-child { margin-top: var(--s2); color: var(--e-muted); max-width: 52ch; }
.eteaser__art { display: none; position: relative; height: 120px; }
@media (min-width: 768px) { .eteaser__art { display: block; } }
.eteaser__art .pumpkin { left: 0; right: 0; top: 0; width: 140px; }

/* админка мероприятия */
.etabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border-radius: 5px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; }
.etabs a.is-active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.etabs { flex-wrap: wrap; }
.ebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.efilters { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip-link.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tlist { display: grid; gap: var(--s3); }
.titem { display: grid; gap: var(--s3); padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.titem__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.titem__num { font-family: var(--mono); font-weight: 600; font-size: 13px; }
.titem__date { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.titem__title { font-size: var(--fs-lg); font-weight: 650; letter-spacing: -0.01em; }
.titem__title .muted { font-weight: 500; }
.titem__text { font-size: var(--fs-md); color: var(--ink-2); }
.titem__meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: var(--fs-sm); }
.titem__meta .muted { display: inline-flex; align-items: center; gap: 6px; }
.titem__meta .icon { width: 16px; height: 16px; }
.titem__comment { font-size: var(--fs-sm); color: var(--ink-2); padding-left: var(--s3); border-left: 2px solid var(--line-2); }
.titem__reason { font-size: var(--fs-sm); padding: var(--s3) var(--s4); border-radius: var(--radius); background: var(--warn-bg); border: 1px solid #EFDDB6; }
.titem__actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: flex-start; padding-top: var(--s3); border-top: 1px solid var(--line); }
.titem__more { position: relative; }
.titem__more summary { list-style: none; }
.titem__more summary::-webkit-details-marker { display: none; }
.titem__more summary .icon { width: 16px; height: 16px; }
.titem__more[open] { flex-basis: 100%; }
.titem__form { display: grid; gap: var(--s3); margin-top: var(--s3); max-width: 520px; }
.titem__form .btn { justify-self: start; }
.tlink { display: inline-flex !important; align-items: center; gap: 6px; font-weight: 500; }
.tlink .icon { width: 16px; height: 16px; }
.select--sm { min-height: 40px; width: auto; padding-block: 0; font-size: var(--fs-sm); }
.eswitch { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); padding: var(--s4) 0; border-top: 1px solid var(--line); cursor: pointer; position: relative; }
.eswitch__title { display: block; font-weight: 600; }
.eswitch__text { display: block; font-size: var(--fs-sm); color: var(--muted); margin-top: var(--s1); }
.eswitch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.eswitch__track { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line-2); position: relative; transition: background-color var(--dur) var(--ease); }
.eswitch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform 220ms var(--ease-out); }
.eswitch input:checked + .eswitch__track { background: var(--primary); }
.eswitch input:checked + .eswitch__track::after { transform: translateX(18px); }
.eswitch input:focus-visible + .eswitch__track { outline: 3px solid var(--focus); outline-offset: 2px; }
.note--event { color: var(--ink-2); background: #FFF3E8; border-color: #FFD3B0; }
.note--event .icon { color: #C2550A; }

@media (prefers-reduced-motion: reduce) {
  .event__leaves { display: none; }
  .pumpkin, .ehero__art .leaf { animation: none !important; }
  .ehero__title .line > span, .ehero__lead, .ehero__actions, .ehero__count, .ehero__art, .esuccess__icon { animation-name: fadeOnly !important; animation-duration: 450ms !important; }
}

.ledger__empty { padding: var(--s6) var(--s5); color: var(--muted); font-size: var(--fs-sm); border-bottom: 1px solid var(--line); }
.boot { display: flex; align-items: center; justify-content: center; gap: var(--s3); min-height: 40vh; color: var(--muted); }
.boot .spinner { width: 20px; height: 20px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

.eplatform { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--e-orange-2); }
.eplatform .icon { width: 14px; height: 14px; }

/* админка: раскрывающиеся карточки редактирования */
details.acard > summary { list-style: none; cursor: pointer; flex-wrap: wrap; }
details.acard > summary::-webkit-details-marker { display: none; }
details.acard > summary h2 { min-width: 0; }
details.acard:not([open]) { gap: 0; }
details.acard[open] > summary { padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.acard--new > summary .icon:last-child { margin-left: auto; transition: transform var(--dur) var(--ease); }
.acard--new[open] > summary .icon:last-child { transform: rotate(180deg); }
.acard--off { opacity: .6; }
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.checks { display: grid; gap: 0 var(--s4); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.att-list { list-style: none; display: grid; gap: var(--s2); }
.att-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.att-list a { display: inline-flex; align-items: center; gap: 6px; }
.att-list .icon { width: 16px; height: 16px; }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw__toggle { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pw__toggle[aria-pressed="true"] { color: var(--primary); }

/* документы */
.doc h2 { font-size: var(--fs-xl); margin: var(--s10) 0 var(--s3); letter-spacing: -0.02em; }
.doc h2:first-child, .doc .note + h2 { margin-top: 0; }
.doc p, .doc li { color: var(--ink-2); line-height: 1.65; }
.doc p + p { margin-top: var(--s3); }
.doc ul { padding-left: 1.2em; display: grid; gap: var(--s2); margin-top: var(--s2); }
/* согласие в формах */
.consent { gap: var(--s2); padding: var(--s4); border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.consent__label { display: flex; align-items: flex-start; gap: var(--s3); font-weight: 500; cursor: pointer; }
.consent__label input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--primary); cursor: pointer; }
.consent__note { font-size: var(--fs-sm); color: var(--muted); padding-left: 32px; }
.consent .field__error { padding-left: 32px; }
.consent.has-error { border-color: var(--danger); }
.event .consent { background: var(--e-bg); border-color: var(--e-line-2); }
.event .consent__label { color: var(--e-text); }
.event .consent__label input { accent-color: var(--e-orange); }
.event .consent__note { color: var(--e-muted); }
.event .consent.has-error { border-color: var(--e-error); }
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); }
.footer__motto { margin-top: var(--s4); color: #A9BEB0; font-size: var(--fs-xs); font-family: var(--mono); }
