@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  --bg: #f4efe4;
  --bg-strong: #eadfc6;
  --card: rgba(255, 252, 245, 0.84);
  --card-strong: rgba(255, 249, 240, 0.96);
  --line: rgba(32, 32, 32, 0.12);
  --text: #17201d;
  --muted: #56615b;
  --accent: #c44a1f;
  --accent-soft: #f6d2c2;
  --accent-strong: #8e3315;
  --success: #16624f;
  --warning: #9b5c12;
  --danger: #9c2626;
  --shadow: 0 22px 60px rgba(76, 56, 25, 0.12);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 191, 148, 0.5), transparent 28%),
    radial-gradient(circle at top right, rgba(146, 197, 174, 0.45), transparent 30%),
    linear-gradient(180deg, #f7f1e5 0%, #efe5d5 100%);
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

code,
pre,
.mono {
  font-family: "IBM Plex Mono", monospace;
}

.page-shell {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d96637, #f1bc64);
  color: white;
  box-shadow: 0 12px 24px rgba(196, 74, 31, 0.18);
}

.top-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.top-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero,
.section-card,
.demo-card,
.panel,
.metric,
.video-card,
.note {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  border-radius: calc(var(--radius) + 6px);
  padding: 28px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1.3fr 0.9fr;
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.hero h1,
.page-title {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.96;
}

.hero p,
.lead {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.05rem;
}

.cta-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.button-row button,
.toolbar button,
.toolbar a.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  background: white;
  box-shadow: inset 0 0 0 1px rgba(23, 32, 29, 0.08);
}

.button.primary,
.button-row button.primary,
.toolbar button.primary {
  background: linear-gradient(135deg, #d45c2c, #ef8e59);
  color: white;
}

.button.ghost,
.button-row button.ghost {
  background: rgba(255, 255, 255, 0.56);
}

.button:disabled,
.button-row button:disabled,
.toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button-row button.is-active {
  background: linear-gradient(135deg, #1b6f5c, #2da381);
  color: white;
}

.hero-grid,
.card-grid,
.panel-grid,
.metric-grid,
.video-grid,
.note-grid,
.control-grid,
.launch-grid {
  display: grid;
  gap: 18px;
}

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

.panel-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

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

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

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

.control-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

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

.demo-card,
.panel,
.metric,
.video-card,
.note,
.section-card {
  border-radius: var(--radius);
  padding: 22px;
}

.demo-card h3,
.panel h3,
.video-card h3,
.section-card h3,
.metric h3,
.note h3 {
  margin-top: 0;
}

.demo-card p,
.panel p,
.video-card p,
.section-card p,
.note p,
.metric p,
li {
  color: var(--muted);
  line-height: 1.55;
}

.demo-card .demo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  text-decoration: none;
  font-weight: 700;
  color: var(--accent-strong);
}

.bullet-list {
  margin: 0;
  padding-left: 18px;
}

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

.status {
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--card-strong);
  border: 1px solid var(--line);
  color: var(--muted);
}

.status[data-kind="success"] {
  color: var(--success);
  border-color: rgba(22, 98, 79, 0.24);
}

.status[data-kind="warning"] {
  color: var(--warning);
  border-color: rgba(155, 92, 18, 0.24);
}

.status[data-kind="danger"] {
  color: var(--danger);
  border-color: rgba(156, 38, 38, 0.24);
}

.metric-value {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 8px 0 4px;
}

.mono-block {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 18px;
  border-radius: 22px;
  background: rgba(17, 26, 23, 0.94);
  color: #e6f0eb;
  min-height: 130px;
  overflow-x: auto;
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(239, 142, 89, 0.5), transparent 25%),
    linear-gradient(160deg, #192420, #0d1210);
  object-fit: cover;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.85rem;
}

.subtle {
  color: var(--muted);
  font-size: 0.95rem;
}

.label {
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.section-stack {
  display: grid;
  gap: 18px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-form label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.inline-form select,
.inline-form input {
  border: 1px solid rgba(23, 32, 29, 0.14);
  background: white;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
}

.stack {
  display: grid;
  gap: 14px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--muted);
  font-size: 0.92rem;
}

.field input {
  border: 1px solid rgba(23, 32, 29, 0.14);
  background: white;
  color: var(--text);
  border-radius: 18px;
  padding: 12px 14px;
}

.field select {
  border: 1px solid rgba(23, 32, 29, 0.14);
  background: white;
  color: var(--text);
  border-radius: 18px;
  padding: 12px 14px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 32, 29, 0.1);
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(23, 32, 29, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  font-family: "IBM Plex Mono", monospace;
}

.preview-frame {
  width: 100%;
  min-height: 74vh;
  border: 0;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(239, 142, 89, 0.5), transparent 25%),
    linear-gradient(160deg, #192420, #0d1210);
}

.launch-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 920px) {
  .hero,
  .panel-grid,
  .card-grid,
  .metric-grid,
  .video-grid,
  .note-grid,
  .control-grid,
  .launch-grid,
  .split-form {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-title {
    font-size: 2.4rem;
  }

  .page-shell {
    width: min(100vw - 18px, 1160px);
    padding-top: 18px;
  }
}
