* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: #1a1c18;
  background: #f4f5f0;
}

a {
  color: #2f6b1f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img, svg {
  max-width: 100%;
  vertical-align: middle;
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e2e4dc;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  width: 100%;
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #1a1c18;
  text-decoration: none;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 30px;
  height: 30px;
}

.logo-dot {
  color: #6b6f64;
  font-weight: 500;
}

.main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  color: #3d4138;
  font-size: 14px;
  font-weight: 500;
}

.main-nav a:hover {
  color: #1a1c18;
  text-decoration: none;
}

.main-nav a.active {
  color: #1a1c18;
  font-weight: 700;
}

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

.header-actions > a:not(.button) {
  font-size: 14px;
  font-weight: 500;
  color: #3d4138;
}

.menu-button {
  display: none;
  background: #fff;
  border: 1px solid #d5d8ce;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid #d0d3c8;
  background: #fff;
  color: #1a1c18;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  background: #f0f1eb;
  text-decoration: none;
}

.button--primary {
  background: #8fd92a;
  border-color: #7fc41f;
  color: #1a1c18;
}

.button--primary:hover {
  background: #7fc41f;
  color: #1a1c18;
}

.button--dark {
  background: #1a1c18;
  border-color: #1a1c18;
  color: #fff;
}

.button--dark:hover {
  background: #000;
  color: #fff;
}

/* Layout: full page width */
html, body {
  width: 100%;
  min-height: 100%;
}

.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 32px 48px;
  box-sizing: border-box;
}

main {
  min-height: calc(100vh - 140px);
  width: 100%;
}



/* Home */
.hero {
  background: #fff;
  border: 1px solid #e2e4dc;
  border-radius: 14px;
  padding: 40px 32px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(26, 28, 24, 0.04);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 0 20px;
  color: #4d5248;
  max-width: 48rem;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero-note {
  font-size: 13px;
  color: #6b6f64;
}

.hero--glow {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(143, 217, 42, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(90, 140, 255, 0.08), transparent 50%),
    #fff;
}

.button--ghost {
  background: transparent;
  border-color: #c8ccc0;
  color: #3d4138;
}

.button--ghost:hover {
  background: #f0f1eb;
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  background: #f1f9e4;
  border: 1px solid #d4e8b5;
  color: #3f6b1c;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* Model lineup */
.section-head {
  margin-bottom: 4px;
}

.section-head h2 {
  margin-bottom: 8px;
}

.model-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}

@media (min-width: 800px) {
  .model-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .model-grid--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }
}

.model-card {
  border: 1px solid #e2e4dc;
  border-radius: 14px;
  padding: 20px;
  background: #fafbf7;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.model-card:hover {
  border-color: #c8d4b0;
  box-shadow: 0 6px 20px rgba(26, 28, 24, 0.06);
  transform: translateY(-1px);
}

.model-card--featured {
  background: linear-gradient(165deg, #f7fcec 0%, #fff 55%);
  border-color: #b8d97a;
  box-shadow: 0 2px 12px rgba(127, 196, 31, 0.12);
}

.model-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.model-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #eef0e8;
  color: #4d5248;
  padding: 3px 8px;
  border-radius: 999px;
}

.model-pill--hot {
  background: #e8f7c8;
  color: #3a6b12;
}

.model-api-id code {
  font-size: 10px;
  color: #7a7e73;
  background: #eef0e8;
  padding: 2px 6px;
  border-radius: 4px;
}

.model-card h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.model-card h3 > span {
  margin-left: 6px;
  color: #73796d;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.model-card > p {
  margin: 4px 0 8px;
  font-size: 14px;
  color: #555a50;
  line-height: 1.5;
  flex: 1;
}

.auto-routing-details {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1.2fr);
  gap: 16px;
  margin: 6px 0 10px;
}

.auto-routing-details > div {
  padding: 14px;
  border: 1px solid #e3e8d9;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.auto-routing-details h4 {
  margin: 0 0 9px;
  color: #62685c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.routing-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.routing-signals li {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf5d6;
  color: #3f651c;
  font-size: 11px;
  font-weight: 700;
}

.model-pool {
  margin: 0;
  color: #464b42;
  font-size: 12px;
  line-height: 1.65;
}

.model-stats {
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid #e6e8e0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: #4d5248;
}

.model-stats strong {
  color: #1a1c18;
}

.oss-star {
  color: #9aa094;
  font-weight: 500;
  font-size: 0.75em;
  vertical-align: super;
}

.oss-footnote {
  font-size: 11px;
  color: #9aa094;
  margin: 10px 0 0;
  font-weight: 400;
}

.models-footnote {
  margin-top: 14px;
}

.try-footnote {
  margin: 8px 0 0;
  font-size: 10px;
  color: #a8aca2;
}

.chat-toolbar .model-picker label {
  margin-right: 0;
}

.model-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(560px, 100%);
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #dfe6d3;
  border-radius: 12px;
  background: linear-gradient(145deg, #f8fcec, #fff);
}

.model-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-toolbar .model-select-row select {
  min-width: 240px;
  border-color: #b9ce94;
  color: #26301f;
  font-weight: 700;
}

.model-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4b711e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.model-live > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #76b82a;
  box-shadow: 0 0 0 3px rgba(118, 184, 42, 0.15);
}

.model-description {
  max-width: 460px;
  color: #6b6f64;
  font-size: 12px;
  line-height: 1.4;
}

.model-pool-summary {
  max-width: 540px;
  color: #858b7f;
  font-size: 10px;
  line-height: 1.45;
}

.model-pool-summary strong {
  color: #6a7164;
}

.model-pool-note {
  line-height: 1.6;
}

@media (max-width: 620px) {
  .auto-routing-details {
    grid-template-columns: 1fr;
  }

  .model-card h3 > span {
    display: block;
    margin: 3px 0 0;
  }

  .model-picker {
    width: 100%;
    min-width: 0;
  }

  .chat-toolbar .model-select-row select {
    min-width: 0;
    max-width: 100%;
  }
}

.console {
  background: #171914;
  color: #ddd;
  border: 1px solid #2c2f28;
  border-radius: 12px;
  padding: 18px;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 13px;
  margin-top: 28px;
  line-height: 1.6;
}

.console .label {
  color: #8a8e83;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.console .ai {
  color: #b8e08a;
  margin-top: 10px;
}

.section {
  background: #fff;
  border: 1px solid #e2e4dc;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(26, 28, 24, 0.04);
}

.section h2 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.section > p {
  color: #555a50;
  margin-top: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}

@media (min-width: 700px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-card {
  border: 1px solid #e6e8e0;
  background: #fafbf7;
  border-radius: 12px;
  padding: 20px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: #555a50;
  line-height: 1.55;
}

.use-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}

@media (min-width: 700px) {
  .use-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .use-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

.use-grid article {
  border: 1px solid #e6e8e0;
  border-radius: 12px;
  padding: 16px;
  background: #fafbf7;
}

.use-grid h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.use-grid p {
  margin: 0;
  font-size: 13px;
  color: #555a50;
  line-height: 1.5;
}

.code-block {
  background: #171914;
  color: #e4e6dc;
  border: 1px solid #2c2f28;
  border-radius: 12px;
  margin: 14px 0;
  overflow: hidden;
}

.code-block code {
  background: transparent;
  color: inherit;
}

.code-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #2c2f28;
  font-size: 12px;
  color: #8a8e83;
  background: #1d201a;
}

.code-toolbar button {
  background: #2a2e27;
  border: 1px solid #3a3f36;
  color: #eee;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.code-toolbar button:hover {
  background: #353a31;
}

.code-block pre {
  margin: 0;
  padding: 16px;
  overflow: auto;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre;
}

.api-section {
  background: #171914;
  color: #eee;
  border: 1px solid #2c2f28;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 20px;
}

.api-section h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.api-section p {
  color: #b0b4a8;
}

.api-section ul {
  padding-left: 18px;
  color: #c8ccbf;
}

.api-section a {
  color: #b8e08a;
  font-weight: 600;
}

.cta {
  background: linear-gradient(180deg, #fff 0%, #f7f8f2 100%);
  border: 1px solid #e2e4dc;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(26, 28, 24, 0.04);
}

.cta h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.cta p {
  margin: 0;
  color: #555a50;
}

.cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  background: #fff;
  border-top: 1px solid #e2e4dc;
  padding: 36px 24px 20px;
  font-size: 14px;
}

.footer-grid {
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-grid h3 {
  margin: 0 0 10px;
  font-size: 12px;
  color: #6b6f64;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-grid a {
  display: block;
  color: #3d4138;
  margin-bottom: 8px;
  font-size: 14px;
}

.footer-brand p {
  color: #555a50;
  margin: 10px 0 0;
  max-width: 280px;
  font-size: 14px;
}

.footer-bottom {
  width: 100%;
  max-width: none;
  margin: 28px 0 0;
  padding-top: 14px;
  border-top: 1px solid #eee;
  color: #7a7e73;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Docs */
.docs-layout {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 32px 48px;
  display: grid;
  gap: 20px;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .docs-layout {
    grid-template-columns: 210px 1fr;
  }
}

.docs-sidebar {
  background: #fff;
  border: 1px solid #e2e4dc;
  border-radius: 12px;
  padding: 16px;
  height: fit-content;
  box-shadow: 0 1px 2px rgba(26, 28, 24, 0.04);
}

@media (min-width: 900px) {
  .docs-sidebar {
    position: sticky;
    top: 78px;
  }
}

.docs-sidebar h3 {
  margin: 16px 0 8px;
  font-size: 11px;
  color: #7a7e73;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.docs-sidebar h3:first-child {
  margin-top: 0;
}

.docs-sidebar a {
  display: block;
  padding: 5px 0;
  color: #3d4138;
  font-size: 14px;
}

.docs-sidebar a:hover {
  color: #1a1c18;
}

.docs-sidebar a.active {
  font-weight: 700;
  color: #2f6b1f;
}

.docs-content {
  background: #fff;
  border: 1px solid #e2e4dc;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(26, 28, 24, 0.04);
}

.docs-content h1 {
  margin-top: 0;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.docs-content h2 {
  margin-top: 36px;
  font-size: 20px;
  border-bottom: 1px solid #eceee7;
  padding-bottom: 8px;
  letter-spacing: -0.01em;
}

.docs-content p,
.docs-content li {
  color: #4d5248;
}

.docs-content code {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 0.9em;
}

/* Inline code only, not inside dark code blocks */
.docs-content :not(pre) > code {
  background: #eef1e6;
  color: #1a1c18;
  padding: 2px 6px;
  border-radius: 4px;
}

.docs-content .code-block code {
  background: transparent;
  color: #e4e6dc;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.docs-content .endpoint code {
  background: transparent;
  color: #1a1c18;
  padding: 0;
}

.docs-callouts {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

@media (min-width: 600px) {
  .docs-callouts {
    grid-template-columns: 1fr 1fr;
  }
}

.docs-callouts a {
  border: 1px solid #e2e4dc;
  border-radius: 10px;
  padding: 14px;
  background: #fafbf7;
  color: #1a1c18;
  display: block;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.docs-callouts a:hover {
  background: #f3f5ee;
  border-color: #cfd3c6;
  text-decoration: none;
}

.docs-callouts strong {
  display: block;
  margin-bottom: 4px;
}

.docs-callouts span {
  font-size: 13px;
  color: #6b6f64;
}

.info-box {
  background: #f4f9ec;
  border: 1px solid #d4e8b5;
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
  font-size: 14px;
  color: #3d4138;
}

.model-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
  border-radius: 10px;
  overflow: hidden;
}

.model-table th,
.model-table td {
  border: 1px solid #e2e4dc;
  padding: 10px 12px;
  text-align: left;
}

.model-table th {
  background: #f3f5ee;
  font-weight: 600;
}

.endpoint {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f3f5ee;
  border: 1px solid #e2e4dc;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 13px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.endpoint b {
  color: #2f6b1f;
}

.endpoint.endpoint--get b {
  color: #1a5fb4;
}

/* Chat / Try */
.chat-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 32px 28px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 70px);
  box-sizing: border-box;
}

.rate-limits {
  font-size: 12px;
  color: #6b6f64;
  margin-left: auto;
}

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

.chat-toolbar label {
  font-size: 13px;
  color: #555a50;
  margin-right: 6px;
  font-weight: 500;
}

.chat-toolbar select {
  padding: 8px 10px;
  border: 1px solid #d5d8ce;
  background: #fff;
  font-size: 14px;
  border-radius: 8px;
}

.conversation {
  flex: 1;
  background: #fff;
  border: 1px solid #e2e4dc;
  border-radius: 14px;
  padding: 18px;
  overflow-y: auto;
  min-height: 340px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(26, 28, 24, 0.04);
}

.chat-empty {
  text-align: center;
  color: #555a50;
  padding: 48px 12px;
}

.chat-empty h1 {
  font-size: 24px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: #1a1c18;
}

.starter-grid {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  text-align: left;
}

.starter-grid button {
  background: #fafbf7;
  border: 1px solid #e2e4dc;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: #3d4138;
  transition: background 0.15s ease;
}

.starter-grid button:hover {
  background: #f0f2ea;
}

.message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fafbf7;
  border: 1px solid #eceee7;
}

.message .role {
  font-size: 12px;
  font-weight: 700;
  color: #6b6f64;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.message p {
  margin: 0;
  white-space: pre-wrap;
  font-size: 14px;
  color: #1a1c18;
  line-height: 1.55;
}

.message-body {
  font-size: 14px;
  color: #1a1c18;
  line-height: 1.6;
}

.message-body .md-body > *:first-child {
  margin-top: 0;
}

.message-body .md-body > *:last-child {
  margin-bottom: 0;
}

.message-body h1,
.message-body h2,
.message-body h3,
.message-body h4,
.message-body h5,
.message-body h6 {
  margin: 0.9em 0 0.4em;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.message-body h1 { font-size: 1.35em; }
.message-body h2 { font-size: 1.2em; }
.message-body h3 { font-size: 1.08em; }

.message-body p {
  margin: 0.55em 0;
  white-space: normal;
}

.message-body ul,
.message-body ol {
  margin: 0.45em 0;
  padding-left: 1.35em;
}

.message-body li {
  margin: 0.2em 0;
}

.message-body blockquote {
  margin: 0.6em 0;
  padding: 0.35em 0.85em;
  border-left: 3px solid #c5d89a;
  background: #f4f7ec;
  color: #3d4138;
}

.message-body hr {
  border: 0;
  border-top: 1px solid #e2e4dc;
  margin: 0.9em 0;
}

.message-body a {
  color: #2f6b1f;
  text-decoration: underline;
}

.message-body code.md-inline {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 0.9em;
  background: #eef1e6;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.message-body .code-block-wrap {
  margin: 0.75em 0;
  border: 1px solid #2c2f28;
  border-radius: 10px;
  overflow: hidden;
  background: #171914;
}

.message-body .code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: #1d201a;
  border-bottom: 1px solid #2c2f28;
}

.message-body .code-lang {
  font-size: 11px;
  font-weight: 600;
  color: #8a8e83;
  text-transform: lowercase;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
}

.message-body .code-copy-btn {
  border: 1px solid #3a3f36;
  background: #2a2e27;
  color: #e4e6dc;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.message-body .code-copy-btn:hover {
  background: #353a31;
}

.message-body .code-copy-btn.is-copied {
  background: #3f6b1c;
  border-color: #5a8f28;
  color: #fff;
}

.message-body pre.md-code {
  margin: 0;
  padding: 12px 14px;
  background: #171914;
  color: #e4e6dc;
  border-radius: 0;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.5;
}

.message-body pre.md-code code {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  background: none;
  padding: 0;
  color: inherit;
}

/* Markdown tables */
.message-body .md-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0.75em 0;
  border: 1px solid #e2e4dc;
  border-radius: 10px;
  background: #fff;
}

.message-body table.md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.45;
}

.message-body table.md-table th,
.message-body table.md-table td {
  border: 1px solid #e2e4dc;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.message-body table.md-table th {
  background: #f0f2ea;
  font-weight: 700;
  color: #2a2e27;
}

.message-body table.md-table tr:nth-child(even) td {
  background: #fafbf7;
}

.message-body table.md-table code.md-inline {
  font-size: 0.92em;
}

/* Collapsible model thinking */
.think-block {
  margin: 0.55em 0 0.75em;
  border: 1px solid #e0e3d6;
  border-radius: 10px;
  background: #f7f8f2;
  overflow: hidden;
}

.think-summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #5c6156;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.think-summary::-webkit-details-marker {
  display: none;
}

.think-icon {
  display: inline-block;
  width: 1em;
  color: #8a8e83;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.think-block[open] > .think-summary {
  border-bottom: 1px solid #e0e3d6;
  background: #f0f2ea;
  color: #3d4138;
}

.think-body {
  padding: 10px 12px 12px;
  font-size: 13px;
  color: #555a50;
  background: #fafbf7;
}

.think-body p {
  margin: 0.4em 0;
}

.message--streaming .message-body {
  min-height: 1.2em;
}

.message--streaming .md-body::after {
  content: '▍';
  display: inline-block;
  width: 0.45em;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: #8fd92a;
  animation: caret-blink 1s step-end infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.stream-wait {
  color: #6b6f64;
  font-style: italic;
}

.message .copy-btn {
  margin-top: 8px;
  font-size: 12px;
  background: #fff;
  border: 1px solid #d5d8ce;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  color: #555a50;
}

.composer {
  background: #fff;
  border: 1px solid #e2e4dc;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(26, 28, 24, 0.04);
}

.composer textarea {
  width: 100%;
  border: 1px solid #d5d8ce;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  resize: vertical;
  min-height: 64px;
  background: #fafbf7;
}

.composer textarea:focus {
  outline: 2px solid #c5e08a;
  border-color: #8fd92a;
}

.composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 10px;
  flex-wrap: wrap;
}

.composer-bottom span {
  font-size: 12px;
  color: #7a7e73;
}

.temp-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #555a50;
  margin-top: 10px;
}

/* Batch image testing */
.testing-images-page {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 34px 32px 64px;
}

.image-lab-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 26px;
}

.image-lab-intro > div:first-child {
  max-width: 760px;
}

.image-lab-eyebrow,
.image-results-kicker {
  display: block;
  margin-bottom: 8px;
  color: #4f7c19;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.image-lab-intro h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.055em;
}

.image-lab-intro p {
  max-width: 680px;
  margin: 18px 0 0;
  color: #5b6056;
  font-size: 16px;
}

.image-lab-specs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.image-lab-specs span {
  padding: 8px 11px;
  border: 1px solid #dfe2d8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #6b6f64;
  font-size: 12px;
  white-space: nowrap;
}

.image-lab-specs b {
  color: #252820;
}

.image-batch-form {
  padding: 20px;
  border: 1px solid #dfe2d8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(35, 42, 29, 0.06);
}

.image-batch-form > label {
  display: block;
  margin-bottom: 9px;
  color: #34382f;
  font-size: 13px;
  font-weight: 700;
}

.image-prompt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 12px;
}

.image-prompt-row textarea {
  width: 100%;
  min-height: 88px;
  padding: 15px 16px;
  border: 1px solid #d7dad0;
  border-radius: 11px;
  outline: none;
  background: #f8f9f5;
  color: #1a1c18;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.image-prompt-row textarea:focus {
  border-color: #8fcf38;
  box-shadow: 0 0 0 3px rgba(143, 207, 56, 0.16);
}

.image-prompt-row textarea:disabled {
  color: #777c71;
}

.image-generate-button {
  min-width: 150px;
  border-radius: 11px;
  font-size: 14px;
}

.image-generate-button svg {
  width: 20px;
  height: 20px;
}

.image-generate-button.is-cancel {
  border-color: #e1b9b4;
  background: #fff5f3;
  color: #8f3128;
}

.image-batch-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
  margin-top: 11px;
}

.image-batch-status,
.image-batch-progress {
  margin: 0;
  color: #72766d;
  font-size: 12px;
}

.image-batch-status.is-error { color: #a2382e; }
.image-batch-status.is-warning { color: #8a5b13; }
.image-batch-status.is-success { color: #397312; }

.image-batch-progress {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.image-results {
  margin-top: 40px;
}

.image-results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.image-results-kicker {
  margin-bottom: 2px;
}

.image-results-heading h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.025em;
}

.image-results-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.image-clear-button,
.image-refine-button {
  padding: 7px 12px;
  font-size: 12px;
}

.image-refine-button:disabled {
  border-color: #dfe2d8;
  background: #eef0e9;
  color: #969b90;
  cursor: not-allowed;
}

.image-grid-empty {
  display: grid;
  min-height: 310px;
  place-items: center;
  align-content: center;
  padding: 34px;
  border: 1px dashed #d4d8cc;
  border-radius: 16px;
  color: #73786d;
  text-align: center;
}

.image-empty-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
  color: #9ca493;
}

.image-grid-empty h3 {
  margin: 0 0 5px;
  color: #373b32;
  font-size: 16px;
}

.image-grid-empty p {
  max-width: 440px;
  margin: 0;
  font-size: 13px;
}

.image-results-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.image-result-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe2d9;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 14px rgba(27, 34, 22, 0.04);
}

.image-result-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #eceee8;
}

.image-result-frame::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.72) 45%, transparent 70%);
  content: '';
  transform: translateX(-100%);
}

.image-result-card.is-queued .image-result-frame::before,
.image-result-card.is-generating .image-result-frame::before {
  animation: image-shimmer 1.8s ease-in-out infinite;
}

@keyframes image-shimmer {
  to { transform: translateX(100%); }
}

.image-result-position {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: grid;
  width: 29px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 7px;
  background: rgba(22, 25, 19, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(7px);
}

.image-result-pending {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  color: #747a6e;
  font-size: 11px;
  text-align: center;
}

.image-result-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #cdd2c6;
  border-top-color: #6ea520;
  border-radius: 50%;
  animation: image-spin 0.9s linear infinite;
}

.image-result-card.is-queued .image-result-spinner {
  animation: none;
  border-top-color: #cdd2c6;
}

@keyframes image-spin {
  to { transform: rotate(360deg); }
}

.image-result-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  animation: image-arrive 0.35s ease-out both;
}

.image-result-frame img:focus-visible {
  outline: 3px solid #8fd92a;
  outline-offset: -3px;
}

@keyframes image-arrive {
  from { opacity: 0; transform: scale(1.025); }
}

.image-result-actions {
  position: absolute;
  z-index: 3;
  right: 9px;
  bottom: 9px;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.image-result-card:hover .image-result-actions,
.image-result-actions:focus-within {
  opacity: 1;
  transform: none;
}

.image-result-actions a {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 7px;
  background: rgba(22, 25, 19, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(7px);
}

.image-result-actions a:hover {
  text-decoration: none;
  background: rgba(22, 25, 19, 0.94);
}

.image-result-branch-hint {
  position: absolute;
  z-index: 3;
  bottom: 9px;
  left: 9px;
  max-width: calc(100% - 92px);
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 7px;
  background: rgba(22, 25, 19, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  backdrop-filter: blur(7px);
}

.image-result-card:hover .image-result-branch-hint,
.image-result-frame:focus-within .image-result-branch-hint {
  opacity: 1;
  transform: none;
}

.image-result-details {
  padding: 11px 12px 12px;
}

.image-result-details > span {
  display: block;
  margin-bottom: 4px;
  color: #90958a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-result-details > p {
  display: -webkit-box;
  min-height: 37px;
  margin: 0;
  overflow: hidden;
  color: #52574d;
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.image-result-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #eceee7;
}

.image-result-feedback > span {
  color: #92978c;
  font-size: 9px;
  font-weight: 700;
}

.image-rating-controls {
  display: flex;
  gap: 5px;
}

.image-rating-button {
  min-width: 45px;
  padding: 4px 7px;
  border: 1px solid #dfe2d8;
  border-radius: 6px;
  background: #f8f9f5;
  color: #676c62;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.image-rating-button:hover:not(:disabled) {
  border-color: #bfc5b8;
  background: #f0f2eb;
}

.image-rating-button:disabled {
  color: #b0b4ab;
  cursor: not-allowed;
}

.image-rating-button.is-active[data-rating="like"] {
  border-color: #91bc5b;
  background: #edf7e1;
  color: #397312;
}

.image-rating-button.is-active[data-rating="dislike"] {
  border-color: #d5a6a0;
  background: #fff0ed;
  color: #973a31;
}

.image-result-card.is-failed .image-result-frame {
  background: #f5e9e7;
}

.image-result-card.is-failed .image-result-pending {
  color: #9b3930;
}

.image-result-card.is-failed .image-result-spinner {
  display: none;
}

@media (max-width: 1150px) {
  .image-results-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .image-results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .image-lab-intro { align-items: flex-start; flex-direction: column; gap: 18px; }
  .image-lab-specs { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .testing-images-page { padding: 26px 16px 44px; }
  .image-prompt-row { grid-template-columns: 1fr; }
  .image-generate-button { min-height: 48px; }
  .image-results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .image-result-actions { opacity: 1; transform: none; }
  .image-result-branch-hint { opacity: 1; transform: none; }
  .image-result-feedback { align-items: stretch; flex-direction: column; }
  .image-rating-controls { width: 100%; }
  .image-rating-button { flex: 1; }
}

@media (max-width: 420px) {
  .image-results-grid { grid-template-columns: 1fr; }
}

/* Legal */
.legal-hero {
  background: #fff;
  border-bottom: 1px solid #e2e4dc;
  padding: 40px 20px;
}

.legal-hero .wrap {
  padding: 0;
}

.legal-hero h1 {
  margin: 0 0 10px;
  font-size: 32px;
  letter-spacing: -0.02em;
}

.legal-hero p {
  margin: 0;
  color: #555a50;
  max-width: 640px;
  font-size: 16px;
}

.legal-meta {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: #7a7e73;
}

.legal-body {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 32px 56px;
  box-sizing: border-box;
}

.legal-hero .wrap {
  width: 100%;
  max-width: none;
  padding: 0 12px;
}

.legal-hero p {
  max-width: none;
}

.legal-body section {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eceee7;
}

.legal-body h2 {
  font-size: 18px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.legal-body p,
.legal-body li {
  color: #4d5248;
  font-size: 14px;
  line-height: 1.6;
}

.legal-nav {
  margin-bottom: 24px;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.legal-nav a {
  color: #3d4138;
}

/* Mobile nav */
@media (max-width: 700px) {
  .menu-button {
    display: inline-block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 10px;
  }

  .main-nav.open {
    display: flex;
  }

  .header-actions {
    display: none;
  }

  .wrap,
  .docs-layout,
  .chat-page,
  .legal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding: 28px 20px;
  }

  .section,
  .api-section,
  .cta {
    padding: 22px 18px;
  }
}

.mobile-actions {
  display: none;
}

.header-actions .button {
  white-space: nowrap;
}

/* Search-intent landing pages */
.landing-page {
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 0 0 14px;
  color: #777c70;
  font-size: 13px;
}

.breadcrumbs a {
  color: #4d5248;
}

.intent-section .section-head p,
.reseller-preview .section-head p {
  color: #555a50;
  margin: 0;
}

.section-link {
  margin: 18px 0 0 !important;
  font-weight: 600;
}

.section-link a {
  color: #3f6b1c;
}

.notice {
  border-radius: 10px;
  margin: 18px 0;
  padding: 15px 16px;
  color: #3d4138;
  font-size: 14px;
  line-height: 1.6;
}

.notice--honest {
  background: #f4f9ec;
  border: 1px solid #d4e8b5;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.table-scroll .model-table {
  min-width: 680px;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.faq-list details {
  background: #fafbf7;
  border: 1px solid #e2e4dc;
  border-radius: 10px;
  padding: 0 16px;
}

.faq-list details[open] {
  background: #fff;
  border-color: #cfd7c2;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 650;
  padding: 15px 28px 15px 0;
  position: relative;
}

.faq-list summary::after {
  content: "+";
  color: #6f7569;
  font-size: 20px;
  font-weight: 400;
  position: absolute;
  right: 0;
  top: 10px;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list p {
  color: #555a50;
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
  padding: 0 0 15px;
}

.faq-list code,
.step-list code {
  background: #eef1e6;
  border-radius: 4px;
  color: #1a1c18;
  padding: 2px 5px;
}

.step-list {
  counter-reset: reseller-step;
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.step-list li {
  align-items: start;
  background: #fafbf7;
  border: 1px solid #e2e4dc;
  border-radius: 10px;
  counter-increment: reseller-step;
  display: grid;
  gap: 2px 12px;
  grid-template-columns: 34px 1fr;
  padding: 15px;
}

.step-list li::before {
  align-items: center;
  background: #e8f7c8;
  border-radius: 999px;
  color: #3a6b12;
  content: counter(reseller-step);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  grid-row: 1 / span 2;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.step-list span {
  color: #555a50;
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 700px) {
  .landing-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .breadcrumbs {
    margin-top: 2px;
  }
}
