:root {
  --bg: #fbfaf7;
  --panel: #ffffff;
  --text: #1c1b18;
  --muted: #666056;
  --line: #ddd6cc;
  --accent: #b3332a;
  --accent-soft: #fff1ed;
  --table-head: #f3ece3;
  --shadow: 0 10px 30px rgba(28, 27, 24, 0.08);
}

html {
  color-scheme: dark light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

* {
  box-sizing: border-box;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

.site-header,
.site-footer {
  border-color: var(--line);
  border-style: solid;
  border-width: 0 0 1px;
  background: color-mix(in srgb, var(--bg), var(--panel) 45%);
}

.site-header-inner,
.site-footer-inner,
main {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 8px;
}

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

.hero {
  padding: 26px 0 8px;
}

.eyebrow,
.updated {
  color: var(--muted);
  font-size: 0.92rem;
}

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

h1 {
  margin: 8px 0 14px;
  font-size: clamp(2rem, 8vw, 3rem);
}

h2 {
  margin-top: 34px;
  font-size: 1.45rem;
}

p {
  margin: 14px 0;
}

.description {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.toc,
.related,
.faq-list {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.toc-title,
.related-title {
  margin: 0 0 8px;
  font-weight: 800;
}

.toc ol,
.related ul {
  margin: 0;
  padding-left: 22px;
}

.content-table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

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

th {
  background: var(--table-head);
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.faq-item + .faq-item {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.faq-item p {
  margin: 0;
}

.ad-slot {
  min-height: 1px;
  margin: 20px 0;
}

.site-footer {
  margin-top: 42px;
  border-width: 1px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --panel: #201f1c;
    --text: #f5f1eb;
    --muted: #bdb5aa;
    --line: #3c3730;
    --accent: #ff8a73;
    --accent-soft: #38201c;
    --table-head: #2b2823;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  }
}

@media (min-width: 720px) {
  .site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }

  .nav {
    margin-top: 0;
  }

  .site-header-inner,
  .site-footer-inner,
  main {
    padding-left: 24px;
    padding-right: 24px;
  }
}
