/* V38: additive responsive layout and viewport-aware tour controller. */
#app, #app > .wrap {min-width:0;max-width:100%;box-sizing:border-box}
#app .v38-table-scroll {max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
#app .v38-table-scroll:focus-visible {outline:2px solid #5fe1ff;outline-offset:3px}
.tour-active {padding-bottom:var(--v38-tour-space,64px)}
.tour-box.tour-v38 {position:fixed;inset:auto max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) auto;z-index:9999;width:min(360px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:min(420px,48vh);max-height:min(420px,48dvh);padding:10px;border:1px solid #61d9eeaa;border-radius:12px;box-shadow:0 6px 30px #000b;background:#061625f5;overflow:auto;box-sizing:border-box;overscroll-behavior:contain;scrollbar-width:thin;font-size:12px;line-height:1.35;color:#e9faff}
.tour-v38[hidden] {display:none!important}
.tour-v38 header {cursor:default;touch-action:auto;display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;flex-wrap:wrap}
.tour-v38 header b {font-size:11px;letter-spacing:.07em;color:#a8effc;min-width:0}
.tour-v38 [data-count] {font-size:10px;color:#fff;letter-spacing:0;margin-left:5px;white-space:nowrap}
.tour-v38 .tour-header-actions {display:flex;gap:5px;align-items:center}
.tour-v38 button,.tour-v38 select {font:inherit;color:#e6f7ff;min-height:36px;border-radius:6px;max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
.tour-v38 button {background:#122a3d;border-color:#39677e;padding:6px 10px;touch-action:manipulation}
.tour-v38 button:focus-visible,.tour-v38 select:focus-visible {outline:2px solid #79ecff;outline-offset:2px}
.tour-v38 button:disabled {opacity:.4;cursor:default}
.tour-v38 [data-act=play] {background:#164451;border-color:#58c8d8;font-weight:700;flex:1}
.tour-v38 [data-act=compact] {min-width:36px;font-size:17px;font-weight:bold}
.tour-v38 .tour-restore {display:none}
.tour-v38 .tour-details {display:grid;gap:3px;min-width:0;margin:3px 0 8px}
.tour-v38 .tour-details h3 {font-size:15px;line-height:1.25;margin:3px 0;overflow-wrap:anywhere}
.tour-v38 .tour-details p {font-size:12px;line-height:1.4;margin:0;overflow-wrap:anywhere}
.tour-v38 [data-tour-wait] {font-size:9px;min-height:0;color:#71f4af}
.tour-v38 progress {display:block;width:100%;height:6px;accent-color:#5fe1ff}
.tour-v38 nav {display:flex;position:static;flex-direction:row;align-items:center;justify-content:stretch;gap:6px;flex-wrap:nowrap;background:transparent;padding:0;margin:0;border:0;min-width:0}
.tour-v38 nav button {flex-shrink:0;min-width:36px}
.tour-v38 .tour-extra {display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;margin-top:10px;padding-top:10px;border-top:1px solid #34546a}
.tour-v38 .tour-extra-buttons {grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.tour-v38 .tour-extra label {display:flex;flex-direction:column;min-width:0;font-size:11px;color:#bfd2e3}
.tour-v38 .tour-extra label:first-of-type {grid-column:1/-1}
.tour-v38 .tour-extra select {width:100%;margin:3px 0 0;padding:5px}
.tour-v38 [data-compact-title] {display:none}
.tour-v38[data-mode=bar] .tour-extra,.tour-v38[data-mode=bar] .tour-details {display:none}
.tour-v38[data-mode=bar] [data-compact-title] {display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;color:#d8f2ff;margin:3px 0 5px}
.tour-v38[data-mode=icon] {width:44px;height:44px;max-width:44px;max-height:44px;padding:0;border-radius:50%;overflow:hidden;box-shadow:0 2px 16px #0009}
.tour-v38[data-mode=icon] > :not(.tour-restore) {display:none!important}
.tour-v38[data-mode=icon] .tour-restore {display:grid;place-items:center;width:42px;height:42px;padding:0;border:0;border-radius:50%;background:#123443;font-size:17px;color:#a2f2ff}
.tour-v38[data-mode=icon] .tour-restore:focus-visible {outline-offset:-4px}
.tour-active .topbar {z-index:100}
@media(max-width:1180px) and (min-width:901px) {
 .topbar {gap:10px;padding-inline:15px}
 .topbar .nav-lanes {min-width:0;flex:1}
 .topbar .nav-lanes .top-link,.topbar .nav-group>summary {padding:8px 5px;font-size:11px}
 .topbar .nav-cta {display:inline-flex;font-size:11px;padding:9px}
}
@media(max-width:900px) {
 .topbar {padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));gap:9px;height:64px;min-width:0}
 .topbar .brand {font-size:clamp(14px,3.8vw,19px);gap:6px;letter-spacing:.06em}
 .topbar .brand img {width:32px;height:32px;flex-shrink:0}
 .topbar .brand-caption {display:none}
 .topbar #menu {display:grid;place-items:center;flex-shrink:0;min-width:44px;min-height:44px;padding:6px;margin-left:auto}
 .topbar .nav-cta {display:inline-flex;align-items:center;justify-content:center;gap:3px;min-height:44px;max-width:110px;padding:8px 9px;font-size:11px;white-space:nowrap;flex-shrink:0}
 .topbar .nav-cta span {margin-left:0}
 .topbar .nav-lanes {top:64px;max-height:calc(100vh - 64px);max-height:calc(100dvh - 64px);padding:10px 16px 20px}
 .topbar .nav-menu {min-width:0;width:100%}
 .topbar .nav-lanes a,.topbar .nav-lanes summary {white-space:normal;overflow-wrap:anywhere;min-height:40px}
 #app .wrap.v4-wrap {padding-inline:clamp(12px,3vw,24px);padding-bottom:44px;min-width:0;width:100%}
 #app :where(section,article,aside,figure,fieldset,details,summary,form,div) {min-width:0}
 #app :where(p,h1,h2,h3,h4,h5,li,a,span,b,strong,small,label,summary,button,td,th,code),.v4-footer :where(p,a,span,b,small) {overflow-wrap:anywhere;word-break:normal}
 #app :where(img,video,canvas,iframe) {max-width:100%}
 #app :where(input,textarea,select,button) {max-width:100%;box-sizing:border-box}
 #app :where(.btn,button,a.btn) {white-space:normal}
 #app :where(pre) {max-width:100%;overflow-x:auto;white-space:pre;overflow-wrap:normal}
 #app .v38-table-scroll {border-radius:4px}
 #app .v38-table-scroll table {width:100%;min-width:max-content}
 #app .v38-table-scroll td,#app .v38-table-scroll th {max-width:260px;white-space:normal}
 #app .a30-tablewrap,#app .table-scroll {max-width:100%;overflow-x:auto}
 #app .cards,#app .control-showcase,#app .explainer,#app .gallery,#app .lab-details,#app .lab-two {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .cards>.card,#app .model-card {height:auto;min-height:0;max-width:100%;padding:clamp(16px,3vw,25px);overflow-wrap:anywhere}
 #app .model-toolbar,#app .cap-toolbar {flex-wrap:wrap;gap:10px}
 #app .model-toolbar input,#app .model-toolbar select,#app .cap-toolbar input,#app .cap-toolbar select {min-width:0;max-width:100%;flex:1 1 160px}
 #app .v25-demos,#app .v18-page,#app .ai30,#app .ap31,#app .meet-page,#app .a37-public-origin {max-width:100%;min-width:0}
 #app .v25-hero,#app .gn-hero,#app .sf-hero,#app .v18-hero,#app .titan-secondary,#app .titan-investor,#app .v19-growth-stage,#app .v20-choice-shell {grid-template-columns:minmax(0,1fr)}
 #app .v19-route-picker {grid-column:auto;grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .v25-demos .v27-screen-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #app .v25-screen-preview,#app .v27-screen-preview {max-width:100%;width:100%}
 #app .v25-demos .v27-screen-text {min-width:0;overflow-wrap:anywhere}
 #app .v25-video-grid,#app .v25-area-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .v8-demo-tabs,#app .gn-stage-nav,#app .v8-snapshot-line,#app .process-ribbon,#app .status-track,#app .v9-thumbnail-strip,#app .v8-svg-scroll {max-width:100%;min-width:0;overscroll-behavior-x:contain}
 #app .v8-demo-info {min-width:0}
 #app .v18-event-detail,#app .v18-demos,#app .v18-test-layout,#app .v21-public-contact {grid-template-columns:minmax(0,1fr)}
 #app .v18-project-list {min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .v18-test-menu button,#app .v18-project-list button {min-width:0;white-space:normal}
 #app .v16-model-tables {grid-template-columns:minmax(0,1fr)}
 #app .request-layout,#app .portal-shell {grid-template-columns:minmax(0,1fr)}
 #app .request-form {grid-template-columns:minmax(0,1fr)}
 #app .portal-main {min-width:0;padding:clamp(12px,3vw,24px)}
 #app .cap-list-layout {grid-template-columns:minmax(0,1fr)}
 #app .cap-list {max-width:100%;overflow:auto}
 #app .v20-pick {min-width:0;white-space:normal}
 #app .v20-stage-heading {flex-wrap:wrap}
 #app .a37-story {max-width:100%}
 .v4-footer {padding-inline:clamp(12px,3vw,24px)}
 .v4-footer .footer-main {gap:20px;grid-template-columns:repeat(2,minmax(0,1fr))}
 .v4-footer .footer-main>div:first-child {grid-column:1/-1}
 .v4-footer .footer-bottom {flex-wrap:wrap;gap:10px}
}
@media(max-width:760px) {
 .tour-box.tour-v38 {inset:auto max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));width:auto;max-width:none;max-height:44vh;max-height:44dvh;padding:8px;border-radius:10px}
 .tour-v38 header {gap:4px}
 .tour-v38 button,.tour-v38 select {min-height:40px;padding:5px 9px}
 .tour-v38 nav button {min-width:42px}
 .tour-v38[data-mode=bar] {max-height:none;padding:6px 8px}
 .tour-v38[data-mode=bar] button {min-height:36px}
 .tour-v38[data-mode=bar] [data-compact-title] {margin:1px 0 4px}
 .tour-v38[data-mode=icon] {left:auto;right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));padding:0;border-radius:50%}
 .tour-v38[data-mode=icon] .tour-restore {min-height:42px}
 #app :where(h1) {font-size:clamp(30px,9vw,48px);line-height:1.1;letter-spacing:-.04em}
 #app :where(h2) {font-size:clamp(24px,6.8vw,36px);line-height:1.16}
 #app .cards,#app .model-grid,#app .control-showcase,#app .explainer,#app .gallery,#app .lab-details,#app .lab-two,#app .meet-scene,#app .meet-next>div,#app .feature-split,#app .home-story,#app .home-contrast {grid-template-columns:minmax(0,1fr)}
 #app .card {padding:18px;min-height:0}
 #app .card h3 {font-size:19px;line-height:1.3}
 #app .card p {font-size:14px;line-height:1.65}
 #app .panel,#app .v4-panel,#app .a30-panel {padding:clamp(14px,3.5vw,22px);min-width:0}
 #app .v4-page-head,#app .page-top,#app .lab-hero,#app .v8-action-head,#app .v8-metrics-hero {padding-top:34px;padding-bottom:24px}
 #app .meet-scene {padding:12px;gap:15px;margin:16px 0;scroll-margin-top:74px}
 #app .meet-copy h2 {font-size:clamp(25px,7vw,34px)}
 #app .meet-copy p {font-size:15px}
 #app .meet-visual {padding:8px;max-width:100%;min-width:0}
 #app .meet-library {padding:7px}
 #app .meet-library-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
 #app .meet-slot {min-height:51px;padding:4px;gap:3px}
 #app .meet-slot b {font-size:clamp(8px,2.35vw,11px);line-height:1.2}
 #app .meet-slot small {font-size:7px;line-height:1.15}
 #app .meet-machine-zone {height:clamp(118px,37vw,160px)}
 #app .meet-library-foot {font-size:10px;line-height:1.3}
 #app .meet-library-head>div>span,#app .meet-library-head small {font-size:8px}
 #app .meet-library-head b {font-size:13px}
 #app .meet-library-head>strong {font-size:15px}
 #app .meet-fields {flex-wrap:wrap}
 #app .meet-fields label {min-width:0;flex:1 1 95px}
 #app .v25-hero,#app .v18-block,#app .v20-story-stage,#app .v19-growth-hero,#app .v19-growth-stage {padding:14px;min-width:0}
 #app .v25-hero {border-radius:12px}
 #app .v25-area-grid,#app .v25-video-grid,#app .v18-proof-levels,#app .v19-step-grid,#app .v20-customer-grid,#app .v20-benefit-ribbon,#app .v20-action-benefits,#app .sf-pillars,#app .a37-cards,#app .a37-public-origin .a37-cards,#app .a37-resources {grid-template-columns:minmax(0,1fr)}
 #app .v8-report-scene {grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);padding:8px;gap:3px}
 #app .v8-report-source {min-width:0;padding:9px}
 #app .v8-sticky-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 #app .v8-sticky-grid article {padding:7px;min-width:0}
 #app .v8-demo-main {grid-template-columns:minmax(0,1fr)}
 #app .v8-demo-info {padding:14px;gap:14px}
 #app .v8-demo-art,#app .v8-image-scene,#app .v8-video-scene,#app .v8-report-scene,#app .v8-code-scene,#app .v8-network-scene {min-height:clamp(270px,82vw,360px);max-width:100%}
 #app .v8-ide {width:94%;max-width:100%;min-width:0}
 #app .v8-ide-body {grid-template-columns:minmax(0,32%) minmax(0,68%)}
 #app .gn-world {height:clamp(410px,105vw,510px)}
 #app .gn-core {width:112px;height:155px;top:24%}
 #app .gn-core-brand {font-size:17px;padding-top:13px}
 #app .gn-rack-unit {height:11px}
 #app .gn-core-halo {width:132px}
 #app .gn-device {height:54px;min-width:0;padding:5px;gap:4px}
 #app .gn-device-icon {width:20px;flex-basis:20px}
 #app .gn-device-copy strong {font-size:9px;line-height:1.15}
 #app .gn-device-copy small {font-size:8px;line-height:1.1;margin-top:3px}
 #app .gn-device-desktop,#app .gn-device-storage {top:53%!important}
 #app .gn-device-laptop,#app .gn-device-mobile {top:68%!important}
 #app .gn-device-terminal,#app .gn-device-tablet {top:83%!important}
 #app .gn-flow-label {font-size:7px;max-width:90%;bottom:3px}
 #app .gn-world-caption {top:45%}
 #app .gn-theater-controls,#app .gn-theater-toolbar,#app .gn-playback {height:auto;min-height:36px;flex-wrap:wrap;gap:6px}
 #app .gn-theater-toolbar {padding:8px 10px}
 #app .gn-story {padding:16px;gap:10px}
 #app .gn-feature-strip {grid-template-columns:minmax(0,1fr)}
 #app .sf-map-section,#app .sf-path-section,#app .sf-pillar-section {padding-inline:8px}
 #app .sf-path-card,#app .sf-domain-detail {padding:12px}
 #app .sf-domain-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .sf-path-flow {flex-wrap:wrap;justify-content:center}
 #app .sf-path-node {min-width:0;flex:1 1 85px;overflow-wrap:anywhere}
 #app .v19-stage-art {min-height:285px}
 #app .v19-growth-bubbles {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .v19-growth-feature,#app .v19-result-panel {padding:12px}
 #app .v19-stage-orbit {max-width:90%}
 #app .v19-stage-orbit.b {width:260px;height:260px}
 #app .v20-stage-heading small {max-width:100%;text-align:left}
 #app .v18-observed-top {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .v18-events {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .v18-project-steps,#app .v18-result-grid,#app .v18-test-panel ul {grid-template-columns:minmax(0,1fr)}
 #app .v8-focus-grid,#app .v8-week-grid,#app .v8-event-grid,#app .v16-both,#app .v17-model-breakdown,#app .v9-money-grid,#app .v9-investor-point-grid,#app .portal-stats,#app .a30-split {grid-template-columns:minmax(0,1fr)}
 #app .v8-home-dataset,#app .v8-mini-kpis,#app .stat-grid,#app .evidence-stats,#app .v16-compact-numbers,#app .v24-update-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .v8-kpi,#app .stat,#app .evidence-stats article,#app .v24-update-grid article {padding:12px;min-width:0;overflow-wrap:anywhere}
 #app .v8-kpi-main strong,#app .stat strong {font-size:clamp(18px,5.7vw,27px)}
 #app .v25-selected-top,#app .v18-event-head,#app .v16-cardtop,#app .v24-update-head {flex-wrap:wrap;align-items:flex-start}
 #app .v25-selected-count {min-width:0;max-width:100%}
 #app .v8-panelhead {flex-wrap:wrap}
 #app .model-toolbar input,#app .model-toolbar select,#app .cap-toolbar input,#app .cap-toolbar select {width:100%;flex-basis:100%}
 #app .v25-demos .v27-screen-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 #app .v25-demos .v27-screen-text strong {font-size:12px!important}
 #app .v25-demos .v27-screen-text>span {font-size:11px!important;line-height:1.4}
 #app .v25-dialog,#app .v25-dialog-content {max-width:100%;min-width:0}
 #app .benchmark-row {grid-template-columns:minmax(0,1fr) minmax(60px,1fr) 52px;gap:6px}
 #app .comparison-demo>div {grid-template-columns:minmax(0,1fr) minmax(50px,1fr) 48px;gap:5px}
 #app .v17-progress-numbers {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .v16-delta {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .v16-delta>span {grid-column:1/-1}
 #app .a30-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .ap31 .ap31-pipeline {grid-template-columns:minmax(0,1fr)}
 .v4-footer .footer-main {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:380px) {
 .topbar .nav-cta {padding:6px;max-width:90px;font-size:10px}
 .topbar .brand {font-size:14px}
 #app .wrap.v4-wrap {padding-inline:10px}
 #app .meet-scene {padding:9px}
 #app .meet-slot {min-height:50px;padding:3px}
 #app .meet-slot b {font-size:8px}
 #app .v25-demos .v27-screen-grid {grid-template-columns:minmax(0,1fr)!important}
 #app .v25-demos .v27-screen-preview {height:auto!important;max-height:none!important;aspect-ratio:16/9}
 #app .v18-project-list,#app .v18-test-menu {grid-template-columns:minmax(0,1fr)}
 #app .sf-domain-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .v8-home-dataset,#app .evidence-stats,#app .portal-stats {grid-template-columns:minmax(0,1fr)}
 #app .gn-device-copy small {font-size:7px}
 #app .gn-device-icon {width:17px;flex-basis:17px}
 #app .a30-grid {grid-template-columns:minmax(0,1fr)}
}
@media(max-height:520px) and (orientation:landscape) {
 .tour-box.tour-v38 {max-height:46vh;max-height:46dvh}
 .tour-v38[data-mode=bar] {max-height:none;width:min(340px,calc(100% - 16px));left:auto}
 .tour-v38[data-mode=icon] {width:44px;height:44px}
 .topbar {height:54px}
 .topbar .nav-lanes {top:54px;max-height:calc(100dvh - 54px)}
}
@media(prefers-reduced-motion:reduce) {
 .tour-v38,.tour-v38 * {transition:none!important;animation:none!important}
}
/* Preserve deliberate local horizontal rails and exact minimized hit area. */
.tour-box.tour-v38[data-mode=icon] {width:44px;height:44px;max-width:44px;max-height:44px;left:auto;padding:0}
@media(max-width:760px) {
 #app .v8-timeline-point {flex:0 0 190px;min-width:190px}
 #app .v8-demo-tabs .v8-demo-tab {flex:0 0 150px;min-width:150px}
 #app .gn-step-button {flex:0 0 118px;min-width:118px}
 #app .process-ribbon>div {flex:0 0 105px;min-width:105px}
 #app .status-track span {flex:0 0 100px;min-width:100px}
}
@media(max-width:760px) {
 #app .gn-world .gn-device {width:calc(50% - 20px)!important;min-width:0;max-width:none;bottom:auto!important}
 #app .gn-device-desktop,#app .gn-device-laptop,#app .gn-device-terminal {left:8px!important;right:auto!important}
 #app .gn-device-storage,#app .gn-device-mobile,#app .gn-device-tablet {right:8px!important;left:auto!important}
 #app .gn-wires {display:none}
}
