:root {
  color-scheme: light dark;
  --ink: #2a1b20;
  --muted: #665b60;
  --brand: #ef526f;
  --line: #eee2e5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fffafb;
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.85;
}
a { color: #bd3857; }
a:hover { color: var(--brand); }
a:focus-visible, .table-scroll:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}
.skip-link {
  position: absolute;
  top: -5rem;
  left: 1.25rem;
  z-index: 10;
  padding: 0.65rem 1rem;
  background: white;
  border-radius: 8px;
}
.skip-link:focus { top: 0.75rem; }
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem max(1.25rem, calc((100% - 1120px) / 2));
  background: white;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand img { width: 34px; height: 34px; }
.nav-link { text-decoration: none; font-size: 0.9rem; }
.article-header {
  background: linear-gradient(125deg, #301d25, #48242f);
  color: white;
  padding: clamp(3rem, 7vw, 5.5rem) 1.25rem;
}
.article-header-inner { max-width: 780px; margin: 0 auto; }
.eyebrow { color: #ffadbb; font-size: 0.85rem; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.35; margin: 0.6rem 0 1rem; }
.lead { font-size: 1.06rem; color: #f0dce1; max-width: 44em; margin: 0; }
.byline { margin-top: 1.4rem; color: #d0b5bf; font-size: 0.82rem; }
main { max-width: 780px; margin: 0 auto; padding: 2.25rem 1.25rem 4rem; }
article h2 { margin: 2.5rem 0 0.75rem; font-size: 1.45rem; line-height: 1.4; scroll-margin-top: 1.5rem; }
article h3 { margin: 1.6rem 0 0.4rem; font-size: 1.08rem; }
article p, article li { color: var(--muted); }
article a { text-underline-offset: 0.2em; }
article ul, article ol { padding-left: 1.35rem; }
article li { margin: 0.35rem 0; }
.note, .example {
  padding: 1.1rem 1.3rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  margin: 1.4rem 0;
}
.note { border-left: 4px solid var(--brand); }
.example { white-space: pre-line; }
.note p:last-child, .example p:last-child { margin-bottom: 0; }
.article-toc, .related-guides {
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.article-toc h2, .related-guides h2 { margin: 0 0 0.65rem; font-size: 1.05rem; }
.article-toc ol, .related-guides ul { margin: 0; }
blockquote {
  margin: 1.4rem 0;
  padding: 1.1rem 1.3rem;
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: #fff0f3;
}
blockquote p { margin: 0; }
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.4rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 0.94rem; }
th, td { padding: 0.8rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: #fff0f3; font-weight: 600; }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
th:first-child { width: 26%; }
.table-hint { display: none; }
.cta {
  margin-top: 3rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: #fff0f3;
}
.cta h2 { margin-top: 0; }
.cta a {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border-radius: 9px;
  color: white;
  background: var(--brand);
  text-decoration: none;
  font-weight: 700;
}
footer { border-top: 1px solid var(--line); padding: 1.5rem 1.25rem; text-align: center; color: var(--muted); font-size: 0.82rem; }
@media (prefers-color-scheme: dark) {
  :root { --ink: #f0e8ec; --muted: #c0a8b5; --brand: #f06080; --line: #3a252d; }
  body { background: #22141a; }
  a { color: #ff9aad; }
  .site-nav, .note, .example, .article-toc, .related-guides, .table-scroll, .skip-link { background: #291920; }
  .cta, blockquote, th { background: #371d28; }
}
@media (max-width: 480px) {
  .article-toc, .related-guides { padding: 1rem 1.1rem; }
  blockquote { padding: 1rem; }
  .table-hint { display: block; margin: -0.8rem 0 1.4rem; font-size: 0.82rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
