:root {
    --teal: #2dc1b3;
    --teal-deep: #1a9589;
    --teal-dark: #0f6b63;
    --teal-pale: #e8f7f4;
    --ink: #0b1f2a;
    --ink-2: #1a3340;
    --ink-3: #4a5d68;
    --ink-soft: #6f8089;
    --paper: #fafaf6;
    --white: #ffffff;
    --line: #e6e7e3;
    --line-soft: #efeeea;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px; line-height: 1.55;
    color: var(--ink); background: var(--paper);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  }
  a { color: inherit; text-decoration: none; }
  img, svg { display: block; max-width: 100%; }
  .container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
  @media (max-width: 720px) { .container { padding: 0 20px; } }

  .nav { position: sticky; top: 0; z-index: 100; background: rgba(250, 250, 246, 0.85); backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); border-bottom: 1px solid var(--line-soft); }
  .nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; max-width: 1400px; margin: 0 auto; }
  .logo-wrap { display: flex; align-items: center; gap: 10px; font-family: 'Libre Caslon Text', serif; font-weight: 500; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); }
  .logo-mark { width: 34px; height: 34px; }
  .logo-wrap em { font-style: italic; color: var(--teal-deep); font-weight: 400; }
  .nav-links { display: flex; gap: 36px; font-size: 14.5px; color: var(--ink-2); }
  .nav-links a { position: relative; padding: 6px 0; transition: color 0.2s; }
  .nav-links a:hover { color: var(--teal-deep); }
  .nav-cta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--ink); color: var(--white); border-radius: 999px; font-size: 14px; font-weight: 500; transition: all 0.25s ease; }
  .nav-cta:hover { background: var(--teal-deep); transform: translateY(-1px); }
  .nav-cta::after { content: '→'; transition: transform 0.2s; }
  .nav-cta:hover::after { transform: translateX(3px); }
  @media (max-width: 960px) { .nav-links { display: none; } }

  .article { padding: 60px 0 80px; }
  .breadcrumb { display: flex; align-items: center; gap: 10px; font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 32px; }
  .breadcrumb a { color: var(--teal-deep); transition: color 0.2s; }
  .breadcrumb a:hover { color: var(--ink); }
  .breadcrumb .sep { color: var(--line); }

  .article-header { max-width: 880px; padding-bottom: 36px; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
  .article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
  .article-date { font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: 0.1em; color: var(--ink-soft); text-transform: uppercase; }

  .article-title { font-family: 'Geist', sans-serif; font-weight: 600; font-size: clamp(32px, 4vw, 48px); line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); }

  .article-body { max-width: 740px; font-size: 16.5px; line-height: 1.7; color: var(--ink-2); }
  .article-body p { margin-bottom: 1.3em; }
  .article-body strong { font-weight: 600; color: var(--ink); }
  .article-body em { font-style: italic; }
  .article-body a { color: var(--teal-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; word-break: break-word; }
  .article-body a:hover { color: var(--ink); }
  .article-body h2 {
    font-family: 'Libre Caslon Text', serif;
    font-weight: 500;
    font-size: 26px;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-top: 2.6em;
    margin-bottom: 0.7em;
    scroll-margin-top: 100px;
  }
  .article-body h2:first-child { margin-top: 0; }
  .article-body h3 {
    font-family: 'Libre Caslon Text', serif;
    font-weight: 500;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-top: 1.9em;
    margin-bottom: 0.5em;
  }
  .article-body ul { margin: 0 0 1.3em 0; padding-left: 1.4em; }
  .article-body ul li { margin-bottom: 0.5em; }
  .article-body .caps { text-transform: none; }
  .article-body .effective {
    margin-top: 2.4em;
    padding-top: 1.6em;
    border-top: 1px dashed var(--line);
    font-size: 14px;
    color: var(--ink-3);
  }

  /* Table of contents rail */
  .doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
  @media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; gap: 8px; } }
  .toc {
    position: sticky;
    top: 100px;
    font-size: 13px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
  @media (max-width: 900px) {
    .toc { position: static; max-height: none; margin-bottom: 8px; padding: 16px 20px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
  }
  .toc-title {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 14px;
  }
  .toc ol {
    list-style: none;
    padding: 0;
    counter-reset: toc;
  }
  .toc ol li {
    counter-increment: toc;
    margin-bottom: 6px;
    padding-left: 28px;
    position: relative;
  }
  .toc ol li::before {
    content: counter(toc, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 3px;
    font-family: 'Geist Mono', monospace;
    font-size: 10.5px;
    color: var(--ink-soft);
    letter-spacing: 0.05em;
  }
  .toc a {
    color: var(--ink-2);
    line-height: 1.35;
    display: inline-block;
    padding: 2px 0;
    transition: color 0.15s;
  }
  .toc a:hover { color: var(--teal-deep); }

  .article-foot { max-width: 740px; margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
  .back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: gap 0.2s, color 0.2s; }
  .back-link::before { content: '←'; transition: transform 0.2s; }
  .back-link:hover { color: var(--teal-deep); gap: 12px; }
  .back-link:hover::before { transform: translateX(-4px); }
  .share-label { font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }

  footer { background: var(--paper); padding: 80px 0 40px; border-top: 1px solid var(--line); }
  .foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 64px; }
  @media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
  .foot-brand p { margin-top: 16px; color: var(--ink-3); font-size: 14.5px; max-width: 320px; line-height: 1.55; }
  .foot-col h5 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 16px; font-weight: 500; }
  .foot-col ul { list-style: none; display: grid; gap: 10px; }
  .foot-col a { color: var(--ink-2); font-size: 14.5px; transition: color 0.2s; }
  .foot-col a:hover { color: var(--teal-deep); }

  .foot-compliance {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
  }
  .compliance-label {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  .compliance-badges {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    align-items: center;
  }
  .compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
    font-family: 'Geist Mono', monospace;
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .compliance-badge svg {
    color: var(--teal-deep);
    flex-shrink: 0;
  }
  .foot-bottom { padding-top: 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; gap: 16px; }
