:root {
  color-scheme: dark;
  --bg: #020303;
  --panel: rgba(9, 13, 12, .94);
  --line: rgba(154, 236, 182, .22);
  --text: #ecf6e9;
  --muted: #9bb2a0;
  --green: #9aebb6;
  --amber: #dcc075;
  --red: #ff7b6d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 78% 8%, rgba(154, 236, 182, .12), transparent 26%), var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

a { color: inherit; }

.glyph-header, .glyph-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(1, 3, 3, .88);
}

.glyph-footer { border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--green); color: var(--green); }
.brand strong, .brand small { display: block; }
.brand small, .kicker, .surface-overlay small { color: var(--muted); text-transform: uppercase; font-size: 12px; }
.glyph-nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.glyph-nav a { text-decoration: none; }

main { padding: clamp(28px, 8vw, 92px) clamp(14px, 4vw, 48px); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

h1 { margin: 6px 0 14px; font-size: clamp(40px, 7.2vw, 82px); line-height: .95; }
h2 { margin: 0; font-size: clamp(20px, 3vw, 28px); }
p { line-height: 1.75; }
p span, h2 span, h2 small { display: block; }

.status-card, .panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(10, 16, 14, .96), rgba(2, 4, 4, .96));
  border-radius: 8px;
  box-shadow: inset 0 0 30px rgba(154, 236, 182, .05);
}

.status-card { display: grid; gap: 12px; padding: 18px; color: var(--muted); }
.status-card span + span { border-top: 1px dashed rgba(236, 246, 233, .14); padding-top: 12px; }

.mirror-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  gap: 18px;
}

.panel { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; gap: 14px; align-items: end; margin-bottom: 16px; }
.canvas-shell { position: relative; border: 1px solid rgba(236, 246, 233, .22); background: #000; overflow: hidden; }
video { display: none; }
canvas { display: block; width: 100%; height: min(58vw, 520px); min-height: 320px; touch-action: none; background: #000; }

.surface-overlay {
  position: absolute;
  left: 18px;
  bottom: 16px;
  display: grid;
  gap: 4px;
  pointer-events: none;
  color: var(--green);
}

.control-stack { display: grid; gap: 14px; align-content: start; }
.button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
button {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(236, 246, 233, .24);
  background: rgba(24, 32, 28, .9);
  color: var(--text);
  font: inherit;
  border-radius: 6px;
  cursor: pointer;
}
button.primary { background: var(--green); color: #06100a; font-weight: 800; }

.meter-stack { display: grid; gap: 18px; }
.meter-stack label { display: grid; grid-template-columns: 76px 1fr 42px; gap: 10px; align-items: center; font-size: 13px; }
meter { width: 100%; }
.glyph-sample { display: grid; gap: 8px; color: var(--muted); }

.notes-panel {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 24px;
  margin-top: 28px;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
}
.notes-panel small { color: var(--muted); margin-top: 6px; }

@media (max-width: 820px) {
  .glyph-header, .hero, .mirror-layout, .notes-panel { grid-template-columns: 1fr; }
  .glyph-header { align-items: flex-start; flex-direction: column; }
  h1 { font-size: clamp(36px, 13vw, 58px); overflow-wrap: anywhere; }
  .panel-head { display: block; }
  .button-grid { grid-template-columns: 1fr; }
  canvas { height: 420px; min-height: 300px; }
}
