  :root {
    --bg: #faf7f4;
    --panel: #ffffff;
    --fg: #241f1d;
    --muted: #6e6661;
    --line: #e7e0d9;
    --accent: #a8244f;
    --accent-soft: #f7e3ea;
    --code-bg: #f3ece7;
    --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
    --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #161315;
      --panel: #1e1a1c;
      --fg: #f3ede9;
      --muted: #a9a09b;
      --line: #36302f;
      --accent: #ec7ca0;
      --accent-soft: #33202a;
      --code-bg: #2a2426;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #161315;
    --panel: #1e1a1c;
    --fg: #f3ede9;
    --muted: #a9a09b;
    --line: #36302f;
    --accent: #ec7ca0;
    --accent-soft: #33202a;
    --code-bg: #2a2426;
    color-scheme: dark;
  }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 16px/1.7 var(--font-body);
  }
  .layout {
    display: flex;
    min-height: 100vh;
  }
  aside {
    flex: 0 0 260px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    overflow-y: auto;
    background: var(--panel);
    border-right: 1px solid var(--line);
    padding: 28px 16px 40px 20px;
  }
  .brand { font-family: var(--font-display); font-size: 1.5rem; color: var(--fg); margin: 0 0 2px 6px; }
  .brand-sub { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 28px 6px; }
  aside nav ul { list-style: none; margin: 0; padding: 0; }
  aside nav li { margin: 0 0 2px; }
  aside nav a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.93rem;
  }
  aside nav a:hover { color: var(--fg); }
  aside nav a.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
  main {
    flex: 1;
    min-width: 0;
    padding: 56px 24px 96px;
    border-bottom: 1px solid var(--line);
  }
  .content { max-width: 720px; margin: 0 auto; }
  .eyebrow { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 14px; }
  h1 { font-family: var(--font-display); font-weight: 400; font-size: 2.6rem; line-height: 1.15; margin: 0 0 18px; text-wrap: balance; }
  h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.25; margin: 64px 0 14px; scroll-margin-top: 24px; text-wrap: balance; }
  h3 { font-size: 1.02rem; font-weight: 600; margin: 28px 0 8px; color: var(--accent); scroll-margin-top: 24px; }
  p { margin: 0 0 16px; }
  .lead { font-size: 1.12rem; color: var(--muted); margin-bottom: 28px; }
  strong { color: var(--fg); }
  ul { margin: 0 0 16px; padding-left: 20px; }
  li { margin-bottom: 8px; }
  code { font-family: ui-monospace, Consolas, monospace; font-size: 0.85em; background: var(--code-bg); padding: 1px 6px; border-radius: 4px; word-break: break-word; }
  .item { border-top: 1px solid var(--line); padding: 14px 0; }
  .item:last-child { border-bottom: 1px solid var(--line); }
  .note {
    background: var(--accent-soft);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 20px 0;
    color: var(--fg);
  }
  .table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
  table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
  th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
  th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
  tr:last-child td { border-bottom: 0; }

  @media (max-width: 899px) {
    .layout { display: block; }
    aside { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px; }
    aside nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
    aside nav li { margin: 0; }
    aside nav a { padding: 6px 10px; font-size: 0.85rem; }
    main { padding: 32px 16px 72px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.45rem; margin-top: 48px; }
  }
  .site-header {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
  }
  .site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 24px;
  }
  .site-header__logo {
    position: relative;
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--fg);
    text-decoration: none;
  }
  .site-header__logo::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
  }
  .site-header__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
  }
  .site-header__nav a {
    color: var(--fg);
    text-decoration: none;
    font-size: 0.95rem;
  }
  .site-header__nav a:hover { color: var(--accent); }
  .site-header__nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
  .site-header__cta {
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--fg);
    color: var(--bg) !important;
    font-weight: 600;
  }
  .site-header__cta:hover { opacity: 0.85; }
  @media (max-width: 599px) {
    .site-header__inner { justify-content: center; }
    .site-header__nav { justify-content: center; gap: 12px 20px; }
  }
