/* event.tumiab.uz — the EVENT platform: business events and B2B
   One stylesheet for all pages. No inline styles anywhere (CSP style-src 'self'). */

/* ---------- 1. Tokens ---------- */
:root {
  --navy: #12184A;
  --navy-950: #0A0E30;
  --blue: #0B60AE;
  --blue-700: #094F90;
  --blue-800: #083F73;
  --blue-100: #D6E6F7;
  --blue-50: #EBF3FC;
  --green: #0A7A16;
  --green-700: #075F11;
  --green-100: #CFEBD3;
  --green-50: #E8F5EA;
  --red: #D7261E;
  --red-700: #A81D17;
  --red-50: #FDECEB;
  --amber-800: #8A4B05;
  --amber-50: #FFF4DE;
  --violet-800: #47379E;
  --violet-50: #EFECFC;
  --gray-700: #4A5070;
  --gray-50: #EEF0F5;

  --bg: #F4F6FA;
  --bg-2: #EBEFF6;
  --card: #FFFFFF;
  --line: #DDE3EE;
  --line-2: #C6CFDF;
  --text: #20274F;
  --heading: #12184A;
  --muted: #535B7C;
  --muted-2: #656D8C;

  --focus: #0B60AE;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(18, 24, 74, .06);
  --shadow: 0 1px 2px rgba(18, 24, 74, .05), 0 6px 20px rgba(18, 24, 74, .07);
  --shadow-lg: 0 2px 4px rgba(18, 24, 74, .06), 0 18px 48px rgba(18, 24, 74, .14);

  --gutter: 16px;
  --container: 75rem;      /* 1200 px; wider on large monitors (below) */
  --header-h: 64px;
  --sticky-top: 0px;       /* the header height while the header sticks to the top (wide and tall screens) */
  --measure: 36em;         /* about 75 characters of Cyrillic running text per line in Manrope */
  /* Manrope has no Қ қ Ғ ғ Ҳ ҳ of Uzbek Cyrillic: Inter supplies these six letters (every page loads an Inter
     subset of exactly them from Google Fonts), so no system font ever mixes into a word */
  --font: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Screen sizes, from folded phones (280 px) to 2560 px monitors (SPEC § 14.2):
   < 400 px compact header; < 768 px phones (44 px touch targets, header scrolls away);
   ≥ 768 px and ≥ 560 px high: sticky header; ≥ 1600 px wider container; ≥ 2200 px everything a little larger. */
@media (min-width: 768px) {
  :root { --gutter: 24px; --header-h: 72px; }
}
@media (min-width: 768px) and (min-height: 560px) {
  :root { --sticky-top: var(--header-h); }
}
/* Uzbek Latin letters are narrower in Manrope (o‘, i, l): the same 75 characters take less width */
html[lang="uz-Latn"] { --measure: 33em; }
@media (min-width: 1280px) {
  :root { --gutter: 32px; }
}
@media (min-width: 1600px) {
  :root { --container: 85rem; --gutter: 40px; } /* 1360 px */
}
@media (min-width: 2200px) {
  html { font-size: 112.5%; } /* rem-based sizes and the container grow with it: 18 px text, 1530 px content */
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--sticky-top) + 16px);
}

/* The page stays invisible until the dictionary is applied (i18n.js adds the class; noscript.css overrides). */
html:not(.i18n-ready) body { visibility: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh; /* the footer stays on the first screen of short pages while the browser bars are shown */
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
}

main { flex: 1 0 auto; display: block; }

img, svg { max-width: 100%; }
img { height: auto; border: 0; }
svg { flex-shrink: 0; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--heading);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.015em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.75rem, 1.25rem + 3.2vw, 3.4rem); line-height: 1.08; letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem); line-height: 1.15; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 700; letter-spacing: 0; }
/* headings break into lines of similar length; running text avoids a single word on its last line */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li + li { margin-top: .35em; }
strong, b { font-weight: 700; color: inherit; }
small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--blue-700); text-decoration-thickness: 2px; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: #FFFFFF; }
/* headings and summaries receive focus from scripts only, to move screen readers; no ring needed */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, .error-summary[tabindex="-1"]:focus { outline: none; }

::selection { background: var(--blue-100); color: var(--navy); }

[hidden] { display: none !important; }

.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: 12px; top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--navy);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

.noscript-msg {
  margin: 0;
  padding: 12px var(--gutter);
  background: var(--amber-50);
  color: var(--amber-800);
  font-weight: 600;
  text-align: center;
}

/* ---------- 3. Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container-narrow { max-width: calc(51.25rem + 2 * var(--gutter)); }

/* the sections of the landing: short, so a little air is enough */
.section { padding: 56px 0; }
.section-white { background: var(--card); }
.section-tint { background: var(--bg); }
@media (min-width: 1024px) {
  .section { padding: 72px 0; }
}

.section-head { max-width: 47.5rem; margin-bottom: 32px; }
.section-head h2 { margin-bottom: 0; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Running text keeps about 75 characters per line on wide screens (em: relative to the element's own font) */
.hero-lead, .faq-body p, .legal p, .legal li, .reg-hero p, .panel-head p, .form-section-lead,
.card > p:not(.notice), .card > .hint, .footer-top p,
.dir-card .dir-field p, .error-summary ul, .form-actions .hint, .aside-list li, .modal-body > p, .form-more-body > p {
  max-width: var(--measure);
}
.result-mail, .reg-hero .reg-notice, .hero-facts { max-width: calc(var(--measure) + 2.5rem); } /* text plus its icon */

/* The bar marks the first line: an eyebrow of several countries wraps on phones, and the bar stays level with its
   first line at full width (.65em ≈ half of the 20.8 px line less half of the bar). A long country breaks inside. */
.eyebrow {
  display: inline-flex;
  align-items: flex-start;
  vertical-align: top;
  gap: 10px;
  margin-bottom: 14px;
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  overflow-wrap: anywhere;
}
.eyebrow::before {
  content: "";
  flex: none;
  margin-top: .65em;
  width: 28px; height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue) 0 33%, var(--red) 33% 40%, #FFFFFF 40% 60%, var(--red) 60% 67%, var(--green) 67% 100%);
  box-shadow: 0 0 0 1px rgba(18, 24, 74, .08);
}

.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid { gap: 24px; }
}

.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.pre-wrap { white-space: pre-wrap; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.cap::first-letter { text-transform: uppercase; }
.h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
.h4 { font-size: 1rem; font-weight: 700; letter-spacing: 0; color: var(--heading); }
.hide-xs { display: none; }
@media (min-width: 480px) { .hide-xs { display: inline; } }
.show-sm { display: inline-flex; }
@media (min-width: 768px) { .show-sm { display: none !important; } }

/* ---------- 4. Header ---------- */
.tricolor {
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0 33.2%, var(--red) 33.2% 34.2%, #FFFFFF 34.2% 65.8%, var(--red) 65.8% 66.8%, var(--green) 66.8% 100%);
}

.site-header {
  position: relative;
  z-index: 60;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
/* The header sticks only where it costs little height: not on phones, not on landscape phones and short laptops */
@media (min-width: 768px) and (min-height: 560px) {
  .site-header { position: sticky; top: 0; }
  @supports (backdrop-filter: blur(8px)) {
    .site-header { background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(10px); }
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

/* The brand: the mark of the site (the drawing of favicon.svg) and its name set as text, so nothing has to stay
   sharp and the name takes the colour of the place it stands in */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--navy);
  text-decoration: none;
  border-radius: 6px;
}
.brand:hover { color: var(--navy); }
.brand img { display: block; width: auto; height: 34px; }
.brand-name { font-size: 1.375rem; font-weight: 800; line-height: 1; letter-spacing: .06em; }
@media (min-width: 768px) { .brand img { height: 40px; } }
@media (min-width: 2200px) { .brand img { height: 44px; } }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.header-actions .btn { white-space: nowrap; }
.header-actions .hide-sm { display: none; }
@media (min-width: 768px) { .header-actions .hide-sm { display: inline-flex; } }

/* Small and folded phones: a smaller logo and tighter spacing keep the switcher and the buttons on screen */
@media (max-width: 399.98px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 6px; }
  .brand { gap: 8px; }
  .brand img { height: 30px; }
  .brand-name { font-size: 1.25rem; }
  .header-actions .btn-sm { padding: 0 10px; gap: 6px; }
}
@media (max-width: 339.98px) {
  .brand img { height: 26px; }
  .brand-name { font-size: 1.125rem; }
}

/* The landing on phones: the language switch, «Войти» and «Регистрация» sit behind the menu button; from 768 px
   the header shows them itself (the landing has no links to sections, SPEC § 16.14) */
.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--navy);
  cursor: pointer;
}
.burger:hover { background: var(--blue-50); }
.burger svg { width: 22px; height: 22px; }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: #FFFFFF;
  box-shadow: var(--shadow);
}
.mobile-menu .menu-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; padding-bottom: 20px; }
.mobile-menu .menu-actions .btn { flex: 1 1 140px; }
@media (min-width: 768px) {
  .burger, .mobile-menu { display: none !important; }
}

/* Language switcher */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #FFFFFF;
}
.lang-switch button {
  min-width: 44px;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: .8125rem;
  font-weight: 700;
  cursor: pointer;
}
.lang-switch button:hover { background: var(--blue-50); }
.lang-switch button[aria-pressed="true"] { background: var(--navy); color: #FFFFFF; }
@media (max-width: 767.98px) {
  .lang-switch button { min-height: 38px; }
  main .lang-switch button { min-height: 44px; } /* the switcher of the cabinet on phones is a touch target in the page */
}
@media (max-width: 399.98px) {
  .lang-switch { padding: 2px; }
  .lang-switch button { min-width: 38px; padding: 0 6px; }
  main .lang-switch button { min-width: 44px; } /* in the page there is room for full-size buttons */
}
@media (max-width: 319.98px) {
  .site-header .lang-switch button { min-width: 34px; padding: 0 4px; } /* four languages beside the mark */
}
.on-dark .lang-switch { background: transparent; border-color: rgba(255, 255, 255, .28); }
.on-dark .lang-switch button { color: #FFFFFF; }
.on-dark .lang-switch button:hover { background: rgba(255, 255, 255, .12); }
.on-dark .lang-switch button[aria-pressed="true"] { background: #FFFFFF; color: var(--navy); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--blue); color: #FFFFFF; box-shadow: 0 1px 2px rgba(11, 96, 174, .25); }
.btn-primary:hover { background: var(--blue-700); color: #FFFFFF; }
.btn-primary:active { background: var(--blue-800); }

.btn-success { background: var(--green); color: #FFFFFF; }
.btn-success:hover { background: var(--green-700); color: #FFFFFF; }

.btn-secondary { background: #FFFFFF; color: var(--navy); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-800); }

.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue-50); color: var(--blue-800); }

.btn-danger { background: #FFFFFF; color: var(--red-700); border-color: #EDB5B2; }
.btn-danger:hover { background: var(--red-50); color: var(--red-700); }
.btn-danger-solid { background: var(--red-700); color: #FFFFFF; }
.btn-danger-solid:hover { background: #8E1813; color: #FFFFFF; }

.btn-white { background: #FFFFFF; color: var(--navy); }
.btn-white:hover { background: var(--blue-50); color: var(--navy); }
.btn-outline-light { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); color: #FFFFFF; }

.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.0625rem; border-radius: 12px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .875rem; border-radius: 8px; }
.btn-xs { min-height: 30px; padding: 0 10px; font-size: .8125rem; border-radius: 7px; gap: 6px; }
.btn-xs svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
/* long labels wrap inside the button instead of pushing it out of a narrow column */
.btn { max-width: 100%; }
.btn > span { min-width: 0; }

/* Phones and tablets held in the hand: every button is at least 44 px high (WCAG 2.5.5) */
@media (max-width: 767.98px) {
  .btn-sm, .btn-xs { min-height: 44px; }
  .btn-xs { padding: 0 12px; font-size: .875rem; }
  .btn-xs svg { width: 17px; height: 17px; }
  .btn-icon { width: 44px; }
  .form-actions .btn-lg { flex: 1 1 auto; } /* the main button of a form spans the phone screen */
}
@media (max-width: 399.98px) {
  .btn-lg { padding: 0 18px; }
}
/* folded phones: «Зарегистрироваться» is one long word; the decorative arrow after it gives way */
@media (max-width: 359.98px) {
  .btn-lg { padding: 0 14px; font-size: 1rem; }
  .btn-lg > span + svg { display: none; }
}

.btn .spinner { width: 16px; height: 16px; }
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-weight: 600;
  text-align: left; /* a label that wraps lines up with the text next to it (buttons centre by default) */
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--blue-700); }
@media (max-width: 767.98px) {
  .link-btn { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- 6. Pills, badges, chips ---------- */
/* A pill keeps one line while it fits; a long one (the Uzbek deadline line on a 280 px phone) wraps inside its
   card. 13 px = half the pill height, so a one-line pill keeps fully rounded ends. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 13px;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: break-word;
  background: var(--gray-50);
  color: var(--gray-700);
}
.pill::before {
  content: "";
  flex-shrink: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .9;
}
.pill.no-dot::before { display: none; }
.pill-blue { background: var(--blue-50); color: var(--blue-800); }
.pill-green, .pill-approved, .pill-accepted { background: var(--green-50); color: var(--green-700); }
.pill-amber, .pill-pending { background: var(--amber-50); color: var(--amber-800); }
.pill-violet, .pill-waitlist, .pill-proposed { background: var(--violet-50); color: var(--violet-800); }
.pill-red, .pill-declined { background: var(--red-50); color: var(--red-700); }
.pill-gray, .pill-cancelled, .pill-closed { background: var(--gray-50); color: var(--gray-700); }
.pill-navy { background: var(--navy); color: #FFFFFF; }

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #FFFFFF;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
}

/* a label in the cabinet's directory cards (the cities of a company: .chip.chip-sm) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--navy);
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1.35;
  box-shadow: var(--shadow-sm);
}
.chip svg { width: 20px; height: 20px; color: var(--blue); }
.chip-sm {
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: .8125rem;
  font-weight: 700;
  box-shadow: none;
  background: var(--bg);
}

/* ---------- 7. Cards ---------- */
.card {
  position: relative;
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
@media (min-width: 768px) { .card { padding: 28px; } }
@media (max-width: 359.98px) { .card { padding: 16px; } } /* folded phones: more room for the text */
.card-flat { box-shadow: none; }
.card-tight { padding: 16px; }
@media (min-width: 768px) { .card-tight { padding: 20px; } }
.card h3 { margin-bottom: 8px; }
.card-title-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.card-title-row h2, .card-title-row h3 { margin: 0; }

/* The colour band of an event (EVENTS.md § 2.5): five presets with neutral ids, abstract bars along a line, never a
   flag (SPEC § 15.4). `red_white_green` and `black_white_green` stay on the events that have them; a new event takes
   `brand`, `blue` or `green`. UI.evStrip() draws an unknown band as `brand`. */
.strip { display: block; position: relative; height: 6px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(18, 24, 74, .08); }
.strip-red_white_green { background: linear-gradient(90deg, var(--red) 0 24%, #FFFFFF 24% 62%, var(--green) 62% 100%); }
.strip-black_white_green { background: linear-gradient(90deg, #15171C 0 34%, #FFFFFF 34% 67%, var(--green) 67% 100%); }
.strip-black_white_green::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 22px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
/* the site's bar: blue, a thin red line, white, a thin red line, green (as the tricolour above every page) */
.strip-brand { background: linear-gradient(90deg, var(--blue) 0 calc(33.3% - 2px), var(--red) calc(33.3% - 2px) 33.3%, #FFFFFF 33.3% 66.7%, var(--red) 66.7% calc(66.7% + 2px), var(--green) calc(66.7% + 2px) 100%); }
.strip-blue { background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 100%); }
.strip-green { background: linear-gradient(90deg, #053F0B 0%, #1C9A2A 100%); }
.card > .strip:first-child { position: absolute; left: 0; right: 0; top: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

/* ---------- 8. Notices, states ---------- */
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--blue-100);
  background: var(--blue-50);
  color: var(--navy);
  font-size: .9375rem;
}
.notice svg { width: 20px; height: 20px; margin-top: 2px; color: var(--blue); }
.notice > div, .notice > span { min-width: 0; flex: 1; overflow-wrap: anywhere; } /* e-mail addresses in the text */
.notice .notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.notice-warning { background: var(--amber-50); border-color: #F3D8A6; }
.notice-warning svg { color: var(--amber-800); }
.notice-error { background: var(--red-50); border-color: #F2C3C0; }
.notice-error svg { color: var(--red-700); }
.notice-success { background: var(--green-50); border-color: var(--green-100); }
.notice-success svg { color: var(--green); }

.site-banner { background: var(--navy); color: #FFFFFF; font-weight: 600; font-size: .9375rem; }
.site-banner .container { display: flex; gap: 10px; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.site-banner p { min-width: 0; overflow-wrap: anywhere; }
.site-banner svg { width: 18px; height: 18px; color: #9CC4F0; }

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.state > svg { width: 40px; height: 40px; color: var(--line-2); }
.state h3 { margin: 0; color: var(--heading); }
.state p { max-width: 28.75rem; margin: 0; }

.skeleton {
  display: block;
  height: 14px;
  margin: 10px 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gray-50) 0%, #F7F8FB 50%, var(--gray-50) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton.w-40 { width: 40%; }
.skeleton.w-60 { width: 60%; }
.skeleton.w-80 { width: 80%; }
.skeleton.h-lg { height: 22px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- 9. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 56px;
  background:
    radial-gradient(1200px 500px at 100% 0%, rgba(11, 96, 174, .08), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/pattern.svg");
  background-size: 88px 88px;
  -webkit-mask-image: linear-gradient(100deg, transparent 0%, transparent 42%, #000 85%);
  mask-image: linear-gradient(100deg, transparent 0%, transparent 42%, #000 85%);
  opacity: .55;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 640px; height: 640px;
  right: -320px; top: -140px;
  background: url("../img/rosette.svg") center / contain no-repeat;
  opacity: .45;
  pointer-events: none;
}
@media (min-width: 1024px) {
  .hero { padding: 72px 0 88px; }
  /* the rosette stays next to the right edge of the content, also on very wide monitors */
  .hero::after { right: max(-150px, calc((100% - var(--container)) / 2 - 150px)); top: -60px; width: 720px; height: 720px; opacity: .7; }
}
@media (min-width: 1600px) {
  .hero::after { width: 820px; height: 820px; top: -90px; }
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 56.25rem; }
.hero h1 { margin-bottom: 20px; }
.hero-lead {
  margin-bottom: 28px;
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  line-height: 1.55;
  color: var(--text);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero-actions .btn { flex: 1 1 auto; }
@media (min-width: 480px) { .hero-actions .btn { flex: 0 0 auto; } }

/* one line of facts under the button («Бесплатно · около 2 минут · …») */
.hero-facts { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--text); font-size: .9375rem; }
.hero-facts svg { width: 20px; height: 20px; margin-top: 2px; color: var(--green); }
.hero-facts span { min-width: 0; }
/* phones: a tighter first screen (the Uzbek title takes four lines instead of six at 280–320 px) */
@media (max-width: 479.98px) {
  .hero { padding: 24px 0 40px; }
  .hero h1 { font-size: clamp(1.5rem, 1.05rem + 2.8vw, 1.875rem); margin-bottom: 12px; }
  .hero-lead { font-size: 1rem; margin-bottom: 18px; }
}
/* landscape phones: the title takes two lines and the lead starts above the register bar at the bottom */
@media (max-width: 899.98px) and (max-height: 480px) {
  .hero { padding: 16px 0 32px; }
  .hero h1 { font-size: clamp(1.375rem, .9rem + 2.2vw, 1.875rem); margin-bottom: 12px; }
}

/* ---------- 10. Landing sections ---------- */
/* The short landing (owner's decision of 02.11.2026, SPEC § 16.14): the cards of the published events, three steps,
   the questions and the organisers' contacts. The eyebrow, the title and the lead come from the events and the
   settings (EVENTS.md § 5.1); they are empty until the public config answers. */
.eyebrow:empty { display: none; }
/* One to six cards from 280 to 2560 px: two side by side from 640 px, three from 1024 px when there are three or
   more (four make two rows of two); a single card spans both columns up to 47.5rem, the width of the steps below,
   with the country next to the city (not alone at the far edge of a wide card). Without :has() two columns stay. */
@media (min-width: 640px) {
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-grid > :only-child { grid-column: 1 / -1; max-width: 47.5rem; }
  .event-grid > :only-child .event-head { justify-content: flex-start; }
}
@media (min-width: 1024px) {
  .event-grid:has(> :nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .event-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.events-none { max-width: var(--measure); margin: 0; font-size: 1.0625rem; color: var(--text); }
.event-card { display: flex; flex-direction: column; padding-top: 30px; }
.event-card .event-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 4px; }
/* the texts of an event are typed by the organisers: a long word or a pasted link breaks inside the card */
.event-card h3 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); margin: 0; overflow-wrap: anywhere; }
.event-card .event-country { min-width: 0; color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.event-card .event-dates { margin: 6px 0 12px; font-size: 1.125rem; font-weight: 800; color: var(--blue); }
.event-card .event-what { margin: 0 0 20px; color: var(--text); overflow-wrap: anywhere; }
.event-card .event-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.event-card .event-status { display: flex; flex-wrap: wrap; gap: 6px; }

/* «Как участвовать»: three steps of one line each, one under the other, each number next to its line */
.steps { display: grid; gap: 12px; max-width: 47.5rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { margin: 0; counter-increment: step; }
.card.step { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; }
.step-num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.125rem;
}
.step-num::before { content: counter(step); }
/* the first line of the text sits level with the middle of the number */
.step p { min-width: 0; margin: 9px 0 0; color: var(--text); }
/* phones: the number goes above its line, so the text has the whole width of the card */
@media (max-width: 479.98px) {
  .card.step { flex-direction: column; gap: 10px; padding: 16px; }
  .step-num { width: 36px; height: 36px; font-size: 1rem; }
  .step p { margin: 0; }
}

.faq { max-width: 53.75rem; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}
.faq details + details { margin-top: 12px; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--heading);
  font-size: 1.0625rem;
  line-height: 1.4;
  border-radius: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%230B60AE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details[open] summary { border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.faq .faq-body { padding: 16px 20px 20px; color: var(--text); overflow-wrap: anywhere; } /* a link in a visa line */

/* the organisers' contacts (the landing's section, shown when the settings have them, and the privacy page) */
.contacts-card { max-width: 34rem; }
.contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: center; margin: 0; }
.contact-list li > div { min-width: 0; }
.contact-list svg { flex: none; width: 22px; height: 22px; color: var(--blue); }
/* the landing names each contact above its value («Электронная почта», «Телефон», «Telegram») */
.contact-list .fact-label { display: block; font-size: .8125rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.contact-list a { font-weight: 700; overflow-wrap: anywhere; }

.mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  display: flex;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(18, 24, 74, .08);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .25s var(--ease), visibility 0s linear .25s;
}
.mobile-cta.show { transform: translateY(0); visibility: visible; transition: transform .25s var(--ease); }
.mobile-cta .btn { flex: 1; }
@media (min-width: 768px) { .mobile-cta { display: none; } }
/* the bar never covers the end of the page: the footer ends with room for it */
@media (max-width: 767.98px) {
  .page-index .site-footer .container { padding-bottom: calc(28px + 66px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 11. Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--navy-950);
  color: #C3CCEA;
  font-size: .9375rem;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/pattern-light.svg");
  background-size: 88px 88px;
  opacity: .6;
  pointer-events: none;
}
.site-footer .container { position: relative; padding-top: 40px; padding-bottom: 28px; }
.footer-top { display: grid; gap: 28px; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.2fr 1fr auto; align-items: start; } }
.footer-logos { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; margin-bottom: 16px; }
.footer-logos img { display: block; height: 40px; width: auto; }
.footer-logos img.miit { height: 44px; }
.footer-logos .brand, .footer-logos .brand:hover { color: #FFFFFF; }
/* on the navy of the footer the square of the mark needs an edge of its own */
.footer-logos .brand img { border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .28); }
.footer-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.footer-links li { margin: 0; }
.footer-links a { color: #FFFFFF; font-weight: 600; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; color: #FFFFFF; }
.footer-top .lang-switch { justify-self: start; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 20px; color: #A8B2D6; font-size: .875rem; }
/* on the navy footer the link keeps AA contrast (about 11:1) */
.site-footer:not(.footer-min) .footer-bottom a { color: #C3CCEA; }
.site-footer:not(.footer-min) .footer-bottom a:hover { color: #FFFFFF; }

.footer-min { background: transparent; color: var(--muted); }
.footer-min::before { display: none; }
.footer-min .container { padding-top: 24px; padding-bottom: 24px; }
.footer-min .footer-bottom { padding: 0; color: var(--muted); }
.footer-min a { color: var(--muted); }

/* ---------- 12. Forms ---------- */
.form-section { margin: 0; min-width: 0; }
.form-section + .form-section { margin-top: 20px; }
.form-section > .h3 { margin-bottom: 16px; }
#config-message:not([hidden]) { margin-bottom: 20px; }
.form-section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.form-section-title .sec-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue);
  font-weight: 800;
  font-size: .9375rem;
}
.form-section.is-complete .sec-num { background: var(--green); color: #FFFFFF; }
.form-section-title h2 { margin: 0; font-size: 1.35rem; }
.form-section-lead { color: var(--muted); margin: 0 0 18px; }

.fields { display: grid; gap: 18px; }
.fields > * { min-width: 0; }
@media (min-width: 720px) {
  .fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields-2 .span-2 { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label:not(.check), .field-label {
  font-weight: 700;
  font-size: .9375rem;
  color: var(--heading);
}
.field > .check + .check { margin-top: 4px; }
.req { color: var(--red-700); margin-left: 2px; }
/* inline-block: «(необязательно)» may go to the next line after the label text (no space between them) */
.opt { display: inline-block; color: var(--muted); font-weight: 500; font-size: .875rem; margin-left: 4px; }
.hint { color: var(--muted-2); font-size: .8125rem; line-height: 1.45; }
.field-error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  color: var(--red-700);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
}
.field-error:empty { display: none; }
.field-error::before {
  content: "";
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8.5' fill='none' stroke='%23A81D17' stroke-width='1.6'/%3E%3Cpath d='M10 5.5v5.2' stroke='%23A81D17' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14' r='1.1' fill='%23A81D17'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

.input, .select, .textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.textarea { min-height: 96px; resize: vertical; }
/* a value or a placeholder longer than its field («Название, продукция, предложения» on a phone) ends with «…»
   instead of being cut in the middle of a word; the whole text shows while the field is being edited */
.input { text-overflow: ellipsis; }
.select {
  appearance: none;
  padding-right: 40px;
  /* a chosen option longer than the field («Электротехника, бытовая техника, энергетическое оборудование»,
     «Қорақалпоғистон Республикаси» on a phone) ends with «…»; the open list shows every option in full */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%2312184A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 20px 20px no-repeat;
}
.input::placeholder, .textarea::placeholder { color: #8A91AD; }
.input:hover, .select:hover, .textarea:hover { border-color: #A9B4CC; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 96, 174, .2);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--red-700);
  box-shadow: 0 0 0 3px rgba(215, 38, 30, .12);
}
.input[readonly] { background: var(--bg); color: var(--muted); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
/* 16 px in every field: iOS zooms the page in when a smaller field gets the focus */
.input-sm, .select-sm { min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: 1rem; }
.select-sm { padding-right: 36px; background-position: right 8px center; }
@media (max-width: 767.98px) {
  .input-sm, .select-sm { min-height: 44px; }
}

.input-group { position: relative; }
.input-group .input { padding-right: 52px; }
.input-group .reveal {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.input-group .reveal:hover { background: var(--blue-50); color: var(--blue); }
.input-group .reveal svg { width: 20px; height: 20px; }

.counter { align-self: flex-end; color: var(--muted-2); font-size: .75rem; }

.check {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: .9375rem;
  line-height: 1.5;
}
.check input {
  appearance: none;
  flex-shrink: 0;
  width: 22px; height: 22px;
  margin: 0;
  margin-top: 1px;
  border: 1.5px solid #8F99B5;
  border-radius: 6px;
  background: #FFFFFF;
  cursor: pointer;
  transition: background-color .12s var(--ease), border-color .12s var(--ease);
}
.check input[type="radio"] { border-radius: 50%; }
.check input:checked {
  border-color: var(--blue);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
.check input[type="radio"]:checked { background: #FFFFFF; box-shadow: inset 0 0 0 5px var(--blue); }
.check input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.check input:disabled { background-color: var(--bg); border-color: var(--line-2); cursor: not-allowed; }
/* a choice that is always on (the recipients «with a seat» of the message to participants): a grey box with a visible tick */
.check input:disabled:checked { background-color: #6B7593; border-color: #6B7593; }
.check input:disabled + span { color: var(--muted); cursor: not-allowed; }
.check input[aria-invalid="true"] { border-color: var(--red-700); }
.check > span { min-width: 0; }
/* the title and the line of an event card of the register form come from the organisers: a long word breaks inside */
.check .check-title { display: block; font-weight: 700; color: var(--heading); overflow-wrap: anywhere; }
.check .check-desc { display: block; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
/* on phones the whole label is a 44 px touch target, also for a one-line choice */
@media (max-width: 767.98px) {
  .check { min-height: 44px; }
  .check > span { padding-top: 1px; }
  .radio-row { gap: 0 22px; }
}

.radio-row { display: flex; flex-wrap: wrap; gap: 10px 22px; }

.check-card {
  display: block;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  background: #FFFFFF;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  overflow: hidden;
}
.check-card + .check-card { margin-top: 14px; }
.check-card.is-selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 96, 174, .12); }
.check-card.is-disabled { background: var(--bg); }
.check-card .check-card-head { position: relative; padding: 20px 16px 16px; }
.check-card .check-card-head .strip { position: absolute; top: 0; left: 0; right: 0; border-radius: 0; }
.check-card .check-card-head .check { font-size: 1rem; }
.check-card .check-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0 34px; min-width: 0; }
/* Long pills (the Uzbek deadline line) wrap instead of widening the form on phones; 13px = half the
   pill height, so a one-line pill looks exactly as before. */
.check-card .check-card-meta .pill { max-width: 100%; white-space: normal; border-radius: 13px; }
.check-card .check-card-body { padding: 16px; border-top: 1px dashed var(--line-2); background: #FBFCFE; display: grid; gap: 14px; }
@media (max-width: 479px) {
  .check-card .check-card-meta { margin-left: 0; }
}
@media (max-width: 359.98px) {
  .check-card .check-card-head { padding: 18px 12px 14px; }
  .check-card .check-card-body { padding: 14px 12px; }
  .check-card .check { gap: 10px; }
}
@media (min-width: 720px) {
  .check-card .check-card-head { padding: 22px 20px 18px; }
  .check-card .check-card-body { padding: 18px 20px 20px 54px; }
}

.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.form-message:empty { display: none; }
.form-message { margin-top: 16px; }

.error-summary { padding: 16px 18px; border: 1px solid #F2C3C0; border-left: 4px solid var(--red-700); border-radius: 10px; background: var(--red-50); }
.error-summary h3 { margin: 0 0 6px; font-size: 1rem; color: var(--red-700); }
.error-summary ul { margin: 0; padding-left: 18px; }
.error-summary a { color: var(--red-700); font-weight: 600; }

.progress { position: relative; height: 8px; border-radius: 999px; background: var(--gray-50); overflow: hidden; }
.progress > span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .3s var(--ease); }
.progress.thin { height: 6px; }
.progress.capacity > span { background: var(--blue); }
.progress.capacity.full > span { background: var(--red); }

.delegate-row { display: grid; gap: 10px; align-items: end; }
@media (min-width: 720px) { .delegate-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; } }
.delegate-row + .delegate-row { margin-top: 12px; }

/* ---------- 13. Auth pages ---------- */
.auth-main {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px var(--gutter) 56px;
}
.auth-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/pattern.svg");
  background-size: 88px 88px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  pointer-events: none;
}
@media (min-width: 768px) { .auth-main { padding-top: 64px; } }
.auth-card { position: relative; width: 100%; max-width: 30rem; }
@media (max-width: 359.98px) { .auth-card { padding: 18px 16px; } }
.auth-card h1 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2rem); margin-bottom: 8px; }
.auth-card .lead { color: var(--muted); margin-bottom: 22px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 18px; font-size: .9375rem; }
.auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
/* Sign-in by link or code (participants) and by password (organisers) */
.auth-card #login-notice:not([hidden]), .auth-card #code-sent:not(:empty) { margin-bottom: 16px; }
.link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.auth-switch { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.input-code {
  max-width: 220px;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: .3em;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
#resend-wait:empty { display: none; }
.forgot-participants { margin-bottom: 18px; }

.header-simple .header-actions { gap: 8px; }

/* ---------- 14. Registration page ---------- */
/* The form keeps a readable width on large monitors: this page keeps the 75rem container */
.page-register { --container: 75rem; --progress-h: 4rem; }         /* height of the sticky progress bar */
@media (min-width: 900px) { .page-register { --progress-h: 5.75rem; } } /* with the step links */
.reg-hero { padding-top: 28px; padding-bottom: 12px; }
.reg-hero h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); margin-bottom: 10px; }
.reg-hero p { color: var(--muted); }
.reg-layout { display: grid; gap: 20px; padding-bottom: 64px; }
/* the result screen hides the intro (register.js): the result card and the aside keep the intro's distance from
   the header */
.reg-hero[hidden] + .reg-layout { padding-top: 28px; }
.reg-layout > *, .form-section, .check-card { min-width: 0; } /* a select with a long option never widens the form */
@media (min-width: 1100px) { .reg-layout { grid-template-columns: minmax(0, 1fr) 21.25rem; gap: 28px; align-items: start; } }
.reg-aside { display: grid; gap: 16px; }
/* below the sticky header and the sticky progress bar */
@media (min-width: 1100px) { .reg-aside { position: sticky; top: calc(var(--sticky-top) + var(--progress-h) + 20px); } }
.reg-progress {
  position: sticky;
  top: var(--sticky-top);
  z-index: 40;
  padding: 12px 0;
  background: rgba(244, 246, 250, .96);
  border-bottom: 1px solid var(--line);
}
/* a section opened from the step links or an error is not hidden under the progress bar */
.page-register .form-section, .page-register .result-card { scroll-margin-top: calc(var(--progress-h) + 12px); }
.reg-progress .container { display: flex; flex-direction: column; gap: 8px; }
.reg-progress .progress-label { display: flex; justify-content: space-between; gap: 12px; font-size: .875rem; font-weight: 700; color: var(--navy); }
.reg-steps { display: none; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 900px) {
  .reg-steps { display: flex; gap: 18px; }
  .reg-steps li { margin: 0; counter-increment: step; }
  .reg-steps a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8125rem; font-weight: 700; text-decoration: none; }
  .reg-steps a:hover { color: var(--blue); }
  .reg-steps .is-complete a { color: var(--green-700); }
  /* a section still to fill shows its number; a check mark only once it is complete */
  .reg-steps svg { width: 18px; height: 18px; }
  .reg-steps li:not(.is-complete) svg { display: none; }
  .reg-steps li:not(.is-complete) a::before {
    content: counter(step);
    display: inline-grid;
    place-items: center;
    width: 18px; height: 18px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: .6875rem;
    line-height: 1;
  }
}
.status-list .status-hint { flex-basis: 100%; }
.aside-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: .9375rem; }
.aside-list li { display: flex; gap: 10px; margin: 0; }
.aside-list svg { width: 18px; height: 18px; margin-top: 3px; color: var(--green); }

/* Participation by notification: the line under the title, the optional block, the messenger fields */
.reg-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--green-100);
  border-radius: 12px;
  background: var(--green-50);
  color: var(--green-700);
  font-weight: 600;
}
.reg-hero .reg-notice { color: var(--green-700); }
.reg-notice svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.reg-notice span { min-width: 0; }
/* phones: the first screen reaches the form sooner, and the sticky progress bar is one line (about 54 px) —
   with the on-screen keyboard open it took 29 % of a 320 px phone's height */
@media (max-width: 767.98px) {
  .page-register { --progress-h: 3.5rem; }
  .reg-hero { padding-top: 16px; padding-bottom: 4px; }
  .reg-hero[hidden] + .reg-layout { padding-top: 16px; }
  .reg-hero h1 { font-size: 1.5rem; margin-bottom: 6px; }
  .reg-hero .reg-notice { padding: 8px 12px; font-size: .875rem; }
  .reg-progress { padding: 8px 0; }
  .reg-progress .progress-label { font-size: .8125rem; }
  .reg-progress [data-progress-step] { display: none; }
}
.email-suggest .link-btn { font-size: inherit; }
.fields-next { margin-top: 18px; }
.form-more { margin-top: 22px; border: 1px solid var(--line-2); border-radius: 12px; background: #FBFCFE; }
.form-more > summary {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--blue-800);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.form-more > summary::-webkit-details-marker { display: none; }
.form-more > summary svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; transition: transform .15s var(--ease); }
.form-more[open] > summary svg { transform: rotate(45deg); }
.form-more > summary span { min-width: 0; overflow-wrap: anywhere; }
.form-more > summary:hover { background: var(--blue-50); }
.form-more > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-more[open] > summary { border-bottom: 1px dashed var(--line-2); border-radius: 12px 12px 0 0; }
.form-more-body { padding: 14px; min-width: 0; }
@media (min-width: 720px) { .form-more-body { padding: 18px 20px 20px; } }
.channel-field { margin: 2px 0 6px 34px; min-width: 0; }
@media (max-width: 359px) { .channel-field { margin-left: 0; } }
.result-mail { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; overflow-wrap: anywhere; }
.result-mail svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; color: var(--blue); }
.pill.pill-wrap { max-width: 100%; white-space: normal; border-radius: 13px; overflow-wrap: anywhere; }

.result-card { max-width: 45rem; margin: 0 auto; text-align: left; }
.page-register .result-card { max-width: none; margin: 0; }
.result-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green);
}
.result-icon svg { width: 34px; height: 34px; }
.status-list { margin: 16px 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.status-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }

/* ---------- 15. App shell (cabinet, admin) ---------- */
.app-header .header-inner { gap: 12px; }
.app-user { display: none; min-width: 0; text-align: right; line-height: 1.25; }
.app-user b { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-size: .9375rem; }
.app-user span { color: var(--muted); font-size: .8125rem; }
@media (min-width: 900px) { .app-user { display: block; } }

.app-main { padding: 20px 0 64px; }
@media (min-width: 1024px) { .app-main { padding-top: 28px; } }
.app-layout { display: grid; gap: 20px; }
.app-layout > * { min-width: 0; }
@media (min-width: 1024px) { .app-layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 28px; align-items: start; } }
.app-layout.wide { max-width: none; }

/* Phones and tablets: one row of tabs that scrolls sideways; a shadow at an edge shows that more tabs follow
   (the covers move with the tabs, the shadows stay), and the open tab is scrolled into view (UI.revealTab). */
.tabs {
  display: flex;
  gap: 4px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 2px;
  overflow-x: auto;
  scrollbar-width: none;
  list-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  background:
    linear-gradient(90deg, var(--bg) 40%, rgba(244, 246, 250, 0)) left center / 32px 100% no-repeat local,
    linear-gradient(270deg, var(--bg) 40%, rgba(244, 246, 250, 0)) right center / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(18, 24, 74, .22), rgba(18, 24, 74, 0)) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(18, 24, 74, .22), rgba(18, 24, 74, 0)) right center / 14px 100% no-repeat scroll;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs li { margin: 0; flex-shrink: 0; }
.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--navy);
  font-weight: 700;
  font-size: .9375rem;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tabs a svg { width: 18px; height: 18px; color: var(--muted); }
.tabs a:hover { background: #FFFFFF; border-color: var(--line); }
.tabs a[aria-current="page"] { background: var(--navy); color: #FFFFFF; }
.tabs a[aria-current="page"] svg { color: #9CC4F0; }
.tabs .badge-count { margin-left: 2px; }
/* tablets: every tab visible, in one or two rows */
@media (min-width: 600px) and (max-width: 1023.98px) {
  .tabs { flex-wrap: wrap; margin: 0; padding: 0 0 2px; overflow: visible; background: none; }
}
@media (min-width: 1024px) {
  .app-nav { position: sticky; top: calc(var(--sticky-top) + 20px); }
  .tabs { flex-direction: column; margin: 0; padding: 8px; overflow: visible; background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
  .tabs a { display: flex; width: 100%; }
  .tabs .badge-count { margin-left: auto; }
}

/* The cabinet menu in groups: a heading stands above a group in the side column only; a row of tabs has no room for
   headings and keeps the order alone. */
.tabs-group { display: none; }
@media (min-width: 1024px) {
  .app-layout:not(.top-nav) .tabs-group:not([hidden]) {
    display: block;
    padding: 14px 14px 4px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
}
/* the views of one section (the requests for meetings and their schedule), under its heading */
.panel-views { margin: -4px 0 18px; }

.app-nav .lang-switch { margin-top: 12px; }
.danger-zone { border-color: #F2C3C0; }
.inline-strip { display: inline-block; width: 28px; margin-right: 8px; vertical-align: middle; }
/* a group of fields under a legend (the texts of an event in two languages, the landing texts): no frame of its own;
   the space between two groups comes from the stack around them */
.fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.fieldset > legend { display: block; padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 1rem; color: var(--heading); }
.fieldset > .hint { margin: 8px 0 0; max-width: var(--measure); }
@media (min-width: 1024px) {
  .app-layout.top-nav { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .app-layout.top-nav .app-nav { position: static; }
  .app-layout.top-nav .tabs { flex-direction: row; flex-wrap: wrap; gap: 4px; padding: 6px; }
  .app-layout.top-nav .tabs a { width: auto; }
  .app-layout.top-nav .tabs .badge-count { margin-left: 2px; }
}
.table-wide { min-width: 1060px; }
/* the registrations table: 10 px inside the cells (12 px at the frame) keep it within the 1200 px container of
   1280–1599 px screens in every language; with 12 px the Russian table was 3 px wider than its frame */
.table.table-wide th, .table.table-wide td { padding-left: 10px; padding-right: 10px; }
.table.table-wide th:first-child, .table.table-wide td:first-child { padding-left: 12px; }
.table.table-wide th:last-child, .table.table-wide td:last-child { padding-right: 12px; }
/* the row action select shows its whole label («Ҳолатни ўзгартириш», the longest) next to the arrow; with the
   column minimums below the table fits the 1200 px container without scrolling sideways */
#reg-table .select-sm { min-width: 13.25rem; }
.table td .note { margin-top: 6px; font-size: .8125rem; }
.table .cell-main, .table .cell-sub { overflow-wrap: break-word; word-break: normal; }
.table td.col-company { min-width: 170px; }
.table td.col-contact { min-width: 180px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.panel-head h1, .panel-head h2 { margin: 0; font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem); }
.panel-head p { margin: 4px 0 0; color: var(--muted); }
.panel > * + * { margin-top: 20px; }

.kv { display: grid; gap: 10px 20px; margin: 0; }
@media (min-width: 640px) { .kv { grid-template-columns: max-content minmax(0, 1fr); } }
.kv dt { color: var(--muted); font-size: .875rem; font-weight: 600; }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 639px) { .kv dd + dt { margin-top: 6px; } }

.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .stat-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FFFFFF;
  min-width: 0;
}
.stat .stat-label { display: block; color: var(--muted); font-size: .8125rem; font-weight: 700; overflow-wrap: break-word; hyphens: auto; }
.stat .stat-value { display: block; margin-top: 2px; color: var(--heading); font-size: 1.6rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
/* phones: the tiles become rows «label … number», so long Uzbek labels never squeeze into half a card */
@media (max-width: 479.98px) {
  .stat-grid, .stat-grid.six { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; }
  .stat .stat-label { font-size: .875rem; }
  .stat .stat-value { margin: 0; font-size: 1.25rem; flex-shrink: 0; }
}
.stat.tone-green .stat-value { color: var(--green-700); }
.stat.tone-amber .stat-value { color: var(--amber-800); }
.stat.tone-violet .stat-value { color: var(--violet-800); }
.stat.tone-red .stat-value { color: var(--red-700); }

.event-panel { padding-top: 30px; }
/* the status pill goes under the title and dates in every card, so the cards of the events stay aligned */
.event-panel .event-panel-head { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.event-panel h2 { margin: 0; font-size: 1.35rem; }
.event-panel .sub { color: var(--muted); font-weight: 600; }
.event-panel .event-panel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.event-panel > .row { margin-top: 14px; gap: 6px; }
.event-panel > .progress { margin: 8px 0 14px; } /* the occupancy bar of the dashboard, between its line and the tiles */
/* the labels take at most 60 % of the card, so the values keep room; on folded phones a value goes under its label */
.event-panel .kv { grid-template-columns: fit-content(60%) minmax(0, 1fr); gap: 6px 16px; }
.event-panel .kv dd + dt { margin-top: 0; }
@media (max-width: 359.98px) {
  .event-panel .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .event-panel .kv dd + dt { margin-top: 8px; }
}
#app-alerts:not(:empty) { margin-bottom: 20px; }
/* no event to show in the cabinet: one line across the grid */
#ov-events-none { grid-column: 1 / -1; margin: 0; }
/* the notice above the event panels keeps the reading measure */
#ov-reception p { max-width: var(--measure); }
.event-panel .delegates-box { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.event-panel .delegates-box h3 { font-size: 1.0625rem; margin-bottom: 4px; }

/* Toolbar, filters */
.toolbar { display: grid; gap: 10px; margin-bottom: 16px; }
/* the search on its own row and three filters below, until four columns leave room for «Все мероприятия» */
@media (min-width: 720px) {
  .toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
  .toolbar > .field:first-child { grid-column: 1 / -1; }
}
@media (min-width: 1600px) {
  .toolbar { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
  .toolbar > .field:first-child { grid-column: auto; }
}
.toolbar.admin { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
/* 200 px: a selected «Все мероприятия» or «Приложены не все» is never cut, six filters wrap into two rows */
.toolbar.admin > .field { flex: 1 1 200px; }
/* the search is wide enough for its placeholder («Kompaniya, STIR, mas’ul shaxs, e-mail») */
.toolbar.admin > .field:first-child { flex: 2 1 360px; }
.toolbar.admin > .field.field-action { flex: 0 0 auto; }
/* a filter that wraps to a row of its own keeps the width of the others */
.toolbar.admin > .field:not(:first-child):not(.field-action) { max-width: 22rem; }
@media (max-width: 599.98px) { .toolbar.admin > .field:not(:first-child):not(.field-action) { max-width: none; } }
.toolbar .field > label { font-size: .8125rem; }
/* Cabinet directory on phones: the first option of each select names the filter («Все отрасли»), so the visible
   labels of the selects give way (screen readers still get them); from 480 px two selects share a row */
@media (max-width: 599.98px) {
  #dir-filters > .field:not(:first-child) > label {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}
@media (min-width: 480px) and (max-width: 599.98px) {
  #dir-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dir-filters > .field:first-child, #dir-filters > .field:last-child { grid-column: 1 / -1; }
}
.search-input { position: relative; }
.search-input .input { padding-left: 42px; }
.search-input svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.results-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: .9375rem; }

/* Directory cards */
.dir-grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
.dir-card { display: flex; flex-direction: column; gap: 10px; }
.dir-card.is-organizer { align-self: start; }
.dir-card.is-organizer { border-color: var(--blue-100); background: linear-gradient(180deg, var(--blue-50), #FFFFFF 70%); }
.dir-card h3 { margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; }
.dir-card .dir-meta { color: var(--muted); font-size: .875rem; font-weight: 600; }
.dir-card .dir-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.dir-card .dir-field { font-size: .9375rem; }
.dir-card .dir-field b { display: block; color: var(--muted); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }
.dir-card .dir-field p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-line; /* line breaks typed in the profile (and the organisers' ru/uz/uzc lines) stay */
}
.dir-card .dir-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.dir-card a.site { overflow-wrap: anywhere; font-size: .9375rem; font-weight: 600; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; }
.pager span { color: var(--muted); font-weight: 600; font-size: .9375rem; }

/* Tables. A table wider than its frame scrolls sideways inside it; a soft shadow shows on the edge that has more
   columns behind it (the white covers move with the table, the shadows stay), so «Статус» and «Действия» off
   screen on a tablet are not missed. A table that fits shows no shadow. The shadows are linear: a table is much
   taller than the screen, and a radial one would fade towards its top and bottom. */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(90deg, #FFFFFF 30%, rgba(255, 255, 255, 0)) left center / 40px 100% no-repeat local,
    linear-gradient(270deg, #FFFFFF 30%, rgba(255, 255, 255, 0)) right center / 40px 100% no-repeat local,
    linear-gradient(90deg, rgba(18, 24, 74, .16), rgba(18, 24, 74, 0)) left center / 14px 100% no-repeat scroll,
    linear-gradient(270deg, rgba(18, 24, 74, .16), rgba(18, 24, 74, 0)) right center / 14px 100% no-repeat scroll,
    #FFFFFF;
  -webkit-overflow-scrolling: touch;
}
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th, .table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--gray-50); }
.table th {
  position: sticky; top: 0;
  background: #F8F9FC;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table tbody tr:hover td { background: #FAFBFD; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .cell-main { font-weight: 700; color: var(--heading); overflow-wrap: anywhere; }
.table .cell-sub { color: var(--muted); font-size: .8125rem; overflow-wrap: anywhere; }
.table .cell-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 180px; }
.table .pill { white-space: nowrap; } /* a status stays on one line; the table scrolls inside its frame instead */
.table .note { max-width: 240px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Bars (admin dashboard) */
.bars { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; margin: 0; font-size: .875rem; }
.bars .bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; }
.bars .bar-value { color: var(--heading); font-weight: 800; font-variant-numeric: tabular-nums; }
.bars .bar-track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--gray-50); overflow: hidden; }
.bars .bar-fill { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--blue); }

.day-chart { position: relative; padding-top: 44px; }
.cols-chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.cols-chart .col { position: relative; flex: 1 1 0; min-width: 10px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; cursor: default; border-radius: 4px 4px 0 0; }
.cols-chart .col-fill { display: block; width: min(24px, 80%); height: 0; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--blue); transition: background-color .12s var(--ease); }
.cols-chart .col:hover .col-fill, .cols-chart .col:focus-visible .col-fill { background: #3F86CC; }
.cols-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--muted); font-size: .75rem; }
.chart-tip {
  position: absolute;
  top: 0;
  width: 120px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: var(--shadow);
  font-size: .8125rem;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
}
.chart-tip b { display: block; font-size: 1rem; color: var(--heading); }
.chart-tip span { color: var(--muted); }
.table-details { margin-top: 12px; }
.table-details summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: .875rem; }
@media (max-width: 767.98px) { .table-details summary { padding: 12px 0; } } /* 44 px, the triangle stays */
.table-details .table-wrap { margin-top: 10px; max-height: 320px; overflow-y: auto; }
.is-refreshing { opacity: .55; transition: opacity .2s var(--ease); }

.export-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.export-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.export-list .export-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 16. Messages ---------- */
.chat-layout {
  display: grid;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) {
  .chat-layout { grid-template-columns: 20rem minmax(0, 1fr); height: min(72vh, 47.5rem); height: min(72dvh, 47.5rem); min-height: 26rem; }
}
/* Phones and tablets: an open conversation fills the visible screen (100dvh, 100vh where dvh is unknown), with the
   messages scrolling between the title and the composer. Where the browser resizes the page for the on-screen
   keyboard (interactive-widget=resizes-content in cabinet.html), the composer stays just above the keyboard. */
@media (max-width: 899.98px) {
  .chat-layout.show-chat {
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    height: calc(100vh - var(--sticky-top) - 24px);
    height: calc(100dvh - var(--sticky-top) - 24px);
  }
  .chat-layout.show-chat .chat-messages { min-height: 0; }
  .chat-layout:not(.show-chat) { min-height: 0; } /* the list of conversations is as long as it is */
}
.thread-list { margin: 0; padding: 0; list-style: none; overflow-y: auto; border-right: 1px solid var(--line); }
.thread-list li { margin: 0; }
.thread-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--gray-50);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.thread-item:hover { background: #F7F9FC; }
.thread-item[aria-current="true"] { background: var(--blue-50); box-shadow: inset 3px 0 0 var(--blue); }
.thread-item .t-name { font-weight: 800; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .t-time { color: var(--muted-2); font-size: .75rem; white-space: nowrap; }
.thread-item .t-last { color: var(--muted); font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item.unread .t-last { color: var(--heading); font-weight: 700; }
.thread-item .badge-count { justify-self: end; } /* a round badge under the time, not a bar as wide as the time */
.chat-view { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
/* basis 160px: on a phone the action buttons move to a second row instead of squeezing the name */
.chat-head .chat-title { flex: 1 1 160px; min-width: 0; }
.chat-head .chat-title b { display: block; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head .chat-title span { color: var(--muted); font-size: .8125rem; }
.chat-head .chat-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-messages { flex: 1; min-height: 280px; padding: 16px; overflow-y: auto; background: #FAFBFD; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(86%, 560px); display: flex; flex-direction: column; gap: 2px; }
.msg .msg-body {
  padding: 10px 14px;
  border-radius: 14px 14px 14px 4px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.msg .msg-meta { font-size: .75rem; color: var(--muted-2); padding: 0 4px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .msg-body { background: var(--blue); border-color: var(--blue); color: #FFFFFF; border-radius: 14px 14px 4px 14px; }
.chat-day { align-self: center; padding: 2px 10px; border-radius: 999px; background: var(--gray-50); color: var(--muted); font-size: .75rem; font-weight: 700; }
.chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-compose .textarea { min-height: 48px; max-height: 200px; }
.chat-empty { flex: 1; }
@media (max-width: 899.98px) {
  .chat-layout.show-chat .thread-list { display: none; }
  .chat-layout:not(.show-chat) .chat-view { display: none; }
  .thread-list { border-right: 0; max-height: none; }
  .chat-head { padding: 10px 12px; }
  .chat-compose { padding: 10px 12px; }
}
@media (min-width: 900px) { .chat-back { display: none !important; } }
@media (pointer: coarse) { .chat-compose .hint { display: none; } } /* «Ctrl + Enter» means nothing on a touch screen */
/* landscape phones: a compact title row; with the keyboard open only the messages and the composer remain */
@media (max-width: 899.98px) and (max-height: 480px) {
  .chat-head { padding: 6px 12px; row-gap: 4px; }
  .chat-head .chat-title span { display: none; }
}
@media (max-width: 899.98px) and (max-height: 260px) {
  .chat-layout.show-chat .chat-head, .chat-layout.show-chat .chat-notice { display: none; }
}

/* Meetings */
.meeting-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.meeting-list > li { margin: 0; }
.meeting { display: grid; gap: 10px; }
@media (min-width: 720px) { .meeting { grid-template-columns: 72px minmax(0, 1fr) auto; align-items: start; gap: 16px; } }
.meeting .m-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 72px; min-height: 64px; padding: 6px;
  border-radius: 12px; background: var(--bg); color: var(--heading); line-height: 1.15; text-align: center;
}
.meeting .m-date b { font-size: 1.35rem; }
.meeting .m-date svg { width: 24px; height: 24px; color: var(--muted); }
.meeting .m-date span { font-size: .75rem; font-weight: 700; color: var(--muted); }
.meeting .m-title { font-weight: 800; color: var(--heading); overflow-wrap: anywhere; }
.meeting .m-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .875rem; margin-top: 2px; }
.meeting .m-note { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: .9375rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.meeting .m-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 720px) { .meeting .m-actions { justify-content: flex-end; max-width: 280px; } }

/* ---------- 17. Dialog, toast ---------- */
dialog.modal {
  width: min(40rem, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 24px); /* the body scrolls; head and buttons stay visible on short screens */
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #FFFFFF;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
dialog.modal.wide { width: min(53.75rem, calc(100vw - 24px)); }
@media (max-width: 399.98px) { dialog.modal, dialog.modal.wide { width: calc(100vw - 16px); } }
dialog.modal::backdrop { background: rgba(10, 14, 48, .55); }
dialog.modal[open] { display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.modal-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  margin: -6px -8px 0 0;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--muted);
  cursor: pointer;
}
.modal-close:hover { background: var(--bg); color: var(--navy); }
.modal-close svg { width: 22px; height: 22px; }
.modal-body { padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 640px) { .modal-body .kv { grid-template-columns: minmax(150px, 34%) minmax(0, 1fr); } }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #FAFBFD; }
@media (max-width: 767.98px) { .modal-close { width: 44px; height: 44px; } }
@media (max-width: 399.98px) {
  .modal-head { padding: 14px 16px; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; }
  .modal-foot .btn { flex: 1 1 auto; } /* two buttons share the row, a long label takes a row of its own */
}

.toasts {
  position: fixed;
  z-index: 300;
  left: 12px; right: 12px; bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
@media (min-width: 768px) { .toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; } }
.toast {
  display: flex; gap: 10px; align-items: flex-start;
  max-width: 440px; width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--navy);
  color: #FFFFFF;
  font-weight: 600;
  font-size: .9375rem;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in .2s var(--ease);
}
.toast svg { width: 20px; height: 20px; margin-top: 1px; }
.toast.success svg { color: #8EE09A; }
.toast.error { background: var(--red-700); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 18. Legal page ---------- */
.legal { padding: 32px 0 72px; }
.legal h1 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem); }
.legal .legal-meta { color: var(--muted); margin-bottom: 28px; }
.legal section + section { margin-top: 28px; }
.legal h2 { font-size: 1.25rem; margin-bottom: 10px; }
.legal .card { margin-top: 8px; }

.error-page { display: flex; align-items: center; padding: 56px 0 80px; }
.error-page .code { font-size: clamp(4rem, 3rem + 6vw, 7rem); font-weight: 800; line-height: 1; color: var(--blue-100); letter-spacing: -.04em; }

/* ---------- 20. Copies of the foreign passports (PASSPORTS.md § 4) ---------- */
/* Registration form: the delegates of each event, with a file field per person, in the event card */
.delegates-more { margin-top: 0; background: #FFFFFF; }
.delegates-more[open] > summary svg { transform: none; } /* the passport icon stays upright (the «+» of «Дополнительно» turns) */
.delegates-more .form-more-body { display: grid; gap: 14px; }
.delegates-more .form-more-body > * + * { margin-top: 0; } /* the grid gap spaces the parts */
.delegates-intro { display: grid; gap: 6px; }
.delegates-intro .hint { margin: 0; max-width: var(--measure); }
.delegates-intro a { overflow-wrap: anywhere; }
/* the notice once per page (PASSPORTS.md rule 10): a later event card leaves it out while a chosen card above it has
   its delegates block open; a browser without :has() shows it in every block */
.check-card:has(input[data-event]:checked):has(.delegates-more[open]) ~ .check-card .delegates-intro { display: none; }
.delegates-same { display: inline-flex; align-items: center; justify-self: start; gap: 8px; text-align: left; }
.delegates-same svg { width: 18px; height: 18px; }
.delegate-rows { display: grid; gap: 0; min-width: 0; }
/* the name has a hint under it, the position has none: both fields start at the same line */
.delegate-rows .delegate-row { align-items: start; }
.delegate-entry { min-width: 0; }
.delegate-entry + .delegate-entry { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
/* the cabinet editor sits in half a card: the name with its remove button on one line, the position under it */
.delegate-list .delegate-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name remove" "pos pos"; align-items: start; gap: 10px; }
.delegate-list .delegate-row > .field:first-child { grid-area: name; }
.delegate-list .delegate-row > .field:nth-child(2) { grid-area: pos; }
.delegate-list .delegate-row > .delegate-remove { grid-area: remove; margin-top: 30px; }
/* hints of wide fields (the message text, the settings, the consents) keep the reading measure too, and so do the
   descriptions of the settings' checkboxes, which span both columns */
.field > .hint, #passport-tools-body > .hint, .event-panel .hint, .passport-control .passport-status,
#settings-form .check .check-desc { max-width: var(--measure); }

.passport-pick { display: grid; gap: 6px; margin-top: 12px; min-width: 0; }
.passport-pick .field-label { font-size: .875rem; }
.passport-pick-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
.passport-pick-status, .passport-status {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  min-width: 0;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.passport-pick-status:empty, .passport-status:empty { display: none; }
.passport-pick-status svg, .passport-status svg { width: 18px; height: 18px; margin-top: 1px; }
.passport-pick-status svg { color: var(--green); }
.passport-pick-status .spinner, .passport-status .spinner { width: 16px; height: 16px; margin-top: 2px; }
.passport-same { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.passport-same svg { width: 18px; height: 18px; margin-top: 1px; color: var(--green); }

/* The result screen: the uploads of the chosen copies, one after the other */
.result-passports { margin: 4px 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.result-passports h3 { margin: 0 0 4px; font-size: 1.0625rem; }
.result-passports > .hint { margin: 0 0 12px; }
.upload-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.upload-list li { display: grid; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; min-width: 0; }
.upload-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; min-width: 0; }
.upload-name { min-width: 0; overflow-wrap: anywhere; color: var(--heading); }
.upload-list li[data-upload-state="done"] .passport-status { color: var(--green-700); }
.upload-list li[data-upload-state="failed"] .passport-status { color: var(--red-700); }
.upload-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#reg-result-needed:not([hidden]) { margin: 0 0 16px; }
.result-card .notice p, .result-passports > .hint { max-width: var(--measure); }

/* Cabinet: the task card, the passport control of each delegate */
.passports-task { border-color: #F3D8A6; background: linear-gradient(180deg, var(--amber-50), #FFFFFF 160px); }
.passports-task h2 { margin-bottom: 8px; }
#ov-passports-body { display: grid; gap: 14px; min-width: 0; }
#ov-passports-body > p { margin: 0; max-width: var(--measure); }
.passport-pills { gap: 8px; }
.passport-deadline { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; color: var(--amber-800); }
.passport-deadline svg { width: 18px; height: 18px; margin-top: 3px; }
.passport-notice { display: grid; gap: 6px; }
.passport-notice .hint { margin: 0; max-width: var(--measure); }
.passport-notice a { overflow-wrap: anywhere; }
.passport-persons { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.passport-person { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; display: grid; gap: 8px; min-width: 0; }
.passport-person-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.passport-person-head b { color: var(--heading); overflow-wrap: anywhere; }
.passport-unnamed { display: grid; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line-2); min-width: 0; }
.passport-unnamed-line { margin: 0; font-weight: 700; color: var(--heading); }
.passport-task-row { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; min-width: 0; }
@media (min-width: 640px) {
  .passport-task-row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .passport-task-row .passport-task-actions { padding-top: 29px; } /* in line with the field under its label */
  .passport-task-row .passport-status, .passport-task-row .field-error { grid-column: 1 / -1; }
}
.passport-task-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* one link per line: «… едет и на это мероприятие» for each person, then «Указать участников» on its own line */
.passport-unnamed-actions { display: grid; justify-items: start; gap: 8px; }
.passport-also { display: inline-flex; align-items: flex-start; gap: 6px; text-align: left; overflow-wrap: anywhere; }
.passport-also svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; }
.passport-reduce { margin: 0; color: var(--muted); }
.passport-reduce .link-btn { margin-left: 2px; }

.passport-control { display: grid; gap: 8px; margin-top: 10px; min-width: 0; }
.passport-person .passport-control { margin-top: 0; }
.passport-control .passport-status.is-missing { color: var(--amber-800); }
.passport-control .passport-status.is-none { color: var(--muted); }
.passport-control .passport-status.is-attached { color: var(--green-700); }
.passport-control .passport-status.is-failed { color: var(--red-700); }
.passport-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.passport-actions .btn { min-width: 0; }
.passport-renamed { margin: 8px 0 0; color: var(--amber-800); font-weight: 600; }
.passport-ended { display: flex; gap: 8px; align-items: flex-start; }
.passport-ended svg { width: 18px; height: 18px; margin-top: 1px; color: var(--blue); }
.delegates-box [data-notice-slot]:empty { display: none; }
.delegates-box [data-notice-slot] { margin: 0 0 12px; }
.delegate-list { min-width: 0; }
.delegate-list .delegate-entry .passport-control { margin-top: 8px; }
.reduce-note { margin-top: 4px; color: var(--amber-800); font-weight: 600; }
.reduce-note:empty { display: none; }
/* folded and small phones: the buttons of a passport control stack, each across the card */
@media (max-width: 399.98px) {
  .passport-actions, .passport-task-actions, .upload-actions, .passport-pick-body { flex-direction: column; align-items: stretch; }
  .passport-actions .btn, .passport-task-actions .btn, .upload-actions .btn, .passport-pick-body .btn { width: 100%; }
  .passport-pick-body .link-btn { align-self: flex-start; }
}

/* Organisers' panel: the passport tools of the registrations tab, the count in the table, the card */
.passport-tools { scroll-margin-top: calc(var(--sticky-top) + 16px); }
.passport-tools:focus { outline: none; }
.passport-tools h2 { margin-bottom: 12px; }
#passport-tools-body { display: grid; gap: 14px; min-width: 0; }
.passport-tools-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .passport-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.passport-tools-event { position: relative; display: grid; gap: 10px; align-content: start; padding: 18px 14px 14px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; min-width: 0; overflow: hidden; }
.passport-tools-event > .strip { position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 0; }
.passport-tools-line { margin: 0; font-weight: 700; color: var(--heading); overflow-wrap: anywhere; }
.passport-tools-event .field { gap: 4px; }
.passport-tools-event .field > label { font-size: .8125rem; }
.passport-tools-actions { gap: 8px; }
.passport-tools .notice { margin: 0; }
/* one run of inline text, so that «· письмо о копиях 2 ноября» keeps its dot on the line before (U+00A0) */
.passport-count { display: block; white-space: normal; }
.passport-count .passport-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; background: var(--gray-700); }
.passport-count[data-state="missing"] { color: var(--amber-800); font-weight: 700; }
.passport-count[data-state="missing"] .passport-dot { background: var(--amber-800); }
.passport-count[data-state="complete"] { color: var(--green-700); font-weight: 700; }
.passport-count[data-state="complete"] .passport-dot { background: var(--green); }
.passport-count .passport-reminded { color: var(--muted); font-weight: 500; }
.table td.col-event { min-width: 150px; white-space: normal; }
.admin-delegates-box h3:focus { outline: none; }
.admin-delegates { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.admin-delegate { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 6px; min-width: 0; }
.admin-delegate-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.admin-delegate-head b { color: var(--heading); overflow-wrap: anywhere; }
.admin-delegate .passport-actions { gap: 6px; }
.passport-uploaded-for { color: var(--amber-800); font-weight: 600; }
.passport-reauth .notice { margin: 0; }

/* ---------- 21. Message to the participants (organisers' panel) ---------- */
/* about the width of the letter itself, so that a long text is easy to read through before it is sent */
#broadcast-form { max-width: 60rem; }
#broadcast-form .fields { margin-bottom: 4px; }
#broadcast-form .textarea { min-height: 220px; }
.broadcast-count { margin: 16px 0 0; font-weight: 700; color: var(--heading); }
.broadcast-count.is-empty { color: var(--amber-800); }
.broadcast-count:empty { display: none; }

/* ---------- 22. Events (organisers' panel, tab «Мероприятия», EVENTS.md § 4) ---------- */
/* the list keeps its columns readable and scrolls sideways inside its frame on phones (the edge shadow shows more) */
#ev-list .table { min-width: 46rem; }
#ev-list .table td { vertical-align: middle; }
#ev-list .table td:first-child { min-width: 13rem; }
#ev-list .cell-main { overflow-wrap: break-word; }
.ev-name { display: flex; align-items: center; gap: 0; min-width: 0; }
.ev-name .inline-strip { flex: none; }
/* the name opens the form as the button «Изменить» does */
#ev-list .ev-name a { color: inherit; text-decoration: none; }
#ev-list .ev-name a:hover { text-decoration: underline; }
#ev-list .cell-sub { font-variant-numeric: tabular-nums; }
/* a long state («Saytda, ro‘yxatdan o‘tish ochiq») wraps in its column, so that «Изменить» stays inside the frame at 1024 px */
#ev-list .pill { white-space: normal; }
#landing-form { max-width: 60rem; }
#landing-form > * + * { margin-top: 16px; }
#landing-form > h2 { margin-bottom: 0; }
#landing-form > .hint { margin-top: 6px; }
#landing-form .form-more, #ev-form > .form-more { margin-top: 16px; }
#landing-form .form-more-body > * + *, .evf-cyrillic .form-more-body > * + * { margin-top: 16px; }
#landing-form .form-actions { margin-top: 16px; }
/* the texts of an event and of the first screen are read whole: each text area grows with its text, which its
   maxlength bounds (field-sizing: Edge and Chrome 123+; another browser keeps the 96 px of .textarea and scrolls) */
#ev-form .textarea, #landing-form .textarea { field-sizing: content; }
/* the form of one event: one screen of cards, the reading width of a letter */
#ev-form { max-width: 60rem; }
.ev-form-head { display: grid; gap: 8px; justify-items: start; }
.ev-form-head h2 { margin: 0; font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); overflow-wrap: anywhere; }
.ev-form-head h2:focus { outline: none; }
.link-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.link-back svg { width: 18px; height: 18px; }
@media (max-width: 767.98px) { .link-back { min-height: 44px; } }
/* the state, and under it what a published event means: the hint keeps the reading measure */
.evf-status { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; }
.evf-status .hint { font-size: .875rem; max-width: var(--measure); }
/* the hint keeps the 16 px of the stack: apart from the title above and from the error summary of a failed save */
#evf-code-hint { max-width: var(--measure); margin: 16px 0 0; }
.evf-block > h3 { margin-bottom: 14px; }
.evf-block > * + * { margin-top: 16px; }
.evf-block > h3 + * { margin-top: 0; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.link-row .input { flex: 1 1 16rem; min-width: 0; font-variant-numeric: tabular-nums; }
.link-row .btn { flex: 0 0 auto; }
/* the colour bands: one choice per line, each with its swatch, under the hint */
.band-options { display: grid; gap: 10px; margin-top: 12px; }
/* «−2:00 (UTC+3)» needs no more than the width of a date field; the hint under it keeps both columns */
#evf-offset { max-width: 22rem; }
.band-option { align-items: center; }
.band-option .strip { flex: none; width: 64px; height: 8px; }
.band-option > span:last-child { min-width: 0; }
/* the preview of the landing card in the three languages: a picture of the card, not a control */
.preview-langs { display: flex; flex-wrap: wrap; gap: 6px; }
.preview-langs .btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.evf-preview { max-width: 36rem; padding: 4px 0 0; }
.evf-preview .event-card { box-shadow: var(--shadow-sm); }
#evf-message:not(:empty) { margin-top: 16px; }
/* below 768 px the pairs of languages and the dates stand one under the other (EVENTS.md § 4.8) */
@media (max-width: 767.98px) {
  [data-panel="events"] .fields-2 { grid-template-columns: minmax(0, 1fr); }
  [data-panel="events"] .fields-2 .span-2 { grid-column: auto; }
}
@media (max-width: 479.98px) {
  #evf-actions .btn, #landing-form .form-actions .btn { flex: 1 1 auto; }
}

/* ---------- 19. Motion & print ---------- */
@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, .site-footer, .mobile-cta, .lang-switch, .burger, .app-nav, .toasts { display: none !important; }
  body { background: #FFFFFF; }
  .card { box-shadow: none; break-inside: avoid; }
}
