/* laravel-rust-lab — one look for every demo: an instrument panel, not a marketing page.
   Dark ground, one accent, monospace readouts, and the canvas is the hero. */

/* ---- type: the faces projektgopher.com uses, served from this kit (SIL Open Font Licence 1.1,
   see fonts/LICENCE.md). Latin subsets. ---- */
@font-face { font-family: "DM Serif Display"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/dm-serif-display-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/courier-prime-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/courier-prime-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/nunito-sans-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/nunito-sans-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/nunito-sans-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/caveat-400-normal.woff2") format("woff2"); }

:root {
  /* print: the lab's paper and ink, from projektgopher.com (one accent: its brick rust) */
  --lab-paper: #fffbeb;
  --lab-paper-deep: #f6efd9;
  --lab-ink: #1c1917;
  --lab-ink-soft: #44403b;
  --lab-ink-faint: #8a8279;
  --lab-rule: #1c191726;
  --lab-rust: #9f2d00;
  --lab-serif: "DM Serif Display", "Iowan Old Style", Georgia, serif;
  --lab-type: "Courier Prime", ui-monospace, Menlo, monospace;
  --lab-text-face: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lab-hand: "Caveat", "Bradley Hand", cursive;
  --lab-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .1 0 0 0 0 .09 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --lab-ground: #0a0c0f;
  --lab-panel: #11151a;
  --lab-raised: #181d24;
  --lab-line: #242b35;
  --lab-text: #d9dee6;
  --lab-muted: #7f8a99;
  --lab-faint: #4a5361;
  --lab-accent: #f2a93b;          /* the one accent: amber, like an old panel lamp */
  --lab-accent-dim: #f2a93b33;
  --lab-good: #7fd4a0;            /* status only, never decoration */
  --lab-bad: #ef7a6d;
  --lab-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --lab-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --lab-bar-height: 44px;
  --lab-aside-width: 288px;
  --lab-radius: 4px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body.lab {
  background: var(--lab-ground);
  color: var(--lab-text);
  font: 13px/1.45 var(--lab-sans);
  display: grid;
  grid-template-rows: var(--lab-bar-height) 1fr;
  overflow: hidden;
}

a { color: var(--lab-accent); }

/* ---- the bar ---- */
.lab-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 0 12px;
  background: var(--lab-panel);
  border-bottom: 1px solid var(--lab-line);
  min-width: 0;
}
.lab-mark {
  font: 600 11px/1 var(--lab-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--lab-ground); background: var(--lab-accent);
  padding: 5px 7px; border-radius: 2px; text-decoration: none;
}
.lab-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.lab-title h1 { font: 600 14px/1 var(--lab-mono); margin: 0; white-space: nowrap; }
.lab-title p { margin: 0; color: var(--lab-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lab-readouts {
  margin-left: auto; display: flex; gap: 14px; align-items: center;
  font: 12px/1 var(--lab-mono); color: var(--lab-muted); white-space: nowrap; overflow: hidden;
}
.lab-readout b { color: var(--lab-text); font-weight: 500; font-variant-numeric: tabular-nums; }
.lab-readout i { font-style: normal; color: var(--lab-faint); margin-left: 3px; }
.lab-readout.is-live::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--lab-good); margin-right: 6px; vertical-align: 1px;
}
.lab-readout.is-down::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--lab-bad); margin-right: 6px; vertical-align: 1px;
}

/* ---- controls ---- */
.lab-button {
  font: 12px/1 var(--lab-mono); color: var(--lab-text);
  background: var(--lab-raised); border: 1px solid var(--lab-line); border-radius: var(--lab-radius);
  padding: 7px 10px; cursor: pointer;
}
.lab-button:hover { border-color: var(--lab-faint); }
.lab-button[aria-pressed="true"], .lab-button[aria-expanded="true"], .lab-button.is-on {
  border-color: var(--lab-accent); color: var(--lab-accent); background: var(--lab-accent-dim);
}

/* ---- the stage: the canvas is the hero ---- */
.lab-main { display: grid; grid-template-columns: 1fr auto; min-height: 0; }
.lab-stage {
  position: relative; min-width: 0; min-height: 0; overflow: hidden;
  display: grid; place-items: center; background: #000;
}
.lab-canvas { display: block; max-width: 100%; max-height: 100%; image-rendering: auto; }
.lab-canvas.is-fill { width: 100%; height: 100%; object-fit: contain; }
.lab-stage-note {
  position: absolute; left: 12px; bottom: 10px;
  font: 11px/1.3 var(--lab-mono); color: var(--lab-muted); pointer-events: none;
}

.lab-aside {
  width: var(--lab-aside-width); overflow-y: auto;
  background: var(--lab-panel); border-left: 1px solid var(--lab-line);
  padding: 12px; display: flex; flex-direction: column; gap: 14px;
}
.lab-group { display: flex; flex-direction: column; gap: 6px; }
.lab-group > h3, .lab-label {
  margin: 0; font: 500 10px/1 var(--lab-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lab-muted);
}
.lab-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lab-aside input[type="range"] { width: 100%; accent-color: var(--lab-accent); }
.lab-aside select, .lab-aside input[type="text"], .lab-aside input[type="number"] {
  font: 12px/1 var(--lab-mono); color: var(--lab-text); background: var(--lab-ground);
  border: 1px solid var(--lab-line); border-radius: var(--lab-radius); padding: 6px 8px; width: 100%;
}
.lab-value { font: 12px/1 var(--lab-mono); color: var(--lab-text); font-variant-numeric: tabular-nums; }

/* ---- the "how this works" drawer ---- */
.lab-drawer {
  position: fixed; top: var(--lab-bar-height); right: 0; bottom: 0; width: min(720px, 92vw);
  background: var(--lab-panel); border-left: 1px solid var(--lab-line);
  overflow-y: auto; padding: 16px 18px 40px; z-index: 10;
  box-shadow: -24px 0 48px #0009;
}
.lab-drawer[hidden] { display: none; }
.lab-drawer header h2 { margin: 0 0 4px; font: 600 14px/1.2 var(--lab-mono); }
.lab-drawer header p { margin: 0 0 16px; color: var(--lab-muted); }
.lab-snippet { margin: 0 0 18px; }
.lab-snippet figcaption {
  display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px;
  font: 12px/1.2 var(--lab-mono);
}
.lab-snippet figcaption span { color: var(--lab-faint); }
.lab-snippet pre {
  margin: 0; padding: 12px; overflow-x: auto;
  background: var(--lab-ground); border: 1px solid var(--lab-line); border-radius: var(--lab-radius);
  font: 12px/1.5 var(--lab-mono); color: var(--lab-text); tab-size: 4;
}
