/* adaptableui — stylish TNG/LCARS-inspired system chrome */
:root {
  --void: #050508;
  --bg: #000000;
  --panel: #0a0a0e;
  --elev: #101018;
  --gutter: #000000;
  --fg: #e8e4f0;
  --dim: #8a8499;
  --amber: #f7a54a;
  --amber-hot: #ffb86a;
  --amber-deep: #c4782a;
  --peach: #e8a070;
  --lilac: #b8a0e8;
  --violet: #7b68b8;
  --violet-deep: #4a3a78;
  --cyan: #7ec8d8;
  --ok: #9dcc8a;
  --warn: #e0b060;
  --bad: #e07878;
  --ink-on-block: #0a0610;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r-pill: 1.65rem;
  --gap: 3px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font: 13.5px/1.45 var(--mono);
  overflow-x: hidden;
}

a { color: var(--lilac); text-decoration: none; }
a:hover { color: var(--amber-hot); }

button, input, textarea, select {
  font: inherit;
  color: var(--fg);
}

/* —— Field / ambience —— */
#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

#beam {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(
    100deg,
    transparent 40%,
    rgba(247, 165, 74, 0.07) 48%,
    rgba(184, 160, 232, 0.06) 52%,
    transparent 60%
  );
  background-size: 240% 100%;
  animation: sweep 16s linear infinite;
}
@keyframes sweep {
  0% { background-position: 160% 0; opacity: 0; }
  4% { opacity: 1; }
  18% { background-position: -60% 0; opacity: 0; }
  100% { background-position: -60% 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #beam { animation: none; opacity: 0; }
}

#scan {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.03;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.65) 4px
  );
}

/* —— Shell with LCARS side rails —— */
.shell {
  position: relative;
  z-index: 3;
  min-height: 100%;
  display: grid;
  grid-template-columns: 4.25rem 1fr 3.5rem;
  grid-template-rows: auto auto auto 1fr auto;
  grid-template-areas:
    "tl top tr"
    "tl coords tr"
    "tl dock tr"
    "sl stage sr"
    "bl bottom br";
  gap: var(--gap);
  padding: var(--gap);
  background: var(--gutter);
  min-height: 100vh;
}

/* Corner / rail blocks */
.lcars-tl {
  grid-area: tl;
  background: linear-gradient(165deg, var(--amber-hot) 0%, var(--amber) 40%, var(--amber-deep) 100%);
  border-radius: 0 0 var(--r-pill) 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.5rem 0.2rem 0.85rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--ink-on-block);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lcars-tr {
  grid-area: tr;
  background: linear-gradient(195deg, var(--lilac) 0%, var(--violet) 55%, var(--violet-deep) 100%);
  border-radius: 0 0 0 var(--r-pill);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.lcars-sl {
  grid-area: sl;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
}
.lcars-sl .seg {
  flex: 1;
  min-height: 2.5rem;
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.lcars-sl .seg.a { background: var(--peach); flex: 1.4; }
.lcars-sl .seg.b { background: var(--violet); flex: 0.7; }
.lcars-sl .seg.c { background: var(--amber); flex: 1.1; }
.lcars-sl .seg.d { background: var(--violet-deep); flex: 0.55; }
.lcars-sl .seg.e { background: var(--amber-deep); flex: 0.9; }

.lcars-sr {
  grid-area: sr;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.lcars-sr .seg {
  flex: 1;
  min-height: 2rem;
  border-radius: var(--r-pill) 0 0 var(--r-pill);
}
.lcars-sr .seg.a { background: var(--violet); flex: 0.8; }
.lcars-sr .seg.b { background: var(--amber-hot); flex: 1.2; }
.lcars-sr .seg.c { background: var(--lilac); flex: 0.6; }
.lcars-sr .seg.d { background: var(--peach); flex: 1; }

.lcars-bl {
  grid-area: bl;
  background: linear-gradient(15deg, var(--violet-deep), var(--violet));
  border-radius: 0 var(--r-pill) 0 0;
  min-height: 2.4rem;
}

.lcars-br {
  grid-area: br;
  background: linear-gradient(345deg, var(--amber-deep), var(--amber));
  border-radius: var(--r-pill) 0 0 0;
  min-height: 2.4rem;
}

/* Top bar — classic segmented LCARS header */
.topbar {
  grid-area: top;
  display: flex;
  align-items: stretch;
  gap: var(--gap);
  min-height: 2.75rem;
  background: var(--gutter);
}

.topbar .elbow-left {
  width: 3.5rem;
  background: var(--amber);
  border-radius: 0 0 var(--r-pill) 0;
  flex-shrink: 0;
  position: relative;
}
.topbar .elbow-left::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: 0;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--gutter);
  border-radius: var(--r-pill) 0 0 0;
}

.brand-block {
  display: flex;
  align-items: center;
  padding: 0 1.1rem;
  background: linear-gradient(180deg, var(--amber-hot), var(--amber));
  color: var(--ink-on-block);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 0 0 var(--r-pill) 0;
  white-space: nowrap;
  box-shadow: 0 0 24px rgba(247, 165, 74, 0.15);
}
.brand-block .ui {
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.08em;
}

.top-seg {
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-on-block);
  white-space: nowrap;
}
.top-seg.amber { background: var(--peach); border-radius: 0 0 var(--r-pill) var(--r-pill); }
.top-seg.violet { background: var(--lilac); border-radius: 0 0 var(--r-pill) var(--r-pill); color: var(--ink-on-block); }
.top-seg.deep { background: var(--violet-deep); color: var(--lilac); border-radius: 0 0 var(--r-pill) var(--r-pill); }
.top-seg.grow {
  flex: 1;
  background: linear-gradient(90deg, var(--violet) 0%, var(--violet-deep) 100%);
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  justify-content: center;
  gap: 0.5rem;
  color: var(--fg);
  font-weight: 500;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
}
.top-seg .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(157, 204, 138, 0.8);
}
.top-seg .dot.warn { background: var(--warn); }

.top-nav {
  display: flex;
  gap: var(--gap);
  align-items: stretch;
}
.top-nav a {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: var(--amber-deep);
  color: var(--ink-on-block);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  transition: filter 0.15s, background 0.15s;
}
.top-nav a:hover,
.top-nav a[aria-current="page"] {
  background: var(--amber-hot);
  color: var(--ink-on-block);
  filter: brightness(1.05);
}

.topbar .elbow-right {
  width: 2.75rem;
  background: var(--lilac);
  border-radius: 0 0 0 var(--r-pill);
  flex-shrink: 0;
}

/* Coords strip */
.coords {
  grid-area: coords;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
  padding: 0.35rem 0.85rem;
  background: var(--panel);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  border-left: 0.55rem solid var(--violet);
}
.coords b {
  color: var(--amber-hot);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.coords .seac { color: var(--lilac); }
.coords .lampc { color: var(--amber-hot); }

/* Dock as LCARS button row */
.dock {
  grid-area: dock;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-items: stretch;
  padding: 0;
  background: var(--gutter);
  min-height: 2.1rem;
}
.dock .label {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: var(--violet-deep);
  color: var(--lilac);
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
}
.dock button,
.dock label.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-on-block);
  background: var(--peach);
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: filter 0.12s, transform 0.12s;
}
.dock button:hover,
.dock label.file-btn:hover {
  filter: brightness(1.1);
}
.dock button.primary {
  background: linear-gradient(180deg, var(--amber-hot), var(--amber));
  color: var(--ink-on-block);
  box-shadow: 0 0 16px rgba(247, 165, 74, 0.25);
}
.dock button:nth-child(3n) { background: var(--lilac); }
.dock button:nth-child(4n) { background: var(--amber); }
.dock button:nth-child(5n) { background: var(--peach); }
.dock button.primary { background: linear-gradient(180deg, var(--amber-hot), var(--amber)); }
.dock .sep {
  width: var(--gap);
  align-self: stretch;
  background: var(--gutter);
  margin: 0;
}
.dock input[type="file"] { display: none; }
.dock .status {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--elev);
  border-radius: var(--r-pill) 0 0 var(--r-pill);
}
.dock .status.ok { color: var(--ok); }
.dock .status.bad { color: var(--bad); }

/* Stage */
.stage {
  grid-area: stage;
  position: relative;
  padding: 0.85rem 1rem 1rem;
  min-height: calc(100vh - 11rem);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(74, 58, 120, 0.12), transparent 55%),
    var(--void);
  perspective: 1400px;
  transform-style: preserve-3d;
  overflow: hidden;
}

.stage-intro {
  position: absolute;
  left: 1rem;
  top: 0.65rem;
  z-index: 5;
  max-width: 24rem;
  pointer-events: none;
}
.stage-intro h1 {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-hot);
  text-shadow: 0 0 28px rgba(247, 165, 74, 0.25);
}
.stage-intro h1 span {
  color: var(--lilac);
  text-shadow: 0 0 20px rgba(184, 160, 232, 0.3);
}
.stage-intro p {
  margin: 0;
  color: var(--dim);
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 22rem;
  letter-spacing: 0.02em;
}

/* Bottom rail */
.bottom-rail {
  grid-area: bottom;
  display: flex;
  gap: var(--gap);
  min-height: 2.35rem;
  background: var(--gutter);
}
.bottom-rail .seg {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-on-block);
}
.bottom-rail .seg.a {
  flex: 1.4;
  background: var(--amber);
  border-radius: var(--r-pill) var(--r-pill) 0 0;
}
.bottom-rail .seg.b {
  flex: 0.6;
  background: var(--violet);
  border-radius: var(--r-pill) var(--r-pill) 0 0;
  color: var(--fg);
}
.bottom-rail .seg.c {
  flex: 1;
  background: var(--peach);
  border-radius: var(--r-pill) var(--r-pill) 0 0;
}
.bottom-rail .seg.d {
  flex: 0.8;
  background: var(--violet-deep);
  border-radius: var(--r-pill) var(--r-pill) 0 0;
  color: var(--lilac);
  justify-content: center;
}

/* Holoscreens — LCARS framed windows */
.holo {
  position: absolute;
  background: linear-gradient(165deg, rgba(16, 16, 28, 0.97) 0%, rgba(8, 8, 14, 0.98) 100%);
  border: none;
  border-radius: 0 var(--r-pill) 0.35rem 0.35rem;
  box-shadow:
    0 0 0 1px rgba(184, 160, 232, 0.12),
    0 14px 40px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(74, 58, 120, 0.12);
  overflow: hidden;
  will-change: transform, opacity;
  min-width: 220px;
  min-height: 120px;
}
.holo::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.55rem;
  background: linear-gradient(180deg, var(--amber-hot), var(--violet));
  border-radius: 0 0 0 0.2rem;
  pointer-events: none;
  z-index: 2;
}
.holo::after {
  /* top-right LCARS bite */
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 2.4rem;
  height: 2.4rem;
  background:
    radial-gradient(circle at 100% 0, var(--gutter) 1.15rem, transparent 1.2rem);
  pointer-events: none;
  z-index: 2;
}
.holo:hover,
.holo:focus-within,
.holo.is-focus {
  box-shadow:
    0 0 0 1px rgba(247, 165, 74, 0.45),
    0 18px 50px rgba(0, 0, 0, 0.6),
    0 0 48px rgba(247, 165, 74, 0.12);
  z-index: 20 !important;
}
.holo.is-dim {
  opacity: 0.34;
  filter: saturate(0.85);
}
.holo.is-focus { opacity: 1 !important; filter: none; }
.holo.is-dragging {
  opacity: 1 !important;
  cursor: grabbing;
  z-index: 40 !important;
  transition: none;
}
.holo.is-hidden { display: none !important; }

.holo-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 2.2rem 0.35rem 1rem;
  background: linear-gradient(90deg, var(--amber) 0%, var(--peach) 42%, var(--lilac) 100%);
  color: var(--ink-on-block);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: grab;
  user-select: none;
  border-radius: 0 var(--r-pill) 0 0;
}
.holo.is-dragging .holo-head { cursor: grabbing; }
.holo-head .id {
  color: var(--ink-on-block);
  opacity: 0.7;
  font-size: 0.9rem;
}
.holo-head .tag {
  flex: 1;
  text-align: center;
  color: var(--ink-on-block);
  font-weight: 600;
}
.holo-head .tools {
  display: flex;
  gap: 0.2rem;
}
.holo-head .tools button {
  background: rgba(0, 0, 0, 0.22);
  border: none;
  color: var(--ink-on-block);
  padding: 0.1rem 0.4rem;
  cursor: pointer;
  border-radius: 999px;
  font-size: 0.85rem;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.2;
}
.holo-head .tools button:hover {
  background: rgba(0, 0, 0, 0.4);
}

.holo-body {
  padding: 0.55rem 0.75rem 0.75rem 1rem;
  font-size: 0.78rem;
  color: var(--fg);
  max-height: min(52vh, 420px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--violet-deep) transparent;
}
.holo-body > strong {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-hot);
}
.holo-body p { margin: 0 0 0.5rem; color: var(--dim); }
.holo-body p:last-child { margin-bottom: 0; }

.elbow { display: none; }

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.4rem 0;
}
.metric {
  border: none;
  border-radius: var(--r-pill);
  padding: 0.2rem 0.55rem;
  background: var(--violet-deep);
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lilac);
}
.metric b {
  color: var(--amber-hot);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0;
}
.metric.ok b { color: var(--ok); }
.metric.sea b { color: var(--cyan); }
.metric.lamp b { color: var(--amber-hot); }

.bar {
  height: 0.45rem;
  background: #1a1528;
  border-radius: var(--r-pill);
  overflow: hidden;
  margin: 0.35rem 0 0.55rem;
}
.bar > i {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--violet), var(--amber-hot));
  border-radius: var(--r-pill);
  transition: width 0.35s ease;
}

.log {
  font-size: 0.7rem;
  color: var(--dim);
  max-height: 7.5rem;
  overflow: auto;
}
.log .ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log .ln::before { content: "› "; color: var(--amber); }

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.field label {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lilac);
  font-weight: 600;
}
.field input[type="text"],
.field input[type="url"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  background: #0c0a14;
  border: 1px solid #2a2440;
  border-radius: 0.25rem var(--r-pill) 0.25rem 0.25rem;
  padding: 0.45rem 0.6rem;
  outline: none;
  color: var(--fg);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px rgba(247, 165, 74, 0.25);
}
.field textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.45;
  font-size: 0.78rem;
}
.field textarea.tall { min-height: 11rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.4rem 0;
}
.btn-row button {
  background: var(--violet);
  border: none;
  border-radius: var(--r-pill);
  padding: 0.32rem 0.7rem;
  color: var(--fg);
  cursor: pointer;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: filter 0.12s;
}
.btn-row button:hover { filter: brightness(1.12); }
.btn-row button.primary {
  background: linear-gradient(180deg, var(--amber-hot), var(--amber));
  color: var(--ink-on-block);
}
.btn-row button.danger:hover {
  background: var(--bad);
  color: var(--ink-on-block);
}

.task-list, .link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 12rem;
  overflow: auto;
}
.task-list li, .link-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #1e1830;
  font-size: 0.75rem;
}
.task-list li.done span {
  text-decoration: line-through;
  color: var(--dim);
}
.task-list li input[type="checkbox"] {
  accent-color: var(--amber);
  margin-top: 0.15rem;
}
.task-list li button,
.link-list li button {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  padding: 0 0.25rem;
  font-size: 1rem;
}
.task-list li button:hover,
.link-list li button:hover { color: var(--bad); }
.link-list li a {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lilac);
}

.timer-face {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--amber-hot);
  text-shadow: 0 0 24px rgba(247, 165, 74, 0.35);
  text-align: center;
  padding: 0.45rem 0;
  font-variant-numeric: tabular-nums;
}
.timer-face.running {
  color: var(--lilac);
  text-shadow: 0 0 24px rgba(184, 160, 232, 0.4);
}

.json-out {
  font-size: 0.68rem;
  color: var(--dim);
  margin-top: 0.35rem;
  min-height: 1.2rem;
}
.json-out.ok { color: var(--ok); }
.json-out.bad { color: var(--bad); }

/* Mode rail — vertical LCARS */
.rail {
  position: fixed;
  right: 4.25rem;
  bottom: 3.25rem;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: 9.5rem;
}
.rail .hint {
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 0.15rem 0.25rem;
  line-height: 1.3;
}
.rail button {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-on-block);
  background: var(--peach);
  border: none;
  border-radius: var(--r-pill);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  text-align: left;
  transition: filter 0.12s, box-shadow 0.12s;
}
.rail button:nth-child(3) { background: var(--lilac); }
.rail button:nth-child(4) { background: var(--amber); }
.rail button:nth-child(5) { background: var(--violet); color: var(--fg); }
.rail button:hover,
.rail button.is-on {
  filter: brightness(1.12);
  box-shadow: 0 0 18px rgba(247, 165, 74, 0.25);
}
.rail button.is-on {
  outline: 2px solid var(--amber-hot);
  outline-offset: 1px;
}

/* About page */
.about-shell {
  position: relative;
  z-index: 3;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 3rem;
}
.about-shell .lcars-banner {
  display: flex;
  gap: var(--gap);
  margin-bottom: 1.25rem;
  min-height: 2.5rem;
}
.about-shell .lcars-banner span {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-on-block);
  font-size: 1.1rem;
}
.about-shell .lcars-banner .a {
  background: var(--amber);
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
  flex: 1.2;
}
.about-shell .lcars-banner .b {
  background: var(--violet);
  border-radius: var(--r-pill);
  color: var(--fg);
  flex: 0.6;
}
.about-shell .lcars-banner .c {
  background: var(--peach);
  border-radius: var(--r-pill) 0 0 var(--r-pill);
  flex: 0.8;
}
.about-wrap h1 {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: var(--amber-hot);
}
.about-wrap h1 span { color: var(--lilac); }
.about-wrap p { color: var(--dim); margin: 0 0 1rem; line-height: 1.55; }
.about-wrap h2 {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lilac);
  margin: 1.75rem 0 0.5rem;
  font-weight: 700;
}
.about-wrap ul { color: var(--dim); margin: 0 0 1rem; padding-left: 1.2rem; }
.about-wrap li { margin: 0.35rem 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 1.25rem; }
.swatch {
  width: 3.4rem;
  height: 2.3rem;
  border-radius: var(--r-pill);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.2rem;
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-on-block);
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 0.65rem 1fr 0.45rem;
    grid-template-areas:
      "tl top tr"
      "tl coords tr"
      "tl dock tr"
      "tl stage tr"
      "bl bottom br";
  }
  .lcars-tl, .lcars-tr, .lcars-sl, .lcars-sr { font-size: 0; }
  .lcars-tl { writing-mode: horizontal-tb; transform: none; border-radius: 0; }
  .topbar { flex-wrap: wrap; }
  .brand-block { font-size: 1.1rem; letter-spacing: 0.1em; }
  .top-seg.grow { min-width: 100%; order: 10; border-radius: 0; }
  .stage { min-height: auto; perspective: none; padding-top: 0.5rem; }
  .stage-intro { position: relative; left: 0; top: 0; margin-bottom: 0.75rem; pointer-events: auto; }
  .holo {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    margin-bottom: 0.65rem;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
  .rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none;
    padding: 0.5rem;
    right: auto;
    bottom: auto;
  }
  .dock .status { width: 100%; border-radius: var(--r-pill); margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .holo { transition: opacity 0.15s; }
}
