:root {
  color-scheme: dark;
  --bg: #08090d;
  --bg-2: #0b0d12;
  --panel: #0e1017;
  --panel-2: #131621;
  --ink: #f6f3f7;
  --muted: #aaa5b5;
  --dim: #686476;
  --line: rgba(255, 255, 255, 0.105);
  --line-strong: rgba(125, 233, 240, 0.28);
  --cyan: #7de9f0;
  --cyan-soft: rgba(125, 233, 240, 0.08);
  --font-sans: "SF Pro Text", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "SF Pro Display", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(130deg, rgba(125, 233, 240, 0.08), transparent 34%),
    linear-gradient(180deg, #08090d 0%, #0a0c11 46%, #08090d 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 32px 0 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 26%, rgba(125, 233, 240, 0.055) 26% 26.15%, transparent 26.15% 100%),
    linear-gradient(242deg, transparent 0 19%, rgba(255, 255, 255, 0.045) 19% 19.12%, transparent 19.12% 100%);
  opacity: 0.78;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
}

button:disabled {
  opacity: 0.5;
}

input:disabled,
textarea:disabled {
  color: var(--muted);
}

.beta-strip {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 32px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(7, 8, 12, 0.86);
  color: var(--muted);
  font-size: 13px;
  backdrop-filter: blur(16px);
}

.beta-strip a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(125, 233, 240, 0.38);
}

.console-app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: calc(100vh - 32px);
}

.sidebar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(125, 233, 240, 0.07), transparent 36%),
    rgba(8, 9, 13, 0.9);
  backdrop-filter: blur(18px);
}

.sidebar-head,
.workspace-top {
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.console-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 850;
  letter-spacing: 0;
}

.console-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(125, 233, 240, 0.26));
}

.avatar {
  display: grid;
  place-items: center;
  border: 1px solid rgba(125, 233, 240, 0.34);
  border-radius: 8px;
  background: rgba(125, 233, 240, 0.075);
  color: var(--cyan);
  font-weight: 900;
  box-shadow: 0 0 32px rgba(125, 233, 240, 0.08);
}

.command-nav {
  padding: 24px 18px;
}

.command-nav > span,
.session-card span,
.dock-card span,
.receipt-mini span,
.surface-header span,
.message span,
.prompt-row button,
.radar-grid span,
.starter-list span,
.stats-row span,
.docs-grid span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.command-nav > span {
  display: block;
  margin: 0 0 14px 8px;
  color: var(--dim);
}

.command-nav button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 0 12px 0 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.command-nav button::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 2px;
  border-radius: 99px;
  background: transparent;
}

.command-nav button i {
  width: 34px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
}

.command-nav button:hover,
.command-nav button.active {
  border-color: rgba(125, 233, 240, 0.3);
  background: rgba(125, 233, 240, 0.075);
  color: var(--ink);
  transform: translateX(2px);
}

.command-nav button.active::before {
  background: var(--cyan);
}

.command-nav button.active i {
  color: var(--cyan);
}

.sidebar-bottom {
  min-width: 0;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.session-card,
.quota-card,
.dock-card,
.receipt-mini,
.surface-shell,
.radar-grid article,
.starter-list article,
.stats-row article,
.docs-grid article,
.empty-state,
.studio-prompt {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(13, 15, 22, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.session-card {
  width: 100%;
  min-width: 0;
  padding: 13px;
}

.quota-card {
  display: grid;
  gap: 11px;
  width: 100%;
  min-width: 0;
  margin-top: 10px;
  padding: 13px;
}

.bridge-card-top,
.quota-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.session-card span,
.quota-card span,
.dock-card span,
.receipt-mini span,
.surface-header span,
.message span,
.radar-grid span,
.starter-list span,
.stats-row span,
.docs-grid span {
  color: var(--cyan);
}

.session-card strong,
.session-card small,
.quota-card strong,
.quota-card small {
  display: block;
}

.session-card strong,
.quota-card-top strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
}

.session-card strong::before,
.quota-card-top strong::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(125, 233, 240, 0.55);
}

.session-card small,
.quota-card small {
  display: block;
  max-width: 100%;
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
}

.session-card small {
  margin-top: 10px;
}

.quota-meter {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(125, 233, 240, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.quota-meter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(125, 233, 240, 0.95), rgba(111, 239, 163, 0.92));
  transition: width 180ms ease;
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quota-grid div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.022);
}

.quota-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.quota-grid strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  min-width: 0;
}

.console-menu-toggle {
  display: none;
}

.workspace-top {
  position: sticky;
  top: 0;
  z-index: 10;
  justify-content: space-between;
  background: rgba(8, 9, 13, 0.78);
  backdrop-filter: blur(18px);
}

.workspace-title {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.shell-mark {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 18px;
}

.workspace-title strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
}

.workspace-title small {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  color: var(--dim);
  font-size: 12px;
}

.workspace-title small i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(125, 233, 240, 0.72);
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.top-actions button,
.top-actions a,
.dock-card button,
.studio-prompt button,
.composer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
}

.top-actions button,
.top-actions a,
.dock-card button,
.studio-prompt button {
  padding: 0 16px;
}

.top-actions .connect,
.dock-card button,
.studio-prompt button {
  border-color: rgba(125, 233, 240, 0.35);
  background: rgba(125, 233, 240, 0.08);
  color: var(--cyan);
}

.top-actions .connect.is-authenticated {
  border-color: rgba(111, 239, 163, 0.34);
  background: rgba(111, 239, 163, 0.1);
  color: #9df0ba;
}

body.is-watch-only .top-actions .connect,
body.is-watch-only .dock-card button,
body.is-watch-only .studio-prompt button {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.top-actions .logout {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.026);
}

.top-actions .logout[hidden] {
  display: none;
}

.top-actions button:hover,
.top-actions a:hover,
.dock-card button:hover,
.studio-prompt button:hover,
.composer button:hover,
.prompt-row button:hover {
  border-color: rgba(125, 233, 240, 0.42);
  color: var(--ink);
}

.surface {
  display: none;
  min-height: calc(100vh - 106px);
  padding: 34px;
}

.surface.active {
  display: block;
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 18px;
  max-width: 1260px;
  min-height: calc(100vh - 174px);
  margin: 0 auto;
}

.chat-stage {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: calc(100vh - 174px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(125, 233, 240, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 28%),
    linear-gradient(135deg, rgba(125, 233, 240, 0.05), transparent 38%),
    rgba(9, 10, 15, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 26px 90px rgba(0, 0, 0, 0.32);
}

.chat-stage::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(125, 233, 240, 0.75), transparent 68%);
}

.stage-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 34%, rgba(125, 233, 240, 0.06) 34% 34.16%, transparent 34.16% 100%),
    linear-gradient(248deg, transparent 0 22%, rgba(255, 255, 255, 0.04) 22% 22.12%, transparent 22.12% 100%);
}

.stage-head {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  padding: 68px 34px 18px;
  text-align: center;
}

.avatar {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
}

.stage-head p {
  margin: 0 0 12px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stage-head h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 6vw, 86px);
  line-height: 0.92;
  letter-spacing: 0;
}

.prompt-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 24px 18px;
}

.prompt-row button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.transcript {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px;
}

.message {
  width: min(100%, 660px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 9, 13, 0.72);
}

.message span {
  display: block;
  margin-bottom: 8px;
}

.message p {
  margin: 0;
  color: #dcd8e4;
  white-space: pre-line;
}

.message small {
  display: block;
  margin-top: 10px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
}

.message code,
.dock-card code,
.docs-grid code {
  color: var(--cyan);
  font-family: var(--font-mono);
}

.user-message {
  margin-left: auto;
  border-color: rgba(125, 233, 240, 0.26);
  background: rgba(125, 233, 240, 0.07);
}

.composer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 24px 24px;
  padding: 10px;
  border: 1px solid rgba(125, 233, 240, 0.2);
  border-radius: 8px;
  background: rgba(10, 11, 16, 0.94);
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.34);
}

body.is-watch-only .composer {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(10, 11, 16, 0.72);
}

.composer input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.composer button {
  min-width: 42px;
  padding: 0;
}

.proof-dock {
  display: grid;
  align-content: start;
  gap: 12px;
}

.dock-card,
.receipt-mini {
  padding: 18px;
}

.dock-card strong,
.receipt-mini strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.15;
}

.dock-card p {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.dock-primary {
  border-color: rgba(125, 233, 240, 0.22);
  background:
    linear-gradient(135deg, rgba(125, 233, 240, 0.08), transparent 58%),
    rgba(13, 15, 22, 0.88);
}

.compact {
  min-height: 110px;
}

.receipt-mini {
  display: grid;
  gap: 18px;
}

.receipt-mini ol {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.receipt-mini li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.receipt-mini li span {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(125, 233, 240, 0.7);
  border-radius: 99px;
}

.surface-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px;
}

.surface-header {
  max-width: 780px;
  margin-bottom: 28px;
}

.surface-header h1 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.96;
}

.compact-header {
  max-width: 760px;
  margin-bottom: 22px;
}

.compact-header h1 {
  font-size: clamp(38px, 4.7vw, 58px);
}

.compact-header p {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
}

.radar-grid,
.pulse-grid,
.starter-list,
.stats-row,
.docs-grid,
.receipt-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.radar-grid article,
.pulse-grid article,
.starter-list article,
.stats-row article,
.docs-grid article,
.receipt-toolbar article,
.receipt-row,
.docs-list article {
  min-height: 160px;
  padding: 20px;
}

.radar-grid strong,
.pulse-grid strong,
.starter-list strong,
.stats-row strong,
.docs-grid strong,
.receipt-toolbar strong,
.docs-list strong {
  display: block;
  margin: 8px 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.radar-grid p,
.pulse-grid p,
.starter-list p,
.docs-grid p,
.docs-list p,
.empty-state {
  color: var(--muted);
}

.pulse-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.pulse-actions span {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.pulse-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(125, 233, 240, 0.24);
  border-radius: 8px;
  background: rgba(125, 233, 240, 0.075);
  color: var(--cyan);
}

.pulse-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pulse-grid article {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    rgba(13, 15, 22, 0.72);
}

.pulse-grid article > span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pulse-token {
  display: grid;
  width: 100%;
  gap: 4px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--ink);
  text-align: left;
}

.pulse-token:hover {
  border-color: rgba(125, 233, 240, 0.26);
  background: rgba(125, 233, 240, 0.055);
}

.pulse-token:focus-visible {
  outline: 2px solid rgba(125, 233, 240, 0.6);
  outline-offset: 2px;
}

.pulse-token strong {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
}

.pulse-token span,
.pulse-token small {
  color: var(--muted);
  font-size: 13px;
}

.receipt-shell,
.docs-shell {
  max-width: 1120px;
}

.receipt-toolbar article {
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.022);
}

.receipt-toolbar span,
.receipt-row .receipt-marker,
.receipt-meta,
.docs-list span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-toolbar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 28px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-list,
.docs-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.history-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.history-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(125, 233, 240, 0.24);
  border-radius: 8px;
  background: rgba(125, 233, 240, 0.075);
  color: var(--cyan);
}

.receipt-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(260px, 0.45fr);
  align-items: center;
  gap: 18px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(13, 15, 22, 0.72);
}

.receipt-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-height: 30px;
  border: 1px solid rgba(125, 233, 240, 0.28);
  border-radius: 999px;
  background: rgba(125, 233, 240, 0.07);
}

.receipt-marker.warn {
  color: #d2bea1;
  border-color: rgba(210, 190, 161, 0.3);
  background: rgba(210, 190, 161, 0.08);
}

.receipt-row strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-row p {
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-meta {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
}

.receipt-meta span {
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.022);
}

.receipt-note {
  display: grid;
  min-height: 170px;
  margin: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.docs-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.docs-list article {
  display: grid;
  gap: 10px;
  min-height: 178px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
    rgba(13, 15, 22, 0.76);
}

.docs-list strong {
  margin: 0;
  color: var(--ink);
}

.docs-list p {
  margin: 0;
}

.docs-list code {
  align-self: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 13px;
}

.runtime-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.runtime-grid article {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(13, 15, 22, 0.76);
}

.runtime-grid span {
  display: block;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.runtime-grid strong {
  display: block;
  margin: 8px 0 6px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
}

.studio-side {
  display: grid;
  gap: 12px;
}

.studio-side .starter-list {
  grid-template-columns: 1fr;
}

.studio-prompt {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.studio-prompt label {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.studio-prompt textarea {
  min-height: 190px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: rgba(8, 9, 13, 0.82);
  color: var(--ink);
}

.studio-prompt button {
  justify-self: start;
  min-width: 140px;
}

.forge-output {
  display: grid;
  gap: 10px;
  min-height: 176px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
    rgba(13, 15, 22, 0.76);
}

.forge-output > span,
.forge-file-list span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.forge-output strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: normal;
}

.forge-output p {
  margin: 0;
  color: var(--muted);
}

.forge-file-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.forge-file-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.022);
}

.forge-file-list code {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-preview-panel,
.forge-library {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(13, 15, 22, 0.76);
}

.forge-preview-head,
.forge-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.forge-preview-head span,
.forge-library-head span,
.forge-app-card span {
  display: block;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.forge-preview-head strong,
.forge-library-head strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
}

.forge-preview-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.forge-preview-actions button,
.forge-preview-actions a,
.forge-library-head button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(125, 233, 240, 0.24);
  border-radius: 8px;
  background: rgba(125, 233, 240, 0.075);
  color: var(--cyan);
}

.forge-preview-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.forge-preview-actions [data-forge-delete] {
  border-color: rgba(255, 120, 120, 0.22);
  background: rgba(255, 120, 120, 0.055);
  color: #ffb5b5;
}

.forge-preview-actions a[aria-disabled="true"] {
  opacity: 0.46;
  pointer-events: none;
}

.forge-preview-body {
  position: relative;
  min-height: 430px;
  padding: 12px;
}

.forge-preview-body iframe {
  display: none;
  width: 100%;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: #08090d;
}

.forge-preview-body.has-preview iframe {
  display: block;
}

.forge-preview-body.has-preview [data-forge-preview-empty] {
  display: none;
}

.forge-preview-body [data-forge-preview-empty] {
  display: grid;
  min-height: 405px;
  margin: 0;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.forge-app-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.forge-app-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--ink);
  text-align: left;
}

.forge-app-card:hover,
.forge-app-card.active {
  border-color: rgba(125, 233, 240, 0.32);
  background: rgba(125, 233, 240, 0.055);
}

.forge-app-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-app-card strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forge-app-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.stats-row article {
  min-height: 120px;
}

.stats-row strong {
  font-size: 42px;
}

.empty-state {
  display: grid;
  min-height: 220px;
  margin-top: 12px;
  place-items: center;
  text-align: center;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 48px));
  padding: 13px 15px;
  border: 1px solid rgba(125, 233, 240, 0.28);
  border-radius: 8px;
  background: rgba(10, 12, 17, 0.94);
  color: var(--ink);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(4, 5, 8, 0.68);
  backdrop-filter: blur(18px);
}

.auth-panel[hidden] {
  display: none;
}

.auth-card {
  position: relative;
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid rgba(125, 233, 240, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(125, 233, 240, 0.08), transparent 42%),
    rgba(13, 15, 22, 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.auth-card span,
.auth-card label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-card span {
  color: var(--cyan);
}

.auth-card h2 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
}

.auth-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.auth-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
}

.auth-card input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

.auth-card input:focus {
  border-color: rgba(125, 233, 240, 0.52);
}

.auth-card button[type="submit"] {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: 1px solid rgba(125, 233, 240, 0.34);
  border-radius: 8px;
  background: rgba(125, 233, 240, 0.13);
  color: var(--ink);
  font-weight: 850;
}

.wallet-auth {
  width: 100%;
  min-height: 46px;
  margin-bottom: 16px;
  border: 1px solid rgba(125, 233, 240, 0.38);
  border-radius: 8px;
  background: rgba(125, 233, 240, 0.12);
  color: var(--ink);
  font-weight: 850;
}

.auth-divider {
  position: relative;
  display: grid;
  place-items: center;
  margin: 2px 0 16px;
  color: var(--dim);
}

[data-access-code-section][hidden] {
  display: none;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: var(--line);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  padding: 0 10px;
  background: #10131b;
  color: var(--dim);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .chat-stage {
    animation: stageIn 420ms ease-out both;
  }

  .stage-glow {
    animation: scanDrift 8s ease-in-out infinite alternate;
  }

  .message {
    animation: messageIn 240ms ease-out both;
  }
}

@keyframes stageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scanDrift {
  from {
    transform: translateX(-10px);
  }
  to {
    transform: translateX(12px);
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .chat-shell {
    grid-template-columns: 1fr;
  }

  .proof-dock {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .console-app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-head {
    min-height: 64px;
  }

  .command-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px;
  }

  .command-nav > span,
  .sidebar-bottom {
    display: none;
  }

  .command-nav button {
    width: auto;
    min-width: max-content;
    margin: 0;
  }

  .surface {
    padding: 18px;
  }

  .chat-stage,
  .chat-shell {
    min-height: auto;
  }

  .proof-dock,
  .radar-grid,
  .pulse-grid,
  .starter-list,
  .stats-row,
  .docs-grid,
  .receipt-toolbar,
  .docs-list,
  .runtime-grid,
  .forge-app-list,
  .studio-layout {
    grid-template-columns: 1fr;
  }

  .receipt-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .receipt-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .beta-strip {
    justify-content: flex-start;
    overflow: hidden;
    white-space: nowrap;
  }

  .workspace-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px;
  }

  .top-actions {
    width: 100%;
    overflow-x: auto;
  }

  .stage-head {
    padding: 38px 18px 14px;
  }

  .stage-head h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .prompt-row,
  .transcript {
    padding-inline: 16px;
  }

  .composer {
    margin-inline: 16px;
  }
}

@media (max-width: 900px) {
  body.console-menu-open {
    overflow: hidden;
  }

  .console-app {
    display: block;
  }

  .console-app::before {
    content: "";
    position: fixed;
    inset: 32px 0 0;
    z-index: 35;
    background: rgba(3, 4, 8, 0.64);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    backdrop-filter: blur(10px);
  }

  body.console-menu-open .console-app::before {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 32px;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(326px, 86vw);
    overflow-y: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: 28px 0 80px rgba(0, 0, 0, 0.42);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  body.console-menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-head {
    min-height: 72px;
  }

  .command-nav {
    display: block;
    overflow: visible;
    padding: 24px 18px;
  }

  .command-nav > span,
  .sidebar-bottom {
    display: block;
  }

  .command-nav button {
    width: 100%;
    min-width: 0;
    margin: 0 0 8px;
  }

  .workspace-top {
    z-index: 30;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    min-height: 68px;
    padding: 0 14px;
  }

  .console-menu-toggle {
    position: relative;
    z-index: 2;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(125, 233, 240, 0.46);
    border-radius: 8px;
    background: rgba(125, 233, 240, 0.08);
    color: var(--ink);
  }

  .console-menu-toggle span {
    grid-area: 1 / 1;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .console-menu-toggle span:nth-child(1) {
    transform: translateY(-7px);
  }

  .console-menu-toggle span:nth-child(3) {
    transform: translateY(7px);
  }

  body.console-menu-open .console-menu-toggle span:nth-child(1) {
    transform: rotate(45deg);
  }

  body.console-menu-open .console-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.console-menu-open .console-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg);
  }

  .workspace-title {
    min-width: 0;
    gap: 10px;
  }

  .workspace-title > div {
    min-width: 0;
  }

  .workspace-title strong,
  .workspace-title small span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  .top-actions {
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
    overflow: visible;
  }

  .top-actions [data-new-chat] {
    display: none;
  }

  .top-actions .connect {
    max-width: 126px;
    padding: 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions a {
    width: 42px;
    padding: 0;
  }
}
