:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --background: #09100d;
  --surface: #111a16;
  --surface-light: #17231d;
  --border: #2a3a32;
  --text: #eef7f1;
  --muted: #9aafa3;
  --accent: #9af0c3;
  --accent-dark: #153324;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 80% 5%, rgba(72, 167, 115, 0.16), transparent 28rem),
    var(--background);
  color: var(--text);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid rgba(42, 58, 50, 0.7);
  background: rgba(9, 16, 13, 0.86);
  backdrop-filter: blur(16px);
}

.brand {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  max-width: 850px;
  padding: 110px 0 80px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.04em;
}

.hero-copy,
.downloads > p {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.button {
  display: inline-block;
  margin-top: 12px;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  color: #102018;
}

.chat-shell {
  overflow: hidden;
  min-height: 670px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(17, 26, 22, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.chat-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--border);
}

.chat-header label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

select,
textarea,
button {
  font: inherit;
}

select {
  min-width: 220px;
  padding: 10px 34px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-light);
  color: var(--text);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 460px;
  padding: 28px;
  overflow-y: auto;
}

.empty-state {
  display: grid;
  place-content: center;
  flex: 1;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 1.2rem;
}

.message {
  max-width: min(78%, 720px);
  padding: 14px 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-user {
  align-self: flex-end;
  border-color: #386049;
  background: var(--accent-dark);
}

.message-assistant {
  align-self: flex-start;
  background: var(--surface-light);
}

.status {
  min-height: 20px;
  margin: 0 28px;
  color: #ffb4a8;
  font-size: 0.85rem;
}

.composer {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px 28px 28px;
}

textarea {
  width: 100%;
  max-height: 160px;
  resize: none;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #0c1410;
  color: var(--text);
  line-height: 1.5;
}

textarea:focus {
  border-color: var(--accent);
}

.send-button {
  padding: 14px 20px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #102018;
  cursor: pointer;
  font-weight: 800;
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.downloads {
  padding: 110px 0;
}

.download-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: 100px 0;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.download-promo p {
  margin-bottom: 0;
  color: var(--muted);
}

.downloads-page {
  min-height: calc(100vh - 154px);
  padding-bottom: 100px;
}

.downloads-hero {
  max-width: 850px;
  padding: 100px 0 46px;
}

.release-summary {
  color: var(--accent);
  font-weight: 700;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.download-card {
  display: grid;
  gap: 8px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

.download-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.download-card strong {
  font-size: 1.45rem;
}

.download-card span:last-child {
  color: var(--muted);
}

.readiness {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.ready-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef6a6a;
  box-shadow: 0 0 12px rgba(239, 106, 106, 0.7);
}

.ready-light.ready {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(154, 240, 195, 0.8);
}

.ready-light.checking {
  background: #efc66a;
  box-shadow: 0 0 12px rgba(239, 198, 106, 0.7);
}

.version {
  min-height: 24px;
  color: var(--muted);
}

.download-button {
  justify-self: start;
}

.download-button.disabled {
  pointer-events: none;
  opacity: 0.4;
}

.download-error {
  margin: 24px 0;
}

.platform {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

footer {
  padding: 30px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 680px) {
  .site-header {
    padding: 18px 20px;
  }

  .hero {
    padding: 72px 0 56px;
  }

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

  select {
    width: 100%;
  }

  .messages {
    height: 430px;
    padding: 20px;
  }

  .message {
    max-width: 90%;
  }

  .composer {
    padding: 12px 20px 20px;
  }

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

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