/* Keep the editorial grid full width. Typography and media scale independently:
   English display titles grow, while Japanese copy keeps a readable measure. */
body:is(.aitria-panel,.editorial-site[data-site-page]) main {
  width: 100%;
  max-width: none;
  min-width: 0;
}
body.editorial-site[data-site-page].page-thanks main .thanks-card {
  width: 100%;
  max-width: none;
}
body.editorial-site[data-site-page].page-top main .phase {
  width: 100%;
  max-width: none;
}
body.editorial-site[data-site-page="top"] #phennec :is(.eb-ph-wrap,.architecture) {
  max-width: none;
}
@media (min-width: 681px) {
  :root { --site-fluid-gutter: max(20px, 2.222222vw); --ep-margin: var(--site-fluid-gutter); }
  body:is(.aitria-panel,.editorial-site[data-site-page]) {
    --sprint-heading-en: clamp(35px, min(4.583333vw, calc(48px + 1.25vw)), 96px);
    --sprint-heading-ja: clamp(28px, 3.055556vw, 40px);
    --section-heading-chapter-size: var(--sprint-heading-en);
    --section-heading-message-size: var(--sprint-heading-ja);
  }
  body.editorial-site[data-site-page],
  body.editorial-site.service-panel[data-site-page],
  body.editorial-site.site-panel[data-site-page] main :is(#about,#solutions,#cases)[data-sprint-section],
  body.editorial-site[data-site-page] :is(#reasons,#company)[data-sprint-reasons],
  body.editorial-site[data-site-page].page-thanks {
    --panel-gutter: var(--site-fluid-gutter);
    --panel-cell: var(--site-fluid-gutter);
  }
  :is(.ap-header,.ap-menu) {
    --sh-edge: var(--site-fluid-gutter);
  }
  body.editorial-site[data-site-page="top"] {
    --home-hero-gutter: max(16px, 1.388889vw);
  }
  body.editorial-site.service-panel[data-site-page] main :is(.service-wordmark,.hero-headline-en)[data-heading-language="en"],
  body.aitria-panel main :is(.ap-hero-title,.service-wordmark) {
    font-size: clamp(48px, min(5.555556vw, calc(56px + 1.5vw)), 116px) !important;
  }
  body.editorial-site.site-panel.service-panel[data-site-page] main #faq[data-sprint-support],
  body.editorial-site.service-panel.page-ai-agent-infrastructure[data-site-page] main :is(#flow,#faq) {
    --support-gutter: var(--site-fluid-gutter);
  }
}
@media (min-width: 981px) {
  html:has(body.aitria-panel) { font-size: clamp(14px, 1.111111vw, 20px); }
  body.editorial-site[data-site-page] main :is(.hero-desc,.hero-panel .sub,.hero-original-copy,.challenge-intro,.sec-head > p:not([data-heading-language]):not(.editorial-kicker):not(.section-kicker):not(.snum),.foundation-row .ld,.case-body,.cb,.program-row-desc,.service-text-description > p,.solution-text-description,.why-body > p,.method-definition-sticky > p),
  body.aitria-panel main :is(.hero-panel .sub,.card-copy-line,.sol-body > p,.wcard > p,.case-body,.ux-workshop-content > p),
  body.editorial-site.page-thanks main .thanks-card > p[data-jp-body],
  body:is(.aitria-panel,.editorial-site[data-site-page]) footer.preserved-footer .footer-about > p {
    max-width: 40em;
    text-wrap: pretty;
  }
}
@media (min-width: 1101px) {
  body.editorial-site[data-site-page="top"] #phennec .architecture {
    width: 100%;
    column-gap: 4.36vw;
  }
  body.editorial-site[data-site-page="top"] #phennec .arch-core {
    width: 85%;
    max-width: none;
    min-height: clamp(136px, 9.444444vw, 220px);
  }
  body.editorial-site[data-site-page="top"] #phennec .arch-core img {
    width: clamp(210px, 14.583333vw, 320px);
    max-width: 100%;
  }
  body.editorial-site[data-site-page="top"] #phennec .arch-nodes > span {
    min-height: clamp(54px, 3.75vw, 88px);
    font-size: clamp(16px, calc(12px + .277778vw), 20px);
  }
  body.editorial-site[data-site-page].page-top main .phase .psh-illu {
    height: clamp(184px, 12.777778vw, 320px);
  }
  body.editorial-site[data-site-page].page-top main .phase .psh-illu img {
    width: 100%;
    max-height: 100%;
  }
  body.editorial-site[data-site-page].page-top main .phase .psh > p {
    max-width: 40em;
    margin-inline: auto;
  }
}
@media (min-width: 1600px) {
  :is(.ap-header,.ap-menu) { --sh-unit: 18px; }
  body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) footer.preserved-footer { --sf-unit: 18px; }
  body.editorial-site.site-panel.service-panel[data-site-page] main #faq[data-sprint-support],
  body.editorial-site.service-panel.page-ai-agent-infrastructure[data-site-page] main :is(#flow,#faq) {
    --support-scale: min(calc(100vw / 1440), 1.333333px);
  }
  body.editorial-site[data-site-page].page-top :is(.hero,.hero > .wrap) {
    min-height: min(100svh, 1080px);
    height: auto;
  }
  body.editorial-site.service-panel[data-site-page] #challenge .challenge-main {
    height: min(calc(100svh - 80px), 1000px);
  }
  body.editorial-site[data-site-page="top"].content-preserved #top .hero {
    min-height: max(420px, calc(min(66.666667svh, 720px) - var(--home-client-row-height) - 2px));
  }
  body:is(.aitria-panel,.editorial-site[data-site-page]) {
    --panel-title-size: 40px;
    --panel-card-title-size: 28px;
  }
  body.editorial-site.service-panel[data-site-page] main :is(.service-wordmark,.hero-headline-en)[data-heading-language="en"] {
    max-width: 18em;
  }
  body.aitria-panel main :is(.ap-hero-title,.service-wordmark) {
    max-width: 18em;
  }
  body.aitria-panel main .sec-head > .editorial-kicker:not(.sprint-small-label),
  body.editorial-site[data-site-page="top"] main :is(.method-en,.service-en,.phennec-en) {
    font-size: clamp(66px, calc(48px + 1.25vw), 96px);
  }
  body.aitria-panel .hero-panel h2 { font-size: 32px; }
  body.editorial-site.site-panel.service-panel[data-site-page] #challenge :is(.service-problem-raster,.workshop-problem-raster),
  body.aitria-panel #challenge .prob-card-illu {
    width: 100%;
    max-width: clamp(340px, calc(140px + 14vw), 480px);
  }
  body.editorial-site.site-panel.service-panel.page-internalization[data-site-page] main :is(#about,#solutions) [data-text-rows] .service-text-heading :is(h3,h4),
  body.editorial-site.service-panel.page-ai-agent-infrastructure[data-site-page] main :is(#about,#solutions) .solution-text-heading h3 {
    --section-role-size: 32px;
    font-size: 32px;
    max-width: 18em;
  }
  /* Wide columns need not produce equally tall photographs. */
  body.editorial-site.service-panel.page-ai-agent-infrastructure #ai-dlc .ops-visual,
  body.aitria-panel #workshop-link .related-service-visual {
    aspect-ratio: auto;
    height: clamp(520px, 33.333333vw, 720px);
  }
  body.editorial-site.service-panel[data-site-page] #about[data-sprint-approach] .foundation-row-media img,
  body.aitria-panel main :is(.about-card-illu,.sol-illu) img {
    max-height: 640px;
    object-fit: contain;
  }
  body.editorial-site.service-panel[data-site-page] main .case-photo,
  body.aitria-panel main .case-editorial {
    max-height: 560px;
    overflow: hidden;
  }
  body.editorial-site[data-site-page="top"].content-preserved #top :is(h1,.hero-copy > .sub) {
    max-width: 28em;
  }
}
