/* ============================================
   ConceptGood Consultants - Presentation Deck
   Corporate Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --primary: #16224E;
  --primary-light: #27356E;
  --secondary: #4F7BF7;
  --secondary-light: #7C9DFF;
  --accent: #14C7B8;
  --accent-light: #4FE3D5;
  --success: #22A06B;
  --danger: #E5484D;
  --dark: #1A1A2E;
  --text: #2D3436;
  --text-light: #636E72;
  --light: #F8F9FA;
  --white: #FFFFFF;
  --border: #E0E6ED;
  --shadow: 0 4px 24px rgba(22, 34, 78, 0.08);
  --shadow-hover: 0 8px 40px rgba(22, 34, 78, 0.15);
  --gradient-primary: linear-gradient(135deg, #16224E 0%, #27356E 50%, #4F7BF7 100%);
  --gradient-accent: linear-gradient(135deg, #14C7B8 0%, #4FE3D5 100%);
  --gradient-hero: linear-gradient(135deg, #16224E 0%, #1D2A63 40%, #2A46A0 70%, #4F7BF7 100%);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Diagonal Watermark --- */
body::after {
  content: 'ConceptGood Consultants';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-family: 'Poppins', sans-serif;
  font-size: 6rem;
  font-weight: 800;
  color: rgba(22, 34, 78, 0.04);
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  letter-spacing: 0.05em;
  user-select: none;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
}

a {
  text-decoration: none;
  color: var(--secondary);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-light);
}

img {
  max-width: 100%;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(22, 34, 78, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(79, 123, 247, 0.15);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.nav-brand:hover { color: var(--white); }

.nav-brand .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-brand .logo-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-hamburger:hover { background: rgba(79, 123, 247, 0.15); }

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
}
.mobile-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Desktop Nav Links --- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
}

.nav-links .nav-top-link {
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: var(--transition);
}

.nav-links .nav-top-link:hover,
.nav-links .nav-top-link.active {
  color: var(--white);
  background: rgba(79, 123, 247, 0.2);
}

.nav-links .nav-top-link.active {
  background: var(--secondary);
  color: var(--white);
}

/* --- Nav Dropdown (desktop) --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  color: rgba(255,255,255,0.7);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  line-height: 1.5;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active {
  color: var(--white);
  background: rgba(79, 123, 247, 0.2);
}

.nav-dropdown-trigger.active {
  background: var(--secondary);
  color: var(--white);
}

.dropdown-arrow {
  font-size: 0.55rem;
  transition: transform 0.25s;
  display: inline-block;
}

.nav-dropdown.is-open .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  background: rgba(22, 34, 78, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(79, 123, 247, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  z-index: 1001;
}

/* Show on click (is-open) */
.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
  animation: navDropIn 0.18s ease-out;
}

@keyframes navDropIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-dropdown-menu a {
  display: block;
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-dropdown-menu a:hover {
  color: var(--white);
  background: rgba(79, 123, 247, 0.18);
}

.nav-dropdown-menu a.active {
  background: var(--secondary);
  color: var(--white);
}

/* ---- Responsive / Mobile Nav ---- */
@media (max-width: 960px) {
  .nav {
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    padding: 0 1.25rem;
  }

  .nav-brand { padding: 0.9rem 0; }
  .nav-brand .brand-text { font-size: 0.95rem; }

  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    padding: 0.5rem 0 1rem;
    border-top: 1px solid rgba(79, 123, 247, 0.12);
  }

  .mobile-open .nav-links { display: flex; }

  .nav-links .nav-top-link {
    padding: 0.65rem 1rem;
    border-radius: 6px;
    font-size: 0.88rem;
  }

  /* Mobile dropdown overrides */
  .nav-dropdown { display: flex; flex-direction: column; }

  .nav-dropdown-trigger {
    padding: 0.65rem 1rem;
    border-radius: 6px;
    font-size: 0.88rem;
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    min-width: 0;
    width: 100%;
    background: rgba(79, 123, 247, 0.06);
    border: none;
    box-shadow: none;
    padding: 0.25rem 0 0.25rem 0.75rem;
    margin-top: 0;
    border-radius: 0 0 6px 6px;
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    animation: none;
  }

  .nav-dropdown-menu a {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
  }
}

/* --- Page Container --- */
.page {
  margin-top: 64px;
  min-height: calc(100vh - 64px);
}

/* --- Hero Section --- */
.hero {
  background: var(--gradient-hero);
  color: var(--white);
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 123, 247, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(20, 199, 184, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.hero .stage-badge {
  display: inline-block;
  background: var(--gradient-accent);
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Content Area --- */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.content-narrow {
  max-width: 900px;
}

/* --- Section --- */
.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--secondary);
  display: inline-block;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-style: italic;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.card-icon.blue { background: rgba(79, 123, 247, 0.12); color: var(--secondary); }
.card-icon.gold { background: rgba(20, 199, 184, 0.12); color: var(--accent); }
.card-icon.green { background: rgba(39, 174, 96, 0.12); color: var(--success); }
.card-icon.red { background: rgba(231, 76, 60, 0.12); color: var(--danger); }
.card-icon.dark { background: rgba(22, 34, 78, 0.1); color: var(--primary); }

.card h3 {
  font-size: 1.1rem;
  margin: 0;
}

.card p, .card li {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.65;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card ul li {
  padding: 0.35rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
}

/* --- Checklist --- */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  padding: 0.6rem 0;
  padding-left: 2rem;
  position: relative;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 16px;
  height: 16px;
  border: 2px solid var(--secondary);
  border-radius: 4px;
}

.checklist li.done::before {
  background: var(--secondary);
  border-color: var(--secondary);
}

.checklist li.done::after {
  content: '\2713';
  position: absolute;
  left: 3px;
  top: 0.55rem;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.checklist .indent {
  padding-left: 3.5rem;
  border-bottom: none;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  color: var(--text-light);
  font-size: 0.88rem;
}

.checklist .indent::before {
  left: 1.5rem;
  width: 12px;
  height: 12px;
  border-color: var(--border);
}

/* --- Diagram Container --- */
.diagram-container {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.diagram-container h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
}

.diagram-container svg {
  display: block;
  margin: 0 auto;
}

/* --- Table --- */
.styled-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

.styled-table thead {
  background: var(--primary);
  color: var(--white);
}

.styled-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.styled-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.styled-table tbody tr:last-child td {
  border-bottom: none;
}

.styled-table tbody tr:hover td {
  background: rgba(79, 123, 247, 0.04);
}

/* --- Code Block --- */
.code-block {
  background: var(--dark);
  color: #ABB2BF;
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
  margin: 1rem 0;
}

.code-block .comment { color: #5C6370; }
.code-block .keyword { color: #C678DD; }
.code-block .string { color: #98C379; }
.code-block .folder { color: #61AFEF; }
.code-block .file { color: #E5C07B; }
.code-block .arrow { color: #4F7BF7; }

/* --- Flow Steps --- */
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 2rem 0;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem 0;
  position: relative;
}

.flow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 22px;
  top: 60px;
  bottom: -5px;
  width: 2px;
  background: var(--border);
}

.flow-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.flow-content h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.flow-content p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* --- Tag / Badge --- */
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0.15rem;
}

.tag.blue { background: rgba(79, 123, 247, 0.12); color: var(--secondary); }
.tag.gold { background: rgba(20, 199, 184, 0.12); color: var(--accent); }
.tag.green { background: rgba(39, 174, 96, 0.12); color: var(--success); }
.tag.dark { background: rgba(22, 34, 78, 0.1); color: var(--primary); }

/* --- Callout --- */
.callout {
  border-left: 4px solid var(--secondary);
  background: rgba(79, 123, 247, 0.05);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

.callout.warning {
  border-left-color: var(--accent);
  background: rgba(20, 199, 184, 0.06);
}

.callout.success {
  border-left-color: var(--success);
  background: rgba(39, 174, 96, 0.05);
}

.callout h4 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.callout p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.pagination a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.pagination .prev {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
}

.pagination .prev:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.pagination .next {
  background: var(--secondary);
  color: var(--white);
}

.pagination .next:hover {
  background: var(--secondary-light);
}

.pagination .page-indicator {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

.footer strong {
  color: var(--primary);
}

/* --- Metrics Grid --- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.metric-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.metric-value {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* --- Wave / Timeline Bar --- */
.timeline-bar {
  display: flex;
  gap: 0;
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.timeline-segment {
  padding: 1.25rem 1rem;
  color: var(--white);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  position: relative;
}

.timeline-segment .week {
  font-size: 0.7rem;
  opacity: 0.8;
  font-weight: 400;
}

.timeline-segment .label {
  display: block;
  margin-top: 0.25rem;
}

/* --- Agent Card --- */
.agent-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  overflow: hidden;
}

.agent-card-header {
  background: var(--primary);
  color: var(--white);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.agent-card-header h3 {
  color: var(--white);
  font-size: 1rem;
  margin: 0;
}

.agent-card-body {
  padding: 1.5rem;
}

.agent-card-body .field {
  margin-bottom: 0.75rem;
}

.agent-card-body .field-label {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.agent-card-body .field-value {
  font-size: 0.9rem;
}

/* --- Motto Banner --- */
.motto-banner {
  background: var(--dark);
  text-align: center;
  padding: 1.75rem 2rem;
  border-bottom: 3px solid var(--accent);
}

.motto-banner .motto {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  font-style: italic;
}

.motto-banner .motto-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.3rem;
}

/* --- Score Card --- */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.score-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--secondary);
}

.score-card.gold { border-top-color: var(--accent); }
.score-card.green { border-top-color: var(--success); }
.score-card.red { border-top-color: var(--danger); }

.score-card .score-value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.score-card .score-label {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

/* --- Risk Badge --- */
.risk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.risk-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.risk-badge.high { background: rgba(231,76,60,0.1); color: var(--danger); border: 1px solid rgba(231,76,60,0.3); }
.risk-badge.medium { background: rgba(20,199,184,0.1); color: var(--accent); border: 1px solid rgba(20,199,184,0.3); }
.risk-badge.low { background: rgba(39,174,96,0.1); color: var(--success); border: 1px solid rgba(39,174,96,0.3); }

/* --- Rubric Table --- */
.rubric-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
}

.rubric-table th {
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
}

.rubric-table th:first-child {
  text-align: left;
}

.rubric-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  text-align: center;
}

.rubric-table td:first-child {
  text-align: left;
  font-weight: 600;
}

.rubric-table tbody tr:hover td {
  background: rgba(79, 123, 247, 0.04);
}

/* --- Collapsible Sections --- */
.collapsible-wrapper {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 1px 8px rgba(22, 34, 78, 0.04);
  transition: var(--transition);
}

.collapsible-wrapper:hover {
  box-shadow: 0 2px 16px rgba(22, 34, 78, 0.08);
}

.collapsible-wrapper.is-open {
  border-color: rgba(79, 123, 247, 0.3);
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  cursor: pointer;
  user-select: none;
  background: var(--light);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
  gap: 1rem;
}

.collapsible-header:hover {
  background: rgba(79, 123, 247, 0.04);
}

.collapsible-wrapper.is-open > .collapsible-header {
  background: rgba(79, 123, 247, 0.06);
  border-bottom-color: var(--border);
}

.collapsible-header .collapsible-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
  margin: 0;
  line-height: 1.3;
  flex: 1;
}

.collapsible-header .collapsible-subtitle {
  font-size: 0.82rem;
  color: var(--text-light);
  font-style: italic;
  margin: 0;
  margin-top: 0.2rem;
}

.collapsible-header .collapse-chevron {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1;
}

.collapsible-wrapper.is-open > .collapsible-header .collapse-chevron {
  transform: rotate(45deg);
  background: var(--secondary);
}

.collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
  padding: 0 1.5rem;
}

.collapsible-wrapper.is-open > .collapsible-body {
  max-height: 8000px;
  padding: 1.5rem;
  overflow: visible;
}

/* When inside collapsible, reset section margins */
.collapsible-body .section {
  margin-bottom: 0;
  border-bottom: none;
}

.collapsible-body .section > .section-title {
  display: none; /* title is already in the collapsible header */
}

.collapsible-body .section > .section-subtitle {
  display: none; /* subtitle is already in the collapsible header */
}

/* Hide duplicate h3 in standalone diagram containers used as title */
.collapsible-body > .diagram-container > h3:first-child {
  /* keep visible — diagram titles are useful inside */
}

/* Standalone elements (diagrams, agent cards outside sections) */
.collapsible-body > .diagram-container {
  margin: 1rem 0;
}

.collapsible-body > .card-grid {
  margin: 1rem 0;
}

/* Expand All / Collapse All toolbar */
.collapse-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 1rem;
  position: sticky;
  top: 64px;
  z-index: 50;
  background: var(--light);
  padding: 0.75rem 0;
}

.collapse-btn {
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.collapse-btn:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  background: rgba(79, 123, 247, 0.04);
}

/* Step counter badge on collapsible headers */
.collapsible-header .step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

/* --- Responsive (non-nav) --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero { padding: 3rem 1.5rem; }
  .content { padding: 2rem 1.25rem; }
  .card-grid { grid-template-columns: 1fr; }
  .timeline-bar { flex-direction: column; }
}

@media (max-width: 480px) {
  .nav-brand .brand-text { display: none; }
}

/* ============================================
   n.prime plan — additional components
   ============================================ */

code, .inline-code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.86em;
  background: rgba(79, 123, 247, 0.10);
  color: var(--primary);
  padding: 0.12em 0.42em;
  border-radius: 5px;
  border: 1px solid rgba(79, 123, 247, 0.18);
}

.callout.info {
  border-left-color: var(--secondary);
  background: rgba(79, 123, 247, 0.06);
}
.callout.danger {
  border-left-color: var(--danger);
  background: rgba(229, 72, 77, 0.06);
}

/* Agent fleet cards */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.fleet-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--secondary);
  transition: var(--transition);
}
.fleet-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.fleet-card.nerve-specific { border-left-color: var(--accent); }
.fleet-card.restricted     { border-left-color: var(--danger); }
.fleet-card-head {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem;
}
.fleet-num {
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  background: var(--primary); color: var(--white);
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.fleet-card.nerve-specific .fleet-num { background: var(--accent); color: var(--primary); }
.fleet-card.restricted .fleet-num     { background: var(--danger); }
.fleet-card h4 { font-size: 1.15rem; margin: 0; line-height: 1.3; }
.fleet-role {
  font-size: 0.85rem; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
  margin-bottom: 0.5rem;
}
.fleet-card p { font-size: 1rem; line-height: 1.6; color: var(--text-light); margin-bottom: 0.6rem; }
.fleet-io {
  font-size: 0.92rem; border-top: 1px dashed var(--border); padding-top: 0.6rem;
}
.fleet-io strong { color: var(--primary); }
.fleet-io div { margin-bottom: 0.2rem; }

/* Badges */
.badge-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.mini-badge {
  font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem;
  border-radius: 999px; letter-spacing: 0.03em;
  background: rgba(79,123,247,0.12); color: var(--secondary);
}
.mini-badge.accent { background: rgba(20,199,184,0.15); color: #0E9384; }
.mini-badge.danger { background: rgba(229,72,77,0.12);  color: var(--danger); }
.mini-badge.grey   { background: rgba(99,110,114,0.12);  color: var(--text-light); }
.mini-badge.green  { background: rgba(34,160,107,0.13);  color: var(--success); }

/* Before / after comparison */
.ba-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem; margin: 1.5rem 0;
}
.ba-col {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
}
.ba-col.before { border-top: 4px solid var(--danger); }
.ba-col.after  { border-top: 4px solid var(--success); }
.ba-col h4 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}
.ba-col.before h4 { color: var(--danger); }
.ba-col.after h4  { color: var(--success); }
.ba-col ul { padding-left: 1.1rem; }
.ba-col li { font-size: 0.87rem; margin-bottom: 0.5rem; color: var(--text); }

/* Question list */
.q-list { counter-reset: q; margin: 1.5rem 0; }
.q-item {
  background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 1.15rem 1.35rem;
  margin-bottom: 0.85rem; counter-increment: q;
}
.q-item h4 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.q-item h4::before {
  content: 'Q' counter(q) '  ';
  color: var(--accent); font-weight: 800;
}
.q-item p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.35rem; }
.q-assume {
  font-size: 0.8rem; padding: 0.5rem 0.75rem; border-radius: 6px;
  background: var(--light); border: 1px dashed var(--border);
}
.q-assume strong { color: var(--primary); }

/* Simple gantt */
.gantt { background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow);
  margin: 1.5rem 0; overflow-x: auto; }
.gantt-head { display: flex; padding-left: 190px; margin-bottom: 0.6rem; min-width: 570px; }
.gantt-head span { flex: 1; text-align: center; font-size: 0.66rem;
  color: var(--text-light); font-weight: 600; min-width: 0; }
.gantt-row { display: flex; align-items: center; margin-bottom: 0.45rem; }
.gantt-lbl { width: 190px; flex-shrink: 0; font-size: 0.8rem;
  font-weight: 600; color: var(--primary); padding-right: 1rem; }
.gantt-track { flex: 1; position: relative; height: 32px; min-width: 380px; }
.gantt-bar { position: absolute; height: 26px; top: 3px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 600; color: var(--white);
  white-space: nowrap; padding: 0 0.7rem; }

/* contrast fix: teal accent on light backgrounds needs a darker text tone */
.risk-badge.medium { color: #0E9384; }

/* ============================================
   Visual kit — diagrams without SVG
   ============================================ */

.viz {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow); margin: 1.5rem 0;
}
.viz-title {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 0.95rem;
  color: var(--primary); text-align: center; margin-bottom: 0.25rem;
}
.viz-sub {
  font-size: 0.78rem; color: var(--text-light); text-align: center;
  margin-bottom: 1.5rem;
}

/* --- Horizontal rail --- */
.rail { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.rail-step {
  flex: 1; min-width: 150px; position: relative;
  padding: 1rem 0.9rem; text-align: center;
  background: var(--light); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin: 0 0.9rem 0.75rem 0;
}
.rail-step:last-child { margin-right: 0; }
.rail-step::after {
  content: '›'; position: absolute; right: -0.72rem; top: 50%;
  transform: translateY(-50%); font-size: 1.5rem; color: var(--secondary);
  font-weight: 700; line-height: 1;
}
.rail-step:last-child::after { content: none; }
.rail-n {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 0.45rem;
  background: var(--secondary); color: var(--white);
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
}
.rail-step.gate { background: rgba(20,199,184,0.10); border-color: rgba(20,199,184,0.45); }
.rail-step.gate .rail-n { background: var(--accent); color: var(--primary); }
.rail-step.stop { background: rgba(229,72,77,0.08); border-color: rgba(229,72,77,0.40); }
.rail-step.stop .rail-n { background: var(--danger); }
.rail-t { font-weight: 700; font-size: 0.82rem; color: var(--primary); line-height: 1.3; }
.rail-d { font-size: 0.72rem; color: var(--text-light); margin-top: 0.25rem; line-height: 1.35; }

/* --- Layer stack --- */
.stack { display: flex; flex-direction: column; gap: 0.5rem; }
.layer {
  border-radius: var(--radius-sm); padding: 0.85rem 1.1rem;
  display: flex; align-items: center; gap: 0.9rem;
  border: 1px solid var(--border); background: var(--light);
}
.layer-tag {
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 0.68rem;
  padding: 0.22rem 0.6rem; border-radius: 5px; flex-shrink: 0;
  background: var(--primary); color: var(--white); letter-spacing: 0.04em;
}
.layer-body { flex: 1; }
.layer-t { font-weight: 700; font-size: 0.85rem; color: var(--primary); }
.layer-d { font-size: 0.76rem; color: var(--text-light); }
.layer.l1 { border-left: 5px solid var(--danger); }
.layer.l2 { border-left: 5px solid var(--secondary); }
.layer.l3 { border-left: 5px solid var(--accent); }
.layer.l4 { border-left: 5px solid var(--success); }
.layer.l5 { border-left: 5px solid var(--text-light); }
.layer.l1 .layer-tag { background: var(--danger); }
.layer.l2 .layer-tag { background: var(--secondary); }
.layer.l3 .layer-tag { background: var(--accent); color: var(--primary); }
.layer.l4 .layer-tag { background: var(--success); }
.layer.l5 .layer-tag { background: var(--text-light); }

/* --- Matrix grid --- */
.matrix { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.matrix th {
  background: var(--primary); color: var(--white); padding: 0.5rem 0.6rem;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.72rem;
  text-align: center; white-space: nowrap;
}
.matrix th:first-child { text-align: left; }
.matrix td {
  padding: 0.5rem 0.6rem; text-align: center;
  border-bottom: 1px solid var(--border); background: var(--white);
}
.matrix td:first-child { text-align: left; font-weight: 600; color: var(--primary); }
.dot {
  display: inline-block; width: 15px; height: 15px; border-radius: 50%;
  line-height: 15px; font-size: 0.62rem; color: #fff; font-weight: 700;
}
.dot.on   { background: var(--success); }
.dot.off  { background: var(--border); }
.dot.warn { background: var(--accent); color: var(--primary); }
.dot.bad  { background: var(--danger); }

/* --- Bars --- */
.bars { display: flex; flex-direction: column; gap: 0.7rem; }
.bar-row { display: flex; align-items: center; gap: 0.85rem; }
.bar-lbl { width: 210px; flex-shrink: 0; font-size: 0.8rem; font-weight: 600; color: var(--primary); }
.bar-track { flex: 1; height: 22px; background: var(--light); border-radius: 11px; overflow: hidden; min-width: 120px; }
.bar-fill {
  height: 100%; border-radius: 11px; display: flex; align-items: center;
  padding-left: 0.7rem; font-size: 0.68rem; font-weight: 700; color: var(--white);
  white-space: nowrap;
}
.bar-note { width: 130px; flex-shrink: 0; font-size: 0.72rem; color: var(--text-light); }

/* --- Heat map --- */
.heat { display: grid; gap: 4px; }
.heat-cell {
  padding: 0.6rem 0.5rem; border-radius: 6px; font-size: 0.72rem;
  font-weight: 600; text-align: center; line-height: 1.25;
}
.heat-cell.hi  { background: rgba(229,72,77,0.16);  color: #B4262A; }
.heat-cell.med { background: rgba(20,199,184,0.18); color: #0B7A6E; }
.heat-cell.lo  { background: rgba(34,160,107,0.14); color: #17754D; }
.heat-cell.hdr { background: var(--primary); color: var(--white); font-family:'Poppins',sans-serif; }
.heat-cell.axis { background: var(--light); color: var(--text-light); }

/* --- Split compare with arrow --- */
.split { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.split-arrow {
  font-size: 1.8rem; color: var(--secondary); font-weight: 700; text-align: center;
}
.split-box {
  border-radius: var(--radius-sm); padding: 1.1rem 1.2rem;
  border: 1px solid var(--border); background: var(--white);
}
.split-box.old { border-top: 4px solid var(--danger); }
.split-box.new { border-top: 4px solid var(--success); }
.split-box h5 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 0.6rem; font-family: 'Poppins', sans-serif;
}
.split-box.old h5 { color: var(--danger); }
.split-box.new h5 { color: var(--success); }
.split-box ul { padding-left: 1rem; }
.split-box li { font-size: 0.8rem; margin-bottom: 0.35rem; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split-arrow { transform: rotate(90deg); }
}

/* --- KPI strip --- */
.kpi-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 1rem; margin: 1.5rem 0;
}
.kpi {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1rem; text-align: center;
  border-top: 4px solid var(--secondary); box-shadow: var(--shadow);
}
.kpi.a { border-top-color: var(--accent); }
.kpi.r { border-top-color: var(--danger); }
.kpi.g { border-top-color: var(--success); }
.kpi-v {
  font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 800;
  color: var(--primary); line-height: 1.1;
}
.kpi-l { font-size: 0.74rem; color: var(--text-light); margin-top: 0.3rem; line-height: 1.3; }

/* --- Legend --- */
.legend { display: flex; flex-wrap: wrap; gap: 1.1rem; justify-content: center; margin-top: 1.1rem; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; color: var(--text-light); }
.legend-dot { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }

/* viz containers must not double-frame or force page scroll */
.viz { overflow-x: auto; }
.viz > .gantt {
  background: none; border: 0; box-shadow: none;
  padding: 0; margin: 0;
}
