@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --color-bg-primary: oklch(0.13 0.008 270);
  --color-bg-secondary: oklch(0.17 0.008 270);
  --color-bg-tertiary: oklch(0.21 0.008 270);
  --color-bg-inverse: oklch(0.98 0.005 90);
  --color-bg-canvas: oklch(0.10 0.008 270);

  --color-text-primary: oklch(0.965 0.005 90);
  --color-text-secondary: oklch(0.74 0.01 90);
  --color-text-tertiary: oklch(0.54 0.01 90);
  --color-text-inverse: oklch(0.13 0.008 270);

  --color-border-primary: oklch(0.24 0.008 25);
  --color-border-secondary: oklch(0.19 0.008 25);
  --color-border-focus: oklch(0.965 0.005 90);

  --color-signature: oklch(0.70 0.21 22);
  --color-signature-soft: oklch(0.76 0.16 28);
  --color-signature-deep: oklch(0.58 0.22 18);

  --color-accent-primary: oklch(0.98 0.005 90);
  --color-accent-primary-hover: oklch(1 0 0);
  --color-accent-primary-active: oklch(0.90 0.005 90);

  --color-status-success: oklch(0.74 0.17 150);
  --color-status-warning: oklch(0.80 0.17 75);
  --color-status-error: oklch(0.70 0.22 25);
  --color-status-info: oklch(0.74 0.16 235);
  --color-grid-line: oklch(0.47 0.01 25 / 0.08);
  --color-grid-wash-start: oklch(from var(--color-signature-deep) l c h / 0.02);
  --color-grid-opacity: 0.45;
  --color-grain-opacity: 0.06;
  --color-grain-blend: overlay;

  --font-family-display: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-family-body: "Inter", "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-family-mono: "Geist Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --bg: var(--color-bg-primary);
  --bg-2: var(--color-bg-secondary);
  --panel: var(--color-bg-secondary);
  --panel-2: var(--color-bg-tertiary);
  --line: var(--color-border-primary);
  --soft-line: var(--color-border-secondary);
  --text: var(--color-text-primary);
  --muted: var(--color-text-secondary);
  --dim: var(--color-text-tertiary);
  --accent: var(--color-signature);
  --accent-soft: var(--color-signature-soft);
  --accent-deep: var(--color-signature-deep);
  --action: var(--color-accent-primary);
  --success: var(--color-status-success);
  --teal: var(--color-status-success);
  --blue: var(--color-status-info);
  --orange: oklch(0.74 0.13 38);
  --warning: var(--color-status-warning);
  --danger: var(--color-status-error);
  --shadow-xs: 0 1px 2px 0 oklch(0 0 0 / 0.40);
  --shadow-sm: 0 1px 3px 0 oklch(0 0 0 / 0.55), 0 1px 2px -1px oklch(0 0 0 / 0.40);
  --shadow-md: 0 4px 12px -2px oklch(0 0 0 / 0.60), 0 2px 6px -2px oklch(0 0 0 / 0.45);
  --shadow-xl: 0 24px 48px -12px oklch(0 0 0 / 0.80);
  --shadow: var(--shadow-xl);
}

:root[data-theme="light"] {
  color-scheme: light;

  --color-bg-primary: oklch(0.982 0.005 88);
  --color-bg-secondary: oklch(0.955 0.008 82);
  --color-bg-tertiary: oklch(0.925 0.012 78);
  --color-bg-inverse: oklch(0.13 0.008 270);
  --color-bg-canvas: oklch(0.985 0.004 88);

  --color-text-primary: oklch(0.18 0.012 270);
  --color-text-secondary: oklch(0.39 0.012 270);
  --color-text-tertiary: oklch(0.56 0.01 270);
  --color-text-inverse: oklch(0.965 0.005 90);

  --color-border-primary: oklch(0.835 0.015 72);
  --color-border-secondary: oklch(0.90 0.01 76);
  --color-border-focus: var(--color-signature);

  --color-accent-primary: var(--color-signature);
  --color-accent-primary-hover: oklch(0.65 0.22 22);
  --color-accent-primary-active: var(--color-signature-deep);

  --color-status-success: oklch(0.52 0.16 150);
  --color-status-warning: oklch(0.58 0.15 75);
  --color-status-error: var(--color-signature-deep);
  --color-status-info: oklch(0.52 0.14 235);
  --color-grid-line: oklch(0.52 0.018 72 / 0.105);
  --color-grid-wash-start: oklch(from var(--color-signature-soft) l c h / 0.02);
  --color-grain-opacity: 0.04;
  --color-grain-blend: multiply;

  --shadow-xs: 0 1px 2px 0 oklch(0.22 0.02 270 / 0.08);
  --shadow-sm: 0 1px 3px 0 oklch(0.22 0.02 270 / 0.10), 0 1px 2px -1px oklch(0.22 0.02 270 / 0.08);
  --shadow-md: 0 6px 16px -6px oklch(0.22 0.02 270 / 0.16), 0 2px 6px -3px oklch(0.22 0.02 270 / 0.10);
  --shadow-xl: 0 30px 60px -30px oklch(0.22 0.02 270 / 0.26);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-family-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, var(--color-grid-wash-start) 0%, transparent 22rem),
    linear-gradient(180deg, var(--color-bg-canvas) 0%, var(--color-bg-primary) 48%, var(--color-bg-canvas) 100%);
}

body::before {
  mask-image: linear-gradient(180deg, black, black);
}

body::before,
body::after {
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  background:
    linear-gradient(var(--color-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid-line) 1px, transparent 1px),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
  background-position: -1px -1px, -1px -1px, 0 0;
  background-size: 56px 56px, 56px 56px, 140px 140px;
  mix-blend-mode: var(--color-grain-blend);
}

body > * {
  position: relative;
  z-index: 1;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  border: 1px solid var(--line);
  background: color-mix(in oklch, var(--panel-2) 88%, black);
  color: var(--text);
  cursor: pointer;
}

button:hover,
button:focus-visible,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-border-focus);
  outline: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p,
pre {
  margin: 0;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-family-display);
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto;
}

.supercomputer {
  min-height: 642px;
  position: relative;
  overflow: hidden;
  padding: 22px 24px 52px;
  background:
    radial-gradient(ellipse at 78% 20%, color-mix(in oklch, var(--accent) 16%, transparent), transparent 34rem),
    radial-gradient(ellipse at 12% 78%, color-mix(in oklch, var(--accent-deep) 8%, transparent), transparent 28rem),
    linear-gradient(180deg, transparent 0%, color-mix(in oklch, var(--accent) 3%, transparent) 100%);
}

.supercomputer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.72;
  background:
    radial-gradient(ellipse at 86% 20%, color-mix(in oklch, var(--accent) 22%, transparent), transparent 42%),
    linear-gradient(180deg, transparent 0%, transparent 72%, color-mix(in oklch, var(--accent) 3.5%, transparent) 100%);
  mask-image: linear-gradient(180deg, black 0%, black 78%, transparent 100%);
}

.home-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.site-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.brand-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.logo {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  position: relative;
}

.mode-row::-webkit-scrollbar {
  display: none;
}

.product-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  background: color-mix(in oklch, var(--panel) 82%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

a.product-pill:hover,
a.product-pill:focus-visible {
  border-color: color-mix(in oklch, var(--accent) 38%, transparent);
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}

.product-pill.active {
  border-color: color-mix(in oklch, var(--accent) 48%, transparent);
  background: color-mix(in oklch, var(--accent) 13%, transparent);
  color: color-mix(in oklch, var(--accent) 70%, var(--text));
}

.theme-toggle {
  width: 44px;
  height: 28px;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  border-color: color-mix(in oklch, var(--line) 70%, transparent);
  border-radius: 999px;
  background: color-mix(in oklch, var(--panel) 80%, transparent);
  box-shadow: var(--shadow-xs);
  padding: 2px;
}

.theme-track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.theme-track::before {
  content: "";
  position: absolute;
  inset: -2px;
  opacity: 0.55;
  background:
    radial-gradient(circle at 24% 50%, var(--accent-soft), transparent 30%),
    radial-gradient(circle at 76% 50%, var(--accent-deep), transparent 32%);
}

.theme-sun,
.theme-moon,
.theme-knob {
  position: absolute;
  border-radius: 50%;
}

.theme-sun {
  top: 8px;
  left: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid color-mix(in oklch, var(--color-bg-canvas) 88%, transparent);
}

.theme-sun::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px dashed color-mix(in oklch, var(--color-bg-canvas) 48%, transparent);
}

.theme-moon {
  top: 6px;
  right: 7px;
  width: 12px;
  height: 12px;
  background: color-mix(in oklch, var(--color-bg-canvas) 78%, transparent);
}

.theme-moon::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--panel) 94%, transparent);
}

.theme-knob {
  z-index: 1;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  box-shadow: 0 0 16px color-mix(in oklch, var(--accent) 42%, transparent), 0 1px 3px oklch(0 0 0 / 0.18);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

:root[data-theme="dark"] .theme-knob {
  transform: translateX(16px);
  background: var(--action);
  box-shadow: 0 0 14px color-mix(in oklch, var(--action) 24%, transparent), 0 1px 3px oklch(0 0 0 / 0.28);
}

.account-control {
  position: relative;
  flex: 0 0 auto;
}

.account-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(210px, 36vw);
  border-color: transparent;
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.account-button:hover,
.account-button:focus-visible {
  background: var(--panel-2);
}

.account-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
  border-radius: 50%;
  background: color-mix(in oklch, var(--bg) 80%, transparent);
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.account-avatar.large {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.account-avatar[data-has-identity="true"] {
  border-color: color-mix(in oklch, var(--accent) 44%, transparent);
  background: color-mix(in oklch, var(--accent) 16%, transparent);
  color: color-mix(in oklch, var(--accent) 70%, var(--text));
}

.account-avatar[data-has-identity="false"]::before,
.account-avatar:not([data-has-identity])::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transform: translateY(-2px);
}

.account-avatar[data-has-identity="false"]::after,
.account-avatar:not([data-has-identity])::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 11px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  transform: translateX(-50%);
}

.account-avatar.large[data-has-identity="false"]::before,
.account-avatar.large:not([data-has-identity])::before {
  width: 10px;
  height: 10px;
}

.account-avatar.large[data-has-identity="false"]::after,
.account-avatar.large:not([data-has-identity])::after {
  bottom: 4px;
  width: 16px;
  height: 8px;
}

.account-menu {
  width: min(240px, calc(100vw - 28px));
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow-md);
  padding: 6px;
}

.account-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--soft-line);
  padding: 8px 7px 10px;
}

.account-summary strong,
.account-summary small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary strong {
  color: var(--text);
  font-size: 13px;
}

.account-summary small {
  margin-top: 2px;
  color: var(--dim);
  font-size: 12px;
}

.account-menu-item {
  min-height: 36px;
  display: flex;
  align-items: center;
  border-radius: 7px;
  padding: 0 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

button.account-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  background: var(--panel-2);
  outline: none;
}

.round,
.icon {
  display: grid;
  place-items: center;
  padding: 0;
}

.hero-copy {
  width: min(900px, 100%);
  min-width: 0;
  display: grid;
  justify-items: center;
}

.headline {
  max-width: 760px;
  margin-top: 86px;
  text-align: center;
  font-size: clamp(2.4rem, 3.4vw + 1rem, 4.7rem);
  line-height: 1.08;
  font-weight: 680;
  text-wrap: balance;
}

.composer {
  width: min(860px, 100%);
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.prompt-input {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 22px 20px 10px;
  font-size: 16px;
  line-height: 1.5;
}

.prompt-input::placeholder {
  color: color-mix(in oklch, var(--dim) 78%, transparent);
}

.mode-row {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 0 14px 12px;
  scrollbar-width: none;
}

.mode-chip {
  min-height: 32px;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.mode-chip.active {
  border-color: color-mix(in oklch, var(--accent) 45%, transparent);
  background: color-mix(in oklch, var(--accent) 13%, transparent);
  color: color-mix(in oklch, var(--accent) 70%, var(--text));
}

.composer-bar {
  min-height: 56px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px 14px;
}

.round {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.cue {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
}

.type-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 12px;
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  color: color-mix(in oklch, var(--accent) 70%, var(--text));
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.bar-spacer {
  min-width: 0;
}

.send {
  border-color: transparent;
  background: var(--action);
  color: var(--color-bg-canvas);
  font-size: 13px;
  font-weight: 900;
}

.send:disabled {
  cursor: wait;
}

.settings-panel {
  border-top: 1px solid var(--soft-line);
  background: color-mix(in oklch, var(--bg) 38%, transparent);
}

.settings-panel summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.settings-grid,
.github-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.github-fields {
  padding-top: 0;
}

.settings-panel label,
.github-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px;
}

.product-peek {
  width: min(980px, 100%);
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1.28fr repeat(3, minmax(0, 0.74fr));
  gap: 12px;
}

.peek-card {
  min-width: 0;
  min-height: 130px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  padding: 14px;
}

.peek-card h2 {
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
}

.peek-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(180px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.peek-preview {
  min-height: 100px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--bg) 6%, transparent), color-mix(in oklch, var(--bg) 70%, transparent)),
    linear-gradient(35deg, var(--accent-deep) 0 28%, var(--accent) 28% 48%, var(--accent-soft) 48% 66%, var(--panel-2) 66% 100%);
}

.peek-preview::after {
  content: "hosted-run.json";
  position: absolute;
  left: 10px;
  bottom: 9px;
  border-radius: 999px;
  padding: 4px 7px;
  background: color-mix(in oklch, var(--color-bg-canvas) 72%, transparent);
  color: var(--color-text-inverse);
  font-size: 10px;
}

.preview-step {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.preview-step.one {
  top: 18px;
  right: 34%;
}

.preview-step.two {
  top: 36px;
  right: 18%;
  background: color-mix(in oklch, var(--accent-soft) 60%, transparent);
}

.preview-step.three {
  top: 54px;
  right: 48%;
  background: color-mix(in oklch, var(--accent-soft) 58%, transparent);
}

.metric-card {
  display: grid;
  align-content: space-between;
}

.metric-card strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-tone="ok"] {
  color: var(--success) !important;
}

[data-tone="warning"] {
  color: var(--warning) !important;
}

[data-tone="error"] {
  color: var(--danger) !important;
}

[data-tone="busy"] {
  color: var(--blue) !important;
}

.workspace-shell {
  padding: 42px 24px 64px;
  background: var(--bg);
}

.workspace-heading {
  width: min(1090px, 100%);
  margin: 0 auto 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.workspace-heading h2 {
  font-size: 21px;
  font-weight: 760;
}

.workspace-heading p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.workspace-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.status {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.refresh-button {
  min-height: 36px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.refresh-button:hover,
.refresh-button:focus-visible {
  background: var(--panel-2);
  color: var(--text);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 16px color-mix(in oklch, var(--success) 72%, transparent);
}

.workspace {
  width: min(1090px, 100%);
  min-height: 690px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr) 340px;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background: var(--soft-line);
  box-shadow: var(--shadow);
}

.rail,
.thread,
.artifact-drawer {
  min-width: 0;
  background: var(--bg-2);
}

.rail,
.artifact-drawer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.rail {
  border-right: 1px solid var(--soft-line);
}

.artifact-drawer {
  border-left: 1px solid var(--soft-line);
}

.section-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--soft-line);
  padding: 0 14px;
}

.section-head h3 {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.count-pill,
.status-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.rail-scroll,
.artifact-scroll {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
}

.jobs-list {
  gap: 8px;
}

.job-card {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 8px;
  color: var(--muted);
  text-align: left;
}

.job-card[data-active="true"] {
  border-color: color-mix(in oklch, var(--accent) 42%, transparent);
  background: color-mix(in oklch, var(--accent) 10%, transparent);
  color: var(--text);
}

.job-card-main {
  min-width: 0;
}

.job-card strong,
.job-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-card strong {
  font-size: 12px;
}

.job-card small {
  margin-top: 3px;
  color: var(--dim);
  font-size: 11px;
}

.status-pill[data-status="queued"],
.status-pill[data-status="created"] {
  color: var(--warning);
}

.status-pill[data-status="running"],
.status-pill[data-status="leased"],
.status-pill[data-status="waiting_for_input"] {
  color: var(--blue);
}

.status-pill[data-status="succeeded"] {
  color: var(--success);
}

.status-pill[data-status="failed"],
.status-pill[data-status="stopped"],
.status-pill[data-status="stopping"] {
  color: var(--danger);
}

.thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.thread-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--soft-line);
  padding: 0 16px;
}

.thread-title {
  min-width: 0;
}

.thread-title h3 {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-title p {
  margin-top: 3px;
  color: var(--dim);
  font-size: 12px;
}

.thread-tabs {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
}

.icon {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.thread-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.bubble {
  max-width: 720px;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: var(--panel);
}

.bubble.user {
  width: min(520px, 100%);
  justify-self: end;
  border-color: color-mix(in oklch, var(--accent) 34%, transparent);
  background: color-mix(in oklch, var(--panel) 82%, var(--accent-deep));
}

.bubble-body {
  padding: 14px;
}

.bubble h4 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.bubble p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.cli {
  max-height: 310px;
  overflow: auto;
  border: 0;
  background: #0e0f0d;
  color: #dcefd1;
  padding: 14px;
  font-family: var(--font-family-mono);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.event-section {
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: var(--panel);
}

.event-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--soft-line);
  padding: 0 12px;
}

.event-head h4 {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.event-head span {
  color: var(--dim);
  font-size: 12px;
}

.events {
  display: grid;
  max-height: 330px;
  gap: 0;
  margin: 0;
  overflow: auto;
  padding: 0 12px;
  list-style: none;
}

.event {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  border-bottom: 1px solid var(--soft-line);
  padding: 10px 0;
}

.event:last-child {
  border-bottom: 0;
}

.event-sequence,
.event-time,
.event small {
  color: var(--dim);
  font-size: 12px;
}

.event-body {
  min-width: 0;
}

.event strong,
.event small {
  display: block;
  overflow-wrap: anywhere;
}

.event strong {
  color: var(--text);
  font-size: 13px;
  text-transform: capitalize;
}

.thread-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-top: 1px solid var(--soft-line);
  background: var(--panel);
  padding: 14px;
}

.thread-compose input {
  min-width: 0;
  height: 42px;
}

.accent-button {
  min-height: 42px;
  border-color: transparent;
  border-radius: 999px;
  background: var(--action);
  color: var(--color-bg-canvas);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 780;
}

.drawer-tools {
  display: flex;
  gap: 6px;
}

.preview {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--bg) 4%, transparent), color-mix(in oklch, var(--color-bg-canvas) 68%, transparent)),
    linear-gradient(34deg, var(--accent) 0 26%, var(--accent-soft) 26% 45%, var(--accent-deep) 45% 69%, var(--panel-2) 69% 100%);
  box-shadow: var(--shadow-md);
}

.preview::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed color-mix(in oklch, var(--color-text-inverse) 24%, transparent);
  border-radius: 10px;
}

.preview-label {
  position: absolute;
  top: 11px;
  left: 11px;
  border-radius: 7px;
  padding: 5px 7px;
  background: color-mix(in oklch, var(--color-bg-canvas) 72%, transparent);
  color: var(--color-text-inverse);
  font-size: 11px;
  font-weight: 760;
}

.caption {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 10%;
  text-align: center;
  font-size: 21px;
  font-weight: 900;
  color: var(--color-text-inverse);
  text-shadow: 0 3px 18px oklch(0 0 0 / 0.72);
}

.artifacts {
  display: grid;
  gap: 12px;
}

.artifact {
  display: grid;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: var(--panel);
  padding: 12px;
}

.artifact strong,
.artifact small {
  display: block;
}

.artifact strong {
  color: var(--text);
  font-size: 13px;
}

.artifact small {
  margin-top: 4px;
  color: var(--dim);
  font-size: 12px;
}

.artifact pre {
  max-height: 190px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: #0e0f0d;
  color: #dcefd1;
  padding: 10px;
  font-family: var(--font-family-mono);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.artifact a {
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 760;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 14px;
  color: var(--dim);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .product-peek {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured {
    grid-column: 1 / -1;
  }

  .workspace {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .artifact-drawer {
    grid-column: 1 / -1;
    border-top: 1px solid var(--soft-line);
    border-left: 0;
  }

  .artifact-scroll {
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .supercomputer {
    min-height: auto;
    padding: 18px 14px 34px;
  }

  .home-shell,
  .composer,
  .product-peek {
    width: min(100%, calc(100vw - 28px));
  }

  .site-bar {
    display: grid;
    gap: 14px;
  }

  .top-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .headline {
    width: min(100%, 21rem);
    margin-top: 54px;
    font-size: clamp(2rem, 8.5vw, 2.35rem);
    line-height: 1.12;
    overflow-wrap: normal;
  }

  .composer-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .type-pill {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bar-spacer {
    display: none;
  }

  .settings-grid,
  .github-fields,
  .product-peek,
  .featured,
  .workspace,
  .artifact-scroll,
  .thread-compose {
    grid-template-columns: 1fr;
  }

  .featured {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .peek-card,
  .peek-preview {
    max-width: 100%;
  }

  .workspace-shell {
    padding: 34px 14px 44px;
  }

  .workspace-heading {
    display: grid;
    align-items: start;
  }

  .workspace-actions {
    justify-content: start;
    flex-wrap: wrap;
  }

  .workspace {
    min-height: 0;
  }

  .rail,
  .artifact-drawer {
    border: 0;
  }

  .rail {
    border-bottom: 1px solid var(--soft-line);
  }

  .thread-head {
    align-items: flex-start;
    padding: 13px;
  }

  .thread-title h3 {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .thread-tabs {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .thread-body {
    padding: 14px;
  }

  .thread-compose input,
  .accent-button {
    width: 100%;
  }

  .event {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .event-time {
    grid-column: 2;
  }
}

@media (max-width: 520px) {
  .brand-line {
    width: 100%;
  }

  .mode-row {
    padding-bottom: 10px;
  }

  .mode-chip {
    font-size: 12px;
  }

  .composer {
    border-radius: 16px;
  }

  .prompt-input {
    min-height: 112px;
  }

  .metric-card {
    min-height: 104px;
  }

  .workspace {
    border-radius: 14px;
  }

  .bubble,
  .event-section,
  .artifact,
  .preview {
    border-radius: 12px;
  }
}
