/*
  «Среда решений» – публичная главная, этап миграции 1.
  Отдельный stylesheet намеренно не заменяет legacy css/style.css.
*/

:root {
  --primary: #40A89C;
  --primary-dark: #137B74;
  --secondary: #0AD1C9;
  --blue: #0B57E5;
  --accent: #E13363;
  --surface: #FFFFFF;
  --surface-soft: #F6FAF9;
  --bg: #F1F1F1;
  --text: #232323;
  --muted: #687776;
  --line: #DCE8E6;
  --shadow: 0 18px 60px rgba(27, 98, 92, .10);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --container: 1240px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  font-family: "Montserrat", "Avenir Next Cyr", "Segoe UI", Arial, sans-serif;
}
html, body { margin: 0; padding: 0; min-width: 320px; }
body {
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Наследуем базовый шрифт с html: body → html, а также контролы форм. */
button, input, textarea, select { font-family: inherit; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button:disabled { cursor: not-allowed; }

.site-shell { overflow: clip; background: var(--surface); }
.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Typography */
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 {
  font-family: "Unbounded", "Avenir Next Cyr", sans-serif;
  letter-spacing: -.035em;
}
h1 {
  max-width: 770px;
  margin-bottom: 24px;
  font-size: clamp(42px, 5.25vw, 74px);
  line-height: 1.03;
  font-weight: 800;
}
h1 span { color: var(--primary-dark); }
h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 3.6vw, 50px);
  line-height: 1.12;
  font-weight: 700;
}
h3 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
}
.eyebrow {
  margin-bottom: 20px;
  color: var(--primary-dark);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(220,232,230,.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: var(--text);
}
.brand-mark {
  width: 49px;
  height: 50px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}
.brand-copy { display: flex; flex-direction: column; min-width: 120px; }
.brand-copy strong {
  font-family: "Unbounded", sans-serif;
  font-size: 14px;
  line-height: .95;
  letter-spacing: -.02em;
}
.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.2;
  letter-spacing: .02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 34px);
  flex: 1 1 auto;
}
.desktop-nav a {
  position: relative;
  color: #455251;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .2s ease;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}
.desktop-nav a:hover { color: var(--primary-dark); }
.desktop-nav a:hover::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.btn {
  min-height: 50px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:not(:disabled):hover { transform: translateY(-2px); }
.btn-primary {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 10px 28px rgba(19, 123, 116, .20);
}
.btn-primary:not(:disabled):hover { box-shadow: 0 14px 32px rgba(19, 123, 116, .28); }
.btn-secondary {
  color: var(--primary-dark);
  background: #FFFFFF;
  border-color: var(--primary);
}
.btn-secondary:not(:disabled):hover { background: #F1FAF8; }
.btn-ghost {
  color: var(--primary-dark);
  background: #FFFFFF;
  border-color: #B9D8D4;
}
.btn-small { min-height: 40px; padding-inline: 19px; font-size: 12px; }
.btn:disabled { opacity: .55; }

.mobile-menu { display: none; margin-left: auto; position: relative; }
.mobile-menu summary {
  width: 44px; height: 44px;
  display: grid;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  list-style: none;
  cursor: pointer;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary span {
  width: 20px; height: 2px;
  border-radius: 99px;
  background: var(--text);
}
.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(310px, calc(100vw - 32px));
  padding: 20px;
  display: grid;
  gap: 4px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.mobile-menu-panel > a {
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 650;
}
.mobile-menu-actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.mobile-menu-actions .btn { flex: 1; }

/* Hero */
.hero {
  position: relative;
  min-height: 690px;
  display: flex;
  align-items: center;
  padding: 74px 0 76px;
  background:
    radial-gradient(circle at 82% 28%, rgba(10,209,201,.10), transparent 30%),
    linear-gradient(180deg, #FFFFFF 0%, #FBFDFC 100%);
}
.hero::before {
  content: "";
  position: absolute;
  top: 78px;
  right: 3vw;
  width: 190px;
  height: 190px;
  opacity: .3;
  background-image: radial-gradient(circle, rgba(64,168,156,.5) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(430px, .98fr);
  align-items: center;
  gap: clamp(34px, 5vw, 72px);
}
.hero-lead {
  max-width: 700px;
  margin-bottom: 30px;
  color: #4F5C5A;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}
.hero-visual {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}
.hero-illustration {
  position: relative;
  z-index: 2;
  width: min(100%, 650px);
  overflow: visible;
}
.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(64,168,156,.14);
}
.hero-orbit-one { width: 440px; height: 440px; }
.hero-orbit-two { width: 530px; height: 530px; border-style: dashed; }
.hero-dots {
  position: absolute;
  left: 2%;
  bottom: 11%;
  width: 130px;
  height: 90px;
  opacity: .52;
  background-image: radial-gradient(circle, var(--secondary) 2px, transparent 2px);
  background-size: 15px 15px;
}

/* About */
.about {
  padding: 94px 0 48px;
  background: #FFFFFF;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(42px, 7vw, 100px);
  align-items: start;
}
.about-copy {
  padding-top: 42px;
  color: #51605E;
  font-size: 18px;
  line-height: 1.8;
}
.about-copy p { margin-bottom: 18px; }

/* Stats */
.stats-section { padding: 34px 0 92px; background: #FFFFFF; }
.stats-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stat {
  min-height: 148px;
  padding: 30px 30px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
}
.stat:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 30px; bottom: 30px; right: 0;
  width: 1px;
  background: var(--line);
}
.stat strong {
  min-width: 68px;
  color: var(--primary-dark);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -.055em;
}
.stat span {
  color: #576563;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
}

/* Process */
.process-section {
  padding: 96px 0 110px;
  background:
    linear-gradient(180deg, #F7FAF9 0%, #FFFFFF 100%);
}
.section-heading { max-width: 680px; }
.section-heading-centered {
  max-width: 780px;
  margin: 0 auto 58px;
  text-align: center;
}
.section-heading-centered p:last-child {
  max-width: 540px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 17px;
}

.process-list {
  position: relative;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none;
}
.process-list::before {
  content: "";
  position: absolute;
  top: 41px;
  left: 7.2%;
  right: 7.2%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #C7E3DF 5%, #C7E3DF 95%, transparent);
}
.process-item {
  position: relative;
  z-index: 1;
  padding: 0 13px;
  text-align: center;
}
.process-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  color: var(--primary-dark);
  background: rgba(255,255,255,.94);
  border: 1px solid #CDE6E2;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(46, 116, 110, .08);
}
.process-icon svg {
  width: 34px; height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.process-number {
  width: 21px; height: 21px;
  margin: -25px auto 12px;
  display: grid;
  place-items: center;
  position: relative;
  color: #FFFFFF;
  background: var(--primary);
  border: 3px solid #FFFFFF;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
}
.process-item h3 { min-height: 44px; }
.process-item p {
  margin: 0 auto;
  max-width: 150px;
  color: #788482;
  font-size: 12px;
  line-height: 1.5;
}

/* Reuse reveal contract from legacy JS */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].is-shown { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1 !important; transform: none !important; }

/* Responsive */
@media (max-width: 1120px) {
  .desktop-nav { gap: 16px; }
  .desktop-nav a { font-size: 12px; }
  .brand-copy { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(390px, .85fr); }
  .process-list {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 42px;
  }
  .process-list::before { display: none; }
}

@media (max-width: 900px) {
  .container { width: min(calc(100% - 32px), var(--container)); }
  .desktop-nav, .header-actions { display: none; }
  .mobile-menu { display: block; }
  .header-inner { min-height: 72px; }
  .brand-copy { display: flex; }

  .hero { min-height: auto; padding: 62px 0 68px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .eyebrow { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-note { text-align: center; }
  .hero-visual { min-height: 450px; margin-top: 10px; }
  .hero-illustration { width: min(100%, 610px); }

  .about { padding-top: 74px; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-copy { padding-top: 0; }

  .stats-card { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2)::after { display: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .process-list { grid-template-columns: repeat(2, 1fr); }
  .process-item p { max-width: 210px; }
}

@media (max-width: 560px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .header-inner { gap: 12px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { font-size: 6.5px; }

  .hero { padding-top: 46px; }
  .hero::before { width: 110px; height: 110px; background-size: 13px 13px; }
  h1 { font-size: clamp(36px, 11vw, 52px); }
  .hero-lead { font-size: 16px; line-height: 1.65; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-visual { min-height: 340px; margin-inline: -16px; }
  .hero-orbit-one { width: 300px; height: 300px; }
  .hero-orbit-two { width: 360px; height: 360px; }

  .about { padding-top: 62px; }
  h2 { font-size: 31px; }
  .about-copy { font-size: 16px; }

  .stats-section { padding-bottom: 72px; }
  .stats-card { grid-template-columns: 1fr; }
  .stat { min-height: 116px; padding: 24px; }
  .stat:not(:last-child)::after { top: auto; left: 24px; right: 24px; bottom: 0; width: auto; height: 1px; }
  .stat:nth-child(2)::after { display: block; }
  .stat:nth-child(-n+2) { border-bottom: 0; }
  .stat strong { min-width: 76px; }

  .process-section { padding: 72px 0 84px; }
  .section-heading-centered { margin-bottom: 42px; }
  .process-list { grid-template-columns: 1fr; gap: 28px; }
  .process-item {
    min-height: 100px;
    display: grid;
    grid-template-columns: 82px 1fr;
    grid-template-rows: auto auto;
    column-gap: 18px;
    text-align: left;
  }
  .process-icon { grid-row: 1 / 3; margin: 0; }
  .process-number {
    position: absolute;
    left: 70px;
    top: 61px;
    margin: 0;
  }
  .process-item h3 { min-height: 0; align-self: end; margin: 7px 0 5px; }
  .process-item p { max-width: none; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   Банк кейсов – /cases, карточки, страница кейса, блок на главной
   ============================================================ */
.desktop-nav a.is-active { color: var(--primary-dark); }
.desktop-nav a.is-active::after { transform: scaleX(1); }
.mobile-menu-panel > a.is-active { color: var(--primary-dark); }

/* Footer */
.site-footer { background: #0E2E2B; color: #CFE3E0; padding: 54px 0 40px; margin-top: 8px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 26px 60px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-brand img { border-radius: 8px; }
.footer-brand strong { display: block; font-family: "Unbounded", sans-serif; color: #fff; font-size: 15px; letter-spacing: -.01em; }
.footer-brand span { font-size: 12px; color: #8FB3AF; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer-nav a { color: #CFE3E0; font-size: 14px; font-weight: 600; }
.footer-nav a:hover { color: var(--secondary); }
.footer-copy { grid-column: 1 / -1; margin: 6px 0 0; max-width: 640px; color: #7FA7A3; font-size: 13px; line-height: 1.6; }

/* Блок кейсов на главной */
.home-cases { padding: 8px 0 104px; background: #FFFFFF; }
.home-cases-cta { margin-top: 40px; text-align: center; }

/* Cases hero */
.cases-hero { padding: 66px 0 30px; background: radial-gradient(circle at 88% 0%, rgba(10,209,201,.10), transparent 42%), linear-gradient(180deg, #FFFFFF 0%, #F6FAF9 100%); }
.cases-hero h1 { margin-bottom: 16px; font-size: clamp(34px, 4.4vw, 60px); }
.cases-hero-lead { max-width: 560px; color: #4F5C5A; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; }
.cases-hero-meta { margin: 18px 0 0; color: var(--primary-dark); font-weight: 700; font-size: 14px; letter-spacing: .02em; }

/* Controls */
.cases-controls { position: sticky; top: 82px; z-index: 20; padding: 22px 0 14px; background: rgba(246,250,249,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.cases-search { position: relative; display: flex; align-items: center; max-width: 720px; }
.cases-search-icon { position: absolute; left: 18px; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
.cases-search-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cases-search input[type="search"] { flex: 1; min-height: 54px; padding: 0 128px 0 50px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: 16px; color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s; }
.cases-search input[type="search"]::-webkit-search-decoration, .cases-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.cases-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(64,168,156,.14); }
.cases-search-clear { position: absolute; right: 96px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #EDF3F2; color: #5b6a68; font-size: 20px; line-height: 1; cursor: pointer; }
.cases-search-clear:hover { background: #e2ecea; }
.cases-search-submit { position: absolute; right: 6px; }
.cases-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #43514F; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .18s, border-color .18s, color .18s; }
.chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.chip.is-active { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); border-color: transparent; color: #fff; }
.chip-no { font-size: 11px; font-weight: 800; opacity: .65; }
.chip.is-active .chip-no { opacity: .85; }
.cases-count { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.cases-count strong { color: var(--text); }

/* Grid + card */
.cases-grid-wrap { padding: 30px 0 100px; background: #FFFFFF; }
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cases-grid[hidden] { display: none; }
.case-card.is-hidden { display: none; }
.case-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; color: var(--text); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #CDE6E2; }
.case-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.case-thumb { position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: grid; place-items: center; }
.case-thumb img { width: 100%; height: 100%; object-fit: cover; }
.case-thumb-no { font-family: "Unbounded", sans-serif; font-size: 66px; font-weight: 800; color: rgba(255,255,255,.42); letter-spacing: -.04em; }
.case-thumb::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.20) 1.5px, transparent 1.5px); background-size: 16px 16px; opacity: .5; }
.case-thumb[data-dir="2"]  { background: linear-gradient(135deg, #2E9E93, #12B9C4); }
.case-thumb[data-dir="3"]  { background: linear-gradient(135deg, #1F8E86, #35C7B4); }
.case-thumb[data-dir="4"]  { background: linear-gradient(135deg, #3AA2A9, #0AD1C9); }
.case-thumb[data-dir="5"]  { background: linear-gradient(135deg, #47A597, #6FCEC0); }
.case-thumb[data-dir="6"]  { background: linear-gradient(135deg, #2C8F98, #0AC0C9); }
.case-thumb[data-dir="7"]  { background: linear-gradient(135deg, #3E9E94, #17C1B6); }
.case-thumb[data-dir="8"]  { background: linear-gradient(135deg, #C85172, #E13363); }
.case-thumb[data-dir="9"]  { background: linear-gradient(135deg, #268D85, #2FBFAf); }
.case-thumb[data-dir="10"] { background: linear-gradient(135deg, #2F8E9A, #0AA7C9); }
.case-badge { position: absolute; left: 14px; top: 14px; z-index: 1; padding: 5px 11px; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--primary-dark); font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.case-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.case-dir { display: inline-flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.35; }
.case-dir-no { color: var(--primary); font-weight: 800; }
.case-title { margin: 10px 0 8px; font-size: 20px; line-height: 1.22; font-weight: 700; letter-spacing: -.02em; }
.case-desc { margin: 0; color: #5B6968; font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.case-more { margin-top: 16px; color: var(--primary-dark); font-weight: 700; font-size: 14px; }
.case-card:hover .case-more { color: var(--primary); }

/* Empty */
.cases-empty { max-width: 460px; margin: 30px auto; padding: 40px 24px; text-align: center; }
.cases-empty h1, .cases-empty h2 { margin-bottom: 10px; font-size: 26px; }
.cases-empty p { margin-bottom: 22px; color: var(--muted); }
.cases-empty-live { grid-column: 1 / -1; }

/* Case detail */
.container-narrow { max-width: 860px; }
.case-detail { padding: 40px 0 96px; background: #fff; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--primary-dark); font-weight: 700; font-size: 14px; }
.back-link:hover { color: var(--primary); }
.case-detail-head { margin: 22px 0 26px; }
.case-detail-head .case-dir { font-size: 14px; }
.case-dir-lg .case-dir-no { font-size: 13px; }
.case-badge-lg { position: static; display: inline-block; margin: 14px 0 0; background: #EAF6F4; }
.case-detail-head h1 { margin: 14px 0 0; font-size: clamp(30px, 4vw, 50px); }
.case-detail-cover { margin: 0 0 30px; aspect-ratio: 3 / 2; border-radius: var(--radius-md); overflow: hidden; }
.case-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.case-detail-body { max-width: 720px; }
.case-block { margin-bottom: 30px; }
.case-block h2 { margin-bottom: 10px; font-size: 20px; font-weight: 700; color: var(--primary-dark); }
.case-block p { margin: 0; color: #3F4D4B; font-size: 17px; line-height: 1.72; }
.case-neighbours { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0 30px; }
.case-neighbour { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s, background .2s; }
.case-neighbour:hover { border-color: var(--primary); background: #F6FBFA; }
.case-neighbour.next { text-align: right; align-items: flex-end; }
.case-neighbour .dir { color: var(--muted); font-size: 13px; font-weight: 600; }
.case-neighbour .ttl { color: var(--text); font-weight: 700; font-size: 15px; line-height: 1.3; }
.case-detail-foot { padding-top: 8px; border-top: 1px solid var(--line); margin-top: 6px; }
.case-detail-foot .back-link { margin-top: 20px; }

/* Responsive */
@media (max-width: 1120px) { .cases-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .cases-controls { top: 72px; } .footer-inner { grid-template-columns: 1fr; gap: 18px; } }
@media (max-width: 720px) {
  .cases-grid, .cases-grid-3 { grid-template-columns: 1fr; }
  .cases-hero { padding-top: 44px; }
  .case-neighbours { grid-template-columns: 1fr; }
  .case-neighbour.next { text-align: left; align-items: flex-start; }
  .cases-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cases-chips::-webkit-scrollbar { display: none; }
  .cases-search input[type="search"] { padding-right: 108px; font-size: 15px; }
}
@media (max-width: 560px) {
  .cases-controls { top: 0; }
  .cases-search-submit { display: none; }
  .cases-search input[type="search"] { padding-right: 50px; }
  .case-thumb-no { font-size: 54px; }
}

/* Case detail – full sections (Итоговые кейс-задания) */
.case-ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.case-ul li { position: relative; padding-left: 26px; color: #3F4D4B; font-size: 16px; line-height: 1.6; }
.case-ul li::before { content: ""; position: absolute; left: 6px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.case-facts { display: grid; gap: 14px; padding: 22px 24px; background: #F6FAF9; border: 1px solid var(--line); border-radius: var(--radius-md); }
.case-fact { display: grid; gap: 3px; }
.case-fact-k { font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--primary-dark); }
.case-fact-v { color: #333; font-size: 16px; line-height: 1.55; }

/* ============================================================
   Auth (login / register) + Cabinet – «Среда решений»
   ============================================================ */
.user-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.22); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .02em;
}

/* Auth page shell */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--surface);
}
.auth-aside {
  position: relative;
  padding: 56px 60px;
  color: #fff;
  background: linear-gradient(150deg, #0F8780 0%, #137B74 42%, #0B57E5 130%);
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside::before, .auth-aside::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(10,209,201,.55), transparent 70%);
}
.auth-aside::before { width: 420px; height: 420px; right: -140px; top: -120px; }
.auth-aside::after  { width: 320px; height: 320px; left: -120px; bottom: -120px; opacity: .5; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside .brand { color: #fff; }
.auth-aside .brand-copy strong { color: #fff; }
.auth-aside .brand-copy small { color: rgba(255,255,255,.8); }
.auth-aside-lead { max-width: 420px; }
.auth-aside-lead .eyebrow { color: #8CF3ED; }
.auth-aside-lead h2 { color: #fff; margin-bottom: 16px; font-size: clamp(28px, 3vw, 42px); }
.auth-aside-lead p { color: rgba(255,255,255,.88); font-size: 17px; line-height: 1.6; }
.auth-aside-points { display: grid; gap: 14px; margin-top: 26px; }
.auth-aside-point { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.92); font-weight: 500; }
.auth-aside-point svg { flex: 0 0 auto; margin-top: 2px; }
.auth-aside-foot { color: rgba(255,255,255,.7); font-size: 13px; }

.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
  background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 480px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px;
}
.auth-card--wide { max-width: 620px; }
.auth-card h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; margin-bottom: 8px; }
.auth-lead { color: var(--muted); margin-bottom: 26px; font-size: 15px; }
.auth-back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; margin-top: 22px; }
.auth-back:hover { color: var(--primary-dark); }
.auth-alt { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 14px; }
.auth-alt a { color: var(--primary-dark); font-weight: 700; }
.auth-alt a:hover { text-decoration: underline; }

/* Forms */
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.field .req { color: var(--accent); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.control {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FBFDFD;
  color: var(--text);
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.control::placeholder { color: #9AAAA8; }
.control:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(64,168,156,.14);
}
textarea.control { min-height: 120px; resize: vertical; line-height: 1.55; }
select.control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23687776' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; }
.field-pass { position: relative; }
.field-pass .control { padding-right: 46px; }
.pass-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
}
.pass-toggle:hover { color: var(--primary-dark); background: #F1FAF8; }
.pass-strength { height: 5px; border-radius: 5px; background: #E6EFED; margin-top: 8px; overflow: hidden; }
.pass-strength i { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--accent); transition: width .3s ease, background .3s ease; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 auto; }
.consent label { font-size: 12.5px; color: var(--muted); line-height: 1.5; font-weight: 500; }
.consent a { color: var(--primary-dark); text-decoration: underline; }

.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 15px; }
.form-note { text-align: center; font-size: 14px; margin-top: 14px; }
.form-note.is-error { color: var(--accent); }
.form-note.is-ok { color: var(--primary-dark); }
.form-note.hidden, .hidden { display: none; }

.notice {
  padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px;
  border: 1px solid transparent;
}
.notice-ok { background: rgba(64,168,156,.10); border-color: rgba(64,168,156,.35); color: var(--primary-dark); }
.notice-muted { background: #fff; border-color: var(--line); color: var(--muted); }

/* Cabinet */
.cab-wrap { background: var(--bg); min-height: 100vh; }
.cab-hero {
  background: linear-gradient(140deg, #0F8780, #137B74 55%, #0B57E5 160%);
  color: #fff; padding: 40px 0 92px;
}
.cab-hero .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cab-hello .eyebrow { color: #8CF3ED; }
.cab-hello h1 { color: #fff; font-size: clamp(28px, 3.4vw, 44px); margin: 4px 0 8px; }
.cab-hello p { color: rgba(255,255,255,.85); margin: 0; }
.cab-hero .btn-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; }
.cab-hero .btn-ghost:hover { background: rgba(255,255,255,.2); }

.cab-body { margin-top: -64px; padding-bottom: 80px; }
.cab-grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.cab-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow); padding: 26px;
}
.cab-card h2 { font-size: 20px; margin-bottom: 4px; }
.cab-card h3 { font-size: 15px; }
.cab-card + .cab-card { margin-top: 24px; }
.cab-card-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

.cab-profile-top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.cab-avatar {
  width: 60px; height: 60px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
  color: #fff; font-weight: 800; font-size: 21px; font-family: "Unbounded", sans-serif;
}
.cab-profile-top b { display: block; font-size: 17px; }
.cab-profile-top span { color: var(--muted); font-size: 13px; }
.cab-dl { display: grid; gap: 13px; margin: 0; }
.cab-dl div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: baseline; }
.cab-dl dt { color: var(--muted); font-size: 13px; }
.cab-dl dd { margin: 0; color: var(--text); font-size: 14px; font-weight: 600; word-break: break-word; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge-draft { background: #FBEEF1; color: #C32B52; }
.badge-sent  { background: rgba(11,87,229,.10); color: var(--blue); }
.badge-review{ background: #FFF4E0; color: #B4770C; }
.badge-scored{ background: rgba(64,168,156,.12); color: var(--primary-dark); }
.badge-verify{ background: #FFF4E0; color: #B4770C; }
.badge-ok    { background: rgba(64,168,156,.12); color: var(--primary-dark); }

/* Progress steps in cabinet */
.cab-steps { display: grid; gap: 0; margin-top: 6px; }
.cab-step { display: flex; gap: 14px; padding: 4px 0; }
.cab-step-mark { position: relative; display: flex; flex-direction: column; align-items: center; }
.cab-step-dot {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: #EAF1F0; color: var(--muted); font-weight: 800; font-size: 13px; border: 2px solid transparent;
}
.cab-step-line { width: 2px; flex: 1; background: #E3ECEA; margin: 4px 0; }
.cab-step:last-child .cab-step-line { display: none; }
.cab-step.is-done .cab-step-dot { background: var(--primary); color: #fff; }
.cab-step.is-current .cab-step-dot { background: #fff; color: var(--primary-dark); border-color: var(--primary); }
.cab-step-txt { padding-bottom: 16px; }
.cab-step-txt b { display: block; font-size: 14px; }
.cab-step-txt span { color: var(--muted); font-size: 13px; }

/* Chosen case block */
.chosen-case { display: flex; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #F6FAF9; }
.chosen-case .cc-no { width: 54px; height: 54px; border-radius: 12px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-dark), var(--secondary)); color: #fff; font-weight: 800; font-family: "Unbounded", sans-serif; }
.chosen-case .cc-meta span { font-size: 12px; color: var(--primary-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.chosen-case .cc-meta b { display: block; font-size: 16px; line-height: 1.3; margin-top: 3px; }

.empty-case { text-align: center; padding: 24px 16px; color: var(--muted); }
.empty-case svg { margin: 0 auto 12px; }

/* Case picker (modal-ish overlay via :target) */
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; max-height: 60vh; overflow: auto; padding: 4px; }
.picker-item { text-align: left; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.picker-item:hover { border-color: var(--primary); box-shadow: 0 8px 22px rgba(19,98,92,.10); transform: translateY(-2px); }
.picker-item span { font-size: 11px; font-weight: 800; color: var(--primary-dark); letter-spacing: .02em; }
.picker-item b { display: block; font-size: 13.5px; line-height: 1.35; margin-top: 4px; color: var(--text); }
.picker-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.picker-filter .control { max-width: 320px; }

@media (max-width: 980px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { padding: 40px 18px; background: var(--surface); }
  .cab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .auth-card { padding: 26px 20px; }
  .cab-dl div { grid-template-columns: 1fr; gap: 2px; }
}

/* Case picker modal */
.picker-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(19, 40, 38, .5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.picker-overlay.hidden { display: none; }
.picker-modal {
  width: min(920px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius-lg); box-shadow: 0 30px 80px rgba(0,0,0,.3);
  padding: 26px 26px 22px;
}
.picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.picker-close {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 16px; cursor: pointer; flex: 0 0 auto;
  transition: background .15s, color .15s;
}
.picker-close:hover { background: #FBEEF1; color: var(--accent); border-color: #F3C9D3; }
.picker-item.is-hidden { display: none; }
.picker-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 30px; }

/* ============================================================
   Кабинет жюри – «Среда решений»
   ============================================================ */
.jury-topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.jury-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.jury-topbar .brand-copy strong { color: var(--text); }
.jury-topbar .brand-copy small { color: var(--muted); }
.jury-topbar-user { display: flex; align-items: center; gap: 12px; }
.jury-topbar-name { font-weight: 700; font-size: 14px; line-height: 1.2; display: flex; flex-direction: column; }
.jury-topbar-name small { font-weight: 500; color: var(--muted); font-size: 12px; }
.jury-topbar .btn-ghost { color: var(--primary-dark); }

.aside-aside--jury { }
.auth-aside--jury { background: linear-gradient(150deg, #0B4FD0 0%, #137B74 60%, #0F8780 130%); }

/* Статистика жюри */
.jury-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.jury-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px 22px; box-shadow: var(--shadow); }
.jury-stat b { display: block; font-family: "Unbounded", sans-serif; font-size: 32px; line-height: 1; color: var(--text); }
.jury-stat span { color: var(--muted); font-size: 13px; margin-top: 4px; display: block; }
.jury-stat-done b { color: var(--primary-dark); }

/* Список назначенных работ */
.jury-list { display: grid; gap: 12px; margin-top: 16px; }
.jury-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.jury-row:hover { border-color: var(--primary); box-shadow: 0 10px 26px rgba(19,98,92,.10); transform: translateY(-2px); }
.jury-row-no { width: 46px; height: 46px; border-radius: 12px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-dark), var(--secondary)); color: #fff; font-weight: 800; font-family: "Unbounded", sans-serif; }
.jury-row-main { flex: 1; min-width: 0; }
.jury-row-code { font-size: 11px; font-weight: 800; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .02em; }
.jury-row-main b { display: block; font-size: 15.5px; line-height: 1.3; margin: 2px 0; color: var(--text); }
.jury-row-main small { color: var(--muted); font-size: 13px; }
.jury-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; text-align: right; }
.jury-row-cta { color: var(--primary-dark); font-weight: 700; font-size: 13px; }

/* Страница оценки */
.jury-work-grid { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: start; }
.jury-score-card { position: sticky; top: 90px; }

.score-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.score-row:first-of-type { padding-top: 8px; }
.score-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.score-head b { font-size: 14.5px; line-height: 1.3; }
.score-badge { flex: 0 0 auto; font-weight: 700; font-size: 13px; color: var(--muted); }
.score-val { color: var(--primary-dark); font-weight: 800; }
.score-desc { color: var(--muted); font-size: 12.5px; margin: 4px 0 12px; line-height: 1.45; }
.score-inputs { display: flex; align-items: center; gap: 14px; }
.score-range { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 6px; background: #E3ECEA; outline: none; }
.score-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-dark), var(--secondary)); cursor: pointer; box-shadow: 0 2px 6px rgba(19,98,92,.35); border: 2px solid #fff; }
.score-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--primary-dark); cursor: pointer; border: 2px solid #fff; }
.score-range:disabled { opacity: .55; }
.score-num { width: 78px; flex: 0 0 auto; text-align: center; min-height: 44px; padding: 8px; font-weight: 700; }

.score-total { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-sm); background: linear-gradient(135deg, rgba(64,168,156,.10), rgba(11,87,229,.06)); border: 1px solid var(--line); }
.score-total span { color: var(--muted); font-weight: 600; font-size: 14px; }
.score-total b { font-family: "Unbounded", sans-serif; font-size: 24px; color: var(--primary-dark); }
.score-total [data-total] { font-size: 30px; }

@media (max-width: 1040px) {
  .jury-work-grid { grid-template-columns: 1fr; }
  .jury-score-card { position: static; }
}
@media (max-width: 720px) {
  .jury-stats { grid-template-columns: repeat(2, 1fr); }
  .jury-row { flex-wrap: wrap; }
  .jury-row-side { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
}
