:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #52606d;
  --line: #d8e1e8;
  --paper: #ffffff;
  --bg: #f4f7f8;
  --teal: #0f6f78;
  --green: #2f7d4b;
  --coral: #c6543a;
  --amber: #9b6a16;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  padding: 14px clamp(18px, 4vw, 44px);
  backdrop-filter: blur(10px);
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.site-nav a {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  padding: 7px 10px;
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
}

.site-nav a[aria-current="page"] {
  border-color: var(--teal);
  color: var(--teal);
  font-weight: 700;
}

main {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.page-title {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.35;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
}

.page-title p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 26px;
  align-items: stretch;
  margin: 20px 0 24px;
}

.hero-copy,
.hero-preview,
.demo-panel,
.markdown-body {
  border: 1px solid var(--line);
  background: var(--paper);
}

.hero-copy {
  padding: clamp(22px, 4vw, 38px);
}

.hero-copy h2,
.demo-panel h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.hero-copy p,
.demo-panel p {
  margin: 0;
  color: var(--muted);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #ffffff;
  padding: 9px 14px;
  font-weight: 800;
  text-decoration: none;
}

.button.secondary {
  background: #ffffff;
  color: var(--teal);
}

.hero-preview {
  margin: 0;
  padding: 12px;
}

.hero-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
}

.hero-preview figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

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

.material-card {
  min-height: 142px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 18px;
  text-decoration: none;
}

.material-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 800;
}

.material-card small {
  color: var(--muted);
  font-size: 14px;
}

.demo-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 20px;
}

.markdown-body {
  padding: clamp(20px, 4vw, 42px);
}

.source-link {
  margin-bottom: 22px;
}

.markdown-body h1 {
  font-size: 30px;
}

.markdown-body h2 {
  margin-top: 38px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 24px;
}

.markdown-body h3 {
  margin-top: 26px;
  font-size: 19px;
}

.markdown-body p,
.markdown-body li {
  max-width: 76ch;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.4em;
}

.check-item {
  list-style: none;
  margin-left: -1.2em;
}

.check-item input {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -2px;
}

pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #f7f9fb;
  padding: 14px;
  line-height: 1.6;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.94em;
}

p code,
li code,
td code {
  background: #eef3f5;
  padding: 1px 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  background: #ffffff;
}

th,
td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  vertical-align: top;
}

th {
  background: #eef4f5;
  text-align: left;
}

blockquote {
  border-left: 5px solid var(--amber);
  margin: 18px 0;
  padding: 8px 16px;
  background: #fff7e8;
}

@media (max-width: 880px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
  }

  .hero-grid,
  .material-grid {
    grid-template-columns: 1fr;
  }

  .demo-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}
