/* =========================================
   CBO Implementation Guide — guide.css
   Extends ../style.css
   ========================================= */

/* --- Design Tokens --- */
:root {
  --guide-text: #1A1A2E;
  --guide-gold: #D4A841;
  --guide-surface: #F8F6F3;
  --guide-white: #FFFFFF;
  --guide-border: rgba(26, 26, 46, 0.08);
  --guide-info: #0B5394;
  --guide-warning: #B45309;
  --guide-tip: #166534;
  --guide-regulatory: #D4A841;
  --guide-content-max: 720px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-8: 64px;
}

/* --- Inter for guide body text --- */
.guide-layout,
.guide-hub {
  font-family: 'Inter', 'Poppins', sans-serif;
}

.guide-layout h1,
.guide-layout h2,
.guide-layout h3,
.guide-layout h4,
.guide-hub h1,
.guide-hub h2,
.guide-hub h3 {
  font-family: 'Poppins', sans-serif;
}

/* =========================================
   Hub Page
   ========================================= */

.guide-hub {
  padding: 120px 0 80px;
}

.guide-hub-header {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--space-4);
}

.guide-hub-header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-3);
}

.guide-hub-subtitle {
  font-size: 1.1rem;
  color: var(--guide-text);
  opacity: 0.7;
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.guide-hub-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.guide-hub-actions .btn {
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.btn-outline {
  background: transparent;
  color: var(--guide-text);
  border: 1.5px solid var(--guide-border);
}

.btn-outline:hover {
  border-color: var(--guide-gold);
  color: var(--guide-gold);
}

/* Hub Section Cards */
.guide-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.guide-hub-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-4);
  border: 1px solid var(--guide-border);
  border-radius: 12px;
  background: var(--guide-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.guide-hub-card:hover {
  border-color: var(--guide-gold);
  box-shadow: 0 4px 20px rgba(212, 168, 65, 0.12);
  transform: translateY(-2px);
}

.guide-hub-card-number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--guide-gold);
  margin-bottom: var(--space-2);
}

.guide-hub-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.guide-hub-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  opacity: 0.7;
  flex: 1;
}

.guide-hub-card-arrow {
  margin-top: var(--space-3);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--guide-gold);
}

/* =========================================
   Section Page — 3-Column Layout
   ========================================= */

.guide-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 72px; /* header height */
  min-height: 100vh;
}

/* --- Left Sidebar --- */
.guide-sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  padding: var(--space-6) var(--space-4) var(--space-6) var(--space-4);
  border-right: 1px solid var(--guide-border);
  scrollbar-width: thin;
}

.guide-sidebar-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--guide-gold);
  margin-bottom: var(--space-3);
}

.guide-sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-sidebar-nav li {
  margin-bottom: 2px;
}

.guide-sidebar-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--guide-text);
  opacity: 0.6;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
}

.guide-sidebar-nav a:hover {
  opacity: 0.85;
  background: rgba(26, 26, 46, 0.03);
}

.guide-sidebar-nav a.active {
  opacity: 1;
  font-weight: 600;
  color: var(--guide-text);
  border-left-color: var(--guide-gold);
  background: rgba(212, 168, 65, 0.06);
}

/* --- Main Content --- */
.guide-content {
  padding: var(--space-6) var(--space-6);
  max-width: calc(var(--guide-content-max) + var(--space-6) * 2);
}

.guide-content h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-3);
}

.guide-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  scroll-margin-top: 96px;
}

.guide-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  scroll-margin-top: 96px;
}

.guide-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  scroll-margin-top: 96px;
}

.guide-content p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--space-3);
  opacity: 0.88;
}

.guide-content ul,
.guide-content ol {
  margin: 0 0 var(--space-3) var(--space-4);
  font-size: 0.95rem;
  line-height: 1.8;
  opacity: 0.88;
}

.guide-content li {
  margin-bottom: var(--space-2);
}

.guide-content strong {
  font-weight: 600;
}

.guide-content hr {
  border: none;
  border-top: 1px solid var(--guide-border);
  margin: var(--space-6) 0;
}

/* --- Right Sidebar (On-page TOC) --- */
.guide-toc {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  padding: var(--space-6) var(--space-4);
  border-left: 1px solid var(--guide-border);
  scrollbar-width: thin;
}

.guide-toc-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--guide-text);
  opacity: 0.4;
  margin-bottom: var(--space-3);
}

.guide-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-toc-list li {
  margin-bottom: 1px;
}

.guide-toc-list a {
  display: block;
  padding: var(--space-1) 0;
  font-size: 0.75rem;
  color: var(--guide-text);
  opacity: 0.45;
  text-decoration: none;
  line-height: 1.4;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.guide-toc-list a:hover {
  opacity: 0.75;
}

.guide-toc-list a.active {
  opacity: 1;
  color: var(--guide-gold);
  font-weight: 500;
}

.guide-toc-list .toc-h3 {
  padding-left: var(--space-3);
}

/* --- Section Navigation (prev/next) --- */
.guide-page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--guide-border);
}

.guide-page-nav a {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--guide-border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

.guide-page-nav a:hover {
  border-color: var(--guide-gold);
}

.guide-page-nav .nav-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.4;
  margin-bottom: var(--space-1);
}

.guide-page-nav .nav-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
}

.guide-page-nav .nav-next {
  text-align: right;
  grid-column: 2;
}

.guide-page-nav .nav-prev {
  grid-column: 1;
}

/* =========================================
   Component 1: Callout Box
   ========================================= */

.callout {
  padding: var(--space-4);
  border-radius: 0 8px 8px 0;
  border-left: 4px solid;
  margin: var(--space-4) 0;
  font-size: 0.9rem;
  line-height: 1.7;
}

.callout-heading {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.callout p {
  margin-bottom: var(--space-2);
  opacity: 0.88;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-info {
  border-left-color: var(--guide-info);
  background: rgba(11, 83, 148, 0.05);
}

.callout-info .callout-heading {
  color: var(--guide-info);
}

.callout-warning {
  border-left-color: var(--guide-warning);
  background: rgba(180, 83, 9, 0.05);
}

.callout-warning .callout-heading {
  color: var(--guide-warning);
}

.callout-tip {
  border-left-color: var(--guide-tip);
  background: rgba(22, 101, 52, 0.05);
}

.callout-tip .callout-heading {
  color: var(--guide-tip);
}

.callout-regulatory {
  border-left-color: var(--guide-regulatory);
  background: rgba(212, 168, 65, 0.07);
}

.callout-regulatory .callout-heading {
  color: #9A7D2E;
}

/* Key Takeaway — used at top of each section */
.callout-takeaway {
  border-left-color: var(--guide-gold);
  background: rgba(212, 168, 65, 0.07);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: var(--space-5);
}

.callout-takeaway .callout-heading {
  color: #9A7D2E;
}

/* =========================================
   Component 2: Card Grid
   ========================================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

.card {
  padding: var(--space-4);
  border: 1px solid var(--guide-border);
  border-radius: 10px;
  background: var(--guide-white);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 2px 12px rgba(26, 26, 46, 0.06);
}

.card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--guide-gold);
  color: var(--guide-white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.card h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
  margin-top: 0;
}

.card p {
  font-size: 0.87rem;
  line-height: 1.65;
  opacity: 0.78;
  margin-bottom: var(--space-2);
}

.card p:last-child {
  margin-bottom: 0;
}

.card ul {
  margin: var(--space-2) 0 0 var(--space-3);
  font-size: 0.85rem;
  line-height: 1.6;
  opacity: 0.78;
}

.card-footer {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--guide-border);
  font-size: 0.82rem;
  opacity: 0.7;
}

.card-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 100px;
  background: rgba(212, 168, 65, 0.12);
  color: #9A7D2E;
  margin-bottom: var(--space-2);
}

/* Gold accent card variant */
.card-accent {
  border-color: var(--guide-gold);
  border-width: 1.5px;
}

/* =========================================
   Component 3: Process Steps
   ========================================= */

.process-steps {
  margin: var(--space-4) 0;
  padding-left: 0;
  list-style: none;
  position: relative;
}

.process-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  position: relative;
}

/* Connecting line */
.process-step::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--guide-border);
}

.process-step:last-child::before {
  display: none;
}

.process-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--guide-text);
  color: var(--guide-white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
}

.process-step-content h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin: var(--space-1) 0 var(--space-2);
}

.process-step-content p {
  font-size: 0.88rem;
  line-height: 1.65;
  opacity: 0.78;
  margin-bottom: var(--space-2);
}

/* =========================================
   Component 4: Timeline
   ========================================= */

.timeline {
  margin: var(--space-4) 0;
  border-left: 3px solid var(--guide-gold);
  padding-left: 0;
}

.timeline-item {
  position: relative;
  padding: var(--space-3) var(--space-4);
  padding-left: var(--space-5);
  margin-bottom: 2px;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  transition: background 0.15s ease;
}

.timeline-item:hover {
  background: rgba(26, 26, 46, 0.02);
}

/* Dot on the timeline */
.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 22px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--guide-white);
  border: 3px solid var(--guide-gold);
}

.timeline-time {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--guide-gold);
  margin-bottom: var(--space-1);
}

.timeline-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.timeline-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  opacity: 0.75;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-bottom: 0;
}

.timeline-item.open .timeline-desc {
  max-height: 500px;
  opacity: 0.75;
  margin-bottom: var(--space-2);
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.timeline-item.open .timeline-tags {
  max-height: 100px;
  margin-top: var(--space-2);
}

.timeline-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.68rem;
  font-weight: 500;
  border-radius: 100px;
  background: var(--guide-surface);
  color: var(--guide-text);
  opacity: 0.65;
}

/* Break item (non-clickable) */
.timeline-item.timeline-break {
  cursor: default;
  opacity: 0.5;
}

.timeline-item.timeline-break::before {
  border-color: var(--guide-border);
  background: var(--guide-surface);
}

/* =========================================
   Component 5: Accordion
   ========================================= */

.accordion {
  margin: var(--space-4) 0;
  border: 1px solid var(--guide-border);
  border-radius: 10px;
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--guide-border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--guide-text);
  text-align: left;
  transition: background 0.15s ease;
}

.accordion-header:hover {
  background: rgba(26, 26, 46, 0.02);
}

.accordion-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  opacity: 0.4;
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-body-inner {
  padding: 0 var(--space-4) var(--space-4);
  font-size: 0.88rem;
  line-height: 1.7;
  opacity: 0.82;
}

.accordion-body-inner p {
  margin-bottom: var(--space-2);
}

.accordion-body-inner ul {
  margin: var(--space-2) 0 var(--space-2) var(--space-4);
}

/* =========================================
   Component 6: Tabbed Panel
   ========================================= */

.tabs {
  margin: var(--space-4) 0;
}

.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--guide-border);
  margin-bottom: var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: var(--space-2) var(--space-4);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--guide-text);
  opacity: 0.5;
  white-space: nowrap;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.tab-btn:hover {
  opacity: 0.75;
}

.tab-btn.active {
  opacity: 1;
  border-bottom-color: var(--guide-gold);
  color: var(--guide-text);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* =========================================
   Component 7: Interactive Assessment
   ========================================= */

.assessment {
  margin: var(--space-4) 0;
}

.assessment-dimension {
  margin-bottom: var(--space-6);
}

.assessment-dimension-header {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--guide-border);
}

.assessment-question {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--guide-border);
}

.assessment-question:last-child {
  border-bottom: none;
}

.assessment-question-text {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.assessment-question-id {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--guide-gold);
  margin-right: var(--space-2);
}

.assessment-options {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.assessment-option {
  position: relative;
}

.assessment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.assessment-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--guide-border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--guide-text);
  opacity: 0.5;
  transition: all 0.15s ease;
}

.assessment-option label:hover {
  border-color: var(--guide-gold);
  opacity: 0.8;
}

.assessment-option input[type="radio"]:checked + label {
  background: var(--guide-gold);
  border-color: var(--guide-gold);
  color: var(--guide-white);
  opacity: 1;
}

.assessment-option input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--guide-gold);
  outline-offset: 2px;
}

/* Score Scale Legend */
.assessment-legend {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: 0.75rem;
  opacity: 0.55;
  margin-bottom: var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--guide-surface);
  border-radius: 8px;
}

.assessment-legend span {
  white-space: nowrap;
}

/* Results Panel */
.assessment-results {
  display: none;
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--guide-surface);
  border-radius: 12px;
}

.assessment-results.visible {
  display: block;
}

.assessment-results h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

/* Bar Chart */
.assessment-chart {
  margin: var(--space-4) 0;
}

.assessment-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 40px;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-3);
}

.assessment-bar-label {
  font-size: 0.82rem;
  font-weight: 500;
  text-align: right;
}

.assessment-bar-track {
  height: 28px;
  background: rgba(26, 26, 46, 0.06);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.assessment-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 0;
}

.assessment-bar-fill.score-high {
  background: var(--guide-tip);
}

.assessment-bar-fill.score-mid {
  background: var(--guide-gold);
}

.assessment-bar-fill.score-low {
  background: var(--guide-warning);
}

.assessment-bar-fill.score-critical {
  background: #dc2626;
}

.assessment-bar-value {
  font-size: 0.85rem;
  font-weight: 700;
}

/* Interpretation cards */
.assessment-interpretations {
  margin-top: var(--space-4);
}

.assessment-interpretation {
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid;
  border-radius: 0 8px 8px 0;
  margin-bottom: var(--space-3);
  font-size: 0.87rem;
  line-height: 1.6;
}

.assessment-interpretation h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: var(--space-1);
}

.assessment-interpretation.level-high {
  border-left-color: var(--guide-tip);
  background: rgba(22, 101, 52, 0.04);
}

.assessment-interpretation.level-mid {
  border-left-color: var(--guide-gold);
  background: rgba(212, 168, 65, 0.05);
}

.assessment-interpretation.level-low {
  border-left-color: var(--guide-warning);
  background: rgba(180, 83, 9, 0.05);
}

.assessment-interpretation.level-critical {
  border-left-color: #dc2626;
  background: rgba(220, 38, 38, 0.04);
}

/* Calculate button */
.assessment-calculate {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 28px;
  background: var(--guide-text);
  color: var(--guide-white);
  border: none;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.assessment-calculate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 26, 46, 0.15);
}

/* =========================================
   Component 8: Budget Breakdown
   ========================================= */

.budget {
  margin: var(--space-4) 0;
}

.budget-group {
  margin-bottom: var(--space-4);
}

.budget-group-header {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--guide-text);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--guide-border);
  margin-bottom: var(--space-2);
}

.budget-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(26, 26, 46, 0.04);
  font-size: 0.88rem;
}

.budget-item:last-child {
  border-bottom: none;
}

.budget-item-name {
  flex: 1;
  opacity: 0.78;
}

.budget-item-cost {
  font-weight: 600;
  white-space: nowrap;
  margin-left: var(--space-4);
}

.budget-item-note {
  font-size: 0.78rem;
  opacity: 0.5;
  margin-left: var(--space-2);
}

/* =========================================
   Component 9: Metric Card
   ========================================= */

.metric-card {
  display: inline-flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-5);
  border: 1.5px solid var(--guide-gold);
  border-radius: 12px;
  background: rgba(212, 168, 65, 0.04);
  margin: var(--space-3) 0;
}

.metric-value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--guide-text);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.55;
  margin-top: var(--space-1);
}

.metric-note {
  font-size: 0.75rem;
  opacity: 0.45;
  margin-top: var(--space-1);
}

.metric-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin: var(--space-4) 0;
}

/* =========================================
   Component 10: Key Term Tooltip
   ========================================= */

.key-term {
  position: relative;
  border-bottom: 1.5px dotted var(--guide-gold);
  cursor: help;
}

.key-term-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 300px;
  padding: var(--space-2) var(--space-3);
  background: var(--guide-text);
  color: var(--guide-white);
  font-size: 0.78rem;
  line-height: 1.5;
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 100;
  pointer-events: none;
}

.key-term-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--guide-text);
}

.key-term:hover .key-term-tip,
.key-term.tip-visible .key-term-tip {
  opacity: 1;
  visibility: visible;
}

/* =========================================
   Partnership Level Cards (Section 5)
   ========================================= */

.partnership-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.partnership-card {
  padding: var(--space-4);
  border-radius: 10px;
  border: 1.5px solid var(--guide-border);
}

.partnership-card.level-low {
  background: var(--guide-white);
}

.partnership-card.level-medium {
  background: var(--guide-surface);
  border-color: rgba(26, 26, 46, 0.12);
}

.partnership-card.level-high {
  background: rgba(212, 168, 65, 0.04);
  border-color: var(--guide-gold);
  border-width: 2px;
}

.partnership-card h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.partnership-card p {
  font-size: 0.88rem;
  opacity: 0.78;
  line-height: 1.65;
}

/* =========================================
   Day Cards (Section 4 overview)
   ========================================= */

.day-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

.day-card {
  padding: var(--space-4);
  border-radius: 10px;
  border: 1.5px solid var(--guide-border);
}

.day-card:nth-child(1) {
  background: var(--guide-white);
}

.day-card:nth-child(2) {
  background: var(--guide-surface);
}

.day-card:nth-child(3) {
  background: rgba(212, 168, 65, 0.05);
  border-color: var(--guide-gold);
  border-width: 2px;
}

.day-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--guide-gold);
  margin-bottom: var(--space-2);
}

.day-card h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.day-card p {
  font-size: 0.82rem;
  opacity: 0.68;
  line-height: 1.55;
}

.day-card-meta {
  margin-top: var(--space-3);
  display: flex;
  gap: var(--space-3);
  font-size: 0.72rem;
  opacity: 0.5;
}

/* =========================================
   Sample Script / Blockquote
   ========================================= */

.sample-script {
  padding: var(--space-4);
  background: var(--guide-surface);
  border-radius: 8px;
  margin: var(--space-3) 0;
  font-size: 0.87rem;
  line-height: 1.7;
  opacity: 0.82;
  font-style: italic;
}

.sample-script strong {
  font-style: normal;
}

/* =========================================
   Mobile Sidebar Dropdown
   ========================================= */

.guide-mobile-nav {
  display: none;
  padding: var(--space-3) var(--space-4);
  background: var(--guide-white);
  border-bottom: 1px solid var(--guide-border);
  position: sticky;
  top: 72px;
  z-index: 50;
}

.guide-mobile-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--guide-surface);
  border: 1px solid var(--guide-border);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--guide-text);
}

.guide-mobile-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: var(--space-4);
  right: var(--space-4);
  background: var(--guide-white);
  border: 1px solid var(--guide-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(26, 26, 46, 0.1);
  padding: var(--space-2) 0;
  z-index: 51;
}

.guide-mobile-nav-dropdown.open {
  display: block;
}

.guide-mobile-nav-dropdown a {
  display: block;
  padding: var(--space-2) var(--space-4);
  font-size: 0.85rem;
  color: var(--guide-text);
  opacity: 0.7;
  text-decoration: none;
  transition: background 0.1s ease;
}

.guide-mobile-nav-dropdown a:hover {
  background: var(--guide-surface);
}

.guide-mobile-nav-dropdown a.active {
  opacity: 1;
  font-weight: 600;
  color: var(--guide-gold);
}

/* Back to top button */
.back-to-top {
  display: none;
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--guide-text);
  color: var(--guide-white);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(26, 26, 46, 0.2);
  z-index: 100;
  transition: transform 0.15s ease;
  font-size: 1.1rem;
}

.back-to-top.visible {
  display: flex;
}

.back-to-top:hover {
  transform: translateY(-2px);
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 1080px) {
  .guide-toc {
    display: none;
  }

  .guide-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .guide-sidebar {
    display: none;
  }

  .guide-mobile-nav {
    display: block;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-content {
    padding: var(--space-4) var(--space-4);
  }

  .guide-content h1 {
    font-size: 1.6rem;
  }

  .guide-content h2 {
    font-size: 1.25rem;
  }

  .guide-hub-header h1 {
    font-size: 1.7rem;
  }

  .guide-hub-grid {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .day-cards {
    grid-template-columns: 1fr;
  }

  .assessment-bar-row {
    grid-template-columns: 100px 1fr 36px;
  }

  .assessment-bar-label {
    font-size: 0.75rem;
    text-align: left;
  }

  .guide-page-nav {
    grid-template-columns: 1fr;
  }

  .guide-page-nav .nav-next {
    grid-column: 1;
    text-align: left;
  }

  /* Tabs → stacked on mobile */
  .tab-bar {
    flex-direction: column;
    border-bottom: none;
    gap: 2px;
  }

  .tab-btn {
    border-bottom: none;
    border-left: 2px solid transparent;
    text-align: left;
    margin-bottom: 0;
    padding: var(--space-2) var(--space-3);
  }

  .tab-btn.active {
    border-left-color: var(--guide-gold);
    border-bottom-color: transparent;
    background: rgba(212, 168, 65, 0.06);
  }
}

/* =========================================
   Print Stylesheet
   ========================================= */

@media print {
  /* Hide interactive/nav elements */
  .header,
  .footer,
  .guide-sidebar,
  .guide-toc,
  .guide-mobile-nav,
  .guide-page-nav,
  .back-to-top,
  .assessment-calculate,
  .guide-hub-actions {
    display: none !important;
  }

  /* Reset layout */
  .guide-layout {
    display: block;
    padding-top: 0;
  }

  .guide-content {
    max-width: 100%;
    padding: 0;
  }

  /* Typography for print */
  body {
    font-size: 11pt;
    color: #000;
  }

  .guide-content h1 { font-size: 20pt; }
  .guide-content h2 {
    font-size: 16pt;
    page-break-after: avoid;
    break-after: avoid;
  }
  .guide-content h3 {
    font-size: 13pt;
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Page breaks */
  .guide-content h2 {
    page-break-before: always;
    break-before: page;
  }

  .guide-content h2:first-of-type {
    page-break-before: avoid;
    break-before: avoid;
  }

  /* Expand all accordions */
  .accordion-body {
    max-height: none !important;
    overflow: visible !important;
  }

  .accordion-chevron {
    display: none;
  }

  /* Show all tab panels */
  .tab-panel {
    display: block !important;
  }

  .tab-bar {
    display: none;
  }

  .tab-panel::before {
    content: attr(data-tab-title);
    display: block;
    font-weight: 700;
    font-size: 12pt;
    margin-bottom: 8pt;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4pt;
  }

  /* Expand all timeline items */
  .timeline-desc,
  .timeline-tags {
    max-height: none !important;
    overflow: visible !important;
    opacity: 0.75 !important;
  }

  /* Assessment → static */
  .assessment-option label {
    border: 1px solid #999;
    width: 24px;
    height: 24px;
  }

  .assessment-results {
    display: none !important;
  }

  /* Cards, callouts — ensure they don't break across pages */
  .card,
  .callout,
  .timeline-item,
  .process-step {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .assessment-dimension + .assessment-dimension {
    page-break-before: always;
    break-before: page;
  }

  /* Margins */
  @page {
    margin: 1in;
  }

  /* Links — show URL */
  .guide-content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    opacity: 0.6;
  }
}
