/* Mobile refinement of the existing Blueprint design. */
:root { --header-offset: 82px; }
[id] { scroll-margin-top: var(--header-offset); }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #5979ff;
  outline-offset: 4px;
}
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 300; padding: 12px 20px; background: #fff; color: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.mobile-menu { display: none; }
.mobile-demo-note { display: none; }
.product-explorer[hidden], .hero-dataflow[hidden], .product-explorer__panel[hidden] { display: none; }
.mc-cards { display: none; }
.foot-links { flex-wrap: wrap; }
.mobile-menu__panel a { min-height: 48px; }
.demo-dialog { min-height: 0; }
.demo__thread { min-height: 0; overscroll-behavior: contain; }
.demo__sugg, .demo__bar, .demo__top { flex-shrink: 0; }
.demo__send { flex-shrink: 0; }
.demo-modal__close { width: 44px; height: 44px; }
.demo-intro { padding-right: 70px; }
body.modal-open .cookie { visibility: hidden; }
.fld input, .fld select, .fld textarea { font-size: 1rem; min-height: 48px; }
.fld label, .fld .msg-err, .form-foot .fine { font-size: .875rem; }
.fld .req { color: #9bb0ff; }
.form-success { overflow-y: auto; }
.utility-page { --line: 1.5px solid var(--ink); --line-soft: 1px solid #d4dae6; }
.table-scroll { overflow-x: auto; max-width: 100%; margin-bottom: 22px; overscroll-behavior-x: contain; }
.table-scroll .tbl { margin-bottom: 0; }

@media (max-width: 1060px) {
  .bar { gap: 16px; }
  nav.top { gap: 16px; }
  nav.top > .langsw { display: none; }
  nav.top > .btn-login { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
  .mobile-menu { display: block; }
  .mobile-menu summary { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: var(--line); background: #fff; color: var(--ink); font: 600 .875rem var(--sans); cursor: pointer; list-style: none; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu__icon { width: 18px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
  .mobile-menu__icon::after { content: ''; position: absolute; left: 0; right: 0; top: 4px; border-top: 2px solid currentColor; }
  .mobile-menu[open] summary { background: var(--ink); color: #fff; }
  .mobile-menu[open] .mobile-menu__icon { border: 0; }
  .mobile-menu[open] .mobile-menu__icon::before, .mobile-menu[open] .mobile-menu__icon::after { content: ''; position: absolute; top: 5px; left: 0; width: 18px; border-top: 2px solid currentColor; transform: rotate(45deg); }
  .mobile-menu[open] .mobile-menu__icon::after { transform: rotate(-45deg); }
  .mobile-menu__panel { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-bottom: var(--line); box-shadow: 0 18px 30px #0e1b3326; padding: 16px max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
  .mobile-menu__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; max-width: var(--wrap); margin: auto; }
  .mobile-menu__links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: var(--line-soft); color: var(--ink); font-size: 1rem; }
  .mobile-menu__links a::after { content: '↗'; color: var(--acc); }
  .mobile-menu__links a:hover { color: var(--acc); }
  .mobile-menu__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; max-width: var(--wrap); margin: 20px auto 0; }
  .mobile-menu__actions .btn { width: auto; padding: 12px 18px; }
  .mobile-menu__actions .langsw { margin-left: auto; }
  .mobile-menu__actions .langsw a { display: grid; place-items: center; min-width: 44px; min-height: 44px; font-size: .875rem; }
  .mobile-menu__actions .langsw button { min-width: 44px; min-height: 44px; font-size: .875rem; }
  .utility-page nav.top > a:not(.btn-login) { display: none; }
  .utility-page nav.top .btn--solid { display: inline-flex; background: var(--acc); color: #fff; font-size: 1rem; text-decoration: none; }
  .utility-page nav.top { margin-left: auto; }
}

@media (max-width: 860px) {
  .mobile-demo-note { display: block; margin-top: 12px; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
  .product-explorer { border: var(--line); background: var(--bg); min-width: 0; }
  .product-explorer__heading { padding: 20px 20px 16px; }
  .product-explorer__heading > span { display: block; margin-bottom: 8px; font: 500 .75rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .product-explorer__heading h2 { font-size: 1.5rem; line-height: 1.2; text-wrap: initial; }
  .product-explorer__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: var(--line); }
  .product-explorer__tabs button { min-width: 0; min-height: 48px; padding: 10px 4px; border: 0; border-right: var(--line-soft); background: #fff; color: var(--ink); font: 600 .875rem/1.2 var(--sans); cursor: pointer; }
  .product-explorer__tabs button:last-child { border-right: 0; }
  .product-explorer__tabs button[aria-selected="true"] { background: var(--acc); color: #fff; }
  .product-explorer__tabs button:focus-visible { outline-offset: -4px; outline-color: var(--ink); }
  .product-explorer__tabs button[aria-selected="true"]:focus-visible { outline-color: #fff; }
  .product-explorer__panel { min-height: 300px; padding: 22px 20px 16px; display: flex; flex-direction: column; }
  .product-explorer__panel h3 { margin-bottom: 10px; font-size: 1.25rem; line-height: 1.3; letter-spacing: -.02em; }
  .product-explorer__panel p { font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
  .product-explorer__panel ul { display: grid; gap: 8px; margin: 18px 0 12px; padding: 0; list-style: none; }
  .product-explorer__panel li { display: flex; align-items: baseline; gap: 10px; font-size: .875rem; line-height: 1.5; }
  .product-explorer__panel li::before { content: '✓'; color: var(--acc); }
  .product-explorer__panel a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-top: auto; border-top: var(--line-soft); color: var(--acc); font-size: .875rem; font-weight: 600; }
  .tcard.is-collapsible h3 { margin-bottom: 0; }
  .trust-toggle { display: flex; align-items: center; gap: 12px; min-height: 48px; width: 100%; padding: 0; border: 0; text-align: left; background: transparent; color: inherit; font: inherit; cursor: pointer; }
  .trust-toggle::after { content: ''; flex: 0 0 16px; height: 16px; margin-left: auto; background: linear-gradient(#9bb0ff 0 0) center / 14px 2px no-repeat, linear-gradient(#9bb0ff 0 0) center / 2px 14px no-repeat; }
  .trust-toggle[aria-expanded="true"]::after { background: linear-gradient(#9bb0ff 0 0) center / 14px 2px no-repeat; }
  .tcard.is-collapsible p:not([hidden]) { margin-top: 14px; }
  .cdmobile { padding: 20px 16px; gap: 12px; }
  .cdmobile .mgroup { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cdmobile .mnode { min-width: 0; padding: 12px; gap: 6px; }
  .cdmobile .mnode .l { align-items: flex-start; gap: 8px; min-width: 0; }
  .cdmobile .mnode .l > span:last-child { min-width: 0; }
  .cdmobile .mnode .nm { font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere; }
  .cdmobile .mnode .sub { font-size: .75rem; letter-spacing: 0; line-height: 1.45; overflow-wrap: anywhere; }
  .cdmobile .mnode .stat { display: none; }
  .cdmobile > .mgroup:first-child .mnode { min-height: 64px; }
  .cdmobile > .mgroup:first-child .mnode .l { align-items: center; }
  .cdmobile > .mgroup:first-child .mnode .sub { display: none; }
  .cdmobile .smark { width: 24px; height: 24px; flex: 0 0 24px; }
  .cdmobile .mnode.hub { padding: 16px; align-items: center; text-align: center; gap: 4px; }
  .cdmobile .mnode.hub .nm { font-size: 1.125rem; }
  .cdmobile .mnode.hub .sub { font-size: .875rem; margin: 0; }
  .cdmobile .mnode.prod { padding: 16px; }
  .cdmobile .mnode.prod .sub { font-size: .875rem; line-height: 1.5; }
  .cdmobile a.mnode.prod:hover { border-color: #9bb0ff; background: #1b2e5c; }
  .cdmobile .marr { padding: 4px 0; font-size: .75rem; letter-spacing: 0; }
  /* Static examples stay readable without timers, clipping or nested scrolling. */
  #mchatThread, #mchat2Thread { height: auto; min-height: 0; overflow: visible; }
  .mchat__thread { padding: 16px; }
  .mchat__bar { flex-wrap: wrap; font-size: .75rem; gap: 8px; }
  .mc-row { gap: 8px; }
  .mc-row > .mc-av { display: none; }
  .mc-body { width: 100%; max-width: 100%; }
  .mc-bubble { font-size: 1rem; }
  .mc-tool { display: none; }
  .mc-answer { overflow: visible; padding: 0; }
  .mc-lead { font-size: 1rem; padding: 12px 0; }
  .mc-answer { border: 0; }
  .mc-tbl { display: none; }
  .mc-cards { display: grid; gap: 10px; }
  .mc-card { border: var(--line-soft); background: var(--bg); }
  .mc-card summary { position: relative; padding: 12px 32px 12px 12px; cursor: pointer; list-style: none; }
  .mc-card summary::-webkit-details-marker { display: none; }
  .mc-card summary::after { content: '+'; position: absolute; right: 12px; top: 20px; color: var(--acc); font-size: 1.25rem; }
  .mc-card[open] summary::after { content: '−'; }
  .mc-card__name { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); }
  .mc-card__preview { display: block; font-size: .875rem; color: var(--ink-2); margin-top: 4px; }
  .mc-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: var(--line-soft); padding: 12px; }
  .mc-card dt { font-size: .75rem; color: var(--ink-3); }
  .mc-card dd { font-size: .875rem; color: var(--ink); font-variant-numeric: tabular-nums; }
  .mc-rec__b { font-size: 1rem; }
  .mc-rec__src { font-size: .75rem; overflow-wrap: anywhere; }
  .mc-choice { flex-wrap: wrap; }
  .mc-btn { padding: 10px 12px; }
  .mc-in, .mc-out { animation: none; }
  .mchat__cap { flex-wrap: wrap; gap: 4px 12px; font-size: .875rem; }
  .js .reveal { opacity: 1; transform: none; transition: none; will-change: auto; }
  .srcline::after, .srcline .dot, .corebox, .flow-wire .wire { animation: none; }
  .flow-wire .pulse { display: none; }
}

@media (max-width: 640px) {
  :root { --header-offset: 80px; }
  .wrap { padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
  .bar { height: 64px; gap: 12px; }
  nav.top { gap: 12px; }
  nav.top > .btn-cta { display: none; }
  .brand { gap: 8px; }
  .hero { padding: 32px 0 44px; }
  .hero-grid { gap: 32px; }
  #hero-h { font-size: clamp(2rem, 8.3vw, 2.75rem); line-height: 1.08; text-wrap: balance; }
  #hero-h .hero-qualifier { display: block; margin-top: 16px; font-size: 1.25rem; line-height: 1.4; font-weight: 500; letter-spacing: -.015em; }
  .hero-copy .lead { margin-top: 18px !important; font-size: 1rem; line-height: 1.6; }
  .cta-row { margin-top: 24px; gap: 10px; }
  .btn { min-height: 48px; padding: 12px 18px; font-size: 1rem; text-align: center; }
  .hero .panel { padding: 16px; }
  .flowbox { gap: 8px; }
  .srcline { padding: 10px 12px; font-size: .875rem; }
  .flow-wire, .flow-wire svg { height: 32px; }
  .corebox { padding: 12px; }
  .corebox .sub { font-size: .75rem; letter-spacing: .04em; }
  section.blk, section.blk--tight { padding: 48px 0; }
  h2, .pillhd h2 { font-size: clamp(1.75rem, 7.2vw, 2.125rem); line-height: 1.13; text-wrap: balance; }
  h3 { font-size: 1.25rem; line-height: 1.3; }
  .sec-head, .pillhd { margin-bottom: 28px; }
  .sec-head p, .pillhd p, .prow2__text p, .prow2__text li, .srccard p, .principle p, .tcard p, .step p, .skrow li { font-size: 1rem; line-height: 1.6; }
  .pillhd__eyebrow { flex-wrap: wrap; gap: 4px 12px; font-size: .75rem; letter-spacing: .06em; margin-bottom: 14px; }
  .pillhd__eyebrow .pill-n { width: 100%; }
  .spec { font-size: .75rem; letter-spacing: .08em; }
  .srccard, .principle, .step, .tcard { padding: 22px 20px; }
  .srccard .tags span { font-size: .75rem; }
  .prow2 { margin-top: 36px; gap: 24px; }
  .agrid { gap: 28px; }
  #insights .agrid { margin-top: 40px !important; }
  .sec-cta { margin-top: 24px; }
  .sec-cta a { min-height: 44px; padding-block: 10px; font: 600 .875rem/1.5 var(--sans); text-transform: none; letter-spacing: 0; }
  .flowloop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; }
  .flowloop { max-width: none; aspect-ratio: auto; padding: 0; }
  .flowloop svg { display: none; }
  .flowloop .fchip, .flowloop .floopc { position: static; transform: none; }
  .flowloop .floopc { grid-column: 1 / -1; }
  .flowloop .fchip { padding: 12px 8px; text-align: center; font-size: .875rem; }
  .mail__line { flex-direction: column; gap: 4px; }
  .mail__line .l { width: auto; font-size: .75rem; }
  .mail__line .v { font-size: .875rem; line-height: 1.5; }
  .mail__hdr, .mail__meta { flex-wrap: wrap; }
  .sess__row, .qcard { overflow-wrap: anywhere; }
  .qcard__hd { flex-wrap: wrap; gap: 6px; font-size: .75rem; }
  .q__t { font-size: 1rem; }
  .q__src { font-size: .75rem; overflow-wrap: anywhere; }
  .chglog__row, .sess__metrics { gap: 8px; }
  .cmeta > div { flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
  .cmeta .lb { width: auto; font-size: .75rem; }
  .contact-grid { gap: 28px; }
  .form-card { padding: 20px 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .form-foot { gap: 16px; }
  .form-foot .fine { line-height: 1.5; color: var(--d-ink-2); }
  .form-success { padding: 24px; }
  .foot { gap: 16px; }
  .foot-links { width: 100%; margin-left: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; font-size: .875rem; }
  .foot-links a { display: flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
  .demo-modal { top: var(--demo-top, 0px); bottom: auto; height: var(--demo-height, 100dvh); }
  .demo-dialog { height: 100%; max-height: 100%; }
  .demo-intro { padding: max(16px, env(safe-area-inset-top)) 68px 12px 16px; }
  .demo-modal__close { top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); }
  .demo-wrap { padding: 0 10px max(10px, env(safe-area-inset-bottom)); }
  .demo__top { flex-wrap: wrap; font-size: .75rem; }
  .demo__thread { -webkit-overflow-scrolling: touch; }
  .msg .bub { font-size: 1rem; overflow-wrap: anywhere; }
  .msg .bub .prov { font-size: .75rem; }
  .demo__sugg { padding-top: 4px; scrollbar-width: thin; }
  .sugg { min-height: 44px; font: 500 .875rem var(--sans); }
  .demo__input { min-height: 52px; }
  .cookie { padding: 16px 20px max(16px, env(safe-area-inset-bottom)); max-height: 55dvh; overflow-y: auto; }
  .cookie__wrap { gap: 12px; }
  .cookie__txt { flex-basis: 100%; }
  .cookie__txt p { font-size: .875rem; line-height: 1.5; }
  .cookie__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cookie__btns button { min-height: 48px; padding: 10px 8px; font: 600 .875rem/1.3 var(--sans); }
  .cookie__btns .ck-deny { border-color: #7c89a6; }
  .art { padding-inline: 20px; }
  .art h1 { font-size: clamp(1.875rem, 7.7vw, 2.5rem); line-height: 1.15; }
  .art .lead { font-size: 1rem; }
  .art-meta, .crumb, .formula__k, .calc__hd { font-size: .75rem; }
  .calc__row input { font-size: 1rem; min-height: 48px; min-width: 0; }
  .calc__row label, .calc__note, .field .hint, .tile .tx { font-size: .875rem; }
  .calc__lbl { font-size: .75rem; }
  .table-scroll .tbl { min-width: 480px; }
  .table-scroll .tbl th { font-size: .75rem; }
  .art-cta { padding: 24px 20px; }
  .art-cta .btn-cta { white-space: normal; min-height: 48px; font-size: .875rem; }
  .utility-page .bar { padding: 10px 16px; }
  .utility-page section { padding: 36px 0; }
  .utility-page .hero { padding: 32px 0 20px; }
  .utility-page .hero + section { padding-top: 0; }
  .utility-page .grid2 { margin-top: 16px; }
  .utility-page .tools { grid-template-columns: minmax(0, 1fr); }
  .utility-page .tool .name { overflow-wrap: anywhere; }
  .utility-page .card { padding: 20px 16px; min-width: 0; }
  .utility-page p.lede, .utility-page .tool p, .utility-page .vs li { font-size: 1rem; }
  .utility-page .inwrap input { width: 100%; min-height: 48px; }
  .utility-page pre, .utility-page code { overflow-wrap: anywhere; white-space: pre-wrap; }
  .utility-page footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .utility-page footer nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: .875rem; }
}
@media (max-width: 360px) {
  .product-explorer__heading, .product-explorer__panel { padding-inline: 16px; }
  .product-explorer__panel { min-height: 324px; }
  .wrap { padding-inline: 16px; }
  .bar, nav.top { gap: 10px; }
  .brand .bx { width: 26px; height: 26px; }
  .mobile-menu summary { padding-inline: 10px; }
  .cdmobile { padding: 12px; }
  .cdmobile .mnode .l { flex-direction: column; }
  .cdmobile > .mgroup:first-child .mnode .l { align-items: flex-start; }
  .cdmobile .mnode.prod { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo-dialog, .demo-modal__backdrop { transition: none; }
}
