/* APIS Lab v6.72 — final responsive spacing & typography system
   Applied last across the whole site. Goal: one visual rhythm on desktop,
   tablet and mobile, without empty screens or collapsed content blocks. */

:root{
  --v672-space-xl:88px;
  --v672-space-lg:76px;
  --v672-space-md:64px;
  --v672-space-sm:48px;
  --v672-head-gap:38px;
}

/* --------------------------------------------------------------------------
   GLOBAL RHYTHM — DESKTOP
   -------------------------------------------------------------------------- */
@media (min-width:761px){
  /* Main reusable section families */
  .v5-section{padding-top:88px!important;padding-bottom:88px!important}
  .v5-section.tight{padding-top:64px!important;padding-bottom:64px!important}
  .v624-section,.v624-soft,.v624-dark{padding-top:76px!important;padding-bottom:76px!important}
  .article-v624{padding-top:72px!important;padding-bottom:72px!important}
  .tool-pro-section{padding-top:72px!important;padding-bottom:78px!important}
  .tool-professional-v625{padding-top:68px!important;padding-bottom:68px!important}
  main>.v624-soft.v625-related{padding-top:62px!important;padding-bottom:62px!important}

  /* Internal heroes: enough air, but never a second empty screen after crumbs. */
  main>.v645-crumb-band + section:not(.case6-hero):not(.case-detail-hero){padding-top:50px!important}
  .service-hero{padding-bottom:72px!important}
  .tool-v624-hero,.tools-hub-hero,.article-v624-hero,.lab-v624-hero{padding-bottom:68px!important}
  .strategy-hero{padding-bottom:72px!important}
  .expert6-hero,.work-hero,.system-page-hero{padding-bottom:76px!important}
  .intel-hero{padding-bottom:68px!important}

  /* Home — balanced editorial cadence */
  .apis-positioning,.business-first,.apis-challenges,.solutions6,.decision6,
  .international6,.work-scenarios{padding-top:88px!important;padding-bottom:88px!important}
  .work-home{padding-top:88px!important;padding-bottom:92px!important}
  .home-intl-bridge-v625{padding-top:72px!important;padding-bottom:72px!important}
  .labx-section.home-lab622{padding-top:82px!important;padding-bottom:82px!important}
  .closing6{padding-top:82px!important;padding-bottom:82px!important}

  /* Work index */
  body.v6-work-page .work-index6{padding-top:24px!important;padding-bottom:88px!important}
  body.v6-work-page .work-index-row{padding-top:34px!important;padding-bottom:34px!important}
  .work-cta{padding-top:82px!important;padding-bottom:82px!important}

  /* Strategy */
  .strategy-situations,.strategy-framework,.strategy-sprint{padding-top:80px!important;padding-bottom:80px!important}

  /* International — previously mixed 0 / 46 / 92px. One deliberate scale. */
  :is(.intl-definition,.intl-situations,.intl-decisions,.intl-analytics,.intl-evidence-v625,
      .intl-economics,.intl-risk-v625,.intl-roadmap,.pilot-90-v625,.intl-scenarios,
      .intl-deliverables,.intl-tools,.intl-reading){padding-top:74px!important;padding-bottom:74px!important}
  :is(.intl-method,.intl-funnel,.intl-start){padding-top:76px!important;padding-bottom:76px!important}
  .intl-hero{padding-bottom:72px!important}

  /* Intelligence */
  .intel-workspace{padding-top:72px!important;padding-bottom:82px!important}
  .intel-method{padding-top:78px!important;padding-bottom:82px!important}

  /* Case stories: editorial, not cavernous. Keep hero cinematic. */
  .case6-intro{padding-top:78px!important;padding-bottom:82px!important}
  .case6-context{padding-top:82px!important;padding-bottom:82px!important}
  .case6-moves{padding-top:86px!important;padding-bottom:86px!important}
  .case6-result{padding-top:88px!important;padding-bottom:88px!important}
  .case6-gallery{padding-top:48px!important;padding-bottom:60px!important}
  .case6-next{min-height:220px!important}
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY — reduce oversized internal titles, keep homepage/cases expressive
   -------------------------------------------------------------------------- */
@media (min-width:901px){
  body:not(.v6-home):not(.case6-page) :is(.service-hero,.page-hero,.work-hero,.expert6-hero,
      .system-page-hero,.strategy-hero,.intl-hero,.intel-hero,.tools-hub-hero,
      .tool-v624-hero,.article-v624-hero,.lab-v624-hero,.scenario-v624-hero) h1{
    font-size:clamp(56px,5.2vw,82px)!important;
    line-height:.94!important;
    letter-spacing:-.052em!important;
    text-wrap:balance;
  }
  .service-hero h1{max-width:920px!important}
  body.v6-work-page .work-hero h1,
  body.expertise6-page .expert6-hero h1,
  body.v664-approach-page .system-page-hero h1{max-width:780px!important}
}

/* --------------------------------------------------------------------------
   COMPONENT RHYTHM — headings, cards, processes, body copy
   -------------------------------------------------------------------------- */
:where(.section6-head,.v624-section-head,.v5-head,.v5-section-head,.labx-head,
       .international6-head,.intel-block-head,.case6-two){margin-bottom:38px!important}

:where(.section6-head,.v624-section-head,.v5-head,.v5-section-head,.labx-head,
       .international6-head,.intel-block-head,.case6-two) .v6-label,
:where(.section6-head,.v624-section-head,.v5-head,.v5-section-head) .v5-kicker{
  margin-bottom:14px!important;
}

/* Missing general layout in the approach page: define it once. */
.v5-section-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,.78fr);
  gap:48px;
  align-items:start;
}
.v5-section-head>h2,.v5-section-head>div>h2{margin:0!important}
.v5-section-head>p,.v5-section-head>div+ p{margin:22px 0 0!important;line-height:1.62}
.v5-grid{display:grid;gap:12px}
.v5-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.v5-grid.four>article{
  min-height:220px;
  padding:26px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:24px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}
.v5-grid.four>article h3{margin:14px 0 10px!important}
.v5-grid.four>article p{margin:0!important;line-height:1.55}

/* Service pages: remove artificially tall cards while keeping separation. */
.capability-grid{gap:12px!important}
.capability-card{min-height:240px!important;padding:26px!important}
.capability-card h3{margin-top:28px!important;margin-bottom:14px!important}
.capability-card p{margin-bottom:0!important}
.process-step{min-height:166px!important;padding:24px!important}
.process-step p{margin-top:24px!important;margin-bottom:0!important}
.service-case{min-height:530px!important}
.service-case-media{min-height:530px!important}
.service-case-copy{padding:44px!important}
.service-case-copy h2{margin:14px 0 16px!important}
.service-case-copy p{margin:0!important}
.related-grid{gap:10px!important}
.related-grid a{min-height:92px!important;padding:18px!important}

/* Article text: readable editorial rhythm, no giant voids between paragraphs. */
.article-v624 :is(.article-body,.article-v624-body,.prose-lg) p{margin-bottom:20px}
.article-v624 :is(.article-body,.article-v624-body,.prose-lg) h2{margin-top:58px;margin-bottom:22px}
.article-v624 :is(.article-body,.article-v624-body,.prose-lg) h3{margin-top:38px;margin-bottom:16px}

/* Tool tables can be wider than the phone — scroll locally, never the page. */
.table-scroll,.pro-table-scroll,.heat-table-wrap,.result-table-wrap,
:where(.tool-workbench,.tool-pro-section,.intl-analytics) :has(> table){
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

/* --------------------------------------------------------------------------
   TABLET
   -------------------------------------------------------------------------- */
@media (max-width:1080px) and (min-width:761px){
  .v5-section{padding-top:74px!important;padding-bottom:74px!important}
  .v624-section,.v624-soft,.v624-dark{padding-top:68px!important;padding-bottom:68px!important}
  .v5-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v5-grid.four>article{min-height:190px}
  .service-case{min-height:0!important}
  .service-case-media{min-height:420px!important}
  .work-home,.apis-positioning,.business-first,.apis-challenges,.solutions6,.decision6,
  .international6,.work-scenarios{padding-top:76px!important;padding-bottom:76px!important}
}

/* --------------------------------------------------------------------------
   MOBILE — 390/360/430 class viewports
   -------------------------------------------------------------------------- */
@media (max-width:760px){
  :root{--v672-mobile-section:52px}

  /* One section scale across the site. */
  .v5-section,.v5-section.tight,
  .v624-section,.v624-soft,.v624-dark,
  .article-v624,.tool-pro-section,.tool-professional-v625{
    padding-top:52px!important;
    padding-bottom:52px!important;
  }
  main>.v624-soft.v625-related{padding-top:46px!important;padding-bottom:48px!important}

  /* Breadcrumb already reserves fixed header height; next section only needs a short beat. */
  html body main>.v645-crumb-band + section:not(.case6-hero):not(.case-detail-hero){padding-top:30px!important}
  .service-hero,.tool-v624-hero,.tools-hub-hero,.article-v624-hero,.lab-v624-hero,
  .strategy-hero,.expert6-hero,.work-hero,.system-page-hero,.intl-hero,.intel-hero,
  .scenario-v624-hero{padding-bottom:48px!important}

  /* Internal mobile titles: no 6–8 line walls of type. */
  body:not(.v6-home):not(.case6-page) :is(.service-hero,.page-hero,.work-hero,.expert6-hero,
      .system-page-hero,.strategy-hero,.intl-hero,.intel-hero,.tools-hub-hero,
      .tool-v624-hero,.article-v624-hero,.lab-v624-hero,.scenario-v624-hero) h1{
    font-size:clamp(38px,10.7vw,46px)!important;
    line-height:.98!important;
    letter-spacing:-.043em!important;
    max-width:100%!important;
    text-wrap:pretty;
    overflow-wrap:normal;
    word-break:normal;
    hyphens:none;
  }
  body.v664-approach-page .v5-section h2,
  body.expertise6-page .expert6-row>h2,
  body.v6-work-page .work-index-info h2{
    font-size:clamp(31px,8.7vw,38px)!important;
    line-height:1.03!important;
    letter-spacing:-.035em!important;
  }

  /* Head groups: enough hierarchy, no collapsed labels/copy. */
  :where(.section6-head,.v624-section-head,.v5-head,.v5-section-head,.labx-head,
         .international6-head,.intel-block-head,.case6-two){
    margin-bottom:28px!important;
    gap:18px!important;
  }
  .v5-section-head{display:block}
  .v5-section-head>p,.v5-section-head>div+ p{margin-top:16px!important}

  /* Home sections */
  .apis-positioning,.apis-challenges,.business-first,.solutions6,.decision6,.international6,
  .work-scenarios,.home-intl-bridge-v625,.labx-section.home-lab622{
    padding-top:52px!important;
    padding-bottom:54px!important;
  }
  .work-home{padding-top:52px!important;padding-bottom:56px!important}
  .closing6{padding-top:58px!important;padding-bottom:58px!important}

  /* Work */
  body.v6-work-page .work-index6{padding-top:10px!important;padding-bottom:54px!important}
  body.v6-work-page .work-index-row{padding-top:28px!important;padding-bottom:30px!important}
  body.v6-work-page .work-index-info{padding-top:18px!important;padding-bottom:0!important}
  body.v6-work-page .work-index-info h2{margin:15px 0 16px!important}
  body.v6-work-page .work-index-info>p{margin:0 0 18px!important}
  body.v6-work-page .metric-line{margin-top:4px!important;padding-top:16px!important}
  .work-cta{padding-top:58px!important;padding-bottom:58px!important}

  /* What we solve */
  .expert6-list{padding-top:6px!important;padding-bottom:54px!important}
  .expert6-row{padding-top:28px!important;padding-bottom:30px!important}
  .expert6-row>span{margin-bottom:11px!important}
  .expert6-row>div{margin-top:16px!important}
  .expert6-row>div>p{margin-bottom:15px!important}
  .expert6-row>div>a{margin-right:12px!important;margin-bottom:8px!important}

  /* Approach */
  body.v664-approach-page .apis-process-section{padding-top:52px!important;padding-bottom:54px!important}
  body.v664-approach-page .apis-process-head{margin-bottom:24px!important}
  body.v664-approach-page .apis-process-flow{gap:16px!important}
  .v5-grid.four{grid-template-columns:1fr;gap:10px}
  .v5-grid.four>article{min-height:0;padding:22px}

  /* Service pages */
  .capability-grid{grid-template-columns:1fr!important;gap:10px!important}
  .capability-card{min-height:0!important;padding:22px!important}
  .capability-card h3{margin-top:24px!important;margin-bottom:12px!important;font-size:30px!important;line-height:1.05!important}
  .process-line{grid-template-columns:1fr!important}
  .process-step{min-height:0!important;padding:22px!important}
  .process-step p{margin-top:18px!important}
  .service-case{min-height:0!important;border-radius:26px!important}
  .service-case-media{min-height:300px!important}
  .service-case-copy{padding:24px!important}
  .service-case-copy h2{font-size:34px!important;line-height:1.02!important}
  .related-grid a{min-height:0!important;padding:18px!important}

  /* International: same rhythm as the rest of the site. */
  :is(.intl-definition,.intl-situations,.intl-method,.intl-decisions,.intl-analytics,
      .intl-evidence-v625,.intl-economics,.intl-risk-v625,.intl-funnel,.intl-roadmap,
      .pilot-90-v625,.intl-scenarios,.intl-deliverables,.intl-tools,.intl-reading,.intl-start){
    padding-top:52px!important;
    padding-bottom:52px!important;
  }

  /* Strategy / intelligence */
  .strategy-situations,.strategy-framework,.strategy-sprint,
  .intel-workspace,.intel-method{padding-top:52px!important;padding-bottom:54px!important}

  /* Cases — preserve strong image hero, compress narrative whitespace. */
  .case6-intro,.case6-context,.case6-moves,.case6-result{padding-top:54px!important;padding-bottom:54px!important}
  .case6-gallery{padding-top:36px!important;padding-bottom:48px!important}
  .case6-next{min-height:172px!important}

  /* Article editorial rhythm */
  .article-v624 :is(.article-body,.article-v624-body,.prose-lg) h2{margin-top:44px!important;margin-bottom:18px!important}
  .article-v624 :is(.article-body,.article-v624-body,.prose-lg) h3{margin-top:30px!important;margin-bottom:14px!important}
  .article-v624 :is(.article-body,.article-v624-body,.prose-lg) p{margin-bottom:18px!important}

  /* Prevent accidental edge collisions while preserving local table scroll. */
  main :is(section,article)>:is(.v6-shell,.container){min-width:0}
  .table-scroll,.pro-table-scroll,.heat-table-wrap,.result-table-wrap{max-width:100%;overflow-x:auto!important}

  /* Fixed mobile dock must never cover the final content. */
  body{padding-bottom:88px!important}
}

@media (max-width:420px){
  html body main>.v645-crumb-band + section:not(.case6-hero):not(.case-detail-hero){padding-top:28px!important}
  .v5-section,.v5-section.tight,.v624-section,.v624-soft,.v624-dark,
  .article-v624,.tool-pro-section,.tool-professional-v625{padding-top:48px!important;padding-bottom:48px!important}
  .apis-positioning,.apis-challenges,.business-first,.solutions6,.decision6,.international6,
  .work-scenarios,.home-intl-bridge-v625,.labx-section.home-lab622{padding-top:48px!important;padding-bottom:50px!important}
  .expert6-row{padding-top:26px!important;padding-bottom:28px!important}
  .service-case-media{min-height:280px!important}
}

/* --------------------------------------------------------------------------
   v6.72.1 — component-density corrections found by full-page rendered audit
   -------------------------------------------------------------------------- */

/* The solutions list needs a real section boundary, not a 6–14 px seam. */
.expert6-list{padding-top:28px!important;padding-bottom:76px!important}
.v664-pill-grid small{margin-top:7px!important}

/* Cards must use text rhythm, not auto-distributed empty space. */
.capability-card,.process-step,.case6-move-grid article{justify-content:flex-start!important}
.capability-card>span,.process-step>span{margin-bottom:0!important}
.case6-move-grid article{min-height:250px!important;padding-top:26px!important;padding-bottom:28px!important}
.case6-move-grid span{margin-bottom:0!important}
.case6-move-grid h3{margin-top:34px!important;margin-bottom:16px!important}

.service-signal{min-height:300px!important;padding:26px!important}
.service-metrics{margin:26px 0 16px!important}

/* International evidence / pilot cards: preserve hierarchy with a guaranteed text gap. */
.evidence-grid-v625 article{min-height:250px!important}
.evidence-grid-v625 p{margin-bottom:0!important}
.evidence-grid-v625 b{margin-top:auto!important;padding-top:16px!important}
.pilot-grid-v625 article{min-height:320px!important}
.tool-professional-v625 article{min-height:220px!important}
.related-tool-grid>a,.editorial-card{min-height:160px!important}

/* The international funnel should have one stable visual system in RU and EN. */
.intl-funnel .funnel-visual{margin-top:0!important;margin-bottom:20px!important}
.intl-funnel .funnel-visual>div{box-sizing:border-box}
.intl-funnel .chart-caption{margin:0 0 20px!important}

/* Keep broad tables inside their own scroller. */
.heat-wrap,.table-scroll{max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch}

@media(max-width:760px){
  .expert6-list{padding-top:22px!important;padding-bottom:52px!important}
  body:not(.v6-home):not(.case6-page) :is(.service-hero,.page-hero,.work-hero,.expert6-hero,
      .system-page-hero,.strategy-hero,.intl-hero,.intel-hero) h1{
    font-size:clamp(37px,10.2vw,44px)!important;
  }
  body:not(.v6-home):not(.case6-page) :is(.tools-hub-hero,.tool-v624-hero,.article-v624-hero,
      .lab-v624-hero,.scenario-v624-hero) h1{
    font-size:clamp(35px,9.8vw,42px)!important;
    line-height:1!important;
  }
  .service-signal{min-height:230px!important;padding:22px!important}
  .service-metrics{margin:22px 0 14px!important}
  .case6-move-grid article{min-height:0!important;padding:24px 0 26px!important}
  .case6-move-grid h3{margin-top:24px!important;margin-bottom:13px!important}
  .evidence-grid-v625 article,.pilot-grid-v625 article,
  .tool-professional-v625 article,.related-tool-grid>a,.editorial-card,
  .scenario-premium{min-height:0!important}
  .evidence-grid-v625 article,.pilot-grid-v625 article{padding:22px!important}
  .evidence-grid-v625 h3{margin:24px 0 12px!important}
  .evidence-grid-v625 b{margin-top:14px!important;padding-top:12px!important}
  .pilot-grid-v625 h3{margin:24px 0 14px!important}
  .scenario-premium-copy b{margin-top:18px!important;padding-top:0!important}
  .related-tool-grid strong,.editorial-card b{margin-top:16px!important}
}
