/* ── Stat / metric cards ──────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px,100%), 1fr));
  gap: 1px;
  background: var(--border-dark);
  border: 1px solid var(--border-dark);
  margin: 24px 0;
}
.stat-card {
  background: var(--white);
  padding: 18px 20px;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin-bottom: 6px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--forest);
  line-height: 1.1;
}
.stat-value.neg { color: var(--red); }
.stat-sub {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--slate-light);
  margin-top: 4px;
}


/* ── Hub index grid ───────────────────────────────────────────────────────── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px,100%), 1fr));
  gap: 1px;
  background: var(--border-dark);
  border: 1px solid var(--border-dark);
  margin: 24px 0;
}
.hub-card {
  background: var(--white);
  padding: 18px 20px;
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.hub-card:hover { background: var(--forest-pale); }
.hub-card-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin-bottom: 6px;
}
.hub-card-title {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.hub-card-desc {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--slate-light);
  margin-top: 6px;
  line-height: 1.4;
}


/* ── ARD status badge ─────────────────────────────────────────────────────── */
.ard-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  position: relative;
}
.ard-status-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
  user-select: none;
}
.ard-status-badge:active { opacity: 0.7; }
.ard-status-badge.status-pending  { background: var(--parchment-dark); border-color: var(--border-dark); color: var(--slate); }
.ard-status-badge.status-progress { background: var(--amber-pale); border-color: var(--amber); color: oklch(0.45 0.1 75); }
.ard-status-badge.status-complete { background: var(--forest-pale); border-color: oklch(0.65 0.06 165); color: var(--forest); }

.ard-status-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 300;
  background: var(--white);
  border: 1px solid var(--border-dark);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  min-width: 160px;
  border-radius: 2px;
  overflow: hidden;
  animation: dropIn 0.16s cubic-bezier(0.23,1,0.32,1) forwards;
}
@keyframes dropIn {
  from { transform: scale(0.97) translateY(-4px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.ard-status-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--slate);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s, color 0.1s;
}
.ard-status-menu button:last-child { border-bottom: none; }
.ard-status-menu { display: none; }
.ard-status-menu.open { display: block; }
.ard-status-menu-item { display:flex; align-items:center; gap:8px; padding:9px 14px; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; background:none; border:none; cursor:pointer; color:var(--slate); border-bottom:1px solid var(--border); transition:background .1s,color .1s; width:100%; text-align:left; }
.ard-status-menu-item:last-child { border-bottom:none; }
.ard-status-menu-item:hover { background:var(--forest-pale); color:var(--forest); }
.ard-status-menu-item.active { color:var(--forest); font-weight:600; }
.ard-status-saving { font-family:var(--font-mono); font-size:9.5px; color:var(--slate-light); letter-spacing:.08em; opacity:0; transition:opacity .2s; }
.ard-status-saving.visible { opacity:1; }
.ard-status-menu button:hover { background: var(--forest-pale); color: var(--forest); }


/* ── ADR status dots in nav ───────────────────────────────────────────────── */
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.dot-ok     { background: var(--forest-light); }
.dot-gated  { background: var(--amber); }
.dot-draft  { background: var(--slate-pale); border: 1px solid var(--slate-light); }
.nav-status-dot { width:6px; height:6px; border-radius:50%; flex-shrink:0; display:inline-block; margin-left:6px; vertical-align:middle; }
.nav-status-dot.status-pending  { background: var(--slate-pale); border: 1px solid var(--slate-light); }
.nav-status-dot.status-progress { background: var(--amber); }
.nav-status-dot.status-complete { background: var(--forest-light); }


/* ── Progress overview (home page) ───────────────────────────────────────── */
.progress-bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 0;
  overflow: hidden;
  margin: 8px 0 4px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--forest);
  transition: width 0.6s cubic-bezier(0.23,1,0.32,1);
}


/* ── FAQ accordion ────────────────────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-q {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 40px 14px 0;
  cursor: pointer;
  position: relative;
  color: var(--ink);
  list-style: none;
  user-select: none;
}
.faq-q::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--forest);
  transition: transform 0.2s;
}
.faq-item.open .faq-q::after { content: '−'; }
.faq-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s cubic-bezier(0.23,1,0.32,1);
}
.faq-item.open .faq-body { max-height: 2000px; }
.faq-body-inner {
  padding: 0 0 18px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.75;
}
.faq-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--border-dark);
  background: var(--white);
  color: var(--slate);
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.faq-pill:hover, .faq-pill.active {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--white);
}
.faq-section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}


/* ── Financial calc grid ──────────────────────────────────────────────────── */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.calc-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border-dark); border: 1px solid var(--border-dark); margin: 16px 0; }
.reimb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

@media (max-width: 640px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-results { grid-template-columns: 1fr; }
  .reimb-cols { grid-template-columns: 1fr; }
  div[style*="display:grid"] { grid-template-columns: 1fr !important; }
  div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  div[style*="grid-template-columns:repeat"] { grid-template-columns: 1fr !important; }
}

/* ═══ HOME PAGE ════════════════════════════════════════════ */
.home-hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.home-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.home-title {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 16px;
}
.home-sub {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--slate);
  line-height: 1.65;
  margin: 0 0 24px;
  max-width: 560px;
}
.home-cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.home-cta-primary {
  display: inline-block;
  padding: 9px 20px;
  background: var(--brand);
  color: white;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--brand);
  border-radius: 2px;
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}
.home-cta-primary:hover { opacity: 0.88; }
.home-cta-primary:active { transform: scale(0.97); }
.home-cta-secondary {
  display: inline-block;
  padding: 9px 20px;
  background: transparent;
  color: var(--brand);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--brand);
  border-radius: 2px;
  transition: transform 160ms ease-out, background 160ms ease-out;
}
.home-cta-secondary:hover { background: rgba(0,79,144,0.06); }
.home-cta-secondary:active { transform: scale(0.97); }
.home-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}
.home-stat { background: var(--parchment); padding: 16px 14px; }
.home-stat-value {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 5px;
}
.home-stat-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}
.home-divider { height: 1px; background: var(--border); margin: 32px 0; }
.home-section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--slate);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.home-cat-card {
  display: flex;
  gap: 16px;
  padding: 20px 18px;
  background: var(--parchment);
  text-decoration: none;
  transition: background 120ms ease-out;
}
.home-cat-card:hover { background: rgba(0,79,144,0.04); }
.home-cat-num {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 32px;
  transition: color 120ms ease-out;
}
.home-cat-card:hover .home-cat-num { color: var(--brand); }
.home-cat-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 6px;
}
.home-cat-desc {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 8px;
}
.home-cat-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--brand);
  letter-spacing: 0.04em;
}
.home-criteria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.home-criterion {
  background: var(--parchment);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.home-crit-hard { background: rgba(231,76,60,0.04); }
.home-crit-val {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}
.home-crit-hard .home-crit-val { color: #e74c3c; }
.home-crit-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}
@media (max-width: 700px) {
  .home-hero { grid-template-columns: 1fr; gap: 24px; }
  .home-hero-stats { grid-template-columns: 1fr 1fr; }
  .home-cta-row { flex-direction: column; }
  .home-cta-primary, .home-cta-secondary { text-align: center; }
}
@media (max-width: 640px) {
  .rail { top: 0; max-height: 100vh; padding-top: 52px; }
  .nac-body { grid-template-columns: 1fr; }
  .nav-accordion { padding: 4px 0 80px; }
}



/* ══ Investor FAQ (doc-scoped) ══ */

#doc-company-investor-faq .faq-pill{font-size:12px;font-weight:600;padding:4px 12px;border-radius:20px;border:1px solid var(--border);background:transparent;color:var(--slate);cursor:pointer;transition:all .15s;}
#doc-company-investor-faq .faq-pill:hover{border-color:var(--accent);color:var(--accent);}
#doc-company-investor-faq .faq-pill-active{border-color:var(--accent)!important;background:color-mix(in srgb,var(--accent) 12%,transparent)!important;color:var(--accent)!important;}
#doc-company-investor-faq .faq-section-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--slate);margin:28px 0 10px;padding-left:2px;}
#doc-company-investor-faq .faq-item{border:1px solid var(--border);border-radius:10px;overflow:hidden;margin-bottom:8px;transition:border-color .15s;}
#doc-company-investor-faq .faq-item:hover{border-color:color-mix(in srgb,var(--accent) 50%,var(--border));}
#doc-company-investor-faq .faq-item.faq-hidden{display:none!important;}
#doc-company-investor-faq .faq-q{width:100%;text-align:left;background:var(--surface);border:none;padding:14px 42px 14px 18px;font-size:14px;font-weight:700;color:var(--ink);cursor:pointer;position:relative;line-height:1.4;transition:background .15s;}
#doc-company-investor-faq .faq-q:hover{background:color-mix(in srgb,var(--accent) 5%,var(--surface));}
#doc-company-investor-faq .faq-q .faq-chevron{position:absolute;right:14px;top:50%;transform:translateY(-50%) rotate(0deg);transition:transform .22s cubic-bezier(.23,1,.32,1);width:18px;height:18px;color:var(--slate);flex-shrink:0;}
#doc-company-investor-faq .faq-item.open .faq-q .faq-chevron{transform:translateY(-50%) rotate(180deg);}
#doc-company-investor-faq .faq-item.open .faq-q{background:color-mix(in srgb,var(--accent) 6%,var(--surface));}
#doc-company-investor-faq .faq-body{max-height:0;overflow:hidden;transition:max-height .32s cubic-bezier(.23,1,.32,1);}
#doc-company-investor-faq .faq-body-inner{padding:16px 18px;font-size:14px;color:var(--slate);line-height:1.7;border-top:1px solid var(--border);}
#doc-company-investor-faq .faq-body-inner p{margin:0 0 10px;}
#doc-company-investor-faq .faq-body-inner p:last-child{margin:0;}
#doc-company-investor-faq .faq-body-inner ol,#doc-company-investor-faq .faq-body-inner ul{margin:0 0 10px;padding-left:20px;line-height:1.8;}
#doc-company-investor-faq .faq-body-inner table{margin:0 0 10px;width:100%;}
#doc-company-investor-faq .faq-body-inner strong{color:var(--ink);}
#doc-company-investor-faq mark.faq-hl{background:color-mix(in srgb,var(--accent) 28%,transparent);color:var(--ink);border-radius:2px;padding:0 1px;}
#doc-company-investor-faq .faq-count-badge{font-size:11px;color:var(--slate);margin-left:6px;font-weight:400;}


/* ══ Reimbursement explorer (doc-scoped) ══ */

/* ── Filter buttons ── */
.reimb-filter-btn{padding:.35rem .85rem;border-radius:999px;border:1.5px solid var(--border,#e5e7eb);background:transparent;cursor:pointer;font-size:.82rem;font-weight:500;color:var(--fg,#374151);transition:all .15s;}
.reimb-filter-btn.active,.reimb-filter-btn:hover{background:var(--accent,#2563eb);color:#fff;border-color:var(--accent,#2563eb);}
/* ── Program cards ── */
.reimb-card{border:1.5px solid var(--border,#e5e7eb);border-radius:10px;margin-bottom:1.25rem;overflow:hidden;transition:box-shadow .15s;}
.reimb-card:hover{box-shadow:0 4px 18px rgba(0,0,0,.08);}
.reimb-card-header{display:flex;align-items:center;gap:.75rem;padding:.85rem 1.1rem;cursor:pointer;user-select:none;}
.reimb-card-header:hover{background:var(--hover,#f9fafb);}
.reimb-badge{font-size:.7rem;font-weight:700;padding:.2rem .55rem;border-radius:999px;white-space:nowrap;flex-shrink:0;}
.badge-cms{background:#dbeafe;color:#1d4ed8;}
.badge-commercial{background:#d1fae5;color:#065f46;}
.badge-penalty{background:#fee2e2;color:#991b1b;}
.badge-vbc{background:#ede9fe;color:#5b21b6;}
.reimb-card-title{font-weight:600;font-size:.95rem;flex:1;}
.reimb-card-rate{font-size:.82rem;font-weight:700;color:var(--accent,#2563eb);margin-left:auto;white-space:nowrap;}
.reimb-chevron{font-size:.8rem;color:var(--fg2,#6b7280);transition:transform .2s;margin-left:.5rem;}
.reimb-card-body{display:none;padding:0 1.1rem 1.1rem;}
.reimb-card-body.open{display:block;}
/* ── Inner layout ── */
.reimb-inner{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:.75rem;}
@media(max-width:640px){.reimb-inner{grid-template-columns:1fr;}}
.reimb-col-label{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--fg2,#6b7280);margin-bottom:.4rem;}
.reimb-rule-list{list-style:none;padding:0;margin:0;}
.reimb-rule-list li{font-size:.84rem;padding:.25rem 0;border-bottom:1px solid var(--border,#f3f4f6);display:flex;gap:.4rem;}
.reimb-rule-list li:last-child{border-bottom:none;}
.reimb-rule-list li::before{content:"›";color:var(--accent,#2563eb);font-weight:700;flex-shrink:0;}
.reimb-platform-list{list-style:none;padding:0;margin:0;}
.reimb-platform-list li{font-size:.84rem;padding:.25rem 0;border-bottom:1px solid var(--border,#f3f4f6);display:flex;gap:.4rem;}
.reimb-platform-list li:last-child{border-bottom:none;}
.reimb-platform-list li::before{content:"✓";color:#16a34a;font-weight:700;flex-shrink:0;}
/* ── Summary table ── */
.reimb-summary-table{width:100%;border-collapse:collapse;font-size:.83rem;margin-top:1.5rem;}
.reimb-summary-table th{background:var(--accent,#2563eb);color:#fff;padding:.55rem .75rem;text-align:left;font-weight:600;}
.reimb-summary-table td{padding:.5rem .75rem;border-bottom:1px solid var(--border,#e5e7eb);vertical-align:top;}
.reimb-summary-table tr:last-child td{border-bottom:none;}
.reimb-summary-table tr:nth-child(even) td{background:var(--hover,#f9fafb);}
/* ── Revenue calculator ── */
.reimb-calc{background:var(--hover,#f9fafb);border:1.5px solid var(--border,#e5e7eb);border-radius:10px;padding:1.1rem;margin-top:1.5rem;}
.reimb-calc h3{margin:0 0 .75rem;font-size:.95rem;}
.reimb-calc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.75rem;}
.reimb-calc-field{display:flex;flex-direction:column;gap:.25rem;}
.reimb-calc-field label{font-size:.75rem;font-weight:600;color:var(--fg2,#6b7280);}
.reimb-calc-field input{padding:.4rem .6rem;border:1.5px solid var(--border,#e5e7eb);border-radius:6px;font-size:.88rem;background:#fff;}
.reimb-calc-result{margin-top:1rem;padding:.75rem 1rem;background:var(--accent,#2563eb);color:#fff;border-radius:8px;font-size:.88rem;line-height:1.6;}
.reimb-calc-result strong{font-size:1.05rem;}


/* ══ ADR status system + adaptive card grids ══ */
.doc{display:block}
/* ── ARD Status System ──────────────────────────────────────────────────── */
.ard-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: box-shadow .15s, transform .1s;
  user-select: none;
  white-space: nowrap;
  font-family: var(--sans);
}
.ard-status-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .65;
  flex-shrink: 0;
}
.ard-status-badge:hover { opacity: .85; transform: scale(1.03); }
.ard-status-badge:active { transform: scale(.97); }
.ard-status-badge.pending   { background: #F1F5F9; color: #64748B; border-color: #CBD5E1; }
.ard-status-badge.in_progress { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }
.ard-status-badge.complete  { background: #DCFCE7; color: #166534; border-color: #86EFAC; }

/* Dropdown */
.ard-status-menu {
  position: absolute;
  z-index: 9999;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.06);
  padding: 5px;
  min-width: 160px;
  display: none;
  top: calc(100% + 6px);
  left: 0;
}
.ard-status-menu.open { display: block; }
.ard-status-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s;
  color: #374151;
}
.ard-status-menu-item:hover { background: #F8FAFC; }
.ard-status-menu-item.active { background: #F1F5F9; font-weight: 600; }
.ard-status-menu-item .dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.ard-status-menu-item.opt-pending   .dot { background: #94A3B8; }
.ard-status-menu-item.opt-in_progress .dot { background: #F59E0B; }
.ard-status-menu-item.opt-complete  .dot { background: #22C55E; }
.ard-status-menu-item.opt-pending   { color: #64748B; }
.ard-status-menu-item.opt-in_progress { color: #92400E; }
.ard-status-menu-item.opt-complete  { color: #166534; }

/* Status wrapper on article header */
.ard-status-wrap {
  position: relative;
  display: inline-block;
}

/* Index page status badge (small, inline in nav) */
.nav-status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}
.nav-status-dot.pending    { background: #475569; }
.nav-status-dot.in_progress { background: #f59e0b; }
.nav-status-dot.complete   { background: #10b981; }

/* Saving indicator */
.ard-status-saving {
  font-size: 10px;
  color: #64748b;
  margin-left: 6px;
  vertical-align: middle;
  display: none;
}
.ard-status-saving.visible { display: inline; }


/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE LAYOUT SYSTEM — industry-standard prose + table fixes
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. PROSE CONTAINER ─────────────────────────────────────────────────── */
/* Cap readable line length. GitHub uses 800px, Notion ~900px, we use 860px  */
/* to give room for wider tables while keeping prose comfortable.            */
main {
  /* Override: add a max-width so text never stretches across a 27" monitor */
  max-width: 100%;
}

/* The inner prose wrapper — every article gets this automatically via JS    */
.prose-wrap {
  max-width: 860px;
  width: 100%;
}

/* When the right aside is hidden (≤1279px) centre the prose in the main col */
@media (min-width: 901px) and (max-width: 1279px) {
  .prose-wrap { margin: 0 auto; }
}

/* On large screens (aside visible) left-align prose, let aside float right  */
@media (min-width: 1280px) {
  .prose-wrap { margin: 0; }
}

/* ── 2. FLUID TYPOGRAPHY ────────────────────────────────────────────────── */
/* clamp(min, preferred, max) — scales smoothly, no breakpoint jumps         */
article.doc h1 {
  font-size: clamp(22px, 3.5vw, 34px);
  line-height: 1.2;
}
article.doc h2 {
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.3;
}
article.doc h3 {
  font-size: clamp(14px, 1.8vw, 17px);
}
article.doc h4 {
  font-size: clamp(13px, 1.4vw, 15px);
}
p, li {
  font-size: clamp(13.5px, 1.1vw, 15px);
  line-height: 1.72;
}

/* ── 3. TABLE SYSTEM ────────────────────────────────────────────────────── */
/* Wrap every table in a scroll container — prevents layout blowout          */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Subtle scroll hint on mobile */
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.table-scroll > table {
  margin-bottom: 0;
  min-width: 480px; /* prevent tables collapsing too narrow */
}

/* Fixed layout: browser respects column widths instead of auto-sizing       */
table {
  table-layout: fixed;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Column width utility classes — apply to <th> or <col>                     */
/* Usage: <th class="col-xs"> for narrow columns (status, date, badge)       */
.col-xs  { width: 80px;  min-width: 70px; }
.col-sm  { width: 120px; min-width: 100px; }
.col-md  { width: 180px; min-width: 140px; }
.col-lg  { width: 240px; min-width: 180px; }
.col-xl  { width: 320px; min-width: 220px; }
.col-auto { width: auto; }   /* takes remaining space */
.col-pct-20 { width: 20%; }
.col-pct-25 { width: 25%; }
.col-pct-30 { width: 30%; }
.col-pct-33 { width: 33.333%; }
.col-pct-40 { width: 40%; }
.col-pct-50 { width: 50%; }

/* Cell text behaviour */
table td, table th {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  white-space: normal;   /* override any lingering nowrap */
  vertical-align: top;
}

/* Short label columns (status badges, yes/no) should not wrap              */
table td.nowrap, table th.nowrap {
  white-space: nowrap;
  width: auto;
}

/* Prevent the first column from dominating when it has short text           */
table td:first-child, table th:first-child {
  white-space: normal;
  word-break: break-word;
}

/* Compact variant — tighter padding for dense data tables                   */
table.compact td, table.compact th {
  padding: 6px 10px;
  font-size: 12px;
}

/* ── 4. CARD GRIDS ──────────────────────────────────────────────────────── */
/* Replace fixed-column grids with auto-fill so cards reflow at any width    */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 16px;
}
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 14px;
}

/* ── 5. STAT / METRIC CARDS ─────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

/* ── 6. SECTION HERO / INTRO BLOCKS ────────────────────────────────────── */
/* Prevent hero text from stretching across ultra-wide screens               */
.section-intro {
  max-width: 680px;
}

/* ── 7. CALLOUT BOXES ───────────────────────────────────────────────────── */
.callout {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ── 8. CODE BLOCKS ─────────────────────────────────────────────────────── */
pre {
  overflow-x: auto;
  max-width: 100%;
  white-space: pre;
}

/* ── 9. IMAGES ──────────────────────────────────────────────────────────── */
article.doc img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── 10. INLINE SVG DIAGRAMS ────────────────────────────────────────────── */
article.doc svg {
  max-width: 100%;
  height: auto;
}

/* ══════════════════════════════════════════════════════════════════════════
   BREAKPOINT OVERRIDES
   ══════════════════════════════════════════════════════════════════════════ */

/* LG: 1280px+ — full 3-col layout, prose left-aligned                       */
@media (min-width: 1280px) {
  main {
    padding: 36px 52px 80px;
  }
}

/* MD: 901–1279px — 2-col (nav + content), no right aside                    */
@media (min-width: 901px) and (max-width: 1279px) {
  main {
    padding: 32px 44px 80px;
  }
  .prose-wrap {
    max-width: 820px;
  }
}

/* SM: 641–900px — single column, nav in drawer                              */
@media (min-width: 641px) and (max-width: 900px) {
  main {
    padding: 24px 28px 80px;
  }
  .prose-wrap {
    max-width: 100%;
  }
  table {
    font-size: 13px;
  }
  table td, table th {
    padding: 9px 11px;
  }
}

/* XS: ≤640px — mobile                                                       */
@media (max-width: 640px) {
  main {
    padding: 16px 14px 72px;
  }
  .prose-wrap {
    max-width: 100%;
  }
  /* Tables: horizontal scroll, never stack (stacking is handled at 480px)   */
  .table-scroll {
    margin-left: -14px;
    margin-right: -14px;
    border-radius: 0;
    padding: 0 14px;
    box-sizing: content-box;
  }
  table {
    font-size: 12.5px;
  }
  table td, table th {
    padding: 8px 10px;
  }
  /* Card grids: force single column on very small screens                   */
  .card-grid, .card-grid-2, .card-grid-3 {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* XXS: ≤400px — very small phones                                           */
@media (max-width: 400px) {
  main {
    padding: 12px 10px 64px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  table {
    font-size: 12px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   EXISTING TABLE OVERRIDE — remove table-layout:auto that was set before
   ══════════════════════════════════════════════════════════════════════════ */
/* The earlier rule set table-layout:auto — override it here to fixed        */
table { table-layout: fixed !important; }
/* But allow the reimb-summary-table to stay auto since it has no col hints  */
.reimb-summary-table { table-layout: auto !important; }



/* ══ Responsive ══ */
/* ── Responsive: Tablet (≤900px) ─────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --page-pad: 28px; }
  header { padding: 0 20px; }
  .hbtn span.long { display: none; }
  .hbtn span.short { display: inline; }
  main { padding: 28px var(--page-pad) 60px; }
}


/* ── Responsive: Mobile (≤640px) ─────────────────────────────────────────── */
@media (max-width: 640px) {
  
/* ── Mobile 640px ── */
  :root { --page-pad: 14px; --header-h: 52px; }

  /* Header: full-width, compact, all items accessible */
  header { padding: 0 14px; gap: 6px; height: var(--header-h); }
  .brand { gap: 6px; }
  .brand span { display: none; }
  .brand-name { font-size: 11px; letter-spacing: 0.08em; }

  /* Header buttons: touch-friendly 44px targets */
  .hbtn { height: 36px; padding: 0 12px; font-size: 10px; min-width: 44px; }
  .hbtn.pdf-dl span.long { display: none; }
  .hbtn.pdf-dl span.short { display: inline; }
  .hbtn.print { display: none; }
  .hbtn.menu { display: inline-flex; height: 36px; padding: 0 14px; }

  /* Main content: full-bleed, comfortable padding */
  main { padding: 16px var(--page-pad) 72px; }
  .prose-wrap { padding: 0; }

  /* Breadcrumb strip: smaller, wraps gracefully */
  .strip { font-size: 9px; gap: 4px; flex-wrap: wrap; padding: 10px var(--page-pad); }

  /* Typography: readable on small screens */
  .doc h1 { font-size: clamp(18px, 5vw, 22px); line-height: 1.3; }
  .doc h2 { font-size: clamp(15px, 4vw, 18px); }
  .doc h3 { font-size: clamp(13px, 3.5vw, 16px); }
  .doc p, .doc li { font-size: 14px; line-height: 1.65; }

  /* Password gate: full-width card */
  .pw-box { padding: 28px 18px 24px; margin: 0 8px; }
  .pw-title { font-size: 22px; }
  .pw-btn { width: 100%; }

  /* Stat grid: 2-col on mobile */
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px 12px; }
  .stat-val { font-size: 20px; }

  /* Hub navigation grid: single column */
  .hub-grid { grid-template-columns: 1fr; gap: 10px; }
  .hc { padding: 16px; }

  /* Prev/next navigation: stack vertically */
  .pn { flex-direction: column; gap: 8px; }
  .pn a { width: 100%; text-align: center; }

  /* Documents mega-panel: 2-col on mobile */
  #nav-panel { padding: 14px 12px; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .np-group-title { font-size: 9px; margin-bottom: 6px; }
  .np-link { font-size: 11px; padding: 5px 0; }

  /* Tables: horizontal scroll, compact */
  .doc table { font-size: 12px; min-width: 480px; }
  .doc table th, .doc table td { padding: 7px 9px; }

  /* FAQ: full-width */
  .faq-q { font-size: 13.5px; padding: 13px 14px; }
  .faq-body-inner { font-size: 13px; padding: 0 14px 14px; }
  .faq-filters { gap: 6px; }
  .faq-filter-btn { padding: 5px 10px; font-size: 10px; }
  #faq-search { font-size: 13px; padding: 10px 12px; }

  /* ADR status badge: full-width on mobile */
  .ard-status-badge { width: 100%; justify-content: space-between; }

  /* Section labels */
  .section-label { font-size: 9px; }
}


/* ── Responsive: Small phone (≤400px) ────────────────────────────────────── */
@media (max-width: 400px) {
  
/* ── Mobile 400px (small phones) ── */
  :root { --page-pad: 10px; }
  header { padding: 0 10px; gap: 4px; }
  .brand-name { display: none; }
  .doc h1 { font-size: 17px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  #nav-panel { grid-template-columns: 1fr; padding: 12px 10px; }
  .hbtn.menu { padding: 0 10px; font-size: 9.5px; }
  .doc table { font-size: 11px; }
  .pw-box { padding: 24px 14px 20px; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   UX v2 — centered layout, panel redesign, mobile header, TOC, back-to-top
   (final layer: intentionally overrides earlier rules)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── A. Centered reading column ─────────────────────────────────────────── */
main { max-width: none; padding-left: clamp(20px, 4vw, 48px); padding-right: clamp(20px, 4vw, 48px); }
.doc { max-width: 960px; margin-left: auto; margin-right: auto; }
.prose-wrap { max-width: none; margin: 0; }
#doc-home { max-width: 1120px; }

/* ── A. Home: balanced hero band + real card grids ──────────────────────── */
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: center; }
@media (max-width: 900px) { .home-hero { grid-template-columns: 1fr; gap: 28px; } }
.home-hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: transparent; border: none; }
.home-stat { background: var(--white); border: 1px solid var(--border-dark); border-radius: 10px; padding: 18px 16px; }
.home-cat-grid { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; background: transparent; border: none; }
.home-cat-card { background: var(--white); border: 1px solid var(--border); border-radius: 10px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.home-cat-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(10, 22, 40, .35); }
.home-criteria-grid { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; background: transparent; border: none; }
.home-criterion { background: var(--white); border: 1px solid var(--border); border-radius: 8px; }
.stat-grid { gap: 12px; background: transparent; border: none; }
.stat-card { background: var(--white); border: 1px solid var(--border-dark); border-radius: 8px; }

/* ── B. Documents panel v2 ──────────────────────────────────────────────── */
#nav-panel { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 190;
  background: var(--white); border-bottom: 1px solid var(--border-dark);
  box-shadow: 0 32px 56px -16px rgba(10, 22, 40, .25);
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  transform: none; opacity: 1; padding: 0; }
#nav-panel.open { display: block; }
.np-inner { max-width: 1180px; margin: 0 auto; padding: 18px clamp(16px, 3vw, 36px) 10px; }

.np-head { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap;
  padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.np-search { position: relative; flex: 1 1 300px; max-width: 520px; }
.np-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--slate-light); pointer-events: none; }
.np-search input { width: 100%; padding: 10px 76px 10px 38px; background: var(--parchment);
  border: 1px solid var(--border-dark); border-radius: 8px; font-family: var(--font-sans); font-size: 14px; color: var(--ink); }
.np-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--forest-pale); background: var(--white); }
.np-search-count { position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10px; color: var(--slate-light); white-space: nowrap; pointer-events: none; }
.np-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono);
  font-size: 10.5px; color: var(--slate-light); border: 1px solid var(--border-dark); border-radius: 4px;
  padding: 1px 6px; background: var(--white); pointer-events: none; }

.np-scope { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.np-scope-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.np-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink); }
.np-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.np-track { width: 38px; height: 22px; border-radius: 11px; background: var(--slate-pale); position: relative;
  transition: background .18s ease; flex-shrink: 0; }
.np-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .18s ease; }
.np-switch input:checked + .np-track { background: var(--accent); }
.np-switch input:checked + .np-track::after { transform: translateX(16px); }
.np-switch input:focus-visible + .np-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.np-badge { font-family: var(--font-mono); font-size: 9.5px; color: var(--forest-mid); background: var(--forest-pale);
  border-radius: 8px; padding: 1px 7px; margin-left: 2px; }

.np-quick { display: none; }

.np-zone { padding: 18px 0 8px; }
.np-zone-label { display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: 10px;
  font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--forest-mid); margin-bottom: 14px; }
.np-zone-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.np-cols { display: grid; gap: 10px 32px; }
.np-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.np-cols-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); }
.np-col-hd { font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; color: var(--ink);
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.np-count { font-family: var(--font-mono); font-size: 9.5px; font-weight: 400; color: var(--slate-light); }
.np-col ul { list-style: none; margin: 0; padding: 0; }
.np-col li a { display: block; padding: 5px 8px; margin-left: -8px; border-radius: 6px;
  font-family: var(--font-sans); font-size: 13px; line-height: 1.35; color: var(--slate); text-decoration: none; }
.np-col li a:hover { background: var(--forest-pale); color: var(--forest); }
.np-col li a.active { background: var(--forest-pale); color: var(--accent); font-weight: 600; }
.np-subhd { font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--slate-light); margin: 12px 0 3px; }
.np-adr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.np-adr li a { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-col li[hidden], .np-col[hidden], .np-zone[hidden] { display: none; }

@media (max-width: 1000px) {
  .np-cols-4, .np-cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .np-cols-4, .np-cols-3, .np-adr { grid-template-columns: 1fr; }
  .np-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .np-search { max-width: none; }
  .np-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 4px; }
  .np-quick a { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
    color: var(--forest-mid); background: var(--forest-pale); border: 1px solid var(--border);
    border-radius: 16px; padding: 7px 14px; text-decoration: none; }
}

/* ── C. Mobile header: brand + Documents only ───────────────────────────── */
@media (max-width: 700px) {
  .hdr-right .hbtn:not(.primary):not(.menu) { display: none !important; }
  .brand span { display: none; }
  #mobile-bottom-nav { display: grid; }
  body { padding-bottom: 56px; }
  #nav-panel { max-height: calc(100dvh - var(--header-h) - 56px); }
}

/* ── D. Load-error card ─────────────────────────────────────────────────── */
.doc-error { max-width: 560px; margin: 72px auto; text-align: center; background: var(--white);
  border: 1px solid var(--border-dark); border-radius: 12px; padding: 40px 32px; }
.doc-error h2 { font-family: var(--font-serif); font-size: 22px; color: var(--ink); margin-bottom: 10px; }
.doc-error p { font-family: var(--font-sans); font-size: 14px; color: var(--slate); margin-bottom: 20px; }
.doc-error button { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 10px 22px; cursor: pointer; }
.doc-error button:hover { background: var(--forest-mid); }

/* ── E. Desktop "On this page" rail ─────────────────────────────────────── */
.onpage { display: none; }
@media (min-width: 1480px) {
  .onpage { display: block; position: fixed; top: calc(var(--header-h) + 56px);
    right: max(24px, calc((100vw - 960px) / 2 - 264px)); width: 224px;
    max-height: calc(100dvh - 200px); overflow-y: auto; }
  .onpage:has(#op:empty) { display: none; }
  .opl { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--slate-light); margin-bottom: 10px; }
  #op a { display: block; font-family: var(--font-sans); font-size: 12.5px; line-height: 1.4; color: var(--slate);
    text-decoration: none; padding: 4px 0 4px 12px; border-left: 2px solid var(--border); }
  #op a:hover { color: var(--accent); border-left-color: var(--accent); }
  #op a.h3 { padding-left: 24px; font-size: 12px; color: var(--slate-light); }
}

/* ── E. Back to top ─────────────────────────────────────────────────────── */
#back-top { position: fixed; right: 24px; bottom: 24px; z-index: 150; display: none; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--forest); background: var(--white); border: 1px solid var(--border-dark); border-radius: 18px;
  padding: 9px 16px; cursor: pointer; box-shadow: 0 8px 20px -8px rgba(10, 22, 40, .3); }
#back-top.show { display: inline-flex; }
#back-top:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 700px) { #back-top { bottom: 72px; right: 16px; } }

/* ADR links: keep status dots visible despite text ellipsis */
.np-adr li a { position: relative; padding-right: 22px; }
.np-adr li a .nav-status-dot { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); margin: 0; }

/* v2 hotfixes: specificity + ADR grid containment + home TOC */
#nav-panel #nav-search { width: 100%; padding: 10px 76px 10px 38px; background: var(--parchment);
  border: 1px solid var(--border-dark); border-radius: 8px; font-family: var(--font-sans);
  font-size: 14px; color: var(--ink); margin: 0; }
#nav-panel #nav-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--forest-pale); background: var(--white); }
#nav-panel .np-col ul { list-style: none; margin: 0; padding: 0; display: block; }
#nav-panel .np-col li { margin: 0; padding: 0; }
#nav-panel .np-col li a { display: block; padding: 5px 8px; margin-left: -8px; border-radius: 6px;
  font-family: var(--font-sans); font-size: 13px; line-height: 1.35; color: var(--slate);
  text-decoration: none; border: none; }
#nav-panel .np-col li a:hover { background: var(--forest-pale); color: var(--forest); }
#nav-panel .np-col li a.active { background: var(--forest-pale); color: var(--accent); font-weight: 600; }
#nav-panel .np-adr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
#nav-panel .np-adr li { min-width: 0; }
#nav-panel .np-adr li a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 12.5px; position: relative; padding-right: 22px; }
@media (max-width: 700px) { #nav-panel .np-adr { grid-template-columns: 1fr; } }
body:has(#doc-home.active) .onpage { display: none; }

/* v2 mobile hotfixes */
@media (max-width: 700px) {
  .np-search { flex: 0 0 auto; }
  .hbtn.menu { display: none !important; }
}

/* v2: single-document view — only the active doc renders (kills page stacking) */
main > article.doc { display: none; }
main > article.doc.active { display: block; }
.onpage.empty { display: none !important; }

/* ADR register merge */
.np-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .np-cols-2 { grid-template-columns: 1fr; } }
.adr-section-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adr-section-hd .pill { flex-shrink: 0; }
.adr-section-hd .ard-status-wrap { margin-left: auto; }

/* ═══ TABLE RENDERING FIX ═══════════════════════════════════════════════════
   The export forced table-layout:fixed + rigid col widths + hyphens:auto,
   which crushed some columns and hyphenated words mid-token. Content-driven
   auto layout + horizontal scroll wrappers render every table cleanly. */
table { table-layout: auto !important; }
.doc table { width: 100%; }
.doc table col { width: auto !important; min-width: 0 !important; }
.doc table th, .doc table td {
  word-break: normal !important;
  overflow-wrap: break-word;
  hyphens: none !important;
  vertical-align: top;
}
.doc table code { word-break: keep-all; overflow-wrap: normal; }
.doc table tr:nth-child(even) td { background: #fafbfd; }

/* ═══ MEMBERS UI + status badges on module strips ═══════════════════════════ */
.mb-entry { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--forest-mid); background: var(--white);
  border: 1px solid var(--border-dark); border-radius: 14px; padding: 6px 14px; cursor: pointer; }
.mb-entry:hover { border-color: var(--accent); color: var(--accent); }
.hdr-right .mb-entry-hdr { height: 32px; border-radius: 2px; padding: 0 14px; font-size: 10.5px;
  font-weight: 500; letter-spacing: .06em; background: transparent; color: var(--slate);
  border: 1px solid var(--border-dark); }
.hdr-right .mb-entry-hdr:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
a.mb-entry-chip { text-decoration: none; }
.mb-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(10, 22, 40, .55);
  display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px 16px; overflow-y: auto; }
.mb-box { width: 100%; max-width: 560px; background: var(--white); border-radius: 12px;
  padding: 22px 24px 24px; box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .5); }
.mb-hd { position: relative; margin-bottom: 16px; }
.mb-title { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--navy, #0a1628); }
.mb-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-light); margin-top: 4px; }
.mb-x { position: absolute; top: -6px; right: -6px; width: 32px; height: 32px; border: none; background: none;
  font-size: 22px; color: var(--slate-light); cursor: pointer; }
.mb-x:hover { color: var(--ink); }
.mb-field { display: block; margin-bottom: 12px; }
.mb-field span { display: block; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--slate); margin-bottom: 5px; }
.mb-field input { width: 100%; box-sizing: border-box; font-family: var(--font-sans); font-size: 14px;
  padding: 10px 12px; border: 1px solid var(--border-dark); border-radius: 7px; background: var(--parchment); color: var(--ink); }
.mb-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--forest-pale); background: var(--white); }
.mb-btn { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  background: var(--accent); color: #fff; border: none; border-radius: 7px; padding: 11px 20px; cursor: pointer; margin-top: 4px; }
.mb-btn:hover { background: var(--forest-mid); }
.mb-btn-line { background: var(--white); color: var(--forest-mid); border: 1px solid var(--border-dark); margin-right: 8px; }
.mb-btn-line:hover { background: var(--forest-pale); }
.mb-actions { margin-bottom: 6px; }
.mb-switch { font-family: var(--font-sans); font-size: 12.5px; color: var(--slate); margin-top: 14px; }
.mb-switch a { color: var(--accent); text-decoration: none; }
.mb-msg { font-family: var(--font-sans); font-size: 12.5px; margin-top: 12px; min-height: 16px; color: var(--slate); }
.mb-msg-err { color: #dc2626; }
.mb-msg-ok { color: #059669; }
.mb-sec { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .14em; color: var(--forest-mid); margin: 18px 0 8px; }
.mb-loading, .mb-empty { font-family: var(--font-sans); font-size: 12px; color: var(--slate-light); padding: 4px 0; }
.mb-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; margin-bottom: 7px; }
.mb-row-main { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--font-sans); font-size: 12px; color: var(--slate); align-items: baseline; }
.mb-row-main b { color: var(--ink); }
.mb-row-plain { border-style: dashed; }
.mb-row-done { opacity: .65; }
.mb-mini { font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; border-radius: 5px; padding: 6px 10px; cursor: pointer; border: 1px solid var(--border-dark); background: var(--white); }
.mb-mini-ok { color: #059669; border-color: #059669; }
.mb-mini-no { color: #dc2626; border-color: #dc2626; }
.mb-mini:disabled { opacity: .5; cursor: default; }
.mb-decided { font-family: var(--font-mono); font-size: 9.5px; color: var(--slate); }
.mb-log { width: 100%; border-collapse: collapse; font-size: 11px; font-family: var(--font-sans); }
.mb-log th, .mb-log td { border-bottom: 1px solid var(--border); padding: 7px 8px; text-align: left; }
.mb-log th { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; color: var(--slate-light); }
.mb-log td:first-child { font-family: var(--font-mono); font-size: 10px; white-space: nowrap; color: var(--slate); }

/* module strip badges sit at the row end */
.doc .strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.doc .strip .ard-status-wrap { margin-left: auto; }

/* ═══ v3 audit layer ════════════════════════════════════════════════════════
   1. Phones: tables already scroll inside their runtime .table-scroll wrap;
      long unbreakable tokens in prose must wrap instead of widening the page. */
@media (max-width: 700px) {
  .doc p, .doc li, .doc h2, .doc h3, .doc .strip { overflow-wrap: anywhere; }
  .doc table { max-width: none; }
}

/* v3: build-plan phase rail */
.phase-rail { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 30px; }
.phase-rail a { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border-dark);
  border-radius: 18px; padding: 7px 13px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--slate); text-decoration: none; background: var(--white); }
.phase-rail a:hover { border-color: var(--accent); color: var(--accent); }
.phase-rail .pr-wk { color: var(--slate-light); font-size: 9.5px; }

/* v3: engineering zone — three balanced columns */
.np-cols-eng { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .np-cols-eng { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .np-cols-eng { grid-template-columns: 1fr; } }

/* v3: per-phase live scoreboard */
.phase-owns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 6px;
  padding: 12px 14px; background: var(--parchment); border: 1px solid var(--border); border-radius: 10px; }
.po-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-light); }
.po-item { display: inline-flex; align-items: center; gap: 6px; }
.po-name { font-family: var(--font-mono); font-size: 11px; color: var(--slate); text-decoration: none; }
.po-name:hover { color: var(--accent); }
.phase-owns .ard-status-badge { font-size: 9px; padding: 3px 8px; }

/* v3: deep-reference docs — invisible in the menu, discoverable via search */
.np-col.np-deep { display: none; }
.np-col.np-deep.np-deep-show { display: block; }
.np-col.np-deep .np-count { text-transform: none; letter-spacing: 0; }

/* v3: FAQ rows that carry an inline chevron never show the CSS plus too */
.faq-q:has(.faq-chevron)::after { content: none; }

/* v3: reimbursement page — summary header readable + tokens aligned to site */
.doc table.reimb-summary-table th { background: var(--forest); color: #fff; font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; }
.doc td a .nav-dot, .doc td a .nav-status-dot { margin: 0 7px 2px 0; }

/* v3: reimbursement cards, organized two-line headers */
.reimb-card-header { align-items: center; gap: 14px; }
.reimb-hd-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.reimb-card-title { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.reimb-hd-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.reimb-hd-meta .reimb-badge { font-size: .62rem; padding: 2px 8px; }
.reimb-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--slate-light); white-space: nowrap; }
.reimb-card-rate { flex: 0 0 auto; text-align: right; font-family: var(--font-mono); font-size: .78rem; }
@media (max-width: 640px) {
  .reimb-card-header { flex-wrap: wrap; }
  .reimb-card-rate { margin-left: 0; width: 100%; text-align: left; padding-left: 0; }
  .reimb-sub { white-space: normal; }
}

/* v3: reimbursement calculator v2 (sliders + graph) */
#rc2 { background: var(--parchment); border: 1px solid var(--border-dark); border-radius: 14px; padding: 22px 24px 24px; }
#rc2 h3 { margin: 0 0 4px; }
.rc2-intro { font-size: .82rem; color: var(--slate); margin: 0 0 18px; }
.rc2-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 26px; align-items: start; }
@media (max-width: 900px) { .rc2-layout { grid-template-columns: 1fr; } }
.rc2-row { margin-bottom: 16px; }
.rc2-lab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.rc2-lab span { font-size: .8rem; font-weight: 600; color: var(--ink); }
.rc2-lab output { font-family: var(--font-mono); font-size: .8rem; font-weight: 600; color: var(--forest);
  background: var(--white); border: 1px solid var(--border-dark); border-radius: 6px; padding: 2px 9px; }
.rc2-hint { font-size: .68rem; color: var(--slate-light); margin-top: 5px; }
#rc2 input[type=range] { width: 100%; accent-color: var(--forest); height: 22px; cursor: pointer; }
.rc2-results { background: var(--white); border: 1px solid var(--border-dark); border-radius: 12px; padding: 18px 20px 20px; }
.rc2-total-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; color: var(--slate-light); }
.rc2-total { font-size: 30px; font-weight: 800; color: var(--forest); line-height: 1.15; margin: 2px 0 12px; font-variant-numeric: tabular-nums; }
.rc2-stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-bottom: 12px; background: var(--parchment); }
.rc2-stack div { height: 100%; transition: width .18s; }
.rc2-comp { display: grid; gap: 6px; }
.rc2-comp .cr { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--slate); }
.rc2-comp .cr b { margin-left: auto; font-family: var(--font-mono); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.rc2-comp .dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.rc2-chart-cap { font-size: .68rem; color: var(--slate-light); margin-top: 6px; }
.rc2-note { font-size: .7rem; color: var(--slate); border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; line-height: 1.5; }

/* v3: reimbursement cards, row-aligned rule/response pairs */
.reimb-pairs { margin-top: .4rem; }
.rp-hd, .rp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.rp-hd div { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--slate-light); padding: 4px 0 8px; border-bottom: 1px solid var(--border-dark); }
.rp-row { border-bottom: 1px solid var(--border); }
.rp-row:last-child { border-bottom: none; }
.rp-rule, .rp-ans { position: relative; padding: 10px 0 10px 20px; font-size: .82rem; line-height: 1.55; color: var(--slate); }
.rp-rule::before { content: '\203A'; position: absolute; left: 5px; top: 9px; color: var(--slate-light); font-weight: 700; }
.rp-ans::before { content: '\2713'; position: absolute; left: 2px; top: 10px; color: var(--forest); font-weight: 700; font-size: .8rem; }
@media (max-width: 640px) {
  .rp-hd { display: none; }
  .rp-row { grid-template-columns: 1fr; gap: 0; padding: 4px 0; }
  .rp-ans { padding-top: 2px; }
}

/* v3: interactive risk matrix */
.rm-toggle { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); background: none; border: none; cursor: pointer; padding: 0 0 12px; }
.rm-matrix { display: grid; grid-template-columns: 92px repeat(4, minmax(122px, 1fr)); border: 1px solid var(--border-dark);
  border-radius: 10px; overflow: hidden; background: var(--white); min-width: 640px; }
#rm-matrix-wrap { overflow-x: auto; }
.rm-cell { padding: 8px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.rm-collab, .rm-rowlab, .rm-corner, .rm-implab, .rm-axislab { font-family: var(--font-mono); font-size: 9px;
  letter-spacing: .12em; color: var(--slate-light); display: flex; align-items: center; justify-content: center; background: var(--parchment); min-height: 30px; }
.rm-grid { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; min-height: 62px; }
.rm-chip { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .04em;
  border: 1px solid; border-radius: 6px; padding: 3px 8px; cursor: pointer; transition: transform .1s, opacity .15s; }
.rm-chip:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(10,22,40,.18); }
.rm-legend { display: flex; gap: 18px; margin: 12px 0 6px; font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: .1em; color: var(--slate); }
.rm-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.rm-filters { margin: 14px 0 12px; display: grid; gap: 8px; }
.rm-frow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rm-flab { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-light); }
.rm-pill { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--slate); background: var(--white); border: 1px solid var(--border-dark); border-radius: 6px; padding: 6px 12px; cursor: pointer; margin: 2px 6px 2px 0; }
.rm-pill.active { background: var(--forest); color: #fff; border-color: var(--forest); }
.rm-count { margin-left: auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--slate-light); text-transform: uppercase; }
.rm-table th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.rm-arr { opacity: .5; font-size: 10px; }
.rm-row { cursor: pointer; }
.rm-row:hover td { background: var(--forest-pale) !important; }
.rm-mono { font-family: var(--font-mono); font-size: 11px; }
.rm-score { font-weight: 700; }
.rm-title { font-weight: 600; color: var(--ink); }
.rm-badge { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .06em;
  border: 1px solid; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.rm-detail { border: 1px solid var(--border-dark); border-radius: 10px; padding: 14px 18px; margin-bottom: 12px; background: var(--white); }
.rm-dhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.rm-did { color: var(--accent); font-weight: 700; }
.rm-dmeta { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--slate-light); margin-bottom: 8px; }
.rm-detail p { font-size: .85rem; margin: 6px 0; }
.rm-resid { color: var(--slate); font-style: italic; }
.rm-flash { animation: rmflash 1.6s ease-out; }
@keyframes rmflash { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* v3: risk matrix hover tooltip */
.rm-tip { position: fixed; z-index: 240; transform: translate(-50%, -100%); background: var(--ink);
  color: #fff; padding: 7px 11px 8px; border-radius: 8px; font-size: 12px; line-height: 1.45; font-weight: 600;
  max-width: 280px; text-align: left; pointer-events: none; opacity: 0; transition: opacity .12s;
  box-shadow: 0 6px 18px rgba(10, 22, 40, .28); }
.rm-tip.on { opacity: 1; }
.rm-tip::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--ink); }
.rm-tip-id { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: #9fb3c8; display: inline-block; margin-right: 7px; }
.rm-tip-meta { display: block; font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: .1em; margin-top: 3px; }

/* v3: severity zone label inside each matrix cell */
.rm-grid { position: relative; padding-top: 20px; }
.rm-zone { position: absolute; top: 5px; right: 7px; font-family: var(--font-mono); font-size: 7.5px;
  font-weight: 700; letter-spacing: .14em; opacity: .62; pointer-events: none; }

/* v3: editable team page */
#tm-editbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; min-height: 30px; }
.tm-btn { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; background: var(--ink); color: #fff; border: 1px solid var(--ink);
  border-radius: 7px; padding: 7px 14px; cursor: pointer; }
.tm-btn-line { background: transparent; color: var(--ink); border-color: var(--border-dark); }
.tm-btn:hover { opacity: .88; }
.tm-hint, .tm-meta { font-size: 12px; color: var(--slate-light); }
.tm-hint a { color: var(--accent); }
.tm-note { font-size: 12px; font-weight: 600; }
.tm-note-ok { color: var(--forest); }
.tm-note-err { color: #b91c1c; }
.tm-card { background: var(--surface); border: 1px dashed var(--border-dark); border-radius: 10px; padding: 16px; }
.tm-frow { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.tm-frow-top { align-items: start; }
.tm-frow > span { font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; letter-spacing: .12em; color: var(--slate-light); }
.tm-card input, .tm-card textarea, .tm-arow input, #tm-why textarea {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--white);
  border: 1px solid var(--border-dark); border-radius: 6px; padding: 6px 9px; width: 100%; }
.tm-card textarea { min-height: 88px; resize: vertical; }
.tm-arow { display: grid; grid-template-columns: 1fr 1.3fr .6fr 1.6fr 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 760px) { .tm-arow { grid-template-columns: 1fr 1fr; } }
.tm-del { background: transparent; border: 1px solid var(--border-dark); color: #b91c1c; border-radius: 6px;
  padding: 5px 10px; font-size: 11px; cursor: pointer; justify-self: start; }

/* v3: header aligned to content column; quick actions live in the menu */
header { padding: 0; }
.hdr-inner { width: 100%; max-width: calc(1120px + var(--page-pad) * 2); margin: 0 auto;
  padding: 0 var(--page-pad); height: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; }
.np-quick { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 0 16px; margin: 0 0 16px;
  border-bottom: 1px solid var(--border); }
.np-quick a, .np-quick .mb-entry-chip { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--forest-mid); background: var(--forest-pale);
  border: 1px solid var(--border-dark); border-radius: 8px; padding: 9px 16px; text-decoration: none;
  cursor: pointer; transition: background .12s, color .12s; }
.np-quick a:hover, .np-quick .mb-entry-chip:hover { background: var(--forest); color: #fff; }
@media (max-width: 700px) {
  .hdr-right .hbtn.print:not(.primary):not(.menu) { display: inline-flex !important; }
  .hdr-right .hbtn.print .long { display: none; }
}

/* v3: mobile comfort, scroll hints on wide tables, tap targets, safe areas */
@media (max-width: 700px) {
  .table-scroll, .tbl-wrap, article.doc div[style*="overflow-x"] {
    position: relative;
    background:
      linear-gradient(to right, var(--white) 55%, rgba(255,255,255,0)) left / 28px 100% no-repeat local,
      linear-gradient(to left, var(--white) 55%, rgba(255,255,255,0)) right / 28px 100% no-repeat local,
      linear-gradient(to right, rgba(10,22,40,.10), rgba(10,22,40,0)) left / 12px 100% no-repeat scroll,
      linear-gradient(to left, rgba(10,22,40,.10), rgba(10,22,40,0)) right / 12px 100% no-repeat scroll;
  }
  .np-col li a { padding: 9px 8px; }
  .np-quick a, .np-quick .mb-entry-chip { padding: 11px 16px; }
  #nav-panel { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  #mobile-bottom-nav { padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* v3: real-phone fixes: pannable diagrams, no iOS input zoom, dvh panel */
.diagram-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) {
  .diagram-svg { min-width: 840px; }
  #nav-search, .pw-input, .faq-search input, .mb-box input,
  .tm-card input, .tm-card textarea, .tm-arow input, #tm-why textarea { font-size: 16px !important; }
}

/* v3: phone tables become labeled stacked cards (auto-labeled by nav.js) */
@media (max-width: 640px) {
  .table-scroll > table.m-stack, .doc table.m-stack, table.m-stack { min-width: 0 !important; width: 100% !important; font-size: 13px; }
  table.m-stack thead, table.m-stack colgroup { display: none; }
  table.m-stack, table.m-stack tbody, table.m-stack tr, table.m-stack td, table.m-stack tbody th { display: block; width: 100%; box-sizing: border-box; }
  table.m-stack tr { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; background: var(--white); }
  table.m-stack td, table.m-stack tbody th {
    border: none !important; padding: 5px 0; display: grid;
    grid-template-columns: minmax(88px, 36%) 1fr; gap: 10px; align-items: start;
    text-align: left !important; font-size: 13px; line-height: 1.5;
  }
  table.m-stack td::before, table.m-stack tbody th::before {
    content: attr(data-label); font-family: var(--font-mono); font-size: 8.5px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--slate-light); padding-top: 3px;
    overflow-wrap: anywhere;
  }
  table.m-stack td.td-span, table.m-stack td:not([data-label]) { display: block; }
  table.m-stack td.td-span::before, table.m-stack td:not([data-label])::before { content: none; }
  table.m-stack tr:last-child { margin-bottom: 0; }
  .table-scroll:has(> table.m-stack) { background: none; }
  /* the interactive risk table keeps horizontal scroll, slightly larger type */
  .rm-table { font-size: 12.5px; }
}
