/* OpenaiDev — visual language aligned with community.openai.com (Discourse) */
:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #0d0d0d;
  --muted: #6e6e80;
  --line: #e5e5e5;
  --line-strong: #d0d0d5;
  --primary: #10a37f;
  --primary-hover: #1a7f64;
  --primary-soft: #e7f8f3;
  --header: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --font:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  font-family: var(--font);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

/* Top bar — clean Discourse/OpenAI community header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none !important;
  flex-shrink: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.topnav {
  display: flex;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.topnav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
}

.topnav a:hover,
.topnav a.link-muted:hover {
  color: var(--text);
}

.topbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff !important;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff !important;
}

.btn-ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--text) !important;
}

.btn-ghost:hover {
  border-color: #bdbdc7;
  background: #fafafa;
}

/* Hero */
.hero-band {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  padding: 40px 0 28px;
}

.pill {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 600;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-weight: 700;
}

.lede {
  margin: 0 0 20px;
  max-width: 54ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.lede.tight {
  margin-bottom: 16px;
}

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

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.hero-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-card-foot {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* Sections */
.section {
  margin: 8px 0 36px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.section-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Topic table — Discourse latest list vibe */
.topic-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.topic-row {
  display: grid;
  grid-template-columns: 1.4fr 0.45fr 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  align-items: center;
  color: inherit;
  text-decoration: none !important;
}

.topic-row:first-child {
  border-top: 0;
}

.topic-row.topic-head {
  background: #fafafa;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

a.topic-row:hover {
  background: #fcfcfc;
}

.topic-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.topic-title strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.topic-title span {
  font-size: 13px;
  color: var(--muted);
}

.topic-meta {
  font-size: 13px;
  color: var(--muted);
}

.cat {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f0f0f3;
  color: #3f3f46;
}

.cat-api {
  background: #e8f1ff;
  color: #1d4ed8;
}
.cat-agent {
  background: #efe7ff;
  color: #6d28d9;
}
.cat-codex {
  background: var(--primary-soft);
  color: var(--primary-hover);
}
.cat-ann {
  background: #fff4e5;
  color: #b45309;
}
.cat-bug {
  background: #fee2e2;
  color: #b91c1c;
}

.waitlist {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 22px 20px 24px;
  box-shadow: var(--shadow);
}

.form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.form input {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.form input:focus {
  outline: 2px solid rgba(16, 163, 127, 0.28);
  border-color: var(--primary);
}

.form-status {
  min-height: 1.3em;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.form-status.is-ok {
  color: var(--primary-hover);
}

.form-status.is-err {
  color: #b91c1c;
}

.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  margin-top: 24px;
}

.footer-inner {
  padding: 22px 0 28px;
  font-size: 13px;
  color: var(--muted);
}

.footer p {
  margin: 0 0 6px;
}

.muted {
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: #f0f0f3;
  padding: 1px 5px;
  border-radius: 4px;
}

@media (max-width: 860px) {
  .hero-band {
    grid-template-columns: 1fr;
  }

  .topic-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .topic-row.topic-head {
    display: none;
  }

  .topnav {
    display: none;
  }
}

@media (max-width: 520px) {
  .topbar-actions .btn-ghost {
    display: none;
  }
}
