:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #eef6ff;
  --ink: #172033;
  --muted: #5f6b7a;
  --line: #dbe3ee;
  --blue: #2563eb;
  --teal: #0f766e;
  --amber: #d97706;
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 48%, #ffffff 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.site-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  padding: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--ink);
  font-weight: 750;
}

.brand img {
  width: 36px;
  height: 36px;
}

.nav-group {
  margin: 0 0 24px;
}

.nav-group h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-group a {
  display: block;
  border-radius: 8px;
  color: var(--ink);
  padding: 7px 10px;
  font-size: 14px;
}

.nav-group a:hover {
  background: var(--surface-strong);
  text-decoration: none;
}

.content {
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  align-items: center;
  gap: 42px;
  padding: 72px clamp(24px, 6vw, 84px) 54px;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.preview {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.preview img {
  display: block;
  width: 100%;
  height: auto;
}

.section {
  padding: 46px clamp(24px, 6vw, 84px);
}

.section.alt {
  background: rgba(255, 255, 255, 0.62);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section h3 {
  margin: 28px 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.section p,
.section li {
  max-width: 78ch;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

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

.card h3 {
  margin-top: 0;
}

.callout {
  max-width: 82ch;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  padding: 18px 20px;
}

pre {
  max-width: 92ch;
  overflow: auto;
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 18px;
  line-height: 1.5;
}

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

p code,
li code {
  border-radius: 6px;
  background: #e9eef6;
  color: #1e293b;
  padding: 2px 5px;
}

table {
  width: 100%;
  max-width: 860px;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--surface);
}

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

th {
  background: #eef6ff;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px clamp(24px, 6vw, 84px);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .site-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero p {
    font-size: 18px;
  }

  .actions {
    display: grid;
  }

  .button {
    justify-content: center;
  }
}
