:root {
  --bg: #f6f3ee;
  --panel: #fffdfa;
  --soft: #f2ebe2;
  --line: #ddd4c6;
  --text: #2b251f;
  --muted: #6f665b;
  --accent: #9f4f2f;
  --shadow: 0 14px 36px rgba(64, 49, 32, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fcfaf6 0%, var(--bg) 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

h1,
h2,
h3,
strong {
  font-family: "Noto Serif SC", serif;
}

h1,
h2,
h3,
p,
pre {
  margin: 0;
}

pre,
code {
  font-family: Consolas, "Courier New", monospace;
}

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

.hero,
.card,
.sub-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
}

.hero-main {
  display: flex;
  gap: 16px;
  align-items: center;
  min-width: 0;
}

.hero-side {
  flex-shrink: 0;
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}

.eyebrow,
.section-kicker {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sub-kicker,
.nav-group-title {
  color: var(--muted);
  font-size: 0.82rem;
}

h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

.hero-copy,
.meta-item span,
.panel-description,
.response-note,
.steps,
.code-title {
  color: var(--muted);
}

.ghost-button,
.copy-button,
.nav-item {
  border: 1px solid var(--line);
  background: #fff;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.sidebar,
.content-panel {
  min-height: 0;
}

.sidebar,
.content-panel,
.sub-card {
  padding: 20px;
}

.sidebar {
  position: sticky;
  top: 16px;
  height: fit-content;
}

.sidebar-head {
  margin-bottom: 16px;
}

.nav-list,
.nav-group,
.content-area,
.meta-list,
.steps {
  display: grid;
  gap: 12px;
}

.nav-item {
  width: 100%;
  padding: 11px 12px;
  text-align: left;
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
}

.nav-item.active {
  border-color: #caa993;
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: 16px;
  margin-top: 16px;
}

.content-area,
.content-panel,
.overview-grid,
.info-grid,
.code-panel,
.meta-item,
.sub-card {
  min-width: 0;
}

.notes-card {
  margin-top: 16px;
}

.panel-description {
  margin-top: 6px;
  line-height: 1.6;
}

.meta-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
}

.meta-item span {
  display: block;
  font-size: 0.82rem;
}

.meta-item strong {
  display: block;
  margin-top: 6px;
  word-break: break-word;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

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

.capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.capability-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
  font-size: 0.86rem;
}

.code-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fcfbf8;
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.copy-button {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
}

.copy-surface {
  cursor: pointer;
}

.copy-surface:hover {
  background: #f8f4ee;
}

pre {
  padding: 14px;
  overflow: auto;
  line-height: 1.65;
  font-size: 0.92rem;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  tab-size: 2;
}

code {
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
}

.response-note {
  margin-top: 14px;
  line-height: 1.6;
}

.hidden {
  display: none;
}

.copy-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #caa993;
  background: #fff;
  box-shadow: var(--shadow);
}

.ghost-button:hover,
.copy-button:hover,
.nav-item:hover {
  border-color: #caa993;
}

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

  .sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: calc(100vw - 24px);
    padding-top: 12px;
  }

  .hero,
  .hero-main,
  .section-head,
  .info-grid {
    display: grid;
  }

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