:root {
  --bg: #0a0f13;
  --bg-deep: #070b0f;
  --surface: #0e151c;
  --surface-soft: #111920;
  --accent: #00d9ff;
  --text: #e5eef2;
  --muted: #7c8d96;
  --muted-strong: #9eaeb7;
  --line: rgba(0, 217, 255, 0.08);
  --line-strong: rgba(0, 217, 255, 0.18);
  --line-left: rgba(0, 217, 255, 0.42);
  --button-fill: rgba(0, 217, 255, 0.08);
  --button-fill-hover: rgba(0, 217, 255, 0.14);
  --sans: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", "Menlo", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(0, 217, 255, 0.04), transparent 30%),
    linear-gradient(180deg, #0d1319 0%, var(--bg) 54%, var(--bg-deep) 100%);
}

button,
textarea {
  font: inherit;
}

h1,
h2,
p,
ul,
li,
pre {
  margin: 0;
}

button {
  border: 0;
  background: none;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.labShell {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 38px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brandSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  margin-bottom: 6px;
}

.brandIntro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.94;
  flex-shrink: 0;
}

.brandLockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}

.brandName {
  font-size: 1.06rem;
  font-weight: 650;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.brandSubtitle {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.brandHeadline {
  max-width: 640px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 560;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.brandSubtext {
  max-width: 640px;
  color: rgba(158, 174, 183, 0.68);
  font-size: 10.5px;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.reasoningBlock {
  position: relative;
  padding: 16px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--line-left);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)),
    var(--surface);
}

.reasoningBlockInput {
  background:
    linear-gradient(180deg, rgba(0, 217, 255, 0.02), rgba(0, 217, 255, 0)),
    var(--surface-soft);
}

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

.blockLabel {
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.input {
  width: 100%;
  min-height: 154px;
  resize: vertical;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.65;
}

.input::placeholder {
  color: rgba(124, 141, 150, 0.78);
}

.inputHint {
  margin-top: 10px;
  color: rgba(158, 174, 183, 0.64);
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.composerFooter {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

.chip {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 217, 255, 0.02);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    color 150ms ease;
}

.chip:hover,
.chip:focus-visible {
  border-color: var(--line-strong);
  background: rgba(0, 217, 255, 0.05);
  color: var(--text);
  outline: none;
}

.reasonButton {
  min-width: 112px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(0, 217, 255, 0.26);
  border-radius: 4px;
  background: var(--button-fill);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.reasonButton:hover,
.reasonButton:focus-visible {
  border-color: rgba(0, 217, 255, 0.36);
  background: var(--button-fill-hover);
  color: #a9f5ff;
  outline: none;
}

.chatBlock {
  padding-bottom: 16px;
}

.modeBadge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 217, 255, 0.06);
}

.chatConversation {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.chatTurn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(0, 217, 255, 0.02);
}

.chatTurn.userTurn {
  border-left: 2px solid rgba(0, 217, 255, 0.35);
}

.chatTurn.assistantTurn {
  border-left: 2px solid rgba(0, 217, 255, 0.2);
}

.chatTurnLabel {
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chatTurnText {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chatAnalysis {
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 217, 255, 0.03);
}

.chatAnalysisTitle {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.chatAnalysisLine {
  color: var(--muted-strong);
  font-size: 0.82rem;
  line-height: 1.45;
}

.chatAnalysisLine strong {
  color: var(--text);
}

.chatComposer {
  margin-top: 12px;
}

.chatInput {
  min-height: 96px;
}

.fieldInline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compactInput {
  min-height: 34px;
  min-width: 130px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: rgba(0, 217, 255, 0.03);
  color: var(--text);
}

.reasonButton:disabled {
  cursor: default;
  opacity: 0.58;
}

.statusTerminal {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.statusDot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 217, 255, 0.12);
  flex-shrink: 0;
}

.status {
  color: rgba(158, 174, 183, 0.88);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status.loading,
.status.ok,
.status.error {
  color: rgba(158, 174, 183, 0.88);
}

.results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.previewSection {
  display: block;
}

.previewBlock {
  opacity: 0.3;
}

.previewBlock .jsonBlock {
  color: rgba(229, 238, 242, 0.82);
}

.hidden {
  display: none;
}

.flowMarker {
  padding-left: 8px;
  color: rgba(0, 217, 255, 0.78);
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1;
}

.jsonBlock,
.explanationBlock {
  min-height: 72px;
}

.jsonBlock {
  overflow-x: auto;
  color: #cdeff7;
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.explanationBlock {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feedbackSection {
  display: none;
}

.samwarq-article {
  max-width: 640px;
  margin: 80px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  text-align: left;
}

.aboutHeader,
.aboutSection,
.aboutIntro {
  display: flex;
  flex-direction: column;
}

.aboutHeader {
  gap: 10px;
}

.aboutIntro,
.aboutSection {
  gap: 10px;
}

.aboutEyebrow {
  color: rgba(0, 217, 255, 0.72);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.samwarq-article section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
}

.samwarq-article h1 {
  color: var(--text);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.samwarq-article h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b949e;
}

.samwarq-article p {
  color: #8b949e;
  line-height: 1.6;
}

.system-identity {
  color: #e6edf3;
  font-size: 13px;
  margin-top: 8px;
}

.aboutFlow,
.aboutQuote {
  color: var(--text);
}

.aboutFlow {
  font-family: var(--mono);
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.aboutList {
  color: #8b949e;
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.aboutList li::marker {
  color: rgba(0, 217, 255, 0.72);
}

.aboutQuote {
  font-weight: 560;
}

@media (max-width: 720px) {
  .labShell {
    padding: 26px 16px 48px;
  }

  .logo {
    width: 48px;
    height: 48px;
  }

  .brandName {
    font-size: 0.96rem;
    letter-spacing: 0.28em;
  }

  .reasoningBlock {
    padding: 14px 14px 16px;
  }

  .composerFooter {
    flex-direction: column;
    align-items: stretch;
  }

  .reasonButton {
    width: 100%;
  }

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

  .samwarq-article {
    margin: 56px auto;
    padding: 0 18px;
  }
}
