/*
 * A published page.
 *
 * The widget classes are the console's, because the renderer is the console's -
 * one drawing path serving both surfaces is the point, and a second stylesheet
 * that drifted would mean a page looked different to the public than to the
 * operator who published it.
 *
 * The palette is repeated here rather than shared. The console's stylesheet
 * lives inside its index.html, which the public app deliberately does not
 * serve: pulling it in would mean putting the admin console's markup on the
 * public origin to get at its colours.
 */
:root {
  --bg: #12151a; --panel: #191d24; --line: #262c36; --ink: #d6dbe3;
  --dim: #7d8797; --faint: #4d5563; --accent: #5aa9e6;
  --ok: #4ac48a; --stale: #e0b341; --down: #e05c5c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 8px;
  background: var(--bg);
  color: var(--ink);
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#page { position: relative; }

.gw { box-sizing: border-box; display: flex; align-items: center; justify-content: center;
      color: var(--ink); font-size: 13px; overflow: hidden; }
.gw-text { padding: 2px 6px; text-align: center; white-space: pre-wrap; }
.gw-readout .gw-text { font-size: 20px; color: #fff; }
.gw-todo { color: var(--faint); font-size: 11px; border: 1px dashed var(--line);
           padding: 4px 8px; border-radius: 3px; }
.gw-lamp { flex-direction: column; gap: 4px; }
.gw-lamp-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--dim);
               box-shadow: 0 0 6px rgba(0,0,0,.6) inset; }
.gw-bar { flex-direction: column; gap: 4px; }
.gw-bar-track { width: 100%; height: 12px; background: #10131a; border: 1px solid var(--line);
                border-radius: 6px; overflow: hidden; }
.gw-bar-fill { height: 100%; background: var(--accent); transition: width .3s; }
.gw-gauge { flex-direction: column; gap: 2px; }
.gw-gauge-svg { width: 100%; max-height: 100%; }
.gw-gauge-track { fill: none; stroke: #10131a; stroke-width: 9; }
.gw-gauge-arc { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .3s; }
.gw-gauge-text { font-size: 14px; color: #fff; }
.gw-chart { flex-direction: column; gap: 2px; }
.gw-spark { width: 100%; height: 100%; }
.gw-spark-line { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.gw-chart-text { font-size: 11px; color: var(--dim); }
.gw-include { position: relative; width: 100%; height: 100%; overflow: hidden; }
.gw-image { max-width: 100%; max-height: 100%; object-fit: contain; }
.gw-button { font: inherit; }
.gw-box { align-items: flex-start; justify-content: flex-start; border: 1px solid var(--line);
          background: var(--panel); border-radius: 4px; }
.gw-box-title { font-size: 11px; letter-spacing: .5px; color: var(--dim); padding: 6px 10px;
                text-transform: uppercase; }
.gw-linkbtn { font: inherit; color: var(--accent); background: #1d3346; border: 1px solid #2a4a66;
           border-radius: 4px; padding: 6px 12px; cursor: pointer; text-decoration: none;
           width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.gw-linkbtn:hover { background: #24405a; border-color: var(--accent); }
.gw-link-dead { color: var(--dim); }
.gw-clock { flex-direction: column; }
.gw-clock-face { font-size: 22px; color: #fff; }
.gw-table { align-items: flex-start; }
table.gw-grid { width: 100%; border-collapse: collapse; font-size: 12px; }
table.gw-grid caption { text-align: left; color: var(--dim); font-size: 11px; padding: 4px 8px; }
table.gw-grid td { padding: 3px 8px; border-bottom: 1px solid var(--line); }
.gw-table-label { color: var(--dim); }
.gw-table-value { color: #fff; text-align: right; }
.gw-table-stale { color: var(--stale); } .gw-table-fault { color: var(--down); }
.gw-table-dim td { color: var(--faint); }

/*
 * The one-shot message pages: account linking, and anything else that is a
 * sentence and a heading rather than a graphic.
 *
 * Here rather than inline in the page, because publicApp serves the strict CSP
 * and an inline <style> is silently dropped - which is invisible in a test and
 * obvious to every player at once.
 */
.msg {
  max-width: 30rem;
  margin: 12vh auto;
  padding: 0 1.25rem;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.msg h1 { color: var(--accent); font-size: 1.4rem; margin: 0 0 .5rem; }
.msg p { color: var(--dim); margin: 0; line-height: 1.6; }

@keyframes gwblink { 50% { opacity: .35; } }
.gw-blink { animation: gwblink 1s step-end infinite; }
@media (prefers-reduced-motion: reduce) { .gw-blink { animation: none; outline-style: dashed; } }
