/* The demo console's styling (T38.4).
 *
 * No framework and no build step (SPEC-demo.md:273).  Sized for a room: this
 * page gets shown on someone else's screen, sometimes projected, so the type
 * is larger and the contrast higher than a dashboard would need.
 */

:root {
  --bg: #0f1115;
  --card: #171a21;
  --line: #262b36;
  --fg: #e8eaed;
  --muted: #9aa3b2;
  --accent: #6ea8fe;
  --ok: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  --radius: 10px;
}

/* The demo may be shown on a machine set to light mode; neither theme should
 * look like an accident. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --card: #ffffff;
    --line: #e3e6eb;
    --fg: #1b1f27;
    --muted: #5b6472;
    --accent: #0b5ed7;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0 0 3rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

.bar {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-weight: 400;
}

/* Deliberately not visually shouty, deliberately not hidden: it has to be
 * readable in a screenshot without dominating the page it qualifies. */
.disclaimer {
  margin: 0;
  max-width: 62ch;
  font-size: 0.85rem;
  color: var(--muted);
}

main {
  display: grid;
  gap: 1rem;
  max-width: 52rem;
  margin: 1.25rem auto 0;
  padding: 0 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.15rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

input[type="password"] {
  flex: 1 1 18rem;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

input[type="password"]:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  padding: 0.6rem 0.95rem;
  font: inherit;
  font-weight: 550;
  color: #fff;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

button.secondary {
  color: var(--fg);
  background: transparent;
  border-color: var(--line);
}

button:hover {
  filter: brightness(1.08);
}

.hint {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Status ─────────────────────────────────────────────────────────────── */

.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
}

.dot {
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--muted);
}

/* The state lives in a data attribute so app.js sets one value and the colour,
 * the label and any future affordance stay together here. */
.dot[data-state="ready"] {
  background: var(--ok);
}
.dot[data-state="warming"] {
  background: var(--warn);
}
.dot[data-state="error"],
.dot[data-state="unreachable"] {
  background: var(--bad);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem 1rem;
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.facts div {
  min-width: 0;
}

dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

dd {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

/* ── Transcript ─────────────────────────────────────────────────────────── */

.controls {
  align-items: center;
  margin-bottom: 0.9rem;
}

.conn {
  font-size: 0.9rem;
  color: var(--muted);
}

.file-pick {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.file-pick input[type="file"] {
  max-width: 15rem;
  font: inherit;
  color: var(--muted);
}

.file-pick input[type="file"]:disabled {
  opacity: 0.5;
}

.transcript {
  min-height: 6rem;
  font-size: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

#finals div {
  margin-bottom: 0.4rem;
}

/* Provisional text is visibly provisional: it is going to be retracted and
 * rewritten (api-guide.md:353), and a reader who cannot tell it apart from a
 * committed line will read the revision as the service stuttering. */
.provisional {
  color: var(--muted);
  font-style: italic;
}
