/* ============================================================================
   AlejMUN Portal — design system
   Brand: #5cb85c · #14261c · #ffffff · section wash #f4f6f4 · Montserrat
   Портал светлый — как и alejmun.cz. Тёмная тема сознательно не вводится,
   чтобы фирменный зелёный вёл себя одинаково на сайте и в кабинете.
   ========================================================================= */

/* Montserrat — self-hosted variable font (latin + latin-ext).
   Один файл на подмножество покрывает все начертания 100–900. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Токены ───────────────────────────────────────────────────────────────── */
:root {
  /* Бренд */
  --brand:        #5cb85c;
  --brand-600:    #4aa54a;
  --brand-700:    #3d8b3d;
  --brand-200:    #bfe3bf;
  --brand-100:    #e4f3e4;
  --brand-050:    #f1f9f1;

  --ink:          #14261c;
  --ink-800:      #1b3325;
  --ink-600:      #35513f;
  --ink-400:      #5d7568;
  --muted:        #6f857a;

  --surface:      #ffffff;
  --surface-alt:  #f4f6f4;
  --surface-sunk: #eceff0;
  --line:         #dde4df;
  --line-strong:  #c6d2c9;

  /* Семантика */
  --ok:        #2f8f4e;
  --ok-bg:     #e7f4ec;
  --warn:      #b7791f;
  --warn-bg:   #fdf3e2;
  --danger:    #c0392b;
  --danger-bg: #fbeceb;
  --info:      #2f6f8f;
  --info-bg:   #e8f2f7;

  /* Форма */
  --r-xs: 4px;
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 38, 28, .06);
  --shadow:    0 2px 8px rgba(20, 38, 28, .07), 0 1px 2px rgba(20, 38, 28, .04);
  --shadow-lg: 0 14px 40px rgba(20, 38, 28, .14);
  --ring:      0 0 0 3px rgba(92, 184, 92, .28);

  --font: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --header-h: 68px;
  --page-max: 1180px;
  --prose-max: 68ch;

  --step: clamp(.9rem, .35vw + .82rem, 1rem);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ── Сброс ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: var(--step);
  line-height: 1.6;
  color: var(--ink-800);
  background: var(--surface-alt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-600); }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(1.75rem, 2.6vw + 1rem, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 1.4vw + .95rem, 1.85rem); }
h3 { font-size: clamp(1.1rem, .7vw + .9rem, 1.3rem); }
h4 { font-size: 1rem; }

p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
small { font-size: .8125rem; }

:focus-visible {
  outline: 2px solid var(--brand-700);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: var(--brand-200); color: var(--ink); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ── Раскладка ────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.container--narrow { max-width: 720px; }
.container--wide   { max-width: 1400px; }

/* Любой <main> растягивается на свободную высоту, чтобы подвал прижимался
   к низу окна сам, без отступов-костылей. */
main { flex: 1 0 auto; }

.page { padding-block: clamp(1.75rem, 4vw, 3rem); }
.page--flush { padding-top: 0; }

.stack > * + * { margin-top: var(--gap, 1rem); }
.stack--sm { --gap: .5rem; }
.stack--lg { --gap: 1.75rem; }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 62rem) {
  .grid--sidebar { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; }
  .grid--sidebar-left { grid-template-columns: 15rem minmax(0, 1fr); }
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap, .75rem);
  align-items: center;
}
.cluster--between { justify-content: space-between; }
.cluster--end { justify-content: flex-end; }

.divider { height: 1px; background: var(--line); border: 0; margin-block: 1.5rem; }

/* ── Шапка ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}

.site-header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.brand:hover { color: #fff; }
.brand__logo { width: 38px; height: 38px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-size: 1.05rem; }
.brand__sub {
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}

.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}

.nav__link {
  --nav-fg: rgba(255, 255, 255, .78);
  color: var(--nav-fg);
  text-decoration: none;
  font-weight: 600;
  font-size: .875rem;
  padding: .5rem .75rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav__link:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.nav__link[aria-current="page"] { color: #fff; background: rgba(92, 184, 92, .22); }

.nav__divider { width: 1px; height: 24px; background: rgba(255,255,255,.16); margin-inline: .5rem; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: rgba(255, 255, 255, .1);
  border: 0;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 60rem) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: .125rem;
    background: var(--ink);
    padding: .75rem clamp(1rem, 3vw, 2rem) 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav__link { padding: .7rem .75rem; font-size: .95rem; }
  .nav__divider { width: auto; height: 1px; margin: .5rem 0; }
}

/* ── Подвал ───────────────────────────────────────────────────────────────── */
/* Подвала у портала нет: контакт Секретариата живёт там, где он нужен —
   под формой входа и в карточке «Something not right?» в кабинете. */

/* ── Кнопки ───────────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.35rem;
  min-height: 44px;
  border: 1px solid var(--btn-border);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover { --btn-bg: var(--brand-600); color: var(--btn-fg); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--line-strong);
  box-shadow: none;
}
.btn--ghost:hover { --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-border: var(--brand); }

.btn--dark { --btn-bg: var(--ink); }
.btn--dark:hover { --btn-bg: var(--ink-800); }

.btn--danger { --btn-bg: var(--danger); }
.btn--danger:hover { --btn-bg: #a5312a; }

.btn--quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink-600);
  box-shadow: none;
  padding-inline: .75rem;
}
.btn--quiet:hover { --btn-bg: var(--surface-sunk); --btn-fg: var(--ink); transform: none; }

.btn--sm { padding: .45rem .9rem; min-height: 36px; font-size: .8125rem; }
.btn--lg { padding: .9rem 1.9rem; min-height: 52px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn[disabled], .btn--locked {
  cursor: not-allowed;
  --btn-bg: var(--surface-sunk);
  --btn-fg: var(--ink-400);
  --btn-border: var(--line);
  box-shadow: none;
  opacity: 1;
}
.btn[disabled]:hover, .btn--locked:hover {
  --btn-bg: var(--surface-sunk);
  --btn-fg: var(--ink-400);
  box-shadow: none;
}
/* Заблокированная кнопка остаётся кликабельной: клик открывает пояснение. */
.btn--locked { cursor: help; }
.btn--locked::before {
  content: "";
  width: 13px;
  height: 13px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--lock-icon) center / contain no-repeat;
  mask: var(--lock-icon) center / contain no-repeat;
}
:root {
  --lock-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V7a6 6 0 1 1 12 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h8V7a4 4 0 0 0-8 0v3z'/%3E%3C/svg%3E");
}

.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ── Карточки ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.15rem, 2.2vw, 1.75rem);
  box-shadow: var(--shadow-sm);
}
.card--flush { padding: 0; overflow: hidden; }
.card--muted { background: var(--surface-alt); box-shadow: none; }
.card--accent { border-color: var(--brand-200); background: var(--brand-050); }
.card--danger { border-color: #f0c6c1; background: var(--danger-bg); }

.card__header {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.card__header h2, .card__header h3 { margin: 0; }
.card__title-group { min-width: 0; }
.card__eyebrow {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .3rem;
}
.card__body { padding: clamp(1.15rem, 2.2vw, 1.75rem); }
.card__footer {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.card__section + .card__section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* Карточка-ссылка (выбор типа заявки, список комитетов) */
.choice {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  text-align: left;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.choice:hover, .choice:focus-visible {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  color: inherit;
}
.choice__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--brand-100);
  color: var(--brand-700);
  font-weight: 800;
  font-size: 1.05rem;
}
.choice__title { font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.choice__desc { color: var(--ink-600); font-size: .875rem; margin: 0; }
.choice__meta {
  margin-top: auto;
  padding-top: .5rem;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--brand-700);
}

/* ── Пилюли статусов ──────────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem;
  border-radius: var(--r-pill);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  background: var(--surface-sunk);
  color: var(--ink-600);
  border: 1px solid transparent;
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.pill--ok      { background: var(--ok-bg);     color: var(--ok); }
.pill--warn    { background: var(--warn-bg);   color: var(--warn); }
.pill--danger  { background: var(--danger-bg); color: var(--danger); }
.pill--info    { background: var(--info-bg);   color: var(--info); }
.pill--brand   { background: var(--brand-100); color: var(--brand-700); }
.pill--plain::before { display: none; }

.pill--live {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: rgba(47, 143, 78, .25);
}
.pill--live::before { animation: pulse 1.8s var(--ease) infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.75); }
}

.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: var(--r-xs);
  background: var(--surface-sunk);
  color: var(--ink-600);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge--brand { background: var(--brand-100); color: var(--brand-700); }

/* Позиция «ECOSOC China» */
.position-tag {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  padding: .55rem .95rem;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.position-tag__committee { color: var(--brand); letter-spacing: .02em; }
.position-tag__country { font-weight: 600; }

/* ── Прогресс участника ───────────────────────────────────────────────────── */
.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.stepper__item {
  position: relative;
  padding-top: 1.4rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink-400);
  line-height: 1.3;
}
.stepper__item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--surface-sunk);
}
.stepper__item[data-state="done"]    { color: var(--ink-600); }
.stepper__item[data-state="done"]::before    { background: var(--brand); }
.stepper__item[data-state="current"] { color: var(--brand-700); font-weight: 800; }
.stepper__item[data-state="current"]::before {
  background: linear-gradient(90deg, var(--brand) 55%, var(--brand-200) 55%);
}
.stepper__item[data-state="blocked"]::before { background: var(--danger); }

/* ── Формы ────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 1.15rem; }
.field:last-child { margin-bottom: 0; }

.label {
  display: block;
  font-weight: 700;
  font-size: .8125rem;
  color: var(--ink);
  margin-bottom: .4rem;
}
.label__optional { font-weight: 500; color: var(--muted); }
.label__req { color: var(--danger); margin-left: .15rem; }

.input, .select, .textarea {
  width: 100%;
  padding: .7rem .9rem;
  min-height: 46px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #9aada1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.textarea { min-height: 8.5rem; resize: vertical; line-height: 1.55; }

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2335513f'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 20px;
  padding-right: 2.4rem;
}
.select:disabled, .input:disabled, .textarea:disabled {
  background: var(--surface-sunk);
  color: var(--ink-400);
  cursor: not-allowed;
  border-color: var(--line);
}

.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffbfb;
}
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(192, 57, 43, .18); }

.hint { display: block; margin-top: .35rem; font-size: .78rem; color: var(--muted); }
.error-text {
  display: flex;
  gap: .35rem;
  margin-top: .35rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--danger);
}
.error-text::before { content: "!"; font-weight: 800; }

.field-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 700; color: var(--ink); }

/* Радио/чекбоксы в виде карточек */
.option-list { display: grid; gap: .6rem; }
.option-list--inline { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

.option {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.option:hover { border-color: var(--brand); }
.option input { margin: .2rem 0 0; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.option__title { font-weight: 700; font-size: .9rem; color: var(--ink); display: block; }
.option__desc { font-size: .8125rem; color: var(--ink-600); }
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-050); }
.option:has(input:focus-visible) { box-shadow: var(--ring); }

.checkbox {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .875rem;
  cursor: pointer;
}
.checkbox input { margin: .25rem 0 0; accent-color: var(--brand); width: 17px; height: 17px; flex: none; }

/* Счётчик символов мотивации */
.counter {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .35rem;
  font-size: .78rem;
  color: var(--muted);
}
.counter[data-ok="true"] { color: var(--ok); font-weight: 600; }

/* Загрузка файла */
.file-drop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.15rem;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r);
  background: var(--surface-alt);
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.file-drop:hover, .file-drop:focus-within { border-color: var(--brand); background: var(--brand-050); }
.file-drop input[type="file"] { flex: 1 1 14rem; min-width: 0; font-size: .8125rem; }
.file-drop__note { font-size: .78rem; color: var(--muted); flex-basis: 100%; margin: 0; }

/* ── Уведомления ──────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .9rem 1.1rem;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-size: .875rem;
  font-weight: 500;
}
.alert strong { font-weight: 800; }
.alert--success { background: var(--ok-bg);     border-color: rgba(47,143,78,.22);  color: #1f6b39; }
.alert--error   { background: var(--danger-bg); border-color: rgba(192,57,43,.22);  color: #9b2c22; }
.alert--warning { background: var(--warn-bg);   border-color: rgba(183,121,31,.22); color: #8a5a12; }
.alert--info    { background: var(--info-bg);   border-color: rgba(47,111,143,.22); color: #245a75; }
.alert__icon { font-weight: 800; flex: none; line-height: 1.5; }
.alert__close {
  margin-left: auto;
  background: none;
  border: 0;
  color: inherit;
  opacity: .6;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 .15rem;
}
.alert__close:hover { opacity: 1; }

.flash-stack {
  position: sticky;
  top: calc(var(--header-h) + .75rem);
  z-index: 40;
  display: grid;
  gap: .6rem;
  margin-bottom: 1.5rem;
}

/* Заметная плашка состояния заявки */
.notice-panel {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.4rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
}
.notice-panel--pending { border-left-color: var(--warn); }
.notice-panel--danger  { border-left-color: var(--danger); }
.notice-panel h3 { margin-bottom: .25rem; }
.notice-panel p { color: var(--ink-600); margin: 0; }

/* ── Таблицы ──────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  min-width: 40rem;
}
.table th, .table td {
  padding: .8rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-alt);
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-600);
  white-space: nowrap;
  z-index: 1;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--brand-050); }
.table td--num { text-align: right; font-variant-numeric: tabular-nums; }
.table td--tight { white-space: nowrap; }
.table__empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

.table--compact { min-width: 0; }
.table--compact th, .table--compact td { padding: .55rem .75rem; }

/* Строка со своей позицией подсвечивается */
.table tr[data-self="true"] { background: var(--brand-050); box-shadow: inset 3px 0 0 var(--brand); }

/* ── Модальное окно ───────────────────────────────────────────────────────── */
dialog.modal {
  width: min(30rem, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  color: inherit;
  background: var(--surface);
}
dialog.modal::backdrop { background: rgba(20, 38, 28, .55); backdrop-filter: blur(2px); }
.modal__body { padding: 1.6rem 1.6rem 1.25rem; }
.modal__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--warn-bg);
  color: var(--warn);
  margin-bottom: .9rem;
  font-size: 1.15rem;
}
.modal__title { margin-bottom: .4rem; }
.modal__text { color: var(--ink-600); margin: 0; }
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  padding: 1rem 1.6rem 1.6rem;
}

/* ── Мелкие блоки ─────────────────────────────────────────────────────────── */
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.1rem 1.25rem;
}
.stat__value {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .25rem;
}
.stat--accent { background: var(--brand-050); border-color: var(--brand-200); }
.stat--accent .stat__value { color: var(--brand-700); }

.data-list { margin: 0; display: grid; gap: .7rem; }
.data-list div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 34%) 1fr;
  gap: .5rem 1rem;
  align-items: baseline;
}
.data-list dt {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.data-list dd { margin: 0; color: var(--ink-800); overflow-wrap: anywhere; }

@media (max-width: 30rem) {
  .data-list div { grid-template-columns: 1fr; gap: .1rem; }
}

.prose { max-width: var(--prose-max); }
.prose p, .prose li { color: var(--ink-600); }
.prose ul, .prose ol { padding-left: 1.15rem; }
.prose li + li { margin-top: .35rem; }

.quote-block {
  padding: 1rem 1.15rem;
  background: var(--surface-alt);
  border-radius: var(--r);
  border-left: 3px solid var(--brand-200);
  font-size: .9rem;
  color: var(--ink-600);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.priority-card {
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 1.1rem 1.2rem;
  background: var(--surface);
}
.priority-card__rank {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-bottom: .75rem;
}
.priority-card__rank span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .7rem;
}

/* Блок участника делегации */
.member-card {
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.member-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1.15rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}
.member-card__index {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  color: var(--ink);
  font-size: .9rem;
}
.member-card__index span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: .78rem;
}
.member-card__body { padding: 1.15rem; }

/* Инфо-панель комитета */
.committee-hero {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  position: relative;
  overflow: hidden;
}
.committee-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% auto;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 184, 92, .3), transparent 65%);
  pointer-events: none;
}
.committee-hero h1 { color: #fff; margin-bottom: .35rem; position: relative; }
.committee-hero__abbr {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
}
.committee-hero__meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  margin-top: 1rem;
  font-size: .875rem;
  color: rgba(255, 255, 255, .8);
}
.committee-hero__chairs { display: flex; flex-wrap: wrap; gap: .5rem; }
.chair-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .75rem .3rem .3rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .1);
  font-size: .8125rem;
  font-weight: 600;
  color: #fff;
}
.chair-chip__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: .7rem;
  font-weight: 800;
}

/* Переключатель присутствия */
.attendance-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-sunk);
  border-radius: var(--r-pill);
  gap: 2px;
}
.attendance-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.attendance-toggle label {
  padding: .3rem .7rem;
  border-radius: var(--r-pill);
  font-size: .7rem;
  font-weight: 700;
  color: var(--ink-400);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.attendance-toggle label:hover { color: var(--ink); }
.attendance-toggle input:checked + label { background: var(--surface); box-shadow: var(--shadow-sm); }
.attendance-toggle input:focus-visible + label { box-shadow: var(--ring); }
.attendance-toggle input[value="present"]:checked + label            { color: var(--ok); }
.attendance-toggle input[value="present_and_voting"]:checked + label { color: var(--brand-700); }
.attendance-toggle input[value="absent"]:checked + label             { color: var(--danger); }

/* Панель админа */
.admin-shell { display: grid; gap: 1.5rem; }
@media (min-width: 64rem) {
  .admin-shell { grid-template-columns: 14rem minmax(0, 1fr); align-items: start; }
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: .5rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
@media (max-width: 63.99rem) {
  .admin-nav { flex-direction: row; overflow-x: auto; position: static; }
}
.admin-nav a {
  padding: .55rem .8rem;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink-600);
  text-decoration: none;
  white-space: nowrap;
}
.admin-nav a:hover { background: var(--surface-alt); color: var(--ink); }
.admin-nav a[aria-current="page"] { background: var(--brand-100); color: var(--brand-700); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: flex-end;
}
.filters .field { margin: 0; }
.filters .input, .filters .select { min-height: 40px; padding-block: .45rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .7rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-600);
  text-decoration: none;
}
.chip:hover { border-color: var(--brand); color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Множественный выбор стран */
.country-picker {
  max-height: 22rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: .75rem;
  background: var(--surface);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: .1rem .75rem;
}
.country-picker label {
  display: flex;
  gap: .45rem;
  align-items: center;
  padding: .3rem .35rem;
  border-radius: var(--r-xs);
  font-size: .8125rem;
  cursor: pointer;
}
.country-picker label:hover { background: var(--surface-alt); }
.country-picker input { accent-color: var(--brand); }
.country-picker input:disabled + span { color: var(--muted); }

/* ── Лендинг ──────────────────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(1100px 460px at 88% -12%, rgba(92, 184, 92, .28), transparent 62%),
    var(--ink);
  color: #fff;
  padding-block: clamp(3rem, 8vw, 5.5rem);
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1rem;
}
.hero__lead {
  font-size: clamp(1rem, .6vw + .9rem, 1.15rem);
  color: rgba(255, 255, 255, .82);
  max-width: 52ch;
}
.hero__actions { margin-top: 2rem; }
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.hero__fact-value { font-size: 1.35rem; font-weight: 800; color: #fff; }
.hero__fact-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}

.section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.section--alt { background: var(--surface-alt); }
.section--white { background: var(--surface); }
.section__head { max-width: 60ch; margin-bottom: 2rem; }
.section__eyebrow {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-bottom: .5rem;
}

.price-card { display: flex; flex-direction: column; }
.price-card__amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.price-card__alt { color: var(--muted); font-size: .875rem; }
.price-card__early {
  margin-top: .6rem;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--brand-700);
}
.price-card__strike { text-decoration: line-through; color: var(--muted); font-weight: 500; }

/* Форма входа/регистрации */
/* Высоту даёт flex у main, поэтому тёмная колонка доходит ровно до подвала.
   На широких мониторах колонки растянулись бы к краям экрана и форма улетела
   бы в правый угол — поэтому содержимое обеих половин прижато к центру. */
.auth-layout { display: grid; }
@media (min-width: 64rem) {
  .auth-layout { grid-template-columns: 1fr 1fr; }
}
.auth-aside {
  display: none;
  background:
    radial-gradient(900px 420px at 30% 10%, rgba(92, 184, 92, .28), transparent 62%),
    var(--ink);
  color: #fff;
  padding: clamp(2rem, 5vw, 4rem);
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}
@media (min-width: 64rem) { .auth-aside { display: flex; } }
.auth-aside__inner { width: 100%; max-width: 30rem; }
.auth-aside h2 { color: #fff; font-size: clamp(1.6rem, 2vw + 1rem, 2rem); }
.auth-aside p { color: rgba(255, 255, 255, .78); }
.auth-aside ul { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .9rem; }
.auth-aside li {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  color: rgba(255, 255, 255, .86);
  font-size: .9rem;
}
.auth-aside li::before {
  content: "✓";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: .75rem;
  font-weight: 800;
}
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem);
  background: var(--surface-alt);
}
@media (min-width: 64rem) { .auth-main { justify-content: flex-start; } }
.auth-card { width: 100%; max-width: 30rem; }
.auth-foot {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: .875rem;
  color: var(--ink-600);
}
.auth-foot .btn { margin-top: .75rem; }

/* ── Утилиты ──────────────────────────────────────────────────────────────── */
.muted   { color: var(--muted); }
.strong  { font-weight: 700; }
.small   { font-size: .8125rem; }
.tabular { font-variant-numeric: tabular-nums; }
.center  { text-align: center; }
.right   { text-align: right; }
.nowrap  { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.full { width: 100%; }

.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;
}

.empty-state {
  text-align: center;
  padding: clamp(2rem, 5vw, 3.5rem) 1.5rem;
  color: var(--muted);
}
.empty-state__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--surface-sunk);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}
.empty-state h3 { color: var(--ink-600); }

/* ── Печать и доступность ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .btn, .nav, .flash-stack, .admin-nav { display: none !important; }
  body { background: #fff; }
  .card { border-color: #ccc; box-shadow: none; break-inside: avoid; }
}
