/* Scoped, static visual explanations. No animation or private project imagery. */
.project-insights-dialog {
  --pi-ink: #f0f6fa;
  --pi-muted: #b4c3cf;
  --pi-cyan: #6ef1f5;
  --pi-line: #3b6473;
  --pi-padding: clamp(20px, 4.3vw, 78px);
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: var(--pi-ink);
  background: #050b12;
  font: 400 17px/1.6 Outfit, Arial, sans-serif;
  isolation: isolate;
}
.project-insights-dialog:not([open]) { display: none; }
.project-insights-dialog[open] { display: flex; flex-direction: column; }
.project-insights-dialog::backdrop { background: #02060cf2; }
.project-insights-dialog *,
.project-insights-dialog *::before,
.project-insights-dialog *::after { box-sizing: border-box; }
.project-insights-dialog :is(h1, h2, h3, h4, p, figure) { margin: 0; }
.project-insights-dialog :is(h1, h2, h3, h4) { color: var(--pi-ink); }
.project-insights-dialog :is(button, a) { touch-action: manipulation; }
.project-insights-dialog :is(button, a):focus-visible { outline: 2px solid var(--pi-cyan); outline-offset: 4px; }
.project-insights-dialog :is(button, a) { -webkit-tap-highlight-color: transparent; }
.project-insights-dialog button { cursor: pointer; font: inherit; }
.pi-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 16px;
  min-height: 80px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(var(--pi-padding), env(safe-area-inset-right, 0px)) 12px max(var(--pi-padding), env(safe-area-inset-left, 0px));
  border-bottom: 1px solid #3e697b;
  background: #08121d;
  box-shadow: 0 1px 0 #0c2230, 0 10px 28px #0003;
  position: relative;
  z-index: 2;
}
.pi-topbar-label { display: flex; align-items: center; gap: 13px; min-width: 0; }
.pi-topbar-label > span { color: var(--pi-cyan); font-size: 22px; flex: 0 0 auto; }
.pi-topbar-label h2 { font-size: 16px; font-weight: 400; letter-spacing: .01em; line-height: 1.3; overflow-wrap: anywhere; }
.pi-close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
  min-width: 135px;
  min-height: 48px;
  padding: 8px 17px;
  border: 1px solid #74acb7;
  border-radius: 2px;
  background: #102332;
  color: #eefcff;
  font-size: 15px !important;
}
.pi-close > span:last-child { font: 400 28px/1 Arial, sans-serif; }
.pi-close:hover { background: #193b47; border-color: var(--pi-cyan); }
.pi-scroll {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: #5c91a1 #071019;
  padding: 0 max(var(--pi-padding), env(safe-area-inset-right, 0px)) calc(45px + env(safe-area-inset-bottom, 0px)) max(var(--pi-padding), env(safe-area-inset-left, 0px));
  background: radial-gradient(ellipse at 90% 4%, #16374670, transparent 35%), linear-gradient(135deg, #050b12, #08121b 65%, #050b12);
}
.pi-scroll:focus { outline: none; }
.pi-content { width: 100%; max-width: 1350px; margin: 0 auto; }
.pi-intro { padding: clamp(40px, 6vw, 90px) 0 0; }
.pi-kicker, .pi-section-index { font: 400 11px/1.6 Mono, monospace; letter-spacing: .08em; color: #9fe4ea; text-transform: uppercase; }
.pi-title { margin-top: 14px !important; font-size: clamp(43px, 6vw, 86px); font-weight: 500; line-height: 1.04; letter-spacing: -.04em; overflow-wrap: anywhere; }
.pi-lead { max-width: 920px; margin-top: 24px !important; font-size: clamp(20px, 2vw, 28px); line-height: 1.45; color: #cad9e4; }
.pi-jump-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; margin-top: 32px; padding: 18px 0; border-top: 1px solid #284451; border-bottom: 1px solid #345462; }
.pi-jump-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 0; font-size: 15px; color: #dbf6fb; text-decoration: none; }
.pi-jump-nav a:hover { color: var(--pi-cyan); text-decoration: underline; text-underline-offset: 5px; }
.pi-overview { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 7vw, 115px); }
.pi-section { padding-top: clamp(50px, 6vw, 85px); scroll-margin-top: 26px; min-width: 0; }
.pi-section:focus { outline: none; }
.pi-section:focus-visible { outline: 1px solid #71b6c6; outline-offset: 7px; }
.pi-section h2 { margin-top: 12px; font-size: clamp(30px, 3.2vw, 46px); font-weight: 500; letter-spacing: -.035em; line-height: 1.15; }
.pi-what > p:last-child { margin-top: 22px; color: var(--pi-muted); font-size: 18px; }
.pi-purpose-list { list-style: none; padding: 0; margin: 20px 0 0; }
.pi-purpose-list li { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr); gap: 20px; padding: 17px 0; border-bottom: 1px solid #284552; }
.pi-purpose-list h3 { font-size: 19px; line-height: 1.35; font-weight: 500; letter-spacing: -.02em; }
.pi-purpose-list p { color: var(--pi-muted); font-size: 16px; }
.pi-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 35px; }
.pi-section-heading > p { color: var(--pi-muted); max-width: 370px; font-size: 14px; }
.pi-gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 32px; }
.pi-gallery-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.pi-picture { position: relative; min-width: 0; }
.pi-picture-stage {
  position: relative;
  border: 1px solid #6eaab7;
  border-radius: 2px;
  background: radial-gradient(ellipse at 50% 55%, #173c4c, #040911 68%);
  box-shadow: 0 1px 0 #aff5fc50, 8px 10px 0 #0c24313b, 0 16px 40px #0005;
  overflow: hidden;
}
.pi-picture-stage::after { content: ''; position: absolute; inset: 0; border: 1px solid #dcfcff13; pointer-events: none; }
.pi-picture img { display: block; width: 100%; height: min(56vw, 670px); object-fit: contain; object-position: top center; }
.pi-picture-game img { object-position: center; padding: clamp(10px, 3vw, 35px); }
.pi-gallery-pair .pi-picture img { height: clamp(270px, 33vw, 480px); }
.pi-picture-timer img { background: #f7f4ef; }
.pi-picture-expanded { grid-column: 1 / -1; }
.pi-picture-expanded img, .pi-gallery-pair .pi-picture-expanded img { height: auto; max-height: none; }
.pi-picture-expanded.pi-picture-game img { padding: 12px; }
.pi-picture figcaption { padding: 23px 0 0; max-width: 960px; }
.pi-picture figcaption h3 { font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
.pi-picture figcaption p { color: var(--pi-muted); margin-top: 9px; font-size: 14px; max-width: 850px; }
.pi-image-toggle { display: inline-flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 44px; margin-top: 10px; padding: 7px 0; background: transparent; color: #adf3f7; font-size: 14px !important; border: 0; }
.pi-image-toggle:hover { color: white; }
.pi-image-toggle > span:last-child { font-size: 21px; }
.pi-image-unavailable { padding: 50px 25px; max-width: 660px; color: #d8e8ee; }
.pi-model-viewer { margin-top: 32px; }
.pi-model-stage { min-width: 0; overflow: hidden; border: 1px solid #6eaab7; background: radial-gradient(ellipse at 50% 55%, #173c4c, #040911 68%); scroll-margin-top: 16px; }
.pi-model-stage > img { display: block; width: 100%; height: clamp(270px, 43vw, 600px); object-fit: contain; padding: clamp(12px, 2vw, 30px); }
.pi-model-start { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 20px 24px; border-top: 1px solid #284552; background: #071019; }
.pi-model-start h3 { margin-top: 5px; color: var(--pi-ink); font-size: 24px; font-weight: 500; }
.pi-model-caption { margin-top: 8px !important; max-width: 760px; color: var(--pi-muted); font-size: 14px; }
.pi-model-start button { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 48px; padding: 11px 18px; border: 1px solid #bbf5f7; background: #bbf5f7; color: #05202c; }
.pi-model-start button:hover { background: #ecffff; }
.pi-model-frame { display: block; width: 100%; height: 760px; border: 0; background: #061019; }
.pi-model-information { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 14px 30px; margin-top: 17px; font-size: 14px; color: var(--pi-muted); }
.pi-model-information > p { max-width: 680px; }
.pi-model-information > a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--pi-cyan); text-underline-offset: 4px; }
.pi-model-status { margin-top: 8px !important; color: #9db4c3; font-size: 13px; }
.pi-model-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 26px; margin-top: 32px; }
.pi-model-card { min-width: 0; }
.pi-model-card-image { border: 1px solid #466979; background: radial-gradient(ellipse at center, #173c4c, #040911 75%); }
.pi-model-card img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: contain; padding: 12px; }
.pi-model-card figcaption { padding-top: 18px; }
.pi-model-card h3 { color: var(--pi-ink); font-size: 20px; font-weight: 500; line-height: 1.35; }
.pi-model-card p { margin-top: 8px !important; color: var(--pi-muted); font-size: 14px; }
.pi-model-card button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 48px; margin-top: 10px; padding: 8px 0; border: 0; background: transparent; color: var(--pi-cyan); font-size: 14px; text-align: left; }
.pi-model-card button:hover { color: white; }
@media (max-width: 700px) {
  .pi-model-start { padding: 18px; }
  .pi-model-gallery { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .pi-model-card-image { max-height: 300px; overflow: hidden; }
  .pi-model-card img { height: 280px; aspect-ratio: auto; }
}
.pi-build > h2 { margin-bottom: 32px; }
.pi-diagram { position: relative; padding: clamp(25px, 4vw, 55px) 0; border-top: 1px solid #739cac; border-bottom: 1px solid #466979; background: linear-gradient(90deg, transparent, #15334244, transparent); }
.pi-diagram-heading { max-width: 870px; }
.pi-diagram-heading h3 { font-size: clamp(23px, 2.4vw, 31px); font-weight: 500; line-height: 1.25; letter-spacing: -.025em; }
.pi-diagram-heading p { margin-top: 14px; color: var(--pi-muted); font-size: 16px; }
.pi-flow { display: grid; grid-template-columns: repeat(var(--pi-steps), minmax(0, 1fr)); list-style: none; gap: 30px; margin: 38px 0 0; padding: 0; }
.pi-flow li { position: relative; min-width: 0; padding: 0 0 23px; border-bottom: 1px solid #6094a3; }
.pi-flow li:not(:last-child)::after { content: '→'; position: absolute; top: 2px; right: -23px; font-size: 26px; line-height: 1; color: #72cad6; }
.pi-step-number { display: flex; align-items: center; width: 49px; height: 40px; color: #baf8fb; border-top: 2px solid #8ff9ff; font: 400 16px/1 Mono, monospace; }
.pi-flow h4 { margin-top: 14px; font-size: 19px; font-weight: 500; letter-spacing: -.015em; line-height: 1.3; }
.pi-flow p { margin-top: 12px; color: #c0ced8; font-size: 15px; line-height: 1.55; }
.pi-flow .pi-flow-demo { border-bottom-style: dashed; }
.pi-flow-demo .pi-step-number { border-top-style: dashed; color: #dde0ef; }
.pi-layer-title { display: flex; align-items: center; gap: 18px; margin-top: 42px; }
.pi-layer-title > span { height: 23px; width: 1px; background: #6cb8c9; flex: 0 0 auto; }
.pi-layer-title h4 { font-size: 18px; line-height: 1.4; letter-spacing: -.01em; font-weight: 500; }
.pi-layers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; gap: 32px; margin: 23px 0 0; padding: 0; }
.pi-layers li { position: relative; padding: 20px 18px 20px 22px; border-left: 2px solid #81d9e5; background: linear-gradient(90deg, #1d435747, #09202b16); min-width: 0; }
.pi-layers h4 { font-size: 18px; line-height: 1.3; font-weight: 500; letter-spacing: -.01em; }
.pi-layers p { margin-top: 9px; font-size: 14px; color: #c0ced8; }
.pi-diagram-caption { margin-top: 25px !important; font-size: 13px; line-height: 1.6; color: #9db4c3; max-width: 1000px; }
.pi-origin { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(35px, 7vw, 110px); align-items: start; }
.pi-origin-copy { color: #bfced9; padding-top: 4px; }
.pi-origin-copy > p { max-width: 780px; }
.pi-origin-note { margin-top: 23px !important; padding-left: 18px; border-left: 1px solid #75bacb; color: #dde9f1; font-size: 15px; }
.pi-boundary { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(35px, 7vw, 110px); margin-top: 55px; padding-top: 28px; border-top: 1px solid #425c6b; }
.pi-boundary h2 { font-size: 21px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.pi-boundary p { color: #adbdca; font-size: 15px; max-width: 780px; }
.pi-end { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-top: 52px; padding: 27px 0; border-top: 1px solid #7bacb6; }
.pi-end > p { color: #d2e0e9; max-width: 750px; font-size: 18px; }
.pi-end-close { display: inline-flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 48px; flex: 0 0 auto; padding: 11px 17px; background: #bbf5f7; color: #05202c; border: 1px solid #bbf5f7; font-size: 15px !important; font-weight: 500 !important; }
.pi-end-close:hover { background: #ecffff; border-color: #ecffff; }
.pi-end-close span { font-size: 22px; }
@media (max-width: 1100px) {
  .pi-purpose-list li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pi-flow { gap: 24px; }
  .pi-flow li:not(:last-child)::after { right: -20px; font-size: 23px; }
  .pi-flow h4 { font-size: 17px; }
  .pi-layers { gap: 23px; }
  .pi-end { align-items: start; }
}
@media (max-width: 900px) {
  .pi-overview { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pi-purpose-list li { grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr); gap: 25px; }
  .pi-flow { grid-template-columns: minmax(0, 1fr); gap: 23px; margin-top: 30px; padding-left: 13px; border-left: 1px solid #346271; }
  .pi-flow li { display: grid; grid-template-columns: 49px minmax(0, 1fr); gap: 0 15px; padding: 0 0 19px; }
  .pi-flow h4 { margin: 3px 0 0; align-self: center; font-size: 20px; }
  .pi-flow p { grid-column: 2; margin-top: 5px; font-size: 16px; }
  .pi-flow li:not(:last-child)::after { content: '↓'; right: auto; left: 15px; top: auto; bottom: -25px; font-size: 24px; }
  .pi-step-number { grid-row: 1 / 3; width: 44px; }
  .pi-layers { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .pi-layers li { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(0, 1.3fr); gap: 25px; padding: 18px 20px; }
  .pi-layers p { margin-top: 0; font-size: 15px; }
  .pi-section-heading { display: block; }
  .pi-section-heading > p { margin-top: 18px; }
  .pi-gallery-pair { grid-template-columns: minmax(0, 1fr); }
  .pi-gallery-pair .pi-picture img { height: min(75vw, 550px); }
  .pi-gallery-pair .pi-picture-expanded img { height: auto; }
  .pi-origin, .pi-boundary { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pi-end { display: block; }
  .pi-end-close { margin-top: 24px; }
}
@media (max-width: 520px) {
  .project-insights-dialog { --pi-padding: 20px; font-size: 16px; }
  .pi-topbar { min-height: 76px; gap: 12px; }
  .pi-topbar-label { gap: 9px; }
  .pi-topbar-label h2 { font-size: 13px; }
  .pi-topbar-label > span { display: none; }
  .pi-close { min-width: 110px; min-height: 46px; padding: 7px 11px; gap: 10px; font-size: 14px !important; }
  .pi-title { font-size: clamp(39px, 10vw, 52px); }
  .pi-kicker { font-size: 10px; letter-spacing: .04em; }
  .pi-lead { margin-top: 20px !important; font-size: 20px; }
  .pi-jump-nav { margin-top: 25px; gap: 2px 19px; padding: 12px 0; }
  .pi-jump-nav a { font-size: 14px; }
  .pi-what > p:last-child { font-size: 17px; }
  .pi-purpose-list li { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 20px 0; }
  .pi-purpose-list h3 { font-size: 20px; }
  .pi-purpose-list p { font-size: 16px; }
  .pi-section h2 { font-size: 31px; }
  .pi-gallery { margin-top: 25px; gap: 40px; }
  .pi-picture img { height: min(65vw, 330px); }
  .pi-picture figcaption { padding-top: 20px; }
  .pi-picture figcaption h3 { font-size: 19px; }
  .pi-picture figcaption p { font-size: 14px; }
  .pi-diagram-heading h3 { font-size: 25px; }
  .pi-flow { padding-left: 10px; }
  .pi-flow li { grid-template-columns: 37px minmax(0, 1fr); gap: 0 12px; }
  .pi-step-number { width: 34px; font-size: 14px; }
  .pi-flow h4 { font-size: 19px; }
  .pi-flow p { font-size: 15px; }
  .pi-flow li:not(:last-child)::after { left: 10px; }
  .pi-layers li { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 18px 17px; }
  .pi-origin-copy { font-size: 16px; }
  .pi-origin-note { padding-left: 14px; }
  .pi-boundary h2 { font-size: 21px; }
  .pi-end { margin-top: 40px; }
  .pi-end > p { font-size: 17px; }
  .pi-end-close { width: 100%; text-align: left; gap: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-insights-dialog, .project-insights-dialog * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
body[data-motion="paused"] .project-insights-dialog,
body[data-motion="paused"] .project-insights-dialog * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
@media (forced-colors: active) {
  .pi-picture-stage, .pi-diagram, .pi-topbar, .pi-flow li, .pi-purpose-list li, .pi-boundary { border-color: CanvasText; }
  .pi-step-number, .pi-layers li { border-color: Highlight; }
  .pi-close, .pi-end-close { border: 1px solid ButtonText; }
}
