:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #dce4f2;
  --line-dark: #c8d3e7;
  --text: #172033;
  --muted: #64748b;
  --blue: #3357e8;
  --blue-soft: #edf2ff;
  --green: #43895b;
  --amber: #bb7a18;
  --red: #b42318;
  --mono: Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: 0;
  overflow-x: auto;
}

.cover-body {
  min-height: 100vh;
  background: #dfe8d5;
  color: #f6f1e6;
  overflow: hidden;
}

.cover-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.cover-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 78% 20%, rgba(230, 255, 157, 0.58), transparent 28%),
    radial-gradient(circle at 84% 74%, rgba(235, 203, 150, 0.48), transparent 30%),
    linear-gradient(115deg, #e3ebd8 0%, #80947d 38%, #17342c 100%);
  overflow: hidden;
}

.cover-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(15, 32, 25, 0.72) 0%, rgba(15, 32, 25, 0.46) 35%, rgba(15, 32, 25, 0.1) 72%, rgba(15, 32, 25, 0.24) 100%),
    linear-gradient(180deg, rgba(250, 248, 238, 0.18), rgba(250, 248, 238, 0.04)),
    repeating-linear-gradient(90deg, rgba(246, 243, 234, 0.13) 0 1px, transparent 1px 96px);
  pointer-events: none;
}

.cover-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(250, 248, 238, 0.12), rgba(15, 32, 25, 0.5)),
    repeating-linear-gradient(0deg, rgba(246, 243, 234, 0.038) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

.cover-gif,
.cover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-gif {
  filter: contrast(0.92) saturate(0.72) sepia(0.14);
  opacity: 0.68;
}

.cover-video {
  opacity: 0.72;
}

.cover-light {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  filter: blur(26px);
  pointer-events: none;
}

.cover-light-one {
  width: 42vw;
  height: 42vw;
  right: -10vw;
  top: -14vw;
  background: rgba(226, 255, 143, 0.36);
}

.cover-light-two {
  width: 34vw;
  height: 34vw;
  right: 18vw;
  bottom: -16vw;
  background: rgba(239, 221, 184, 0.3);
}

.cover-scan {
  position: absolute;
  inset: -40% 0 auto;
  z-index: 2;
  height: 42%;
  background: linear-gradient(180deg, transparent 0%, rgba(246, 243, 234, 0.18) 50%, transparent 100%);
  animation: coverScan 10s linear infinite;
  pointer-events: none;
}

.cover-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(24px, 5vw, 72px);
  position: relative;
  z-index: 2;
}

.cover-brand {
  color: #f6f3ea;
  font-size: 20px;
  font-weight: 760;
  text-transform: uppercase;
}

.cover-kicker,
.cover-eyebrow,
.cover-footer {
  color: rgba(246, 243, 234, 0.78);
  font-size: 12px;
  font-weight: 680;
  text-transform: uppercase;
}

.cover-hero {
  width: min(760px, calc(100vw - 48px));
  margin: auto auto 12vh clamp(24px, 8vw, 112px);
  position: relative;
  z-index: 2;
  animation: coverIn 680ms ease-out both;
}

.cover-eyebrow {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  margin: 0 0 18px;
  padding: 0 12px;
  border-left: 3px solid #d9ff84;
  background: rgba(246, 243, 234, 0.14);
  color: rgba(246, 243, 234, 0.94);
  backdrop-filter: blur(10px);
}

.cover-hero h1 {
  margin: 0;
  color: #f6f3ea;
  font-size: 144px;
  line-height: 0.9;
  font-weight: 780;
  text-shadow: 0 22px 70px rgba(0, 0, 0, 0.44);
}

.cover-title-line {
  margin: 12px 0 0;
  color: #d9ff84;
  font-size: 28px;
  font-weight: 720;
  text-transform: uppercase;
}

.cover-copy {
  max-width: 620px;
  margin: 26px 0 36px;
  color: rgba(246, 243, 234, 0.84);
  font-size: 24px;
  line-height: 1.24;
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.cover-start {
  position: relative;
  min-width: 210px;
  min-height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(217, 255, 132, 0.86);
  background: #d9ff84;
  color: #07110b;
  text-decoration: none;
  font-size: 22px;
  font-weight: 820;
  overflow: hidden;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24), 0 0 38px rgba(217, 255, 132, 0.32);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.cover-start::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -70%;
  width: 58%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  transform: skewX(-18deg);
  animation: coverSheen 3.8s ease-in-out infinite;
  pointer-events: none;
}

.cover-start:hover,
.cover-start:focus-visible {
  background: #f6f3ea;
  color: #07110b;
  transform: translateY(-2px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3), 0 0 46px rgba(217, 255, 132, 0.38);
  outline: none;
}

.cover-side-mark {
  position: absolute;
  right: clamp(24px, 5vw, 72px);
  top: 50%;
  z-index: 2;
  display: grid;
  gap: 16px;
  color: rgba(246, 243, 234, 0.64);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
  transform: translateY(-50%);
}

.cover-side-mark span {
  writing-mode: vertical-rl;
}

.cover-footer {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 0 clamp(24px, 5vw, 72px) 30px;
  letter-spacing: 0;
  position: relative;
  z-index: 2;
}

@media (max-width: 1000px) {
  .cover-hero h1 {
    font-size: 104px;
  }

  .cover-copy {
    font-size: 20px;
  }

  .cover-side-mark {
    display: none;
  }
}

@media (max-width: 700px) {
  .cover-body {
    overflow: auto;
  }

  .cover-header {
    min-height: 72px;
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
    padding: 22px 22px 0;
  }

  .cover-hero {
    width: auto;
    margin: auto 22px 10vh;
  }

  .cover-hero h1 {
    font-size: 78px;
  }

  .cover-title-line {
    font-size: 20px;
  }

  .cover-copy {
    font-size: 18px;
  }

  .cover-start {
    min-width: 184px;
    min-height: 60px;
    font-size: 20px;
  }

  .cover-footer {
    gap: 10px 18px;
    padding: 0 22px 24px;
  }
}

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

@keyframes coverScan {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(360%);
  }
}

@keyframes coverSheen {
  0%,
  58% {
    left: -70%;
  }
  100% {
    left: 120%;
  }
}

button,
select,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.portal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.capsule-header {
  min-height: 98px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.compact-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  min-height: 62px;
  align-items: center;
  padding: 8px 22px;
}

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

.compact-header h1 {
  margin-top: 0;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.header-center {
  justify-self: center;
}

.header-actions {
  justify-self: end;
}

.header-button,
.dialog-close {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.header-button:hover,
.header-button:focus-visible,
.dialog-close:hover,
.dialog-close:focus-visible {
  border-color: #98a9ff;
  box-shadow: 0 0 0 3px rgba(51, 87, 232, .1);
  outline: 0;
}

.portal-dialog {
  width: min(560px, calc(100vw - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 60px rgba(15, 23, 42, .28);
}

.portal-dialog::backdrop {
  background: rgba(15, 23, 42, .38);
}

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

.dialog-head h2 {
  margin: 0;
  font-size: 18px;
}

.dialog-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.dialog-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.feedback-dialog form {
  margin: 0;
}

.feedback-field {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.feedback-field span {
  font-size: 13px;
  font-weight: 760;
  color: var(--muted);
}

.feedback-field textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfcff;
  font: inherit;
  line-height: 1.45;
}

.feedback-field textarea:focus {
  border-color: #98a9ff;
  box-shadow: 0 0 0 3px rgba(51, 87, 232, .1);
  outline: 0;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 18px;
}

.dialog-actions span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.compact-run {
  width: auto;
  min-height: 38px;
  padding: 0 16px;
}

.compact-header ~ .workspace .file-tree {
  height: calc(100vh - 170px);
}

.capsule-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.capsule-kicker #computeStatus {
  height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 0 8px;
  background: #f1f5f9;
  color: #475569;
}

.capsule-header h1 {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 760;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 34px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 760;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 10px;
  font-size: clamp(26px, 2.5vw, 38px);
  font-weight: 760;
}

.hero p {
  max-width: 760px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.identity {
  min-width: 260px;
  display: grid;
  gap: 8px;
}

.identity label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.identity select,
.seed-controls input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

.server-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.server-strip div {
  padding: 14px 22px;
  background: #fbfcff;
}

.server-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.server-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 340px 220px;
  min-width: 1040px;
}

.left-panel,
.main-panel,
.right-panel,
.queue-panel {
  min-width: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.queue-panel {
  border-right: 0;
  overflow: auto;
}

.right-panel {
  overflow: auto;
}

.panel-title {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title.compact {
  min-height: 42px;
  padding: 0;
  border-bottom: 0;
}

.panel-title h2 {
  font-size: 18px;
  font-weight: 760;
}

.panel-title p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.panel-title span,
.result-head span {
  color: var(--muted);
  font-size: 12px;
}

.experiment-list {
  display: grid;
  gap: 10px;
  padding: 10px 8px;
}

.experiment-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.experiment-card.active {
  border-color: #98a9ff;
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(51, 87, 232, .11);
}

.experiment-card h3 {
  font-size: 15px;
  line-height: 1.25;
}

.experiment-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.downloads {
  border-top: 1px solid var(--line);
  padding: 16px 14px;
}

.experiment-box {
  padding: 16px 16px;
  border-bottom: 1px solid var(--line);
}

.file-search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.file-search input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.file-tree {
  height: calc(100vh - 206px);
  overflow: auto;
  padding: 8px 0 18px;
}

.file-group {
  padding: 6px 0 8px;
  border-bottom: 1px solid #eef2f7;
}

.file-group-toggle {
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 760;
  text-align: left;
  text-transform: uppercase;
}

.file-group-toggle:hover {
  background: #f8fafc;
}

.file-group-toggle small {
  color: var(--muted);
  font-weight: 600;
}

.file-row {
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  padding: 0 10px 0 calc(12px + var(--level) * 14px);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.file-open {
  min-width: 0;
  min-height: 30px;
  display: grid;
  grid-template-columns: 14px 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.file-row.dir:hover,
.file-row.file:hover,
.file-row.file.active {
  background: var(--blue-soft);
}

.file-row.file.active .file-name {
  color: #2947d4;
  font-weight: 760;
}

.tree-caret {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: transform .12s ease;
}

.tree-caret svg {
  width: 12px;
  height: 12px;
}

.expanded .tree-caret {
  transform: rotate(90deg);
}

.file-row.file .tree-caret {
  color: transparent;
}

.file-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.file-icon.folder {
  color: #e8bd45;
}

.file-icon.code {
  color: #bcd0ff;
}

.file-icon.data {
  color: #bfe7ca;
}

.file-icon.checkpoint {
  color: #e9d5ff;
}

.file-icon.text {
  color: #e2e8f0;
}

.file-icon.file {
  color: #e2e8f0;
}

.file-icon svg {
  width: 18px;
  height: 18px;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
}

.file-row small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.file-download {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: #64748b;
  opacity: .55;
  text-decoration: none;
}

.file-download svg {
  width: 15px;
  height: 15px;
}

.file-row:hover .file-download,
.file-row.active .file-download,
.file-download:focus-visible {
  background: #fff;
  color: #2947d4;
  opacity: 1;
}

.file-download.empty {
  pointer-events: none;
  opacity: 0;
}

.file-empty {
  padding: 20px 14px;
  color: var(--muted);
  font-size: 13px;
}

.file-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.file-header > div:first-child {
  min-width: 0;
  flex: 1 1 300px;
}

.file-header h2 {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.file-header p {
  max-width: 760px;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#fileBadge {
  color: var(--green);
  font-size: 12px;
  font-weight: 760;
}

.file-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 1 auto;
  max-width: 100%;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.view-toggle button {
  min-height: 32px;
  padding: 0 11px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.view-toggle button + button {
  border-left: 1px solid var(--line-dark);
}

.view-toggle button.active {
  background: var(--blue);
  color: #fff;
}

.code-files {
  border-top: 1px solid var(--line);
  padding: 16px 14px;
}

.code-file-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.code-file-list button {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-file-list button.active {
  border-color: #98a9ff;
  background: var(--blue-soft);
  color: #2947d4;
}

.artifact-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  text-decoration: none;
  background: #fff;
}

.artifact-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.artifact-link small {
  color: var(--muted);
  text-align: right;
}

.results-note {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.results-note strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.results-note code {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.results-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.mode-tabs button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 720;
  white-space: nowrap;
}

.mode-tabs button.active {
  background: var(--blue);
  color: #fff;
}

.right-panel .mode-tabs {
  padding: 12px 0 0;
  border-bottom: 0;
  flex-wrap: wrap;
}

.right-panel .mode-tabs button {
  border-radius: 8px;
}

.result-card {
  padding: 20px;
  border-top: 1px solid var(--line);
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.result-head.subhead {
  margin-top: 16px;
}

.result-head h3 {
  font-size: 18px;
}

.result-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.metric small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap.figure-wrap {
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.figure-result {
  display: grid;
  gap: 14px;
}

.figure-result figure {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.figure-result img {
  width: min(100%, 680px);
  max-height: 520px;
  justify-self: center;
  object-fit: contain;
}

.figure-result figcaption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.figure-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.figure-table table {
  min-width: 760px;
}

.figure-table td:nth-child(3),
.figure-table td:nth-child(4),
.figure-table td:nth-child(5),
.figure-table td:nth-child(6) {
  font-family: var(--mono);
}

.terminal-hint {
  display: grid;
  gap: 14px;
  border: 1px solid #b8cffd;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 16px;
  background: #f3f7ff;
}

.terminal-hint h4 {
  margin: 0;
  color: #2947d4;
  font-size: 16px;
}

.terminal-hint p {
  margin-top: 6px;
  color: #536179;
  font-size: 13px;
  line-height: 1.5;
}

.terminal-hint-button {
  width: fit-content;
  min-height: 36px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--blue);
  color: #fff;
  font-weight: 760;
}

.terminal-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.terminal-examples span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7e2ff;
  border-radius: 999px;
  padding: 0 9px;
  background: #fff;
  color: #475569;
  font-family: var(--mono);
  font-size: 12px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f2f5ff;
  color: #475569;
  font-weight: 760;
}

tbody tr.summary-row td,
tbody tr.falcon-row td {
  font-weight: 760;
}

tbody tr.summary-row td {
  background: #fff7f5;
}

tbody tr.meta-row td {
  background: #fbfcff;
  color: #475569;
}

tbody tr.comparison-row td {
  background: #fff7f5;
  color: var(--red);
  font-weight: 760;
}

td.label-cell {
  font-weight: 760;
}

td.emphasis-cell {
  color: var(--red);
  font-weight: 760;
}

.free-seed {
  margin: 0 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcff;
}

.free-seed.hidden {
  display: none;
}

.free-seed p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.seed-controls {
  display: grid;
  grid-template-columns: repeat(4, auto) minmax(160px, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.seed-controls button {
  min-height: 36px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #2947d4;
  font-weight: 720;
}

.right-panel .free-seed {
  margin: 0;
  border-width: 0 0 1px;
  border-radius: 0;
}

.right-panel .seed-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.right-panel .seed-controls input {
  grid-column: 1 / -1;
}

.code-viewer {
  margin: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
}

.code-viewer .result-head {
  align-items: center;
  margin: 0;
  padding: 12px 16px;
  background: #111827;
  color: #e5e7eb;
}

.code-viewer .result-head span {
  color: #9ca3af;
  font-family: var(--mono);
  font-size: 11px;
}

.code-viewer pre {
  max-height: 420px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: #d1d5db;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}

.code-viewer.binary {
  background: #fff;
}

.code-viewer.binary pre {
  color: var(--text);
  white-space: pre-wrap;
}

.code-viewer.binary code {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcff;
  color: var(--text);
}

.terminal-panel {
  margin: 20px;
  border: 1px solid #1e293b;
  border-radius: 8px;
  overflow: hidden;
  background: #050b16;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

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

.terminal-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid #1e293b;
  background: #0b1220;
  color: #e2e8f0;
  font-family: var(--mono);
  font-size: 12px;
}

.terminal-head small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
}

.terminal-output {
  min-height: 300px;
  max-height: 420px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: #cbd5e1;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-panel .terminal-output {
  min-height: 360px;
}

.terminal-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid #1e293b;
  background: #070d18;
}

.terminal-form span {
  padding: 8px 0;
  color: #7dd3fc;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.terminal-form textarea {
  width: 100%;
  max-height: 132px;
  min-height: 36px;
  resize: none;
  border: 1px solid #263449;
  border-radius: 6px;
  padding: 8px 10px;
  outline: 0;
  background: #0f172a;
  color: #e5e7eb;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
}

.terminal-form textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .12);
}

.terminal-form button {
  min-height: 36px;
  border-radius: 6px;
  padding: 0 13px;
  background: #38bdf8;
  color: #082f49;
  font-size: 12px;
  font-weight: 820;
}

.terminal-form button:disabled {
  cursor: wait;
  opacity: .55;
}

.run-box {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.queue {
  padding: 18px 12px;
}

.run-box p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.run-button,
.secondary-button {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border-radius: 8px;
  font-weight: 760;
}

a.secondary-button {
  text-decoration: none;
}

.secondary-button.slim {
  width: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 0 12px;
}

.run-button {
  background: var(--blue);
  color: #fff;
}

.run-button.disabled,
.run-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.secondary-button {
  border: 1px solid var(--line-dark);
  background: #fff;
  color: #334155;
}

.secondary-button.danger {
  border-color: #ffd0c9;
  color: var(--red);
}

.active-job-status {
  margin-top: 12px;
}

.active-job-status small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.active-job-card {
  width: 100%;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcff;
  color: var(--text);
  text-align: left;
}

.active-job-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.active-job-card strong {
  font-size: 13px;
  line-height: 1.3;
}

.progress-line {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.progress-line small {
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf8;
}

.progress-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--blue);
}

.queue-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.queue-history {
  display: grid;
  gap: 8px;
}

.queue-history-toggle {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--ink);
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.queue-history-toggle::before {
  content: ">";
  color: var(--muted);
  font-size: 12px;
}

.queue-history.open .queue-history-toggle::before {
  content: "v";
}

.queue-history-toggle span {
  font-weight: 800;
}

.queue-history-toggle small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: right;
}

.queue-history-toggle:hover,
.queue-history-toggle:focus-visible {
  border-color: #98a9ff;
  box-shadow: 0 0 0 3px rgba(51, 87, 232, .1);
  outline: 0;
}

.queue-history-list {
  display: grid;
  gap: 8px;
}

.queue-history-list[hidden] {
  display: none !important;
}

.job {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  outline: 0;
  cursor: pointer;
}

.job:hover,
.job:focus-visible,
.job.selected {
  border-color: #98a9ff;
  box-shadow: 0 0 0 3px rgba(51, 87, 232, .1);
}

.job.running {
  border-color: #8fb2ff;
}

.job.launching {
  border-color: #dbc07b;
  background: #fffdf5;
}

.job.queued {
  background: #fbfcff;
}

.job.completed {
  border-color: #c8e0d1;
  background: #fbfffc;
}

.job.cancelled {
  opacity: .65;
}

.job.failed {
  border-color: #ffd0c9;
  background: #fff8f7;
}

.job.empty {
  background: #fbfcff;
  cursor: default;
}

.job-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.job b,
.job span,
.job small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.job span,
.job small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.job a {
  color: #2947d4;
  text-decoration: none;
}

.remote-artifacts {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.remote-artifacts a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  background: #fff;
}

.remote-artifacts a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
}

.job-state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #2947d4;
  font-size: 12px;
  font-weight: 760;
}

.job-state.running {
  background: var(--blue-soft);
  color: #2947d4;
}

.job-state.queued {
  background: #fff8e6;
  color: var(--amber);
}

.job-state.launching {
  background: #fff8e6;
  color: var(--amber);
}

.job-state.completed {
  background: #edf9f0;
  color: var(--green);
}

.job-state.failed {
  background: #fff1f0;
  color: var(--red);
}

.job-state.cancelled {
  background: #fff1f0;
  color: var(--red);
}

.job-result-panel {
  margin-top: 18px;
}

.job-result-panel:empty {
  display: none;
}

.job-result {
  border: 1px solid #b8dfc5;
  border-left: 5px solid var(--green);
  border-radius: 8px;
  padding: 16px;
  background: #f1fbf5;
  box-shadow: 0 8px 24px rgba(32, 95, 62, .08);
}

.job-result .result-head {
  align-items: flex-start;
  margin-bottom: 10px;
}

.job-result .result-head h3 {
  color: #236341;
}

.job-result .result-head > span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: #dff6e8;
  color: #236341;
  font-weight: 760;
}

.job-result.state-running,
.job-result.state-launching,
.job-result.state-queued {
  border-color: #b8cffd;
  border-left-color: var(--blue);
  background: #f3f7ff;
  box-shadow: 0 8px 24px rgba(51, 87, 232, .08);
}

.job-result.state-running .result-head h3,
.job-result.state-launching .result-head h3,
.job-result.state-queued .result-head h3 {
  color: #2947d4;
}

.job-result.state-running .result-head > span,
.job-result.state-launching .result-head > span,
.job-result.state-queued .result-head > span {
  background: var(--blue-soft);
  color: #2947d4;
}

.job-result.state-failed,
.job-result.state-cancelled {
  border-color: #ffd0c9;
  border-left-color: var(--red);
  background: #fff8f7;
  box-shadow: 0 8px 24px rgba(180, 35, 24, .06);
}

.job-result.state-failed .result-head h3,
.job-result.state-cancelled .result-head h3 {
  color: var(--red);
}

.job-result.state-failed .result-head > span,
.job-result.state-cancelled .result-head > span {
  background: #fff1f0;
  color: var(--red);
}

.job-result p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.job-result p a {
  color: #2947d4;
  text-decoration: none;
}

.job-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.job-result-meta span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(67, 137, 91, .28);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, .72);
  color: #47604f;
  font-size: 12px;
}

.compact-table {
  max-height: 460px;
  background: #fff;
}

.compact-table table {
  min-width: 760px;
}

@media (max-width: 1500px) {
  .workspace {
    grid-template-columns: 240px minmax(0, 1fr) 300px 170px;
  }

  .panel-title,
  .file-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .file-header {
    gap: 10px;
  }

  .file-header h2 {
    font-size: 18px;
  }

  .file-actions {
    gap: 6px;
  }

  .secondary-button.slim,
  .view-toggle button {
    min-height: 30px;
    padding-left: 9px;
    padding-right: 9px;
    font-size: 11px;
  }

  .experiment-card {
    padding: 11px;
  }

  .experiment-card h3,
  .panel-title h2 {
    font-size: 14px;
  }

  .experiment-card p,
  .panel-title span,
  .job small {
    font-size: 11px;
  }

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

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr) 260px 150px;
  }

  .file-row {
    padding-left: calc(8px + var(--level) * 10px);
  }

  .file-open {
    gap: 5px;
  }

  .file-open {
    grid-template-columns: 12px 16px minmax(0, 1fr) auto;
  }

  .queue {
    padding-left: 8px;
    padding-right: 8px;
  }

  .queue .panel-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

@media (max-width: 800px) {
  .hero,
  .capsule-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px 20px 0;
  }

  .identity {
    width: 100%;
  }

  .server-strip,
  .workspace {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .left-panel,
  .main-panel,
  .right-panel,
  .queue-panel {
    grid-row: auto;
    grid-column: auto;
  }

  .file-tree {
    height: 420px;
  }

  .left-panel,
  .main-panel,
  .right-panel,
  .queue-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-grid,
  .seed-controls {
    grid-template-columns: 1fr;
  }

  .file-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .terminal-form {
    grid-template-columns: 1fr auto;
  }

  .terminal-form span {
    grid-column: 1 / -1;
    white-space: normal;
    word-break: break-all;
  }
}
