.landing-page { overflow: clip; }
.landing-shell { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: max(18px, env(safe-area-inset-top)) clamp(20px, 5vw, 88px) max(14px, env(safe-area-inset-bottom)); max-width: 1700px; margin: auto; }
.landing-header { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.landing-label { display: inline-flex; align-items: center; gap: 9px; color: #c6bdc1; font-size: 12px; }
.landing-label > span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.landing-main { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(30px, 6vw, 100px); align-items: center; padding: 24px 0; min-height: 0; }
.landing-copy { padding-bottom: 14px; }
.landing-eyebrow { color: var(--accent); font-size: 14px; display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.landing-eyebrow > span { font-size: 23px; }
.landing-copy h1 { font-size: clamp(48px, 6.3vw, 96px); line-height: 1.27; letter-spacing: -2.5px; font-weight: 750; }
.landing-copy h1 > span { color: var(--accent); }
.landing-description { color: #bdb5ba; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.9; margin-top: 20px; }
.landing-login { margin-top: 30px; min-height: 58px; position: relative; max-width: 360px; }
.landing-login #signed-out-state, .landing-login #signed-in-state { padding: 0; }
.landing-cta { width: 100%; min-height: 58px; justify-content: flex-start; padding: 12px 20px; font-size: 16px; border-radius: 12px; gap: 12px; }
.landing-cta .loading-ring { width: 20px; height: 20px; }
.cta-arrow { margin-inline-start: auto; font-size: 23px; font-weight: 400; }
.landing-tagline { display: flex; align-items: center; gap: 9px; margin-top: 19px; color: #aaa2a7; font-size: 12px; }
.landing-tagline svg { width: 17px; height: 17px; stroke: var(--accent); stroke-width: 1.5; }
.landing-login .notice { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 5; width: min(600px, calc(100% - 32px)); box-shadow: 0 10px 40px #0008; margin: 0; pointer-events: none; }
.landing-unavailable { display: flex; align-items: center; gap: 12px; }
.landing-unavailable strong { font-size: 14px; }
.landing-unavailable p { font-size: 12px; color: var(--muted); }
.landing-unavailable .button { flex-shrink: 0; }
.landing-demo { min-width: 0; }
.demo-choices { display: flex; border: 0; padding: 0; margin: 0 0 16px; gap: 8px; }
.demo-choices label { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 12px; border: 1px solid #f0d49f16; border-radius: 10px; color: #aaa2a7; cursor: pointer; font-size: 12px; flex: 1; min-width: 0; white-space: nowrap; transition: color 150ms, background-color 150ms; min-height: 44px; }
.demo-choices label > span { font: 700 18px Consolas, monospace; }
.demo-choices svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.6; }
.demo-choices input:checked + label { color: var(--accent); background: #f0d49f0b; border-color: #f0d49f55; }
.demo-choices input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 3px; }
.demo-canvas { position: relative; isolation: isolate; margin: 0; border: 1px solid #f0d49f26; border-radius: 18px; background: #100f12 radial-gradient(#f5e2c12a .7px, transparent .7px); background-size: 24px 24px; padding: 12px; box-shadow: 0 22px 60px #0003; }
.demo-heading { position: absolute; inset: 12px 16px auto; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #938b91; font-size: 10px; pointer-events: none; }
.demo-motion { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #f0d49f15; background: #1a171d; color: #d2c9ca; border-radius: 9px; pointer-events: auto; }
.demo-motion svg { width: 16px; height: 16px; grid-area: 1/1; }
.demo-motion .play-icon { display: none; }
[data-motion="paused"] .demo-motion .play-icon { display: block; }
[data-motion="paused"] .demo-motion .pause-icon { display: none; }
/* One proportional scene keeps the editor ports and the SVG wire endpoints aligned. */
.demo-scene { position: relative; container-type: inline-size; width: min(100%, 500px, calc((100dvh - 250px) * .8125)); aspect-ratio: 520 / 640; margin: auto; }
.event-chip { --from-x: -27cqw; --from-y: -12cqw; position: absolute; z-index: 3; top: 18.4%; left: 46.73%; display: flex; align-items: center; gap: 7px; padding: 5px 9px; color: #b7a6c4; background: #201723; border: 1px solid #b595d338; border-radius: 7px; font-size: clamp(9px, 2.5cqw, 12px); white-space: nowrap; opacity: 0; transform: translate(calc(-50% + var(--from-x)), var(--from-y)); animation: event-first 12s linear infinite; }
.event-chip svg { width: 14px; height: 14px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.6; }
.event-second { --from-x: 25cqw; --from-y: -14cqw; animation-name: event-second; }
.event-match { --from-x: 0cqw; --from-y: -17cqw; color: #e4c7ff; background: #291c33; border-color: #b595d368; animation-name: event-match; }
.event-match svg { stroke: none; }
.event-role { color: #79ddbf; font-size: .9em; padding-inline-start: 7px; border-inline-start: 1px solid #b595d33b; }
.demo-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wire-base { stroke: #938b91; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.wire-approved { stroke: #79ddbf; }
.wire-direct { display: none; }
.wire-packet { fill: #f0d49f; stroke: #fff5d2; stroke-width: 1; opacity: 0; offset-rotate: 0deg; }
.packet-role { offset-path: path("M243 261V323"); animation: packet-role 12s linear infinite; }
.packet-action { fill: #79ddbf; stroke: #c9ffed; offset-path: path("M325.5 435V462Q325.5 474 337.5 474H348Q360 474 360 486V517"); animation: packet-action 12s linear infinite; }
.demo-node { --node-color: #d8b16f; position: absolute; z-index: 2; width: 63.4615%; left: 15%; display: grid; grid-template-rows: minmax(0, 1fr) 6.25cqw; border: 1px solid #f0d49f7a; border-radius: 9px; background: #1a171d; color: var(--text); box-shadow: 0 7px 28px #0003; }
.node-trigger { --node-color: #4dd4e9; top: 18.4375%; height: 22.34375%; grid-template-rows: minmax(0, 1fr) 6.25cqw 6.25cqw; border-color: #4dd4e99e; background: #202c32; }
.node-condition { --node-color: #aaa1f3; top: 50.46875%; height: 17.5%; }
.node-action { --node-color: #79ddbf; top: 80.78125%; height: 15%; width: 55.7692%; left: 41.3462%; }
.demo-node-heading { display: flex; align-items: center; gap: 2.5cqw; padding: 2.4cqw 3cqw; min-height: 0; }
.node-trigger .demo-node-heading { background: #22343c; border-radius: 8px 8px 0 0; }
.node-icon { display: grid; place-items: center; width: clamp(22px, 8cqw, 40px); height: clamp(22px, 8cqw, 40px); flex-shrink: 0; color: var(--node-color); border: 1px solid color-mix(in srgb, var(--node-color) 38%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--node-color) 10%, transparent); }
.node-icon svg { width: 55%; height: 55%; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.node-trigger .node-icon { color: #08282f; background: var(--node-color); border-color: var(--node-color); }
.node-icon svg { display: none; }
[data-example="command"] .icon-command, [data-example="follow"] .icon-follow, [data-example="channel"] .icon-channel { display: block; }
.node-copy { min-width: 0; flex: 1; }
.node-copy small { display: block; color: var(--node-color); font-size: clamp(8px, 2.15cqw, 11px); line-height: 1.6; margin-bottom: 2px; white-space: nowrap; }
.node-copy strong { display: block; font-size: clamp(11px, 3.3cqw, 17px); font-weight: 500; line-height: 1.6; letter-spacing: -.2px; white-space: nowrap; text-align: right; }
.node-lock { color: #4dd4e9; border: 1px solid #4dd4e942; background: #4dd4e910; border-radius: 4px; padding: 3px; line-height: 1; }
.node-lock svg { width: clamp(11px, 3cqw, 16px); height: clamp(11px, 3cqw, 16px); stroke: currentColor; stroke-width: 1.8; }
.node-detail { display: flex; align-items: center; justify-content: center; gap: 7px; color: #4dd4e9; font-size: clamp(10px, 2.9cqw, 15px); }
.node-detail svg { display: none; width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.7; }
[data-example="command"] .trigger-detail svg { display: block; }
.node-ports { display: flex; padding: 0 3cqw; border-top: 1px solid #f5e2c140; min-height: 0; }
.node-ports > span { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; font-size: clamp(8px, 2.4cqw, 12px); white-space: nowrap; color: #aaa2a7; }
.node-trigger .node-ports { border-color: #4dd4e945; }
.node-trigger .node-ports > span { color: #4dd4e9; }
/* Footer slots fill the entire block so 25%/75% match the actual editor handles. */
.condition-ports { padding: 0; }
.condition-ports > .port-true { color: #79ddbf; }
.condition-ports > .port-false { color: #f0808e; }
.node-port { position: absolute; width: clamp(7px, 2.5cqw, 12px); height: clamp(7px, 2.5cqw, 12px); left: 50%; border: 2px solid #d8b16f; border-radius: 50%; background: #362831; z-index: 3; }
.port-top { top: 0; transform: translate(-50%, -50%); }
.port-bottom { bottom: 0; transform: translate(-50%, 50%); }
.node-trigger .port-bottom { background: #4dd4e9; border-color: #a5ebf5; box-shadow: 0 0 0 3px #4dd4e92e; }
.port-true .node-port { background: #79ddbf; border-color: #79ddbf; }
.port-false .node-port { background: #f0808e; border-color: #f0808e; }
.edge-label { position: absolute; z-index: 3; left: 67%; top: 74.0625%; transform: translate(-50%, -50%); font-size: clamp(8px, 2.1cqw, 10px); padding: 2px 5px; background: #1a171d; border: 1px solid #f5e2c13f; border-radius: 3px; white-space: nowrap; color: #d6c9b6; }
.demo-node::after, .node-action::before { content: ""; position: absolute; inset: -2px; pointer-events: none; border: 1.5px solid var(--node-color); border-radius: inherit; opacity: 0; box-shadow: 0 0 18px color-mix(in srgb, var(--node-color) 16%, transparent); animation: trigger-active 12s linear infinite; }
.node-condition::after { animation-name: role-active; }
.node-action::after { animation-name: execution-ring; }
.node-action::before { animation-name: execution-echo; }
.condition-check { color: #79ddbf; font-size: clamp(10px, 3cqw, 16px); opacity: 0; animation: role-check 12s linear infinite; }
.execution-check { position: absolute; top: -10px; left: -10px; display: grid; place-items: center; width: clamp(20px, 5.5cqw, 28px); height: clamp(20px, 5.5cqw, 28px); color: #c9ffed; background: #1d3f32; border: 1px solid #79ddbf; border-radius: 50%; font-size: clamp(11px, 3cqw, 16px); opacity: 0; animation: execution-check 12s linear infinite; }
.demo-result { position: absolute; top: 85%; left: 3%; width: 31%; display: grid; font-size: clamp(9px, 2.5cqw, 12px); text-align: center; line-height: 1.8; }
.demo-result > span { grid-area: 1/1; color: #938b91; }
.result-waiting { animation: waiting-status 12s linear infinite; }
.result-running { opacity: 0; animation: running-status 12s linear infinite; }
.demo-result .result-complete { color: #79ddbf; opacity: 0; animation: complete-status 12s linear infinite; }
[data-example="follow"] .node-condition, [data-example="channel"] .node-condition { --node-color: #79ddbf; }
[data-example="follow"] .port-false, [data-example="channel"] .port-false, [data-example="follow"] .edge-label, [data-example="channel"] .edge-label, [data-example="follow"] .wire-approved, [data-example="channel"] .wire-approved { display: none; }
[data-example="follow"] .wire-direct, [data-example="channel"] .wire-direct { display: block; }
[data-example="follow"] .packet-action, [data-example="channel"] .packet-action { offset-path: path("M243 435V462Q243 474 255 474H348Q360 474 360 486V517"); }
[data-example="follow"] .result-waiting, [data-example="channel"] .result-waiting { visibility: hidden; }
.landing-footer { color: #92888f; font-size: 11px; display: flex; justify-content: space-between; gap: 12px; min-height: 26px; align-items: center; }
.landing-footer > span { display: flex; align-items: center; gap: 11px; }
.landing-footer > span > span { color: var(--accent); }
.landing-analytics-disclosure { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.landing-analytics-options { color: var(--muted); font-size: 11px; }
.landing-analytics-options summary { cursor: pointer; width: fit-content; }
.landing-analytics-options a { display: block; text-underline-offset: 2px; }
.landing-analytics-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.landing-analytics-choice input { margin: 0; accent-color: var(--accent); }
.landing-privacy > summary { color: var(--muted); cursor: pointer; }
.landing-privacy-copy {
  position: fixed;
  z-index: 8;
  left: 50%;
  bottom: max(42px, calc(env(safe-area-inset-bottom) + 32px));
  transform: translateX(-50%);
  width: min(470px, calc(100vw - 32px));
  max-height: 60dvh;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}
.landing-privacy-copy p + p { margin-top: 10px; }
:is([data-motion="paused"], [data-hidden="true"]) *, :is([data-motion="paused"], [data-hidden="true"]) *::before, :is([data-motion="paused"], [data-hidden="true"]) *::after { animation-play-state: paused !important; }
@keyframes event-first { 0% { opacity: 0; transform: translate(calc(-50% + var(--from-x)), var(--from-y)); } 3% { opacity: .9; } 24% { opacity: .9; transform: translate(-50%, 2cqw); } 26%, 100% { opacity: 0; transform: translate(-50%, 2cqw); } }
@keyframes event-second { 0%, 4% { opacity: 0; transform: translate(calc(-50% + var(--from-x)), var(--from-y)); } 7% { opacity: .9; } 28% { opacity: .9; transform: translate(-50%, 2cqw); } 30%, 100% { opacity: 0; transform: translate(-50%, 2cqw); } }
@keyframes event-match { 0%, 12% { opacity: 0; transform: translate(calc(-50% + var(--from-x)), var(--from-y)); } 15% { opacity: 1; } 35% { opacity: 1; transform: translate(-50%, 2cqw); } 37%, 100% { opacity: 0; transform: translate(-50%, 2cqw); } }
@keyframes trigger-active { 0%, 34% { opacity: 0; } 36%, 42% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes packet-role { 0%, 43% { opacity: 0; offset-distance: 0%; } 44% { opacity: 1; } 52% { opacity: 1; offset-distance: 100%; } 53%, 100% { opacity: 0; offset-distance: 100%; } }
@keyframes role-active { 0%, 52% { opacity: 0; } 54%, 62% { opacity: 1; } 67%, 100% { opacity: 0; } }
@keyframes role-check { 0%, 54% { opacity: 0; transform: scale(.7); } 57%, 94% { opacity: 1; transform: scale(1); } 98%, 100% { opacity: 0; transform: scale(1); } }
@keyframes packet-action { 0%, 62% { opacity: 0; offset-distance: 0%; } 63% { opacity: 1; } 77% { opacity: 1; offset-distance: 100%; } 78%, 100% { opacity: 0; offset-distance: 100%; } }
@keyframes execution-ring { 0%, 77% { opacity: 0; transform: scale(1); } 79% { opacity: 1; transform: scale(1); } 94%, 100% { opacity: 0; transform: scale(1.075, 1.18); } }
@keyframes execution-echo { 0%, 83% { opacity: 0; transform: scale(1); } 85% { opacity: .7; transform: scale(1); } 98%, 100% { opacity: 0; transform: scale(1.12, 1.26); } }
@keyframes execution-check { 0%, 78% { opacity: 0; transform: scale(.6); } 81%, 94% { opacity: 1; transform: scale(1); } 99%, 100% { opacity: 0; transform: scale(1); } }
@keyframes waiting-status { 0%, 34% { opacity: 1; } 36%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes running-status { 0%, 35% { opacity: 0; } 37%, 77% { opacity: 1; } 79%, 100% { opacity: 0; } }
@keyframes complete-status { 0%, 78% { opacity: 0; } 81%, 94% { opacity: 1; } 99%, 100% { opacity: 0; } }
@media (max-width: 1100px) {
  .landing-main { gap: 35px; grid-template-columns: .9fr 1.1fr; }
  .demo-choices label { font-size: 11px; padding-inline: 7px; }
  .landing-copy h1 { font-size: clamp(46px, 6vw, 68px); }
}
@media (max-height: 740px) and (min-width: 761px) {
  .landing-main { padding-block: 10px; }
  .landing-eyebrow { margin-bottom: 10px; }
  .landing-description { margin-top: 12px; }
  .landing-login { margin-top: 20px; }
  .demo-choices { margin-bottom: 10px; }
  .demo-scene { width: min(100%, calc((100dvh - 220px) * .8125)); }
}
@media (max-width: 760px) {
  .landing-shell { padding-inline: 20px; }
  .landing-header { min-height: 40px; }
  .brand-name { font-size: 19px; }
  .brand-mark { width: 34px; height: 34px; }
  .landing-label { font-size: 10px; }
  .landing-main { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 16px; padding-block: 10px; max-width: 540px; width: 100%; margin-inline: auto; }
  .landing-copy { text-align: center; padding: 0; }
  .landing-eyebrow { justify-content: center; font-size: 11px; margin-bottom: 6px; }
  .landing-eyebrow > span { font-size: 16px; }
  .landing-copy h1 { font-size: clamp(27px, 7.6vw, 40px); letter-spacing: -1.2px; line-height: 1.4; white-space: nowrap; }
  .landing-copy h1 br { display: none; }
  .landing-copy h1 > span::before { content: " "; }
  .landing-description { font-size: 12px; margin-top: 7px; line-height: 1.75; }
  .landing-login { margin: 12px auto 0; min-height: 44px; }
  .landing-cta { min-height: 44px; font-size: 14px; padding-block: 8px; }
  .landing-tagline { display: none; }
  .demo-choices { margin-bottom: 8px; gap: 5px; }
  .demo-choices label { font-size: 10px; gap: 5px; padding-inline: 6px; border-radius: 8px; }
  .demo-choices svg { width: 14px; height: 14px; }
  .demo-canvas { border-radius: 14px; padding: 8px; background-size: 20px 20px; }
  .demo-heading { inset: 8px 10px auto; font-size: 9px; }
  .demo-scene { width: min(100%, calc((100dvh - 390px) * .8125)); }
  .landing-footer { font-size: 9px; min-height: 18px; justify-content: center; }
  .landing-login .notice { top: auto; bottom: max(34px, calc(env(safe-area-inset-bottom) + 26px)); font-size: 12px; padding: 9px 12px; }
}
@media (max-height: 540px) and (min-width: 761px) {
  .landing-shell { padding: 8px 24px; }
  .landing-header { min-height: 36px; }
  .landing-main { gap: 24px; padding-block: 8px; }
  .landing-eyebrow, .landing-tagline, .landing-label { display: none; }
  .landing-copy h1 { font-size: clamp(26px, 4.5vw, 44px); letter-spacing: -1px; }
  .landing-description { font-size: 12px; line-height: 1.7; margin-top: 10px; }
  .landing-login { margin: 12px 0 0; min-height: 44px; }
  .landing-cta { min-height: 44px; font-size: 12px; padding: 7px 10px; }
  .demo-choices { margin-bottom: 6px; gap: 4px; }
  .demo-choices label { font-size: 9px; gap: 4px; padding-inline: 4px; }
  .demo-choices svg, .demo-choices label > span { display: none; }
  .demo-canvas { padding: 4px 8px; border-radius: 12px; }
  .demo-heading > span { display: none; }
  .demo-heading { inset: 4px 6px auto; }
  .demo-scene { width: min(100%, calc((100dvh - 168px) * .8125)); }
  .demo-node-heading { padding: 0 2cqw; }
  .node-lock { display: none; }
  .node-icon { width: 18px; height: 18px; border-radius: 5px; }
  .node-copy small { font-size: 7px; line-height: 1.2; margin-bottom: 0; }
  .node-copy strong { font-size: 10px; line-height: 1.2; }
  .landing-footer { font-size: 9px; min-height: 16px; }
}
@media (max-height: 680px) and (max-width: 760px) {
  .landing-shell { padding-block: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-bottom)); }
  .landing-header { min-height: 34px; }
  .landing-main { padding-block: 6px; gap: 10px; }
  .landing-eyebrow, .landing-description, .landing-footer > span { display: none; }
  .landing-copy h1 { font-size: 25px; }
  .landing-login { margin-top: 8px; }
  .demo-scene { width: min(100%, calc((100dvh - 270px) * .8125)); }
  .demo-canvas { padding: 6px; }
  .demo-heading > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-canvas *, .demo-canvas *::before, .demo-canvas *::after, .loading-ring { animation: none !important; transition: none !important; }
  .event-first, .event-second, .wire-packet, .result-waiting, .result-running { display: none; }
  .event-match { opacity: 1; transform: translate(-50%, -10cqw); }
  .condition-check, .execution-check, .demo-result .result-complete { opacity: 1; transform: none; }
  .node-action::after { opacity: .6; box-shadow: none; }
}
