/* ALFA PRIME — Mobile visual polish v1.2
   Strict presentation-only patch. Does not alter product logic, maps, quiz scoring, or forms.
   Keep AFTER original and integration.css. */
@media (max-width: 800px) {
  html, body { width:100%; max-width:100%; overflow-x:clip; }
  *, *::before, *::after { box-sizing:border-box; }
  img, video, svg { max-width:100%; }
  :is(.hero, .hero-inner, .hero-copy, .hero-content, .copy, .b2-copy, .b2-hero-layout,
    .question-aside, .question-work, .registration-right, .form-shell,
    .form-view, .flow-main, .answer-area, .report, .wrap) { min-width:0; }
  /* Balanced headings: never push a hero beyond the viewport. */
  :is(.hero h1, .hero-title, .b2-h1, .b2-result-hero h1, .guide-cover h1,
    .lesson-head h1, .question-aside h1, .flow-content h2,
    .form-shell h1, .registration-caption h2, .report h1, .section-heading h2) {
    max-width:100%; text-wrap:balance; overflow-wrap:break-word;
  }
  /* Safari iOS auto-enlarges the entire page when a focused field has text below 16px.
     Apply only to real editable controls. No maximum-scale=1 / user-scalable=no. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  textarea, select, [contenteditable="true"], .ap-country-filter, .country-search {
    font-size:16px !important;
  }
  :is(input,textarea,select,button,a,[role="button"]) {touch-action:manipulation;}
  :is(input,textarea,select) {scroll-margin-block:105px 30px;}
  :is(.phone-row, .phone-combo, .phone-line, .phone-group, .b2-phone, .multi-row) > * {min-width:0;}
  .ap-country-pop { max-height:min(56dvh,370px); }
  .ap-country-list { max-height:min(37dvh,235px); }
}
@media (max-width: 600px) {
  /* Shared rhythm for editorial landings without changing source markup. */
  :is(.hero-content,.hero-copy,.b2-copy,.hero>.copy) {text-align:center;min-width:0;}
  :is(.hero h1,.hero-title,.b2-h1) {margin-inline:auto;line-height:1.09;letter-spacing:.008em;}
  :is(.hero .lead,.hero-copy>p,.hero-description,.hero-editorial,.hero-phrase,.b2-lead) {
    max-width:440px;margin-left:auto;margin-right:auto;text-align:center;
  }
  :is(.hero-eyebrow,.hero .eyebrow,.b2-eyebrow,.hero .kicker) {justify-content:center;text-align:center;}
  :is(.hero-actions,.hero-cta,.b2-hero-btns) {justify-content:center;}
  :is(.hero-actions .tiny-note,.hero-cta>span,.b2-undercta) {text-align:center;margin-inline:auto;}

  /* O1: geolocated product landing */
  html[data-alfa-page="O1"] .hero {padding:31px 19px 0;align-items:center;}
  html[data-alfa-page="O1"] .hero .copy {width:100%;text-align:center;}
  html[data-alfa-page="O1"] .hero h1 {font-size:clamp(30px,7.8vw,41px);line-height:1.12;margin:18px auto 15px;max-width:630px;}
  html[data-alfa-page="O1"] .hero .eyebrow {text-align:center;}
  html[data-alfa-page="O1"] .hero p {margin:0 auto 19px;max-width:440px;line-height:1.68;}
  html[data-alfa-page="O1"] .hero .note {text-align:center;}
  html[data-alfa-page="O1"] .hero-art {width:100%;margin-top:18px;}
  html[data-alfa-page="O1"] .bottom {text-align:center;justify-content:center;flex-wrap:wrap;gap:6px;}

  /* O2: preserve the complete original nine-question engine. */
  html[data-alfa-page="O2"] .hero {padding:32px 19px 7px;justify-items:center;text-align:center;}
  html[data-alfa-page="O2"] .hero > div:first-child {width:100%;text-align:center;}
  html[data-alfa-page="O2"] .hero h1 {font-size:clamp(30px,7.65vw,40px);line-height:1.12;max-width:580px;margin:15px auto 15px;}
  html[data-alfa-page="O2"] .hero .lead {text-align:center;margin-inline:auto;}
  html[data-alfa-page="O2"] .hero .eyebrow {justify-content:center;}
  html[data-alfa-page="O2"] .hero-actions {justify-content:center;}
  html[data-alfa-page="O2"] .hero-mini {text-align:center;}
  html[data-alfa-page="O2"] .question-aside {text-align:center;align-items:center;}
  html[data-alfa-page="O2"] .question-aside h1 {font-size:clamp(27px,7.1vw,36px);line-height:1.16;margin:12px auto;}
  html[data-alfa-page="O2"] .question-aside p {margin-inline:auto;}
  html[data-alfa-page="O2"] .question-aside .eyebrow,
  html[data-alfa-page="O2"] .question-aside .type-key {justify-content:center;}
  html[data-alfa-page="O2"] .identity > .eyebrow {justify-content:center;}
  html[data-alfa-page="O2"] .identity > h1,
  html[data-alfa-page="O2"] .identity > p {text-align:center;}
  html[data-alfa-page="O2"] .report-top {justify-content:center;text-align:center;}
  html[data-alfa-page="O2"] .report-v5 > h1,
  html[data-alfa-page="O2"] .report-v5 > .report-sub {text-align:center;margin-inline:auto;}

  /* O3: preserve 50% seal, team photograph and original landing sections. */
  html[data-alfa-page="O3"] .hero-inner {padding:33px 19px 22px;align-items:stretch;}
  html[data-alfa-page="O3"] .hero-content {width:100%;text-align:center;}
  html[data-alfa-page="O3"] .hero-title {
    font-size:clamp(31px,7.7vw,41px);line-height:1.1;letter-spacing:.006em;
    width:100%;max-width:650px;margin:0 auto 16px;
  }
  html[data-alfa-page="O3"] .hero-title>span {display:inline!important;white-space:normal!important;}
  html[data-alfa-page="O3"] .hero-title>span+span::before {content:" ";white-space:pre;}
  html[data-alfa-page="O3"] .hero-title .accent-underline::after {display:none;}
  html[data-alfa-page="O3"] .hero-title .accent-underline {border-bottom:2px solid #ffc645;}
  html[data-alfa-page="O3"] .hero-eyebrow {margin-bottom:18px;justify-content:center;}
  html[data-alfa-page="O3"] .hero-copy {margin:0 auto 17px;max-width:470px;}
  html[data-alfa-page="O3"] .hero-offer {justify-content:center;text-align:left;}
  html[data-alfa-page="O3"] .hero-actions {display:flex;flex-direction:column;align-items:center;gap:9px;}
  html[data-alfa-page="O3"] .hero-actions .btn {width:100%;max-width:430px;justify-content:center;text-align:center;}
  html[data-alfa-page="O3"] .hero-art {margin:10px auto 0;}
  html[data-alfa-page="O3"] .flow-content > h2 {font-size:clamp(32px,8.3vw,42px);line-height:1.15;text-align:center;}
  html[data-alfa-page="O3"] .flow-content > .flow-desc,
  html[data-alfa-page="O3"] .flow-content > .form-step {text-align:center;}

  /* B2: keep original portrait, timeline, and adaptive roadmap. */
  html[data-alfa-page="B2"] .b2-hero-layout {grid-template-columns:1fr;text-align:center;}
  html[data-alfa-page="B2"] .b2-copy {padding:33px 0 16px;margin-inline:auto;max-width:660px;text-align:center;}
  html[data-alfa-page="B2"] .b2-h1 {font-size:clamp(31px,7.75vw,41px);line-height:1.075;margin-inline:auto;max-width:650px;}
  html[data-alfa-page="B2"] .b2-h1 .first {font-size:clamp(40px,11vw,57px);white-space:normal!important;}
  html[data-alfa-page="B2"] .b2-h1 .h-line {white-space:normal!important;}
  html[data-alfa-page="B2"] .b2-lead {font-size:13px;line-height:1.65;margin:17px auto 21px;}
  html[data-alfa-page="B2"] .b2-eyebrow {justify-content:center;letter-spacing:.10em;margin-bottom:14px;}
  html[data-alfa-page="B2"] .b2-undercta {justify-content:center;}
  html[data-alfa-page="B2"] .b2-form-side h1,
  html[data-alfa-page="B2"] .b2-result-hero h1 {font-size:clamp(29px,7.5vw,39px);text-wrap:balance;}

  /* B1: original full five-chapter guide. */
  html[data-alfa-page="B1"] .hero-copy {width:100%;text-align:center;}
  html[data-alfa-page="B1"] .hero h1 {font-size:clamp(30px,7.65vw,40px);line-height:1.11;margin:16px auto 7px;max-width:630px;}
  html[data-alfa-page="B1"] .hero-phrase {font-size:clamp(17px,4.65vw,22px);}
  html[data-alfa-page="B1"] .hero-cta {align-items:center;}
  html[data-alfa-page="B1"] .guide-cover > .wrap > h1,
  html[data-alfa-page="B1"] .guide-cover .lead {text-align:center;margin-inline:auto;}
  html[data-alfa-page="B1"] .guide-cover h1 {font-size:clamp(30px,7.7vw,42px);}
  html[data-alfa-page="B1"] .guide-greeting {text-align:center;}
  html[data-alfa-page="B1"] .section-heading h2 {font-size:clamp(29px,7.7vw,41px);}
  html[data-alfa-page="B1"] .lesson-head h1 {font-size:clamp(29px,7.4vw,40px);}

  /* B3: preserve original visual hierarchy, video recorder and evaluation steps. */
  html[data-alfa-page="B3"] .hero-copy {text-align:center;padding:36px 20px 16px;}
  html[data-alfa-page="B3"] .hero-title {font-size:clamp(30px,7.55vw,39px);line-height:1.11;max-width:600px;text-align:center;margin-inline:auto;}
  html[data-alfa-page="B3"] .hero-editorial {margin:16px auto 9px;font-size:clamp(16px,4.2vw,19px);}
  html[data-alfa-page="B3"] .hero-description {max-width:460px;line-height:1.72;}
  html[data-alfa-page="B3"] .hero-copy .eyebrow {justify-content:center;text-align:center;}
  html[data-alfa-page="B3"] .hero-button {width:100%;max-width:430px;margin-inline:auto;}
}
@media(max-width:380px) {
  html[data-alfa-page="O1"] .hero h1,
  html[data-alfa-page="O2"] .hero h1,
  html[data-alfa-page="B1"] .hero h1,
  html[data-alfa-page="B2"] .b2-h1,
  html[data-alfa-page="B3"] .hero-title,
  html[data-alfa-page="O3"] .hero-title {font-size:29px;letter-spacing:0;}
  html[data-alfa-page="B2"] .b2-h1 .first {font-size:40px;}
}
@media(prefers-reduced-motion:reduce) {
  html {scroll-behavior:auto!important;}
}
