/* ==========================================================================
   POHSA Terms & Conditions Design System
   Seed Capital Venture SA
   ========================================================================== */

:root {
  /* Brand Colors */
  --po-primary: #34495E;
  --po-secondary: #16A085;
  --po-secondary-hover: #12826c;
  --po-accent: #029ea5;
  --po-success: #10B981;
  --po-warning: #D97706;
  --po-warning-bg: #FFFBEB;
  --po-warning-border: #FDE68A;
  --po-danger: #EF4444;
  --po-danger-bg: #FEF2F2;
  --po-danger-border: #FECACA;

  /* Theme Canvas */
  --bg-page: #F4F6F9;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-header: rgba(255, 255, 255, 0.88);
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;

  /* Text Colors */
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-body: #475569;
  --text-heading: #0F172A;

  /* Gradients */
  --po-gradient-main: linear-gradient(135deg, #16A085 0%, #0E7A6B 100%);
  --po-gradient-banner: linear-gradient(135deg, #FFFFFF 0%, #F0FDFA 100%);
  --po-gradient-pill: linear-gradient(135deg, #F0FDFA 0%, #CCFBF1 100%);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px -6px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(22, 160, 133, 0.06);

  /* Spacing & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Fonts */
  --font-family: 'Manrope', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-page: #0B1120;
  --bg-card: #131E32;
  --bg-sidebar: #131E32;
  --bg-header: rgba(19, 30, 50, 0.88);
  --border-color: #1E2D4A;
  --border-hover: #2E4369;

  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-body: #CBD5E1;
  --text-heading: #FFFFFF;

  --po-gradient-banner: linear-gradient(135deg, #131E32 0%, #0D2830 100%);
  --po-warning-bg: rgba(217, 119, 6, 0.12);
  --po-warning-border: rgba(217, 119, 6, 0.3);
  --po-danger-bg: rgba(239, 68, 68, 0.12);
  --po-danger-border: rgba(239, 68, 68, 0.3);

  --shadow-md: 0 4px 14px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 30px -6px rgba(0, 0, 0, 0.5);
}

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

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Reading Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--po-gradient-main);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.2s ease;
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 4px 8px rgba(22, 160, 133, 0.25));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--po-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 14px 8px 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  outline: none;
  width: 260px;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--po-secondary);
  box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.15);
  width: 300px;
}

.search-box .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-outline {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-page);
  border-color: var(--po-secondary);
  color: var(--po-secondary);
}

.btn-icon {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-full);
}

.btn-icon:hover {
  color: var(--po-secondary);
  border-color: var(--po-secondary);
  transform: rotate(15deg);
}

.hidden {
  display: none !important;
}

/* Main Container */
.page-container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 64px;
  flex: 1;
}

/* Page Header Banner */
.po-page-header-banner {
  background: var(--po-gradient-banner);
  border: 1px solid rgba(22, 160, 133, 0.18);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.po-page-header-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(22, 160, 133, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.banner-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.6px;
  margin-bottom: 6px;
}

.banner-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.banner-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.org-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--po-secondary);
  background: var(--po-gradient-pill);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(22, 160, 133, 0.25);
  box-shadow: var(--shadow-sm);
}

/* Layout */
.content-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 32px;
  align-items: start;
}

/* TOC Sidebar */
.toc-sidebar {
  position: sticky;
  top: 90px;
}

.toc-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 4px;
}

.toc-nav::-webkit-scrollbar {
  width: 4px;
}
.toc-nav::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  line-height: 1.4;
}

.toc-num {
  font-weight: 700;
  color: var(--po-secondary);
  min-width: 18px;
}

.toc-link:hover {
  background: var(--bg-page);
  color: var(--po-secondary);
  transform: translateX(3px);
}

.toc-link.active {
  background: var(--po-gradient-pill);
  color: var(--po-secondary);
  border-left: 3px solid var(--po-secondary);
  font-weight: 700;
}

.toc-link.highlight {
  color: #B45309;
}

.toc-link.danger {
  color: var(--po-danger);
}

.toc-support-card {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-color);
}

.toc-support-card h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.toc-support-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: white;
  background: var(--po-gradient-main);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 4px 10px rgba(22, 160, 133, 0.25);
}

.support-btn:hover {
  opacity: 0.92;
}

/* Terms Card Main */
.terms-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px 48px;
  box-shadow: var(--shadow-md);
}

.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--po-secondary);
  box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.2);
}

/* Content Sections */
.terms-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.terms-section {
  scroll-margin-top: 90px;
  transition: background-color 0.3s ease;
}

.terms-section.search-match {
  background: rgba(22, 160, 133, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  outline: 2px dashed var(--po-secondary);
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.3px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  font-weight: 800;
  color: var(--po-secondary);
  background: var(--po-gradient-pill);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(22, 160, 133, 0.2);
}

.section-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-body);
}

.section-body p {
  margin-bottom: 16px;
}

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

.section-body strong {
  color: var(--text-heading);
  font-weight: 700;
}

/* Security Checklist */
.security-checklist {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 20px 0;
}

.security-checklist h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 12px;
}

.security-checklist ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.security-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
}

.check-icon {
  color: var(--po-secondary);
  flex-shrink: 0;
  margin-top: 3px;
}

/* Alert Box */
.alert-box {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  line-height: 1.6;
}

.alert-warning {
  background: var(--po-warning-bg);
  border: 1px solid var(--po-warning-border);
  color: var(--po-warning);
}

.alert-warning .alert-icon {
  color: var(--po-warning);
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-content strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
  color: #92400E;
}

[data-theme="dark"] .alert-content strong {
  color: #FCD34D;
}

/* Partners Grid */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0 24px;
}

.partner-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--po-secondary);
}

.partner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.partner-badge.mtn {
  background: #FFCC00;
  color: #000;
}

.partner-badge.orange {
  background: #FF6600;
  color: #FFF;
}

.partner-badge.other {
  background: var(--po-gradient-main);
  color: #FFF;
}

.partner-info {
  display: flex;
  flex-direction: column;
}

.partner-info strong {
  font-size: 14px;
  color: var(--text-heading);
}

.partner-info span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Contact Channels */
.contact-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0 24px;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.channel-card:hover {
  border-color: var(--po-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.channel-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-icon.phone {
  background: rgba(22, 160, 133, 0.12);
  color: var(--po-secondary);
}

.channel-icon.email {
  background: rgba(52, 73, 94, 0.12);
  color: var(--po-primary);
}

[data-theme="dark"] .channel-icon.email {
  background: rgba(255, 255, 255, 0.1);
  color: #93C5FD;
}

.channel-info {
  display: flex;
  flex-direction: column;
}

.channel-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.channel-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
}

/* Bulleted Lists */
.prohibited-list,
.liability-list {
  list-style: none;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prohibited-list li,
.liability-list li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
}

.prohibited-list li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--po-danger);
  font-weight: 800;
  font-size: 13px;
}

.liability-list li::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: var(--po-secondary);
  font-size: 18px;
  line-height: 1;
}

/* Security Notice Box */
.security-notice-box {
  background: var(--po-danger-bg);
  border: 1px solid var(--po-danger-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 40px;
  scroll-margin-top: 90px;
}

.notice-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--po-danger);
  margin-bottom: 10px;
}

.notice-header h3 {
  font-size: 16px;
  font-weight: 800;
}

.security-notice-box p {
  font-size: 14px;
  font-weight: 600;
  color: #991B1B;
  line-height: 1.6;
}

[data-theme="dark"] .security-notice-box p {
  color: #FCA5A5;
}

.security-notice-box a {
  color: var(--po-danger);
  text-decoration: underline;
  font-weight: 700;
}

/* Footer */
.app-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 28px 24px;
  margin-top: auto;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-weight: 700;
  color: var(--text-heading);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--po-secondary);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--po-gradient-main);
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(22, 160, 133, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(22, 160, 133, 0.45);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 240px 1fr;
    gap: 24px;
  }
  .terms-card {
    padding: 32px 36px;
  }
}

@media (max-width: 860px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  
  .toc-sidebar {
    position: static;
    margin-bottom: 24px;
  }

  .toc-nav {
    max-height: 220px;
  }

  .po-page-header-banner {
    padding: 24px;
  }
  
  .banner-title {
    font-size: 22px;
  }

  .terms-card {
    padding: 24px 20px;
  }

  .search-box input {
    width: 180px;
  }

  .search-box input:focus {
    width: 200px;
  }
}

@media (max-width: 600px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .search-box {
    flex: 1;
  }
  
  .search-box input {
    width: 100%;
  }

  .search-box input:focus {
    width: 100%;
  }
  
  .banner-meta {
    width: 100%;
  }
}

/* ==========================================================================
   Navigation Tabs & Loan Specific Styles
   ========================================================================== */

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-page);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.nav-tab-item {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.nav-tab-item:hover {
  color: var(--text-heading);
}

.nav-tab-item.active {
  background: var(--bg-card);
  color: var(--po-secondary);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

/* Banner Pill Badges */
.badge-pill-primary {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: rgba(22, 160, 133, 0.15);
  color: var(--po-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-pill-secondary {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: rgba(52, 73, 94, 0.15);
  color: var(--po-primary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

[data-theme="dark"] .badge-pill-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #94A3B8;
}

/* Definitions Grid */
.definitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.def-item {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
}

.def-item strong {
  display: block;
  font-size: 14px;
  color: var(--po-secondary);
  margin-bottom: 4px;
}

/* Styled Bullet Lists */
.styled-bullet-list {
  list-style: none;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.styled-bullet-list li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
}

.styled-bullet-list li::before {
  content: '▸';
  position: absolute;
  left: 4px;
  color: var(--po-secondary);
  font-weight: 800;
  font-size: 14px;
}

/* Alert Info */
.alert-info {
  background: rgba(2, 158, 165, 0.08);
  border: 1px solid rgba(2, 158, 165, 0.25);
  color: var(--text-body);
}

.alert-info .alert-icon {
  color: var(--po-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Charges Breakdown */
.charges-breakdown-card {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 16px 0;
  overflow: hidden;
}

.charge-row {
  display: flex;
  flex-direction: column;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
}

.charge-row:last-child {
  border-bottom: none;
}

.charge-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.charge-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* Allocation Order Box */
.allocation-order-box {
  background: var(--bg-page);
  border-left: 4px solid var(--po-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin: 20px 0;
}

.allocation-order-box h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.allocation-order-box ol {
  margin: 12px 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

/* Default Events List */
.default-events-list {
  list-style: none;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.default-events-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
}

.default-events-list li::before {
  content: '⚠️';
  position: absolute;
  left: 0;
  font-size: 13px;
}

/* Consequences Grid */
.consequences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.consequence-item {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: transform 0.2s ease;
}

.consequence-item:hover {
  transform: translateY(-2px);
  border-color: var(--po-danger);
}

.consequence-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.consequence-item strong {
  display: block;
  font-size: 14px;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.consequence-item p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Print Styles */
@media print {
  .app-header,
  .progress-bar,
  .toc-sidebar,
  .header-actions,
  .back-to-top,
  .app-footer {
    display: none !important;
  }

  body {
    background: #FFF !important;
    color: #000 !important;
  }

  .page-container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .content-layout {
    display: block !important;
  }

  .terms-card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .terms-section {
    page-break-inside: avoid;
    margin-bottom: 24px;
  }

  .po-page-header-banner {
    background: none !important;
    border: 1px solid #CCC !important;
    box-shadow: none !important;
  }
}
