/* Wizard Tower's public experiment library. App styles stay inside their frame. */
.lab-page { --maxw: 1240px; --ink: #edece5; --muted: #a4aaa9; --faint: #7d8585; --line: #283235; --cyan: #a9e5d2; background: radial-gradient(ellipse at 82% 12%, #19302e80, transparent 38%), #101718; }
.lab-page [hidden] { display: none !important; }
.lab-page .nav { background: #101718ed; border-color: #2b3636; }
.lab-page .brand .crown { color: #cfc195; filter: none; }
.lab-page .nav-links { gap: 2px; }
.lab-page .nav-links a { font-size: .78rem; padding: 7px 8px; letter-spacing: 0; }
.lab-page .nav-links a.active { background: #263934; box-shadow: none; color: #c6eadb; }
.lab-page .nav-links a:hover { background: #26322f; }
.lab-page .drop-menu { background: #172022; box-shadow: 0 12px 30px #0005; }
.lab-page :focus-visible { outline: 2px solid #b5e5d2; outline-offset: 4px; }
.lab-main { padding-bottom: 40px; }
.lab-hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 60px; padding: 30px 0 25px; align-items: center; }
.lab-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #b4c3ba; text-transform: uppercase; letter-spacing: .15em; font-size: .68rem; font-weight: 600; }
.lab-orbit-dot { width: 7px; height: 7px; border-radius: 50%; background: #b9d4b7; box-shadow: 0 0 0 4px #b9d4b711; }
.lab-hero h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(3.1rem, 5.4vw, 4.15rem); letter-spacing: -.055em; line-height: 1.01; margin: 18px 0 16px; max-width: 10em; }
.lab-hero h1 em { color: #bdd8bd; font-weight: 400; }
.lab-lede { color: #aab6b3; font-size: .93rem; max-width: 64ch; margin: 0; line-height: 1.65; }
.lab-hero-links { display: flex; flex-wrap: wrap; gap: 27px; margin-top: 20px; }
.lab-hero-links a { color: #e4e8d9; font-size: .78rem; border-bottom: 1px solid #526961; padding-bottom: 5px; }
.lab-hero-links a + a { color: #93a69c; border-color: transparent; }
.lab-hero-links span { margin-left: 12px; }
.lab-diagram { position: relative; height: 250px; overflow: hidden; border: 1px solid #31433d; border-radius: 50% 50% 10px 10px; background: radial-gradient(ellipse at 50% 48%, #48684b30, transparent 64%), #14201d; }
.lab-diagram-grid { position: absolute; inset: 0; background-image: linear-gradient(#6483760e 1px, transparent 1px), linear-gradient(90deg, #6483760e 1px, transparent 1px); background-size: 28px 28px; }
.lab-orbit { position: absolute; width: 230px; height: 135px; border: 1px solid #9fbaa875; border-radius: 50%; top: 45px; left: calc(50% - 115px); transform: rotate(-28deg); }
.lab-orbit-two { transform: rotate(34deg); border-color: #d8c79c70; }
.lab-orbit-three { transform: rotate(90deg); border-color: #658c7b70; }
.lab-orbit-one::before, .lab-orbit-two::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; left: 29px; top: 13px; background: #d9cca4; box-shadow: 0 0 18px #d9cca433; }
.lab-orbit-two::after { left: auto; right: 0; top: 67px; background: #9dceba; }
.lab-diagram-centre { position: absolute; left: calc(50% - 24px); top: 89px; width: 48px; height: 48px; border: 1px solid #a8bc8d; border-radius: 50%; display: grid; place-items: center; font-family: Georgia, serif; font-size: 1.6rem; color: #dbd3ad; background: #1b2b22; }
.lab-diagram-label { position: absolute; font-family: monospace; font-size: .59rem; color: #91a699; letter-spacing: .13em; background: #14201d; padding: 3px 6px; }
.lab-label-one { left: 18%; top: 26px; }.lab-label-two { right: 4%; top: 125px; }.lab-label-three { left: 12%; top: 190px; }
.lab-diagram-caption { position: absolute; bottom: 18px; width: 100%; text-align: center; font-size: .67rem; font-style: italic; color: #81978b; }
.lab-overview { display: grid; grid-template-columns: 1fr 1fr 2.1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 17px 0; gap: 24px; }
.lab-overview > div { display: flex; align-items: center; gap: 14px; }
.lab-overview > div + div { border-left: 1px solid var(--line); padding-left: 30px; }
.lab-overview strong { font-size: 1.9rem; font-family: Georgia, serif; font-weight: 400; color: #dddfca; white-space: nowrap; }
.lab-overview span:not(.lab-check) { font-size: .72rem; color: #909d99; line-height: 1.5; max-width: 9ch; }
.lab-overview-note p { margin: 0; font-size: .71rem; line-height: 1.7; color: #94a49b; }
.lab-check { color: #b6cfb4; border: 1px solid #415846; border-radius: 50%; min-width: 27px; height: 27px; display: grid; place-items: center; font-size: .8rem; }
.lab-library { padding-top: 30px; scroll-margin-top: 80px; }
.lab-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.lab-small-label { display: block; color: #93a49c; font-family: monospace; letter-spacing: .12em; font-size: .65rem; }
.lab-library-heading h2 { font-family: Georgia, serif; font-size: 1.75rem; font-weight: 400; margin: 6px 0 0; letter-spacing: -.03em; }
.lab-search { display: flex; align-items: center; gap: 12px; min-width: 300px; padding: 10px 13px; border: 1px solid #33423f; border-radius: 6px; color: #9db4a7; background: #15201d; }
.lab-search > span[aria-hidden] { font-size: 1.6rem; line-height: 1; }
.lab-search input { border: 0; outline: 0; background: transparent; color: #e3e7da; font: inherit; font-size: .76rem; width: 100%; min-width: 0; }
.lab-search:focus-within { border-color: #9db9a1; }.lab-search input::placeholder { color: #819189; }
.lab-library-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 18px 0 20px; border-bottom: 1px solid #2b3934; padding-bottom: 14px; }
.lab-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-filters button { border: 1px solid transparent; padding: 7px 12px; color: #99aba1; background: none; border-radius: 5px; font: inherit; font-size: .7rem; cursor: pointer; }
.lab-filters button:hover { color: #e1e9dd; background: #1e2a25; }
.lab-filters button[aria-pressed="true"] { color: #e0e8d0; background: #2b3a2e; border-color: #53664d; }
.lab-filters button[data-category="archive"] { margin-left: 7px; border-left: 1px solid #344137; border-radius: 0; }
.lab-result-count { font-size: .68rem; color: #8b9c92; white-space: nowrap; }
.lab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.lab-card { background: #16211f; border: 1px solid #34423a; border-radius: 9px; overflow: hidden; display: flex; flex-direction: column; transition: transform .16s, border-color .16s; }
.lab-card:hover { border-color: #799176; transform: translateY(-3px); }
.lab-card-art { position: relative; height: 173px; overflow: hidden; background-color: var(--art-bg, #202e29); display: grid; place-items: center; border-bottom: 1px solid #3d4b3938; }
.lab-card-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#d2d7a20b 1px, transparent 1px), linear-gradient(90deg, #d2d7a20b 1px, transparent 1px); background-size: 22px 22px; }
.lab-card-art svg { width: 215px; height: 145px; position: relative; color: var(--art-ink, #c1c796); }
.lab-card-category { position: absolute; top: 12px; left: 13px; color: #e0e4d2; background: #10171466; font-family: monospace; font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; padding: 3px 7px; border-radius: 3px; }
.lab-card-art .lab-card-number { position: absolute; bottom: 10px; right: 13px; font-family: monospace; font-size: .65rem; color: #d7dfc855; }
.lab-card-content { padding: 20px 19px 17px; display: flex; flex: 1; flex-direction: column; }
.lab-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.lab-origin { color: #9caca1; font-size: .61rem; letter-spacing: .045em; }
.lab-verified { font-size: .58rem; color: #b4d5b7; background: #25422d80; border: 1px solid #3d61484d; padding: 2px 6px; border-radius: 3px; white-space: nowrap; }
.lab-legacy { color: #bfba9c; background: #423c2580; border-color: #6a604533; }
.lab-card h3 { font-family: Georgia, serif; font-size: 1.32rem; font-weight: 400; line-height: 1.23; margin: 0 0 10px; letter-spacing: -.015em; }
.lab-card-purpose { color: #a1b0a6; font-size: .75rem; line-height: 1.75; margin: 0 0 13px; }
.lab-card-instructions { color: #d1d9c3; font-size: .68rem; margin: auto 0 0; padding-top: 8px; }
.lab-card-instructions span { color: #788f7f; margin-right: 6px; }
.lab-card-change { font-size: .66rem; line-height: 1.65; color: #82988a; border-top: 1px solid #2e3b32; padding-top: 13px; margin: 15px 0 0; }
.lab-card-footer { padding: 13px 19px; border-top: 1px solid #2c3a32; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lab-card-footer time { font-size: .61rem; color: #7e9385; }
.lab-card-open { font-size: .74rem; font-weight: 600; color: #d1dfb9; padding: 5px 0; }
.lab-card-open span { margin-left: 7px; }
.lab-notice { border-left: 2px solid #aab784; color: #b9c5aa; background: #28352855; padding: 13px 17px; font-size: .77rem; line-height: 1.7; }
.lab-empty { text-align: center; padding: 60px 20px; border: 1px dashed #40523f; border-radius: 9px; }
.lab-empty > span { color: #a0ba9b; font-size: 2.5rem; }.lab-empty h3 { margin: 10px 0; font-family: Georgia, serif; font-size: 1.5rem; font-weight: 400; }
.lab-empty p { color: #9aab9e; max-width: 48ch; margin: 0 auto 20px; font-size: .82rem; }
.lab-button { border: 1px solid #819872; background: #38472f; color: #e6ead6; padding: 10px 18px; border-radius: 5px; font: inherit; font-size: .78rem; cursor: pointer; }
.lab-footnote { display: flex; gap: 22px; margin: 52px 0 5px; padding: 28px 0; border-top: 1px solid #2c3b32; }
.lab-footnote > span { color: #bdc79c; font-size: 2rem; }.lab-footnote h2 { font-family: Georgia, serif; font-weight: 400; font-size: 1.3rem; margin: 0 0 6px; }
.lab-footnote p { margin: 0; color: #899d8d; font-size: .76rem; max-width: 76ch; }
.lab-page footer { background: #0c1412; border-color: #2a382e; }.lab-page footer .note { font-size: .74rem; }.lab-page footer .socials a { font-size: .71rem; }
.lab-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.lab-viewer { border: 1px solid #567056; border-radius: 10px; padding: 0; color: #e5e9dc; background: #121d18; width: min(1440px, calc(100vw - 40px)); height: min(900px, calc(100dvh - 40px)); max-width: none; max-height: none; overflow: hidden; box-shadow: 0 25px 120px #0009; }
.lab-viewer::backdrop { background: #06100ded; backdrop-filter: blur(6px); }
.lab-viewer.expanded { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
.lab-viewer-shell { display: flex; flex-direction: column; height: 100%; }
.lab-viewer-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 20px; border-bottom: 1px solid #354734; }
.lab-viewer-header h2 { font-family: Georgia, serif; font-weight: 400; font-size: 1.3rem; margin: 4px 0 0; line-height: 1.25; }
.lab-viewer-actions { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
#lab-details { display: none; }
.lab-icon-button { color: #c8d4bb; background: #203021; border: 1px solid #435940; border-radius: 4px; padding: 7px 10px; font: inherit; font-size: .66rem; cursor: pointer; min-height: 34px; }
.lab-icon-button:hover { background: #32462d; }.lab-close { font-size: .95rem; width: 35px; padding: 3px; }
.lab-viewer-body { display: grid; grid-template-columns: minmax(0, 1fr) 245px; min-height: 0; flex: 1; }
.lab-stage { position: relative; overflow: hidden; background: #090e0b; min-height: 200px; }
.lab-stage iframe { width: 100%; height: 100%; display: block; border: 0; background: #101512; }
.lab-frame-status { position: absolute; z-index: 2; inset: 0; padding: 20px; display: grid; place-items: center; text-align: center; color: #b7c9ac; font-size: .82rem; background: #101a16; }
.lab-frame-status.lab-frame-error { align-content: center; gap: 16px; }
.lab-inspector { overflow-y: auto; padding: 22px 18px; border-left: 1px solid #354734; }
.lab-inspector h3 { font-family: inherit; font-size: .72rem; margin: 22px 0 7px; color: #d4ddc5; font-weight: 600; }
.lab-inspector p { font-size: .72rem; color: #a0b49b; line-height: 1.8; margin: 0; overflow-wrap: anywhere; }
.lab-inspector details { border-top: 1px solid #324630; margin-top: 22px; padding-top: 13px; font-size: .7rem; }
.lab-inspector summary { cursor: pointer; color: #c2d1b6; }.lab-inspector details p { margin-top: 10px; font-size: .65rem; }.lab-inspector ul, .lab-inspector ol { padding-left: 18px; color: #9fb292; font-size: .65rem; line-height: 1.7; }
.lab-inspector li { margin-bottom: 8px; }.lab-inspector-note { margin-top: 28px !important; padding-top: 18px; border-top: 1px solid #324630; font-size: .62rem !important; color: #718a70 !important; }
.lab-viewer-footer { display: flex; justify-content: space-between; gap: 12px; padding: 8px 17px; border-top: 1px solid #354734; color: #82967c; font-size: .6rem; min-height: 31px; }
.lab-viewer:fullscreen { width: 100vw; height: 100vh; border-radius: 0; border: 0; }
@media (min-width: 861px) and (max-width: 1130px) { .lab-page .nav-inner { gap: 8px; }.lab-page .brand { font-size: .95rem; }.lab-page .nav-links a { font-size: .71rem; padding: 6px; } }
@media (max-width: 950px) { .lab-hero { gap: 30px; }.lab-diagram { height: 310px; }.lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.lab-overview { grid-template-columns: 1fr 1fr 1.6fr; }.lab-overview > div + div { padding-left: 20px; }.lab-search { min-width: 255px; }.lab-viewer-body { grid-template-columns: minmax(0, 1fr) 220px; } }
@media (max-width: 680px) { .lab-hero { display: block; padding: 48px 0 34px; }.lab-hero h1 { font-size: 4.1rem; max-width: 9em; }.lab-diagram { display: none; }.lab-lede { font-size: .93rem; }.lab-overview { grid-template-columns: 1fr 1fr; gap: 15px; }.lab-overview .lab-overview-note { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 15px 0 0; }.lab-overview strong { font-size: 1.7rem; }.lab-library { padding-top: 36px; }.lab-library-heading { display: block; }.lab-search { margin-top: 20px; min-width: 0; }.lab-library-toolbar { display: block; margin-top: 15px; }.lab-filters { gap: 3px; }.lab-filters button { font-size: .65rem; padding: 7px 9px; }.lab-result-count { display: block; margin-top: 13px; }.lab-grid { grid-template-columns: 1fr; gap: 19px; }.lab-card-art { height: 185px; }.lab-card h3 { font-size: 1.45rem; }.lab-card-purpose { font-size: .8rem; }.lab-card-instructions { font-size: .73rem; }.lab-viewer { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }.lab-viewer-header { padding: 12px; gap: 10px; flex-wrap: wrap; }.lab-viewer-header h2 { font-size: 1.16rem; }.lab-viewer-actions { gap: 5px; }.lab-viewer-actions #lab-present { display: none; }.lab-icon-button { font-size: .61rem; padding: 6px 8px; }.lab-viewer-body { display: flex; flex-direction: column; overflow: auto; }.lab-stage { height: 60dvh; min-height: 360px; flex-shrink: 0; }.lab-inspector { overflow: visible; border-left: 0; border-top: 1px solid #354734; padding: 22px; }.lab-inspector h3 { margin-top: 17px; }.lab-inspector p { font-size: .78rem; }.lab-viewer-footer > span:last-child { display: none; } }
@media (min-width: 681px) and (max-width: 950px) { .lab-diagram { height: 250px; } }
@media (max-width: 680px) {
  .lab-viewer-header { flex-direction: column; align-items: stretch; gap: 9px; }
  .lab-viewer-actions { width: 100%; }
  .lab-viewer-actions .lab-close { margin-left: auto; }
  #lab-details { display: inline-block; }
  .lab-viewer-body { position: relative; overflow: hidden; }
  .lab-stage { height: auto; min-height: 0; flex: 1; }
  .lab-inspector { display: none; position: absolute; inset: 0; z-index: 3; overflow-y: auto; background: #142018; border: 0; }
  .lab-viewer.details-open .lab-inspector { display: block; }
  .lab-viewer.details-open .lab-stage { visibility: hidden; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .lab-page { scroll-behavior: auto; }.lab-card { transition: none; }.lab-card:hover { transform: none; } }
