:root{
  /* ---- surface (dark) ---- */
  --paper: #000000;          /* canvas — pure black, as requested */
  --paper-raised: #141414;   /* surface-soft */
  --surface-strong: #1e1e1e;

  /* ---- text ---- */
  --ink: #f2f2f0;            /* primary text */
  --ink-soft: #9a9a95;       /* muted */
  --ink-faint: #6b6b66;      /* muted-soft */
  --body-text: #c6c5c0;

  /* ---- lines ---- */
  --line: #2a2a27;           /* hairline */
  --line-soft: #201f1c;
  --line-strong: #46443e;

  /* ---- brand: single accent, used sparingly ---- */
  --accent: #7c3aed;         /* violet */
  --accent-active: #9061f9;  /* brighter on hover — dark surfaces need lift, not darkening */
  --accent-disabled: #3d2670;

  /* legacy names kept for inline-style compatibility, repointed:
     --pine  -> confident/ink data (no separate "success" hue)
     --signal -> the rare, deliberate accent moment */
  --pine: #f2f2f0;
  --signal: #7c3aed;

  /* ---- semantic accents for insight cards ---- */
  --success: #6fbe9c;
  --success-bg: #12201a;
  --warning: #ff6b81;
  --warning-bg: #241318;
  --note: #b28dff;
  --note-bg: #1c1730;
  --highlight: #e8b854;
  --highlight-bg: #241d10;

  --max: 680px;
  --max-wide: 720px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-full: 999px;

  /* light-based shadows vanish on a black canvas — lift with a soft
     white hairline + a deeper black falloff instead */
  --shadow-1: 0 0 0 1px rgba(255,255,255,0.08), 0 10px 30px rgba(0,0,0,0.6);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (min-width: 900px){
  html{ zoom: 1.25; }
}

body{
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap{ max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.wrap-wide{ max-width: var(--max-wide); margin: 0 auto; padding: 0 28px; }

a{ color: inherit; }

/* neutralized: system runs one sans family everywhere, no monospace */
.mono{ font-family: inherit; letter-spacing: 0; }

/* ---------- nav ---------- */
header.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  transition: background .3s ease;
}
/* home page only: the real nav sits in normal flow (not sticky) over the
   hero effect and simply scrolls away with the page like any other content;
   a separate fixed bar (.nav-reveal, below) fades in once it's gone */
header.nav.nav-hero{ position: static; background: transparent; }

/* home page only: duplicate fixed bar, hidden until the in-flow nav above
   has scrolled out of view, then fades smoothly into place (see script.js) */
.nav-reveal{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .3s ease, transform .3s ease;
}
.nav-reveal.visible{ opacity: 1; pointer-events: auto; transform: translateY(0); }
.nav-inner{
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-name{
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.nav-links{ display: flex; gap: 26px; align-items: center; }
.nav-links a{
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-links a i{ font-size: 24px; }
.nav-links a:hover{ color: var(--ink); }
.nav-links a.active{ color: var(--ink); border-color: var(--ink); }

/* ru/en language switch, right end of the nav links — a small dot-matrix
   glyph, built from the same dot engine as the hero canvases. At rest it
   shows the current language; hover/focus morphs the dots into a preview
   of the other one before the click actually navigates there (script.js).
   .ls-fallback is the plain-text link shown until that script runs. */
.lang-switch{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background .2s ease;
}
.lang-switch:hover,
.lang-switch:focus-visible{ background: var(--paper-raised); }
.ls-fallback{ font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-soft); }
.ls-canvas{ display: none; }

@media (max-width: 480px){
  .nav-inner{ padding: 18px 20px; }
  .nav-name{ font-size: 14.5px; }
  .nav-links{ gap: 14px; }
  /* Кейсы/Опыт/CV don't fit comfortably next to the switch on small screens —
     keep only the logo and the language switch in the mobile nav. The
     switch is itself a direct-child <a> now too, so it's explicitly excluded */
  .nav-links > a:not(.lang-switch){ display: none; }
  .lang-switch{ padding: 11px; }
}
.badge{ font-size: 13px; font-weight: 500; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; }
.dot{ width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--accent); display: inline-block; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse{ 0%,100%{ opacity:1 } 50%{ opacity:.35 } }

/* ---------- hero (home page) ---------- */
.hero{ position: relative; padding: 64px 0 80px; }
/* page-level, not scoped to .hero: spans from the very top (behind the nav)
   down through the hero buttons, with a fade tail (see script.js), then
   breaks out of .wrap-wide's max-width so it spans the full viewport */
.hero-canvas{ position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none; }
h1{
  font-weight: 700;
  font-size: clamp(28px, 4.6vw, 38px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  color: var(--ink);
}
h1 em{ font-style: normal; font-weight: 700; color: var(--accent); }
.hero h1{ margin: 0; font-size: clamp(32px, 7vw, 59px); text-align: center; }
.hero h1 .wave{ font-weight: 400; font-size: 0.85em; vertical-align: -0.06em; display: inline-block; transform-origin: 70% 70%; animation: wave 10s ease-in-out infinite; }
/* the actual wave motion is squeezed into the first 1.4s of a 10s cycle
   (same relative timing as before, just scaled by 1.4/10), then holds flat
   for the rest — so it plays once on load and repeats every 10s */
@keyframes wave{
  0%, 14%, 100%{ transform: rotate(0deg); }
  2.1%{ transform: rotate(14deg); }
  4.2%{ transform: rotate(-8deg); }
  6.3%{ transform: rotate(14deg); }
  8.4%{ transform: rotate(-4deg); }
  10.5%{ transform: rotate(10deg); }
}
@media (prefers-reduced-motion: reduce){
  .hero h1 .wave{ animation: none; }
}
.hero p.sub{ max-width: 620px; font-size: 22px; line-height: 1.45; color: var(--body-text); margin: 0; text-align: center; }
@media (max-width: 640px){
  .hero p.sub{ font-size: 17px; line-height: 1.5; }
}

.hero-grid{ position: relative; z-index: 1; display: flex; justify-content: center; }
.hero-content{ display: flex; flex-direction: column; align-items: center; gap: 23px; padding-top: 16px; min-width: 0; }
.hero-actions{ display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 40px; }

.hero-photo{ flex-shrink: 0; position: relative; order: -1; }
.hero-photo::before{
  content: "";
  position: absolute;
  inset: -18px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.16;
  filter: blur(6px);
  z-index: -1;
}
.avatar-lg{
  width: 204px;
  height: 189px;
  border-radius: var(--radius-md);
  object-fit: cover;
  display: block;
}

@media (max-width: 720px){
  .avatar-lg{ width: 150px; height: 139px; }
}

/* button-pill-rausch: the one primary CTA moment */
.btn-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 12px 22px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.btn-pill:hover{ background: var(--accent-active); border-color: var(--accent-active); }

/* secondary hero action — same shape, quieter outline treatment */
.btn-pill-secondary{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 12px 22px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.btn-pill-secondary:hover{ background: var(--paper-raised); border-color: var(--ink-soft); }
.btn-icon{ font-size: 18px; line-height: 1; flex-shrink: 0; }

/* ---------- section shared ---------- */
section{ padding: 64px 0; }
.section-title{
  font-weight: 700;
  font-size: 36px;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}
@media (max-width: 640px){
  section{ padding: 48px 0; }
  .section-title{ font-size: 27px; margin-bottom: 18px; }
}

.reveal{ opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in{ opacity: 1; transform: translateY(0); }

/* ---------- contact (home page) ---------- */
.contact-row{ display: flex; flex-wrap: wrap; gap: 28px; }
.contact-row a{
  text-decoration: none;
  font-size: 14.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .15s ease, border-color .15s ease;
}
.contact-row a:hover{ color: var(--ink); border-color: var(--ink); }

/* ---------- superpowers — horizontal scroll cards ---------- */
.power-wrap{ position: relative; margin-top: 22px; }
.power-scroll{
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.power-scroll::-webkit-scrollbar{ display: none; }
/* while dragging with the mouse (see script.js): kill snap so the drag
   tracks the cursor smoothly, and block text/image selection */
.power-scroll.dragging{
  scroll-snap-type: none;
  cursor: grabbing;
  user-select: none;
}
.power-scroll.dragging .power-card{ pointer-events: none; }

/* ---------- superpowers — scroll position dots ---------- */
.power-dots{ display: flex; justify-content: center; gap: 7px; margin-top: 4px; }
.power-dot{
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: var(--line-strong);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.power-dot:hover{ background: var(--ink-soft); }
.power-dot.active{ background: var(--ink); transform: scale(1.3); }
.power-wrap::after{
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 14px;
  width: 48px;
  background: linear-gradient(to right, transparent, var(--paper));
  pointer-events: none;
  opacity: 1;
  transition: opacity .2s ease;
}
/* toggled by script.js once the scroller is fully scrolled to the end */
.power-wrap.at-end::after{ opacity: 0; }
.power-card{
  flex: 0 0 auto;
  width: min(74vw, 250px);
  scroll-snap-align: start;
  background: var(--paper-raised);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.power-emoji{ font-size: 26px; line-height: 1; }
.power-card b{ font-size: 15px; color: var(--ink); font-weight: 600; }
.power-card p{ margin: 0; font-size: 13.5px; color: var(--body-text); line-height: 1.5; }

/* ---------- work cards (home page) — property-card style ---------- */
.case{
  display: block;
  text-decoration: none;
  padding-bottom: 36px;
  margin-bottom: 36px;
}
.case:last-child{ margin-bottom: 0; padding-bottom: 0; }
.case h3{ font-weight: 600; font-size: 24px; margin: 0 0 16px; color: var(--ink); }
.case p.desc{ color: var(--body-text); font-size: 14.5px; max-width: 560px; margin: 0 0 16px; }
@media (max-width: 640px){
  .case h3{ font-size: 20px; margin-bottom: 12px; }
}

/* button-secondary: repeated, quieter CTA — outline, not filled */
.case-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 22px;
  transition: background .15s ease, border-color .15s ease;
}
.case:hover .case-link{ background: var(--paper-raised); border-color: var(--ink-soft); }
.case-link i{ font-size: 24px; }
.case-cover{ border-radius: var(--radius-md); overflow: hidden; transition: box-shadow .2s ease; }
.case-cover img{ width: 100%; display: block; border: none; }
.case:hover .case-cover{ box-shadow: var(--shadow-1); }

/* ---------- experience list (home page) ---------- */
.logos-strip{ width: 100%; max-width: 460px; display: block; opacity: 0.85; margin: 24px 0 28px; }
@media (min-width: 641px){
  .logos-strip{ max-width: 340px; }
}
.exp-list{ margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.exp-item{
  background: var(--paper-raised);
  border-radius: var(--radius-md);
  padding: 0 18px;
}
.exp-item summary{
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 16px 26px 16px 0;
  position: relative;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.exp-item summary::-webkit-details-marker{ display: none; }
.exp-item summary::after{
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-65%) rotate(45deg);
  transition: transform .2s ease;
}
.exp-item[open] summary::after{ transform: translateY(-35%) rotate(225deg); }
.exp-role{ color: var(--ink); font-weight: 600; }
.exp-company{ color: var(--ink); }
.dot-sep{ color: var(--ink-soft); margin: 0 8px; }
.exp-body{ padding: 0 0 20px; color: var(--body-text); font-size: 14.5px; max-width: 620px; border-top: 1px solid var(--line); padding-top: 14px; }
.exp-body p{ margin: 0 0 10px; }
.exp-body p:last-child{ margin-bottom: 0; }
.exp-body ul{ margin: 0 0 10px; padding-left: 18px; }
.exp-body ul:last-child{ margin-bottom: 0; }
.exp-body li{ margin-bottom: 6px; }

/* ---------- education list (home page) ---------- */
.edu-list{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.edu-list li{ display: flex; align-items: center; gap: 14px; }
.edu-list img{ width: 44px; height: 44px; object-fit: contain; border-radius: var(--radius-sm); background: var(--paper-raised); padding: 7px; flex-shrink: 0; }
.edu-list .school{ font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 0 0 2px; }
.edu-list .degree{ font-size: 13px; color: var(--ink-soft); margin: 0; }

footer{ padding: 30px 0 50px; font-size: 12.5px; color: var(--ink-soft); display: flex; justify-content: space-between; max-width: var(--max-wide); margin: 0 auto; padding-left: 28px; padding-right: 28px; margin-top: 0; }

@media (max-width: 640px){
  .hero{ padding: 48px 0 40px; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .reveal{ opacity: 1; transform: none; transition: none; }
  .dot{ animation: none; }
}

:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

/* ================= CASE STUDY PAGE ================= */

.case-hero{ position: relative; padding: 48px 0 44px; }
/* page-level, not scoped to .case-hero: spans from the very top (behind the
   nav) down through the case title/description, fading out before the first
   body heading — then breaks out of .wrap-wide's max-width to span the full
   viewport (see script.js for sizing) */
.case-hero-canvas{ position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none; }
/* lifts the real content above the canvas — position:relative elements with
   z-index:auto still paint after non-positioned in-flow content otherwise */
.case-hero-content{ position: relative; z-index: 1; }
.back-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color .15s ease;
}
.back-link:hover{ color: var(--ink); }
.back-link i{ font-size: 24px; }
.case-hero h1{ font-size: clamp(24px, 3.6vw, 34px); max-width: 640px; }
.case-hero .desc{ font-size: 16px; color: var(--body-text); max-width: 560px; margin-bottom: 30px; }

/* neutral category pill — not an accent color */
.case-tag{
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  background: var(--paper-raised);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  margin-bottom: 16px;
}

.meta-strip{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.meta-strip div{ padding: 16px 18px; border-right: 1px solid var(--line); }
.meta-strip div:last-child{ border-right: none; }
.meta-strip .k{ font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.meta-strip .v{ font-size: 13.5px; color: var(--ink); }

.case-body{ padding: 56px 0; }
.case-block{ max-width: 620px; margin-bottom: 48px; }
.case-block:last-child{ margin-bottom: 0; }
.case-block .num{
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 10px;
  display: block;
}
.case-block h2{ font-weight: 700; font-size: 22px; margin: 0 0 14px; color: var(--ink); letter-spacing: -0.01em; }
@media (max-width: 640px){
  .case-block h2{ font-size: 20px; }
}
.case-block p{ color: var(--body-text); font-size: 15.5px; margin: 0 0 14px; }
.case-block ul{ color: var(--body-text); font-size: 15.5px; padding-left: 18px; margin: 0 0 14px; list-style: none; }
.case-block li{ margin-bottom: 6px; position: relative; }
.case-block li::before{ content: "\e6a4"; font-family: "Phosphor-Fill"; font-size: 10px; line-height: 1; position: absolute; left: -18px; top: 12.4px; transform: translateY(-50%); color: var(--ink-soft); }

/* title-sm sub-headings inside a block (replaces old inline Fraunces h4s) */
.case-subhead{ font-weight: 600; font-size: 15px; color: var(--ink); margin: 20px 0 8px; }

.outcome-metrics{ display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* rating-display spirit: the one loud typographic moment is bold ink, not color */
.metric{ display: inline-flex; flex-direction: column; gap: 4px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px; min-width: 160px; }
.metric .num-big{ font-weight: 700; font-size: 24px; letter-spacing: -0.01em; color: var(--ink); }
.metric .lbl{ font-size: 12px; color: var(--ink-soft); }

.quote-block{
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  margin: 8px 0 14px;
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
}
.quote-block cite{ display: block; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); margin-top: 10px; text-transform: uppercase; letter-spacing: 0.04em; }

.case-nav{
  display: flex;
  justify-content: space-between;
  padding: 40px 0 60px;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}
.case-nav a{
  text-decoration: none;
  font-size: 13.5px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 45%;
  transition: color .15s ease;
}
.case-nav a:hover{ color: var(--ink); }
.case-nav .dir{ display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.case-nav .dir i{ font-size: 24px; }
.case-nav .title{ font-weight: 600; font-size: 16px; color: var(--ink); }
.case-nav .next-side{ text-align: right; align-items: flex-end; }

@media (max-width: 640px){
  .meta-strip{ grid-template-columns: repeat(2, 1fr); }
  .meta-strip div:nth-child(2){ border-right: none; }
  .case-nav a{ max-width: 48%; }
}

/* ================= figures ================= */

.figure{ margin: 0 0 18px; }
.figure img, .figure video{ width: 100%; display: block; border-radius: var(--radius-md); }
.figure figcaption{
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
}

.metrics-row{ display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 4px; }
.metrics-row .metric{ min-width: 150px; }

.gallery-note{
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--paper-raised);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 24px;
}

/* ================= case v2: sectioned case studies ================= */

/* major numbered sections ("1. О проекте") */
.case-h2{
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  padding-top: 56px;
}
.case-section:first-child .case-h2{ padding-top: 0; }

/* mid-level subheadings ("Summary", "Контекст", "CJM"…) */
.case-h3{
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  margin: 40px 0 12px;
  letter-spacing: -0.005em;
}
.case-h3:first-of-type{ margin-top: 28px; }

@media (max-width: 640px){
  .case-h2{ font-size: 21px; padding-top: 40px; }
  .case-h3{ font-size: 16.5px; margin: 30px 0 10px; }
  .case-h3:first-of-type{ margin-top: 22px; }
}

.case-lead{ color: var(--ink); font-weight: 600; font-size: 15.5px; margin: 0 0 8px; }

/* ---------- icon insight cards ---------- */
.card-stack{ display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.icon-card{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
}
.icon-card .ic{ font-size: 24px; line-height: 1; flex-shrink: 0; }
.icon-card .tx{ font-size: 14.5px; color: var(--ink); line-height: 1.5; }
.icon-card .tx b{ color: var(--ink); font-weight: 600; }
.icon-card .tx p{ margin: 0 0 8px; color: var(--ink); font-size: 14.5px; }
.icon-card .tx p:last-child{ margin-bottom: 0; }

.icon-card--success{ background: var(--success-bg); }
.icon-card--success .ic{ color: var(--success); }
.icon-card--warning{ background: var(--warning-bg); }
.icon-card--warning .ic{ color: var(--warning); }
.icon-card--note{ background: var(--note-bg); }
.icon-card--note .ic{ color: var(--note); }
.icon-card--highlight{ background: var(--highlight-bg); }
.icon-card--highlight .ic{ color: var(--highlight); }

/* pros/cons pairs */
.card-grid-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.card-grid-2 .icon-card{ margin: 0; }

@media (max-width: 640px){
  .card-grid-2{ grid-template-columns: 1fr; }
}

/* ---------- meta table: label:value rows, not cramped columns ---------- */
.meta-table{
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper-raised);
  margin: 20px 0;
}
.meta-table .row{
  display: flex;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.meta-table .row:last-child{ border-bottom: none; }
.meta-table .k{ flex: 0 0 130px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.meta-table .v{ flex: 1; font-size: 13.5px; color: var(--ink); line-height: 1.5; }
@media (max-width: 640px){
  .meta-table .row{ flex-direction: column; gap: 4px; }
  .meta-table .k{ flex: none; }
}

/* ---------- disclosure toggle — minimal accordion card ---------- */
.disclosure{
  background: var(--paper-raised);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}
.disclosure summary{
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.disclosure summary::-webkit-details-marker{ display: none; }
/* real icon per topic (markup, not a generic ::before glyph) */
.disc-icon{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-strong);
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.disclosure summary::after{
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-left: auto;
  flex-shrink: 0;
}
.disclosure[open] summary::after{ transform: rotate(225deg); }
.disclosure .body{ padding: 0 16px 18px; margin-top: -2px; color: var(--body-text); font-size: 14.5px; line-height: 1.6; }
.disclosure .body p{ margin: 0 0 10px; }
.disclosure .body p:last-child{ margin-bottom: 0; }
.disclosure .body ul{ list-style: none; padding-left: 18px; margin: 0 0 14px; }
.disclosure .body ul li{ position: relative; margin-bottom: 6px; }
.disclosure .body ul li::before{ content: "\e6a4"; font-family: "Phosphor-Fill"; font-size: 10px; line-height: 1; position: absolute; left: -18px; top: 11.6px; transform: translateY(-50%); color: var(--ink-soft); }

/* ---------- comparison table ---------- */
.compare-table{ width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.compare-table th{ text-align: left; padding: 10px 14px; color: var(--ink-soft); font-weight: 600; background: var(--paper-raised); font-size: 12.5px; }
.compare-table td{ padding: 10px 14px; border-top: 1px solid var(--line); color: var(--ink); }
.compare-table tr:first-child td{ border-top: none; }
.compare-table td:first-child{ color: var(--ink-soft); }

.case-block ol{ color: var(--body-text); font-size: 15.5px; padding-left: 20px; margin: 0 0 14px; }
.case-block ol li{ margin-bottom: 10px; }
.case-block ol li:last-child{ margin-bottom: 0; }

/* sectioned case studies (v2) — same body typography as .case-block,
   applied to a section wrapper instead of one block per numbered step */
.case-section{ max-width: 620px; margin-bottom: 8px; }
.case-section p{ color: var(--body-text); font-size: 15.5px; margin: 0 0 14px; }
.case-section ul{ color: var(--body-text); font-size: 15.5px; padding-left: 18px; margin: 0 0 14px; list-style: none; }
.case-section ul li{ margin-bottom: 6px; position: relative; }
.case-section ul li::before{ content: "\e6a4"; font-family: "Phosphor-Fill"; font-size: 10px; line-height: 1; position: absolute; left: -18px; top: 12.4px; transform: translateY(-50%); color: var(--ink-soft); }
.case-section ol{ color: var(--body-text); font-size: 15.5px; padding-left: 20px; margin: 0 0 14px; }
.case-section ol li{ margin-bottom: 10px; }
.case-section ol li:last-child{ margin-bottom: 0; }

/* text column + tall image column, image matches text-block height */
.side-figure{ display: flex; gap: 24px; align-items: stretch; margin: 16px 0; }
.side-figure .text{ flex: 1.4; min-width: 0; }
.side-figure .text p{ margin: 0 0 14px; }
.side-figure .text p:last-child{ margin-bottom: 0; }
.side-figure .img-col{ flex: 1; min-width: 0; }
.side-figure .img-col img{ width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); display: block; }
@media (max-width: 720px){
  .side-figure{ flex-direction: column; gap: 16px; }
  .side-figure .text,
  .side-figure .img-col{ width: 100%; flex: none; }
  /* a definite height (not max-height) so object-fit:cover has a real
     box to fill instead of collapsing against an auto-height parent */
  .side-figure .img-col{ height: 260px; }
}

/* image floats beside a short lead-in, text wraps around it, then
   .float-figure-wrap clears so later full-width blocks (cards, lists)
   drop below rather than squeezing into the narrow remaining column */
.float-figure-wrap::after{ content: ""; display: table; clear: both; }
.float-figure{
  float: right;
  width: 220px;
  max-width: 42%;
  margin: 4px 0 16px 20px;
  border-radius: var(--radius-md);
  display: block;
}
.float-figure-wrap p{ margin: 0 0 14px; }
.float-figure-wrap p:last-child{ margin-bottom: 0; }
@media (max-width: 640px){
  .float-figure{ float: none; width: 100%; max-width: 100%; margin: 0 0 16px; }
}

/* comparison rows reusing the meta-table look — two labeled values per row */
.compare-meta .v{ display: flex; flex-direction: column; gap: 5px; }
.cmp-opt{ font-size: 13.5px; line-height: 1.4; }
.cmp-opt--yes{ color: var(--ink); }
.cmp-opt--no,
.cmp-opt--warn{ color: var(--ink-soft); }

/* 3-column comparison table, meta-table look (rounded card + hairline rows) */
.col-table{ width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--paper-raised); }
.col-table th{ text-align: left; padding: 10px 14px; color: var(--ink-soft); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
.col-table td{ padding: 10px 14px; border-top: 1px solid var(--line); color: var(--ink); }
.col-table tr:first-child td{ border-top: none; }
.col-table td:first-child{ color: var(--ink-soft); }
/* inline status icon + text inside a table cell, e.g.
   <span class="td-cell"><i class="ph-fill ph-check-circle td-icon"></i><span class="td-text">Text</span></span> —
   flex so a wrapped second line lines up under the text, not under the icon */
.td-cell{ display: flex; align-items: flex-start; gap: 8px; }
.td-icon{ font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.td-text{ flex: 1; }

/* 4-column data table (hypotheses) with a status pill */
.data-table{ width: 100%; border-collapse: collapse; font-size: 13px; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.data-table th{ text-align: left; padding: 10px 12px; background: var(--paper-raised); color: var(--ink-soft); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.data-table td{ padding: 10px 12px; border-top: 1px solid var(--line); color: var(--body-text); vertical-align: top; line-height: 1.45; }
.data-table tr:first-child td{ border-top: none; }
.data-table td:first-child{ color: var(--ink-soft); font-weight: 600; }
.status{ display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: var(--radius-full); white-space: nowrap; }
.status--yes{ color: var(--success); background: var(--success-bg); }
.status--no{ color: var(--warning); background: var(--warning-bg); }
.status--partial{ color: var(--highlight); background: var(--highlight-bg); }

/* small stat tiles for the research summary (reuses .metric visuals) */
.stat-grid{ display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.stat-grid .metric{ flex: 1; min-width: 130px; }

/* neutral two-up subcards ("Вариант A" / "Вариант B") */
.subcard-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.subcard{ background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.subcard b{ display: block; margin-bottom: 6px; color: var(--ink); font-size: 14px; }
.subcard p{ margin: 0; font-size: 13.5px; color: var(--body-text); line-height: 1.5; }
@media (max-width: 640px){ .subcard-grid{ grid-template-columns: 1fr; } }

.icon-card .direction{ display: block; margin-top: 6px; color: var(--ink-soft); font-size: 13px; font-style: italic; }
