/* =====================================================================
   TOMIRIS Network — Design System v1.0
   Источники: эмблема Академии политического менеджмента (Томирис, пурпур+золото+оранж),
   язык Superhuman (тёплая бумага, плам-сцены, мягкие прямоугольники 12/8px, вес 460),
   структура соцсети из концепта (3 колонки, лента, тренды).
   ===================================================================== */

:root {
  /* ---------- Brand ---------- */
  --plum-900: #1b0f33;
  --plum-800: #281647;   /* Deep plum — сцены, шапки проектов */
  --plum-700: #3a2163;
  --violet-600: #714cb6; /* Action violet — основные действия, ссылки */
  --violet-500: #8a66cc;
  --lilac-300: #d4c7ff;  /* Inverse action на тёмном */
  --lavender-100: #e8e0ff;
  --lavender-50: #f4f0ff;
  --gold-500: #e7b23a;   /* Золото Томирис — достижения, XP, уровни */
  --gold-100: #fbf1d6;
  --ember-500: #f0642a;  /* Оранж из знака «АМ» — уведомления, live, срочное */
  --ember-100: #fde6dc;
  --wine-800: #421d24;   /* Футер, предупреждения-сцены */
  --forest-800: #0c4243; /* Демонстрационные панели */

  /* ---------- Neutral ---------- */
  --white: #ffffff;
  --paper: #f7f5f2;      /* Фон приложения */
  --stone: #f2f0eb;      /* Вторичные поверхности, hover */
  --media-stone: #dedbd5;
  --rule: rgba(115, 113, 109, 0.2);
  --rule-strong: rgba(115, 113, 109, 0.35);
  --ink: #292827;        /* Основной текст */
  --subtext: #646362;    /* Вторичный текст (≥ 4.5:1 на paper) */
  --muted: #8d8a86;      /* Только для неважных меток ≥ 14px */
  --night: #141413;

  /* ---------- Semantic ---------- */
  --success: #1f8a5b;
  --success-bg: #e2f4ea;
  --warning: #b7791f;
  --warning-bg: #fdf3dc;
  --danger: #c0352b;
  --danger-bg: #fbe5e2;
  --info: #2f6fd0;
  --info-bg: #e3edfb;
  --focus: #714cb6;

  /* ---------- Skill palette (9 треков) ---------- */
  --sk-lead: #714cb6;  /* Лидерство */
  --sk-pm: #0f7a6c;    /* Project Management */
  --sk-ac: #b3263e;    /* Антикоррупция */
  --sk-inf: #d9561d;   /* Архитектура влияния */
  --sk-eq: #c93d76;    /* Эмоциональный интеллект */
  --sk-ct: #2f6fd0;    /* Критическое мышление */
  --sk-vc: #0b8aa0;    /* Vibecoding */
  --sk-cm: #b07a0c;    /* Управление изменениями */
  --sk-sm: #3b2a8a;    /* Стратегический менеджмент */

  /* ---------- Typography ---------- */
  --font-sans: "DM Sans", "Super Sans VF", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Montserrat", "DM Sans", system-ui, sans-serif;
  --track-display: -0.0275em;
  --track-body: -0.0075em;

  --fs-display: 49px;  /* weight 460 */
  --fs-h1: 31px;
  --fs-h2: 25px;
  --fs-h3: 19px;
  --fs-body-lg: 17px;
  --fs-body: 15px;
  --fs-small: 13px;
  --fs-micro: 12px;

  /* ---------- Spacing (шаг 4/8) ---------- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* ---------- Radius ---------- */
  --r-xs: 6px;
  --r-sm: 8px;    /* компактные кнопки, инпуты */
  --r-md: 12px;   /* карточки, медиа, основные кнопки */
  --r-lg: 16px;   /* модальные окна, сцены */
  --r-full: 999px;/* только аватары, точки статуса, прогресс */

  /* ---------- Elevation ---------- */
  --sh-card: 0 0 0 1px rgba(71,69,67,.05), 0 1px 2px rgba(71,69,67,.05), 0 2px 4px rgba(71,69,67,.04);
  --sh-raise: 0 0 0 1px rgba(71,69,67,.05), 0 4px 8px -2px rgba(71,69,67,.08), 0 8px 24px -6px rgba(71,69,67,.12);
  --sh-pop: 0 0 0 1px rgba(71,69,67,.06), 0 16px 40px -8px rgba(40,22,71,.28);

  /* ---------- Layout ---------- */
  --nav-h: 64px;
  --container: 1320px;
  --col-left: 264px;
  --col-right: 320px;
  --col-main: 620px;

  --ease: cubic-bezier(.2,.7,.2,1);
  --dur: 160ms;
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.5;
  letter-spacing: var(--track-body); font-weight: 450;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--violet-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { margin: 0; font-weight: 460; letter-spacing: var(--track-display); line-height: 1.2; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.res-table th, .res-table td { position: relative; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 999; background: var(--plum-800); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }

/* ---------- Type recipes ---------- */
.t-display { font-size: var(--fs-display); font-weight: 460; letter-spacing: var(--track-display); line-height: 1.2; }
.t-h1 { font-size: var(--fs-h1); font-weight: 460; letter-spacing: var(--track-display); line-height: 1.2; }
.t-h2 { font-size: var(--fs-h2); font-weight: 460; letter-spacing: var(--track-display); line-height: 1.2; }
.t-h3 { font-size: var(--fs-h3); font-weight: 560; letter-spacing: -0.015em; line-height: 1.3; }
.t-body-lg { font-size: var(--fs-body-lg); }
.t-small { font-size: var(--fs-small); }
.t-micro { font-size: var(--fs-micro); }
.t-eyebrow { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--subtext); }
.t-sub { color: var(--subtext); }
.t-strong { font-weight: 620; }
.t-stat { font-size: 44px; font-weight: 200; letter-spacing: var(--track-display); line-height: 1.1; }

/* ---------- Icons ---------- */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; line-height: 1; letter-spacing: normal; white-space: nowrap;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), color var(--dur);
}
.btn:active { transform: translateY(1px); }
.btn-lg { height: 52px; padding: 0 20px; font-size: 16px; }
.btn-sm { height: 32px; padding: 0 12px; border-radius: var(--r-sm); font-size: 13.5px; }
.btn-primary { background: var(--violet-600); color: #fff; }
.btn-primary:hover { background: #613ea3; }
.btn-secondary { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.btn-secondary:hover { background: var(--stone); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--stone); }
.btn-soft { background: var(--lavender-100); color: var(--plum-800); }
.btn-soft:hover { background: #ddd2ff; }
.btn-inverse { background: var(--lilac-300); color: var(--plum-900); }
.btn-inverse:hover { background: #e2d9ff; }
.btn-outline-inverse { color: var(--lilac-300); box-shadow: inset 0 0 0 1px var(--lilac-300); }
.btn-outline-inverse:hover { background: rgba(212,199,255,.12); }
.btn-gold { background: var(--gold-500); color: var(--plum-900); }
.btn-gold:hover { background: #f0c050; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-icon { width: 40px; padding: 0; border-radius: var(--r-md); }
.btn-icon.btn-sm { width: 32px; }
.btn[aria-pressed="true"].btn-secondary { background: var(--lavender-100); box-shadow: inset 0 0 0 1px var(--violet-600); color: var(--plum-800); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Inputs ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-small); font-weight: 600; }
.input, .textarea, .select {
  height: 40px; padding: 0 12px; border-radius: var(--r-sm); background: var(--white);
  border: 1px solid var(--rule-strong); outline: none; width: 100%;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--violet-600); box-shadow: 0 0 0 3px rgba(113,76,182,.18); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  background: var(--stone); border-radius: var(--r-md); color: var(--subtext);
  border: 1px solid transparent; transition: border-color var(--dur), background var(--dur);
}
.search:focus-within { background: var(--white); border-color: var(--violet-600); box-shadow: 0 0 0 3px rgba(113,76,182,.15); }
.search input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); }
kbd { font: 600 11px var(--font-sans); padding: 2px 6px; border-radius: 4px; background: var(--white); box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--subtext); }

/* ---------- Chips / tags / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: var(--r-sm); font-size: 13px; font-weight: 560; background: var(--stone); color: var(--ink);
  white-space: nowrap;
}
button.chip:hover { background: var(--media-stone); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--plum-800); color: #fff; }
.skill-tag {
  --sk: var(--sk-lead);
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px 0 6px;
  border-radius: var(--r-xs); font-size: 12px; font-weight: 640; letter-spacing: .01em;
  background: color-mix(in srgb, var(--sk) 12%, white);
  color: color-mix(in srgb, var(--sk) 80%, black);
  white-space: nowrap;
}
.skill-tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--sk); transform: rotate(45deg); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full); background: var(--ember-500); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: var(--r-xs); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-ok { background: var(--success-bg); color: var(--success); }
.status-warn { background: var(--warning-bg); color: var(--warning); }
.status-risk { background: var(--danger-bg); color: var(--danger); }
.status-info { background: var(--info-bg); color: var(--info); }
.status-neutral { background: var(--stone); color: var(--subtext); }

[data-skill="lead"] { --sk: var(--sk-lead); }
[data-skill="pm"]   { --sk: var(--sk-pm); }
[data-skill="ac"]   { --sk: var(--sk-ac); }
[data-skill="inf"]  { --sk: var(--sk-inf); }
[data-skill="eq"]   { --sk: var(--sk-eq); }
[data-skill="ct"]   { --sk: var(--sk-ct); }
[data-skill="vc"]   { --sk: var(--sk-vc); }
[data-skill="cm"]   { --sk: var(--sk-cm); }
[data-skill="sm"]   { --sk: var(--sk-sm); }

/* ---------- Avatars ---------- */
.avatar {
  --size: 40px; width: var(--size); height: var(--size); flex: none; border-radius: 50%;
  display: inline-grid; place-items: center; overflow: hidden; position: relative;
  font-size: calc(var(--size) * .38); font-weight: 650; color: #fff; letter-spacing: 0;
  background: linear-gradient(135deg, var(--a1, #714cb6), var(--a2, #281647));
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { --size: 24px; } .avatar-sm { --size: 32px; } .avatar-lg { --size: 56px; } .avatar-xl { --size: 96px; }
.presence { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 9px; min-height: 9px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 2px var(--white); }
.avatar-wrap { position: relative; display: inline-block; flex: none; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--white); }
.avatar-stack .avatar + .avatar { margin-left: -8px; }

/* ---------- Cards ---------- */
.card { background: var(--white); border-radius: var(--r-md); box-shadow: var(--sh-card); }
.card-pad { padding: var(--s-4); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 8px; }
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 620; letter-spacing: -0.01em; }
.card-foot { padding: 8px 16px 14px; }
.divider { height: 1px; background: var(--rule); border: 0; margin: 0; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; color: var(--violet-600); }

/* ---------- Progress ---------- */
.progress { height: 6px; border-radius: var(--r-full); background: var(--stone); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--sk, var(--violet-600)); }
.ring { --p: 60; --c: var(--violet-600); width: 44px; height: 44px; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--stone) 0); display: grid; place-items: center; flex: none; }
.ring::after { content: attr(data-label); width: 34px; height: 34px; border-radius: 50%; background: var(--white); display: grid; place-items: center; font-size: 11px; font-weight: 700; }

/* =====================================================================
   APP SHELL
   ===================================================================== */
.topnav {
  position: sticky; top: 0; z-index: 200; height: var(--nav-h); background: var(--white);
  border-bottom: 1px solid var(--rule);
}
.topnav-inner { max-width: var(--container); margin: 0 auto; height: 100%; padding: 0 20px;
  display: grid; grid-template-columns: var(--col-left) 1fr auto; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--plum-800); text-decoration: none !important; }
.brand img { width: 38px; height: auto; }
.brand-name { font-family: var(--font-brand); font-weight: 800; font-size: 17px; letter-spacing: .02em; line-height: 1; }
.brand-name small { display: block; font-weight: 600; font-size: 10px; letter-spacing: .18em; color: var(--ember-500); margin-top: 3px; }
.topnav-center { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topnav-center .search { flex: 1; max-width: 360px; }
.mainnav { display: flex; gap: 2px; }
.mainnav a {
  position: relative; display: grid; place-items: center; width: 64px; height: var(--nav-h); color: var(--subtext);
  text-decoration: none;
}
.mainnav a:hover { color: var(--ink); }
.mainnav a:hover::before { content: ""; position: absolute; inset: 10px 4px; border-radius: var(--r-sm); background: var(--stone); z-index: -1; }
.mainnav a[aria-current="page"] { color: var(--violet-600); }
.mainnav a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--violet-600); }
.mainnav .i { width: 24px; height: 24px; }
.mainnav .badge { position: absolute; top: 12px; right: 12px; }
.topnav-right { display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--stone); color: var(--ink); }
.icon-btn:hover { background: var(--media-stone); }
.icon-btn .badge { position: absolute; top: -3px; right: -3px; box-shadow: 0 0 0 2px var(--white); }
.icon-btn[aria-expanded="true"] { background: var(--lavender-100); color: var(--violet-600); }

/* Tooltip */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: var(--night); color: #fff; font-size: 12px; font-weight: 560; padding: 5px 8px; border-radius: 6px; white-space: nowrap; z-index: 300; pointer-events: none;
}

.layout { max-width: var(--container); margin: 0 auto; padding: 20px;
  display: grid; grid-template-columns: var(--col-left) minmax(0, 1fr) var(--col-right); gap: 24px; align-items: start; }
.col-left, .col-right { position: sticky; top: calc(var(--nav-h) + 20px); display: grid; gap: 16px;
  max-height: calc(100vh - var(--nav-h) - 40px); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 2px 2px 8px; margin: -2px; }
.col-left::-webkit-scrollbar, .col-right::-webkit-scrollbar { display: none; }
.col-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; max-width: 680px; width: 100%; justify-self: center; }

/* Side nav */
.sidenav { display: grid; gap: 2px; }
.sidenav a, .sidenav button {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--ink); font-weight: 520; text-decoration: none; width: 100%; text-align: left;
}
.sidenav a:hover, .sidenav button:hover { background: var(--stone); }
.sidenav a[aria-current="page"] { background: var(--white); box-shadow: var(--sh-card); font-weight: 650; color: var(--plum-800); }
.sidenav a[aria-current="page"] .i { color: var(--violet-600); }
.sidenav .badge { margin-left: auto; }
.sidenav .count { margin-left: auto; font-size: 12px; color: var(--subtext); font-weight: 600; }
.side-title { padding: 12px 10px 6px; }

.me-card { display: flex; align-items: center; gap: 12px; padding: 12px; }
.me-card .lvl { font-size: 12px; color: var(--subtext); }
.xp { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--subtext); }
.xp .progress { flex: 1; }
.xp .progress > span { background: linear-gradient(90deg, var(--gold-500), var(--ember-500)); }

/* Skill list in sidebar */
.skill-list { display: grid; gap: 2px; padding: 4px 6px 10px; }
.skill-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); text-align: left; width: 100%; color: var(--ink); text-decoration: none !important; }
.skill-row:hover { background: var(--stone); }
.skill-row .sk-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--sk) 13%, white); color: var(--sk); }
.skill-row .sk-ico .i { width: 16px; height: 16px; }
.skill-row .sk-name { font-size: 13.5px; font-weight: 560; line-height: 1.25; }
.skill-row .progress { height: 4px; margin-top: 5px; }
.skill-row .sk-lvl { font-size: 11.5px; font-weight: 700; color: var(--subtext); }

/* ---------- Skill Academy stage (luminous) ---------- */
.stage {
  position: relative; overflow: hidden; border-radius: var(--r-lg); color: #fff;
  background: linear-gradient(115deg, var(--night) 0%, var(--plum-800) 55%, #3b1f6b 100%);
  isolation: isolate;
}
.stage::before, .stage::after { content: ""; position: absolute; border-radius: 50%; filter: blur(50px); z-index: -1; }
.stage::before { width: 360px; height: 300px; right: -60px; top: -120px; background: radial-gradient(circle, rgba(138,102,204,.9), transparent 70%); }
.stage::after { width: 300px; height: 240px; right: 140px; bottom: -150px; background: radial-gradient(circle, rgba(240,100,42,.55), transparent 70%); }
.stage .orbit { position: absolute; right: -40px; top: -30px; width: 360px; height: 260px; z-index: -1; opacity: .35; }
.stage-hero { display: grid; grid-template-columns: 1fr 150px; gap: 16px; padding: 24px 24px 0; }
.stage-hero h1 { font-size: 27px; line-height: 1.18; }
.stage-hero h1 span { color: rgba(255,255,255,.62); }
.stage-hero p { color: rgba(255,255,255,.78); margin-top: 10px; font-size: 14.5px; max-width: 440px; }
.stage-hero .actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.stage-emblem { align-self: end; width: 150px; filter: drop-shadow(0 12px 30px rgba(0,0,0,.4)); }
.stage-selector { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(252,250,247,.1); margin-top: 0; }
.stage-selector button { display: flex; align-items: center; gap: 10px; padding: 14px 18px; color: rgba(255,255,255,.7); text-align: left; font-size: 13px; border-right: 1px solid rgba(252,250,247,.08); }
.stage-selector button:last-child { border-right: 0; }
.stage-selector button:hover { color: #fff; background: rgba(255,255,255,.05); }
.stage-selector button[aria-selected="true"] { background: rgba(255,255,255,.1); color: #fff; }
.stage-selector .sk-sq { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--sk); color: #fff; flex: none; }
.stage-selector .sk-sq .i { width: 15px; height: 15px; }
.stage-selector b { display: block; font-weight: 640; font-size: 13px; }
.stage-selector small { display: block; opacity: .75; font-size: 12px; }

/* ---------- Stories ---------- */
.stories { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; scroll-snap-type: x mandatory; }
.stories::-webkit-scrollbar { display: none; }
.story { position: relative; height: 188px; border-radius: var(--r-md); overflow: hidden; color: #fff; text-align: left; scroll-snap-align: start;
  background: linear-gradient(160deg, var(--a1), var(--a2)); box-shadow: var(--sh-card); transition: transform var(--dur) var(--ease); }
.story:hover { transform: translateY(-2px); }
.story::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(20,20,19,.65)); }
.story .avatar { position: absolute; top: 10px; left: 10px; box-shadow: 0 0 0 3px var(--violet-600), 0 0 0 5px #fff; z-index: 1; }
.story.seen .avatar { box-shadow: 0 0 0 3px rgba(255,255,255,.5); }
.story .story-name { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 1; font-size: 12.5px; font-weight: 620; line-height: 1.25; }
.story .story-skill { position: absolute; top: 12px; right: 8px; z-index: 1; font-size: 10px; font-weight: 700; background: rgba(0,0,0,.3); padding: 2px 6px; border-radius: 4px; letter-spacing: .04em; }
.story-create { background: var(--white); color: var(--ink); }
.story-create::after { display: none; }
.story-create .sc-top { height: 120px; background: linear-gradient(150deg, var(--lavender-100), var(--lilac-300)); display: grid; place-items: center; }
.story-create .sc-top img { width: 72px; height: 72px; border-radius: 50%; }
.story-create .plus { position: absolute; left: 50%; top: 104px; transform: translateX(-50%); width: 34px; height: 34px; border-radius: 50%; background: var(--violet-600); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 4px var(--white); }
.story-create .story-name { color: var(--ink); text-align: center; bottom: 14px; }

/* ---------- Composer ---------- */
.composer { padding: 14px 16px 12px; }
.composer-top { display: flex; gap: 12px; align-items: center; }
.composer-input { flex: 1; height: 44px; border-radius: var(--r-md); background: var(--stone); padding: 0 16px; color: var(--subtext); text-align: left; font-size: 15px; transition: background var(--dur); }
.composer-input:hover { background: var(--media-stone); }
.composer-actions { display: flex; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.composer-actions button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; border-radius: var(--r-sm); font-size: 14px; font-weight: 560; color: var(--subtext); min-width: max-content; padding: 0 8px; }
.composer-actions button:hover { background: var(--stone); color: var(--ink); }
.c-photo { color: #1f8a5b; } .c-project { color: var(--violet-600); } .c-case { color: var(--sk-inf); } .c-poll { color: var(--sk-ct); } .c-help { color: var(--ember-500); }

/* ---------- Feed tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.tabs [role="tab"] { position: relative; height: 44px; padding: 0 12px; font-weight: 560; color: var(--subtext); white-space: nowrap; font-size: 14.5px; }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); font-weight: 650; }
.tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feed-toolbar .tabs { flex: 1; border-bottom: 0; }

/* ---------- Post ---------- */
.post { overflow: hidden; }
.post-head { display: flex; gap: 12px; padding: 14px 16px 0; align-items: flex-start; }
.post-meta { flex: 1; min-width: 0; }
.post-author { font-weight: 650; color: var(--ink); text-decoration: none; }
.post-author:hover { text-decoration: underline; }
.post-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--subtext); margin-top: 2px; }
.post-sub .dot::before { content: "·"; }
.verified { color: var(--violet-600); display: inline-flex; vertical-align: -3px; }
.post-body { padding: 10px 16px 0; font-size: 15.5px; line-height: 1.55; }
.post-body p + p { margin-top: 8px; }
.post-body .hashtag { color: var(--violet-600); font-weight: 560; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px 0; }
.post-media { margin-top: 12px; position: relative; }
.media-art { height: 280px; position: relative; overflow: hidden; background: var(--plum-800); color: #fff; display: flex; align-items: flex-end; padding: 24px; isolation: isolate; }
.media-art::before { content: ""; position: absolute; inset: -40px; z-index: -1; filter: blur(46px);
  background: radial-gradient(40% 50% at 75% 30%, var(--m1, #8a66cc), transparent 70%), radial-gradient(35% 45% at 30% 80%, var(--m2, #f0642a), transparent 70%), radial-gradient(30% 40% at 90% 90%, var(--m3, #d4c7ff), transparent 70%); opacity: .9; }
.media-art .media-card { background: rgba(255,255,255,.96); color: var(--ink); border-radius: var(--r-md); padding: 16px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.4); max-width: 360px; }
.media-grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 140px 140px; gap: 3px; }
.media-grid > div { background-size: cover; position: relative; }
.media-grid > div:first-child { grid-row: span 2; }
.media-grid .more { position: absolute; inset: 0; background: rgba(20,20,19,.5); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 600; }
.post-stats { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; font-size: 13.5px; color: var(--subtext); }
.react-summary { display: flex; align-items: center; gap: 6px; }
.react-icons { display: flex; }
.react-icons span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; box-shadow: 0 0 0 2px var(--white); background: var(--white); }
.react-icons span + span { margin-left: -5px; }
.post-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 12px; padding: 4px 0; border-top: 1px solid var(--rule); }
.post-actions > button, .post-actions > .react-wrap > button { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: var(--r-sm); color: var(--subtext); font-weight: 560; font-size: 14px; }
.post-actions > button:hover, .post-actions > .react-wrap > button:hover { background: var(--stone); color: var(--ink); }
.post-actions button[aria-pressed="true"] { color: var(--violet-600); }
.post-actions button[aria-pressed="true"] .i { fill: currentColor; }
.post-actions button[data-reacted="respect"] { color: var(--gold-500); }
.post-actions button[data-reacted="insight"] { color: var(--sk-ct); }
.react-wrap { position: relative; }
.react-picker { position: absolute; bottom: calc(100% + 6px); left: 0; display: flex; gap: 2px; padding: 6px; background: var(--white); border-radius: var(--r-full); box-shadow: var(--sh-pop); opacity: 0; pointer-events: none; transform: translateY(6px) scale(.96); transition: all var(--dur) var(--ease); z-index: 20; }
.react-wrap:hover .react-picker, .react-wrap:focus-within .react-picker, .react-picker.open { opacity: 1; pointer-events: auto; transform: none; }
.react-picker button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; transition: transform var(--dur) var(--ease); }
.react-picker button:hover, .react-picker button:focus-visible { transform: translateY(-4px) scale(1.18); background: var(--stone); }
.comments { padding: 4px 16px 14px; display: grid; gap: 10px; }
.comment { display: flex; gap: 8px; }
.comment-bubble { background: var(--stone); border-radius: var(--r-md); padding: 8px 12px; font-size: 14px; }
.comment-bubble b { font-weight: 650; display: block; font-size: 13.5px; }
.comment-meta { display: flex; gap: 12px; font-size: 12px; color: var(--subtext); padding: 2px 12px; font-weight: 600; }
.comment-meta button:hover { text-decoration: underline; }
.comment-form { display: flex; gap: 8px; align-items: center; }
.comment-form .input { border-radius: var(--r-md); background: var(--stone); border-color: transparent; height: 38px; }

/* Post variants */
.post-banner { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--rule); color: var(--subtext); }
.post-banner .i { color: var(--sk, var(--violet-600)); }
.achievement { margin: 12px 16px 0; border-radius: var(--r-md); padding: 18px; display: flex; gap: 16px; align-items: center;
  background: linear-gradient(120deg, var(--gold-100), #fff7e6 60%, var(--lavender-50)); box-shadow: inset 0 0 0 1px rgba(231,178,58,.35); }
.medal { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--plum-900);
  background: radial-gradient(circle at 35% 30%, #ffe7a3, var(--gold-500) 60%, #b98318); box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(231,178,58,.6), 0 8px 18px -6px rgba(185,131,24,.6); }
.medal .i { width: 28px; height: 28px; }
.project-embed { margin: 12px 16px 0; border-radius: var(--r-md); border: 1px solid var(--rule); overflow: hidden; display: block; color: inherit; text-decoration: none !important; transition: box-shadow var(--dur); }
.project-embed:hover { box-shadow: var(--sh-raise); }
.project-embed .pe-cover { height: 96px; background: linear-gradient(115deg, var(--forest-800), #13615a 50%, var(--violet-600)); position: relative; overflow: hidden; }
.project-embed .pe-cover::after { content: ""; position: absolute; width: 220px; height: 220px; right: -40px; top: -100px; border-radius: 50%; background: radial-gradient(circle, rgba(212,199,255,.7), transparent 70%); filter: blur(20px); }
.project-embed .pe-body { padding: 12px 14px 14px; display: grid; gap: 10px; }
.mini-gantt { display: grid; gap: 5px; }
.mini-gantt .mg-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; font-size: 12px; color: var(--subtext); }
.mini-gantt .mg-track { height: 8px; background: var(--stone); border-radius: 4px; position: relative; }
.mini-gantt .mg-bar { position: absolute; top: 0; height: 100%; border-radius: 4px; background: var(--violet-600); }
.mini-gantt .mg-bar.done { background: var(--success); } .mini-gantt .mg-bar.risk { background: var(--ember-500); }
.poll { padding: 12px 16px 0; display: grid; gap: 8px; }
.poll-opt { position: relative; height: 44px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--rule-strong); display: flex; align-items: center; justify-content: space-between; padding: 0 14px; overflow: hidden; font-weight: 560; text-align: left; width: 100%; isolation: isolate; }
.poll-opt:hover { box-shadow: inset 0 0 0 1px var(--violet-600); }
.poll-opt .fill { position: absolute; inset: 0 auto 0 0; background: var(--lavender-100); z-index: -1; width: 0; transition: width 500ms var(--ease); }
.poll-opt .pct { font-weight: 700; opacity: 0; transition: opacity var(--dur); }
.poll.voted .poll-opt .pct { opacity: 1; }
.poll-opt.chosen { box-shadow: inset 0 0 0 2px var(--violet-600); }
.help-box { margin: 12px 16px 0; border-radius: var(--r-md); padding: 14px; background: var(--ember-100); display: grid; gap: 10px; }
.help-box ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.help-box li { display: flex; gap: 8px; align-items: center; }
.help-box li .i { color: var(--ember-500); }
.event-card { margin: 12px 16px 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--rule); display: grid; grid-template-columns: 84px 1fr; }
.event-date { background: var(--plum-800); color: #fff; display: grid; place-content: center; text-align: center; padding: 12px; }
.event-date b { font-size: 30px; font-weight: 300; line-height: 1; }
.event-date span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--lilac-300); }
.event-info { padding: 12px 14px; display: grid; gap: 6px; }

/* ---------- Right rail widgets ---------- */
.challenge { padding: 16px; background: var(--forest-800); color: #fff; border-radius: var(--r-md); position: relative; overflow: hidden; isolation: isolate; }
.challenge::before { content: ""; position: absolute; width: 260px; height: 160px; right: -100px; bottom: -60px; border-radius: 50%; background: rgba(138,102,204,.7); filter: blur(46px); transform: rotate(-30deg); z-index: -1; }
.challenge h3 { font-size: 18px; margin: 8px 0 6px; }
.challenge p { color: rgba(255,255,255,.8); font-size: 13.5px; }
.challenge .meta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; color: rgba(255,255,255,.75); }
.list { display: grid; padding: 0 8px 8px; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); }
a.list-item, button.list-item { color: var(--ink); text-decoration: none; width: 100%; text-align: left; }
a.list-item:hover, button.list-item:hover { background: var(--stone); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-sub { font-size: 12.5px; color: var(--subtext); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend .rank { width: 24px; font-weight: 300; font-size: 20px; color: var(--muted); text-align: center; }
.date-tile { width: 44px; height: 48px; border-radius: var(--r-sm); background: var(--lavender-100); color: var(--plum-800); display: grid; place-content: center; text-align: center; flex: none; }
.date-tile b { font-size: 17px; line-height: 1; font-weight: 650; } .date-tile span { font-size: 10.5px; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; }
.contacts .list-item { padding: 6px 8px; }

.footer-mini { font-size: 12px; color: var(--subtext); padding: 4px 10px 16px; line-height: 1.7; }
.footer-mini a { color: var(--subtext); }

/* ---------- Popovers / Modals / Drawer ---------- */
.popover { position: absolute; top: calc(100% + 8px); right: 0; width: 380px; max-height: 70vh; overflow: auto; background: var(--white); border-radius: var(--r-md); box-shadow: var(--sh-pop); z-index: 250; padding: 8px; display: none; }
.popover.open { display: block; animation: pop var(--dur) var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.popover h2 { font-size: 20px; padding: 8px 8px 4px; font-weight: 650; }
.notif { display: flex; gap: 12px; padding: 10px 8px; border-radius: var(--r-sm); position: relative; align-items: flex-start; }
.notif:hover { background: var(--stone); }
.notif.unread::after { content: ""; position: absolute; right: 10px; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--violet-600); }
.notif p { font-size: 14px; padding-right: 18px; }
.notif time { font-size: 12px; color: var(--violet-600); font-weight: 600; }
.notif .n-ico { position: absolute; left: 36px; top: 36px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 2px var(--white); }
.notif .n-ico .i { width: 12px; height: 12px; stroke-width: 2.4; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(20,20,19,.5); backdrop-filter: blur(2px); z-index: 400; display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow: auto; }
.modal-backdrop.open { display: flex; animation: fade var(--dur) var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--white); border-radius: var(--r-lg); width: 100%; max-width: 560px; box-shadow: var(--sh-pop); animation: rise 220ms var(--ease); }
.modal-lg { max-width: 920px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.modal-head h2 { font-size: 20px; font-weight: 620; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--rule); display: flex; justify-content: flex-end; gap: 8px; }

.toast-zone { position: fixed; left: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 600; }
.toast { background: var(--night); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--sh-pop); display: flex; align-items: center; gap: 10px; font-size: 14px; animation: rise 220ms var(--ease); max-width: 380px; }
.toast .i { color: var(--gold-500); }

/* Chat dock */
.chat-dock { position: fixed; right: 20px; bottom: 0; z-index: 300; display: flex; gap: 12px; align-items: flex-end; }
.chat-win { width: 328px; background: var(--white); border-radius: var(--r-md) var(--r-md) 0 0; box-shadow: var(--sh-pop); display: none; flex-direction: column; height: 440px; }
.chat-win.open { display: flex; }
.chat-win header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.chat-msgs { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 16px; font-size: 14px; background: var(--stone); align-self: flex-start; }
.msg.me { background: var(--violet-600); color: #fff; align-self: flex-end; }
.chat-win form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--rule); }
.chat-fab { width: 52px; height: 52px; margin-bottom: 20px; border-radius: 50%; background: var(--plum-800); color: #fff; display: grid; place-items: center; box-shadow: var(--sh-pop); position: relative; }
.chat-fab .badge { position: absolute; top: -2px; right: -2px; box-shadow: 0 0 0 2px var(--paper); }

/* Skills grid (modal + design system) */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skill-card { --sk: var(--sk-lead); text-align: left; padding: 16px; border-radius: var(--r-md); background: var(--white); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 10px; position: relative; overflow: hidden; transition: box-shadow var(--dur), transform var(--dur); }
.skill-card:hover { box-shadow: inset 0 0 0 1px var(--sk), var(--sh-raise); transform: translateY(-2px); }
.skill-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--sk); }
.skill-card .sk-head { display: flex; align-items: center; gap: 10px; }
.skill-card .sk-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--sk) 13%, white); color: var(--sk); }
.skill-card h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; }
.skill-card p { font-size: 13px; color: var(--subtext); }
.skill-card .sk-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--subtext); }

/* Mobile bottom bar */
.bottombar { display: none; }

/* =====================================================================
   PROJECT PAGE
   ===================================================================== */
.proj-hero { position: relative; color: #fff; background: linear-gradient(115deg, var(--night), var(--plum-800) 50%, #2d1a55); overflow: hidden; isolation: isolate; }
.proj-hero::before { content: ""; position: absolute; width: 640px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(138,102,204,.85), transparent 68%); filter: blur(60px); z-index: -1; }
.proj-hero::after { content: ""; position: absolute; width: 420px; height: 300px; right: 320px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(15,122,108,.8), transparent 70%); filter: blur(60px); z-index: -1; }
.proj-hero-inner { max-width: var(--container); margin: 0 auto; padding: 32px 20px 0; display: grid; grid-template-columns: 1fr 360px; gap: 40px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: rgba(255,255,255,.65); margin-bottom: 18px; }
.crumbs a { color: rgba(255,255,255,.8); }
.proj-hero h1 { font-size: 44px; line-height: 1.12; max-width: 720px; }
.proj-hero h1 span { color: rgba(255,255,255,.6); }
.proj-hero .lead { color: rgba(255,255,255,.8); font-size: 17px; margin-top: 14px; max-width: 640px; }
.proj-hero .actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.proj-hero .owner { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14px; color: rgba(255,255,255,.8); }
.proj-kpis { background: rgba(255,255,255,.96); color: var(--ink); border-radius: var(--r-md); padding: 18px; align-self: start; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); display: grid; gap: 14px; }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { padding: 12px; border-radius: var(--r-sm); background: var(--stone); }
.kpi b { display: block; font-size: 26px; font-weight: 300; letter-spacing: var(--track-display); line-height: 1.1; }
.kpi span { font-size: 12px; color: var(--subtext); font-weight: 560; }
.proj-tabs { position: sticky; top: var(--nav-h); z-index: 150; background: rgba(247,245,242,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.proj-tabs .tabs { max-width: var(--container); margin: 0 auto; padding: 0 20px; border-bottom: 0; }
.proj-tabs .tabs a { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 50px; padding: 0 12px; font-weight: 560; color: var(--subtext); white-space: nowrap; font-size: 14.5px; text-decoration: none; }
.proj-tabs .tabs a:hover { color: var(--ink); }
.proj-tabs .tabs a[aria-current="true"] { color: var(--ink); font-weight: 650; }
.proj-tabs .tabs a[aria-current="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: var(--violet-600); border-radius: 2px; }
.proj-wrap { max-width: var(--container); margin: 0 auto; padding: 24px 20px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.section { scroll-margin-top: calc(var(--nav-h) + 64px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h2 { font-size: 25px; }
.section-head p { color: var(--subtext); font-size: 14.5px; margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* WBS / structure */
.wbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; position: relative; }
.wbs-root { grid-column: 1 / -1; justify-self: center; background: var(--plum-800); color: #fff; padding: 12px 20px; border-radius: var(--r-md); font-weight: 620; text-align: center; position: relative; margin-bottom: 18px; }
.wbs-root::after { content: ""; position: absolute; left: 50%; bottom: -18px; width: 1px; height: 18px; background: var(--rule-strong); }
.wbs-col { position: relative; display: grid; gap: 8px; align-content: start; }
.wbs-col::before { content: ""; position: absolute; top: -10px; left: 50%; width: 1px; height: 10px; background: var(--rule-strong); }
.wbs-line { grid-column: 1 / -1; height: 1px; background: var(--rule-strong); margin: -8px 10% 10px; }
.wbs-node { background: var(--white); border-radius: var(--r-md); padding: 12px; box-shadow: var(--sh-card); border-top: 3px solid var(--sk, var(--violet-600)); }
.wbs-node h3 { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; display: flex; justify-content: space-between; gap: 8px; }
.wbs-node .progress { margin: 8px 0 4px; }
.wbs-node small { color: var(--subtext); font-size: 12px; }
.wbs-task { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px; background: var(--white); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--rule); }
.wbs-task .chk { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--rule-strong); flex: none; display: grid; place-items: center; }
.wbs-task.done { color: var(--subtext); text-decoration: line-through; }
.wbs-task.done .chk { background: var(--success); box-shadow: none; color: #fff; }
.wbs-task.done .chk .i { width: 12px; height: 12px; stroke-width: 3; }

/* Gantt */
.gantt-card { overflow: hidden; }
.gantt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.gantt-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--subtext); }
.gantt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gantt-legend i { width: 12px; height: 8px; border-radius: 3px; display: inline-block; }
.seg { display: inline-flex; background: var(--stone); border-radius: var(--r-sm); padding: 3px; }
.seg button { height: 28px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--subtext); }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: var(--sh-card); }
.gantt { display: grid; grid-template-columns: 380px 1fr; overflow: hidden; }
.gantt-left { border-right: 1px solid var(--rule); }
.gantt-right { overflow-x: auto; position: relative; }
.g-head { height: 52px; border-bottom: 1px solid var(--rule); display: flex; align-items: flex-end; font-size: 12px; color: var(--subtext); font-weight: 600; }
.g-left-head { padding: 0 16px 10px; display: grid; grid-template-columns: 1fr 40px 48px; gap: 8px; width: 100%; }
.g-row { height: 40px; border-bottom: 1px solid rgba(115,113,109,.1); display: flex; align-items: center; }
.g-row.group { background: var(--paper); font-weight: 650; }
.gantt-left .g-row { padding: 0 16px; display: grid; grid-template-columns: 1fr 40px 48px; gap: 8px; font-size: 13.5px; }
.gantt-left .g-row .g-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.gantt-left .g-row:not(.group) .g-name { padding-left: 16px; }
.gantt-left .g-row.group .g-name { grid-column: 1 / -1; }
.gantt-left .g-row .g-owner { display: flex; }
.gantt-left .g-row .g-pct { font-size: 12.5px; color: var(--subtext); font-weight: 600; text-align: right; }
.g-canvas { position: relative; }
.g-months { display: flex; height: 26px; }
.g-months div { border-left: 1px solid var(--rule); padding: 4px 8px; font-weight: 650; color: var(--ink); font-size: 12px; white-space: nowrap; overflow: hidden; }
.g-weeks { display: flex; height: 26px; }
.g-weeks div { border-left: 1px solid rgba(115,113,109,.1); padding: 5px 0 0 6px; font-size: 11px; }
.g-grid { position: absolute; inset: 52px 0 0 0; display: flex; pointer-events: none; }
.g-grid div { border-left: 1px solid rgba(115,113,109,.08); height: 100%; flex: none; }
.g-bar { position: absolute; height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--sk, var(--violet-600)) 22%, white); overflow: hidden; cursor: pointer; display: flex; align-items: center; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sk, var(--violet-600)) 45%, white); transition: transform var(--dur), box-shadow var(--dur); }
.g-bar:hover, .g-bar:focus-visible { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--sk), 0 4px 10px -4px rgba(0,0,0,.3); }
.g-bar .g-fill { position: absolute; inset: 0 auto 0 0; background: var(--sk, var(--violet-600)); }
.g-bar .g-label { position: relative; padding: 0 8px; font-size: 11.5px; font-weight: 650; color: #fff; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.g-bar.risk { box-shadow: inset 0 0 0 2px var(--ember-500); }
.g-group-bar { position: absolute; height: 8px; border-radius: 2px; background: var(--plum-800); }
.g-group-bar::before, .g-group-bar::after { content: ""; position: absolute; bottom: -5px; border: 5px solid transparent; border-top-color: var(--plum-800); }
.g-group-bar::before { left: -1px; border-left-color: var(--plum-800); border-width: 5px 4px; }
.g-group-bar::after { right: -1px; border-right-color: var(--plum-800); border-width: 5px 4px; }
.g-milestone { position: absolute; width: 14px; height: 14px; background: var(--gold-500); transform: rotate(45deg); border-radius: 2px; box-shadow: 0 0 0 2px var(--white); }
.g-ms-label { position: absolute; font-size: 11.5px; font-weight: 650; white-space: nowrap; color: var(--ink); }
.g-today { position: absolute; top: 26px; bottom: 0; width: 2px; background: var(--ember-500); z-index: 3; }
.g-today::before { content: "Сегодня"; position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: var(--ember-500); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.g-deps { position: absolute; inset: 52px 0 0 0; pointer-events: none; overflow: visible; }

/* Resources */
.res-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.res-table th { text-align: left; font-size: 12px; color: var(--subtext); font-weight: 650; padding: 10px 16px; border-bottom: 1px solid var(--rule); text-transform: uppercase; letter-spacing: .04em; }
.res-table td { padding: 12px 16px; border-bottom: 1px solid rgba(115,113,109,.12); vertical-align: middle; }
.res-table tr:last-child td { border-bottom: 0; }
.res-table .res-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.res-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--lavender-100); color: var(--violet-600); flex: none; }
.cover-bar { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.cover-bar .progress { flex: 1; }

/* Network graph */
.net-wrap { position: relative; height: 420px; }
.net-wrap svg { width: 100%; height: 100%; }
.net-node { cursor: pointer; }
.net-node circle { transition: r var(--dur); }
.net-node:hover circle.main, .net-node:focus circle.main { stroke-width: 4; }
.net-label { font: 600 12px var(--font-sans); fill: var(--ink); }
.net-sub { font: 500 10.5px var(--font-sans); fill: var(--subtext); }
.net-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--subtext); padding: 0 16px 14px; }
.net-legend span { display: inline-flex; align-items: center; gap: 6px; }
.net-legend i { width: 18px; height: 0; border-top: 2px solid; display: inline-block; }

/* Stakeholder matrix */
.matrix { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; height: 400px; margin: 0 8px 0 44px; }
.matrix .q { display: flex; flex-direction: column; justify-content: flex-end; border-radius: var(--r-sm); padding: 10px 12px; font-size: 12px; font-weight: 700; color: var(--subtext); text-transform: uppercase; letter-spacing: .05em; position: relative; }
.matrix .q1 { background: var(--lavender-50); } .matrix .q2 { background: var(--lavender-100); } .matrix .q3 { background: var(--stone); } .matrix .q4 { background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
.matrix .q small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11.5px; margin-top: 2px; }
.matrix .axis-y { position: absolute; left: -46px; top: 50%; transform: translateY(-50%) rotate(-90deg); font-size: 12px; font-weight: 650; color: var(--subtext); white-space: nowrap; }
.matrix .axis-x { position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 650; color: var(--subtext); }
.sh-dot { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; background: var(--white); padding: 3px 8px 3px 3px; border-radius: var(--r-full); box-shadow: var(--sh-raise); font-size: 12px; font-weight: 620; white-space: nowrap; z-index: 2; }
.sh-dot:hover { z-index: 3; box-shadow: var(--sh-pop); }
.sh-dot i { width: 10px; height: 10px; border-radius: 50%; }
.sh-list { display: grid; gap: 0; }
.sh-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid rgba(115,113,109,.12); }
.sh-item h4 { font-size: 14px; font-weight: 650; letter-spacing: -0.005em; }
.sh-item p { font-size: 12.5px; color: var(--subtext); }

/* Support needs */
.need-card { padding: 16px; display: grid; gap: 10px; align-content: start; border-top: 4px solid var(--ember-500); }
.need-card.met { border-top-color: var(--success); }
.need-card h3 { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.need-card p { font-size: 13.5px; color: var(--subtext); }
.need-card .nc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }

/* Risks */
.risk-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid rgba(115,113,109,.12); font-size: 14px; }
.heat { display: inline-grid; grid-template-columns: repeat(3, 10px); gap: 2px; }
.heat i { width: 10px; height: 10px; border-radius: 2px; background: var(--stone); }
.heat i.on { background: var(--ember-500); }

/* Footer */
.site-footer { background: var(--wine-800); color: #fff; padding: 56px 20px 32px; overflow: hidden; }
.site-footer-inner { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.site-footer h4 { font-size: 15px; font-weight: 700; margin-bottom: 12px; letter-spacing: 0; }
.site-footer a { display: block; color: rgba(255,255,255,.78); margin-bottom: 8px; font-size: 14px; }
.site-footer p { color: rgba(255,255,255,.85); font-size: 20px; line-height: 1.3; font-weight: 520; letter-spacing: -0.02em; max-width: 340px; margin-top: 16px; }
.wordmark { max-width: var(--container); margin: 48px auto 0; }
.wordmark svg { width: 100%; height: auto; display: block; }


/* =====================================================================
   PROJECT STUDIO — блок «От идеи к проекту» (методика Project Studio)
   ===================================================================== */
.studio-hero { color: #fff; background: linear-gradient(115deg, var(--night), var(--plum-800) 60%, #2d1a55); position: relative; overflow: hidden; isolation: isolate; }
.studio-hero::before { content: ""; position: absolute; width: 520px; height: 300px; right: -80px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(15,122,108,.8), transparent 70%); filter: blur(50px); z-index: -1; }
.studio-hero-inner { max-width: var(--container); margin: 0 auto; padding: 24px 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.studio-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.studio { max-width: var(--container); margin: 0 auto; padding: 20px 20px 64px; display: grid; grid-template-columns: 280px minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.studio-nav, .studio-side { position: sticky; top: calc(var(--nav-h) + 16px); display: grid; gap: 12px; max-height: calc(100vh - var(--nav-h) - 32px); overflow-y: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.sn-group + .sn-group { margin-top: 6px; }
.sn-stage { padding: 10px 8px 4px; }
.sn-item { display: grid; grid-template-columns: 36px 1fr 10px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none !important; }
.sn-item:hover { background: var(--stone); }
.sn-item.is-active { background: var(--lavender-100); box-shadow: inset 3px 0 0 var(--violet-600); }
.sn-ico { width: 36px; height: 36px; object-fit: contain; }
.sn-ico-doc { display: grid; place-items: center; border-radius: 10px; background: var(--plum-800); color: var(--gold-500); }
.sn-ico-doc .i { width: 18px; height: 18px; }
.sn-title { display: block; font-size: 13.5px; font-weight: 580; line-height: 1.25; }
.sn-sub { display: block; font-size: 11.5px; color: var(--subtext); }
.sn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--media-stone); flex: none; }
.sn-dot[data-st="draft"] { background: var(--gold-500); }
.sn-dot[data-st="done"] { background: var(--success); }
.sn-dot[data-st="check"] { background: var(--ember-500); box-shadow: 0 0 0 3px var(--ember-100); }
.studio-editor { padding: 0; min-width: 0; }
.ed-head { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px 18px; border-bottom: 1px solid var(--rule); }
.ed-head h1:focus { outline: none; }
.ed-ico { width: 64px; height: 64px; object-fit: contain; flex: none; }
.ed-ico-doc { display: grid; place-items: center; border-radius: 16px; background: var(--plum-800); color: var(--gold-500); }
.ed-body { padding: 20px 24px; display: grid; gap: 18px; }
.sf { display: grid; gap: 6px; align-content: start; }
.sf-label { font-size: 14px; font-weight: 620; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; padding: 0; }
.sf-label .req { color: var(--ember-500); }
.sf-label .opt { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.fh { font-size: 12.5px; color: var(--subtext); margin-top: -2px; }
.fh-bad { color: var(--danger); }
.input.is-bad { border-color: var(--danger); }
.seg-wide { display: flex; flex-wrap: wrap; gap: 3px; width: 100%; }
.seg-wide button { height: auto; min-height: 32px; padding: 6px 12px; text-align: left; line-height: 1.3; flex: 1 1 auto; }
.seg-sm button { height: 28px; min-width: 32px; padding: 0 8px; }
.sf-rows { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.sf-rows > button { justify-self: start; }
.sr { border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--rule); padding: 14px; display: grid; gap: 12px; background: var(--paper); }
.sr-head { display: flex; align-items: center; gap: 10px; }
.sr-head b { font-size: 14px; }
.sr-head .btn { margin-left: auto; }
.sr-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.sr-grid .sf:has(textarea) { grid-column: 1 / -1; }
.sr-grid.roadmap, .sr-grid.resources { grid-template-columns: repeat(3, minmax(0,1fr)); }
.sr-grid.roadmap .sf:first-child, .sr-grid.resources .sf:first-child { grid-column: 1 / -1; }
.sr .input, .sr .textarea { background: #fff; }
.score { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: var(--r-xs); background: var(--stone); color: var(--subtext); }
.score.mid { background: var(--warning-bg); color: var(--warning); }
.score.hi { background: var(--danger-bg); color: var(--danger); }
.score.win { background: var(--success-bg); color: var(--success); }
.mx { display: grid; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--rule-strong); }
.mx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mx-label { font-size: 13px; }
.calc { border-radius: var(--r-md); padding: 16px; background: var(--lavender-50); box-shadow: inset 0 0 0 1px rgba(113,76,182,.15); display: grid; gap: 10px; }
.calc-grid { grid-template-columns: repeat(3, 1fr); }
.calc-grid .kpi { background: #fff; }
.calc-grid .kpi b { font-size: 20px; }
.calc-grid p { grid-column: 1 / -1; }
.calc-bar { display: grid; grid-template-columns: minmax(0, 1fr) 140px 36px; gap: 10px; align-items: center; font-size: 13.5px; }
.calc-bar > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-bar b { text-align: right; }
.smart { display: flex; gap: 6px; flex-wrap: wrap; }
.smart span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 4px 9px; border-radius: var(--r-xs); background: var(--danger-bg); color: var(--danger); }
.smart span.ok { background: var(--success-bg); color: var(--success); }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.tl li { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0 6px 0; position: relative; }
.tl li .g-milestone { margin-top: 5px; }
.tl li:not(:last-child)::before { content: ""; position: absolute; left: 4.5px; top: 20px; bottom: -6px; width: 1px; background: var(--rule-strong); }
.pmx { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.pmx > div { background: #fff; border-radius: var(--r-sm); padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 4px; align-content: start; min-height: 64px; }
.pmx > div.hot { background: var(--lavender-100); }
.pmx small { flex-basis: 100%; font-size: 11px; font-weight: 700; color: var(--subtext); text-transform: uppercase; letter-spacing: .04em; }
.pmx span { font-size: 12.5px; font-weight: 600; background: var(--stone); padding: 2px 8px; border-radius: var(--r-xs); }
.heatmap { display: grid; grid-template-columns: 20px auto; grid-template-rows: auto 18px; gap: 4px; justify-content: start; }
.hm-y { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11.5px; font-weight: 650; color: var(--subtext); text-align: center; }
.hm-x { grid-column: 2; font-size: 11.5px; font-weight: 650; color: var(--subtext); }
.hm-grid { display: grid; grid-template-columns: repeat(5, 36px); grid-auto-rows: 28px; gap: 3px; }
.hm-cell { border-radius: 5px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 2px; }
.hm-cell.mid { background: var(--warning-bg); } .hm-cell.hi { background: var(--danger-bg); }
.hm-cell b { width: 18px; height: 18px; border-radius: 50%; background: var(--plum-800); color: #fff; font-size: 11px; display: grid; place-items: center; }
.pitch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pitch span { display: flex; gap: 8px; align-items: center; font-size: 12.5px; padding: 8px 10px; border-radius: var(--r-sm); background: #fff; box-shadow: inset 0 0 0 1px var(--rule); }
.pitch span b { width: 20px; height: 20px; border-radius: 50%; background: var(--stone); display: grid; place-items: center; font-size: 11px; flex: none; }
.pitch span.filled b { background: var(--success); color: #fff; }
.pitch span.now { box-shadow: inset 0 0 0 2px var(--violet-600); background: var(--lavender-100); }
.crit { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.crit a { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); background: #fff; color: var(--ink); text-decoration: none !important; font-size: 13.5px; font-weight: 560; }
.crit a b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--stone); font-size: 12px; }
.crit a[data-st="done"] b { background: var(--success); color: #fff; }
.asm { border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--rule); padding: 14px 16px; display: grid; gap: 4px; }
.asm-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.asm-head h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; display: flex; gap: 8px; align-items: center; }
.asm p { font-size: 14px; }
.alert-stale { margin: 16px 24px 0; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--ember-100); font-size: 14px; flex-wrap: wrap; }
.alert-stale > span { flex: 1; min-width: 200px; }
.alert-stale .i { color: var(--ember-500); }
.ed-check { margin: 0 24px 16px; padding: 14px 16px; border-radius: var(--r-md); font-size: 14px; }
.ed-check ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.ed-check.has-gaps { background: var(--warning-bg); }
.ed-check.ok { background: var(--success-bg); color: var(--success); display: flex; gap: 8px; align-items: center; }
.ed-check.help { background: var(--lavender-100); }
.ed-foot .lbl-short { display: none; }
.ed-foot { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--rule); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-radius: 0 0 var(--r-md) var(--r-md); }
.crit-row { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none !important; font-size: 13.5px; }
.crit-row:hover { background: var(--stone); }
.pt { display: flex; gap: 10px; align-items: center; }
@media (max-width: 1240px) { .studio { grid-template-columns: 250px minmax(0,1fr); } .studio-side { grid-column: 1 / -1; position: static; max-height: none; grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .studio { grid-template-columns: minmax(0,1fr); padding: 12px 12px 140px; gap: 12px; }
  .studio-nav { position: static; max-height: none; overflow: visible; }
  .studio-nav > .card:first-child { display: none; }
  #stepNav { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
  #stepNav .sn-group { display: contents; }
  #stepNav .sn-stage { display: none; }
  #stepNav .sn-item { grid-template-columns: 1fr; justify-items: center; text-align: center; min-width: 84px; padding: 8px 4px; position: relative; scroll-snap-align: start; }
  #stepNav .sn-item .sn-sub { display: none; }
  #stepNav .sn-item .sn-title { font-size: 11.5px; }
  #stepNav .sn-dot { position: absolute; top: 6px; right: 14px; }
  .studio-side { grid-template-columns: 1fr; }
  .ed-head { padding: 16px; gap: 12px; flex-wrap: wrap; }
  .ed-ico { width: 48px; height: 48px; }
  .ed-body { padding: 16px; }
  .ed-foot { padding: 8px 12px; bottom: 64px; flex-wrap: nowrap; gap: 6px; }
  .ed-foot #savedNote, .ed-foot .lbl-full { display: none; }
  .ed-foot .lbl-short { display: inline; }
  .ed-foot .btn { height: 38px; padding: 0 12px; font-size: 13.5px; white-space: nowrap; }
  .ed-foot .btn:last-child { margin-left: auto; }
  body[data-page="studio"] .chat-dock { display: none; }
  .studio-hero-inner { padding: 18px 16px; gap: 12px; }
  .studio-hero h1 { font-size: 26px; }
  .sr-grid, .sr-grid.roadmap, .sr-grid.resources, .calc-grid, .crit, .pitch { grid-template-columns: 1fr; }
  .calc-bar { grid-template-columns: minmax(0,1fr) 80px 30px; }
  .alert-stale, .ed-check { margin-left: 16px; margin-right: 16px; }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1240px) {
  :root { --col-left: 232px; --col-right: 296px; }
  .mainnav a { width: 54px; }
}
@media (max-width: 1100px) {
  .layout { grid-template-columns: 76px minmax(0,1fr) var(--col-right); }
  .topnav-inner { grid-template-columns: auto 1fr auto; }
  .col-left .me-card .me-text, .col-left .side-title, .col-left .skill-list, .col-left .footer-mini, .sidenav .label, .sidenav .count, .sidenav .badge { display: none; }
  .col-left .card { background: transparent; box-shadow: none; }
  .sidenav a, .sidenav button { justify-content: center; padding: 0; }
  .me-card { justify-content: center; padding: 6px 0; }
  .brand-name { display: none; }
  .proj-hero-inner { grid-template-columns: 1fr; }
  .wbs { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0,1fr); padding: 12px 12px 88px; }
  .col-left, .col-right { display: none; }
  .mainnav { display: none; }
  .topnav-inner { padding: 0 12px; gap: 12px; }
  .topnav-center .search { max-width: none; }
  .topnav-right .hide-m { display: none; }
  .bottombar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: 64px; background: var(--white); border-top: 1px solid var(--rule); z-index: 250; padding-bottom: env(safe-area-inset-bottom); }
  .bottombar a { display: grid; place-items: center; align-content: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--subtext); position: relative; text-decoration: none; }
  .bottombar a[aria-current="page"] { color: var(--violet-600); }
  .bottombar .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
  .chat-dock { bottom: 64px; right: 12px; }
  .chat-fab { width: 48px; height: 48px; margin-bottom: 12px; }
  .chat-win { width: calc(100vw - 24px); position: fixed; right: 12px; bottom: 64px; height: 70vh; }
  .stage-hero { grid-template-columns: 1fr; padding: 20px 18px 0; }
  .stage-emblem { display: none; }
  .stage-hero h1 { font-size: 23px; }
  .stage-selector { grid-template-columns: 1fr; }
  .stage-selector button { border-right: 0; border-top: 1px solid rgba(252,250,247,.08); }
  .stage-selector button:not([aria-selected="true"]):nth-child(n+3) { display: none; }
  .composer-actions button span { display: none; }
  .post-actions > button span, .post-actions .react-wrap > button span { display: none; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .proj-hero h1 { font-size: 32px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .section-head { flex-wrap: wrap; align-items: flex-start; }
  .matrix { height: 340px; overflow: hidden; grid-template-columns: minmax(0,1fr) minmax(0,1fr); margin-left: 34px; }
  .matrix .q { font-size: 10.5px; padding: 8px; overflow-wrap: anywhere; }
  .matrix .q small { font-size: 10.5px; }
  .sh-dot { font-size: 11px; padding: 2px 6px 2px 2px; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
  .wbs { grid-template-columns: 1fr 1fr; }
  .gantt { grid-template-columns: 170px 1fr; }
  .g-left-head, .gantt-left .g-row { grid-template-columns: 1fr !important; }
  .gantt-left .g-owner, .gantt-left .g-pct, .g-left-head span:not(:first-child) { display: none !important; }
  .site-footer-inner { grid-template-columns: 1fr 1fr; }
  .popover { position: fixed; left: 8px; right: 8px; top: calc(var(--nav-h) + 4px); width: auto; }
  .matrix { margin-left: 34px; height: 360px; }
  .toast-zone { bottom: 80px; left: 12px; right: 12px; }
}
@media (max-width: 520px) {
  .skills-grid, .grid-4, .wbs, .kpi-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .media-art { height: 220px; }
  .topnav-center .search kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.method-strip { display: grid; grid-template-columns: repeat(9, minmax(0,1fr)); gap: 8px; }
.ms-step { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 10px 4px; border-radius: var(--r-md); color: var(--ink); text-decoration: none !important; }
.ms-step:hover { background: var(--stone); }
.ms-step img { width: 48px; height: 48px; object-fit: contain; }
@media (max-width: 1100px) { .method-strip { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 520px) { .method-strip { grid-template-columns: repeat(3, 1fr); } }

.textarea.is-bad { border-color: var(--danger); }
.seg.is-bad { box-shadow: 0 0 0 2px var(--danger); border-radius: var(--r-sm); }

/* Фото из TOMIRIS_Prototype_Assets */
.media-art.has-photo { background-size: cover; background-position: center; }
.media-art.has-photo::before { display: none; }
.media-grid > div { background-position: center; }
.avatar img { background: transparent; }
.story { background-color: var(--plum-800); }
.story .story-name { text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.proj-hero.has-photo { background: linear-gradient(100deg, rgba(20,20,19,.94) 0%, rgba(40,22,71,.9) 45%, rgba(40,22,71,.55) 100%), var(--hero-img) center/cover; }
.need-thumb { width: 44px; height: 44px; border-radius: var(--r-sm); background-size: cover; background-position: center; flex: none; }
.upd-photo { height: 140px; border-radius: var(--r-sm); background-size: cover; background-position: center; }
.project-embed .pe-cover { height: 120px; background: linear-gradient(90deg, rgba(12,66,67,.75), rgba(113,76,182,.25)), url('../TOMIRIS_Prototype_Assets/backgrounds/public-sector-office.webp') center 40%/cover; }
.project-embed .pe-cover::after { display: none; }
