/* theme.css: the pixel chrome around the team area (W2, ruling 30). The canal palette of the world's skin, under its
   own names (--c-…) on body, so it never meets the paper panel's --bg … --tint on :root. Monospace system fonts, hard
   2 px borders, square corners, a 3 px drop shadow. The page itself sits in the paper panel, styled by the layout. */

body.px {
  --c-bg: #0b0f22; --c-chrome: #141a30; --c-chrome2: #1c2440; --c-line: #2a3354; --c-ink: #e8e4d8; --c-muted: #8a92ad;
  --c-gold: #c9a227; --c-ok: #3bb273; --c-warn: #f0b429; --c-alert: #e5383b; --c-unknown: #6b7280;
  --c-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  margin: 0; min-height: 100vh; background: var(--c-bg); color: var(--c-ink); font: 13px/1.4 var(--c-mono);
}
.px-row { max-width: 1540px; margin: 0 auto; padding: 0 16px; }

/* the top bar (DESIGN-WORLD.md 9.1): where you are, your way, the lamps, the switch; one row, two on a phone */
.px-bar { background: var(--c-chrome); border-bottom: 2px solid var(--c-line); }
.px-bar .px-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 8px; padding-bottom: 8px; }
.px-where { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; flex: 1 1 320px; }
.px-where .px-rung, .px-where .px-item { display: inline-block; background: var(--c-chrome2); border: 2px solid var(--c-line); color: var(--c-muted); font: 700 11px/1 var(--c-mono); letter-spacing: 2px; padding: 5px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-where a.px-rung { color: var(--c-ink); text-transform: uppercase; }
.px-where a.px-rung:hover, .px-where a.px-rung:focus-visible { background: #2a3458; }
.px-where .px-item[aria-current="page"] { background: var(--c-gold); border-color: #8a6d14; color: #1a1730; letter-spacing: 1px; max-width: min(46ch, 100%); }
.px-sep { font-style: normal; color: var(--c-muted); }
.px-doors { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.px-doors a, .px-doors button { display: inline-block; font: 700 11px/1 var(--c-mono); letter-spacing: 1px; padding: 6px 9px; border: 2px solid var(--c-line); background: var(--c-chrome2); color: var(--c-ink); white-space: nowrap; box-shadow: 3px 3px 0 rgba(0, 0, 0, .45); }
.px-doors a:hover, .px-doors a:focus-visible, .px-doors button:hover { background: #2a3458; }
.px-doors .px-mine { border-color: #8a6d14; color: var(--c-gold); }
.px-doors .px-waits b { color: #fff; }
.px-doors .px-waits[data-level="waiting"] { background: #f0c419; border-color: #21140c; color: #1a1730; }
.px-doors .px-waits[data-level="waiting"] b { color: #1a1730; }
.px-doors .px-waits[data-level="waiting"]:hover { background: #ffd84a; }
.px-doors form { display: inline; margin: 0; }
.px-doors button { cursor: pointer; color: var(--c-muted); box-shadow: none; }
.px-doors button:hover { color: var(--c-ink); }
.px-lamps { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.px-lamp { display: inline-flex; align-items: center; gap: 5px; font: 700 10px/1 var(--c-mono); letter-spacing: 1px; color: #d8d4c8; padding: 4px 0; }
.px-lamp i { width: 9px; height: 9px; border: 1px solid #000; background: var(--c-unknown); }
.px-lamp.px-ok i { background: var(--c-ok); } .px-lamp.px-warn i { background: var(--c-warn); } .px-lamp.px-alert i { background: var(--c-alert); }
.px-lamp b { color: #fff; font-weight: 700; }
.px-lamp:hover, .px-lamp:focus-visible { color: #fff; }
.px-switch { display: inline-flex; border: 2px solid var(--c-line); box-shadow: 3px 3px 0 rgba(0, 0, 0, .45); }
.px-switch a { font: 700 11px/1 var(--c-mono); letter-spacing: 2px; padding: 6px 10px; color: var(--c-muted); background: var(--c-chrome2); }
.px-switch a + a { border-left: 2px solid var(--c-line); }
.px-switch a[aria-pressed="true"] { background: var(--c-gold); color: #1a1730; }
.px-switch a:hover { color: var(--c-ink); }

/* the way back: "◀" and the plaque of the page's building, in its department's colours, with a hard 2 px border */
.px-back { max-width: 1540px; margin: 0 auto; padding: 14px 16px 0; }
.px-back a { display: inline-flex; align-items: center; gap: 8px; color: var(--c-muted); font: 700 14px/1 var(--c-mono); }
.px-back a:hover, .px-back a:focus-visible { color: var(--c-ink); }
.plaque { display: inline-block; background: var(--plaque, var(--c-chrome)); color: var(--plaque-ink, var(--c-gold)); border: 2px solid #000; box-shadow: 3px 3px 0 rgba(0, 0, 0, .45); font: 700 14px/1 var(--c-mono); letter-spacing: 2px; text-transform: uppercase; padding: 7px 12px; max-width: calc(100vw - 72px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-back a:hover .plaque, .px-back a:focus-visible .plaque { outline: 2px solid var(--c-gold); }

/* a phone: the bar takes two lines; where you are shows its last two rungs; the lamps their squares, the label in
   their title; MY BUILDING and WAITS FOR YOU stay whole; nothing scrolls sideways */
@media (max-width: 600px) {
  .px-bar .px-row { gap: 6px 8px; padding-left: 8px; padding-right: 8px; }
  .px-where { flex: 1 1 100%; flex-wrap: nowrap; }
  .px-where > :nth-last-child(n+4) { display: none; }
  .px-where .px-item[aria-current="page"] { flex: 1 1 auto; min-width: 0; }
  .px-where a.px-rung { flex: 0 1 auto; min-width: 0; }
  .px-doors { gap: 6px; }
  .px-doors a, .px-doors button { font-size: 10px; letter-spacing: .5px; padding: 6px 6px; }
  .px-doors button { padding-left: 2px; padding-right: 2px; }
  .px-lamps { gap: 4px 6px; }
  .px-lamp { font-size: 0; gap: 0; padding: 6px 2px; }
  .px-lamp i { width: 11px; height: 11px; }
  .px-switch a { padding: 6px 7px; letter-spacing: 1px; }
  .px-back { padding: 10px 8px 0; }
  .plaque { font-size: 12px; padding: 6px 9px; }
}

/* the paper panel: the page as it was */
main.paper { display: block; max-width: calc(100% - 32px); margin: 18px auto 0; border: 2px solid #141a30; border-radius: 0; box-shadow: 3px 3px 0 rgba(0, 0, 0, .45); padding-bottom: 32px; }
.px-chrome main.paper { max-width: min(1540px, calc(100% - 32px)); }
@media (max-width: 599px) { main.paper { max-width: calc(100% - 16px); margin-top: 10px; } .px-chrome main.paper { max-width: calc(100% - 16px); } }
.px-bare:not(.px-scene) main.paper { max-width: min(1000px, calc(100% - 16px)); margin: 24px auto; }

/* the foot line */
.px-foot { color: var(--c-muted); font: 11px/1.5 var(--c-mono); letter-spacing: .5px; padding: 14px 0 28px; }
.px-foot a { color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-line); text-underline-offset: 3px; }

/* the way in: a canal at dusk behind the sign-in panel (scene.js), or its sky in CSS without the script */
.px-scene { background: linear-gradient(to bottom, #1b1f4c 0%, #47326f 30%, #a04c78 52%, #e88a6a 66%, #f8c078 74%, #4a3f64 74.5%, #2c2540 100%) fixed; }
.px-scenery { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; image-rendering: pixelated; image-rendering: crisp-edges; }
.px-scenery:not([width]) { display: none; }
.px-scene main.paper { position: relative; z-index: 1; max-width: min(420px, calc(100% - 32px)); margin: max(24px, 5vh) auto 32px; padding: 24px 4px 20px; }
.px-scene .login { max-width: none; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }

/* the terminal view: plain text for a model, plainly not dressed for people */
body.term { margin: 0; background: #07090b; color: #9fb3a4; font: 13px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; }
.term-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 12px; border-bottom: 1px solid #1d2a22; color: #6f8577; }
.term-bar a, .term-bar button { color: #c6d8ca; }
.term-name { color: #6f8577; letter-spacing: 2px; }
body.term .px-switch { border: 1px solid #2c3c31; box-shadow: none; }
body.term .px-switch a { background: transparent; color: #6f8577; font-size: 12px; line-height: 1; padding: 4px 8px; letter-spacing: 1px; }
body.term .px-switch a + a { border-left: 1px solid #2c3c31; }
body.term .px-switch a[aria-pressed="true"] { background: #1d2a22; color: #c6d8ca; }
#copy { font: inherit; background: #1d2a22; border: 1px solid #2c3c31; padding: 3px 10px; cursor: pointer; }
#copy[hidden], #copy-key[hidden] { display: none; }
#terminal { margin: 0; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
#terminal a { color: #c6d8ca; }
