:root {
  color-scheme: dark;
  --page: #050712;
  --page-soft: #0b1020;
  --surface: #0f1628;
  --surface-2: #151d30;
  --line: rgba(244, 241, 234, 0.13);
  --text: #f4f1ea;
  --muted: #a7a9b4;
  --gold: #e4c177;
  --bronze: #b88a44;
  --teal: #6ee7b7;
  --ink: #111827;
  --paper: #f7f1e6;
  --paper-2: #fffaf0;
  --navy: #172033;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(228, 193, 119, 0.13), transparent 28rem),
    linear-gradient(180deg, var(--page), var(--page-soft));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
}

button,
a,
textarea {
  font: inherit;
}

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

.app-shell {
  margin: 0 auto;
  max-width: 1220px;
  padding: 22px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 8px 0 28px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand-mark {
  align-items: center;
  background: var(--gold);
  border-radius: 50%;
  color: #070a12;
  display: inline-flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

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

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.toplinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.toplinks a,
.endpoint-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
}

.intro {
  align-items: end;
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr auto;
  margin-bottom: 26px;
}

.eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  margin: 0 0 8px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(44px, 8vw, 92px);
  line-height: 0.95;
  max-width: 780px;
}

h2 {
  font-size: 24px;
}

.intro p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
  margin-top: 14px;
  max-width: 660px;
}

.status-strip {
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  overflow: hidden;
}

.status-strip div {
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.status-strip span,
.status-strip strong {
  display: block;
}

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

.status-strip strong {
  color: var(--gold);
  font-size: 15px;
  margin-top: 4px;
}

.status-strip strong[data-state="live"] {
  color: var(--teal);
}

.demo-grid {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
}

.mobile-demo,
.chatgpt-demo {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow);
  padding: 18px;
}

.section-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.mode-toggle,
.screen-tabs,
.widget-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-button,
.screen-tab,
.widget-tab,
.tool-row button,
.composer button,
.option-list button {
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.mode-button,
.screen-tab,
.widget-tab {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  padding: 8px 10px;
}

.mode-button.is-active,
.screen-tab.is-active,
.widget-tab.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #070a12;
}

.screen-tabs {
  margin-bottom: 18px;
}

.phone-wrap {
  display: grid;
  justify-items: center;
}

.phone {
  aspect-ratio: 390 / 844;
  background: #070a12;
  border: 8px solid #1d2434;
  border-radius: 42px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
  color: var(--text);
  display: flex;
  flex-direction: column;
  max-width: 390px;
  min-height: 720px;
  overflow: hidden;
  padding: 18px;
  width: min(100%, 390px);
}

.phone[data-theme="light"] {
  background: var(--paper);
  border-color: #e7dcc8;
  color: var(--navy);
}

.phone-status,
.phone-header,
.composer {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.phone-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding-bottom: 18px;
}

.phone[data-theme="light"] .phone-status,
.phone[data-theme="light"] .screen-copy,
.phone[data-theme="light"] .mini-label {
  color: #6b7280;
}

.phone-header {
  gap: 14px;
}

.mini-label {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.phone h3 {
  font-size: 27px;
  line-height: 1.05;
  margin-top: 5px;
}

.icon-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: inherit;
  height: 38px;
  width: 38px;
}

.phone-screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
  padding: 22px 0;
}

.progress {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.progress span {
  background: var(--gold);
  display: block;
  height: 100%;
}

.chat-row,
.drawer,
.lesson-band,
.sandbox-block,
.metric-list div,
.step-list div {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
}

.phone[data-theme="light"] .chat-row,
.phone[data-theme="light"] .drawer,
.phone[data-theme="light"] .lesson-band,
.phone[data-theme="light"] .sandbox-block,
.phone[data-theme="light"] .metric-list div,
.phone[data-theme="light"] .step-list div,
.phone[data-theme="light"] textarea {
  background: var(--paper-2);
  border-color: rgba(23, 32, 51, 0.12);
}

.chat-row {
  padding: 16px;
}

.chat-row strong {
  color: var(--gold);
  display: block;
  font-size: 13px;
  margin-bottom: 7px;
}

.chat-row p,
.screen-copy,
.lesson-band p,
.sandbox-block p,
.step-list p {
  color: var(--muted);
  line-height: 1.45;
}

.phone[data-theme="light"] .chat-row p,
.phone[data-theme="light"] .lesson-band p,
.phone[data-theme="light"] .sandbox-block p,
.phone[data-theme="light"] .step-list p {
  color: #4b5563;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-list button {
  background: transparent;
  color: inherit;
  padding: 13px 14px;
  text-align: left;
}

.option-list button.selected {
  background: rgba(228, 193, 119, 0.14);
  border-color: rgba(228, 193, 119, 0.55);
}

.drawer {
  margin-top: auto;
  padding: 15px;
}

.drawer span,
.sandbox-block small {
  color: var(--gold);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.score-ring,
.feedback-score {
  align-items: baseline;
  align-self: center;
  background: linear-gradient(180deg, rgba(228, 193, 119, 0.22), rgba(110, 231, 183, 0.08));
  border: 1px solid rgba(228, 193, 119, 0.24);
  border-radius: 50%;
  display: flex;
  height: 168px;
  justify-content: center;
  margin: 6px 0;
  width: 168px;
}

.score-ring strong,
.feedback-score strong {
  font-size: 62px;
}

.metric-list,
.step-list {
  display: grid;
  gap: 9px;
}

.metric-list div,
.step-list div {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.metric-list strong {
  color: var(--gold);
}

.lesson-band,
.sandbox-block {
  padding: 16px;
}

.lesson-band span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.lesson-band h4 {
  font-size: 22px;
  line-height: 1.08;
  margin: 7px 0 9px;
}

.step-list span {
  align-items: center;
  background: var(--gold);
  border-radius: 50%;
  color: #070a12;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

textarea {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: inherit;
  min-height: 144px;
  padding: 14px;
  resize: none;
  width: 100%;
}

.tool-row {
  display: flex;
  gap: 8px;
}

.tool-row button {
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  flex: 1;
  padding: 10px;
}

.composer {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--muted);
  gap: 8px;
  padding: 8px 8px 8px 14px;
}

.phone[data-theme="light"] .composer {
  background: var(--paper-2);
  color: #4b5563;
}

.composer span {
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer button {
  background: var(--gold);
  border-color: var(--gold);
  color: #070a12;
  padding: 9px 13px;
}

.chat-window {
  background: #f8f8f5;
  border-radius: 24px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 720px;
  padding: 18px;
}

.chat-message {
  border-radius: 18px;
  line-height: 1.45;
  max-width: 86%;
  padding: 13px 15px;
}

.chat-message.user {
  align-self: end;
  background: #e8eefc;
}

.chat-message.assistant {
  align-self: start;
  background: #ffffff;
  border: 1px solid #e7e5dd;
}

.widget-tabs {
  border-top: 1px solid #e6e0d6;
  padding-top: 14px;
}

.widget-tab {
  background: #ffffff;
  border-color: #ded8cc;
  color: #5b6475;
}

.widget-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.widget-surface {
  background: #070a12;
  border-radius: 20px;
  flex: 1;
  min-height: 420px;
  overflow: hidden;
  padding: 18px;
  width: 100%;
}

.widget-card {
  background: linear-gradient(180deg, rgba(228, 193, 119, 0.1), rgba(12, 17, 30, 0.95));
  border: 1px solid rgba(244, 241, 234, 0.13);
  border-radius: 20px;
  color: var(--text);
  min-height: 100%;
  padding: 18px;
}

.widget-eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.widget-card h3 {
  font-size: 28px;
  line-height: 1.05;
  margin-bottom: 12px;
}

.widget-card p:not(.widget-eyebrow) {
  color: var(--muted);
  line-height: 1.48;
}

.widget-score {
  align-items: baseline;
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.widget-score strong {
  font-size: 56px;
  line-height: 1;
}

.pill-row,
.widget-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-row {
  margin-top: 16px;
}

.pill-row span,
.widget-links a {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.pill-row span {
  background: rgba(228, 193, 119, 0.12);
  border: 1px solid rgba(228, 193, 119, 0.26);
}

.widget-metric {
  border-top: 1px solid rgba(244, 241, 234, 0.13);
  color: var(--text);
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
}

.widget-metric strong {
  color: var(--gold);
}

.widget-action {
  background: var(--gold);
  border: 0;
  border-radius: 999px;
  color: #070a12;
  cursor: pointer;
  font-weight: 900;
  margin-top: 14px;
  padding: 11px 14px;
}

.widget-links {
  padding-top: 2px;
}

.widget-links a {
  background: #ffffff;
  border: 1px solid #ded8cc;
  color: #5b6475;
}

@media (max-width: 900px) {
  .intro,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 54px;
  }

  .status-strip {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .app-shell {
    padding: 14px;
  }

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 42px;
  }

  .phone {
    border-width: 5px;
    border-radius: 32px;
    min-height: 640px;
    padding: 14px;
  }

  .phone h3 {
    font-size: 23px;
  }

  .chat-window {
    min-height: 620px;
  }
}
