/* ==========================================================================
   Growth Routes V2 — Pillar (Single Route) page styles
   ----------------------------------------------------------------------------
   Source of truth: ~/Claude/design-handoff-v2/design_handoff_growth_routes_v2/
       design-reference/v2/v2.css + v2-extras.css
       design-reference/design-system/colors_and_type.css

   Scope: tokens at :root, components prefixed .v2-* and scoped under
          .v2-screen (page shell). Loaded ONLY by taxonomy-doc_route-v2.php
          so existing theme/Pillar styles are not affected.

   States covered: PillarFree / PillarActive / PillarPaywall / PillarDone
                   + Step tabs, Step pane, Overview card, Solution cards,
                     Fallback ("если мало сил"), Offer grid (Done).
   ========================================================================== */


/* ==========================================================================
   FOUNDATION TOKENS (colors_and_type.css, scoped to namespace where possible)
   --main / --bg / --text_* / --border / --space-* / --fs-* / --radius-*
   These are added to :root because they are used inside variable expressions
   in many places below; values match production theme.
   ========================================================================== */
:root {
    /* Brand */
    --main:        #D9B648;
    --bg:          #E9E8E4;

    /* Light text */
    --text_001:    #303030;
    --text_002:    #525252;
    --text_003:    #AAA8A8;

    /* Borders / soft surfaces */
    --border:      #C4C2BC;
    --border-02:   #D2D0CB;
    --bg-00:       #F4F3F0;
    --bg-01:       #E7E5DF;
    --bg-02:       #DEDBD3;

    /* Categorical tints */
    --extra_bg:    #E8D491;
    --extra_bg_2:  #C4C9A3;
    --pink:        #D6B0F7;
    --blue:        #9FE1E1;
    --green:       #A0E870;
    --soft-green:  #DEF2ED;
    --error:       #F2454D;
    --red:         #F2454D;

    /* Spacing ladder (8-pt) */
    --space-0:    0;
    --space-1:    8px;
    --space-2:   16px;
    --space-3:   20px;
    --space-4:   24px;
    --space-5:   28px;
    --space-6:   32px;
    --space-7:   36px;
    --space-8:   40px;
    --space-9:   44px;
    --space-10:  48px;
    --space-11:  56px;
    --space-12:  64px;
    --space-13:  80px;
    --space-14:  88px;
    --space-15: 120px;

    /* Geometry */
    --radius-tag:    20px;
    --radius-soft:   16px;
    --radius-card:   24px;
    --radius-chip:   40px;
    --radius-pill:  500px;

    /* Font scale (subset used by Pillar) */
    --fs-72:  72px;
    --fs-56:  56px;
    --fs-46:  46px;
    --fs-40:  40px;
    --fs-36:  36px;
    --fs-32:  32px;
    --fs-28:  28px;
    --fs-24:  24px;
    --fs-20:  20px;
    --fs-18:  18px;
    --fs-16:  16px;
    --fs-14:  14px;
    --fs-12:  12px;

    --transition: 0.2s;

    /* V2 surfaces */
    --v2-page-bg:        #E7E5DF;
    --v2-surface:        #FFFFFF;
    --v2-surface-soft:   #F4F3F0;
    --v2-surface-deep:   #DBD9D0;
    --v2-dark:           #171717;
    --v2-dark-2:         #262626;
    --v2-dark-3:         #383838;
    --v2-on-dark:        #FFFFFF;
    --v2-on-dark-muted:  rgba(255,255,255,0.55);
    --v2-on-dark-soft:   rgba(255,255,255,0.72);
    --v2-on-dark-border: rgba(255,255,255,0.10);

    --v2-fg:             #303030;
    --v2-fg-secondary:   #525252;
    --v2-fg-muted:       #AAA8A8;

    --v2-accent:         var(--main);
    --v2-accent-hover:   #f0d83b;
    --v2-accent-soft:    var(--extra_bg);

    --v2-pill-bg:        rgba(255,255,255,0.10);
    --v2-pill-bg-dark:   rgba(255,255,255,0.06);
    --v2-pill-stroke:    rgba(255,255,255,0.20);

    --v2-tag-green:      var(--green);
    --v2-tag-green-dark: #5F9C36;

    --v2-track-empty-dark:  rgba(255,255,255,0.16);
    --v2-track-empty-light: #DBD9D0;
}


/* ==========================================================================
   PAGE SHELL
   ========================================================================== */
.v2-screen {
    background: var(--v2-page-bg);
    color: var(--v2-fg);
    -webkit-font-smoothing: antialiased;
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    display: flex; flex-direction: column;
}
.v2-screen *, .v2-screen *::before, .v2-screen *::after { box-sizing: border-box; }
/* Контейнер V2 = прод-тема: max-width 1920 / pad 32 → 20 (≤1440) → 16 (≤768)
   (источник: themes/gro-digital/css/global.css :36-52, плюс Figma токены
   --container-width:1920px / --container-padding-x:32px) */
.v2-screen .v2-container {
    width: 100%;
    max-width: var(--container-width, 1920px);
    margin: 0 auto;
    padding: 0 var(--container-padding-x, 32px);
    box-sizing: border-box;
}
@media (max-width: 1440px) {
    .v2-screen .v2-container { padding: 0 20px; }
}
@media (max-width: 768px) {
    .v2-screen .v2-container { padding: 0 20px; }
}
@media (max-width: 480px) {
    .v2-screen .v2-container { padding: 0 16px; }
}

/* V2 token aliases: чтобы Figma токены из colors_and_type.css работали 1-в-1.
   Прод-тема не задаёт --container-width / --container-padding-x — добавляем здесь. */
:root {
    --container-width:     1920px;
    --container-padding-x:   32px;
}


/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.v2-screen .v2-breadcrumb {
    list-style: none; padding: 0; margin: 0;
    display: flex; align-items: center; gap: 8px;
    color: var(--v2-fg-muted);
    font-size: 16px;
}
.v2-screen .v2-breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.v2-screen .v2-breadcrumb svg { width: 14px; height: 14px; }
.v2-screen .v2-breadcrumb a { color: inherit; text-decoration: none; }
.v2-screen .v2-breadcrumb a:hover { color: var(--v2-fg); }


/* ==========================================================================
   SECTION TITLE
   ========================================================================== */
.v2-screen .v2-section-title {
    font-size: 36px;
    line-height: 1.12;
    letter-spacing: -0.04em;
    font-weight: 500;
    margin: 0 0 24px;
    color: var(--v2-fg);
}
@media (max-width: 700px) {
    .v2-screen .v2-section-title { font-size: 28px; }
}


/* ==========================================================================
   PILLS / TAGS / PROGRESS
   ========================================================================== */
.v2-screen .v2-step-pill {
    display: inline-flex; align-items: center;
    padding: 4px 12px; border-radius: 999px;
    font-size: 13px; font-weight: 500;
    background: var(--v2-pill-bg-dark);
    color: var(--v2-on-dark);
    border: 1px solid var(--v2-pill-stroke);
}
.v2-screen .v2-tag-pill {
    display: inline-flex; align-items: center;
    padding: 6px 18px; border-radius: 999px;
    font-size: 16px; font-weight: 500;
    background: var(--v2-dark);
    color: var(--v2-on-dark);
}
.v2-screen .v2-tag-pill--ghost-on-dark {
    background: var(--v2-pill-bg);
    color: var(--v2-on-dark);
    padding: 8px 18px;
}

.v2-screen .v2-progress {
    height: 12px;
    border-radius: 999px;
    background: var(--v2-track-empty-dark);
    overflow: hidden;
    position: relative;
}
.v2-screen .v2-progress--light { background: var(--v2-track-empty-light); }
.v2-screen .v2-progress__fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: var(--v2-accent);
    border-radius: 999px;
}


/* ==========================================================================
   BUTTONS (.v2-btn variants)
   ========================================================================== */
.v2-screen .v2-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 10px;
    height: 56px; padding: 0 28px;
    border-radius: 500px;
    border: 0; cursor: pointer;
    font-family: inherit;
    font-size: 16px; font-weight: 500;
    letter-spacing: -0.005em;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.v2-screen .v2-btn--gold       { background: var(--v2-accent); color: #000; }
.v2-screen .v2-btn--gold:hover { background: var(--v2-accent-hover); }
.v2-screen .v2-btn--dark       { background: var(--v2-dark); color: var(--v2-on-dark); }
.v2-screen .v2-btn--dark:hover { background: var(--v2-dark-2); }
.v2-screen .v2-btn--white      { background: var(--v2-surface); color: var(--v2-fg); }
.v2-screen .v2-btn--white:hover{ background: #efeee9; }
.v2-screen .v2-btn--outline    { background: transparent; color: var(--v2-fg); box-shadow: inset 0 0 0 1px var(--border); }
.v2-screen .v2-btn--outline:hover { background: var(--v2-surface); }
.v2-screen .v2-btn--sm { height: 44px; padding: 0 20px; font-size: 14px; }
.v2-screen .v2-btn--lg { height: 64px; padding: 0 32px; font-size: 17px; }


/* ==========================================================================
   PILLAR HERO (4 states: light / active / paywall / done)
   ========================================================================== */
.v2-screen .v2-pillar-hero {
    background: #FFFFFF;
    color: var(--text_001);
    border-radius: 40px;
    padding: var(--space-11, 56px);
    display: flex; flex-direction: column; gap: var(--space-8, 40px);
    position: relative; overflow: hidden;
    border: 1px solid var(--border-02);
}
.v2-screen .v2-pillar-hero--active { border: 1.5px solid var(--main); }

.v2-screen .v2-pillar-hero__head {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: var(--space-8, 40px);
    align-items: start;
}
@media (max-width: 900px) {
    .v2-screen .v2-pillar-hero__head { grid-template-columns: 1fr; }
    .v2-screen .v2-pillar-hero { padding: 32px 24px; border-radius: 28px; }
}
.v2-screen .v2-pillar-hero__main { min-width: 0; }
.v2-screen .v2-pillar-hero__when {
    min-width: 0;
    display: flex; flex-direction: column; gap: var(--space-1, 8px);
    padding-top: var(--space-2, 16px);
}
.v2-screen .v2-pillar-hero__title {
    font-size: var(--fs-56, 56px); line-height: 1.05; letter-spacing: -0.04em;
    font-weight: 500;
    margin: var(--space-2, 16px) 0 var(--space-6, 32px);
    color: var(--text_001);
    text-wrap: pretty;
}
@media (max-width: 700px) {
    .v2-screen .v2-pillar-hero__title { font-size: 36px; }
}
.v2-screen .v2-pillar-hero__meta {
    display: flex; gap: var(--space-4, 24px); flex-wrap: wrap;
    font-size: var(--fs-16, 16px); color: var(--text_002);
    margin-bottom: var(--space-4, 24px);
}
.v2-screen .v2-pillar-hero__meta-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--text_003); align-self: center;
}
.v2-screen .v2-pillar-hero__desc {
    font-size: var(--fs-18, 18px); line-height: 1.55;
    color: var(--text_002);
    max-width: 540px;
    margin: 0;
}
.v2-screen .v2-pillar-hero__cta {
    margin-top: var(--space-8, 40px);
    display: flex; gap: var(--space-1, 8px); flex-wrap: wrap; align-items: center;
}
.v2-screen .v2-pillar-hero__when-h {
    color: var(--text_001);
    font-size: var(--fs-20, 20px); font-weight: 500;
    margin-bottom: var(--space-1, 8px);
    letter-spacing: -0.02em;
}
.v2-screen .v2-pillar-hero__when-row {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: var(--space-1, 8px); align-items: baseline;
    font-size: var(--fs-16, 16px); line-height: 1.5;
    color: var(--text_001);
    padding: var(--space-1, 8px) 0;
}
.v2-screen .v2-pillar-hero__when-row::before { content: "—"; color: var(--text_003); }

/* Active row: step pill + progress + CTA */
.v2-screen .v2-pillar-hero__active {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px; align-items: center;
    margin-top: 32px;
}
@media (max-width: 700px) {
    .v2-screen .v2-pillar-hero__active {
        grid-template-columns: 1fr;
    }
}
.v2-screen .v2-pillar-hero .v2-step-pill {
    background: var(--extra_bg);
    color: var(--text_001);
    border: 1px solid transparent;
}
.v2-screen .v2-pillar-hero .v2-progress { background: var(--bg-02); }
.v2-screen .v2-pillar-hero .v2-tag-pill--ghost-on-dark {
    background: var(--main);
    color: var(--text_001);
    font-weight: 500;
}

/* ----- Paywall variant ----- */
.v2-screen .v2-pillar-hero--paywall .v2-tag-pill--ghost-on-dark {
    background: var(--main);
    color: var(--text_001);
}
.v2-screen .v2-pillar-price {
    display: flex; align-items: baseline; gap: var(--space-1, 8px);
    margin: var(--space-2, 16px) 0 var(--space-1, 8px);
    padding: var(--space-2, 16px) var(--space-4, 24px);
    background: var(--extra_bg);
    border-radius: var(--radius-soft, 16px);
    align-self: flex-start;
}
.v2-screen .v2-pillar-price__amount {
    font-size: var(--fs-32, 32px); font-weight: 500; letter-spacing: -0.04em;
    line-height: 1; color: var(--text_001);
}
.v2-screen .v2-pillar-price__period {
    font-size: var(--fs-14, 14px); color: var(--text_002);
}

/* ----- Done variant ----- */
.v2-screen .v2-pillar-hero--done .v2-tag-pill--ghost-on-dark {
    background: var(--soft-green);
    color: var(--text_001);
    display: inline-flex; align-items: center; gap: 8px;
}
.v2-screen .v2-pillar-hero--done .v2-tag-pill--ghost-on-dark::before {
    content: "✓"; font-weight: 600; line-height: 1; color: var(--text_001);
}


/* ==========================================================================
   STEP TABS (Шаг 1 · Шаг 2 · Шаг 3)
   ========================================================================== */
.v2-screen .v2-step-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 32px 0 24px;
}
@media (max-width: 700px) {
    .v2-screen .v2-step-tabs { grid-template-columns: 1fr; }
}
.v2-screen .v2-step-tab {
    position: relative;
    background: var(--v2-page-bg);
    border: 1.5px solid transparent;
    border-radius: 24px;
    padding: 20px 24px;
    text-align: left;
    color: var(--v2-fg);
    cursor: pointer;
    font-family: inherit;
    transition: border-color var(--transition), background var(--transition);
    text-decoration: none;
    display: block;
    width: 100%;
}
.v2-screen .v2-step-tab__title {
    font-size: 28px; line-height: 1.12; letter-spacing: -0.04em;
    font-weight: 500;
    color: var(--v2-fg);
    margin: 0;
}
.v2-screen .v2-step-tab__sub {
    color: var(--v2-fg-muted);
    font-size: 16px;
    margin-top: 4px;
}
.v2-screen .v2-step-tab__chip {
    position: absolute;
    top: 14px; right: 14px;
    padding: 2px 12px; border-radius: 999px;
    background: var(--v2-fg);
    color: var(--v2-on-dark);
    font-size: 12px; font-weight: 500;
}
.v2-screen .v2-step-tab[data-state="active"] {
    border-color: var(--v2-fg);
    background: var(--v2-page-bg);
}
.v2-screen .v2-step-tab[data-state="active"] .v2-step-tab__sub { color: var(--v2-fg); }
.v2-screen .v2-step-tab[data-state="done"] .v2-step-tab__title,
.v2-screen .v2-step-tab[data-state="done"] .v2-step-tab__sub  { color: var(--v2-fg-muted); }
.v2-screen .v2-step-tab[data-state="upcoming"] .v2-step-tab__title,
.v2-screen .v2-step-tab[data-state="upcoming"] .v2-step-tab__sub  { color: var(--v2-fg-muted); }


/* ==========================================================================
   STEP PANE (контент текущего шага)
   ========================================================================== */
.v2-screen .v2-step-pane {
    background: var(--v2-page-bg);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 32px;
    padding: 40px;
    display: flex; flex-direction: column; gap: 32px;
}
@media (max-width: 700px) {
    .v2-screen .v2-step-pane { padding: 24px 16px; border-radius: 24px; }
}
.v2-screen .v2-step-pane__h {
    font-size: 56px; line-height: 0.98; letter-spacing: -0.04em;
    font-weight: 500;
    color: var(--v2-fg);
    margin: 0;
}
@media (max-width: 700px) {
    .v2-screen .v2-step-pane__h { font-size: 32px; }
}

/* Overview card (главный «Обзор» внутри шага) */
.v2-screen .v2-overview {
    background: var(--v2-surface);
    border-radius: 24px;
    padding: 32px;
    display: flex; flex-direction: column; gap: 16px;
    min-height: 280px;
    position: relative; overflow: hidden;
}
.v2-screen .v2-overview__tag {
    display: inline-flex;
    padding: 4px 14px; border-radius: 999px;
    background: var(--v2-fg); color: var(--v2-on-dark);
    font-size: 13px; font-weight: 500;
    align-self: flex-start;
}
.v2-screen .v2-overview__title {
    font-size: 28px; line-height: 1.12; letter-spacing: -0.04em;
    font-weight: 500;
    color: var(--v2-fg);
    margin: 0;
}
.v2-screen .v2-overview__sub {
    color: var(--v2-fg-muted);
    font-size: 16px;
}
.v2-screen .v2-overview__deco {
    position: absolute;
    right: 40px; top: 40px; bottom: 40px;
    width: 200px;
    color: var(--v2-fg-muted);
    opacity: 0.18;
    pointer-events: none;
}
.v2-screen .v2-overview__bottom {
    margin-top: auto;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.v2-screen .v2-overview__link {
    display: inline-flex; align-items: center; gap: 10px;
    height: 44px; padding: 0 18px;
    background: transparent;
    color: var(--v2-fg);
    border-radius: 999px;
    border: 1px solid var(--border);
    text-decoration: none; font-weight: 500; font-size: 14px;
}
.v2-screen .v2-overview__link:hover { background: var(--v2-surface-soft); }
.v2-screen .v2-overview__meta {
    color: var(--v2-fg-muted);
    font-size: 14px;
}

.v2-screen .v2-step-pane__h2 {
    font-size: 28px; line-height: 1.12; letter-spacing: -0.04em;
    font-weight: 500;
    margin: 0 0 20px;
    color: var(--v2-fg);
}


/* ==========================================================================
   SOLUTION CARDS GRID
   ========================================================================== */
.v2-screen .v2-soln-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2, 16px);
}
@media (max-width: 900px) {
    .v2-screen .v2-soln-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .v2-screen .v2-soln-grid { grid-template-columns: 1fr; }
}
.v2-screen .v2-soln-card {
    background: #FFFFFF;
    border: 1px solid var(--border-02);
    border-radius: var(--radius-soft, 16px);
    padding: var(--space-4, 24px);
    min-height: 220px;
    display: flex; flex-direction: column; gap: var(--space-1, 8px);
    position: relative;
    transition: box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
    color: inherit;
}
.v2-screen .v2-soln-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.v2-screen .v2-soln-card[data-state="done"] {
    background: var(--bg-00);
    border-color: transparent;
}
.v2-screen .v2-soln-card__top {
    display: flex; align-items: center; gap: var(--space-1, 8px);
    justify-content: space-between;
}
.v2-screen .v2-soln-card__pill {
    display: inline-flex; align-items: center; padding: 4px 12px;
    border-radius: var(--radius-tag, 20px);
    background: var(--bg-00);
    color: var(--text_002);
    font-size: var(--fs-12, 12px); font-weight: 500;
}
.v2-screen .v2-soln-card__pill--done {
    background: var(--green);
    color: var(--text_001);
}
.v2-screen .v2-soln-card__pill--new {
    background: var(--main);
    color: var(--text_001);
}
.v2-screen .v2-soln-card__body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.v2-screen .v2-soln-card__kind  {
    font-size: var(--fs-12, 12px); color: var(--text_003);
    text-transform: uppercase; letter-spacing: 0.02em; font-weight: 500;
}
.v2-screen .v2-soln-card__title {
    font-size: var(--fs-18, 18px); line-height: 1.3; font-weight: 500;
    color: var(--text_001); margin: 4px 0 0;
}
.v2-screen .v2-soln-card__bottom {
    margin-top: auto;
    display: flex; align-items: center; justify-content: space-between;
    padding-top: var(--space-1, 8px);
    border-top: 1px solid var(--border-02);
}
.v2-screen .v2-soln-card__meta {
    font-size: var(--fs-12, 12px); color: var(--text_003);
    display: flex; gap: var(--space-1, 8px); align-items: center;
}
.v2-screen .v2-soln-card__readbar { display: inline-flex; align-items: center; gap: 3px; }
.v2-screen .v2-soln-card__readbar span {
    width: 5px; height: 8px; border-radius: 2px;
    background: var(--bg-02);
}
.v2-screen .v2-soln-card__readbar span.is-on { background: var(--text_001); }
.v2-screen .v2-soln-card__readlink {
    color: var(--text_001); font-weight: 500; font-size: var(--fs-14, 14px);
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.v2-screen .v2-soln-card__readlink:hover { color: var(--text_002); }


/* ==========================================================================
   FALLBACK BLOCK ("если сейчас мало сил")
   ========================================================================== */
.v2-screen .v2-fallback {
    background: var(--v2-page-bg);
    border-radius: 28px;
    padding: 40px;
    display: flex; flex-direction: column; gap: 24px;
    text-align: center; align-items: center;
}
.v2-screen .v2-fallback__title {
    font-size: 28px; line-height: 1.2; letter-spacing: -0.04em;
    font-weight: 500;
    color: var(--v2-fg);
    text-wrap: pretty;
    max-width: 720px;
    margin: 0;
}
.v2-screen .v2-fallback__row {
    display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}


/* ==========================================================================
   2/3-COL GRIDS + ROUTE CARDS (для "Что вы получаете" / "Следующий шаг")
   ========================================================================== */
.v2-screen .v2-grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.v2-screen .v2-grid-3 {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px;
}
@media (max-width: 900px) {
    .v2-screen .v2-grid-2,
    .v2-screen .v2-grid-3 { grid-template-columns: 1fr; }
}

.v2-screen .v2-route-card {
    position: relative;
    background: var(--text_001);
    border: 1px solid var(--text_001);
    color: var(--v2-on-dark);
    border-radius: 28px;
    padding: 28px;
    overflow: hidden;
    display: flex; flex-direction: column;
    /* Normalized: fixed min-height + flex-grow chain делает все карточки одной высоты.
       QA 2026-05-24 P0-2 — без этого discipline (220px) vs paid (655px) выглядело сломано. */
    min-height: 320px;
    transition: transform var(--transition);
    text-decoration: none;
}
.v2-screen .v2-route-card:hover { transform: translateY(-2px); }
.v2-screen .v2-route-card__title {
    font-size: 28px; line-height: 1.12; letter-spacing: -0.04em;
    font-weight: 500;
    color: var(--v2-on-dark);
    margin: 0;
    text-wrap: pretty;
    max-width: 340px;
}
.v2-screen .v2-route-card__sub {
    font-size: 14px; color: rgba(255,255,255,0.72);
    margin-top: 8px;
    /* Line-clamp: ограничиваем description до 3 строк с многоточием.
       Без этого описания paid маршрутов раздували карточку до 655px. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.v2-screen .v2-route-card__bottom {
    margin-top: auto;
    padding-top: 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px; align-items: center;
}
.v2-screen .v2-route-card__progress-mini {
    height: 8px; border-radius: 999px;
    background: rgba(255,255,255,0.16);
    overflow: hidden;
}
.v2-screen .v2-route-card__progress-mini > div {
    height: 100%;
    background: var(--v2-accent);
    border-radius: 999px;
}


/* ==========================================================================
   ICON HELPERS
   ========================================================================== */
.v2-screen .v2-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.v2-screen .v2-icon svg { display: block; }


/* ==========================================================================
   HUB / ARCHIVE — page title, subtitle pill, filters, continue, carousel
   ========================================================================== */
.v2-screen .v2-page-title {
    font-family: var(--font-family-base);
    font-weight: 500;
    font-size: 72px;
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: var(--v2-fg);
    margin: 0;
    text-wrap: pretty;
}
@media (max-width: 768px) {
    .v2-screen .v2-page-title { font-size: 40px; }
}
.v2-screen .v2-page-subtitle-pill {
    display: inline-flex;
    align-items: center; gap: 16px;
    margin-top: 16px;
    background: var(--v2-surface-soft);
    padding: 8px 24px;
    border-radius: 20px;
    color: var(--v2-fg-secondary);
    font-size: 19px;
    line-height: 1.4;
    max-width: 100%;
}
.v2-screen .v2-page-subtitle-pill::before { content: "—"; color: var(--v2-fg-secondary); }

/* "Продолжить путь" big dark card */
.v2-screen .v2-continue {
    background: var(--v2-dark);
    color: var(--v2-on-dark);
    border-radius: 32px;
    padding: 40px;
    display: flex; flex-direction: column; gap: 24px;
    position: relative; overflow: hidden;
}
@media (max-width: 768px) {
    .v2-screen .v2-continue { padding: 24px; border-radius: 24px; }
}
.v2-screen .v2-continue__row {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.v2-screen .v2-continue__meta {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    font-size: 16px; color: var(--v2-on-dark-soft);
}
.v2-screen .v2-continue__progress-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px; align-items: center;
}
@media (max-width: 700px) {
    .v2-screen .v2-continue__progress-row { grid-template-columns: 1fr; }
}

/* Carousel ("Можно начать отсюда") */
.v2-screen .v2-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.v2-screen .v2-carousel::-webkit-scrollbar { display: none; }
.v2-screen .v2-carousel__arrows { display: flex; gap: 8px; align-items: center; }
.v2-screen .v2-icon-btn {
    width: 56px; height: 56px; border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--v2-fg);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.v2-screen .v2-icon-btn:hover { background: var(--v2-surface); }

/* Filter chips */
.v2-screen .v2-filters {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.v2-screen .v2-filters__group { display: flex; gap: 8px; flex-wrap: wrap; }
.v2-screen .v2-filters__sort  {
    margin-left: auto; display: inline-flex; align-items: center; gap: 12px;
    font-size: 14px; color: var(--v2-fg-muted);
}
.v2-screen .v2-dropchip {
    display: inline-flex; align-items: center; gap: 10px;
    height: 44px; padding: 0 18px; border-radius: 999px;
    background: var(--v2-surface);
    color: var(--v2-fg);
    font-family: inherit; font-size: 14px; font-weight: 500;
    border: 0; cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
}
.v2-screen .v2-dropchip:hover { background: var(--v2-surface-soft); }
.v2-screen .v2-dropchip[data-state="active"] {
    background: var(--v2-fg); color: var(--v2-on-dark);
}

/* Route card chip + arrow watermark (Hub-only extras) */
.v2-screen .v2-route-card__arrow-bg {
    position: absolute;
    right: -40px; top: -10px;
    color: var(--v2-on-dark);
    opacity: 0.07;
    width: 320px; height: 320px;
    pointer-events: none;
}
.v2-screen .v2-route-card__arrow-bg svg { width: 100%; height: 100%; }
.v2-screen .v2-route-card[data-state="active"] {
    border-color: var(--main);
    box-shadow: 0 0 0 1px var(--main);
}
.v2-screen .v2-route-card[data-state="completed"] .v2-route-card__title { color: var(--main); }
.v2-screen .v2-route-card[data-state="completed"] .v2-route-card__progress-mini > div { width: 100% !important; }
.v2-screen .v2-route-card[data-state="locked"] {
    background: #1F1F1F; border-color: #1F1F1F; opacity: 0.85;
}
.v2-screen .v2-route-card[data-state="locked"] .v2-route-card__title,
.v2-screen .v2-route-card[data-state="locked"] .v2-route-card__sub {
    color: rgba(255,255,255,0.5);
}
.v2-screen .v2-route-card__chip {
    position: absolute;
    top: 24px; right: 24px;
    padding: 4px 12px; border-radius: 999px;
    background: rgba(255,255,255,0.12);
    color: #FFFFFF;
    font-size: 12px; font-weight: 500;
    border: 1px solid rgba(255,255,255,0.16);
}


/* ==========================================================================
   COMPLETION — light hero + offer grid
   ========================================================================== */
.v2-screen .v2-complete-hero {
    background: #FFFFFF;
    color: var(--text_001);
    border: 1px solid var(--border-02);
    border-radius: 40px;
    padding: var(--space-11, 56px);
    display: flex; flex-direction: column; gap: var(--space-2, 16px);
    position: relative; overflow: hidden;
}
@media (max-width: 768px) {
    .v2-screen .v2-complete-hero { padding: 32px 24px; border-radius: 28px; }
}
.v2-screen .v2-complete-hero__check {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--soft-green, #D1F2BA);
    color: var(--text_001);
    font-size: var(--fs-14, 14px);
    font-weight: 500;
    align-self: flex-start;
}
.v2-screen .v2-complete-hero__check::before { content: "✓"; font-weight: 600; }
.v2-screen .v2-complete-hero__title {
    font-size: var(--fs-56, 56px); line-height: 0.98; letter-spacing: -0.04em;
    font-weight: 500; margin: 0;
    color: var(--text_001);
    text-wrap: pretty;
    max-width: 820px;
}
@media (max-width: 768px) {
    .v2-screen .v2-complete-hero__title { font-size: 36px; }
}
.v2-screen .v2-complete-hero__sub {
    font-size: var(--fs-20, 20px); line-height: 1.5;
    color: var(--text_002);
    max-width: 640px;
    margin: var(--space-2, 16px) 0 0;
}
.v2-screen .v2-complete-hero__meta {
    display: flex; gap: var(--space-2, 16px); flex-wrap: wrap;
    font-size: var(--fs-14, 14px); color: var(--text_003);
    margin-top: var(--space-3, 20px);
}
.v2-screen .v2-complete-hero__meta-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--text_003); align-self: center;
}

.v2-screen .v2-offer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px;
}
@media (max-width: 900px) {
    .v2-screen .v2-offer-grid { grid-template-columns: 1fr; }
}
.v2-screen .v2-offer-card {
    background: var(--v2-surface);
    border-radius: 28px;
    padding: 32px;
    display: flex; flex-direction: column; gap: 16px;
}
.v2-screen .v2-offer-card--dark {
    background: var(--v2-dark); color: var(--v2-on-dark);
    position: relative; overflow: hidden;
}
.v2-screen .v2-offer-card__eyebrow {
    font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--v2-fg-muted);
}
.v2-screen .v2-offer-card--dark .v2-offer-card__eyebrow { color: var(--v2-accent); }
.v2-screen .v2-offer-card__title {
    font-size: 28px; line-height: 1.12; letter-spacing: -0.04em;
    font-weight: 500; margin: 0;
    color: var(--v2-fg);
    text-wrap: pretty;
}
.v2-screen .v2-offer-card--dark .v2-offer-card__title { color: var(--v2-on-dark); }
.v2-screen .v2-offer-card__sub {
    color: var(--v2-fg-secondary); font-size: 16px; line-height: 1.5;
    margin: 0;
}
.v2-screen .v2-offer-card--dark .v2-offer-card__sub { color: var(--v2-on-dark-soft); }
.v2-screen .v2-offer-card__price {
    display: flex; align-items: baseline; gap: 10px;
    margin-top: 4px;
}
.v2-screen .v2-offer-card__price strong {
    font-size: 40px; font-weight: 500; letter-spacing: -0.04em; line-height: 1;
}
.v2-screen .v2-offer-card__price small {
    font-size: 14px; color: var(--v2-fg-muted);
}
.v2-screen .v2-offer-card--dark .v2-offer-card__price small { color: var(--v2-on-dark-muted); }
.v2-screen .v2-offer-card__list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.v2-screen .v2-offer-card__list li {
    display: flex; gap: 10px; align-items: flex-start;
    font-size: 15px; color: var(--v2-fg-secondary); line-height: 1.5;
}
.v2-screen .v2-offer-card__list li::before {
    content: ""; flex: none; margin-top: 7px;
    width: 14px; height: 8px;
    border-left: 2px solid var(--v2-tag-green-dark);
    border-bottom: 2px solid var(--v2-tag-green-dark);
    transform: rotate(-45deg);
}
.v2-screen .v2-offer-card--dark .v2-offer-card__list li { color: var(--v2-on-dark-soft); }
.v2-screen .v2-offer-card--dark .v2-offer-card__list li::before {
    border-color: var(--v2-accent);
}
.v2-screen .v2-offer-card__actions {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-top: 8px;
}

.v2-screen .v2-btn--ghost-on-dark {
    background: transparent;
    color: var(--v2-on-dark);
    box-shadow: inset 0 0 0 1px var(--v2-pill-stroke);
}
.v2-screen .v2-btn--ghost-on-dark:hover { background: rgba(255,255,255,0.05); }


/* ==========================================================================
   CRISIS — phone blocks + disclaimer
   ========================================================================== */
.v2-screen .v2-crisis {
    display: flex; flex-direction: column; gap: 16px;
    max-width: 880px; margin: 0 auto;
}
.v2-screen .v2-phone-block {
    background: var(--v2-surface);
    border: 1.5px solid transparent;
    border-radius: 28px;
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 24px; align-items: center;
    text-decoration: none; color: inherit;
    transition: border-color var(--transition);
}
@media (max-width: 700px) {
    .v2-screen .v2-phone-block {
        grid-template-columns: 48px 1fr;
        padding: 20px;
        gap: 16px;
    }
    .v2-screen .v2-phone-block__call { display: none; }
}
.v2-screen .v2-phone-block:hover { border-color: var(--v2-fg); }
.v2-screen .v2-phone-block--primary {
    background: var(--v2-dark); color: var(--v2-on-dark);
}
.v2-screen .v2-phone-block--primary:hover { border-color: var(--v2-accent); }
.v2-screen .v2-phone-block__icon {
    width: 64px; height: 64px; border-radius: 20px;
    background: var(--v2-surface-soft); color: var(--v2-fg);
    display: inline-flex; align-items: center; justify-content: center;
}
@media (max-width: 700px) {
    .v2-screen .v2-phone-block__icon { width: 48px; height: 48px; border-radius: 14px; }
}
.v2-screen .v2-phone-block--primary .v2-phone-block__icon {
    background: var(--v2-accent); color: var(--v2-fg);
}
.v2-screen .v2-phone-block__title {
    font-size: 16px; font-weight: 500; color: var(--v2-fg);
}
.v2-screen .v2-phone-block--primary .v2-phone-block__title { color: var(--v2-on-dark); }
.v2-screen .v2-phone-block__number {
    display: block;
    font-size: 32px; font-weight: 500; letter-spacing: -0.04em;
    color: var(--v2-fg);
    margin-top: 4px;
    text-decoration: none;
}
@media (max-width: 700px) {
    .v2-screen .v2-phone-block__number { font-size: 24px; }
}
.v2-screen .v2-phone-block--primary .v2-phone-block__number { color: var(--v2-on-dark); }
.v2-screen .v2-phone-block__sub {
    display: block; font-size: 14px; color: var(--v2-fg-muted);
    margin-top: 6px;
}
.v2-screen .v2-phone-block--primary .v2-phone-block__sub { color: var(--v2-on-dark-muted); }
.v2-screen .v2-phone-block__call {
    width: 56px; height: 56px; border-radius: 999px;
    background: var(--v2-surface-soft); color: var(--v2-fg);
    border: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.v2-screen .v2-phone-block--primary .v2-phone-block__call {
    background: rgba(255,255,255,0.10); color: var(--v2-on-dark);
}

/* Mobile: hide round call-button (block becomes 2-col 48px+text).
   Этот @media-rule намеренно стоит ПОСЛЕ базового .v2-phone-block__call
   чтобы перебить его display:inline-flex по cascade-order (одинаковая
   специфичность — побеждает то, что объявлено позже). */
@media (max-width: 700px) {
    .v2-screen .v2-phone-block__call { display: none; }
}

.v2-screen .v2-crisis-disclaimer {
    background: var(--v2-surface-soft);
    border-radius: 24px;
    padding: 24px 32px;
    color: var(--v2-fg-secondary);
    font-size: 15px; line-height: 1.55;
    max-width: 880px; margin: 0 auto;
}


/* ==========================================================================
   ONBOARDING — dark shell + light card + options
   ========================================================================== */
.v2-screen .v2-onb-shell {
    background: var(--v2-dark);
    color: var(--v2-on-dark);
    min-height: 100vh;
    padding: 48px 36px;
    display: flex; flex-direction: column;
    gap: 32px;
    position: relative; overflow: hidden;
}
@media (max-width: 700px) {
    .v2-screen .v2-onb-shell { padding: 24px 16px; gap: 20px; }
}
.v2-screen .v2-onb-shell__brand {
    font-size: 32px; line-height: 1; letter-spacing: -0.04em; font-weight: 500;
    color: var(--v2-on-dark); text-decoration: none;
}
.v2-screen .v2-onb-shell__progress {
    display: flex; gap: 8px; align-items: center;
}
.v2-screen .v2-onb-shell__dot {
    height: 4px; border-radius: 999px; flex: 1;
    background: rgba(255,255,255,0.12);
}
.v2-screen .v2-onb-shell__dot.is-active { background: var(--v2-accent); }
.v2-screen .v2-onb-shell__dot.is-done   { background: var(--v2-on-dark); }

.v2-screen .v2-onb-card {
    background: var(--v2-page-bg);
    color: var(--v2-fg);
    border-radius: 32px;
    padding: 56px;
    margin: 0 auto;
    width: 100%;
    max-width: 720px;
    display: flex; flex-direction: column; gap: 24px;
    position: relative;
}
@media (max-width: 700px) {
    .v2-screen .v2-onb-card { padding: 28px 20px; border-radius: 24px; gap: 16px; }
}
.v2-screen .v2-onb-card__eyebrow {
    color: var(--v2-fg-muted);
    font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
}
.v2-screen .v2-onb-card__title {
    font-size: 40px; line-height: 1.05; letter-spacing: -0.04em;
    font-weight: 500;
    margin: 0; color: var(--v2-fg);
    text-wrap: pretty;
}
@media (max-width: 700px) {
    .v2-screen .v2-onb-card__title { font-size: 28px; }
}
.v2-screen .v2-onb-card__hint {
    color: var(--v2-fg-secondary);
    font-size: 16px;
    margin: 0;
}
.v2-screen .v2-onb-options {
    display: flex; flex-direction: column; gap: 12px;
    margin-top: 8px;
}
.v2-screen .v2-onb-option {
    background: var(--v2-surface);
    border: 1.5px solid transparent;
    border-radius: 20px;
    padding: 20px 24px;
    display: flex; align-items: center; gap: 16px;
    cursor: pointer; text-align: left; width: 100%;
    font-family: inherit; font-size: 17px; font-weight: 500;
    color: var(--v2-fg);
    transition: border-color var(--transition), background var(--transition);
    text-decoration: none;
}
.v2-screen .v2-onb-option:hover { border-color: var(--border); }
.v2-screen .v2-onb-option.is-selected {
    border-color: var(--v2-fg);
    background: var(--v2-surface);
}
.v2-screen .v2-onb-option__icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--v2-surface-soft);
    color: var(--v2-fg);
    display: inline-flex; align-items: center; justify-content: center;
    flex: none;
}
.v2-screen .v2-onb-option.is-selected .v2-onb-option__icon {
    background: var(--v2-accent);
}
.v2-screen .v2-onb-option__main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2-screen .v2-onb-option__sub {
    font-weight: 400; font-size: 14px; color: var(--v2-fg-secondary);
}
.v2-screen .v2-onb-option__bullet {
    width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--v2-page-bg);
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
}
.v2-screen .v2-onb-option.is-selected .v2-onb-option__bullet {
    border-color: var(--v2-fg);
    background: var(--v2-fg);
}
.v2-screen .v2-onb-option.is-selected .v2-onb-option__bullet::after {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--v2-on-dark);
}
.v2-screen .v2-onb-card__footer {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 8px;
    flex-wrap: wrap; gap: 12px;
}
.v2-screen .v2-onb-card__skip {
    background: transparent; border: 0; cursor: pointer;
    color: var(--v2-fg-muted); font-family: inherit; font-size: 14px;
    padding: 8px 4px;
    text-decoration: none;
}

/* Loading state */
.v2-screen .v2-onb-loading {
    background: var(--v2-page-bg);
    color: var(--v2-fg); /* override .v2-onb-shell white inheritance */
    border-radius: 32px;
    padding: 96px 56px;
    margin: 0 auto; width: 100%; max-width: 720px;
    display: flex; flex-direction: column; align-items: center;
    gap: 24px; text-align: center;
}
.v2-screen .v2-onb-loading__spinner {
    width: 64px; height: 64px;
    border-radius: 50%;
    border: 3px solid var(--v2-surface-soft);
    border-top-color: var(--v2-accent);
    animation: v2-spin 1.1s linear infinite;
}
@keyframes v2-spin { to { transform: rotate(360deg); } }

/* Error state */
.v2-screen .v2-onb-error {
    background: var(--v2-page-bg);
    color: var(--v2-fg); /* override .v2-onb-shell white inheritance */
    border-radius: 32px;
    padding: 64px 56px;
    margin: 0 auto; width: 100%; max-width: 720px;
    display: flex; flex-direction: column; align-items: center;
    gap: 20px; text-align: center;
}
.v2-screen .v2-onb-error__icon {
    width: 64px; height: 64px; border-radius: 999px;
    background: var(--red); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    opacity: 0.85;
}


/* ==========================================================================
   EDGE STATES — 404 / empty / net error
   ========================================================================== */
.v2-screen .v2-empty {
    background: var(--v2-surface);
    border-radius: 32px;
    padding: 80px 40px;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    text-align: center;
}
.v2-screen .v2-empty__icon {
    width: 80px; height: 80px; border-radius: 24px;
    background: var(--v2-surface-soft); color: var(--v2-fg);
    display: inline-flex; align-items: center; justify-content: center;
}
.v2-screen .v2-empty__title {
    font-size: 36px; line-height: 1.1; letter-spacing: -0.04em;
    font-weight: 500;
    margin: 8px 0 0;
    text-wrap: pretty;
}
.v2-screen .v2-empty__sub {
    font-size: 17px; color: var(--v2-fg-secondary); line-height: 1.5;
    max-width: 500px;
    margin: 0;
}

.v2-screen .v2-404 {
    flex: 1;
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
    padding: 120px 32px;
    gap: 20px;
    max-width: 720px; width: 100%; margin: 0 auto;
}
.v2-screen .v2-404__kicker {
    font-size: 14px; font-weight: 500; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--text_003);
}
.v2-screen .v2-404__title {
    font-size: 56px; line-height: 0.98; letter-spacing: -0.04em; font-weight: 500;
    margin: 0; text-wrap: pretty;
}
@media (max-width: 700px) {
    .v2-screen .v2-404 { padding: 64px 16px; }
    .v2-screen .v2-404__title { font-size: 36px; }
}
.v2-screen .v2-404__sub {
    font-size: 19px; color: var(--text_002); max-width: 560px; line-height: 1.5;
    margin: 0;
}
.v2-screen .v2-404__row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }


/* ==========================================================================
   V2 OVERRIDES для existing global components (НЕ scope под .v2-screen).
   Эти overrides применяются на ВСЕХ страницах сайта где элементы рендерятся
   (например email-capture модалка в SOS-маршруте через JS append to body).
   2026-05-25: P2 Modals V2 styling без переписывания JS.
   ========================================================================== */

/* --- V2 email-capture modal (used inside SOS routes via growth-routes-sticky.js) --- */
.gro-email-capture-overlay {
    /* Match V2 modal backdrop (modals.jsx -> rgba(20,20,20,0.65)) */
    background: rgba(20, 20, 20, 0.65) !important;
}
.gro-email-capture {
    /* V2 modal card: 480px max + 28px radius + 40px padding + V2 surface */
    max-width: 480px !important;
    padding: 40px !important;
    border-radius: 28px !important;
    background: var(--v2-page-bg, #E7E5DF) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    font-family: var(--font-family-base, "Golos Text", sans-serif) !important;
}
.gro-email-capture__title {
    font-size: 28px !important;
    line-height: 1.12 !important;
    letter-spacing: -0.04em !important;
    font-weight: 500 !important;
    margin: 0 0 12px !important;
    color: var(--v2-fg, #303030) !important;
}
.gro-email-capture__text {
    color: var(--v2-fg-secondary, #525252) !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
}
.gro-email-capture__input {
    /* V2 input: 16px radius (less round than full pill) */
    border-radius: 16px !important;
    height: 52px !important;
    padding: 0 18px !important;
    border: 1px solid var(--border, #C4C2BC) !important;
    background: var(--v2-surface, #FFFFFF) !important;
    font-size: 16px !important;
}
.gro-email-capture__input:focus {
    border-color: var(--v2-fg, #303030) !important;
}
.gro-email-capture__actions {
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 8px !important;
}
.gro-email-capture__actions > * {
    flex: none !important;
    width: 100% !important;
}
/* Primary button - gold pill */
.gro-email-capture .gro-btn-primary {
    background: var(--main, #D9B648) !important;
    color: #000 !important;
    border: 0 !important;
    border-radius: 500px !important;
    height: 56px !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: background 0.2s;
}
.gro-email-capture .gro-btn-primary:hover {
    background: #f0d83b !important;
}
/* Secondary button - outline ghost */
.gro-email-capture .gro-btn-secondary {
    background: transparent !important;
    color: var(--v2-fg, #303030) !important;
    border: 1px solid var(--border, #C4C2BC) !important;
    border-radius: 500px !important;
    height: 56px !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    cursor: pointer !important;
}
.gro-email-capture .gro-btn-secondary:hover {
    background: var(--v2-surface, #FFFFFF) !important;
}
.gro-email-capture__error {
    color: var(--error, #F2454D) !important;
    font-size: 13px !important;
}
.gro-email-capture__success {
    color: var(--v2-tag-green-dark, #5F9C36) !important;
    font-size: 14px !important;
}


/* ==========================================================================
   V2 Solution page CSS overlay (P0 — minimal-invasive, NO hot zone touch)
   Стилизует existing single-docs.php разметку под V2 visual language без
   переписывания PHP. Полный V2 rewrite (single-docs-v2.php с grid 1.6fr/320px
   + sidebar TOC) — отдельный спринт hot-zone CPO Routine 3.
   ========================================================================== */

/* Strengthen typography globally on docs */
.single-docs .solution-page,
.single-docs .pillar-page {
    font-family: var(--font-family-base, "Golos Text", sans-serif);
    color: var(--text_001, #303030);
}

/* H1 V2 scale on Solution */
.single-docs .solution-page h1,
.single-docs .pillar-page h1,
body.single-docs .pillar-title {
    font-size: clamp(36px, 4.5vw, 56px) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.04em !important;
    font-weight: 500 !important;
    color: var(--text_001, #303030) !important;
    text-wrap: pretty;
}

/* V2 attention/important block (yellow card) */
.single-docs .attention-block {
    background: var(--extra_bg, #E8D491) !important;
    border-radius: var(--radius-soft, 16px) !important;
    padding: 20px 24px !important;
    margin: 20px 0 !important;
    border: 0 !important;
}
.single-docs .attention-block__wrap {
    color: var(--text_001, #303030);
}

/* V2 paywall fade (replaces blur with gold-tinted soft fade) */
.single-docs .gro-paywalled-content {
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
    pointer-events: none;
    max-height: 360px;
    overflow: hidden;
}

/* V2 favorite/action button — subtle */
.single-docs .gro-favorite-button {
    border-radius: 999px !important;
    transition: background 0.2s, color 0.2s;
}

/* V2 sidebar TOC — поднять читабельность */
.single-docs .aside-list-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
}
.single-docs .aside-list-menu li {
    padding: 6px 0;
    color: var(--text_002, #525252);
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: color 0.2s, border-color 0.2s;
}
.single-docs .aside-list-menu li.active,
.single-docs .aside-list-menu li:hover {
    color: var(--text_001, #303030);
    border-left-color: var(--main, #D9B648);
}

/* V2 breadcrumb (single-docs тоже использует) */
.single-docs .breadcrumb__contacts {
    font-family: var(--font-family-base, inherit);
    font-size: 14px;
    color: var(--text_003, #AAA8A8);
}
.single-docs .breadcrumb__contacts a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.single-docs .breadcrumb__contacts a:hover {
    color: var(--text_001, #303030);
}

/* V2 dark CTA link inside content */
.single-docs .dark_btn__link,
.single-docs .dark__link_inline {
    background: var(--text_001, #303030) !important;
    color: #FFFFFF !important;
    border-radius: 500px !important;
    padding: 14px 28px !important;
    font-weight: 500 !important;
    font-family: var(--font-family-base, inherit) !important;
    text-decoration: none !important;
    transition: background 0.2s !important;
}
.single-docs .dark_btn__link:hover,
.single-docs .dark__link_inline:hover {
    background: var(--text_002, #525252) !important;
}

/* V2 sticky-bar polish (already close to V2, slight upgrades) */
.gro-sticky-bar {
    font-family: var(--font-family-base, "Golos Text", sans-serif) !important;
    /* Position: оставляем bottom (existing UX), но добавим safe-area для mobile */
    padding-bottom: max(0px, env(safe-area-inset-bottom)) !important;
}
.gro-sticky-bar__btn {
    border-radius: 500px !important;
    padding: 10px 22px !important;
    font-weight: 500 !important;
    transition: background 0.2s !important;
}
.gro-sticky-bar__btn:hover {
    background: #f0d83b !important;
}


/* ==========================================================================
   V2 GLOBAL MODALS (Switch / Reentry / Failed / Stage / Age 18+)
   Открытие через [data-v2-modal="<id>"] или window.GroV2.openModal('<id>')
   Закрытие через [data-v2-modal-close] / backdrop / ESC.
   ========================================================================== */
.v2-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(20, 20, 20, 0.65);
    z-index: 9998;
    display: none;
    align-items: center; justify-content: center;
    padding: 20px;
}
.v2-modal-backdrop.is-open { display: flex; }
.v2-modal-card {
    background: var(--v2-page-bg, #E7E5DF);
    color: var(--v2-fg, #303030);
    border-radius: 28px;
    padding: 40px;
    width: 100%; max-width: 480px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    font-family: var(--font-family-base, "Golos Text", sans-serif);
    display: flex; flex-direction: column; gap: 18px;
    position: relative;
}
.v2-modal-card__close {
    position: absolute; top: 20px; right: 20px;
    width: 40px; height: 40px;
    background: transparent; border: 0; cursor: pointer;
    color: var(--v2-fg-muted, #AAA8A8);
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.v2-modal-card__close:hover { background: var(--v2-surface, #fff); color: var(--v2-fg, #303030); }
.v2-modal-card__eyebrow {
    font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--v2-fg-muted, #AAA8A8);
}
.v2-modal-card__title {
    font-size: 28px; line-height: 1.12; letter-spacing: -0.04em;
    font-weight: 500; margin: 0; color: var(--v2-fg, #303030);
    text-wrap: pretty;
}
.v2-modal-card__body {
    color: var(--v2-fg-secondary, #525252);
    font-size: 16px; line-height: 1.55;
}
.v2-modal-card__actions {
    display: flex; flex-direction: column; gap: 10px; margin-top: 4px;
}
.v2-modal-card__actions .v2-btn { width: 100%; }

/* V2 buttons inside modal (unscoped — modals rendered outside .v2-screen) */
.v2-modal-card .v2-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 10px;
    height: 56px; padding: 0 28px;
    border-radius: 500px;
    border: 0; cursor: pointer;
    font-family: var(--font-family-base, "Golos Text", sans-serif);
    font-size: 16px; font-weight: 500;
    letter-spacing: -0.005em;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
}
.v2-modal-card .v2-btn--gold {
    background: var(--main, #D9B648); color: #000;
}
.v2-modal-card .v2-btn--gold:hover { background: #f0d83b; }
.v2-modal-card .v2-btn--dark {
    background: var(--text_001, #303030); color: #FFFFFF;
}
.v2-modal-card .v2-btn--dark:hover { background: var(--text_002, #525252); }
.v2-modal-card .v2-btn--outline {
    background: transparent; color: var(--text_001, #303030);
    box-shadow: inset 0 0 0 1px var(--border, #C4C2BC);
}
.v2-modal-card .v2-btn--outline:hover { background: var(--bg-00, #F4F3F0); }
.v2-modal-card__hint {
    font-size: 13px; color: var(--v2-fg-muted, #AAA8A8); text-align: center;
}


/* ==========================================================================
   V2 EmptyHub + NetworkError (для использования из любого V2 шаблона)
   ========================================================================== */
.v2-empty-hub {
    background: var(--v2-dark, #171717);
    color: var(--v2-on-dark, #fff);
    border-radius: 32px;
    padding: 56px;
    display: flex; flex-direction: column; gap: 18px; align-items: flex-start;
}
.v2-empty-hub__title {
    font-size: 36px; line-height: 1.05; letter-spacing: -0.04em;
    font-weight: 500; margin: 0; color: var(--v2-on-dark, #fff);
    max-width: 720px;
}
.v2-empty-hub__sub {
    font-size: 16px; color: var(--v2-on-dark-soft, rgba(255,255,255,0.72));
    margin: 0; max-width: 640px;
}

.v2-net-error {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 120px 32px; gap: 18px; text-align: center;
}
.v2-net-error__icon {
    width: 96px; height: 96px; border-radius: 32px;
    background: var(--v2-surface-soft, #F4F3F0); color: var(--v2-fg, #303030);
    display: inline-flex; align-items: center; justify-content: center;
}
.v2-net-error__title {
    font-size: 40px; letter-spacing: -0.04em; font-weight: 500; margin: 16px 0 0;
    color: var(--v2-fg, #303030);
}
.v2-net-error__sub {
    font-size: 17px; color: var(--v2-fg-secondary, #525252);
    max-width: 520px; line-height: 1.5; margin: 0;
}


/* ==========================================================================
   UNIFIED ROUTE CARDS — apply V2 dark style to legacy .route-card (components/route-card.php)
   ----------------------------------------------------------------------------
   Niki request 2026-05-25: «карточки маршрута сейчас везде разные».
   `.v2-route-card` (V2 Hub) и `.route-card` (legacy /wiki/) имели разный visual.
   Этот блок переопределяет `.route-card.route-card--browse` под V2 dark style
   (как Hub) — БЕЗ изменения PHP markup в components/route-card.php.
   ========================================================================== */
.route-card.route-card--browse {
    position: relative;
    background: var(--text_001, #303030);
    color: #FFFFFF;
    border: 1px solid var(--text_001, #303030);
    border-radius: 28px;
    padding: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* 2026-05-27 (Niki): фикс. высота карточки ~ Figma 8817-112348 (compact).
       Body убран — header + auto-filler + footer. height: 100% для Swiper.
       min-height: 280px = compact tile (как в Figma). */
    min-height: 280px;
    height: 100%;
    text-decoration: none;
    font-family: var(--font-family-base, "Golos Text", sans-serif);
    transition: transform 0.2s;
}
.route-card.route-card--browse:hover {
    transform: translateY(-2px);
}

/* Header: title (слева) + ОДИН бейдж (справа) на одной строке.
   align-items: flex-start — оба элемента прижаты к верхней границе header (visually aligned).
   Title теперь живёт ЗДЕСЬ, не в body. */
.route-card.route-card--browse .route-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
}
.route-card.route-card--browse .route-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
}
.route-card.route-card--browse .route-card__badge--type {
    background: var(--main, #D9B648);
    color: var(--text_001, #303030);
    border-color: transparent;
}
.route-card.route-card--browse .route-card__badge--active {
    background: rgba(217, 182, 72, 0.15);
    color: var(--main, #D9B648);
    border-color: var(--main, #D9B648);
}
.route-card.route-card--browse .route-card__badge--done {
    background: var(--soft-green, #DEF2ED);
    color: var(--text_001, #303030);
    border-color: transparent;
}
.route-card.route-card--browse .route-card__badge--locked {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
}

/* Badge должен оставаться целым (не сжиматься под длинным title) и стоять над фоном (z-index). */
.route-card.route-card--browse .route-card__badge {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

/* Body: больше не используется (title переехал в header). Правило оставлено
   на случай legacy-вызовов с пустым body — flex:1 даёт filler-эффект. */
.route-card.route-card--browse .route-card__body {
    flex: 1;
}

/* Title: теперь живёт в header слева, бейдж справа.
   flex:1 + min-width:0 = title заполняет доступную ширину и переносит длинные строки.
   Над фоновой стрелкой (z-index). */
.route-card.route-card--browse .route-card__title {
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: -0.04em;
    font-weight: 500;
    color: #FFFFFF;
    margin: 0;
    flex: 1;
    min-width: 0;
    text-wrap: pretty;
    position: relative;
    z-index: 2;
}
.route-card.route-card--browse .route-card__excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
    /* Line-clamp до 3 строк (как V2 Hub) */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer: meta + CTA. position: relative + z-index — над фоновой стрелкой (::after). */
.route-card.route-card--browse .route-card__footer {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 2;
}
.route-card.route-card--browse .route-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.route-card.route-card--browse .route-card__meta-item {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}
.route-card.route-card--browse .route-card__cta {
    color: var(--main, #D9B648);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.005em;
    white-space: nowrap;
}

/* Active / completed / locked states */
.route-card.route-card--browse.route-card--active {
    border-color: var(--main, #D9B648);
    box-shadow: 0 0 0 1px var(--main, #D9B648);
}
/* 2026-05-27: locked state теперь через .route-card--locked (mu-plugin CSS управляет opacity).
   Старое правило по badge--locked deprecated — badge всегда показывает тип, не locked. */
.route-card.route-card--browse[data-locked="true"] {
    opacity: 0.92;
}

/* Decorative L-arrow watermark (Figma node 8817-112348)
   2026-05-27 (Niki revert): возвращаю L-стрелку (вертикаль из верха + поворот вправо + arrowhead).
   Прошлая попытка с диагональной (arrow-yellow.svg) сделала её слишком большой и smeared.
   Позиция: top-right corner, частично уходит за края карточки.
   Fill: rgba(255,255,255,0.07) — тонкий watermark. */
.route-card.route-card--browse::after {
    content: "";
    position: absolute;
    right: -20px;
    top: 0;
    width: 280px;
    height: 280px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' fill='rgba(255,255,255,0.07)'><path d='M165 80 C 100 80 100 160 100 200 L 100 320 L 160 320 L 160 220 C 160 180 180 180 220 180 L 260 180 L 260 240 L 340 200 L 260 160 L 260 220 L 220 220 C 200 220 200 220 200 200 C 200 160 200 140 240 140 L 340 140 L 340 80 L 165 80 Z'/></svg>");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top right;
    pointer-events: none;
}

/* Swiper carousel: уравниваем высоту slides по самой высокой карточке
   (route-card имеет height:100% — нужно чтобы родитель .swiper-slide тоже
   stretched до row max). Scoped через :has() чтобы не задеть другие carousels. */
.swiper-slide:has(.route-card--browse) {
    height: auto;
    display: flex;
}
.swiper-slide:has(.route-card--browse) > .route-card--browse {
    width: 100%;
}
