/* Responsive refinements shared by the hosted files and standalone preview. */
html {
  scroll-padding-top: calc(var(--header-height, 84px) + 16px);
  -webkit-text-size-adjust: 100%;
}

.section > *,
.feature-workspace > *,
.scenario-panel > *,
.strategy-panel > *,
.steps > *,
.apps > *,
.pricing-grid > *,
.pricing-calculator > * { min-width: 0; }

.hero-copy,
.section-heading,
.feature-detail,
.price-card,
.pricing-calculator,
.calc-breakdown,
.faq-list,
.access-apps { overflow-wrap: anywhere; }

.price-card li { display: block; position: relative; padding-left: 20px; }
.price-card li::before { position: absolute; left: 0; }
.live-dot { flex-shrink: 0; }
.feature-tab > div { min-width: 0; }
.feature-tab > b { flex-shrink: 0; }
.footer > div { flex-wrap: wrap; }
.help-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.help-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); }
.help-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.industry-guide-link { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.routing-section .section-heading > p { max-width: 370px; }
.routing-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.routing-modes article { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.routing-modes h3 { font-size: 23px; }
.routing-modes p { margin-top: 12px; color: var(--muted); font-size: 14px; }
.routing-modes p strong { color: var(--ink); }
.routing-modes .help-link { margin-top: 6px; font-size: 13px; }
.routing-strategy-heading { margin-top: 32px; margin-bottom: 12px; font-size: 21px; }
.integration-push { margin-top: 28px; padding-top: 22px; border-top: 1px solid #cdd9e8; }
.integration-push h3 { font-size: 21px; }
.integration-push p { max-width: 720px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.integration-section .help-link { font-size: 13px; }

dialog {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
html.product-dialog-open { overflow: hidden; }
.dialog-close { width: 44px; height: 44px; top: 8px; right: 8px; line-height: 1; }
dialog h2 { padding-right: 22px; }
.access-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Collapse navigation before the links and two product actions become crowded. */
@media (max-width: 1080px) {
  .header { height: 76px; gap: 20px; }
  .header .nav-actions { gap: 12px; }
  .header .button.small { min-height: 44px; }
  .header .menu-button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    padding: 0;
    margin-left: 0;
    border-radius: 7px;
  }
  .header .menu-button[aria-expanded="true"] { background: #edf3ff; color: var(--blue); }
  .header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-height, 76px) - 16px);
    max-height: calc(100dvh - var(--header-height, 76px) - 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: white;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px -20px #203e6f40;
    padding: 12px 28px;
    gap: 0;
  }
  .header nav.open { display: flex; flex-direction: column; }
  .header nav a { display: flex; align-items: center; min-height: 48px; }
}

@media (max-width: 900px) and (min-width: 761px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: 650px; }
  .showcase-stage { width: 100%; max-width: 620px; justify-self: center; }
  .hero-proof { flex-direction: row; flex-wrap: wrap; gap: 16px; }
}

@media (max-width: 760px) {
  .routing-modes { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .routing-modes article { padding: 20px; }
  .section { padding-inline: clamp(16px, 4.5vw, 22px); }
  .header { height: 68px; padding-inline: clamp(16px, 4.5vw, 22px); gap: 12px; }
  .header .button.small { font-size: 12px; padding-inline: 12px; }
  .header nav { padding-inline: max(16px, 4.5vw); }
  .button { min-height: 48px; }
  .hero { padding-top: 32px; gap: 32px; }
  .hero h1 { font-size: clamp(30px, 8.3vw, 40px); letter-spacing: -.04em; line-height: 1.35; }
  .eyebrow { font-size: 12px; line-height: 1.8; }
  .hero-description .desktop { display: none; }
  .hero-buttons { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .hero-buttons .button { justify-content: space-between; gap: 12px; font-size: 14px; padding-inline: 18px; }
  .hero-buttons .button > span:last-child { flex-shrink: 0; }
  .hero-buttons .text-link { justify-content: center; min-height: 44px; font-size: 13px; }
  .hero-proof { font-size: 11px; gap: 8px 16px; }
  .platform-badges span { font-size: 11px; }
  h2 { font-size: clamp(25px, 6.6vw, 30px); }
  .section-heading > p { font-size: 13px; }
  .kicker { letter-spacing: 1px; }
  .use-strip > div { display: flex; flex-wrap: wrap; align-items: center; }

  /* Let the execution view overlap the workspace's lower right corner. */
  .showcase-stage {
    --sc-mobile-phone-width: clamp(132px, 34vw, 144px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sc-mobile-phone-width);
    gap: 20px 16px;
    padding: 0;
    margin: 0;
  }
  .showcase-stage::before { inset: 0; }
  .sc-caption, .sc-workspace, .sc-footnote { grid-column: 1 / -1; min-width: 0; }
  .sc-caption { margin: 0; flex-wrap: wrap; gap: 6px 16px; font-size: 10px; }
  .sc-chrome { display: none; }
  .sc-toolbar { height: 56px; }
  .sc-tabs { gap: 0; justify-content: space-between; }
  .sc-tab { min-height: 44px; padding-block: 10px; font-size: 11px; }
  .sc-panel-heading { flex-wrap: wrap; gap: 6px 12px; }
  .sc-panel-heading > strong { font-size: 12px; }
  .sc-status { font-size: 9px; }
  .sc-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-block: 16px; }
  .sc-metrics > div + div { padding-left: 8px; }
  .sc-metrics small { font-size: 10px; }
  .sc-metrics b { font-size: clamp(22px, 6vw, 27px); }
  .sc-metrics b span { font-size: 10px; margin-left: 3px; }
  .sc-metric-note { display: none; }
  .sc-canvas { height: 220px; }
  .sc-person-one { left: 20%; }
  .sc-person-two { left: auto; right: 5%; }
  .sc-route-summary { max-width: calc(100% - 18px); }
  .sc-route-summary small { white-space: normal; }
  .sc-insight {
    height: auto;
    min-height: 80px;
    padding: 14px calc(var(--sc-mobile-phone-width) + 10px) 14px 0;
    gap: 10px;
  }
  .sc-insight-icon { display: none; }
  .sc-insight strong { font-size: 10px; }
  .sc-insight small { font-size: 9px; }
  .sc-sync {
    position: static;
    grid-column: 1;
    grid-row: 3;
    align-self: center;
    flex-direction: column;
    align-items: flex-start;
    width: auto;
    padding: 0;
    gap: 12px;
    border: 0;
    background: none;
    box-shadow: none;
    min-width: 0;
  }
  .sc-sync > span { width: 32px; height: 32px; }
  .sc-sync b { font-size: 13px; line-height: 1.7; }
  .sc-sync small { display: block; font-size: 11px; line-height: 1.9; }
  .sc-phone {
    position: relative;
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    align-self: start;
    display: flex;
    flex-direction: column;
    right: auto;
    bottom: auto;
    width: 100%;
    height: calc(var(--sc-mobile-phone-width) * 2.12);
    min-height: 0;
    max-width: 144px;
    padding: 20px 8px 10px;
    border-width: 3px;
    border-radius: 22px;
    margin-top: -108px;
    transform: rotate(1.5deg);
  }
  .sc-phone-app { flex-shrink: 0; gap: 4px; margin-bottom: 10px; }
  .sc-phone-app img { width: 14px; height: 14px; }
  .sc-phone-eyebrow { font-size: 7px; line-height: 1.3; }
  .sc-phone h3 { margin-top: 4px; font-size: 12px; line-height: 1.3; }
  .sc-phone-progress { flex-shrink: 0; margin: 10px 0 8px; padding-bottom: 8px; }
  .sc-phone-progress > div { line-height: 1.2; }
  .sc-phone-progress b { font-size: 15px; }
  .sc-phone-progress > i { height: 3px; margin-top: 6px; }
  .sc-phone .sc-stations { flex-shrink: 0; }
  .sc-phone .sc-stations li { gap: 6px; padding: 5px 0; }
  .sc-phone .sc-stations li > span { width: 16px; height: 16px; }
  .sc-phone .sc-stations li b { font-size: 7.5px; line-height: 1.3; }
  .sc-phone .sc-stations li small { margin-top: 2px; font-size: 6px; line-height: 1.3; }
  .sc-phone .sc-stations .sc-station-active { padding: 5px 4px; }
  .sc-phone-action { flex-shrink: 0; margin-top: auto; padding: 6px 7px; font-size: 7.5px; line-height: 1.3; }
  .sc-phone-action span { font-size: 10px; }
  .sc-phone-home { flex-shrink: 0; margin: 8px auto -4px; }
  .sc-footnote { position: static; flex-wrap: wrap; font-size: 9px; gap: 6px 12px; }

  /* A compact tab strip keeps the selected feature next to its content. */
  .feature-workspace { gap: 16px; }
  .feature-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    min-width: 0;
    padding: 4px 4px 12px;
    scroll-padding-inline: 4px;
    scrollbar-width: thin;
  }
  .feature-tab {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    gap: 0;
  }
  .feature-tab > span, .feature-tab > b, .feature-tab p { display: none; }
  .feature-tab h3 { font-size: 14px; letter-spacing: 0; white-space: nowrap; }
  .feature-tab.active { border-color: var(--blue); background: #f0f5ff; }
  .feature-detail { min-height: 0; padding: 24px 20px; }
  .feature-detail h3 { font-size: clamp(23px, 6vw, 27px); }
  .feature-detail > p, .feature-detail li { font-size: 13px; }
  .feature-detail li { position: relative; padding-left: 20px; }
  .feature-detail li::before { position: absolute; left: 0; margin: 0; }
  .detail-pill { max-width: 100%; font-size: 11px; }
  .strategy-tabs { gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strategy-tabs button { min-width: 0; min-height: 60px; padding-bottom: 14px; }
  .strategy-tabs strong { font-size: 17px; }
  .strategy-tabs span { line-height: 1.7; }
  .scenario-tabs { gap: 24px; padding-inline: 4px; scroll-padding-inline: 4px; }
  .scenario-tabs button { min-height: 48px; font-size: 14px; }
  .steps p, .app-comparison p { font-size: 13px; }

  .info-disclosure summary { width: 44px; height: 44px; }
  .info-disclosure > div { top: calc(100% + 8px); max-width: calc(100vw - 32px); }
  .accuracy-info summary, .price-detail summary { min-height: 44px; }
  .pricing-sync { margin-top: 0; gap: 8px 16px; }
  .pricing-sync button { min-height: 44px; }
  .price-card { padding: 26px 22px; }
  .price-card li { font-size: 13px; }
  .price { flex-wrap: wrap; }
  .price-card .button { min-height: 48px; }
  .comparison-table { min-width: 0; font-size: 12px; }
  .comparison-table th:first-child { width: 34%; }
  .comparison-table th, .comparison-table td { padding: 14px 6px; }
  .comparison-table thead th { white-space: nowrap; }
  .comparison-table td, .capability-detail small { font-size: 12px; line-height: 1.6; }
  .comparison-heading { align-items: flex-start; }
  .comparison-heading h3 { padding-top: 7px; }
  .pricing-calculator { gap: 20px; padding: 22px 18px; }
  .pricing-calculator p, .calc-breakdown, .price-detail { font-size: 12px; }
  .calc-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .calc-controls label { font-size: 12px; min-width: 0; }
  .calc-controls input, .calc-controls select { width: 100%; min-width: 0; height: 46px; font-size: 16px; }
  .calc-result { min-width: 0; }
  .calc-result > strong { font-size: 30px; line-height: 1.5; }
  .calc-result > span { line-height: 1.9; }
  .calc-result #calc-description { font-size: 12px; }
  .faq-list summary { min-height: 44px; font-size: 14px; gap: 16px; }
  .faq-list summary span { flex-shrink: 0; }
  .faq-list p { font-size: 13px; }
  .footer > div { gap: 16px 24px; }
  .footer > div a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer .footer-registration { min-height: 44px; padding-block: 10px; }

  dialog { padding: 28px 20px 20px; }
  dialog h2 { font-size: 23px; }
  .access-apps { gap: 16px; }
  .access-apps strong { font-size: 14px; }
  .access-actions .button { min-height: 48px; font-size: 13px; }
}

@media (max-width: 560px) {
  html { scroll-padding-top: calc(var(--header-height, 120px) + 16px); }
  .header {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    min-height: 120px;
    padding-block: 8px 12px;
    gap: 8px 16px;
  }
  .header > .brand { grid-column: 1; grid-row: 1; width: auto; min-height: 44px; }
  .header .nav-actions { display: contents; }
  .header .menu-button { grid-column: 2; grid-row: 1; justify-self: end; }
  .header .nav-actions > [data-access] { grid-column: 1; grid-row: 2; }
  .header .admin-entry { grid-column: 2; grid-row: 2; }
  .header .button.small { min-height: 44px; font-size: 13px; }
}

@media (max-width: 420px) {
  .calc-controls { grid-template-columns: 1fr; }
  .app-comparison { grid-template-columns: 1fr; }
  .app-comparison article { padding: 24px 0; }
  .app-comparison article + article { border-left: 0; border-top: 1px solid var(--line); }
  .app-comparison h3 { font-size: 22px; }
  .app-platform { font-size: 11px; padding-top: 16px; }
  .access-actions .button { font-size: 12px; }
}
