/* Selected C / «Девять лет опыта. Один вывод.» The reader owns scrolling. */
.soc-page {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 1.6cqw, 25px);
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: clamp(22px, 2.1cqw, 26px) clamp(24px, 3cqw, 44px);
  background: #121c19;
  color: #f0f3e9;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.soc-page *, .soc-page *::before, .soc-page *::after { box-sizing: border-box; }
.soc-page :where(h1, p, figure) { margin: 0; }
.soc-page :where(header, div, figure, footer) { min-width: 0; }
.soc-page a { text-decoration: none; }
.soc-page a:focus-visible { outline: 2px solid #c2b8ff; outline-offset: 5px; }

.soc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #a2b0a8;
  font-size: 11px;
  line-height: 1.5;
}

.soc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d5dfd7;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.soc-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #d0f5a5;
}

.soc-folio { color: #c2b8ff; font-family: Menlo, Consolas, monospace; font-size: 10px; }

.soc-title {
  margin-top: clamp(13px, 1.2cqw, 18px) !important;
  font-size: clamp(38px, 4.5cqw, 68px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.055em;
  text-transform: uppercase;
  text-wrap: balance;
}

.soc-outline {
  color: #c2b8ff;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.15px currentColor;
}

.soc-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 5.5cqw, 80px);
  margin-top: clamp(15px, 1.4cqw, 20px);
}

.soc-intro p {
  max-width: 57ch;
  color: #d5dfd7;
  font-size: clamp(15.5px, 1.25cqw, 18px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -.016em;
  text-wrap: pretty;
}

.soc-intro strong { color: #d0f5a5; font-weight: 500; }
.soc-experience strong { display: block; margin-bottom: 6px; font-size: clamp(18px, 1.55cqw, 22px); line-height: 1.3; letter-spacing: -.025em; }
.soc-intro .soc-spam { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding-left: 25px; border-left: 1px solid #35453d; font-size: clamp(22px, 2.15cqw, 30px); line-height: 1.25; letter-spacing: -.035em; }
.soc-spam strong { color: #c2b8ff; }

.soc-product {
  margin-top: auto !important;
  padding-top: 15px;
  border-top: 1px solid #35453d;
}

.soc-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
  color: #d5dfd7;
  font-size: 12px;
  line-height: 1.5;
}

.soc-caption-text { min-width: 0; }
.soc-caption-dot { margin: 0 5px; color: #7e9687; }
.soc-caption-text > :last-child { color: #a2b0a8; }
.soc-original { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; padding: 3px 0; border: 0; background: none; color: #c2b8ff; font: inherit; cursor: pointer; }
.soc-original svg { width: 15px; height: 15px; }
.soc-original:hover { color: #f0f3e9; text-decoration: underline; text-underline-offset: 4px; }
.soc-original:focus-visible { outline: 2px solid #c2b8ff; outline-offset: 5px; }

.soc-funnel { container: funnel / inline-size; min-width: 0; }
.soc-funnel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.soc-stage {
  --stage-ink: #f0f3e9;
  --stage-muted: #a2b6a9;
  --stage-rule: #3a4d40;
  --stage-accent: #d0f5a5;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  border: 1px solid #3a4d40;
  border-radius: 13px;
  background: #1b2b21;
  color: var(--stage-ink);
}
.soc-stage--presentation {
  --stage-ink: #14271b;
  --stage-muted: #405839;
  --stage-rule: #a6c785;
  --stage-accent: #14271b;
  background: #d0f5a5;
  border-color: #d0f5a5;
}
.soc-stage--questions { --stage-accent: #c2b8ff; --stage-muted: #b2b5be; --stage-rule: #454951; background: #242c2c; border-color: #454951; }
.soc-stage--warm {
  --stage-ink: #25223d;
  --stage-muted: #4d4769;
  --stage-rule: #a195d6;
  --stage-accent: #25223d;
  background: #c2b8ff;
  border-color: #c2b8ff;
}
.soc-stage--hello::after, .soc-stage--presentation::after { content: '→'; position: absolute; z-index: 1; top: 34px; right: -15px; width: 14px; color: #a2b0a8; font: 18px/1 Arial, sans-serif; text-align: center; }
.soc-stage-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; line-height: 1.4; }
.soc-stage-number { color: var(--stage-accent); font: 11px/1.4 Menlo, Consolas, monospace; }
.soc-message-count { color: var(--stage-muted); }
.soc-stage h3 { min-height: 2.25em; margin: 8px 0 6px; color: var(--stage-ink); font-size: clamp(17px, 1.7cqw, 22px); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; }
.soc-stage-entry { color: var(--stage-ink); font-size: 11px; line-height: 1.4; }
.soc-stage-entry > span { display: block; margin-bottom: 1px; color: var(--stage-muted); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.soc-messages { display: flex; flex-direction: column; gap: 5px; margin: 12px 0 0; padding: 0; list-style: none; }
.soc-messages li { display: flex; align-items: flex-start; gap: 7px; padding: 7px 6px; border-radius: 6px; background: color-mix(in srgb, var(--stage-ink) 6%, transparent); }
.soc-messages svg { flex-shrink: 0; width: 15px; height: 15px; margin-top: 1px; color: var(--stage-accent); }
.soc-message-copy { display: block; min-width: 0; font-size: 12px; font-weight: 500; line-height: 1.35; }
.soc-message-copy > span { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.soc-message-copy small { display: block; margin-top: 3px; color: var(--stage-muted); font-size: 10px; font-weight: 400; line-height: 1.4; }
.soc-ai { padding: 1px 4px; border: 1px solid var(--stage-rule); border-radius: 3px; font-size: 8px; font-weight: 600; line-height: 1.3; }
.soc-warm-options { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 7px; margin-top: 12px; }
.soc-warm-option { min-width: 0; }
.soc-branch-state { display: flex; align-items: center; gap: 4px; min-height: 28px; color: var(--stage-ink); font-size: 10px; font-weight: 600; line-height: 1.25; }
.soc-branch-state svg { width: 17px; height: 17px; flex-shrink: 0; }
.soc-branch-or { align-self: start; margin-top: 7px; color: var(--stage-muted); font-size: 9px; font-style: italic; }
.soc-warm-options .soc-messages { margin-top: 5px; }
.soc-warm-options .soc-messages li { gap: 4px; padding: 6px 5px; }
.soc-warm-options .soc-messages svg { width: 12px; height: 12px; }
.soc-warm-options .soc-message-copy { font-size: 11px; }
.soc-branch-count { margin-top: 6px !important; color: var(--stage-muted); font-size: 9px; line-height: 1.4; }
.soc-stage-timer { display: flex; align-items: flex-start; gap: 5px; margin-top: auto !important; padding-top: 10px; color: var(--stage-ink); font-size: 10px; line-height: 1.4; }
.soc-stage-timer svg { flex: 0 0 13px; width: 13px; height: 13px; }
.soc-stage-timer b { display: inline-block; font-weight: 600; }
.soc-warm-entry { margin-top: auto !important; padding-top: 10px; color: var(--stage-muted); font-size: 10px; line-height: 1.4; }
.soc-warm-entry strong { color: var(--stage-ink); font-weight: 500; }
.soc-timer-route { position: relative; height: 36px; }
.soc-timer-route svg { position: absolute; inset: 0; width: 100%; height: 36px; color: #9988d4; }
.soc-timer-route path { stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.soc-timer-route > span { position: absolute; top: 15px; left: 62.5%; padding: 2px 9px; transform: translateX(-50%); background: #121c19; color: #a2b0a8; font-size: 9px; line-height: 1.5; white-space: nowrap; }
.soc-funnel-next { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; flex-wrap: wrap; color: #d5dfd7; font-size: 11px; line-height: 1.5; }
.soc-funnel-next > span { margin-right: auto; color: #a2b0a8; font-size: 10px; }
.soc-funnel-next i { color: #c2b8ff; font-style: normal; }

.soc-funnel-dialog {
  width: min(1320px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 28px;
  overflow: auto;
  border: 1px solid #43544a;
  border-radius: 20px;
  background: #121c19;
  color: #f0f3e9;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}
.soc-funnel-dialog::backdrop { background: #050c09d9; backdrop-filter: blur(5px); }
.soc-funnel-dialog *, .soc-funnel-dialog *::before, .soc-funnel-dialog *::after { box-sizing: border-box; }
.soc-funnel-dialog :where(p, h2) { margin: 0; }
.soc-dialog-heading { position: sticky; z-index: 2; top: -28px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: -28px -28px 0; padding: 28px; background: #121c19; }
.soc-dialog-heading > div > span { color: #a2b0a8; font-size: 12px; }
.soc-dialog-heading h2 { margin-top: 10px; font-size: clamp(22px, 2.5vw, 34px); font-weight: 500; line-height: 1.2; letter-spacing: -.035em; }
.soc-dialog-close { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; padding: 10px; border: 1px solid #43544a; border-radius: 50%; background: #1b2b21; color: #f0f3e9; cursor: pointer; }
.soc-dialog-close svg { width: 18px; height: 18px; }
.soc-dialog-close:hover { border-color: #c2b8ff; }
.soc-dialog-close:focus-visible { outline: 2px solid #c2b8ff; outline-offset: 3px; }
.soc-funnel-dialog .soc-funnel { margin-top: 0; }
.soc-funnel-dialog .soc-stage { padding: 20px; }
.soc-funnel-dialog .soc-stage h3 { font-size: 24px; }
.soc-funnel-dialog .soc-stage-entry { font-size: 13px; }
.soc-funnel-dialog .soc-stage-entry > span, .soc-funnel-dialog .soc-message-count { font-size: 11px; }
.soc-funnel-dialog .soc-message-copy { font-size: 15px; }
.soc-funnel-dialog .soc-message-copy small, .soc-funnel-dialog .soc-stage-timer, .soc-funnel-dialog .soc-warm-entry { font-size: 12px; }
.soc-funnel-dialog .soc-messages { gap: 7px; margin-top: 16px; }
.soc-funnel-dialog .soc-messages li { padding: 10px 8px; }
.soc-funnel-dialog .soc-funnel-next { font-size: 14px; }
.soc-funnel-dialog .soc-funnel-next > span { font-size: 12px; }
.soc-funnel-dialog .soc-branch-state { font-size: 12px; }
.soc-funnel-dialog .soc-warm-options .soc-message-copy { font-size: 13px; }
.soc-funnel-dialog .soc-branch-count { font-size: 10px; }
.soc-dialog-note { max-width: 80ch; margin-top: 24px !important; color: #a2b0a8; font-size: 14px; line-height: 1.6; }

.soc-ending {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: 14px;
  color: #f0f3e9;
}

.soc-conclusion {
  flex: 1;
  min-width: 0;
  color: #a2b0a8;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -.015em;
}

.soc-conclusion > b { color: #f0f3e9; font-weight: 500; }
.soc-conclusion > span { display: block; margin-top: 9px; color: #f0f3e9; font-size: clamp(25px, 2.25cqw, 32px); font-weight: 400; line-height: 1.2; letter-spacing: -.035em; text-wrap: pretty; }
.soc-conclusion strong { color: #d0f5a5; font-weight: 500; }

.soc-continue {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 16px;
  min-height: 48px;
  padding: 2px 0;
  color: #d5dfd7;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  transition: color .18s;
}

.soc-continue > span { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid #617951; border-radius: 50%; color: #d0f5a5; line-height: 0; transition: background .18s, color .18s, border-color .18s; }
.soc-continue > span > svg { display: block; width: 24px; height: 24px; }
.soc-continue:hover { color: #d0f5a5; }
.soc-continue:hover > span { background: #d0f5a5; border-color: #d0f5a5; color: #14271b; }

/* Compact the spacing, keeping readable type in the 624px gallery reader. */
@media (max-height: 850px) {
  @container reader (min-width: 761px) {
    .soc-page { gap: 10px; padding-top: 16px; padding-bottom: 16px; }
    .soc-title { margin-top: 10px !important; }
    .soc-intro { margin-top: 14px; }
    .soc-intro p { font-size: 15.5px; line-height: 1.45; }
    .soc-product { padding-top: 10px; }
    .soc-caption { margin-bottom: 8px; }
    .soc-timer-route, .soc-timer-route svg { height: 30px; }
    .soc-timer-route > span { top: 12px; }
  }
}

/* Keep the final statement comfortably inside short desktop readers. */
@media (max-height: 780px) {
  @container reader (min-width: 761px) {
    .soc-page { gap: 7px; padding-top: 12px; padding-bottom: 12px; }
    .soc-title { margin-top: 8px !important; }
    .soc-intro { margin-top: 10px; }
    .soc-product { padding-top: 8px; }
    .soc-caption { margin-bottom: 6px; }
    .soc-ending { padding-top: 10px; }
  }
}

@container funnel (min-width: 850px) {
  .soc-stage h3 { min-height: 1.12em; }
}

@container funnel (min-width: 1100px) {
  .soc-stage { padding: 16px 18px; }
  .soc-stage-entry { font-size: 12px; }
  .soc-stage-entry > span, .soc-message-count { font-size: 10px; }
  .soc-message-copy { font-size: 14px; }
  .soc-message-copy small, .soc-stage-timer, .soc-warm-entry { font-size: 11px; }
  .soc-warm-options .soc-message-copy { font-size: 12px; }
  .soc-branch-state { font-size: 11px; }
}

@container funnel (max-width: 720px) {
  .soc-funnel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .soc-stage { padding: 18px; }
  .soc-stage h3 { font-size: 22px; }
  .soc-stage-entry, .soc-message-copy { font-size: 13px; }
  .soc-message-copy small, .soc-stage-timer, .soc-warm-entry { font-size: 11px; }
  .soc-stage--hello::after, .soc-stage--presentation::after, .soc-timer-route { display: none; }
  .soc-funnel-next { margin-top: 18px !important; justify-content: flex-start; font-size: 12px; }
  .soc-funnel-next > span { flex-basis: 100%; }
}

@container funnel (max-width: 450px) {
  .soc-funnel-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .soc-stage { padding: 20px; }
  .soc-stage h3, .soc-funnel-dialog .soc-stage h3 { min-height: 0; margin: 10px 0 12px; font-size: 25px; }
  .soc-stage-entry, .soc-funnel-dialog .soc-stage-entry { font-size: 14px; }
  .soc-stage-entry > span, .soc-message-count { font-size: 11px; }
  .soc-messages { gap: 7px; margin-top: 15px; }
  .soc-messages li { padding: 10px; }
  .soc-message-copy { font-size: 15px; }
  .soc-message-copy small, .soc-stage-timer, .soc-warm-entry { font-size: 12px; }
  .soc-stage-timer, .soc-warm-entry { padding-top: 16px; }
  .soc-ai { font-size: 9px; }
  .soc-warm-options .soc-message-copy { font-size: 13px; }
  .soc-branch-state { font-size: 12px; }
}

/* Two alternatives need a full line in a narrow stage, including the dialog. */
@container funnel (max-width: 320px) or ((min-width: 721px) and (max-width: 1320px)) {
  .soc-warm-options { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .soc-branch-or { justify-self: center; margin-top: 0; }
}

@container reader (max-width: 760px) {
  .soc-page { gap: 28px; padding: 28px 24px; }
  .soc-title { font-size: clamp(34px, 7.7cqw, 55px); }
  .soc-outline { display: block; }
  .soc-intro { grid-template-columns: minmax(0, 1fr); gap: 17px; margin-top: 24px; }
  .soc-intro p { max-width: 59ch; font-size: 17px; }
  .soc-intro .soc-spam { padding: 17px 0 0; border-left: 0; border-top: 1px solid #35453d; font-size: 25px; }
  .soc-caption { align-items: flex-start; flex-direction: column; gap: 10px; }
  .soc-product { margin-top: 0 !important; }
  .soc-ending { align-items: flex-start; flex-direction: column; gap: 22px; padding-top: 20px; }
  .soc-conclusion { max-width: 45ch; font-size: 15px; }
  .soc-conclusion > span { margin-top: 10px; font-size: 30px; line-height: 1.2; }
}

@container reader (max-width: 480px) {
  .soc-page { gap: 27px; padding: 25px 20px 30px; }
  .soc-meta { align-items: flex-start; flex-direction: column; gap: 6px; }
  .soc-eyebrow { font-size: 10px; }
  .soc-folio { padding-left: 16px; font-size: 10px; }
  .soc-title { margin-top: 22px !important; font-size: 10cqw; line-height: 1.1; letter-spacing: -.05em; }
  .soc-intro { margin-top: 23px; gap: 18px; }
  .soc-intro p { font-size: 17px; line-height: 1.55; }
  .soc-product { padding-top: 17px; }
  .soc-caption { font-size: 11px; }
  .soc-caption-text > :last-child { display: block; }
  .soc-caption-dot { display: none; }
  .soc-original { min-height: 30px; font-size: 12px; }
  .soc-continue { width: 100%; font-size: 14px; }
}

@media (max-width: 600px) {
  .soc-funnel-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 18px; border-radius: 14px; }
  .soc-dialog-heading { top: -18px; gap: 12px; margin: -18px -18px 0; padding: 18px; }
  .soc-dialog-heading > div > span { font-size: 10px; }
  .soc-dialog-close { width: 36px; height: 36px; padding: 8px; }
  .soc-dialog-note { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .soc-continue, .soc-continue > span { transition: none; }
}

@media (forced-colors: active) {
  .soc-outline { -webkit-text-fill-color: currentColor; -webkit-text-stroke: 0; }
  .soc-continue > span { border-color: ButtonText; }
}
