:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-soft: #0d0d0e;
  --panel: rgba(19, 20, 22, 0.82);
  --panel-strong: rgba(31, 32, 35, 0.9);
  --line: rgba(255, 255, 255, 0.13);
  --line-bright: rgba(255, 255, 255, 0.26);
  --text: #f6f6f3;
  --muted: #a7a7a0;
  --quiet: #73736b;
  --blue: #5c7cff;
  --amber: #ff9c48;
  --green: #61d394;
  --danger: #ff7676;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 28rem),
    radial-gradient(circle at 50% -22rem, rgba(255, 255, 255, 0.08), transparent 36rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 76%);
}

.page-shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px;
}

.hero {
  display: grid;
  min-height: 84svh;
}

.hero-stage {
  display: grid;
  min-width: 0;
  align-content: center;
  justify-items: center;
  gap: 24px;
  padding: 38px 0 34px;
}

.hero-logo-frame {
  display: block;
  width: 100%;
  max-width: 960px;
  line-height: 0;
}

.hero-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 80px rgba(0, 0, 0, 0.72));
}

.prompt-panel {
  width: 100%;
  max-width: 930px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    var(--panel);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.chat-panel {
  display: grid;
  min-height: 300px;
  max-height: min(520px, 56svh);
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.chat-output {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.chat-message {
  min-width: 0;
}

.user-message {
  justify-self: end;
  max-width: min(720px, 92%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.07);
  color: #f2f0ea;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.prompt-line {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 17px;
  line-height: 1.45;
}

.prompt-caret {
  color: var(--blue);
  font-weight: 800;
}

.prompt-handle {
  color: var(--amber);
}

.prompt-command {
  min-width: 0;
  color: #f2f0ea;
  overflow-wrap: anywhere;
}

.prompt-panel p {
  margin: 18px 0 0;
  color: #d6d5cd;
  font-size: 19px;
  line-height: 1.6;
}

.assistant-message p:last-child {
  margin-bottom: 0;
}

.assistant-message[data-loading="true"] .prompt-caret {
  color: var(--green);
}

.assistant-message.error-message .prompt-caret {
  color: var(--danger);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px;
  background: rgba(4, 4, 5, 0.4);
}

.chat-form textarea {
  width: 100%;
  max-height: 150px;
  min-height: 45px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  outline: none;
}

.chat-form textarea:focus {
  border-color: var(--line-bright);
  box-shadow: 0 0 0 3px rgba(92, 124, 255, 0.16);
}

.chat-form textarea::placeholder {
  color: var(--quiet);
}

.chat-form button {
  min-width: 72px;
  height: 45px;
  border: 0;
  border-radius: 8px;
  padding: 0 17px;
  background: #f1f1ec;
  color: #080809;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.chat-form button:disabled,
.chat-form textarea:disabled {
  cursor: wait;
  opacity: 0.62;
}

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

.outcome-strip {
  display: grid;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding: 30px 0 10px;
}

.section-intro {
  display: grid;
  gap: 10px;
  max-width: 790px;
}

.section-intro span {
  color: var(--amber);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-intro h2 {
  margin: 0;
  color: #edede8;
  font-size: clamp(27px, 3vw, 44px);
  font-weight: 650;
  line-height: 1.08;
}

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

.outcome-card {
  display: grid;
  min-height: 205px;
  align-content: start;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.024);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.card-index {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--quiet);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 13px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.16);
}

.outcome-card h3 {
  margin: 0;
  color: #f3f3ee;
  font-size: 22px;
  font-weight: 640;
  line-height: 1.12;
}

.outcome-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.52;
}

@media (max-width: 760px) {
  .page-shell {
    padding: 16px;
  }

  .hero {
    min-height: 82svh;
  }

  .hero-stage {
    gap: 18px;
    padding: 28px 0 24px;
  }

  .hero-logo-frame {
    width: min(100%, 720px);
  }

  .prompt-panel {
    max-height: 54svh;
  }

  .prompt-line {
    font-size: 15px;
  }

  .prompt-panel p {
    font-size: 16px;
  }

  .chat-output {
    padding: 17px;
  }

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

  .chat-form button {
    width: 100%;
  }

  .outcome-strip {
    padding-top: 26px;
  }

  .section-intro h2 {
    font-size: 29px;
  }

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

  .outcome-card {
    min-height: 190px;
  }
}

@media (max-width: 430px) {
  .prompt-command {
    flex-basis: 100%;
  }

  .outcomes {
    grid-template-columns: 1fr;
  }

  .outcome-card {
    min-height: 0;
  }
}
