:root {
  --ink: #101b2d;
  --ink-soft: #3d4a60;
  --ink-faint: #6b7688;
  --paper: #f6f8fa;
  --paper-raised: #ffffff;
  --line: #dde3ea;
  --line-soft: #e9edf2;
  --teal: #0e7c86;
  --teal-ink: #095a62;
  --emerald: #0f9d6e;
  --navy: #0b1f3a;
  --gold: #a9821f;
  --shadow: 0 1px 2px rgba(16, 27, 45, 0.04), 0 8px 24px -12px rgba(16, 27, 45, 0.1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7ecf3;
    --ink-soft: #aab6c8;
    --ink-faint: #7c889c;
    --paper: #0b141f;
    --paper-raised: #111e2c;
    --line: #223046;
    --line-soft: #1a2637;
    --teal: #43c2cf;
    --teal-ink: #7ddce6;
    --emerald: #3fcf9a;
    --navy: #b9c8e0;
    --gold: #d8b656;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px -12px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; text-wrap: balance; color: var(--ink); }
code, .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
a { color: var(--teal-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--emerald); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }

.ng-shell { display: flex; max-width: 1080px; margin: 0 auto; min-height: 100vh; }

nav.ng-toc {
  width: 232px; flex-shrink: 0; padding: 48px 20px 48px 28px;
  position: sticky; top: 0; align-self: flex-start; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
}
.ng-brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.ng-brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: block; object-fit: cover;
}
.ng-brand-name { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.05rem; letter-spacing: 0.01em; color: var(--ink); }
.ng-toc-group { display: flex; flex-direction: column; gap: 2px; }
.ng-toc-label { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 6px 10px; }
.ng-toc a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  padding: 7px 10px; border-radius: 7px; transition: background 0.12s, color 0.12s;
  display: block;
}
.ng-toc a:hover { background: var(--line-soft); color: var(--ink); }
.ng-toc a.current { background: var(--paper-raised); color: var(--teal-ink); box-shadow: var(--shadow); }
.ng-toc-meta { margin-top: auto; font-size: 0.78rem; color: var(--ink-faint); line-height: 1.6; }
.ng-toc-meta a { color: var(--ink-faint); }

.ng-main { flex: 1; min-width: 0; padding: 56px 40px 90px; }
.ng-doc-head { margin-bottom: 44px; }
.ng-eyebrow {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  color: var(--teal-ink); margin: 0 0 10px;
}
.ng-doc-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin: 0 0 10px; font-weight: 600; }
.ng-doc-head .ng-dek { color: var(--ink-soft); font-size: 1.05rem; max-width: 62ch; margin: 0; }

.ng-doc { max-width: 68ch; }
.ng-doc h2 { font-size: 1.5rem; font-weight: 600; margin: 0 0 6px; }
.ng-section-num { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; color: var(--ink-faint); margin: 0 0 4px; }
.ng-doc h3 { font-size: 1.08rem; font-weight: 600; margin: 28px 0 8px; }
.ng-doc p { margin: 0 0 14px; color: var(--ink-soft); }
.ng-doc p strong { color: var(--ink); }
.ng-doc ul, .ng-doc ol { margin: 0 0 14px; padding-left: 1.3em; color: var(--ink-soft); }
.ng-doc li { margin-bottom: 6px; }
.ng-doc li::marker { color: var(--teal); }

.ng-callout {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin: 18px 0 22px; box-shadow: var(--shadow);
}
.ng-callout p:last-child { margin-bottom: 0; }
.ng-callout-label { font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 600; color: var(--emerald); margin: 0 0 6px; }

.ng-wrap-table { overflow-x: auto; }
table.ng-data-flow { width: 100%; border-collapse: collapse; margin: 6px 0 26px; font-size: 0.88rem; }
table.ng-data-flow caption { text-align: left; font-size: 0.78rem; color: var(--ink-faint); margin-bottom: 8px; }
table.ng-data-flow th, table.ng-data-flow td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.ng-data-flow th { font-weight: 600; color: var(--ink-soft); font-size: 0.76rem; letter-spacing: 0.03em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
table.ng-data-flow td { color: var(--ink-soft); }
table.ng-data-flow tr:last-child td { border-bottom: none; }
.ng-tag { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; }
.ng-tag-no { background: rgba(15, 157, 110, 0.16); color: var(--emerald); }
.ng-tag-yes { background: rgba(169, 130, 31, 0.18); color: var(--gold); }

.ng-processor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 6px 0 24px; }
.ng-processor { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.ng-processor .ng-p-name { font-weight: 600; font-size: 0.92rem; margin-bottom: 3px; color: var(--ink); }
.ng-processor .ng-p-role { font-size: 0.82rem; color: var(--ink-faint); }

.ng-contact-card {
  display: flex; gap: 16px; align-items: flex-start; background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 18px 0; box-shadow: var(--shadow);
}
.ng-contact-card svg { flex-shrink: 0; margin-top: 3px; color: var(--teal); }
.ng-contact-card h3 { margin: 0 0 4px; }
.ng-contact-card p { margin: 0; }

.ng-faq-item { border-bottom: 1px solid var(--line-soft); padding: 16px 0; }
.ng-faq-item:last-child { border-bottom: none; }
.ng-faq-item summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.ng-faq-item summary::-webkit-details-marker { display: none; }
.ng-faq-item summary .ng-chev { color: var(--ink-faint); transition: transform 0.15s; flex-shrink: 0; }
.ng-faq-item[open] summary .ng-chev { transform: rotate(90deg); }
.ng-faq-item p { margin: 10px 0 0; }

.ng-doc-footer { max-width: 68ch; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-faint); }
.ng-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 28px 0; }
.ng-link-card {
  display: block; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; box-shadow: var(--shadow); text-decoration: none !important;
}
.ng-link-card:hover { border-color: var(--teal); }
.ng-link-card .ng-link-title { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.05rem; color: var(--ink); margin-bottom: 4px; }
.ng-link-card .ng-link-dek { font-size: 0.85rem; color: var(--ink-faint); }

@media (max-width: 860px) {
  .ng-shell { flex-direction: column; }
  nav.ng-toc { position: static; height: auto; width: 100%; padding: 24px 20px 8px; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .ng-toc-group { flex-direction: row; flex-wrap: wrap; }
  .ng-toc-meta { display: none; }
  .ng-main { padding: 32px 22px 64px; }
}
