/* nhi.idpartners.global - ID Partners brand: orange is an accent, never body text. */
:root {
  --orange: #FC6401;
  --black: #000;
  --ink: #0B0B0C;
  --white: #fff;
  --grey: #F1F1F1;
  --tint-1: #FFC39D;
  --tint-2: #FFE1CE;
  --line: #DCDCDC;
  --muted: #555;
  --l0: #F1F1F1;
  --l1: #FFE1CE;
  --l2: #FFC39D;
  --l3: #FD9450;
  --l4: #FC6401;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --top-h: 60px;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.65 var(--sans);
  color: var(--black);
  background: var(--white);
  text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; min-height: 100vh;
}
body > main, .layout { flex: 1 0 auto; width: 100%; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; font-weight: 800; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 2px; }
[id] { scroll-margin-top: calc(var(--top-h) + 20px); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--black); color: var(--white); padding: 10px 14px; border-radius: 6px;
}
.skip:focus { top: 10px; }

/* The orange square from the dot on the "i" of the logo marks every eyebrow. */
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
.eyebrow::before { content: ""; flex: none; width: 9px; height: 9px; background: var(--orange); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--top-h);
  display: flex; align-items: center; gap: 18px; padding: 0 28px;
  background: var(--white); border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex: none; }
.brand img { display: block; width: auto; height: 24px; }
.site-name {
  padding-left: 18px; border-left: 1px solid var(--line);
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top-nav { margin-left: auto; display: flex; gap: 6px; flex: none; }
.top-nav a {
  padding: 8px 12px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; text-decoration: none;
}
.top-nav a:hover { background: var(--tint-2); }
.top-nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--orange); border-radius: 0; }
.menu-btn {
  display: none; flex: none; margin-left: auto; padding: 8px 14px;
  font: 600 0.9rem var(--sans); color: var(--black);
  background: var(--white); border: 1px solid var(--black); border-radius: 6px; cursor: pointer;
}
.menu-btn[aria-expanded="true"] { background: var(--black); color: var(--white); }

/* ---------- home ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.container.narrow { max-width: 760px; }

.hero { background: var(--ink); color: var(--white); padding: 84px 0 0; }
.hero h1 { margin: 0; max-width: 20ch; font-size: clamp(2.1rem, 5.2vw, 4rem); line-height: 1.06; letter-spacing: -0.03em; }
.hero-lede { max-width: 62ch; margin: 28px 0 0; font-size: 1.16rem; color: #D6D6D6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 0; }
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 6px;
  background: var(--orange); color: var(--black); font-weight: 700; text-decoration: none;
  border: 1px solid var(--orange);
}
.btn:hover { background: var(--tint-1); border-color: var(--tint-1); }
.btn.ghost { background: transparent; color: var(--white); border-color: #6B6B6B; }
.btn.ghost:hover { background: #222; border-color: var(--white); }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 72px 0 0;
  border-top: 1px solid #333;
}
.stats div { display: flex; flex-direction: column-reverse; padding: 26px 20px 30px 0; }
.stats div + div { padding-left: 24px; border-left: 1px solid #333; }
.stats dd { margin: 0; font-size: 2.7rem; font-weight: 800; line-height: 1; color: var(--orange); letter-spacing: -0.03em; }
.stats dt { margin-top: 8px; font-size: 0.86rem; color: #C9C9C9; }

.band { padding: 84px 0; }
.band.grey { background: var(--grey); }
.band h2, .band h1 { margin: 0 0 16px; font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.band .intro { max-width: 68ch; margin: 0 0 8px; font-size: 1.1rem; color: #222; }
.band p { max-width: 68ch; }

.gaps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gaps li { padding: 26px 24px 22px; border: 1px solid var(--line); border-top: 4px solid var(--black); border-radius: var(--radius); background: var(--white); }
.gap-n { display: block; font: 700 0.8rem var(--mono); color: var(--muted); }
.gaps h3 { margin: 10px 0 8px; font-size: 1.2rem; }
.gaps p { margin: 0; font-size: 0.97rem; color: #222; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.split .dg { margin: 0; }

.arrow { font-weight: 700; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.arrow::after { content: " \2192"; }
.arrow:hover { background: var(--tint-2); }

/* maturity levels */
.levels { margin: 40px 0 28px; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; align-items: end; }
.step {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  padding: 12px 14px; color: var(--black); text-decoration: none;
  border-radius: 6px 6px 0 0; border-bottom: 5px solid transparent;
}
.step-n { font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.step-name { font-size: 0.9rem; font-weight: 700; }
.step.s0 { height: 78px; }
.step.s1 { height: 104px; }
.step.s2 { height: 130px; }
.step.s3 { height: 156px; }
.step.s4 { height: 182px; }
.s0 { background: var(--l0); }
.s1 { background: var(--l1); }
.s2 { background: var(--l2); }
.s3 { background: var(--l3); }
.s4 { background: var(--l4); }
.step:hover, .step[aria-selected="true"] { border-bottom-color: var(--black); }
.level-panels { border-top: 2px solid var(--black); }
.level-panel { padding: 26px 0 8px; }
.level-panel + .level-panel { border-top: 1px solid var(--line); }
.js-tabs .level-panel + .level-panel { border-top: 0; }
.level-panel[hidden] { display: none; }
.level-panel h3 { margin: 0 0 18px; font-size: 1.35rem; display: flex; align-items: center; gap: 12px; }
.lvl { padding: 4px 10px; border-radius: 4px; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }
.level-panel dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; margin: 0; }
.level-panel dl div { padding: 14px 0 16px; border-top: 1px solid var(--line); }
.level-panel dt { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.level-panel dd { margin: 6px 0 0; font-size: 0.97rem; }

/* document cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.card:first-child { grid-column: span 2; background: var(--black); border-color: var(--black); color: var(--white); }
.card:first-child .num, .card:first-child p { color: #D6D6D6; }
.card:first-child h3 { font-size: 1.5rem; }
.card:first-child:hover { border-color: var(--orange); }
.card {
  display: flex; flex-direction: column; padding: 24px 24px 20px; min-height: 196px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--black); text-decoration: none; transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--black); transform: translateY(-2px); }
.card .num { font: 700 0.8rem var(--mono); color: var(--muted); }
.card h3 { margin: 10px 0 8px; font-size: 1.18rem; }
.card p { margin: 0 0 18px; font-size: 0.95rem; color: #222; }
.card .more { margin-top: auto; font-size: 0.88rem; font-weight: 700; }
.card .more::after { content: " \2192"; color: var(--orange); }

.plain { padding-left: 1.1em; }
.plain li { margin: 6px 0; }
.plain a { text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- document pages ---------- */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); max-width: 1520px; margin: 0 auto; }
.side {
  position: sticky; top: var(--top-h); align-self: start;
  height: calc(100vh - var(--top-h)); overflow: auto;
  padding: 36px 14px 36px 22px; border-right: 1px solid var(--line);
}
.side-title { margin: 0 0 12px 10px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.side ol { list-style: none; margin: 0; padding: 0; }
.side li a {
  display: flex; gap: 12px; padding: 9px 10px; border-radius: 6px;
  font-size: 0.92rem; line-height: 1.35; text-decoration: none;
}
.side li a:hover { background: var(--tint-2); }
.side li a[aria-current] { background: var(--grey); font-weight: 700; box-shadow: inset 3px 0 0 var(--orange); }
.side .num { flex: none; padding-top: 2px; font: 700 0.74rem var(--mono); color: var(--muted); }

main { min-width: 0; }
.doc {
  display: grid; grid-template-columns: minmax(0, 1fr) 220px; column-gap: 40px;
  padding: 48px 32px 96px 48px;
}
.doc-head, .prose, .pager { grid-column: 1; }
.doc-head h1 { margin: 0; font-size: clamp(2rem, 3.6vw, 2.9rem); letter-spacing: -0.025em; }
.meta { margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); }

.toc { grid-column: 2; grid-row: 1 / span 3; align-self: start; position: sticky; top: calc(var(--top-h) + 32px); max-height: calc(100vh - var(--top-h) - 56px); overflow: auto; font-size: 0.86rem; }
.toc summary { list-style: none; margin-bottom: 10px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc ol ol { margin: 0 0 4px 12px; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); color: #333; line-height: 1.35; text-decoration: none; }
.toc ol ol a { font-size: 0.82rem; color: var(--muted); }
.toc a:hover { color: var(--black); border-left-color: var(--black); }
.toc a.here { color: var(--black); font-weight: 700; border-left-color: var(--orange); }

.prose { margin-top: 28px; }
.prose > p, .prose > ul, .prose > ol, .prose > h2, .prose > h3, .prose > h4 { max-width: 46rem; }
.prose .lede { font-size: 1.16rem; line-height: 1.6; color: #1c1c1c; }
.prose h2 { margin: 56px 0 14px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 1.6rem; max-width: none; }
.prose h3 { margin: 38px 0 10px; font-size: 1.2rem; }
.prose h4 { margin: 28px 0 8px; font-size: 1.02rem; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose ul > li::marker { color: var(--orange); }
.prose ul { list-style: square; }
.prose a { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose a:hover { background: var(--tint-2); }
.prose .anchor { margin-left: 8px; color: var(--muted); font-weight: 400; text-decoration: none; opacity: 0; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus-visible { opacity: 1; }
.prose code { padding: 2px 5px; border-radius: 4px; background: var(--grey); font: 0.86em var(--mono); overflow-wrap: anywhere; }
.prose pre { margin: 18px 0 26px; padding: 18px 20px; border-radius: var(--radius); background: var(--ink); color: #F3F3F3; overflow-x: auto; font-size: 0.86rem; line-height: 1.6; max-width: 46rem; }
.prose pre code { padding: 0; background: none; font-size: inherit; overflow-wrap: normal; }

.table-wrap { margin: 20px 0 30px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.5; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th + th, td + td { border-left: 1px solid #ECECEC; }
thead th { background: var(--grey); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid #C9C9C9; }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { font-weight: 600; }
table.cols-3 { min-width: 560px; }
table.cols-4 { min-width: 720px; }
table.cols-5 { min-width: 800px; }
table.cols-6 { min-width: 940px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pager a:hover { border-color: var(--black); }
.pager a span { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.pager .next { text-align: right; }

/* ---------- diagrams ---------- */
.dg { margin: 30px 0 34px; max-width: 54rem; }
.dg figcaption { margin-top: 14px; font-size: 0.88rem; color: var(--muted); max-width: 46rem; }
.dg-scroll { overflow-x: auto; }
.dg strong { display: block; font-size: 0.95rem; line-height: 1.3; }
.dg span { display: block; font-size: 0.82rem; line-height: 1.4; color: #333; }

.prose .dg ul { list-style: none; margin: 0; padding: 0; }
.prose .dg li { margin: 0; }
.prose .dg p { margin: 0; }
.prose .dg .dg-col-sub { margin: 2px 0 14px; }
.dg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dg-col { padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.dg-col-title { margin: 0; font-size: 1.05rem; font-weight: 800; }
.dg-col-sub { margin: 2px 0 14px; font-size: 0.82rem; color: var(--muted); min-height: 2.4em; }
.dg-stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-rows: auto 1fr auto; }
.dg-layer { position: relative; margin: 0; padding: 12px 14px; border-radius: 6px; background: var(--grey); border: 1px solid transparent; min-height: 66px; }
.dg-layer--fixed { background: var(--black); }
.dg-layer--fixed strong { color: var(--white); }
.dg-layer--fixed span { color: #D6D6D6; }
.dg-layer--missing { background: var(--white); border: 2px dashed var(--orange); }
.dg-tag { position: absolute; top: -10px; right: 10px; padding: 2px 8px; background: var(--orange); color: var(--black); border-radius: 3px; font-size: 0.66rem; font-style: normal; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }

.dg-life-grid { display: grid; grid-template-columns: 190px repeat(4, minmax(118px, 1fr)); min-width: 700px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.dg-life-grid > div { padding: 14px; border-bottom: 1px solid var(--line); }
.dg-ev { background: var(--grey); border-left: 1px solid var(--line); }
.dg-corner { background: var(--grey); }
.dg-ev-n { display: inline-block !important; margin-bottom: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--black); color: var(--white) !important; font: 700 0.74rem/22px var(--mono) !important; text-align: center; }
.dg-track { grid-column: 2 / span 4; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; padding: 0 !important; position: relative; }
.dg-track::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 50%; height: 2px; background: var(--black); }
.dg-track i { position: relative; justify-self: center; width: 14px; height: 14px; background: var(--orange); border: 2px solid var(--black); }
.dg-life-grid > div:nth-last-child(-n+2) { border-bottom: 0; }

.dg-auth-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.dg-lv { padding: 10px 12px; border-radius: 6px 6px 0 0; }
.dg-lv span { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--black); }
.dg-lv strong { font-size: 0.9rem; }
.dg-au { padding: 14px 12px; background: var(--white); border: 1px solid var(--black); border-top-width: 4px; border-radius: 0 0 6px 6px; }
.dg-au--none { border: 1px dashed #999; border-top-width: 1px; background: transparent; color: var(--muted); font-size: 0.84rem; }
.dg-au--wide { grid-column: span 2; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #D0D0D0; }
.foot-in { max-width: 1520px; margin: 0 auto; padding: 34px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot img { display: block; width: auto; height: 20px; }
.foot p { margin: 0; font-size: 0.86rem; }
.foot a { color: var(--white); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .doc { display: block; padding: 40px 40px 80px 48px; }
  .toc { position: static; max-height: none; margin: 28px 0 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); max-width: 46rem; }
  .toc summary { margin: 0; cursor: pointer; }
  .toc summary::after { content: " +"; }
  .toc details[open] summary { margin-bottom: 10px; }
  .toc details[open] summary::after { content: " \2212"; }
}
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .gaps { grid-template-columns: 1fr; }
  .level-panel dl { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .layout { display: block; }
  .menu-btn { display: block; }
  .doc-page .top-nav { display: none; }
  .side {
    display: none; position: fixed; inset: var(--top-h) 0 0 0; z-index: 40; height: auto; align-self: stretch;
    padding: 24px 20px; background: var(--white); border-right: 0;
  }
  .side.open { display: block; }
  .doc { padding: 32px 20px 64px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .top { padding: 0 16px; gap: 12px; }
  .site-name { display: none; }
  .brand img { height: 20px; }
  .top-nav a { padding: 8px 8px; font-size: 0.86rem; }
  .home .top-nav a[href="/#documents"] { display: none; }
  .container { padding: 0 20px; }
  .hero { padding-top: 56px; }
  .stats { grid-template-columns: 1fr 1fr; margin-top: 48px; }
  .stats div { padding: 20px 12px 22px 0; }
  .stats div + div { padding-left: 16px; }
  .stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid #333; }
  .stats dd { font-size: 2.2rem; }
  .band { padding: 56px 0; }
  .steps { gap: 4px; }
  .step { padding: 8px 6px; }
  .step-n { font-size: 1.4rem; }
  .step-name { font-size: 0.66rem; letter-spacing: -0.01em; }
  .level-panel dl { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .card:first-child { grid-column: auto; }
  .card { min-height: 0; }
  .dg-cols { grid-template-columns: 1fr; }
  .dg-life-grid { grid-template-columns: 138px repeat(4, minmax(112px, 1fr)); min-width: 600px; }
  .dg-life-grid > div { padding: 12px 10px; }
  .dg-col-sub { min-height: 0; }
  .dg-auth-grid { grid-template-columns: 112px minmax(0, 1fr); grid-auto-flow: dense; }
  .dg-lv { grid-column: 1; border-radius: 6px 0 0 6px; }
  .dg-au { grid-column: 2; border-top-width: 1px; border-left-width: 4px; border-radius: 0 6px 6px 0; }
  .dg-au--none { border-left-width: 1px; }
  .dg-au--wide { grid-column: 2; grid-row: span 2; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
}

@media (max-width: 480px) {
  .step { align-items: center; padding: 8px 4px 10px; }
  .step-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .step.s0 { height: 52px; }
  .step.s1 { height: 68px; }
  .step.s2 { height: 84px; }
  .step.s3 { height: 100px; }
  .step.s4 { height: 116px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

@media print {
  .top, .side, .toc, .pager, .foot, .skip, .anchor, .menu-btn { display: none !important; }
  .layout, .doc { display: block; padding: 0; }
  body { font-size: 11pt; }
  .prose > p, .prose > ul, .prose > ol, .prose pre, .dg { max-width: none; }
  .table-wrap { overflow: visible; border: 0; }
  table { min-width: 0 !important; font-size: 8.5pt; }
  th, td { border: 1px solid #999; }
  .prose h2 { break-after: avoid; }
  tr, .dg { break-inside: avoid; }
  .prose pre { background: none; color: #000; border: 1px solid #999; white-space: pre-wrap; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
