/* ============================================================
   Банк идей — оформление.
   Одна семья с остальными продуктами: та же красно-графитовая палитра,
   та же типографика Inter 800 с плотным трекингом, те же радиусы и
   слоистые тени. Приложение плотнее лендинга, но воздух и ритм те же.
   ============================================================ */

/* ------------------------------------------------------------- Токены */

:root {
  --red: #E11B22;
  --red-dark: #B3141A;
  --red-light: #FF3B41;
  --graphite: #16171A;
  --graphite-soft: #1F2126;

  --surface: #F4F5F7;
  --surface-2: #EBEDF1;
  --card: #FFFFFF;
  --line: #E3E6EA;
  --line-soft: #EEF0F3;

  --ink: var(--graphite);
  --ink-soft: #4E535C;
  --ink-muted: #7E848E;

  --ok: #17794C;
  --ok-soft: #E7F5EE;
  --warn: #9A6206;
  --warn-soft: #FDF3E2;
  --info: #1F5FBF;
  --info-soft: #EAF1FD;
  --danger: var(--red-dark);
  --danger-soft: #FDECEC;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --pill: 999px;

  --shadow-sm: 0 2px 8px rgba(22, 23, 26, .05);
  --shadow: 0 10px 30px rgba(22, 23, 26, .08);
  --shadow-lg: 0 26px 60px rgba(22, 23, 26, .14);
  --shadow-red: 0 10px 26px rgba(225, 27, 34, .28);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --header-h: 68px;
  --wrap: 1200px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --surface: #0E1013;
  --surface-2: #15181C;
  --card: #17191E;
  --line: #262A31;
  --line-soft: #1F232A;

  --ink: #EEF0F4;
  --ink-soft: #B4BAC4;
  --ink-muted: #858C97;

  --ok-soft: #12251C;
  --warn-soft: #2A2113;
  --info-soft: #131E30;
  --danger-soft: #2B1618;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, .55);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --surface: #0E1013;
    --surface-2: #15181C;
    --card: #17191E;
    --line: #262A31;
    --line-soft: #1F232A;
    --ink: #EEF0F4;
    --ink-soft: #B4BAC4;
    --ink-muted: #858C97;
    --ok-soft: #12251C;
    --warn-soft: #2A2113;
    --info-soft: #131E30;
    --danger-soft: #2B1618;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
    --shadow: 0 12px 32px rgba(0, 0, 0, .45);
    --shadow-lg: 0 28px 64px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

/* Шрифт лежит рядом: в закрытом контуре интернета может не быть вовсе,
   а ссылка на внешний CDN — это задержка на каждой странице. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}

/* ------------------------------------------------------------- Основа */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  /* Мягкое свечение сверху — то же, что на лендинге, только тише:
     здесь работают, а не любуются. */
  background-image:
    radial-gradient(90% 55% at 50% -10%, color-mix(in srgb, var(--red) 7%, transparent) 0%, transparent 60%),
    radial-gradient(70% 50% at 100% 0%, color-mix(in srgb, var(--info) 5%, transparent) 0%, transparent 55%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.022em;
}

p { margin: 0 0 .85em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }

img, svg { max-width: 100%; }

button, input, textarea, select { font: inherit; color: inherit; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--surface-2);
  padding: .15em .4em;
  border-radius: 6px;
}

::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--red) 45%, transparent);
  outline-offset: 2px;
  border-radius: 8px;
}

.muted { color: var(--ink-muted); }
.small { font-size: 13px; line-height: 1.5; }
.nowrap { white-space: nowrap; }

/* Числа в таблицах и счётчиках — моноширинными цифрами, иначе колонки
   пляшут при каждом обновлении. */
.tabular, .table td, .tile__value, .vote__count, .hero__stats dd { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 16px; top: 12px; z-index: 60;
  background: var(--card); padding: 12px 18px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
}

.icon {
  width: 20px; height: 20px;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -.22em;
}
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 26px; height: 26px; }
.icon--text { font-style: normal; }

.page {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px max(20px, env(safe-area-inset-left)) calc(72px + env(safe-area-inset-bottom));
}

/* ------------------------------------------------------------- Шапка */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line-soft);
}

.top__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 10px max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand:hover { color: inherit; }
.brand__mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--red-light), var(--red-dark));
  color: #fff;
  box-shadow: var(--shadow-red);
}
.brand__mark .icon { width: 22px; height: 22px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name { font-weight: 800; letter-spacing: -.02em; font-size: 16px; }
.brand__tagline { font-size: 12px; color: var(--ink-muted); }

.nav { display: flex; gap: 2px; flex: 1; }
.nav__item {
  padding: 8px 14px;
  border-radius: var(--pill);
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav__item:hover { background: var(--surface-2); color: var(--ink); }
.nav__item.is-active {
  background: var(--graphite);
  color: #fff;
  font-weight: 600;
}
:root[data-theme="dark"] .nav__item.is-active { background: #fff; color: var(--graphite); }

.top__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.iconbtn {
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--ink-soft);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.iconbtn:hover { background: var(--line); color: var(--ink); }
.iconbtn__badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--pill);
  background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 19px;
  text-align: center;
  border: 2px solid var(--card);
}

.menu { position: relative; }
.menu__summary { list-style: none; cursor: pointer; display: block; }
.menu__summary::-webkit-details-marker { display: none; }
.menu__drop {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 260px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 40;
}
.menu__head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.menu__name { font-weight: 700; }
.menu__sub { font-size: 13px; color: var(--ink-muted); }
.menu__points {
  display: inline-block; margin-top: 6px;
  padding: 2px 10px; border-radius: var(--pill);
  background: color-mix(in srgb, var(--red) 10%, transparent);
  color: var(--red); font-size: 12.5px; font-weight: 700;
}
.menu__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--ink-soft);
}
.menu__item:hover { background: var(--surface-2); color: var(--ink); }
.menu__item--form { padding: 0; }
.menu__item--form .linkbtn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px; text-decoration: none; font-size: 14.5px;
}

/* ------------------------------------------------------------- Кнопки */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600; font-size: 15px;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease),
              background .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn--primary {
  background: linear-gradient(160deg, var(--red-light), var(--red));
  color: #fff;
  box-shadow: var(--shadow-red);
}
.btn--primary:hover:not(:disabled) { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 32px rgba(225, 27, 34, .34); }
.btn--primary:active:not(:disabled) { transform: translateY(0); }

.btn--ghost { background: var(--card); border-color: var(--line); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--ink-muted); color: var(--ink); }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { color: #fff; }

.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--wide { width: 100%; }

.linkbtn {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: 14px; font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
}
.linkbtn:hover { color: var(--red); }
.linkbtn--danger { color: var(--danger); }

/* ------------------------------------------------------------- Поля */

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input::placeholder { color: var(--ink-muted); }
.input:hover { border-color: color-mix(in srgb, var(--ink-muted) 55%, var(--line)); }
.input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent);
}
.input.is-error { border-color: var(--red); background: var(--danger-soft); }
.input--sm { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.input--inline { width: auto; display: inline-block; }
.input--multi { padding: 8px; }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.55; }
select.input { cursor: pointer; }
input[type="color"].input { padding: 5px; height: 46px; cursor: pointer; }
input[type="file"].input { padding: 10px; background: var(--surface-2); cursor: pointer; }

.label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.hint { font-size: 13px; color: var(--ink-muted); margin: 7px 0 0; line-height: 1.5; }
.field { margin-bottom: 20px; }

.form__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.form__foot--sticky {
  position: sticky; bottom: 0;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  z-index: 10;
}

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--red); width: 17px; height: 17px; }
.check--block span { display: block; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks-row { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
.checks-col { display: grid; gap: 12px; align-content: start; }

.fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 20px;
  background: var(--surface-2);
}
.fieldset__legend {
  padding: 0 8px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted);
}

.inline-form { display: flex; gap: 8px; align-items: center; }

/* ------------------------------------------------------------- Блоки */

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.stack { display: grid; gap: 14px; }
.block { margin: 40px 0; }
.block__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.block__title { font-size: 22px; }
.block__hint { color: var(--ink-muted); font-size: 14px; margin: 0; }
.block__more {
  margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px;
}
.block__more:hover { color: var(--red); }
.block-form { margin-bottom: 20px; }
.block-form__title { font-size: 18px; margin-bottom: 20px; }

.head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head__title { font-size: 34px; letter-spacing: -.03em; }
.head__count {
  color: var(--ink-muted); font-size: 14px; font-weight: 600;
  padding: 4px 12px; border-radius: var(--pill); background: var(--surface-2);
}

.lead { color: var(--ink-soft); max-width: 68ch; margin-bottom: 24px; font-size: 16.5px; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }

/* Надзаголовок: мелкий, разряжённый, акцентного цвета. */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--red);
}

/* ------------------------------------------------------------- Витрина */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 44px 48px;
  background:
    radial-gradient(120% 140% at 88% -20%, rgba(225, 27, 34, .55) 0%, rgba(225, 27, 34, .12) 42%, transparent 70%),
    linear-gradient(155deg, #24262C 0%, var(--graphite) 55%, #0D0E11 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 40px;
  align-items: center;
}
.hero__text { max-width: 620px; }
.hero__panel { display: grid; gap: 16px; }
.hero__title {
  font-size: clamp(30px, 4.2vw, 46px);
  letter-spacing: -.035em;
  margin: 14px 0 0;
  color: #fff;
}
.hero__sub {
  color: rgba(255, 255, 255, .72);
  margin: 16px 0 26px;
  font-size: 16.5px;
  max-width: 54ch;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn--ghost {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .22);
  color: #fff;
}
.hero .btn--ghost:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); color: #fff; }
.hero .eyebrow { color: var(--red-light); }

/* Показатели — стеклянными плитками справа: раньше правая половина тёмного
   поля пустовала, и было видно, что макет не дописали. */
.hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.hero__stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
}
.hero__stats dt { font-size: 12px; color: rgba(255, 255, 255, .62); }
.hero__stats dd {
  margin: 4px 0 0;
  font-size: 28px; font-weight: 800; letter-spacing: -.035em;
  color: #fff; line-height: 1.1;
}

.hero__steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
  font-size: 13.5px; color: rgba(255, 255, 255, .74);
}
.hero__steps li { display: flex; align-items: center; gap: 10px; }
.hero__step-num {
  width: 22px; height: 22px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(225, 27, 34, .22);
  border: 1px solid rgba(255, 59, 65, .5);
  color: #FF6B70;
  font-size: 11.5px; font-weight: 700;
}

.callouts { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.callout {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-radius: var(--pill);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 14.5px; font-weight: 500;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease);
}
.callout:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--ink); }
.callout .icon { color: var(--red); }
.callout--warn .icon { color: var(--warn); }

.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
.section {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .22s var(--ease), border-color .18s var(--ease);
}
.section::after {
  content: "";
  position: absolute; inset: auto -30% -60% auto;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--section, var(--red)) 22%, transparent) 0%, transparent 70%);
  opacity: 0; transition: opacity .25s var(--ease);
}
.section:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); color: var(--ink); }
.section:hover::after { opacity: 1; }
.section__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: color-mix(in srgb, var(--section, var(--red)) 12%, transparent);
  color: var(--section, var(--red));
  margin-bottom: 4px;
}
.section__icon .icon { width: 22px; height: 22px; }
.section__name { font-weight: 700; font-size: 17px; letter-spacing: -.015em; }
.section__desc { color: var(--ink-muted); font-size: 14px; flex: 1; line-height: 1.5; }
.section__foot {
  display: flex; gap: 10px; align-items: center;
  font-size: 13px; color: var(--ink-muted); margin-top: 10px;
}
.section__pending {
  color: var(--warn); font-weight: 600;
  background: var(--warn-soft); padding: 2px 9px; border-radius: var(--pill);
}

/* --------------------------------------------------------- Карточка идеи */

.idea {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "vote body" "void progress";
  gap: 12px 18px;
  padding: 20px 22px;
  transition: transform .18s var(--ease), box-shadow .22s var(--ease), border-color .18s var(--ease);
}
.idea__vote { grid-area: vote; }
.idea__body { grid-area: body; }
.idea .progress { grid-area: progress; margin-top: 0; }
.idea__num--right { margin-left: auto; }
.idea:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line); }
.idea__body { min-width: 0; }
.idea__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.idea__num { color: var(--ink-muted); font-size: 13px; font-weight: 600; }
.idea__title { font-size: 19px; letter-spacing: -.02em; margin-bottom: 8px; }
.idea__title a:hover { color: var(--red); }
.idea__excerpt { color: var(--ink-soft); font-size: 15px; margin-bottom: 14px; line-height: 1.55; }
.idea__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13.5px; color: var(--ink-muted);
}
.idea__stats { display: inline-flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.idea__foot .person { min-width: 0; }
.idea__foot .person__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea__dot { color: var(--line); }
.idea__savings { color: var(--ok); font-weight: 600; }
.idea__comments { display: inline-flex; align-items: center; gap: 5px; }
.idea__comments:hover { color: var(--red); }

.vote { margin: 0; }
.vote__btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 60px; padding: 11px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: transform .16s var(--ease), border-color .18s var(--ease),
              background .18s var(--ease), color .18s var(--ease), box-shadow .2s var(--ease);
}
.vote__btn:hover:not(:disabled) {
  border-color: var(--red); color: var(--red);
  transform: translateY(-1px);
}
.vote__btn.is-voted {
  background: linear-gradient(160deg, var(--red-light), var(--red));
  border-color: transparent; color: #fff;
  box-shadow: var(--shadow-red);
}
.vote__btn:disabled { opacity: .5; cursor: not-allowed; }
.vote__arrow { display: block; }
.vote__arrow .icon { width: 18px; height: 18px; }
.vote__count { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }

.progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.progress__bar { order: 2; }
.progress__text { order: 1; }
.progress__bar {
  appearance: none; -webkit-appearance: none;
  width: 190px; height: 7px;
  border: 0; border-radius: var(--pill);
  background: var(--surface-2);
  overflow: hidden;
}
.progress__bar::-webkit-progress-bar { background: var(--surface-2); border-radius: var(--pill); }
.progress__bar::-webkit-progress-value {
  background: linear-gradient(90deg, var(--red-light), var(--red));
  border-radius: var(--pill);
}
.progress__bar::-moz-progress-bar { background: var(--red); border-radius: var(--pill); }
.progress__text { font-size: 13px; color: var(--ink-muted); }

/* ------------------------------------------------------------- Мелочи */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  border-radius: var(--pill);
  font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); color: var(--ink-soft);
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .85;
}
.badge--muted { background: var(--surface-2); color: var(--ink-muted); }
.badge--neutral { background: var(--surface-2); color: var(--ink-soft); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--accent { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.badge--success { background: var(--ok-soft); color: var(--ok); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12.5px; font-weight: 500; color: var(--ink-soft);
}
.chip:hover { border-color: var(--section, var(--red)); color: var(--ink); }
.chip .icon { width: 14px; height: 14px; color: var(--section, var(--red)); }
.chip--nominated { border-color: color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); }
.chip--official { border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); background: var(--ok-soft); }
.chip--perm { margin: 0 5px 5px 0; }

.avatar {
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--surface-2), var(--line));
  color: var(--ink-soft);
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 auto;
}
.avatar--xs { width: 26px; height: 26px; font-size: 10px; }
.avatar--sm { width: 38px; height: 38px; font-size: 13px; }
.avatar--lg { width: 84px; height: 84px; font-size: 28px; }
.avatar__img { width: 100%; height: 100%; object-fit: cover; }

.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.person__name { font-weight: 600; color: var(--ink); font-size: 14px; }
.person:hover .person__name { color: var(--red); }
.person__dept { color: var(--ink-muted); font-size: 13px; }
.faces { display: flex; flex-wrap: wrap; gap: 5px; }

.flash {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--ok-soft);
  border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent);
  color: var(--ok);
  margin-bottom: 22px;
  font-size: 14.5px; font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.flash--error {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 25%, transparent);
  color: var(--danger);
}
.flash__icon { font-size: 15px; }
.flash--toast {
  position: fixed;
  left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  background: var(--graphite); color: #fff; border-color: transparent;
  box-shadow: var(--shadow-lg);
}

.empty {
  text-align: center; padding: 56px 24px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-muted);
}
.empty__icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 24px;
}
.empty__title { font-weight: 700; color: var(--ink); margin-bottom: 6px; font-size: 17px; }
.empty__text { font-size: 14.5px; max-width: 46ch; margin: 0 auto; }

.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 32px 0; }
.pager__item {
  padding: 10px 20px; border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--card); font-size: 14.5px; font-weight: 600;
}
.pager__item:hover { border-color: var(--red); color: var(--red); }
.pager__count { color: var(--ink-muted); font-size: 14px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.tabs__item {
  padding: 9px 18px; border-radius: var(--pill); font-size: 14.5px; font-weight: 500;
  color: var(--ink-soft); background: var(--card); border: 1px solid var(--line-soft);
}
.tabs__item:hover { border-color: var(--line); color: var(--ink); }
.tabs__item.is-active { background: var(--graphite); color: #fff; border-color: transparent; font-weight: 600; }
:root[data-theme="dark"] .tabs__item.is-active { background: #fff; color: var(--graphite); }
.tabs--sm { margin: 0 0 0 auto; }
.tabs--sm .tabs__item { padding: 5px 12px; font-size: 13px; }

.subnav {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 28px;
  padding: 6px; background: var(--surface-2); border-radius: var(--pill);
  width: fit-content;
}
.subnav__item { padding: 8px 16px; border-radius: var(--pill); font-size: 14.5px; color: var(--ink-soft); font-weight: 500; }
.subnav__item:hover { color: var(--ink); }
.subnav__item.is-active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.filters .input { width: auto; min-width: 160px; }
.filters__search { flex: 1; min-width: 240px !important; }

/* На большом экране поля отбора стоят в одной строке с поиском, кнопка
   «Фильтры» не нужна: display: contents убирает обёртку из раскладки. */
.filters__fields { display: contents; }
.filters__toggle { display: none; }

/* Подпись у кнопки голоса нужна там, где кнопка широкая, — на телефоне. */
.vote__label { display: none; }

/* ------------------------------------------------------------- Таблицы */

.table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-muted);
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}
.table td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table__num { color: var(--ink-muted); width: 1%; font-weight: 700; }
.table__strong { font-weight: 700; }
.table__actions { text-align: right; white-space: nowrap; }
.table__actions form { display: inline-block; margin-left: 12px; }
.table--dense td, .table--dense th { padding: 10px 14px; font-size: 13.5px; }
.is-off { opacity: .5; }
.perms { max-width: 430px; }

/* --------------------------------------------------------- Страница идеи */

.idea-page__head { margin-bottom: 26px; }
.idea-page__meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.idea-page__title { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.032em; margin-bottom: 16px; }
.idea-page__byline { display: flex; gap: 16px; align-items: center; color: var(--ink-muted); font-size: 14px; flex-wrap: wrap; }
.idea-page__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.idea-page__main { display: grid; gap: 16px; min-width: 0; }
.idea-page__side { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); }

.block-text__title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-muted); margin-bottom: 12px; font-weight: 700;
}
.block-text p { font-size: 16px; line-height: 1.65; }
.facts { display: flex; gap: 34px; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.facts dt { font-size: 12.5px; color: var(--ink-muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }

.decision { border-left: 4px solid var(--ok); background: linear-gradient(90deg, var(--ok-soft), var(--card) 40%); }
.decision--rejected { border-left-color: var(--danger); background: linear-gradient(90deg, var(--danger-soft), var(--card) 40%); }
.decision__meta { color: var(--ink-muted); font-size: 13.5px; margin-top: 10px; }

.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.files__item {
  display: flex; align-items: center; gap: 12px; font-size: 14.5px;
  padding: 10px 14px; border-radius: 12px; background: var(--surface-2);
}
.files__link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.files__link .icon { color: var(--ink-muted); }
.files__size { color: var(--ink-muted); font-size: 13px; }
.files__del { margin-left: auto; }
.upload { display: grid; gap: 10px; }

.side__title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-muted); margin-bottom: 14px; font-weight: 700;
}
.side-vote { display: grid; justify-items: center; gap: 14px; text-align: center; }
.side-vote .vote__btn { width: 86px; padding: 16px 0; border-radius: var(--radius); }
.side-vote .vote__count { font-size: 24px; }
.side-vote__text { font-size: 14px; color: var(--ink-soft); }
.side-vote .progress__bar { width: 100%; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line-soft);
}
.timeline__item { display: flex; gap: 14px; font-size: 14px; position: relative; }
.timeline__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--red);
  margin-top: 5px; flex: 0 0 auto; z-index: 1;
}
.timeline__title { font-weight: 600; }
.timeline__note { color: var(--ink-soft); font-size: 13.5px; }
.timeline__time, .timeline__who { color: var(--ink-muted); font-size: 12.5px; }

.actions { display: grid; gap: 14px; }
.actions__form { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.actions__row { display: flex; gap: 10px; }
.actions__row .btn { flex: 1; }

/* ------------------------------------------------------------ Обсуждение */

.comments { display: grid; gap: 20px; }
.comment-form { display: grid; gap: 12px; }
.comment-form__reply { font-size: 13.5px; color: var(--ink-muted); }
.comment-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.comment-list--nested { margin: 16px 0 0 26px; padding-left: 18px; border-left: 2px solid var(--line-soft); }
.comment { font-size: 15px; }
.comment--official {
  border-left: 4px solid var(--ok); padding: 14px 16px;
  background: var(--ok-soft); border-radius: 0 var(--radius) var(--radius) 0;
}
.comment--hidden { opacity: .6; }
.comment__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.comment__time { color: var(--ink-muted); font-size: 12.5px; }
.comment__body { margin: 0 0 8px; line-height: 1.6; }
.comment__foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.comment__mod { display: flex; gap: 8px; align-items: center; }

/* ------------------------------------------------------------- Профиль */

.profile { display: grid; gap: 10px; }
.profile__card { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profile__info { flex: 1; min-width: 220px; }
.profile__name { font-size: 26px; letter-spacing: -.03em; }
.profile__sub { color: var(--ink-soft); }
.profile__login { color: var(--ink-muted); font-size: 13.5px; }
.profile__stats { display: flex; gap: 30px; margin: 0; flex-wrap: wrap; }
.profile__stats dt { font-size: 12.5px; color: var(--ink-muted); }
.profile__stats dd { margin: 4px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 12px; }
.badge-card {
  display: grid; justify-items: center; gap: 4px; text-align: center;
  padding: 20px 14px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.badge-card__icon { font-size: 30px; line-height: 1; }
.badge-card__name { font-weight: 700; font-size: 14px; }
.badge-card__date { color: var(--ink-muted); font-size: 12.5px; }

/* ------------------------------------------------------------- Очереди */

.queue { display: flex; gap: 24px; }
.queue__body { flex: 1; min-width: 0; }
.queue__title { font-size: 19px; letter-spacing: -.02em; margin: 10px 0 8px; }
.queue__text { color: var(--ink-soft); font-size: 15px; }
.queue__meta { display: flex; gap: 18px; color: var(--ink-muted); font-size: 13px; margin-top: 12px; flex-wrap: wrap; }
.queue__actions { flex: 0 0 250px; display: grid; gap: 10px; align-content: start; }
.queue__return { display: grid; gap: 8px; }

/* ---------------------------------------------------------- Уведомления */

.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.note {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.note--unread { border-left: 4px solid var(--red); }
.note__body { flex: 1; min-width: 0; }
.note__title { font-weight: 700; }
.note__text { color: var(--ink-soft); font-size: 14.5px; }
.note__time { color: var(--ink-muted); font-size: 12.5px; }

/* ------------------------------------------------------------ Управление */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 32px; }
.tile {
  padding: 22px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .22s var(--ease);
}
a.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.tile--warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: linear-gradient(160deg, var(--warn-soft), var(--card) 60%); }
.tile--accent { border-color: color-mix(in srgb, var(--red) 35%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--red) 8%, transparent), var(--card) 60%); }
.tile__label { font-size: 12.5px; color: var(--ink-muted); font-weight: 500; }
.tile__value { font-size: 32px; font-weight: 800; letter-spacing: -.035em; margin-top: 6px; }
.tile__value--sm { font-size: 21px; }

.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.funnel__row { display: grid; grid-template-columns: 176px 1fr 120px; gap: 16px; align-items: center; font-size: 14.5px; }
.funnel__bar {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 12px; border: 0; border-radius: var(--pill); background: var(--surface-2);
}
.funnel__bar::-webkit-progress-bar { background: var(--surface-2); border-radius: var(--pill); }
.funnel__bar::-webkit-progress-value { background: linear-gradient(90deg, var(--red-light), var(--red)); border-radius: var(--pill); }
.funnel__bar::-moz-progress-bar { background: var(--red); border-radius: var(--pill); }
.funnel__value { text-align: right; font-weight: 700; }

.chart { display: grid; gap: 12px; }
.chart__svg { width: 100%; height: 200px; }
.chart__bar { fill: var(--red); opacity: .85; }
.chart__axis { stroke: var(--line); stroke-width: .5; }

.prose { max-width: 76ch; }
.prose h2 { font-size: 20px; margin: 28px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.prose ol, .prose ul { padding-left: 24px; color: var(--ink-soft); }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); }

/* --------------------------------------------------------------- Вход */

.auth { min-height: 72vh; min-height: 72svh; display: grid; place-items: center; }
.auth__card { width: 100%; max-width: 420px; padding: 34px 32px; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.auth__mark {
  width: 52px; height: 52px; margin: 0 auto 18px;
  display: grid; place-items: center; border-radius: 15px;
  background: linear-gradient(150deg, var(--red-light), var(--red-dark));
  color: #fff; box-shadow: var(--shadow-red);
}
.auth__mark .icon { width: 28px; height: 28px; }
.auth__title { font-size: 25px; text-align: center; letter-spacing: -.03em; }
.auth__sub { color: var(--ink-muted); text-align: center; font-size: 14.5px; margin: 8px 0 26px; }
.auth__hint { text-align: center; }

.errpage { text-align: center; padding: 72px 20px; }
.errpage__icon { font-size: 44px; margin-bottom: 16px; }
.errpage__title { font-size: 30px; margin-bottom: 10px; letter-spacing: -.03em; }
.errpage__text { color: var(--ink-soft); margin-bottom: 26px; }

/* -------------------------------------------------------------- Подвал */

.foot { border-top: 1px solid var(--line-soft); background: var(--card); margin-top: 40px; }
.foot__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  color: var(--ink-muted); font-size: 13.5px;
}
.foot__links { display: flex; gap: 20px; }

/* ------------------------------------------------------------- Касание */

.btn, .linkbtn, .nav__item, .iconbtn, .tabs__item, .chip, .vote__btn,
.subnav__item, .pager__item, .section, .callout, .tile, summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

:target, [id^="comment-"], #comments { scroll-margin-top: calc(var(--header-h) + 20px); }

/* Нижняя панель навигации и «мобильные» пункты меню появляются только на
   телефоне (см. медиазапрос ниже). Правило стоит здесь, до него: одинаковая
   специфичность решается порядком, и правило после медиазапроса погасило бы
   панель на телефоне тоже. */
.mobile-bar, .tabbar { display: none; }
.menu__item--mobile { display: none; }

/* Клавиатура открыта (класс ставит скрипт по visualViewport): нижние полосы
   садятся ровно поверх поля, в которое человек печатает. */
.kb-open .mobile-bar, .kb-open .tabbar { display: none !important; }

/* ---------------------------------------------------------- Узкий экран */

@media (max-width: 1040px) {
  .idea-page__grid { grid-template-columns: minmax(0, 1fr); }
  .idea-page__side { position: static; }
  .columns { grid-template-columns: minmax(0, 1fr); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 36px; grid-template-columns: minmax(0, 1fr); }
  .queue__actions { flex-basis: 210px; }
}

/* Телефон. Три вещи, которые ломаются здесь сильнее всего: масштабирование
   при фокусе в поле, недостижимые пальцем цели и содержимое под клавиатурой. */
@media (max-width: 760px) {
  .page { padding: 20px 16px calc(48px + env(safe-area-inset-bottom)); }

  /* Ровно 16px: Safari на iOS увеличивает страницу при фокусе в поле с более
     мелким шрифтом, и вернуть масштаб человек уже не может. Отключать
     масштабирование через user-scalable нельзя — это ломает доступность. */
  .input, .btn, select, textarea, input { font-size: 16px; }

  .input, .btn, .nav__item, .tabs__item, .subnav__item, .pager__item { min-height: 46px; }
  .btn { padding: 13px 20px; }
  .btn--sm { min-height: 42px; }
  .iconbtn { width: 46px; height: 46px; }

  /* Шапка в одну строку и не выше 56 точек: разделы уехали вниз, в
     панель под большим пальцем. Раньше шапка занимала три строки и
     треть экрана телефона. */
  :root { --header-h: 56px; }
  .top__inner { flex-wrap: nowrap; gap: 10px; min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
  .brand__tagline { display: none; }
  .brand__mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand__mark .icon { width: 19px; height: 19px; }
  .brand__name { font-size: 15.5px; }
  .nav { display: none; }
  .top__actions .btn--primary { display: none; }
  .top__actions { gap: 8px; }
  .iconbtn { width: 40px; height: 40px; }
  .menu__item--mobile { display: flex; }

  /* Место под нижнюю панель, чтобы последняя карточка не пряталась. */
  .page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  /* Подвал на телефоне не показываем: он упирался в нижнюю панель, а его
     ссылки есть в меню профиля. */
  .foot { display: none; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 28;
    display: flex; align-items: center; justify-content: space-around;
    padding: 6px max(8px, env(safe-area-inset-left))
             calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    background: color-mix(in srgb, var(--card) 92%, transparent);
    backdrop-filter: saturate(1.6) blur(18px);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border-top: 1px solid var(--line-soft);
  }
  .tabbar__item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px;
    min-height: 52px;
    font-size: 11px; font-weight: 600;
    color: var(--ink-muted);
    border-radius: 14px;
  }
  .tabbar__item .icon { width: 22px; height: 22px; }
  .tabbar__item.is-active { color: var(--red); }
  .tabbar__item:active { background: var(--surface-2); }

  /* Подача идеи — единственное действие, ради которого сюда приходят:
     она вынесена в центр отдельной кнопкой. */
  .tabbar__add {
    flex: 0 0 auto;
    width: 54px; height: 54px; margin: -18px 4px 0;
    display: grid; place-items: center;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--red-light), var(--red));
    color: #fff;
    box-shadow: var(--shadow-red);
    border: 4px solid var(--surface);
  }
  .tabbar__add .icon { width: 24px; height: 24px; }

  /* Меню профиля — выпадающим под аватаром, а не листом снизу.
     Лист снизу требует position: fixed, а у шапки backdrop-filter: такой
     предок сам становится системой координат для fixed, и меню прилипало
     к низу шапки, уезжая за верхний край экрана. */
  .menu__drop {
    position: absolute;
    top: calc(100% + 10px); right: 0; left: auto; bottom: auto;
    width: min(300px, calc(100vw - 24px));
    max-height: calc(100vh - var(--header-h) - 40px);
    max-height: calc(100dvh - var(--header-h) - 40px);
    overflow-y: auto; overscroll-behavior: contain;
    padding: 8px;
    min-width: 0;
  }
  .menu__item, .menu__item--form .linkbtn { padding: 12px; font-size: 15px; }

  .hero { padding: 22px 18px; border-radius: var(--radius-lg); gap: 20px; grid-template-columns: minmax(0, 1fr); }
  .hero__steps { display: none; }
  .hero__title { font-size: 24px; }
  .hero__sub { font-size: 15px; margin: 12px 0 18px; }
  .hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero__actions .btn { padding: 12px 10px; font-size: 14.5px; }
  .hero__stat { padding: 11px 13px; border-radius: 14px; }
  .hero__stats { gap: 10px; }
  .hero__stats dd { font-size: 22px; }
  .hero .eyebrow { font-size: 11px; }
  .hero__stats { gap: 20px 26px; }
  .hero__stats dd { font-size: 26px; }
  .hero__actions .btn { flex: 1 1 auto; white-space: nowrap; }

  .head__title { font-size: 26px; }
  .block { margin: 30px 0; }
  .block__title { font-size: 19px; }
  .card { padding: 18px; border-radius: var(--radius); }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .columns { gap: 10px; }
  .sections { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
  .section { padding: 16px; }

  /* Поиск на виду, остальное — под кнопкой «Фильтры»: три выпадающих списка
     и кнопка занимали весь первый экран, и до самих идей приходилось
     прокручивать. */
  .filters { gap: 8px; }
  .filters .input, .filters__search { width: 100%; min-width: 0 !important; }
  .filters .btn { width: 100%; }
  .filters { align-items: center; }
  .filters .filters__search { flex: 1 1 auto; width: auto; min-width: 0 !important; }
  /* Поля прячет скрипт (класс is-collapsible): без скрипта они просто
     видны — это рабочее состояние, а не поломка. */
  .filters__fields { display: grid; gap: 8px; flex: 1 1 100%; width: 100%; margin-top: 2px; }
  .filters.is-collapsible .filters__fields { display: none; }
  .filters.is-collapsible.is-open .filters__fields { display: grid; }
  .filters.is-collapsible .filters__toggle { display: inline-flex; }
  .filters.is-collapsible.is-open .filters__toggle { background: var(--surface-2); color: var(--ink); }
  .filters__apply { margin-top: 2px; }
  .filters__toggle {
    align-items: center; gap: 8px;
    padding: 11px 18px; min-height: 46px;
    border: 1px solid var(--line); border-radius: var(--pill);
    background: var(--card); color: var(--ink-soft);
    font-size: 15px; font-weight: 600;
    cursor: pointer; list-style: none;
  }


  /* Карточки разделов — плитками: описание на телефоне читают редко, а места
     оно занимало по половине экрана на каждую. */
  .section__desc { display: none; }
  .section { padding: 14px; gap: 6px; border-radius: var(--radius); }
  .section__icon { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 2px; }
  .section__icon .icon { width: 20px; height: 20px; }
  .section__name { font-size: 15px; }
  .section__foot { margin-top: 4px; font-size: 12.5px; }

  /* Карточка идеи: голос уезжает вниз широкой кнопкой, текст занимает всю
     ширину. В два столбца на 412 точках заголовок ломался по слогам. */
  /* Тело во всю ширину, под ним строка: слева кнопка голоса, справа
     полоса поддержки с подписью. Кнопка во всю ширину съедала карточку. */
  .idea {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "body body" "vote progress";
    align-items: center;
    gap: 12px 14px;
  }
  .idea .vote__btn { width: auto; flex-direction: row; gap: 8px; padding: 11px 16px; }
  .idea .vote__label { display: inline; font-size: 14.5px; font-weight: 600; }
  .idea .vote__count { font-size: 16px; }
  .idea__excerpt {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden; margin-bottom: 10px;
  }
  .idea__foot { gap: 10px; font-size: 12.5px; }
  .idea__stats { gap: 10px; }
  /* Полоса поддержки: линия во всю ширину, подпись под ней одной строкой.
     Раньше подпись стояла сбоку и рвалась на две строки. */
  .idea .progress { flex-direction: column; align-items: flex-end; gap: 5px; }
  .progress__bar { width: 100%; height: 5px; }
  .progress__text { font-size: 12px; white-space: nowrap; }
  .progress__tail { display: none; }

  .idea { padding: 16px; gap: 14px; }
  .idea__title { font-size: 17px; }
  .progress__bar { width: 100%; }

  .idea-page__title { font-size: 24px; }
  .idea-page { padding-bottom: 24px; }

  .queue { flex-direction: column; gap: 16px; }
  .queue__actions { flex: auto; }

  .table-wrap { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .table { min-width: 580px; }
  .table--dense { min-width: 720px; }

  .subnav { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .subnav::-webkit-scrollbar { display: none; }
  .funnel__row { grid-template-columns: 108px 1fr 78px; gap: 10px; font-size: 13px; }
  .profile__stats { gap: 18px 22px; }
  .profile__stats dd { font-size: 20px; }
  .comment-list--nested { margin-left: 12px; padding-left: 12px; }

  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    display: flex; align-items: center; gap: 10px;
    padding: 10px max(14px, env(safe-area-inset-left))
             calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-right));
    background: color-mix(in srgb, var(--card) 88%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .mobile-bar .vote__btn { flex-direction: row; gap: 10px; width: auto; padding: 12px 20px; }
  .mobile-bar__item { flex: 1; justify-content: center; white-space: nowrap; font-size: 14px; padding: 12px 10px; }
}

@media (max-width: 400px) {
  .hero__title { font-size: 25px; }
  .top__actions .btn--primary { padding: 11px 14px; font-size: 14px; }
  .section { padding: 14px; }
  .section__icon { width: 38px; height: 38px; border-radius: 11px; }
  .section__desc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Печать: распечатать карточку идеи на совещание, где решение и принимается. */
@media print {
  .top, .foot, .idea-page__side, .filters, .pager, .comment-form,
  .mobile-bar, .tabbar { display: none; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
  .idea-page__grid { grid-template-columns: 1fr; }
}
