/* A key on a small instrument: six toggles, three colored pairs. */
#intent-gate{position:fixed;inset:auto 84px 92px auto;width:min(324px,calc(100vw - 28px));max-height:calc(100dvh - 40px);box-sizing:border-box;margin:0;padding:22px 22px 18px;overflow:auto;border:1px solid #ffffffde;border-radius:25px;color:#344b3e;background:linear-gradient(145deg,#fafff9f5,#e7ede7f0);box-shadow:inset 0 1px 0 #fff,0 18px 70px #24382d23;font:400 13px/1.4 var(--sans);}
#intent-gate::backdrop{background:#263c2d12;backdrop-filter:blur(3px);}
#intent-gate[open]{animation:intentArrive .36s cubic-bezier(.2,.7,.2,1) both;}
@keyframes intentArrive{from{opacity:0;translate:0 7px}to{opacity:1;translate:0}}
.intent-close-form{position:absolute;top:10px;right:10px;margin:0;}
#intent-gate .intent-close{width:36px;height:36px;padding:0;border:0;border-radius:50%;background:transparent;color:#78877c;font:350 24px/1 var(--sans);cursor:pointer;}
#intent-gate h2{font:550 20px/1.25 var(--sans);letter-spacing:-.02em;margin:1px 0 0;}
#intent-gate-signal{color:#718274;font-size:12px;margin:5px 0 0;}
#intent-gate-signal:empty{display:none;}
.intent-key-view{display:grid;justify-items:center;margin:6px -3px 12px;}
#intent-simple-key{width:270px;max-width:100%;height:96px;overflow:visible;}
.intent-key-body{fill:#fcfefb;stroke:#597462;stroke-width:1.2;stroke-linejoin:round;}
.intent-key-inlay{stroke:#829b88;stroke-width:1;}
.intent-key-tooth{fill:none;stroke-width:2.5;stroke-linecap:round;}
#intent-simple-reading{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.intent-relation{display:flex;justify-content:center;gap:4px;padding:3px;border:1px solid #c6d2c633;border-radius:99px;background:#dce5da55;}
#intent-gate .intent-relation button{display:flex;align-items:center;justify-content:center;gap:5px;flex:1;min-height:34px;padding:5px 7px;border:1px solid transparent;border-radius:99px;background:transparent;color:#718477;font:450 12px/1.3 var(--sans);cursor:pointer;transition:background .25s,color .25s;}
.intent-relation button span{font-size:16px;letter-spacing:-3px;}
#intent-gate .intent-relation [aria-pressed=true]{background:#fff;border-color:#d2ddd0;box-shadow:0 1px 3px #4057360c;color:#36533e;}
#intent-gate .intent-gate-hint{margin:16px 0 6px;text-align:center;color:#879589;font:450 10px/1.4 var(--sans);letter-spacing:.04em;}
.intent-switches{display:grid;gap:8px;}
.intent-pair{--pair:#62acd0;position:relative;display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:6px 9px;border:1px solid color-mix(in srgb,var(--pair) 28%,#e7ece5);border-radius:17px;background:linear-gradient(110deg,color-mix(in srgb,var(--pair) 10%,#f9fcf7),color-mix(in srgb,var(--pair) 5%,#f9fcf7));box-shadow:inset 0 1px 0 #fff;}
.intent-pair[data-color=green]{--pair:#75b58a;}.intent-pair[data-color=red]{--pair:#da8a68;}
.intent-pair::before{content:'';position:absolute;top:18px;bottom:18px;left:0;width:2px;border-radius:99px;background:var(--pair);opacity:.65;}
#intent-gate .intent-switches button{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-width:0;min-height:54px;padding:3px 6px;border:0;border-radius:12px;background:transparent;box-shadow:none;color:#607565;font:450 12px/1.3 var(--sans);cursor:pointer;transition:color .25s;}
#intent-gate .intent-switches button:focus-visible{outline:1px solid var(--pair);outline-offset:1px;}
#intent-gate .intent-switches button[aria-checked=true]{color:#294c35;}
.intent-mini-switch{position:relative;display:block;flex:none;width:26px;height:42px;border:1px solid #a7b5a6;border-radius:7px;background:#dce4d8;box-shadow:inset 1px 1px 2px #5d715b26,0 1px 0 #fff;perspective:130px;}
#intent-gate .intent-switches .intent-mini-well{position:absolute;inset:3px;display:block;border:1px solid #c5d0bf;border-radius:4px;background:#c0cbb7;}
#intent-gate .intent-switches .intent-mini-lever{position:absolute;inset:3px;display:block;border:1px solid #8a9d85;border-radius:4px;background:linear-gradient(#f5f8f0,#fff 46%,#e3e9db 49%,#f1f5e9);transform:rotateX(-21deg);box-shadow:0 -2px 1px #5f72582b,inset 0 1px 0 #fff;transition:transform .28s cubic-bezier(.2,.7,.2,1),box-shadow .28s,background .28s;}
#intent-gate .intent-switches .intent-switch--dark .intent-mini-lever{border-color:#50634e;background:linear-gradient(#435441,#263b2b 46%,#15231a 49%,#3d4f3b);box-shadow:0 -2px 1px #20311e3d,inset 0 1px 0 #a6b79c66;}
#intent-gate .intent-switches [aria-checked=true] .intent-mini-lever{transform:rotateX(21deg);box-shadow:0 2px 1px #5f72582b,inset 0 1px 0 #fff,0 0 7px color-mix(in srgb,var(--pair) 25%,transparent);}
#intent-gate .intent-switches [aria-checked=true] .intent-mini-switch{border-color:var(--pair);}
#intent-gate-use{display:block;width:auto;min-width:84px;min-height:38px;margin:16px auto 0;padding:7px 20px;border:1px solid #b6c8b6;border-radius:99px;background:#f8fcf5;color:#3c5b41;font:500 12px/1.3 var(--sans);cursor:pointer;box-shadow:inset 0 1px 0 #fff;}
#intent-gate-use:disabled{opacity:.35;cursor:default;}
#intent-gate-status{min-height:0;font:400 11px/1.4 var(--sans);color:#718776;margin:8px 0 0;text-align:center;}
#intent-gate-status:empty{display:none;}
#intent-gate[data-result=fit] #intent-simple-key{animation:intentFit .55s ease both;}
@keyframes intentFit{50%{transform:translateX(3px);filter:drop-shadow(0 0 4px #a2c9ac)}}
/* Architectural ink: one pivot, opaque faces, no render shadows. */
.signal-entry .architectural-switch{--switch-ink:#536358;--switch-face:#f8faf5;--switch-side:#e9eee4;--switch-faint:#a1b09b;filter:none!important;}
.signal-entry[data-selected=true][data-on=false] .architectural-switch{--switch-ink:#dce3dc;--switch-face:#202821;--switch-side:#2f3a30;--switch-faint:#7f9481;}
.signal-entry .switch-architecture-shell path{stroke:var(--switch-ink);stroke-width:.75;fill:none;}
.signal-entry .switch-architecture-shell .switch-architecture-side{fill:var(--switch-side);}
.signal-entry .switch-architecture-shell .switch-architecture-face{fill:var(--switch-face);}
.signal-entry .switch-architecture-shell .switch-architecture-bevel{stroke:var(--switch-faint);stroke-width:.45;}
.signal-entry .switch-architecture-shell .switch-architecture-recess{fill:var(--switch-side);stroke-width:.65;}
.signal-entry .switch-architecture-shell .switch-architecture-inner{stroke:var(--switch-faint);stroke-width:.5;}
.signal-entry .switch-rocker-face{fill:var(--switch-face);stroke:var(--switch-ink);stroke-width:.85;}
.signal-entry .switch-rocker-side{fill:var(--switch-side);stroke:var(--switch-ink);stroke-width:.65;}
.signal-entry .switch-rocker-inset{fill:none;stroke:var(--switch-faint);stroke-width:.4;}
@media(max-width:640px){#intent-gate{inset:auto 12px 20px;width:calc(100vw - 24px);max-width:350px;padding:22px 21px 18px;}#intent-gate .intent-key-view{margin:6px -3px 12px;}#intent-gate h2{margin-bottom:0;}#intent-gate .intent-gate-hint{margin:14px 0 6px;}}
@media(prefers-reduced-motion:reduce){#intent-gate[open],#intent-gate[data-result=fit] #intent-simple-key{animation:none;}.intent-mini-lever{transition:none!important;}}
/* Old phrase/lock examples are superseded by the personal six-switch gate. */
.app-shell #signal-card :is([data-coder-panel="connect"],#coder-key-panel,#coder-connect-panel) {display:none!important;}
/* The network is a membership goal, separate from the aggregate ON/OFF signal. */
.app-shell.is-start-network:not([data-view=meta]) #overall-pixel .network-goal {display:block!important;visibility:visible!important;pointer-events:auto;}
.app-shell[data-mode=coincidence].is-start-network #overall-pixel .network-goal {background:#d2efdfd9;border-color:#ecfff4ab;color:#385f4a;}
.app-shell[data-mode=coincidence] #overall-pixel .network-goal summary {color:#345f49;}
/* The last lesson shares the live connection lens's jade and seafoam glass. */
.app-shell #tutorial[data-lesson=coincidence] .tutorial-main {background:radial-gradient(ellipse at 22% 8%,#8de2c54d,transparent 55%),linear-gradient(140deg,#268c76,#176d58);border-color:#d9ffea80;box-shadow:inset 0 1px 0 #dcfff78c,0 8px 35px #0c4f3b1a;}
.app-shell #tutorial[data-lesson=coincidence] :is(#tutorial-title,#tutorial-eyebrow,#tutorial-text,#tutorial-text p) {color:#f1fff6;text-shadow:0 0 14px #c9ffe42b;}
.app-shell #tutorial[data-lesson=coincidence] .tutorial-coincidence-types li {background:linear-gradient(145deg,#e0faec,#b0dbc6);border:1px solid #e9fff5ab;box-shadow:inset 0 1px 0 #fff9;}
.app-shell #tutorial[data-lesson=coincidence] .tutorial-coincidence-types :is(b,span) {color:#2b5340;text-shadow:none;}
.app-shell #tutorial[data-lesson=coincidence] .tutorial-icon--coincidence span {background:#ccebd8;border-color:#f2fff3;box-shadow:0 0 12px #b3ffe24d;}
@media(max-width:640px){
  #intent-gate {inset:auto 12px 20px;width:calc(100vw - 24px);max-height:calc(100dvh - 40px);padding:24px 20px 16px;}
  #map-sound {top:auto;bottom:28px;right:16px;width:40px;height:40px;}
  body:has(#signal-entry:not([hidden])) #map-sound {top:14px;bottom:auto;right:14px;}
  .app-shell.is-start-network:not([data-view=meta]) #overall-pixel .network-goal > summary {min-height:30px;padding:4px 10px;gap:8px;font-size:12px;}
  .app-shell #tutorial[data-lesson=coincidence] .tutorial-coincidence-types li {padding:10px 12px;}
}
@media(prefers-reduced-motion:reduce){#intent-gate[open],#intent-gate[data-result=fit] #intent-simple-key{animation:none;}}

/* The legacy reading animation must not restore the former dark surfaces. */
.app-shell #tutorial[data-lesson=coincidence] #tutorial-text .tutorial-coincidence-types :is(b,span) {color:#2b5340;text-shadow:none;}
.app-shell #tutorial[data-lesson=coincidence] .tutorial-coincidence-types li {animation-name:mintReadingStep;}
@keyframes mintReadingStep {
  0%,100% {background:#c2e8d5;border-color:#e5fff0ab;box-shadow:inset 0 1px 0 #fff8;}
  8%,85% {background:#e5f9eb;border-color:#f4fff7;box-shadow:inset 3px 0 0 #82c8a7,0 0 16px #b6ffde24;}
}
@media(max-width:640px){
  #intent-gate h2{margin-bottom:12px;}
  #intent-gate .intent-gate-hint{margin:12px 0 6px;}
  #intent-gate .intent-key-view{margin:10px 0 8px;}
}
/* Keep the full last lesson and its credit visible on short phones. */
@media(max-width:640px) and (max-height:740px){
  .app-shell #tutorial[data-lesson=coincidence] #tutorial-text {margin-top:10px;font-size:14px;line-height:1.4;}
  .app-shell #tutorial[data-lesson=coincidence] #tutorial-text .tutorial-coincidence-intro {font-size:14px;line-height:1.4;margin-bottom:8px;}
  .app-shell #tutorial[data-lesson=coincidence] #tutorial-text .tutorial-coincidence-types {gap:8px;margin:8px 0;}
  .app-shell #tutorial[data-lesson=coincidence] #tutorial-text .tutorial-coincidence-types li {min-height:0;padding:9px 10px;gap:4px;}
  .app-shell #tutorial[data-lesson=coincidence] #tutorial-text .tutorial-coincidence-types b {font-size:10px;line-height:1.3;}
  .app-shell #tutorial[data-lesson=coincidence] #tutorial-text .tutorial-coincidence-types span {font-size:14px;line-height:1.35;}
  .app-shell #tutorial[data-lesson=coincidence] #tutorial-text .tutorial-coincidence-note {font-size:14px;line-height:1.4;margin-top:8px;}
  .app-shell #tutorial[data-lesson=coincidence] .tutorial-credit-link {font-size:11px;line-height:1.4;padding:7px 9px;}
}

#intent-gate .intent-switches button{font-size:13px;}
#intent-gate-use{min-height:44px;}
