/* AI DemoLab landing page. Layout and the interactive map; everything else comes from tokens.css + ui.css. */

main { max-width: 1180px; margin: 0 auto; padding: 36px 28px 64px; }
section + section { margin-top: 48px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { font-size: var(--text-xl); font-weight: var(--fw-bold); color: var(--text-heading); margin: 0; letter-spacing: var(--ls-tight); }
.section-head p { margin: 0; color: var(--text-muted); font-size: var(--text-sm); max-width: 560px; }
.btn i, .card-header i { width: 16px; height: 16px; }

/* hero: full content width */
.hero h1 { font-size: var(--text-4xl); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); color: var(--text-heading); margin: 0 0 12px; line-height: var(--lh-tight); }
.hero p { font-size: var(--text-md); color: var(--text-body); margin: 0 0 18px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badges .badge i { width: 13px; height: 13px; margin-right: 5px; }

/* map card */
.map-card { padding: 0; overflow: hidden; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.map-head .section-label { margin: 0; }
.map-nav { display: flex; align-items: center; gap: 10px; }
.map-nav button { width: 32px; height: 32px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface-card); color: var(--text-body); cursor: pointer; display: grid; place-items: center; }
.map-nav button:hover { background: var(--surface-hover); }
.map-nav button i { width: 16px; height: 16px; }
.map-dots { display: flex; gap: 6px; }
.map-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: var(--border-strong); cursor: pointer; padding: 0; }
.map-dots button.is-active { background: var(--primary); }
.map-slide-label { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); letter-spacing: var(--ls-label); text-transform: uppercase; }

/* the map follows the design tokens: white card in light mode, the dark surfaces in dark mode */
.map-stage {
  position: relative; overflow-x: auto; overflow-y: hidden; background: var(--surface-card); color: var(--text-body);
  background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0); background-size: 24px 24px;
}
.map-scaler { position: relative; overflow: hidden; }
.map-canvas { position: relative; transform-origin: top left; }
.map-svg { position: absolute; inset: 0; pointer-events: none; }
/* idle connectors are faint; the active request path lights up blue (red when blocked) */
.m-edge { fill: none; stroke-width: 1.6; stroke: var(--border-strong); color: var(--border-strong); transition: stroke var(--dur) var(--ease); }
.m-edge-planned { stroke-dasharray: 5 5; }
.m-edge-control { stroke: var(--primary-text); color: var(--primary-text); stroke-dasharray: 4 5; opacity: .8; }
.m-edge-blocked { stroke-dasharray: 6 4; }
.m-edge.is-active { stroke: var(--info); color: var(--info); stroke-width: 2.4; }
.m-edge-blocked.is-active { stroke: var(--block); color: var(--block); }
.m-edge.is-return { stroke: var(--allow); color: var(--allow); stroke-width: 2.4; }
.is-static .m-edge-allow { stroke: var(--info); color: var(--info); }
.m-dot { fill: var(--info); }
.m-halo { fill: var(--info); opacity: .25; }
.m-dot-return { fill: var(--allow); }
.m-dot, .m-halo, .m-dot-return { transition: opacity var(--dur) var(--ease); }
.m-dot.is-hidden, .m-halo.is-hidden, .m-dot-return.is-hidden { opacity: 0; }
.m-node.is-glow { border-color: var(--info); box-shadow: 0 0 0 2px color-mix(in srgb, var(--info) 45%, transparent), var(--shadow-md); }

.m-node {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 8px 12px; box-sizing: border-box;
  background: var(--surface-card); border: 1px solid var(--border-strong); border-radius: var(--radius-md); cursor: pointer; box-shadow: var(--shadow-xs);
  transition: border-color var(--dur) var(--ease), opacity var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.m-node:hover, .m-node:focus-visible, .m-node.is-selected { border-color: var(--primary); box-shadow: var(--shadow-md), 0 0 0 1px var(--primary); outline: none; }
.m-node > i { width: 20px; height: 20px; flex: none; color: var(--info); }
.m-gw { background: var(--amber-tint); border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-md); }
.m-gw > i, .m-ngfw > i, .m-ctrl > i { color: var(--primary-text); }
.m-gw .m-title { font-size: var(--text-lg); }
.m-gw .m-sub { white-space: normal; }
.m-ctrl { border-style: dashed; border-color: var(--amber-500); }
.m-ngfw { border-color: var(--prompt); background: var(--prompt-bg); }
.m-planned, .m-shadow { background: var(--surface-sunken); border-style: dashed; }
.m-planned .m-title, .m-shadow .m-title { color: var(--text-muted); }
.m-planned > i { color: var(--text-faint); }
.m-shadow > i { color: var(--block); }
.m-icon { border-radius: 50%; padding: 0; justify-content: center; background: var(--info-bg); border-color: var(--info); }
.m-icon > i { color: var(--info); width: 20px; height: 20px; }
.m-cloud { background: var(--surface-sunken); }
.m-cloud > i { color: var(--text-muted); }
.m-text { min-width: 0; }
.m-title { margin: 0; font-size: var(--text-base); font-weight: var(--fw-semibold); color: var(--text-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-sub { margin: 2px 0 0; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-node.is-dim, .m-chips.is-dim { opacity: .3; }

.m-list { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; background: var(--surface-sunken); }
.m-label { margin: 0 0 2px; font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted); }
.m-item { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: var(--text-sm); color: var(--text-body); line-height: 1.4; }
.m-item i { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--info); }

.m-chips { position: absolute; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* chips check in one by one while a request passes the gateway */
.m-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); background: var(--surface-sunken); transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease); }
.m-chip i { width: 13px; height: 13px; color: var(--allow); opacity: 0; transition: opacity var(--dur) var(--ease); }
.m-chip.is-on { border-color: var(--info); color: var(--info); background: var(--info-bg); }
.m-chip.is-on i { opacity: 1; }

.m-group { position: absolute; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); box-sizing: border-box; padding: 12px 16px; }
.m-group.is-right { text-align: right; }
.m-group-title { margin: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--primary-text); }
.m-group-sub { margin: 2px 0 0; font-size: var(--text-xs); color: var(--text-muted); }

.map-tip { position: absolute; width: 320px; padding: 10px 12px; background: var(--surface-card); border: 1px solid var(--border-strong); border-radius: var(--radius-md); font-size: var(--text-sm); line-height: 1.45; color: var(--text-body); box-shadow: var(--shadow-lg); pointer-events: none; z-index: 5; }
.map-tip p { margin: 0; }
.m-tip-title { font-weight: var(--fw-semibold); color: var(--text-heading); margin-bottom: 4px !important; }

.map-detail { padding: 14px 18px; border-top: 1px solid var(--border); font-size: var(--text-sm); color: var(--text-body); }
.map-detail p { margin: 0 0 8px; }
.m-detail-title { display: flex; align-items: center; gap: 8px; font-weight: var(--fw-semibold); color: var(--text-heading); }
.m-detail-title i { width: 16px; height: 16px; color: var(--primary-text); }
.m-detail-links a { margin-right: 14px; color: var(--text-link); font-family: var(--font-mono); font-size: var(--text-xs); }

/* slide 2 */
.map-flows { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.m-flow-chip { padding: 5px 11px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface-card); color: var(--text-body); font: inherit; font-size: var(--text-xs); font-weight: var(--fw-medium); cursor: pointer; }
.m-flow-chip:hover { background: var(--surface-hover); }
.m-flow-chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--text-on-primary); }
.m-flow-planned:not(.is-active) { color: var(--text-faint); border-style: dashed; }
.map-steps { padding: 16px 18px 6px; border-top: 1px solid var(--border); font-size: var(--text-sm); color: var(--text-body); }
.m-steps { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.m-steps li { margin-bottom: 8px; line-height: 1.45; break-inside: avoid; }
.m-steps li::marker { color: var(--primary-text); font-weight: var(--fw-semibold); font-family: var(--font-mono); }
.m-steps li { transition: color var(--dur) var(--ease); }
.m-steps li.is-current { color: var(--text-heading); font-weight: var(--fw-semibold); }
.m-steps li.is-current::marker { color: var(--info); }

/* use cases */
.uc-tile { position: relative; cursor: default; }
.uc-badge { position: absolute; top: 14px; right: 14px; }
.uc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.uc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.btn i { margin-right: 6px; }

/* tables and cards */
.table-wrap { overflow-x: auto; }
.data-table td.mono { font-family: var(--font-mono); font-size: var(--text-xs); white-space: nowrap; }
.data-table a { color: var(--text-link); }
.note { font-size: var(--text-sm); color: var(--text-muted); margin: 10px 0 0; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card-header { display: flex; align-items: center; gap: 8px; }
.cp-list { margin: 0; padding-left: 18px; font-size: var(--text-sm); color: var(--text-body); }
.cp-list li { margin-bottom: 6px; line-height: 1.45; }
.as-of { margin-top: 40px; font-size: var(--text-xs); color: var(--text-faint); font-family: var(--font-mono); }

@media (max-width: 900px) {
  .m-steps { columns: 1; }
}
@media (max-width: 640px) {
  main { padding: 24px 16px 48px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero h1 { font-size: var(--text-3xl); }
}
