:root {
  --bg: #f4efe4;
  --paper: rgba(255, 251, 245, 0.92);
  --paper-strong: #fffdf8;
  --ink: #17212f;
  --muted: #536173;
  --line: #d9ccb6;
  --brand: #b3572f;
  --brand-deep: #6b2f19;
  --accent: #1d6b66;
  --shadow: 0 18px 45px rgba(76, 49, 22, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(240, 194, 143, 0.52), transparent 32%),
    radial-gradient(circle at top right, rgba(97, 165, 157, 0.28), transparent 28%),
    linear-gradient(180deg, #efe4d2 0%, #f7f1e7 42%, #f4efe4 100%);
}

.page-shell {
  width: min(1380px, calc(100vw - 32px));
  margin: 22px auto 40px;
}

.hero,
.panel {
  border: 1px solid rgba(119, 89, 58, 0.15);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 24px;
  padding: 30px;
  overflow: hidden;
}

.eyebrow,
.kicker,
.hero-card-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
}

h1,
h2 {
  margin: 0;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  line-height: 1.05;
}

h1 {
  font-size: clamp(1.9rem, 3.8vw, 3.1rem);
  max-width: none;
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.hero-text,
.panel-intro,
.tip-panel p,
.task-card p,
.mini-list,
blockquote {
  color: var(--muted);
  line-height: 1.6;
}

.hero-summary {
  margin: 14px 0 0;
  padding-left: 22px;
}

.hero-summary li {
  margin-bottom: 8px;
}

.hero-actions,
.ide-toolbar,
.progress-strip,
.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  margin-top: 22px;
}

.demo-actions {
  margin-bottom: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fffaf5;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 10px 24px rgba(130, 64, 34, 0.25);
}

.button-secondary {
  color: var(--brand-deep);
  background: rgba(255, 252, 247, 0.78);
  border-color: rgba(107, 47, 25, 0.22);
}

.button-ghost {
  color: var(--ink);
  background: transparent;
  border-color: rgba(23, 33, 47, 0.14);
}

.hero-card {
  align-self: stretch;
  padding: 22px;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(255, 247, 235, 0.95), rgba(245, 232, 212, 0.85)),
    repeating-linear-gradient(135deg, rgba(179, 87, 47, 0.05) 0 12px, transparent 12px 24px);
  border: 1px solid rgba(179, 87, 47, 0.15);
}

.hero-points,
.mini-list {
  margin: 0;
  padding-left: 18px;
}

.hero-points li,
.mini-list li {
  margin-bottom: 10px;
}

.grid-layout,
.main-column {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.panel {
  padding: 24px;
}

.panel-heading {
  margin-bottom: 18px;
}

.demo-layout {
  display: grid;
  grid-template-columns: fit-content(600px) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.demo-frame,
.ide-frame-wrap {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(29, 38, 49, 0.12);
  background: #f3ede3;
}

.demo-frame iframe,
.ide-frame-wrap iframe {
  width: 100%;
  border: 0;
  display: block;
  overflow: hidden;
}

.demo-frame iframe {
  width: 600px;
  height: 400px;
  min-height: 400px;
}

.demo-frame {
  width: 600px;
  max-width: 100%;
  padding: 0;
  background: #000;
}

.demo-frame iframe::-webkit-scrollbar {
  display: none;
}

.demo-layout .demo-note {
  padding-left: 16px;
  padding-right: 16px;
}

.ide-frame-wrap iframe {
  min-height: 980px;
  background: #0f141c;
}

.progress-strip {
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(29, 107, 102, 0.09);
  border: 1px solid rgba(29, 107, 102, 0.14);
}

.progress-copy {
  display: grid;
  gap: 2px;
}

.task-list {
  display: grid;
  gap: 14px;
}

.task-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(40, 52, 66, 0.1);
  background: var(--paper-strong);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.task-card:hover {
  transform: translateY(-1px);
  border-color: rgba(179, 87, 47, 0.22);
}

.task-card.is-done {
  border-color: rgba(29, 107, 102, 0.3);
  box-shadow: inset 0 0 0 1px rgba(29, 107, 102, 0.08);
}

.task-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.95fr);
  gap: 16px;
  margin-top: 14px;
  align-items: start;
}

.task-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.task-toggle {
  inline-size: 20px;
  block-size: 20px;
  accent-color: var(--accent);
  margin-top: 3px;
  flex: 0 0 auto;
}

pre,
blockquote,
.pill {
  margin: 0;
  border-radius: 16px;
}

pre {
  overflow-x: auto;
  padding: 16px;
  background: #fffdfa;
  color: #243247;
  border: 1px solid rgba(66, 84, 107, 0.14);
  font-size: 0.95rem;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

pre code {
  display: block;
  color: inherit;
}

.py-keyword {
  color: #8a2f6b;
  font-weight: 700;
}

.py-string {
  color: #0f6d62;
}

.py-comment {
  color: #6f7f93;
  font-style: italic;
}

.py-number {
  color: #9a4d14;
}

.py-builtin {
  color: #1f56a8;
}

blockquote {
  margin-top: 14px;
  padding: 16px 18px;
  border-left: 4px solid var(--brand);
  background: rgba(179, 87, 47, 0.08);
}

.pill {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  color: var(--brand-deep);
  background: rgba(255, 250, 241, 0.9);
  border: 1px solid rgba(107, 47, 25, 0.12);
}

.json-image {
  width: 100%;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(40, 52, 66, 0.12);
}

.tip-panel {
  position: relative;
}

.demo-note {
  height: 100%;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(40, 52, 66, 0.1);
  background: var(--paper-strong);
}

.mini-heading {
  margin: 0 0 10px;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  font-size: 1rem;
  color: var(--brand-deep);
}

.ide-notes {
  margin-top: 12px;
}

@media (max-width: 1120px) {
  .hero,
  .grid-layout {
    grid-template-columns: 1fr;
  }

  .demo-layout,
  .task-guide {
    grid-template-columns: 1fr;
  }

  .demo-frame,
  .demo-frame iframe {
    width: 100%;
  }

  .ide-frame-wrap iframe {
    min-height: 860px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 18px, 100%);
    margin: 10px auto 24px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 18px;
  }

  .panel:has(.demo-layout) {
    padding-left: 12px;
    padding-right: 12px;
  }

  .demo-frame iframe {
    min-height: 340px;
  }

  .ide-frame-wrap iframe {
    min-height: 720px;
  }
}
