/* capability-details.css
   Page-specific delta for capability-details.html.
   Requires css/styles.css loaded first (sitewide) — reuses its tokens
   (--navy, --blue, --text-dark, --text-body, --text-muted, --border,
   --radius), the .mobile-nav-link/.mobile-sub collapse pattern, and the
   .hamburger icon already defined there. Only the sidebar/main app-shell
   layout, the reference table/list styles, and the section typography
   below are new here. */

.cd-scope{
  --cd-blue:#2563EB; --cd-blue-dark:#1D4ED8; --cd-blue-tint:#EFF6FF; --cd-blue-line:#BFDBFE;
  --cd-hr:#1976D2;
  --cd-time:#15803d;
  --cd-pay:#b45309;
  --cd-insights:#7c3aed;
}

/* ── Shell ───────────────────────────────────────────────────────── */
.cd-shell{display:flex;align-items:flex-start;background:#fff;}

/* Mobile top bar — hidden on desktop */
.cd-topbar{
  display:none;align-items:center;justify-content:space-between;
  position:sticky;top:0;z-index:80;
  background:rgba(255,255,255,.97);backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border);
  padding:0 16px;height:56px;
}
.cd-topbar-title{font-size:15px;font-weight:800;color:var(--text-dark);letter-spacing:-.2px;}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.cd-sidebar{
  flex:0 0 260px;width:260px;
  border-right:1px solid var(--border);
  position:sticky;top:0;align-self:flex-start;
  max-height:100vh;overflow-y:auto;
  padding:32px 16px 40px;
  background:#fff;
}
.cd-sidebar-title{font-size:18px;font-weight:800;color:var(--text-dark);letter-spacing:-.3px;padding:0 8px;}
.cd-sidebar-back{display:inline-block;font-size:12px;font-weight:600;color:var(--text-muted);margin:6px 8px 22px;transition:color .15s ease;}
.cd-sidebar-back:hover{color:var(--cd-blue-dark);}

/* Module group trigger — reuses .mobile-nav-link (chevron rotate on .open)
   for its look; .mobile-nav-link was written for an <a>, so a <button>
   needs the usual UA-style resets plus full width added back. */
.cd-group + .cd-group{margin-top:0;}
.cd-sidebar .mobile-nav-link{
  width:100%;background:none;border:none;font-family:inherit;text-align:left;
  padding:14px 8px;font-size:15px;cursor:pointer;
}
.cd-sidebar .mobile-nav-link:last-of-type{border-bottom:1px solid #f1f5f9;}
.cd-group-label{display:flex;align-items:center;gap:10px;}
.cd-mod-icon{width:20px;height:20px;flex-shrink:0;object-fit:contain;}

/* Module body — reuses .mobile-sub (max-height collapse) */
.cd-group-list{display:flex;flex-direction:column;padding:4px 0 10px;}
/* Insights holds 14 links (dashboards + 13 report groups) — more than
   .mobile-sub.open's 600px cap, so give the sidebar's groups room */
.cd-sidebar .mobile-sub.open{max-height:1200px;}
.cd-nav-link{
  display:block;padding:8px 10px 8px 16px;margin:1px 0;
  border-left:2px solid transparent;border-radius:0 8px 8px 0;
  font-size:13.5px;color:var(--text-body);
  transition:background .15s ease,color .15s ease,border-color .15s ease;
}
.cd-nav-link:hover{background:var(--cd-blue-tint);color:var(--text-dark);}
.cd-nav-link.cd-nav-link--active{
  background:var(--cd-blue-tint);color:var(--cd-blue-dark);
  border-left-color:var(--cd-blue);font-weight:700;
}

/* ── Main ────────────────────────────────────────────────────────── */
.cd-main{flex:1;min-width:0;}
.cd-content{max-width:720px;margin:0 auto;padding:64px 40px 140px;}

.cd-section{scroll-margin-top:32px;}
.cd-section + .cd-section{border-top:1px solid var(--border);margin-top:52px;padding-top:52px;}
.cd-eyebrow{display:flex;align-items:center;gap:8px;color:var(--cd-accent,var(--cd-blue));}
.cd-eyebrow .cd-mod-icon{width:18px;height:18px;}
.cd-title{margin-top:0;}
.cd-intro{max-width:none;margin-bottom:26px;}
/* plan / scope condition shown under a section's intro (item.note) */
.cd-note{margin:-10px 0 26px;padding:12px 16px;border-left:3px solid var(--cd-accent,var(--cd-blue));border-radius:0 8px 8px 0;background:var(--cd-blue-tint);font-size:13.5px;line-height:1.6;color:var(--text-body);}

/* section typography (this page's own reduced version of the sitewide
   section-header pattern — kept local since no other page shares it) */
.cd-content .phr-section__label{font-family:'Plus Jakarta Sans',sans-serif;font-weight:700;font-size:12px;letter-spacing:.12em;text-transform:uppercase;}
.cd-content .phr-section__title{font-family:'Plus Jakarta Sans',sans-serif;font-size:28px;font-weight:800;color:var(--text-dark);letter-spacing:-.02em;margin-top:8px;}
.cd-content .phr-section__sub{font-size:15.5px;color:var(--text-body);line-height:1.6;margin-top:10px;}

/* Defined-list table */
.cd-table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:10px;}
.cd-table{width:100%;min-width:420px;border-collapse:collapse;font-size:14px;}
.cd-table th{
  text-align:left;background:var(--cd-blue-tint);color:var(--text-dark);
  font-weight:700;font-size:12px;letter-spacing:.3px;text-transform:uppercase;
  padding:12px 16px;border-bottom:1px solid var(--border);white-space:nowrap;
}
.cd-table td{padding:13px 16px;border-bottom:1px solid var(--border);color:var(--text-body);vertical-align:top;line-height:1.5;}
.cd-table tr:last-child td{border-bottom:none;}
.cd-table td em,.cd-list-desc em,.cd-prose em{color:var(--text-muted);font-style:italic;}

/* Defined-list list */
.cd-list{display:flex;flex-direction:column;}
.cd-list li{padding:14px 0;border-bottom:1px solid var(--border);}
.cd-list li:last-child{border-bottom:none;}
.cd-list-name{display:block;font-weight:700;color:var(--text-dark);font-size:14.5px;margin-bottom:3px;}
.cd-list-desc{font-size:14px;color:var(--text-body);line-height:1.6;}
.cd-list li.cd-list-group{padding:20px 0 6px;border-bottom:none;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--cd-accent,var(--cd-blue));}
.cd-list li.cd-list-group:first-child{padding-top:0;}

/* Prose */
.cd-prose p{font-size:15px;color:var(--text-body);line-height:1.75;}
.cd-prose p + p{margin-top:14px;}
.cd-prose ul{margin-top:18px;}
.cd-prose li{
  list-style:none;position:relative;padding:9px 0 9px 20px;
  border-bottom:1px solid var(--border);
  color:var(--text-body);font-size:14.5px;line-height:1.6;
}
.cd-prose li:last-child{border-bottom:none;}
.cd-prose li::before{content:'';position:absolute;left:2px;top:17px;width:6px;height:6px;border-radius:50%;background:var(--cd-blue-line);}

/* Mobile drawer overlay backdrop */
.cd-overlay{display:none;position:fixed;inset:0;background:rgba(10,27,62,.4);z-index:75;}
.cd-overlay.cd-overlay--visible{display:block;}

/* ── Responsive: collapse sidebar into top bar + drawer ─────────── */
@media (max-width:840px){
  .cd-topbar{display:flex;}
  .cd-sidebar{
    position:fixed;top:0;left:0;bottom:0;z-index:78;
    width:84%;max-width:320px;height:100%;
    padding-top:72px;
    transform:translateX(-100%);
    transition:transform .3s ease;
    box-shadow:0 20px 48px -20px rgba(15,28,46,.35);
  }
  .cd-sidebar.cd-sidebar--open{transform:translateX(0);}
  .cd-content{padding:40px 20px 100px;}
}
