/* exploder-kit: the shared look of every StellarView Exploder. An Exploder may add its own sheet after this one. */
:root {
  --bg: #050913;
  --panel: rgba(8, 13, 28, 0.9);
  --line: rgba(120, 160, 255, 0.24);
  --text: #e8eeff;
  --muted: #9aa8cc;
  --cyan: #4fd8ff;
  --magenta: #ff5ad1;
  --gold: #ffd166;
  --green: #5dffa2;
  --orange: #ffa94d;
  --violet: #c9a7ff;
  --red: #ff4d6d;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); overflow: hidden; }
#stage { position: fixed; inset: 0; }
#stage canvas { display: block; }
button { font: inherit; font-size: 12.5px; color: var(--text); background: rgba(30, 44, 80, 0.75); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
button:hover { border-color: var(--cyan); }
button.primary { background: linear-gradient(180deg, #1b6fd6, #1452a8); border-color: #3d8cff; }
a { color: var(--cyan); }

#top { position: fixed; top: 0; left: 0; right: 0; display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: linear-gradient(180deg, rgba(5, 9, 19, 0.95), rgba(5, 9, 19, 0.6)); z-index: 5; }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.brand .mark { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--cyan) 40%, #123 75%); flex: none; }
.brand .kicker { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 520px; }
.brand .title { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.search { position: relative; }
.search input { width: 250px; font: inherit; font-size: 13px; color: var(--text); background: rgba(10, 16, 34, 0.9); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
#kresults { position: absolute; top: 36px; right: 0; width: 360px; max-height: 60vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
#kresults .r { padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
#kresults .r:hover { background: rgba(79, 216, 255, 0.08); }
#kresults small { color: var(--muted); }

/* where you are: always on screen, large enough to read in a film */
#where { position: fixed; top: calc(var(--hdr-b, 58px) + 6px); left: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 12px; background: var(--panel); border: 1px solid rgba(255, 209, 102, 0.45); border-radius: 12px; z-index: 4; max-width: calc(100vw - 32px); }
#where .w { display: flex; flex-direction: column; min-width: 0; }
#where .w small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
#where .w b { font-size: 15px; color: #fff; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
#where .w:last-child b { color: var(--gold); }
#where .sep { color: var(--gold); font-size: 18px; padding: 0 2px; }
#locator { position: fixed; left: 16px; bottom: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; z-index: 4; }
#locator .loc-h { font-size: 11px; color: var(--muted); padding: 0 2px 4px; }
#locator canvas { display: block; width: 300px; height: 170px; cursor: crosshair; border-radius: 6px; }

#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); white-space: nowrap; font-size: 12px; line-height: 1.2; padding: 3px 7px; border-radius: 5px; background: rgba(5, 9, 20, 0.78); border: 1px solid rgba(120, 160, 255, 0.3); color: #dbe5ff; pointer-events: auto; cursor: pointer; will-change: transform; }
.lbl small { color: var(--muted); font-family: var(--mono); font-size: 10px; margin-left: 6px; }
.lbl.place { font-size: 13px; font-weight: 700; color: #fff; border-color: rgba(143, 179, 255, 0.6); }
.lbl.place.major { font-size: 16px; padding: 5px 11px; text-transform: uppercase; letter-spacing: 0.06em; background: rgba(10, 20, 45, 0.82); border-color: rgba(79, 216, 255, 0.7); }
.lbl.section { font-size: 13px; font-weight: 700; color: #ffe6a6; border-color: rgba(255, 209, 102, 0.6); background: rgba(30, 22, 5, 0.75); }
.lbl.inferred { border-style: dashed; }
.lbl.concept, .lbl.proposed { border-style: dashed; border-color: var(--violet); color: #ead9ff; }
.lbl.confirmed { border-color: var(--green); color: #d8ffe9; }
.lbl.big { font-size: 22px; font-weight: 800; padding: 8px 14px; border-width: 2px; border-color: var(--gold); background: rgba(8, 10, 24, 0.9); color: #fff; }
.lbl.big small { display: block; margin: 3px 0 0; font-family: var(--sans); font-size: 14px; font-weight: 500; color: #ffe6a6; }
.lbl.sel { border-color: var(--gold); color: #fff; box-shadow: 0 0 16px rgba(255, 209, 102, 0.55); }

#legend { position: fixed; right: 16px; bottom: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 12px; z-index: 3; max-width: 250px; }
.lg-h { font-weight: 700; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; margin: 2px 0 6px; }
.lg { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.sw { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
.sw.rec { background: var(--green); } .sw.mea { background: var(--cyan); } .sw.est { background: var(--orange); }
.sw.inf { border: 2px dashed var(--gold); } .sw.con { border: 2px dashed var(--violet); }
.lg-foot { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.4; }

#layers { position: fixed; top: var(--below, 128px); left: 16px; width: 330px; max-height: calc(100vh - 340px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; z-index: 4; }
.ch-h { font-weight: 700; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lg-g { margin: 10px 0 4px; font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; }
.ly { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; cursor: pointer; }
.ly i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.ly .only { margin-left: auto; padding: 2px 8px; font-size: 11px; }
.ly-acts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }

#panel { position: fixed; top: var(--below, 128px); right: 16px; width: 400px; max-height: calc(100vh - 300px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; z-index: 4; font-size: 14px; }
#panel .x { position: absolute; top: 10px; right: 10px; padding: 3px 8px; font-size: 12px; }
#panel .kind { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; padding-right: 60px; }
#panel h2 { margin: 6px 0 8px; font-size: 20px; line-height: 1.2; }
#panel h3 { margin: 14px 0 6px; font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; }
#panel .sum { color: #d4ddf5; line-height: 1.45; margin: 6px 0; }
#panel table { width: 100%; border-collapse: collapse; font-size: 13px; }
#panel td { padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: top; }
#panel td:first-child { color: var(--muted); width: 38%; }
#panel .acts { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { font-size: 11px; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line); }
.st.record, .st.confirmed { border-color: var(--green); color: var(--green); }
.st.estimate { border-color: var(--orange); color: var(--orange); }
.st.concept, .st.proposed { border-color: var(--violet); color: var(--violet); border-style: dashed; }
.st.illustrative { border-color: var(--red); color: #ffc0cc; border-style: dashed; }
.st.measured { border-color: var(--cyan); color: var(--cyan); }
.known.inferred { border-style: dashed; border-color: var(--gold); color: var(--gold); }
.known.read { color: var(--green); } .known.measured { color: var(--cyan); } .known.seen { color: #9fd0ff; }
.sec { color: #ffe6a6; }
.src { font-size: 12px; line-height: 1.45; padding: 7px 9px; margin: 5px 0; background: rgba(255, 255, 255, 0.03); border-left: 3px solid var(--green); border-radius: 4px; }
.src span { color: #c8d3ee; } .src small { color: var(--muted); }
.src.none { border-left-color: var(--red); color: #ffc0cc; }

#chapters { position: fixed; top: var(--below, 128px); left: 16px; width: 380px; max-height: calc(100vh - 340px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; z-index: 6; }
#chapters .ch { padding: 8px; border-radius: 8px; cursor: pointer; }
#chapters .ch:hover { background: rgba(79, 216, 255, 0.08); }
#chapters .ch small { display: block; color: var(--muted); }

#caption { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(860px, calc(100vw - 680px)); min-width: 420px; background: rgba(6, 10, 24, 0.93); border: 1px solid rgba(255, 209, 102, 0.5); border-radius: 14px; padding: 12px 16px; z-index: 6; }
.cap-top { display: flex; gap: 10px; font-size: 12px; color: var(--muted); align-items: center; }
.cap-top .voice { color: var(--gold); font-weight: 700; }
.cap-top .stepno { margin-left: auto; font-family: var(--mono); }
#caption .text { font-size: 20px; line-height: 1.42; margin: 8px 0; color: #fff; }
#caption .extra .tag { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--violet); color: var(--violet); }
#caption .extra .tag.supported { border-color: var(--green); color: var(--green); }
#caption .extra .tag.poc { border-color: var(--gold); color: var(--gold); }
.cap-nav { display: flex; gap: 6px; justify-content: flex-end; }

#shotview { position: fixed; top: var(--below, 128px); left: 50%; transform: translateX(-50%); z-index: 7; }
#shotview .sv-top { display: flex; gap: 10px; align-items: center; background: rgba(6, 10, 24, 0.94); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; white-space: nowrap; }
#shotview .sv-top span, #shotview .sv-top small { color: var(--muted); }
#shotview .key { font-weight: 800; padding: 3px 9px; border-radius: 99px; }
#shotview .key.sup { color: #04140c; background: var(--green); } #shotview .key.poc { color: #1a1200; background: var(--gold); }

#loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 18px; color: var(--muted); z-index: 9; background: var(--bg); }
.kit-err, #kit-err { position: fixed; inset: 20px; white-space: pre-wrap; font-family: var(--mono); font-size: 13px; color: #ffd0d9; background: #1a0610; border: 1px solid var(--red); padding: 16px; z-index: 10; overflow: auto; }
#banner { position: fixed; top: var(--below, 112px); right: 16px; max-width: 420px; font-size: 12px; color: #ffe6a6; background: rgba(40, 28, 4, 0.85); border: 1px dashed var(--gold); border-radius: 10px; padding: 7px 10px; z-index: 3; }

@media (max-width: 900px) {
  .search input { width: 150px; }
  #panel { left: 16px; right: 16px; width: auto; top: auto; bottom: 200px; max-height: 40vh; }
  #caption { width: calc(100vw - 32px); min-width: 0; bottom: 200px; }
  #legend, #banner { display: none; }
  #locator canvas { width: 200px; height: 113px; }
  #where .w b { max-width: 120px; font-size: 13px; }
}

/* the whole site exploded by one segmentation, with the reason for each group */
#segpanel { position: fixed; top: var(--below, 128px); left: 16px; width: 380px; max-height: calc(100vh - 340px); overflow: auto; background: var(--panel); border: 1px solid rgba(255, 209, 102, 0.5); border-radius: 12px; padding: 12px 14px; z-index: 5; font-size: 14px; }
#segpanel .sum { color: #d4ddf5; line-height: 1.45; }
#segpanel .sg { display: grid; grid-template-columns: 14px 1fr; gap: 2px 8px; padding: 7px 6px; border-radius: 8px; cursor: pointer; }
#segpanel .sg:hover, #segpanel .sg.on { background: rgba(255, 209, 102, 0.1); }
#segpanel .sg i { width: 12px; height: 12px; border-radius: 3px; margin-top: 4px; }
#segpanel .sg span { grid-column: 2; color: var(--muted); font-size: 13px; line-height: 1.35; }
.sg-modes { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.lbl.seg { font-size: 20px; }

/* the joystick: two thumb sticks and three buttons, for an iPad or any touch screen */
#joy { position: fixed; left: 0; right: 0; bottom: 96px; display: flex; justify-content: center; align-items: flex-end; padding: 0 28px; pointer-events: none; z-index: 8; }
#joy .joy-mid { pointer-events: auto; display: flex; flex-direction: column; gap: 8px; }
#joy .joy-mid button { min-width: 96px; min-height: 44px; font-size: 15px; touch-action: none; }

/* the glossary panel */
#glossary { position: fixed; top: var(--below, 128px); right: 16px; width: 420px; max-height: calc(100vh - 300px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; z-index: 6; font-size: 13px; }
#glossary .sum { color: var(--muted); }
#glossary .gl { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
#glossary .gl:hover { background: rgba(79, 216, 255, 0.07); }
#glossary .gl.on { border-color: var(--gold); background: rgba(255, 209, 102, 0.08); }
#glossary .gl em { font-style: normal; color: var(--gold); font-family: var(--mono); }
#glossary .gl span { grid-column: 1 / -1; color: #c8d3ee; }
#glossary .gl small { grid-column: 1 / -1; color: var(--muted); }
#glossary .gl code { grid-column: 1 / -1; color: #7f8db0; font-size: 11px; }

/* tablets and touch: the header may take two rows, the sticks need the bottom corners */
@media (max-width: 1500px) {
  #top { flex-wrap: wrap; row-gap: 6px; }
  .tools button { font-size: 12px; padding: 6px 9px; }
  .search input { width: 180px; }
}
@media (pointer: coarse) {
  #legend { display: none; }
  #locator canvas { width: 220px; height: 125px; }
  #joy { bottom: 210px; }
  #caption { bottom: 18px; }
}

/* the theme picker, and the hover panel */
.theme-pick { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.theme-pick select { font: inherit; font-size: 12.5px; color: var(--text); background: rgba(30, 44, 80, 0.75); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.tip { position: fixed; left: 0; top: 0; z-index: 9; pointer-events: none; display: flex; flex-direction: column; gap: 3px; max-width: 320px; background: rgba(4, 7, 16, 0.94); border: 1px solid rgba(255, 209, 102, 0.55); border-radius: 10px; padding: 9px 12px; font-size: 13px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); }
.tip b { font-size: 15px; color: #fff; } .tip span { color: #d4ddf5; } .tip small { color: var(--muted); font-size: 11.5px; }
#panel .pt { padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; } #panel .pt:hover { background: rgba(79, 216, 255, 0.08); }

/* themes: Black is the default; Blueprint turns the panels light */
body[data-theme="black"], body[data-theme="presentation"] { --bg: #000; --panel: rgba(6, 8, 14, 0.92); }
body[data-theme="presentation"] { --text: #ffffff; --muted: #c9d3ea; --line: rgba(255, 255, 255, 0.35); }
body[data-theme="presentation"] .lbl { font-size: 14px; border-color: rgba(255, 255, 255, 0.6); color: #fff; }
body.theme-light { --bg: #eef3fa; --panel: rgba(250, 252, 255, 0.95); --text: #0f1f3a; --muted: #4a5d80; --line: rgba(31, 63, 115, 0.3); }
body.theme-light button, body.theme-light .theme-pick select, body.theme-light .search input { background: #ffffff; color: #0f1f3a; }
body.theme-light button.primary { background: #1f5bc2; color: #fff; }
body.theme-light #top { background: linear-gradient(180deg, rgba(238, 243, 250, 0.97), rgba(238, 243, 250, 0.7)); }
body.theme-light .lbl { background: rgba(255, 255, 255, 0.9); color: #0f1f3a; border-color: rgba(31, 63, 115, 0.4); }
body.theme-light .lbl.place.major, body.theme-light .lbl.section { background: rgba(255, 255, 255, 0.95); color: #0f1f3a; }
body.theme-light .lbl.big { background: #ffffff; color: #0f1f3a; }
body.theme-light #where .w b, body.theme-light #panel h2, body.theme-light #caption .text { color: #0f1f3a; }
body.theme-light #caption { background: rgba(255, 255, 255, 0.96); }
body.theme-light .tip { background: rgba(255, 255, 255, 0.97); } body.theme-light .tip b { color: #0f1f3a; } body.theme-light .tip span { color: #22355a; }
body.theme-light .brand .title { color: #0f1f3a; }

/* note 9: labels stay readable at any distance; a dark plate with a slight blur, no thin type */
.lbl { font-size: 13px; font-weight: 600; color: #f2f6ff; background: rgba(0, 0, 0, 0.78); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); border-color: rgba(160, 190, 255, 0.4); padding: 3px 8px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); }
.lbl small { font-size: 11px; color: #b8c6e6; font-weight: 500; }
.lbl.place, .lbl.section { font-size: 15px; }
.lbl.place.major { font-size: 17px; }
.lbl.section { font-weight: 700; }

/* note 10: everything clickable answers the pointer with a small spring */
.lbl, button, .ly, .sg, .gl, .pt, .er, .ch, #kresults .r, #locator canvas { transition: scale 250ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 150ms, box-shadow 150ms; }
.lbl:hover, button:hover, .ly:hover, .sg:hover, .gl:hover, .pt:hover, .ch:hover, #kresults .r:hover { scale: 1.03; }
.lbl:hover { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 209, 102, 0.45); }
.lbl:active, button:active, .ly:active, .sg:active, .gl:active, .pt:active { scale: 0.97; }
@media (prefers-reduced-motion: reduce) { .lbl, button, .ly, .sg, .gl, .pt, .er, .ch { transition: none; } .lbl:hover, button:hover, .ly:hover, .sg:hover, .gl:hover, .pt:hover { scale: 1; } }
.lyname { cursor: zoom-in; text-decoration: underline dotted rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
.asmodel { grid-column: 2; justify-self: start; font-size: 11px; padding: 2px 8px; margin: 2px 0; }

/* note 11: the model view's bar, and the close-up vignette */
.modelbar { position: fixed; top: var(--below, 112px); left: 50%; transform: translateX(-50%); z-index: 8; display: flex; gap: 12px; align-items: center; background: rgba(4, 7, 16, 0.94); border: 1px solid rgba(255, 209, 102, 0.6); border-radius: 12px; padding: 8px 14px; font-size: 14px; }
.modelbar span { color: var(--muted); font-size: 12.5px; }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.6) 100%); }
/* note 12: every overlay says how to close it */
#panel .x::after, .sfb-pane .x::after, #glossary .x::after, #chapters .x::after, #segpanel .x::after { content: " · Esc"; color: var(--muted); font-size: 11px; }

/* note 8: the design studio */
#design { position: fixed; top: var(--below, 128px); right: 16px; width: 440px; max-height: calc(100vh - 300px); overflow: auto; background: var(--panel); border: 1px solid rgba(255, 209, 102, 0.5); border-radius: 12px; padding: 12px 14px; z-index: 7; font-size: 13px; }
#design .sum { color: var(--muted); line-height: 1.4; }
.ds-row { display: flex; gap: 8px; align-items: center; margin: 7px 0; flex-wrap: wrap; }
.ds-row b { width: 92px; font-weight: 600; color: var(--muted); }
.ds-row select, .ds-row input { font: inherit; color: var(--text); background: rgba(30, 44, 80, 0.75); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.dsws { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.dsw { display: flex; gap: 6px; align-items: center; font-size: 12px; } .dsw input { width: 28px; height: 20px; padding: 0; border: none; background: none; }
.ds-item { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); } .ds-item b { flex: 1; } .ds-item button { font-size: 11px; padding: 3px 7px; }
.btnlike { font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
body[data-labels="light"] .lbl { background: rgba(255, 255, 255, 0.92); color: #0f1f3a; text-shadow: none; } body[data-labels="light"] .lbl small { color: #3a4c70; }
body[data-labels="outline"] .lbl { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
#shotview .eschint, .eschint { color: var(--muted); font-size: 11px; }

/* note 20: a part's record, small and beside the part */
.partcard { position: fixed; left: 0; top: 0; z-index: 8; width: 330px; max-height: 60vh; overflow: auto; background: rgba(4, 7, 16, 0.95); border: 1px solid rgba(255, 209, 102, 0.7); border-radius: 12px; padding: 10px 12px; font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); }
.partcard .x { position: absolute; top: 8px; right: 8px; padding: 2px 8px; font-size: 12px; }
.partcard .kind { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; padding-right: 40px; }
.partcard b { display: block; font-size: 16px; color: #fff; margin: 3px 0; }
.partcard h4 { margin: 9px 0 3px; font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; }
.partcard p, .partcard li { color: #d4ddf5; line-height: 1.4; margin: 2px 0; }
.partcard ul { margin: 0; padding-left: 16px; }
.partcard small { display: block; color: var(--muted); font-size: 11px; } .partcard small.gn { color: #9fb3ff; } .partcard small.rd { color: var(--green); }
.partcard .sd { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.partcard code { color: #9fb3ff; font-size: 11px; } .partcard em { font-style: normal; color: var(--gold); font-size: 11.5px; }
.lbl.partlbl { font-size: 13px; border-color: rgba(255, 209, 102, 0.6); }
.rec h3 { display: flex; gap: 8px; align-items: baseline; }
.pv { font-style: normal; font-size: 10.5px; text-transform: none; letter-spacing: 0; padding: 1px 6px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.pv.read, .pv.loaded { color: var(--green); border-color: var(--green); } .pv.generated { color: var(--cyan); border-color: var(--cyan); } .pv.guessed { color: var(--orange); border-color: var(--orange); } .pv.unknown { color: #ffb3c0; border-style: dashed; }

/* note 27: asset classes; note 19: hot keys, help and the touch tray */
#classes { position: fixed; top: var(--below, 128px); left: 16px; width: 380px; max-height: calc(100vh - 300px); overflow: auto; background: var(--panel); border: 1px solid rgba(255, 209, 102, 0.5); border-radius: 12px; padding: 12px 14px; z-index: 6; font-size: 13px; }
#classes .cnt { font-style: normal; color: var(--gold); font-family: var(--mono); margin-left: 4px; }
#classes em[class^="st-"] { font-style: normal; font-size: 10.5px; color: var(--muted); margin-left: 4px; }
.help { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 12; background: rgba(4, 7, 16, 0.97); border: 1px solid rgba(255, 209, 102, 0.6); border-radius: 14px; padding: 14px 18px; font-size: 14px; min-width: 460px; }
.help td { padding: 4px 10px 4px 0; color: #d4ddf5; } .help kbd { font-family: var(--mono); background: #1a2440; border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; color: #fff; }
body.panels-off #panel, body.panels-off .sfb-pane, body.panels-off #glossary, body.panels-off #segpanel, body.panels-off #layers, body.panels-off #chapters, body.panels-off #design, body.panels-off #classes, body.panels-off #legend, body.panels-off #banner, body.panels-off .partcard, body.panels-off #shotview { display: none !important; }
body.ui-hidden #top, body.ui-hidden #where, body.ui-hidden #locator, body.ui-hidden #legend, body.ui-hidden #banner, body.ui-hidden #panel, body.ui-hidden #caption, body.ui-hidden .sfb-pane, body.ui-hidden #labels, body.ui-hidden .tray, body.ui-hidden #joy, body.ui-hidden .partcard, body.ui-hidden #shotview, body.ui-hidden .modelbar { display: none !important; }
/* light themes: dark text on solid light plates with a thin border (7:1 or better) */
body.theme-light .lbl { background: #ffffff; color: #0b1526; border: 1px solid #5a6b88; -webkit-backdrop-filter: none; backdrop-filter: none; text-shadow: none; }
body.theme-light .lbl small { color: #33415c; }
body.theme-light .lbl.section { background: #fff7e0; color: #2a1d00; border-color: #8a6100; }
body.theme-light #panel, body.theme-light .sfb-pane, body.theme-light #glossary, body.theme-light #layers, body.theme-light #segpanel, body.theme-light #design, body.theme-light #classes, body.theme-light #chapters, body.theme-light #legend, body.theme-light #locator, body.theme-light #where, body.theme-light .partcard, body.theme-light .help, body.theme-light .modelbar { background: #ffffff; color: #0b1526; border-color: #5a6b88; }
body.theme-light .partcard b, body.theme-light .partcard p, body.theme-light .partcard li, body.theme-light #panel .sum, body.theme-light .help td { color: #0b1526; }
body.theme-light .vignette { display: none; }

/* note 35: the Assets pane */
#assets { position: fixed; top: var(--below, 128px); left: 16px; right: 16px; max-height: calc(100vh - 240px); overflow: auto; background: var(--panel); border: 1px solid rgba(255, 209, 102, 0.5); border-radius: 12px; padding: 12px 14px; z-index: 7; font-size: 12.5px; }
.as-banner { background: rgba(255, 209, 102, 0.12); border: 1px dashed var(--gold); color: #ffe6a6; padding: 6px 10px; border-radius: 8px; margin-bottom: 8px; font-weight: 600; }
body.theme-light .as-banner { color: #6a4a00; background: #fff6d6; }
.as-stats, .as-table { width: 100%; border-collapse: collapse; } .as-stats td, .as-stats th, .as-table td, .as-table th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.as-stats th, .as-table th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--panel); cursor: pointer; }
.as-stats .tot td { font-weight: 700; color: var(--gold); }
.as-table tr[data-id] { cursor: pointer; } .as-table tr[data-id]:hover { background: rgba(79, 216, 255, 0.08); }
.as-wrap { max-height: 50vh; overflow: auto; } #assets .acts input { font: inherit; color: var(--text); background: rgba(30, 44, 80, 0.75); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; width: 280px; }

/* note 37: the fly controls dock, bottom centre above the tour bar */
#joy { bottom: 150px; align-items: flex-end; }
#joy .joy-mid { background: var(--panel); border: 1px solid rgba(255, 209, 102, 0.5); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; align-items: center; max-width: 560px; }
.joy-modes, .joy-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.joy-modes button { min-width: 72px; } .joy-btns button { min-height: 36px; min-width: 0; padding: 6px 10px; font-size: 13px; }
.joy-speed, .joy-col { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; } .joy-speed input { width: 200px; }
.joy-keys { font-size: 11px; color: var(--muted); text-align: center; }
.joy-pad { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px; } .joy-pad.on { color: #04140c; background: var(--green); }
#joy .joy-mid button { min-width: 64px; min-height: 34px; font-size: 13px; }
/* a record open on the right: the key steps aside and the look stick moves left of the panel */
body:has(#panel:not([hidden])) #legend, body:has(.partcard:not([hidden])) #legend, body:has(.sfb-pane:not([hidden])) #legend { display: none; }
body:has(#panel:not([hidden])) #joy, body:has(.partcard:not([hidden])) #joy { right: 440px; }
#joy { right: 0; }

/* note 42: the validation run bar */
.vbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9; background: rgba(4, 7, 16, 0.96); border: 1px solid rgba(79, 216, 255, 0.7); border-radius: 14px; padding: 10px 14px; width: min(980px, calc(100vw - 32px)); }
.vb-top { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; font-size: 14px; color: var(--muted); } .vb-top b { color: #fff; font-size: 16px; } .vb-name { color: var(--gold); font-weight: 700; }
.vb-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 2px; } .vb-acts .big { min-height: 48px; min-width: 120px; font-size: 15px; }
.vb-msg { color: var(--gold); font-size: 13px; }
body.theme-light .vbar { background: #fff; } body.theme-light .vb-top b { color: #0b1526; }
#recon { position: fixed; top: var(--below, 128px); left: 16px; right: 16px; max-height: calc(100vh - 240px); overflow: auto; background: var(--panel); border: 1px solid rgba(255, 209, 102, 0.5); border-radius: 12px; padding: 12px 14px; z-index: 7; font-size: 12.5px; }
#recon .acts input { font: inherit; color: var(--text); background: rgba(30, 44, 80, 0.75); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
#recon td button { font-size: 11px; padding: 2px 7px; margin-right: 3px; }
.todbar { position: fixed; left: 340px; bottom: 16px; z-index: 5; display: flex; gap: 6px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 12px; color: var(--muted); }
.todbar b { color: var(--text); } .todbar button { font-size: 11.5px; padding: 3px 8px; }
.rpanel .rnd { border-top: 1px solid var(--line); padding: 8px 0; display: grid; gap: 4px; }
.rpanel .rnd span { color: var(--muted); font-size: 12px; }
.rbar .sum { margin: 4px 0 6px; font-size: 13px; }
.lbl.place.major.site { font-size: 19px; padding: 6px 13px; letter-spacing: 0.08em; border-color: rgba(255, 255, 255, 0.75); background: rgba(4, 8, 20, 0.86); }
.ckpane, .planpane { max-height: calc(100vh - 150px); overflow: auto; }
.ckpane td.box { min-width: 70px; }
.planpane h3 { margin: 12px 0 4px; font-size: 13px; color: var(--gold, #ffd166); }
.planpane .rnd { border-top: 1px solid var(--line); padding: 6px 0; display: grid; gap: 3px; }
.planpane .rnd span { color: var(--muted); font-size: 11.5px; }
@media print {
  body.printing-ck > *:not(.ckpane) { display: none !important; }
  body.printing-ck .ckpane { position: static; max-height: none; overflow: visible; background: #fff; color: #000; border: none; }
  body.printing-ck .ckpane button { display: none; }
  body.printing-ck .ckpane td, body.printing-ck .ckpane th { border: 1px solid #999; color: #000; }
}

/* header menus (note 46): the header stays one row at 1280 px and up */
.menu { position: relative; }
.menu-b.open { border-color: var(--cyan); }
.menu-p { position: absolute; top: calc(100% + 6px); right: 0; min-width: 210px; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; z-index: 12; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.menu-p[hidden] { display: none; }
.menu-p > button, .menu-p > label { width: 100%; text-align: left; }
.menu-p .theme-pick { display: flex; gap: 8px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px; }
@media (max-width: 760px) {
  #top { flex-wrap: wrap; }
  .tools { width: 100%; justify-content: flex-start; }
  .search input { width: 150px; }
}
/* the filter chip (note 47): under the readout whenever something is hidden on purpose */
.fchip { position: fixed; left: 16px; top: calc(var(--hdr-b, 58px) + 72px); /* set from the readout by place() */ z-index: 4; display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px); padding: 6px 8px 6px 12px; background: rgba(40, 28, 4, 0.92); border: 1px solid var(--gold, #ffd166); border-radius: 10px; color: #ffe6a6; font-size: 13px; }
.fchip[hidden] { display: none; }
.fchip b { color: #fff; }
.fchip .x { position: static; white-space: nowrap; font-size: 12px; }


/* flight controls (note 54): a small HUD at the bottom centre, thin touch rings, a toast; no fixed sticks */
.flyhud { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.flyhud > * { pointer-events: auto; }
.fh-modes { display: flex; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }
.fh-modes button { border: none; background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; min-height: 0; }
.fh-modes button.primary { background: rgba(79, 216, 255, 0.18); color: var(--text); box-shadow: inset 0 0 0 1px rgba(79, 216, 255, 0.55); }
.fh-info, .fh-hint { display: none; font-size: 12px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
.fh-hint { color: var(--muted); transition: opacity 600ms; }
.flyhud.flying .fh-info, .flyhud.flying .fh-hint { display: block; }
.flyhud.quiet .fh-hint { opacity: 0; }
.tring { position: fixed; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 1px solid rgba(160, 200, 255, 0.35); background: rgba(120, 160, 255, 0.05); pointer-events: none; z-index: 9; }
.tring i { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 1px solid rgba(200, 225, 255, 0.7); background: rgba(200, 225, 255, 0.12); }
.ktoast { position: fixed; left: 50%; top: calc(var(--below, 128px) + 8px); transform: translateX(-50%); z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 7px 14px; font-size: 13.5px; color: var(--text); max-width: calc(100vw - 32px); }
.ktoast[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .fh-hint { transition: none; } }
.menu-h { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 6px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.menu-p kbd { display: inline-block; min-width: 18px; padding: 0 5px; margin-right: 6px; border: 1px solid var(--line); border-radius: 5px; font: 600 11.5px var(--mono, monospace); text-align: center; }
/* the Assets pane docked to the side while flying row to row (note 51) */
#assets.docked { right: auto; width: min(640px, 46vw); max-height: calc(100vh - var(--below, 128px) - 120px); }
#assets .as-acts { white-space: nowrap; }
#assets .as-acts button { font-size: 11px; padding: 2px 7px; margin-right: 3px; }
#assets tr.cur td { background: rgba(79, 216, 255, 0.14); }
#assets.docked { top: calc(var(--below, 128px) + 64px); }
#assets.docked .as-stats, #assets.docked .as-banner { display: none; }
#assets.docked .as-table :is(td, th)[class^="c-"]:not(.c-name, .c-class, .c-level) { display: none; }

/* note 61: the toolbar under the readout; every panel on the left below it, one at a time; the map bottom right */
#ktools { position: fixed; left: 16px; top: 120px; z-index: 6; display: flex; gap: 6px; align-items: center; max-width: calc(100vw - 32px); }
#ktools .tools { justify-content: flex-start; flex-wrap: wrap; }
#ktools .menu-p { left: 0; right: auto; }
#kMenuAll { display: none; }
#panel, #glossary, #design, #layers, #classes, #chapters, #segpanel, body .sfb-pane { left: 16px !important; right: auto !important; top: var(--below, 170px) !important; width: min(440px, calc(100vw - 32px)) !important; max-height: calc(100vh - var(--below, 170px) - 16px) !important; overflow: auto; }
#assets, #recon { left: 16px; right: auto; width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - var(--below, 170px) - 16px); }
#assets.docked { top: var(--below, 170px); width: min(560px, calc(100vw - 32px)); }
.partcard { left: 16px !important; top: var(--below, 170px) !important; max-height: calc(100vh - var(--below, 170px) - 16px); }
#locator { left: auto; right: 16px; bottom: 16px; }
#legend { right: 16px; bottom: calc(16px + 206px); max-height: calc(100vh - var(--hdr-b, 58px) - 260px); overflow: auto; }
#legend.folded > :not(.lg-key):not(.keys-chip) { display: none; }
#legend.folded { padding: 0; border: none; background: none; }
.lg-key { font-size: 12px; padding: 4px 10px; }
body:has(#panel:not([hidden])) #legend, body:has(.partcard:not([hidden])) #legend, body:has(.sfb-pane:not([hidden])) #legend { display: block; }
#banner { top: calc(var(--hdr-b, 58px) + 6px); }
.modelbar { top: calc(var(--hdr-b, 58px) + 6px); left: auto; right: 16px; transform: none; max-width: min(720px, 52vw); flex-wrap: wrap; }
body:has(.modelbar:not([hidden])) #banner { display: none; }
@media (max-width: 760px) {
  #kMenuAll { display: inline-block; }
  #ktools .tools { display: none; }
  #ktools.open .tools { display: flex; position: absolute; top: calc(100% + 6px); left: 0; width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
  #locator canvas { width: 160px; height: 90px; }
  #legend { bottom: calc(16px + 126px); }
}
/* note 62: where the project is */
#ktools { flex-direction: column; align-items: flex-start; }
#kproj { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; cursor: pointer; max-width: calc(100vw - 32px); }
.pj-pill { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); white-space: nowrap; }
.pj-pill b { color: var(--text); font-weight: 600; margin-left: 3px; }
.pj-pill.done { border-color: rgba(93, 255, 162, 0.55); color: #c9f5dd; }
.pj-pill.running, .pj-pill.drafted { border-color: rgba(79, 216, 255, 0.55); color: #cdeefc; }
.pj-pill.waiting { border-color: rgba(255, 209, 102, 0.5); color: #ffe6a6; }
.pj-pill.cur { background: rgba(79, 216, 255, 0.2); border-color: var(--cyan); color: #fff; box-shadow: 0 0 0 1px rgba(79, 216, 255, 0.4); }
.pj-pill.err { border-color: #ff4d6d; color: #ffd0d6; }
.pj-dl { font-size: 11.5px; white-space: nowrap; color: var(--text); border-color: var(--gold, #ffd166); margin-right: 6px; } .pj-dl b { color: var(--text); }
#kproj:hover .pj-pill { border-color: var(--cyan); }
.projpane .pj-step { margin: 8px 0; } .projpane .pj-f { margin: 4px 0 4px 10px; font-size: 13px; line-height: 1.4; }
.projpane .pj-f button { font-size: 11px; padding: 2px 8px; margin-left: 6px; }
.pj-st { display: inline-block; font-size: 10.5px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pj-st.running, .pj-st.done { border-color: rgba(93, 255, 162, 0.6); color: #c9f5dd; } .pj-st.designed, .pj-st.drafted { border-color: rgba(79, 216, 255, 0.6); color: #cdeefc; } .pj-st.concept { border-color: var(--violet, #c9a7ff); color: #ead9ff; } .pj-st.waiting { border-color: rgba(255, 209, 102, 0.6); color: #ffe6a6; }
.steptag { font-size: 11px; color: #cdeefc; border: 1px solid rgba(79, 216, 255, 0.45); border-radius: 999px; padding: 2px 9px; display: inline-block; margin: 0 0 6px; }
@media (max-width: 760px) { #kproj { flex-wrap: nowrap; overflow-x: auto; } }
/* the agent tray (note 63): a slim tab on the right edge */
.agtray { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 9; display: flex; align-items: flex-start; }
.ag-tab { writing-mode: vertical-rl; border-radius: 8px 0 0 8px; padding: 12px 6px; font-size: 12.5px; }
.ag-body { width: min(380px, calc(100vw - 60px)); max-height: 70vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px 0 0 10px; padding: 10px 12px; }
.ag-body[hidden] { display: none; }
.ag-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .ag-h .x { position: static; }
.ag-q { display: flex; gap: 6px; margin-top: 8px; } .ag-q input { flex: 1; font: inherit; color: var(--text); background: rgba(30, 44, 80, 0.75); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.ag-err { white-space: pre-wrap; font-size: 12px; color: #ffd0d6; }
#kproj { flex-direction: column; align-items: flex-start; gap: 3px; }
#kproj .pj-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pj-setup { cursor: pointer; font: inherit; font-size: 11.5px; }
.pj-setup-list { display: contents; } .pj-setup-list[hidden] { display: none; }
.pj-tracks .pj-lab { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pj-lane { font-size: 10.5px; padding: 1px 7px; border-radius: 4px; border: 1px dashed var(--line); color: var(--muted); }
.pj-lane.running, .pj-lane.done { border-style: solid; border-color: rgba(79, 216, 255, 0.55); color: #cdeefc; }
@media (max-width: 760px) { #kproj .pj-row { flex-wrap: nowrap; overflow-x: auto; max-width: calc(100vw - 32px); } }
.projpane .pj-req { border-top: 1px solid var(--line); padding: 6px 0; font-size: 12.5px; line-height: 1.4; } .projpane .pj-req small { color: var(--muted); } .projpane .pj-req button { font-size: 11px; padding: 2px 9px; margin-top: 3px; }
.projpane .pj-flt input, .projpane .pj-flt select { font: inherit; font-size: 12px; color: var(--text); background: rgba(30, 44, 80, 0.75); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.pj-rfp-pill { border-color: rgba(255, 209, 102, 0.5); }
.ag-body h4 { margin: 10px 0 4px; font-size: 11.5px; color: var(--gold, #ffd166); text-transform: uppercase; letter-spacing: 0.06em; }
.ag-n { margin: 4px 0; display: grid; gap: 2px; } .ag-n button { text-align: left; font-size: 12px; } .ag-n small { color: var(--muted); font-size: 11px; }
.ag-a { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; font-size: 13px; }
a.btnlike { display: inline-block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 12.5px; }
.projpane .pj-cmd { margin-top: 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; } .projpane .pj-cmd code { color: #cdeefc; }
.lk-tabs { display: flex; gap: 4px; margin: 10px 0 6px; flex-wrap: wrap; } .lk-tabs button { font-size: 12px; padding: 3px 9px; }
.lk-body p { margin: 4px 0; font-size: 13px; } .lk-row { border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 5px 0; font-size: 12.5px; } .lk-row small { color: var(--muted); } .lk-row button { font-size: 11px; padding: 1px 7px; }
#kasLink { font: inherit; font-size: 12px; color: var(--text); background: rgba(30, 44, 80, 0.75); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; }
body.theme-light .pj-pill, body.theme-light .pj-lane, body.theme-light .pj-lab { color: #1d2433; background: rgba(255, 255, 255, 0.92); }
body.theme-light .pj-pill b { color: #0b1020; } body.theme-light .pj-pill.cur { background: #d6efff; color: #0b1020; }
/* the spoken status (note 55) */
.ncap { position: fixed; left: 50%; transform: translateX(-50%); bottom: 64px; z-index: 9; max-width: min(760px, calc(100vw - 32px)); display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--gold, #ffd166); border-radius: 12px; padding: 8px 12px; font-size: 15px; color: var(--text); }
.ncap[hidden] { display: none; } .ncap .who { color: var(--gold, #ffd166); font-weight: 700; } .ncap .ncx { font-size: 12px; padding: 3px 9px; }
#classes .cl-g { font-size: 11px; color: var(--gold, #ffd166); text-transform: uppercase; letter-spacing: 0.07em; margin: 10px 0 2px; }
.lbl.place.ctx, .lbl.place.major.ctx { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 2px 7px; opacity: 0.85; }
.keys-legend { max-height: calc(100vh - var(--below, 160px) - 24px); overflow: auto; }
.keys-legend .kl-ctx { margin: 8px 0 10px; }
.keys-legend .kl-ctx h4 { margin: 0; font-size: 13px; }
.keys-legend .kl-ctx h4 em { font-style: normal; font-size: 11px; color: var(--gold, #ffd166); margin-left: 6px; }
.keys-legend .kl-ctx > small { display: block; opacity: 0.75; margin-bottom: 4px; }
.keys-legend .kl-ctx.now { border-left: 3px solid var(--gold, #ffd166); padding-left: 8px; }
.keys-legend .kl-g td { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; padding-top: 6px; }
.keys-chip.free { position: fixed; right: 16px; bottom: 16px; z-index: 6; }
.keys-chip { margin-right: 6px; font: 600 12px system-ui, sans-serif; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line, #3a4a66); background: var(--panel, rgba(10,16,30,0.9)); color: var(--ink, #e8eefc); cursor: pointer; }
body.ui-hidden .keys-chip { display: none; }
.keys-legend table { width: 100%; } .keys-legend td:first-child { width: 72px; white-space: nowrap; }
/* trays (notes 87, 91): one width for every tray, header bands, quiet status, room to read */
:root { --tray-w: clamp(460px, 32vw, 520px); }
#panel, #glossary, #design, #layers, #classes, #chapters, #segpanel, body .sfb-pane { width: min(var(--tray-w), calc(100vw - 32px)) !important; padding: 18px 20px !important; line-height: 1.5; }
.tray-band { position: sticky; top: -18px; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px -20px 8px; padding: 9px 20px; background: color-mix(in srgb, var(--panel, #0a1020) 82%, var(--accent, #4fd8ff) 18%); border-bottom: 1px solid var(--line); font-size: 14px; }
.tray-band b { font-weight: 700; }
.q-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.q-st i { width: 8px; height: 8px; border-radius: 50%; background: #8a94a8; flex: none; }
.q-st.running i, .q-st.done i { background: #3ccf7a; } .q-st.designed i, .q-st.in-progress i, .q-st.running-partly i { background: #f0b429; } .q-st.concept i, .q-st.not-started i { background: #8a94a8; } .q-st.blocked i, .q-st.late i { background: #ff4d5a; }
.projpane .pj-step { margin: 0 0 6px; } .projpane .pj-gate { margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
.projpane .pj-f { margin: 10px 0; font-size: 14px; } .projpane .pj-fl { display: flex; align-items: baseline; gap: 10px; } .projpane .pj-fl b { flex: 1; font-weight: 600; }
.projpane .pj-fl button { margin-left: auto; flex: none; font-size: 12px; padding: 3px 10px; } .projpane .pj-f small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.projpane h3.tray-h { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.flash { animation: kflash 1.8s ease-out; } @keyframes kflash { 0%, 40% { box-shadow: inset 0 0 0 2px var(--gold, #ffd166); background: rgba(255, 209, 102, 0.12); } 100% { box-shadow: none; } }
/* traffic (notes 73 to 78, 86): a small dot per mover, shape and colour by class, a card on hover; all simulated */
#movers { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
#movers .mv { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: auto; cursor: pointer; }
#movers .mv .g { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; background: var(--c); box-shadow: 0 0 6px var(--c), 0 0 0 1.5px rgba(0, 0, 0, 0.65); transform: rotate(var(--hd, 0rad)); }
#movers .sh-circle .g { border-radius: 50%; }
#movers .sh-circle .g::after { content: ""; position: absolute; left: 9px; top: 4px; border-left: 6px solid var(--c); border-top: 2px solid transparent; border-bottom: 2px solid transparent; }
#movers .sh-square .g { border-radius: 2px; width: 10px; height: 10px; left: -5px; top: -5px; }
#movers .sh-diamond .g { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); width: 14px; height: 14px; left: -7px; top: -7px; box-shadow: none; filter: drop-shadow(0 0 3px var(--c)); }
#movers .sh-triangle .g { clip-path: polygon(100% 50%, 0 0, 0 100%); width: 14px; height: 12px; left: -7px; top: -6px; box-shadow: none; filter: drop-shadow(0 0 3px var(--c)); }
#movers .mv .cd { position: absolute; left: 10px; top: -7px; font: 600 10px/1 ui-monospace, monospace; color: var(--c); text-shadow: 0 0 3px #000, 0 0 2px #000; letter-spacing: 0.04em; white-space: nowrap; }
#movers[data-labels="none"] .mv .cd { display: none; }
/* fuel: a steady, soft red orb (a hazard class), never pulsing; alerts pulse */
#movers .mv.fuel::before { content: ""; position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 40, 40, 0.55) 0%, rgba(255, 40, 40, 0.18) 55%, rgba(255, 40, 40, 0) 72%); }
#movers .tr { position: absolute; left: -1.5px; top: -1.5px; width: 3px; height: 3px; border-radius: 50%; background: var(--c); }
/* an exception: a pulsing magenta ring, its own hue (not a light's red, not the fuel orb) */
#movers .xh { position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid #ff2d95; box-shadow: 0 0 12px #ff2d95; animation: xpulse 1.1s ease-in-out infinite; pointer-events: auto; }
@keyframes xpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.mv-card { position: fixed; z-index: 9; pointer-events: none; min-width: 180px; max-width: 280px; background: var(--panel, rgba(8, 12, 24, 0.95)); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.4; color: var(--text); }
.mv-card .mv-sim, .trbar .tr-sim { font-size: 11px; color: var(--gold, #ffd166); text-transform: uppercase; letter-spacing: 0.06em; margin-left: 6px; }
.trbar { position: fixed; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 13px; }
.trbar button, .trbar select { font-size: 12px; padding: 3px 8px; } .trbar input[type=range] { width: 160px; }
.trbar .tr-feed { font-size: 12px; color: var(--muted); } .trbar .tr-feed.connected { color: #3ccf7a; } .trbar .tr-feed.disconnected { color: #ff4d5a; font-weight: 700; }
.trbar .tr-t { font: 12px ui-monospace, monospace; color: var(--muted); min-width: 92px; }
.xpane .x-row { padding: 10px 0; border-bottom: 1px solid var(--line); } .xpane .x-row small { display: block; color: var(--muted); margin-top: 3px; }
#movers .sh-x .g { clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); width: 14px; height: 14px; left: -7px; top: -7px; box-shadow: none; filter: drop-shadow(0 0 3px var(--c)); }
.trbar .tr-rwy { font-size: 12px; color: #e8f4ff; }
.lbl.place.site.ctx { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 2px 7px; opacity: 0.85; }
/* a key that could not act says so, larger, and long enough to read */
.ktoast.fail { font-size: 17px; font-weight: 600; padding: 12px 18px; border: 1.5px solid #ff7a59; max-width: min(640px, calc(100vw - 32px)); }
/* the Asset view (notes 82, 84, 87, 91): one strong header, the facts, the rudiment, then the tabs */
#panel.assetview .av-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding-right: 70px; }
#panel.assetview .av-name { font-size: 22px; line-height: 1.2; margin: 6px 0 4px; }
#panel.assetview .av-id { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
#panel.assetview .av-id code { color: var(--text); }
.av-rud { margin: 8px 0 14px; } .av-player { aspect-ratio: 16 / 9; width: 100%; border-radius: 10px; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--accent, #4fd8ff) 18%, var(--panel, #0a1020)) 0%, var(--panel, #0a1020) 70%); border: 1px solid var(--line); display: flex; align-items: flex-end; }
.av-cap { width: 100%; padding: 12px 14px; font-size: 15px; line-height: 1.45; background: rgba(0, 0, 0, 0.35); border-radius: 0 0 10px 10px; color: #f2f5fc; min-height: 3.2em; }
.av-rbar { display: flex; align-items: center; gap: 10px; margin-top: 8px; } .av-rbar .av-basis { font-size: 12px; }
.av-facts { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 12px; }
.av-facts td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.45; } .av-facts td:first-child { width: 34%; color: var(--muted); }
.av-facts small { display: block; color: var(--muted); margin-top: 2px; }
.av-none { color: var(--muted); font-style: italic; } .av-basis { font-size: 12px; color: var(--muted); white-space: nowrap; } .av-src { font-size: 12px; color: var(--muted); }
.av-grid { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 10px; } .av-grid th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 5px 6px; } .av-grid td { border-bottom: 1px solid var(--line); padding: 5px 6px; }
.lk-body h4 { margin: 14px 0 4px; font-size: 13px; }
.av-chart { width: 100%; height: auto; display: block; margin: 6px 0 10px; color: var(--text); }
.av-chart .g { stroke: var(--line); stroke-width: 1; } .av-chart .ax { fill: var(--muted); font-size: 11px; }
.av-chart .base { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.av-chart .s { fill: none; stroke: var(--accent, #4fd8ff); stroke-width: 2; stroke-linejoin: round; }
.av-chart .m { fill: var(--accent, #4fd8ff); stroke: var(--panel, #0a1020); stroke-width: 2; opacity: 0; } .av-chart .pt:hover .m { opacity: 1; } .av-chart .hit { fill: transparent; }
.av-more { margin: 14px 0 4px; border-top: 1px solid var(--line); padding-top: 10px; } .av-more summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.lk-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
:root { --accent: #4fd8ff; } body.theme-light { --accent: #1f5bc2; }
body.theme-light .av-cap { background: rgba(15, 31, 58, 0.78); }
.tray-grip { position: fixed; width: 9px; cursor: ew-resize; z-index: 5; }
.tray-grip[hidden] { display: none; }
.tray-grip:hover { background: linear-gradient(90deg, transparent 3px, var(--accent) 3px, var(--accent) 5px, transparent 5px); }
@media (pointer: coarse) and (max-width: 1366px) { #panel, #glossary, #design, #layers, #classes, #chapters, #segpanel, body .sfb-pane { top: var(--below, 170px) !important; bottom: 0 !important; max-height: none !important; border-radius: 12px 12px 0 0 !important; } .tray-grip { display: none; } }
.av-cand { border-bottom: 1px dotted var(--muted); cursor: help; }
.keypane .kp-row { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 9px 2px; cursor: pointer; color: var(--text); }
.keypane .kp-row:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.keypane .kp-sw { flex: none; width: 36px; padding-top: 3px; } .keypane .kp-t { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.keypane .kp-t small { color: var(--muted); font-size: 12.5px; line-height: 1.4; } .keypane .kp-ly { font-size: 11.5px; }
.kp-shape { position: relative; display: inline-block; width: 14px; height: 14px; } .kp-shape i { position: absolute; inset: 1px; background: var(--c); }
.kp-shape.sh-circle i { border-radius: 50%; } .kp-shape.sh-diamond i { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); } .kp-shape.sh-triangle i { clip-path: polygon(100% 50%, 0 0, 0 100%); }
.kp-shape.sh-x i { clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); }
/* a light out (note 71): a pulsing red square frame, its own form */
#movers .oh { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border: 2.5px solid #ff3b3b; box-shadow: 0 0 10px #ff3b3b; animation: xpulse 0.9s ease-in-out infinite; pointer-events: auto; }
.arm-hint { position: fixed; left: 50%; top: calc(var(--below, 128px) + 8px); transform: translateX(-50%); z-index: 21; background: var(--panel); border: 1.5px solid var(--accent); border-radius: 10px; padding: 10px 16px; font-size: 16px; font-weight: 600; }
/* the flow rail (notes 90 to 93, proposal behind ?rail=1) */
:root { --rail-w: 268px; }
.frail { position: fixed; left: 0; top: var(--below, 128px); bottom: 0; width: var(--rail-w); z-index: 5; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 10px 12px 14px 26px; }
.frail::before { content: ""; position: absolute; left: 14px; top: 44px; bottom: 40px; width: 2px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.frail .fr-head { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px -12px; } .frail .fr-head b { font-size: 15px; } .frail .fr-head small { font-size: 12px; color: var(--muted); }
.frail .fr-train { position: relative; height: 18px; margin-left: -12px; } .frail .fr-now { position: absolute; left: -10px; top: 0; font-size: 11.5px; font-weight: 700; color: var(--accent); }
.frail .fr-now::before { content: ""; position: absolute; left: -2px; top: 2px; width: 10px; height: 10px; margin-left: -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--panel); }
.frail .fr-g { margin: 12px 0 4px -12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.frail .fr-tab { position: relative; display: flex; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 7px 8px 8px 4px; color: var(--text); cursor: pointer; }
.frail .fr-tab:hover, .frail .fr-tab.open { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.frail .fr-dot { position: absolute; left: -17px; top: 11px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); background: var(--panel); }
.frail .st-done .fr-dot { background: #3ccf7a; border-color: #3ccf7a; } .frail .st-current .fr-dot, .frail .st-running .fr-dot { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.frail .st-late .fr-dot { left: -27px; border-color: #ff4d5a; background: #ff4d5a; } /* behind the train, in its own colour */
.frail .fr-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; } .frail .fr-t b { font-size: 14px; font-weight: 600; }
.frail .fr-t small { font-size: 12px; } .frail .fr-d { color: var(--muted); } .frail .fr-d em { font-style: normal; color: #ff8a5c; } .frail .fr-d em.past { color: #ffb44d; }
.frail .fr-bar { position: relative; height: 5px; margin-top: 4px; border-radius: 3px; background: color-mix(in srgb, var(--muted) 22%, transparent); } .frail .fr-bar.none { height: auto; background: none; font-size: 11px; color: var(--muted); }
.frail .fr-bar i { position: absolute; top: 0; height: 100%; border-radius: 3px; background: var(--accent); } .frail .fr-bar i.past { background: linear-gradient(90deg, var(--accent), #ffb44d); }
.frail .fr-bar b.dl { position: absolute; top: -3px; width: 2px; height: 11px; background: #ff8a5c; }
.frail .fr-foot { margin: 14px 0 0 -12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; } .frail .fr-foot b { color: #ff8a5c; }
body.has-rail #panel, body.has-rail #glossary, body.has-rail #design, body.has-rail #layers, body.has-rail #classes, body.has-rail #chapters, body.has-rail #segpanel, body.has-rail .sfb-pane, body.has-rail #assets, body.has-rail #recon { left: calc(var(--rail-w) + 12px) !important; }
@media (max-width: 1180px) { :root { --rail-w: 220px; } .frail .fr-d, .frail .fr-bar { display: none; } }
.av-page { display: flex; gap: 10px; align-items: flex-start; } .av-page img { width: 72px; height: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
