:root {
  --bg: #10100e;
  --panel: #181714;
  --panel-2: #201e19;
  --panel-3: #28251f;
  --line: #39352c;
  --line-strong: #575044;
  --text: #f3efe5;
  --muted: #a9a094;
  --quiet: #756f66;
  --teal: #4ecdc4;
  --green: #84d86d;
  --amber: #f4b942;
  --coral: #ff6b57;
  --blue: #6da8ff;
  --paper: #fff8e7;
  --shadow: rgba(0, 0, 0, 0.34);
  --font-ui: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

.tunnel-card { display: block; }
.tunnel-help { margin: 4px 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.tunnel-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: 10px; }
.tunnel-form button { padding: 6px 12px; }
.tunnel-form .tunnel-field { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.tunnel-form .tunnel-field input {
  margin-top: 4px;
  width: 90px;
  padding: 6px 8px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.tunnel-form-status { font-size: 12px; color: var(--muted); }
.tunnel-list { display: flex; flex-direction: column; gap: 10px; }
.tunnel-empty { color: var(--quiet); font-size: 12.5px; }
.tunnel-row {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tunnel-row.tunnel-ready { border-color: var(--green); }
.tunnel-row.tunnel-closed { opacity: 0.6; }
.tunnel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tunnel-state {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.tunnel-state-ready { background: rgba(132, 216, 109, 0.15); color: var(--green); border-color: rgba(132, 216, 109, 0.45); }
.tunnel-state-pending { background: rgba(244, 185, 66, 0.12); color: var(--amber); border-color: rgba(244, 185, 66, 0.4); }
.tunnel-state-closed { background: rgba(255, 107, 87, 0.12); color: var(--coral); border-color: rgba(255, 107, 87, 0.4); }
.tunnel-note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.tunnel-snippet {
  margin: 0;
  padding: 8px 10px;
  background: var(--panel-3);
  border-radius: 6px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  overflow-x: auto;
  user-select: all;
}
.tunnel-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tunnel-actions button { padding: 4px 10px; font-size: 12px; }
.tunnel-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--blue);
  font-size: 12px;
  text-decoration: none;
}
.tunnel-link:hover { border-color: var(--blue); }
.tunnel-close { align-self: flex-start; font-size: 12px; padding: 4px 10px; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    linear-gradient(90deg, rgba(78, 205, 196, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(244, 185, 66, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
}

a { color: inherit; }
button, input, select, textarea {
  font: inherit;
}
button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--text);
  cursor: pointer;
}
button:hover { border-color: var(--teal); }
button:disabled { color: var(--quiet); cursor: not-allowed; border-color: var(--line); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--paper);
  color: #15130f;
  font-weight: 900;
  box-shadow: 0 10px 30px var(--shadow);
}
.brand.compact .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(244, 185, 66, 0.16);
}
.status-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(132, 216, 109, 0.14);
}
.status-dot.err {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 87, 0.14);
}

/* Landing */
.landing { overflow-x: hidden; }
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(16, 16, 14, 0.82);
  border-bottom: 1px solid rgba(255, 248, 231, 0.08);
  backdrop-filter: blur(18px);
}
.site-nav nav {
  display: flex;
  gap: 8px;
}
.site-nav nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}
.site-nav nav a:hover {
  background: rgba(255, 248, 231, 0.08);
  color: var(--text);
}
.landing-hero {
  position: relative;
  min-height: 84vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(420px, 1fr);
  gap: clamp(24px, 5vw, 84px);
  align-items: center;
  padding: 112px clamp(18px, 5vw, 72px) 56px;
  overflow: hidden;
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 70px 0 auto auto;
  width: 58vw;
  height: 72vh;
  background:
    linear-gradient(135deg, rgba(78, 205, 196, 0.16), transparent 42%),
    linear-gradient(315deg, rgba(244, 185, 66, 0.14), transparent 44%);
  clip-path: polygon(18% 0, 100% 14%, 88% 100%, 0 82%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 740px;
}
.hero-copy h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 0.96;
  font-weight: 850;
}
.lede {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.primary-action,
.secondary-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 700;
}
.primary-action {
  background: var(--paper);
  color: #171510;
}
.secondary-action {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 248, 231, 0.06);
}
.hero-command {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 23, 20, 0.76);
  color: var(--muted);
  font-family: var(--font-mono);
}
.hero-command span {
  color: var(--amber);
  font-weight: 700;
}
.hero-command code {
  white-space: normal;
  overflow-wrap: anywhere;
}
.hero-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}
.relay-map {
  display: grid;
  grid-template-columns: 1fr 58px 1fr 58px 1fr;
  align-items: center;
}
.node {
  min-height: 138px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 23, 20, 0.9);
  box-shadow: 0 18px 50px var(--shadow);
}
.node-label {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}
.node strong,
.node em {
  display: block;
}
.node strong {
  margin-top: 16px;
  overflow-wrap: anywhere;
  font-size: 16px;
}
.node em {
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
}
.pulse-line {
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--amber) 0 10px, transparent 10px 18px);
  opacity: 0.9;
}
.preview-console {
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(16, 16, 14, 0.94);
  box-shadow: 0 24px 70px var(--shadow);
}
.preview-top,
.preview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.preview-top {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.preview-token { color: var(--teal); }
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.preview-card {
  min-height: 70px;
  padding: 12px;
  border-radius: 7px;
  background: var(--panel);
  border-left: 3px solid var(--teal);
  font-family: var(--font-mono);
}
.preview-card strong {
  color: var(--text);
  font-size: 12px;
}
.accent-amber { border-left-color: var(--amber); }
.accent-coral { border-left-color: var(--coral); }
.preview-console pre {
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-radius: 7px;
  background: #0a0a09;
  color: #d8d1c4;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
}
.landing-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 clamp(18px, 5vw, 72px) 64px;
  border: 1px solid var(--line);
  background: var(--line);
}
.landing-band > div {
  min-height: 190px;
  padding: 26px;
  background: rgba(24, 23, 20, 0.94);
}
.landing-band h2 {
  margin: 0 0 12px;
  font-size: 22px;
}
.landing-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Usage */
.usage-page {
  min-height: 100vh;
}
.usage-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 126px clamp(16px, 4vw, 44px) 64px;
}
.usage-hero {
  max-width: 860px;
  margin-bottom: 34px;
}
.usage-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
}
.usage-hero p:last-child {
  max-width: 740px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}
.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.usage-grid article,
.usage-notes > div {
  padding: 24px;
  background: rgba(24, 23, 20, 0.94);
}
.usage-grid span {
  color: var(--teal);
  font-family: var(--font-mono);
  font-weight: 700;
}
.usage-grid h2,
.usage-notes h2 {
  margin: 10px 0 8px;
  font-size: 22px;
}
.usage-grid p,
.usage-notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.usage-grid pre {
  margin: 18px 0 0;
  padding: 14px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 248, 231, 0.08);
  background: #0a0a09;
  color: #e5dfd1;
  white-space: pre-wrap;
}
.usage-grid code {
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}
.usage-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--line);
}
.usage-notes a {
  color: var(--teal);
}

/* Viewer */
.viewer {
  height: 100vh;
  overflow: hidden;
}
.session-header {
  height: 58px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 16, 14, 0.94);
}
.session-state {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.session-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-actions {
  display: flex;
  gap: 8px;
}
.header-actions button {
  padding: 0 12px;
}
.header-actions button.active {
  border-color: var(--amber);
  color: var(--amber);
}
.session-shell {
  height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: 380px minmax(360px, 1fr) 310px;
  min-width: 0;
}
.command-dock,
.stream-panel,
.inspector {
  min-height: 0;
  border-right: 1px solid var(--line);
}
.command-dock,
.inspector {
  overflow-y: auto;
  background: rgba(24, 23, 20, 0.84);
}
.command-dock {
  padding: 16px;
}
.dock-head,
.panel-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dock-head h1,
.panel-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}
.search,
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #11100e;
  color: var(--text);
  padding: 9px 10px;
}
.field textarea {
  min-height: 116px;
  resize: vertical;
  font-family: var(--font-mono);
}
.code-editor {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0c0b09;
  overflow: hidden;
}
.code-editor:focus-within {
  border-color: var(--teal);
}
.code-editor-stack {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
}
.code-gutter {
  margin: 0;
  padding: 10px 8px 10px 12px;
  background: rgba(255, 248, 231, 0.03);
  border-right: 1px solid var(--line);
  color: var(--quiet);
  text-align: right;
  user-select: none;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
  overflow: hidden;
  min-width: 40px;
}
.code-editor-content {
  position: relative;
  min-height: 0;
}
.code-editor-content pre.code-highlight,
.code-editor-content textarea.code-editor-input {
  margin: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  white-space: pre;
  tab-size: 4;
  -moz-tab-size: 4;
  box-sizing: border-box;
}
.code-editor-content pre.code-highlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  color: var(--text);
  white-space: pre;
}
.code-editor-content textarea.code-editor-input {
  position: relative;
  width: 100%;
  min-height: 220px;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: var(--text);
  resize: vertical;
  outline: none;
  white-space: pre;
  overflow: auto;
}
.code-editor-content textarea.code-editor-input::selection {
  background: rgba(78, 205, 196, 0.32);
  color: transparent;
}
.code-editor .editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 4px 10px;
  background: rgba(255, 248, 231, 0.04);
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-family: var(--font-mono);
  font-size: 11px;
}
.code-editor .editor-footer .editor-lang {
  color: var(--teal);
}
.code-editor .editor-footer .editor-hint {
  color: var(--quiet);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.event .body .row-actions {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
  vertical-align: 2px;
}
.event .body .row-actions button {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255, 248, 231, 0.04);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.event .body .row-actions button:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.tok-comment  { color: #6f6356; font-style: italic; }
.tok-string   { color: #e0c984; }
.tok-variable { color: #6da8ff; }
.tok-cmdlet   { color: #4ecdc4; }
.tok-keyword  { color: #ff9966; font-weight: 600; }
.tok-operator { color: #c8b9ff; }
.tok-type     { color: #84d86d; }
.tok-number   { color: #f4b942; }
.tok-param    { color: #d6c682; }
.search:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--teal);
}
.risk-note {
  margin: 10px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 185, 66, 0.34);
  border-radius: 7px;
  background: rgba(244, 185, 66, 0.08);
  color: #e8d7a8;
  line-height: 1.45;
}
.commands {
  display: grid;
  gap: 14px;
}
.empty-state {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.45;
}
.command-group {
  display: grid;
  gap: 8px;
}
.command-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.command-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  background: rgba(16, 16, 14, 0.78);
  overflow: hidden;
}
.command-card.risky {
  border-left-color: var(--amber);
}
.command-card summary {
  list-style: none;
  cursor: pointer;
  padding: 12px;
}
.command-card summary::-webkit-details-marker {
  display: none;
}
.command-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.command-title strong {
  overflow-wrap: anywhere;
}
.risk-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(244, 185, 66, 0.42);
  border-radius: 999px;
  color: var(--amber);
  padding: 3px 7px;
  font-size: 11px;
}
.command-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.command-form {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}
.field {
  display: grid;
  gap: 5px;
}
.field label {
  color: var(--muted);
  font-size: 12px;
}
.field.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}
.field.checkbox input {
  width: auto;
  min-height: auto;
}
.run-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.run-row input {
  width: 96px;
  min-height: 34px;
  font-size: 12px;
}
.run-row button {
  min-width: 74px;
  padding: 0 14px;
  background: var(--paper);
  color: #171510;
  border-color: transparent;
  font-weight: 750;
}
.form-status {
  color: var(--muted);
  font-size: 12px;
}
.stream-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  padding: 16px;
  background: rgba(16, 16, 14, 0.76);
}
.stream {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0a;
}
.event {
  display: grid;
  grid-template-columns: 88px minmax(120px, 176px) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 248, 231, 0.07);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
}
.event:last-child { border-bottom: none; }
.event .time { color: var(--quiet); white-space: nowrap; }
.event .kind { color: var(--teal); overflow-wrap: anywhere; }
.event .body { min-width: 0; color: #ddd6c8; white-space: pre-wrap; overflow-wrap: anywhere; }
.event.error .kind,
.event.error .body { color: var(--coral); }
.event.warn .kind { color: var(--amber); }
.event.ok .kind { color: var(--green); }
.event.queued .kind { color: var(--blue); }
.event .body .err-chip {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: 1px;
  color: #11100e;
  background: var(--coral);
}
.event .body .err-chip.rate,
.event .body .err-chip.size { background: var(--amber); }
.event .body .err-chip.declined,
.event .body .err-chip.invalid,
.event .body .err-chip.ssrf,
.event .body .err-chip.notfound,
.event .body .err-chip.missing,
.event .body .err-chip.generic { background: var(--coral); }
.event .body .err-chip.unsupported,
.event .body .err-chip.timeout { background: var(--blue); color: #fff; }
.event .body .err-chip.pending { background: var(--quiet); color: #11100e; }
.inspector {
  border-right: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 16px;
}
.inspector section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.inspector section:last-child {
  border-bottom: 0;
}
.facts {
  display: grid;
  gap: 8px;
  margin: 0;
}
.facts div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
}
.facts dt {
  color: var(--quiet);
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 12px;
}
.kind-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kind-cloud code {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.kind-cloud code.risky {
  border-color: rgba(244, 185, 66, 0.42);
  color: var(--amber);
}
.kind-cloud code.unavailable {
  opacity: 0.44;
}
.last-command {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  box-shadow: 0 18px 50px var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .landing-hero {
    grid-template-columns: 1fr;
  }
  .session-shell {
    grid-template-columns: 340px minmax(360px, 1fr);
  }
  .inspector {
    display: none;
  }
}

@media (max-width: 760px) {
  body { font-size: 13px; }
  .site-nav {
    position: static;
    padding: 14px 16px;
  }
  .site-nav nav {
    display: none;
  }
  .landing-hero {
    min-height: auto;
    padding: 42px 16px 34px;
  }
  .hero-copy h1 {
    font-size: 48px;
  }
  .relay-map,
  .preview-grid,
  .landing-band,
  .usage-grid,
  .usage-notes {
    grid-template-columns: 1fr;
  }
  .pulse-line {
    height: 32px;
    width: 2px;
    justify-self: center;
    background: repeating-linear-gradient(180deg, var(--amber) 0 10px, transparent 10px 18px);
  }
  .landing-band {
    margin: 0 16px 40px;
  }
  .usage-shell {
    padding: 42px 16px 40px;
  }
  .usage-hero h1 {
    font-size: 42px;
  }
  .viewer {
    height: auto;
    overflow: auto;
  }
  .session-header {
    height: auto;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 12px;
  }
  .header-actions {
    flex-wrap: wrap;
  }
  .session-shell {
    height: auto;
    display: block;
  }
  .command-dock,
  .stream-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stream-panel {
    height: 70vh;
  }
  .event {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
