/* AI Path Pro — audited reading and interaction layer.
 * Loaded last. These type sizes and 44px controls are design targets, not a
 * claim that WCAG specifies a universal minimum font size or 44px at AA.
 * Keep the display typography, brand palette, sculpture and route positions.
 */

/* The standalone readers also need the Hungarian ő/ű glyphs. */
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --aip-reading: 1.0625rem;
  --aip-control: .9375rem;
  --aip-support: .875rem;
  --aip-label: .8125rem;
  --aip-meta: .75rem;
}

/* Reading copy: reserve small type for short labels, never explanations. */
body[data-page] :is(
  .section-top > p, .solution-card p, .solution-detail p, .industry-detail p,
  .industry-detail li, .deliverables li, .bio-text p, .philosophy-grid p,
  .community-description p, .community-block p, .public-role p,
  .engagement-card p, .contact-details p, .contact-banner p,
  .prose p, .prose li, details > p, .readiness-card p,
  .approach-tab-copy, .approach-result p, .approach-step p, .pg-maker-story p,
  .business-section-head p, .business-curriculum p, .business-details p,
  .business-enrolment > p, .business-team-program p,
  .business-delivery-stages p, .business-brief-grid p, .business-takeaway p,
  .business-hero .journey-result-copy > p,
  .bp-result-heading p, .bp-first-action p, .bp-result-section p,
  .bp-preparation p, .bp-week p, .bp-next-action p,
  .path-stage-head > p, .path-intro-note, .path-departure p,
  .path-route-legend p, .path-skill-detail p, .path-workshop-transition p,
  .path-resource-document p, .path-resource-row p,
  .path-resource-directory-heading p,
  .path-publication-feature-copy > p, .path-publication-copy p,
  .path-publication-contents,
  .pg-panel p, .pg-step-body p, .pg-panel .pg-step-body > .pg-scenario,
  .pg-panel .pg-feedback p, .pg-saved-card p, .pg-empty p,
  .pw-question > p, .pw-route-summary > p,
  .pw-process-controls > p, .pw-process-takeaway,
  .pw-architecture-heading > p, .pw-architecture-detail > p,
  .pw-review-gate p, .pw-blueprint ol
) {
  font-size: var(--aip-reading);
  line-height: 1.8;
}

body[data-page=home] #community .section-top > p {
  font-size: var(--aip-reading);
  line-height: 1.8;
}

body[data-page] :is(.bio-text .lede, .page-intro .lede) {
  font-size: 1.125rem;
  line-height: 1.8;
}

body[data-page] .business-section-head h2 em {
  font-family: Instrument, Georgia, serif;
  font-style: italic;
}

/* Buttons, fields and navigation: readable labels with room to wrap. */
body[data-page] :is(
  .button, .link, .filter-button, .source-link, .contact-methods a,
  .pg-button, .pg-book-button, .pg-lab-tabs button, .pg-mode-tabs button,
  .pg-workspace-footer button, .pg-maker-link, .pg-context-links a,
  .pg-takeaway-bar > a, .pg-earned-toast [data-open-fieldbook],
  .business-primary, .business-text-link, .business-team-program a,
  .business-planner button[aria-pressed], .business-details summary,
  .bp-result-actions button, .bp-mission button, .bp-mission a,
  .bp-button-primary, .bp-next-action a, .bp-week summary,
  .path-action, .path-text-link, .path-template-link,
  .path-resource-filter, .path-doc-action,
  .path-publication-download, .path-publication-read,
  .path-publication-cover-open, .path-publication-direct,
  .path-publication-note-links > a,
  .pw-button, .pw-actions > .pw-button,
  .pw-answer-trace .pw-button, .pw-inline-link,
  .pw-process-controls .pw-button-quiet,
  .pw-process-result .pw-button,
  .pw-question-progress button, .pw-route-tab, .pw-architecture .pw-route-tab
) {
  font-size: var(--aip-control);
  line-height: 1.5;
  min-height: 44px;
  min-width: 0;
  white-space: normal;
}

body[data-page] :is(.business-problem-options button, .business-context-options button) {
  font-size: var(--aip-control) !important;
}

body[data-page] :is(
  .field input, .field select, .field textarea,
  .pg-field input, .pg-field select, .pg-field textarea,
  .business-planner textarea, .business-interest-form textarea,
  .business-interest-form input:not([type=checkbox]):not([type=hidden])
) {
  font-size: 1rem;
  line-height: 1.65;
  min-width: 0;
  min-height: 48px;
}

body[data-page] :is(.pg-output, .pg-result-panel .pg-output, .pg-saved-card .pg-output, .pw-output, .brief-result pre) {
  font-size: 1rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

body[data-page] :is(.pg-field input, .pg-field textarea)::placeholder {
  color: #526a70;
  opacity: 1;
}

body[data-page] :is(
  .field label, .pg-field label, .pg-field > span:first-child,
  .business-task-label, .business-interest-form label:not(.business-honeypot),
  .business-consent, .pg-choice, .pg-step-body .pg-choice,
  .pg-checkbox, .pg-approval, .pg-checklist, .pg-table, .pg-table tbody th,
  .pg-quote-totals, .pg-quote-totals .pg-total dt,
  .pw-option strong, .pw-toggle, .pw-toggle strong,
  .pw-process-controls .pw-toggle strong,
  .pw-scenarios .pw-toggle, .pw-review-gate .pw-toggle,
  .pw-answer-trace strong, .pw-architecture-step strong
) {
  font-size: var(--aip-control);
  line-height: 1.7;
}

/* Useful supporting copy stays readable, including consent and result notes. */
body[data-page] :is(
  .tiny, .brand-promise, .footer-brand p, .footer-links,
  .approach-note, .credit-name small, .community-credits .credit-name small,
  .portrait-caption span, .speaking-topics span, .contact-methods,
  .form-note, .brief-status, .filter-count, .deliverables .measure,
  .contact-card p, .event-row p, .event-date,
  .business-intent-options span, .business-task-label span,
  .business-planner-submit > p, .business-price > span,
  .business-interest-form [data-interest-status], .business-team-link,
  .business-route-cta a > span, .business-curriculum small,
  .business-delivery-stages article > span, .bp-mission > span,
  .bp-mission small, .bp-week li > span, .bp-local-note,
  .path-stage-head > .path-route-context, .path-route-context > small,
  .path-skill-detail .path-skill-reward, .path-skill-reward > strong,
  .path-resource-footnote, .path-publication-note p,
  .pg-local-note, .pg-field small, .pg-form small, .pg-fieldbook-dialog > p,
  .pg-fieldbook-dialog .pg-local-note, .pg-status, .pg-feedback,
  .pg-result-panel .pg-result-note, .pg-form .pg-form-note,
  .pg-panel .pg-formula, .pg-panel .pg-form-note,
  .pg-dialog-head p, .pg-dialog-status,
  .pg-dialog-footer > .pg-local-note, .pg-reset-confirm p, .pg-undo-bar p,
  .pg-saved-card summary, .pg-order-line small,
  .pg-takeaway-bar small, .pg-takeaway-bar strong,
  .pg-metric span, .pg-metric small, .pg-payback > span,
  .pg-presets > span, .pg-error-list, .pg-time-bars,
  .pg-time-bar > div:first-child, .pg-time-bar strong,
  .pw-note, .pw-status, .pw-option small, .pw-answer-trace p,
  .pw-route-summary .pw-note, .pw-route-summary dd, .pw-step-ownership dd,
  .pw-toggle small, .pw-process-controls .pw-toggle small,
  .pw-process-controls legend, .pw-process-controls .pw-note,
  .pw-process-column h4, .pw-process-step strong, .pw-step-timing,
  .pw-step-timing > span, .pw-process-step small, .pw-process-total,
  .pw-metric > span, .pw-metric small, .pw-process-result .pw-note,
  .pw-example-note, .pw-architecture-step small, .pw-simulation-note
) {
  font-size: var(--aip-support);
  line-height: 1.75;
}

body[data-page] :is(.business-form-note, .business-small, .bp-boundary, .pw-recommended-note) {
  font-size: var(--aip-support) !important;
  line-height: 1.8 !important;
}

body[data-page] :is(.business-planner legend, .business-intent-options strong) {
  font-size: 1rem;
  line-height: 1.55;
}

/* Brief badges and nonessential map metadata: a 12px floor at default zoom. */
body[data-page] :is(
  .eyebrow, .business-kicker, .business-program-meta span,
  .business-status-badge, .business-planner legend > span,
  .business-intent-options small, .business-curriculum li > span,
  .business-delivery-stages small, .business-route-cta small,
  .bp-result-heading > span, .bp-result-heading small,
  .pg-kicker, .pg-tag, .pg-mission-card .pg-kicker,
  .pg-step-body .pg-kicker, .pg-fieldbook-dialog .pg-kicker,
  .pg-progress-pill, .pg-passport-label, .pg-level, .pg-next,
  .pg-passport-stats > div > span, .pg-passport-stats small,
  .pg-mode-tabs button > span, .pg-lab-tabs button > span,
  .pg-workspace-heading .eyebrow, .pg-workspace-footer,
  .pg-table th, .pg-table caption, .pg-choice-letter,
  .pg-order-line .pg-field > span, .pg-checklist li > span,
  .pg-maker-portrait span, .pg-original-identity > span,
  .pg-context-map .eyebrow,
  .path-chapter, .path-chapter > span, .path-small-label,
  .path-doc-category, .path-resource-kind,
  .path-route-legend > span, .path-route-entry, .path-route-exit,
  .path-skill-axis, .path-universe-caption,
  .path-skill-detail .path-small-label, .path-training-format,
  .path-workshop-transition > span, .path-conviction cite,
  .path-publication-kicker, .path-publication-kicker > span:last-child,
  .path-publication-copy > .path-publication-kicker,
  .path-publication-copy > .path-publication-kicker > span:last-child,
  .path-publication-edition, .path-resource-row .path-resource-kind,
  .path-nav-title, .path-nav a > span, .path-nav-progress,
  .pw-kicker, .pw-tag, .pw-route-panel-label, .pw-route-index,
  .pw-architecture .pw-route-index, .pw-route-recommendation,
  .pw-option-letter, .pw-trace-number, .pw-process-number,
  .pw-route-summary .pw-kicker, .pw-route-summary dt,
  .pw-step-ownership dt, .pw-scenarios legend,
  .photo-credit, .event-tag, .public-role .eyebrow,
  .credibility-label, .portrait-corner, .approach-step .step-no,
  .deliverables .caption, .deliverables .measure b, .footer-bottom
) {
  font-size: var(--aip-meta);
  line-height: 1.6;
}

body[data-page] .footer-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
}

body[data-page] .faq-grid summary {
  font-size: 1rem;
  line-height: 1.6;
  min-height: 44px;
}

/* Explicit fixes for low-contrast text on the pale process laboratory. */
body[data-page] :is(
  .path-console-header > span:last-child, .pw-process-controls .pw-note,
  .pw-process-column h4, .pw-process-number, .pw-step-timing,
  .pw-step-timing > span, .pw-process-result .pw-note, .pw-example-note
) { color: #456354; }

body[data-page] .path-console-header {
  font-size: var(--aip-meta);
  line-height: 1.6;
  flex-wrap: wrap;
  gap: 8px 16px;
}

body[data-page] :is(.path-inline-heading p, .path-console-header > span:last-child) {
  font-size: var(--aip-support);
}

/* A two-colour focus ring remains visible on both pale and dark surfaces. */
body :is(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid #f5fbff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #123a50;
}

body :is(a, button, input, textarea, select, summary, [tabindex]) {
  scroll-margin-block: 7rem 6rem;
}

body[data-page] .site-header .nav-links {
  gap: clamp(12px, 1.4vw, 22px);
  flex: 1 1 300px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}
body[data-page] .site-header .nav-wrap {
  height: auto;
  min-height: 88px;
  padding-block: 12px;
  flex-wrap: wrap;
}
body[data-page] .site-header .nav-end { min-width: 0; max-width: 100%; }
body[data-page] .site-header .nav-links > a {
  font-size: var(--aip-support);
  min-height: 44px;
  display: flex;
  align-items: center;
  line-height: 1.5;
}
body[data-page] .site-header .nav-links > .nav-contact-mobile { display: none; }
body[data-page] .site-header .language {
  font-size: var(--aip-support);
  gap: 4px;
}
body[data-page] .site-header .language a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body[data-page] .site-header .nav-end .pg-header-book {
  font-size: var(--aip-support);
  min-height: 44px;
  gap: 9px;
  padding: 12px 15px;
  white-space: normal;
}
body[data-page] :is(h1, h2, h3, h4) { overflow-wrap: anywhere; }
body[data-page] .journey-hero h1 em { max-width: 100%; }
body[data-page] :is(.path-branch-map, .path-skill-universe) { min-height: 32em; }
body[data-page] :is(.pw-architecture-number, .pg-book-button > span) { font-size: var(--aip-meta); }
body[data-page] .pw-question-progress button { width: max(44px, 1.6em); min-width: 44px; }
body[data-page] :is(.path-chapter > span, .journey-departure li > span, .business-planner legend > span) {
  min-width: 2em;
  min-height: 2em;
}

/* Hero: the route choices and their consequences are the primary controls. */
body[data-page] .journey-hero .pg-hero-copy .lede {
  font-size: 1.125rem;
  line-height: 1.8;
}
body[data-page] :is(.journey-invitation strong, .journey-hero .pg-hero-person strong) {
  font-size: var(--aip-control);
  line-height: 1.6;
}
body[data-page] :is(
  .journey-invitation p > span, .journey-promise,
  .journey-hero .pg-hero-person span, .business-hero-shortcuts,
  .journey-sculpture-footer .drag-hint, .journey-disclosure p,
  .journey-departure li, .journey-next-stage p
) {
  font-size: var(--aip-support);
  line-height: 1.75;
}
body[data-page] :is(
  .journey-hero .pg-hero-copy .eyebrow, .journey-hero .path-hero-topline,
  .path-signal, .journey-input, .journey-exit, .journey-exit span,
  .journey-hero .sculpture-readout, .journey-friction-index,
  .journey-result-eyebrow, .business-hero-promise > span,
  .journey-metrics div > span, .journey-departure li > span,
  .journey-next-stage > div > span, .journey-next-stage > a small
) {
  font-size: var(--aip-meta);
  line-height: 1.6;
}
body[data-page] .business-hero .journey-friction {
  min-width: 0;
  width: min(285px, 80%);
  padding: 14px;
  gap: 11px;
}
body[data-page] .journey-friction > span:not(.journey-friction-index):not(.journey-friction-mark) {
  min-width: 0;
}
body[data-page] .business-hero .journey-friction strong {
  font-size: 1rem;
  line-height: 1.5;
}
body[data-page] .business-hero .journey-friction small {
  font-size: var(--aip-support);
  line-height: 1.6;
  min-width: 0;
}
body[data-page] .journey-friction-mark { margin-left: auto; }
body[data-page] .journey-sculpture-footer {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-inline: 0;
}
body[data-page] .journey-sculpture-footer .drag-hint {
  flex: 1 1 100%;
  margin: 0;
}
body[data-page] .journey-view-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
body[data-page] .journey-sculpture-footer .journey-view-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #567c8e;
  border-radius: 5px;
  background: #0c2637;
  color: #d2e8ef;
  font-size: var(--aip-support);
  line-height: 1.5;
  white-space: normal;
}
body[data-page] .journey-view-button svg { flex: none; }
body[data-page] .journey-sculpture-footer > button[data-reset] {
  font-size: var(--aip-support);
  min-height: 44px;
  padding: 10px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
body[data-page] .journey-continue {
  min-width: 0;
  gap: 16px;
}
body[data-page] .journey-continue small {
  font-size: var(--aip-label);
  line-height: 1.5;
  color: #34583f;
}
body[data-page] .journey-continue strong {
  font-size: 1rem;
  line-height: 1.5;
}
body[data-page] .journey-continue em {
  font-family: Manrope, Arial, sans-serif;
  font-style: normal;
  font-size: var(--aip-support);
  line-height: 1.6;
  color: #34583f;
}
body[data-page] .journey-disclosure .motion-toggle {
  font-size: var(--aip-support);
  min-height: 44px;
  white-space: normal;
  flex-shrink: 0;
}
body[data-page] .journey-next-stage strong {
  font-size: 1.0625rem;
  line-height: 1.6;
}
body[data-page] :is(.journey-departure, .business-hero-shortcuts) {
  flex-wrap: wrap;
  gap: 10px 20px;
}

/* Interactive maps retain their existing node positions and connecting path. */
body[data-page] .path-route-node {
  width: 170px;
  padding: 25px 12px 18px;
  gap: 8px;
}
body[data-page] .path-route-node > small { font-size: var(--aip-meta); }
body[data-page] .path-route-node > strong {
  font-size: 1rem;
  line-height: 1.5;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body[data-page] .path-route-node > span:last-child {
  font-size: var(--aip-support);
  line-height: 1.65;
  max-width: none;
}
body[data-page] .path-skill-node strong {
  font-size: var(--aip-support);
  line-height: 1.6;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body[data-page] .path-nav a > b {
  font-size: var(--aip-label);
  max-width: 210px;
}
body[data-page] .path-resource-filter { padding: 10px 14px; }
body[data-page] :is(.path-resource-row, .path-publication-copy, .path-publication-feature-copy) {
  min-width: 0;
}
body[data-page] .path-publication-note-links { flex-wrap: wrap; }
body[data-page] .pw-route-tabs { flex-wrap: wrap; }
body[data-page] .pw-route-tab {
  flex: 1 1 140px;
  white-space: normal;
  overflow-wrap: anywhere;
}
body[data-page] .pw-process-step > div { min-width: 0; }
body[data-page] .pw-architecture-step > div { min-width: 0; }
body[data-page] .pw-architecture-step :is(strong, small) { overflow-wrap: anywhere; }
body[data-page] .pw-process-number { width: 28px; height: 28px; }
body[data-page] .pw-process-step:before { left: 13px; }

/* Missions: descriptive text, reward and launch controls stay distinct. */
body[data-page=home] .pg-mission-card > p {
  font-size: var(--aip-reading);
  line-height: 1.8;
}
body[data-page=home] .pg-mission-card > .pg-kicker,
body[data-page=home] .pg-mission-card-top .pg-tag {
  font-size: var(--aip-meta);
  line-height: 1.65;
  letter-spacing: .03em;
}
body[data-page=home] .pg-mission-card > .pg-mission-reward,
body[data-page=home] .pg-mission-card-bottom > small {
  font-size: var(--aip-support);
  line-height: 1.75;
}
body[data-page=home] .pg-mission-card .pg-mission-card-bottom .pg-button {
  font-size: var(--aip-support);
  min-height: 48px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Publication pages, accessible text and the download dialog. */
.publication-reader-page :is(.pr-description, .pr-noscript, .pr-loading),
.aip-pdf-reader .aip-pdf-text,
.aip-file-dialog .aip-file-status {
  font-size: var(--aip-reading);
  line-height: 1.8;
}
.publication-reader-page :is(.pr-action, .pr-back, .pr-footer a, .pr-save-help summary, .pr-collection-pdf),
.aip-pdf-reader :is(.aip-pdf-transcript > summary, .aip-pdf-retry),
.aip-file-dialog :is(.aip-file-action, .aip-file-item) {
  font-size: var(--aip-control);
  line-height: 1.6;
  min-height: 48px;
}
.publication-reader-page :is(.pr-save-hint, .pr-copy-fallback, .pr-status, .pr-count),
.aip-pdf-reader :is(.aip-pdf-counter, .aip-pdf-status),
.aip-file-dialog :is(.aip-file-local, .aip-file-collection > p) {
  font-size: var(--aip-support);
  line-height: 1.8;
}
.publication-reader-page :is(.pr-eyebrow, .pr-footer, .pr-collection-title > span, .pr-collection-title small),
.aip-file-dialog :is(.aip-file-kicker, .aip-file-meta, .aip-file-item-type) {
  font-size: var(--aip-meta);
  line-height: 1.6;
}
.publication-reader-page .pr-collection-title strong {
  font-size: 1rem;
  line-height: 1.6;
}
.publication-reader-page .pr-collection-title small { white-space: normal; }
.publication-reader-page .pr-header { gap: 16px; flex-wrap: wrap; }
.publication-reader-page .pr-back { max-width: none; }
.aip-file-dialog .aip-file-item-type { white-space: normal; }

@media (max-width: 1190px) and (min-width: 1101px) {
  body[data-page] .site-header .brand-lockup { width: 190px; }
  body[data-page] .site-header .nav-wrap { gap: 18px; }
  body[data-page] .site-header .nav-end { gap: 10px; }
}

/* Switch to the existing accessible menu before enlarged links can crowd it. */
@media (max-width: 1100px) {
  body[data-page] .site-header .nav-end { margin-left: auto; }
  body[data-page] .site-header .menu-toggle { display: block; flex: none; }
  body[data-page] .site-header .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    padding: 22px var(--gutter) 28px;
    max-height: calc(100svh - 7rem);
    overflow-y: auto;
    background: #ecf4f2;
    border-bottom: 1px solid #b9d1d3;
    box-shadow: 0 25px 50px #03162222;
  }
  body[data-page] .site-header .nav-links.open { display: flex; }
  body[data-page] .site-header .nav-links > a {
    font-size: 1.125rem;
    white-space: normal;
  }
  body[data-page] .site-header .nav-links > .nav-contact-mobile {
    display: flex;
    border-top: 1px solid #bed2d5;
    padding-top: 18px;
    margin-top: 8px;
    color: #006e94;
  }
  body[data-page] .site-header .nav-end .pg-header-book { display: none; }
  body[data-page] .path-route-node { width: 150px; }
  body[data-page] .path-skill-universe { height: 570px; }
  body[data-page=home] .pg-mission-card {
    grid-template-columns: 65px minmax(0, 1fr) minmax(0, 1.1fr) 150px;
  }
}

@media (max-width: 900px) {
  body[data-page] .site-header .nav-wrap { min-height: 76px; }
  body[data-page] .site-header .nav-links {
    top: 100%;
  }
}

@media (max-width: 800px) {
  :root { --aip-reading: 1rem; }
  body[data-page] .path-branch-map { height: 760px; }
  body[data-page] .path-route-node { width: min(205px, 40%); }
  body[data-page] .path-skill-node { width: 31%; }
  body[data-page] .path-skill-universe { height: 600px; }
  body[data-page] .journey-disclosure { flex-wrap: wrap; }
  body[data-page] .journey-disclosure p { max-width: none; }
  body[data-page=home] .pg-mission-card {
    grid-template-columns: 65px minmax(0, 1fr) 150px;
  }
  body[data-page] :is(.business-interest-form, .business-price, .business-team-program > div) { min-width: 0; }
}

@media (max-width: 640px) {
  body[data-page] .site-header .nav-wrap { min-height: 72px; }
  body[data-page] .site-header .nav-links {
    top: 100%;
  }
  body[data-page] .site-header .nav-wrap { gap: 12px; }
  body[data-page] .site-header .nav-end { gap: 5px; }
  body[data-page] .footer-bottom { flex-wrap: wrap; }
}

@media (max-width: 540px) {
  html { scroll-padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  body[data-page=home] { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  body[data-page] .journey-hero .pg-hero-copy .lede { font-size: 1.0625rem; }
  body[data-page] .journey-hero .pg-hero-visual .hero-art {
    height: auto;
    min-height: 0;
    padding-top: 335px;
    display: block;
  }
  body[data-page] .journey-frictions {
    position: relative;
    inset: auto;
    width: 100%;
    display: grid;
    gap: 10px;
  }
  body[data-page] .business-hero .journey-friction {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 78px;
    padding: 14px;
  }
  body[data-page] .journey-input {
    letter-spacing: .06em;
    width: 100%;
    justify-content: center;
  }
  body[data-page] .journey-hero .sculpture-readout {
    letter-spacing: .03em;
    max-width: 100%;
  }
  body[data-page] .journey-sculpture-footer { padding-top: 18px; }
  body[data-page] .journey-view-controls { width: 100%; }
  body[data-page] .journey-view-controls .journey-view-button { flex: 1 1 auto; }
  body[data-page] .journey-view-controls .journey-view-button[data-reset-view] { flex-basis: 100%; }
  body[data-page] .business-hero-promise { align-items: flex-start; }
  body[data-page] .business-hero-promise strong { font-size: 1rem; line-height: 1.6; }
  body[data-page] .journey-departure li { font-size: var(--aip-label); }
  body[data-page] .path-branch-map { height: 920px; }
  body[data-page] .path-route-node {
    width: 44%;
    padding: 22px 10px 16px;
    min-height: 165px;
  }
  body[data-page] .path-route-node > strong {
    font-size: var(--aip-support);
    letter-spacing: 0;
  }
  body[data-page] .path-route-node > span:last-child { font-size: var(--aip-label); }
  body[data-page] .path-skill-node { width: 32%; gap: 12px; padding-inline: 1px; }
  body[data-page] .path-skill-node strong {
    font-size: var(--aip-label);
    padding: 4px 2px;
  }
  body[data-page] .path-skill-orb { width: 46px; height: 46px; }
  body[data-page] .path-mobile-dock { min-height: 72px; }
  body[data-page] .path-mobile-dock > a,
  body[data-page] .path-mobile-dock > button {
    font-size: var(--aip-meta);
    line-height: 1.4;
    min-width: 0;
    min-height: 52px;
    padding: 8px 2px;
    overflow-wrap: anywhere;
  }
  body[data-page=home] .pg-mission-card { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body[data-page=home] .pg-mission-card > .pg-mission-card-top {
    grid-column: 1;
    grid-row: 1;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 0;
  }
  body[data-page=home] .pg-mission-card-top .pg-tag {
    max-width: none;
    overflow-wrap: normal;
  }
  body[data-page=home] .pg-mission-card > .pg-kicker { grid-column: 1; grid-row: 2; }
  body[data-page=home] .pg-mission-card > h4 { grid-column: 1; grid-row: 3; }
  body[data-page=home] .pg-mission-card > p { grid-column: 1; grid-row: 4; }
  body[data-page=home] .pg-mission-card > .pg-mission-reward { grid-column: 1; grid-row: 5; }
  body[data-page=home] .pg-mission-card > .pg-mission-card-bottom {
    grid-column: 1;
    grid-row: 6;
    flex-wrap: wrap;
  }
  body[data-page=home] .pg-mission-card .pg-mission-card-bottom .pg-button { flex: 1 1 180px; }
  body[data-page] .pw-process-comparison { gap: 16px; }
  body[data-page] .pw-process-step { gap: 8px; }
  body[data-page] .pw-process-step strong { overflow-wrap: anywhere; }
  body[data-page] .pw-process-result .pw-actions { display: flex; flex-wrap: wrap; }
  body[data-page] .pw-process-result .pw-button { flex: 1 1 100%; }
  body[data-page] .pw-route-tab { flex-basis: calc(50% - 8px); }
  body[data-page] .pw-architecture-step { min-width: 0; }
  body[data-page] .path-publication-kicker { flex-wrap: wrap; gap: 6px 12px; }
  body[data-page] .path-publication-edition { letter-spacing: .06em; }
  body[data-page] .path-publication-cover-open { opacity: 1; transform: none; min-height: 44px; }
}

@media (max-width: 380px) {
  body[data-page] .site-header .brand-lockup { width: 150px; }
  body[data-page] .site-header .language { gap: 2px; }
  body[data-page] .site-header .language a { min-width: 40px; }
  body[data-page] .path-branch-map { height: 1000px; }
  body[data-page] .pw-process-comparison { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (min-width: 1101px) {
  body[data-page] .journey-hero .pg-hero-visual .hero-art { min-height: 32em; }
}

/* Text expansion: let content determine height without widening the page.
 * These safeguards also accommodate longer translations and user spacing.
 * Column proportions and the normal type scale remain unchanged.
 */
body[data-page] :is(
  .business-planner-form, .business-intent-options, .business-problem-options,
  .business-context-options, .business-planner-submit,
  .path-process-intro, .path-conviction, .path-process-workbench,
  .process-lab, .pw-process-layout, .pw-process-controls, .pw-process-result,
  .pw-process-comparison, .pw-process-column, .pw-process-metrics,
  .path-training-format, .business-training-grid, .business-brief-grid,
  .business-team-program, .community-credits, .path-resource-row,
  .pw-architecture-body, .pw-architecture-track, .pw-architecture-detail,
  .pg-workspace-heading, .pg-passport, .pg-passport-top, .pg-passport-stats,
  .path-publication-feature, .path-publication, .path-publication-copy,
  .footer-top, .footer-links, .footer-bottom
) {
  min-width: 0;
  overflow-wrap: anywhere;
}
body[data-page] :is(
  .business-planner-form, .business-intent-options, .business-problem-options,
  .business-context-options, .business-planner-submit,
  .path-process-intro, .path-conviction, .pw-process-layout,
  .pw-process-comparison, .pw-process-metrics, .pw-toggle,
  .path-training-format, .business-training-grid, .business-brief-grid,
  .business-team-program, .community-credits, .path-resource-row,
  .pw-architecture-body, .pw-architecture-track, .pw-architecture-detail,
  .pg-workspace-heading, .pg-passport-top, .pg-passport-stats,
  .path-publication-feature, .path-publication,
  .footer-top, .footer-links, .footer-bottom
) > * { min-width: 0; }

body[data-page] :is(.business-planner, .pw-process-controls, .pw-scenarios) fieldset {
  min-inline-size: 0;
  max-inline-size: 100%;
}
body[data-page] :is(.business-planner, .pw-process-controls, .pw-scenarios) legend {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
body[data-page] .business-primary { max-width: 100%; }
body[data-page] .business-price { grid-template-columns: minmax(0, 1fr); }
body[data-page] .business-price strong { white-space: normal; overflow-wrap: anywhere; }
body[data-page] :is(.business-price, .community-description) > * {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body[data-page] .business-route-cta .wrap > div,
body[data-page] .business-route-cta a {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body[data-page] :is(.business-intent-options, .business-context-options, .business-problem-options) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body[data-page] .path-process-intro {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
body[data-page] .path-conviction { flex-wrap: wrap; }
body[data-page] .path-conviction blockquote {
  flex: 1 1 8em;
  min-width: 0;
  max-width: 100%;
}
body[data-page] .path-console-header > :is(b, span) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body[data-page] .pw-process-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
}
body[data-page] :is(.pw-process-comparison, .pw-process-metrics, .footer-links) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body[data-page] .pw-process-number {
  width: max(28px, 1.6em);
  height: max(28px, 1.6em);
}
body[data-page] .pw-step-timing { overflow-wrap: anywhere; }
body[data-page] .pw-architecture-body {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
}
body[data-page] .business-team-program {
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
}
body[data-page] .business-team-program > a {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}
body[data-page] .path-resource-row {
  grid-template-columns: 45px minmax(0, 1fr) minmax(0, 1.25fr) 32px;
}
body[data-page] :is(.path-route-node, .journey-friction) {
  overflow-wrap: anywhere;
}
body[data-page] .path-route-node > span:last-child {
  align-self: stretch;
  min-width: 0;
  max-width: 100%;
}
body[data-page] :is(.path-route-entry, .path-route-exit) {
  width: max-content;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
body[data-page] .journey-hero h1 em { white-space: normal; }
body[data-page] .journey-next-stage > a strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
body[data-page] .journey-departure :is(ol, li) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body[data-page] :is(.pg-workspace-heading, .pg-passport-top, .pg-passport-stats, .footer-top, .footer-bottom > div) {
  flex-wrap: wrap;
}
body[data-page] .pg-passport { max-width: 100%; }
body[data-page] .pg-mode-tabs button {
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
body[data-page] :is(.footer-contact .email, .footer-bottom a) {
  max-width: 100%;
  overflow-wrap: anywhere;
}
body[data-page] .footer-brand .brand { max-width: 100%; }
body[data-page] .footer-brand .brand-lockup { max-width: 100%; }

@media (max-width: 1050px) {
  body[data-page] .path-process-intro { grid-template-columns: minmax(0, 1fr); }
  body[data-page] .pw-process-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }
  body[data-page] .pw-architecture-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  }
  body[data-page] .path-resource-row {
    grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1.3fr) 25px;
  }
}

@media (max-width: 800px) {
  body[data-page] :is(.pw-process-layout, .pw-architecture-body, .business-training-grid, .business-brief-grid) {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-page] :is(.pw-process-controls fieldset, .pw-architecture-track) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body[data-page] .path-resource-row {
    grid-template-columns: 40px minmax(0, 1fr) 25px;
  }
}

@media (max-width: 640px) {
  body[data-page] .community-credits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  body[data-page] :is(.business-intent-options, .business-context-options, .business-team-program) {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-page] .business-intent-options button {
    grid-template-columns: minmax(22px, max-content) minmax(0, 1fr);
  }
  body[data-page] .business-problem-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-page] .path-training-format {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  body[data-page] .path-resource-row {
    grid-template-columns: 35px minmax(0, 1fr) 22px;
  }
  body[data-page] .path-route-exit { max-width: 78%; }
  body[data-page] .journey-departure ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  body[data-page] .pw-process-comparison { grid-template-columns: minmax(0, 1fr); }
}
