/* ═══════════════════════════════════════
   ICHRA MASTERS WIKI — wiki.css
   ═══════════════════════════════════════ */

:root {
  --blue:        #073b6d;
  --blue-mid:    #2563c0;
  --blue-light:  #dbeafe;
  --gold:        #c08036;
  --gold-light:  #fef3c7;
  --teal:        #0d7a6b;
  --teal-light:  #ccfbf1;
  --amber:       #b45309;
  --amber-light: #fef3c7;
  --rose:        #be123c;
  --rose-light:  #ffe4e6;
  --violet:      #6d28d9;
  --slate:       #334155;
  --slate-light: #f1f5f9;
  --border:      #e2e8f0;

  /* Layout */
  --sidebar-w: 270px;
  --topbar-h:  56px;

  /* Light theme */
  --bg:          #f0f4f8;
  --surface:     #ffffff;
  --surface2:    #f8fafc;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --text-xmuted: #94a3b8;
  --border-c:    #e2e8f0;
  --sidebar-bg:  #073b6d;
  --sidebar-text:#e2e8f0;
  --sidebar-hover: rgba(255,255,255,0.08);
  --sidebar-active: rgba(0,0,0,0.2);
}

[data-theme="dark"] {
  --blue:        #073b6d;
  --bg:          #0d1117;
  --surface:     #161b22;
  --surface2:    #1c2333;
  --text:        #e2e8f0;
  --text-muted:  #94a3b8;
  --text-xmuted: #64748b;
  --border-c:    #30363d;
  --sidebar-bg:  #073b6d;
  --sidebar-text:#e2e8f0;
  --sidebar-hover: rgba(255,255,255,0.08);
  --sidebar-active: rgba(0,0,0,0.2);
}

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

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

a { color: inherit; text-decoration: none; }


/* ═══════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  scrollbar-width: thin;
  scrollbar-color: #30363d transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue-mid), #3b82f6);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: white;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.logo-title {
  display: block;
  font-size: 13px; font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}
.logo-sub {
  display: block;
  font-size: 10px; font-weight: 500;
  color: rgba(255,255,255,0.35);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sidebar-toggle {
  background: none; border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex; align-items: center;
  transition: color 0.15s, background 0.15s;
}
.sidebar-toggle:hover { color: #f1f5f9; background: rgba(255,255,255,0.07); }

/* Search */
.sidebar-search {
  position: relative;
  margin: 14px 12px 10px;
  flex-shrink: 0;
}
.search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.3);
  pointer-events: none;
}
.sidebar-search input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px 8px 32px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.sidebar-search input::placeholder { color: rgba(255,255,255,0.3); }
.sidebar-search input:focus {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(255,255,255,0.09);
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 8px 0 20px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 6px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 14px 16px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sidebar-text);
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  position: relative;
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #f1f5f9; }
.nav-item.active {
  background: rgba(37, 99, 192, 0.25);
  color: #93c5fd;
  border-left: 3px solid #3b82f6;
}
.nav-item.active::before { display: none; }

.nav-item.nav-sub {
  padding-left: 36px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(203, 213, 225, 0.65);
}
.nav-item.nav-sub:hover { color: #e2e8f0; background: rgba(255,255,255,0.04); }
.nav-item.nav-sub.active { color: #93c5fd; }

.nav-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.step-badge {
  width: 20px; height: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

.dot-badge {
  color: rgba(255,255,255,0.3);
  font-size: 16px;
  margin-right: 2px;
  line-height: 1;
}

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 14px 16px;
  flex-shrink: 0;
}
.sidebar-footer-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-footer-info span,
.sidebar-footer-info a {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}
.sidebar-footer-info a:hover { color: rgba(255,255,255,0.5); }

/* Mobile backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}


/* ═══════════════════════════════════════
   MAIN WRAPPER
   ═══════════════════════════════════════ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.25s;
}


/* ═══════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════ */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border-c);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
}

.mobile-menu-btn {
  display: none;
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s;
}
.mobile-menu-btn:hover { background: var(--surface2); }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
  flex: 1;
}
.breadcrumb span { color: var(--text); font-weight: 500; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--blue-mid); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-search {
  max-width: 380px;
  width: 100%;
  margin: 0 16px;
  position: relative;
  display: flex;
  align-items: center;
}
.topbar-search input {
  width: 100%;
  padding: 8px 16px 8px 36px;
  border-radius: 8px;
  border: 1px solid var(--border-c);
  background: var(--surface2);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.topbar-search input:focus {
  border-color: rgba(96, 165, 250, 0.5);
  background: var(--surface);
}
.topbar-search svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

.theme-toggle {
  background: var(--surface2);
  border: 1px solid var(--border-c);
  color: var(--text-muted);
  cursor: pointer;
  padding: 7px;
  border-radius: 8px;
  display: flex; align-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.theme-toggle:hover { background: var(--border-c); }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon, :root .moon-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

.topbar-cta {
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: white !important;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}
.topbar-cta:hover { opacity: 0.9; transform: translateY(-1px); }


/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, #0f2557 0%, #1a3f7c 55%, #2563c0 100%);
  padding: 72px 60px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  padding: 5px 18px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Merriweather', serif;
  font-size: 48px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 12px 18px;
  max-width: 520px;
  margin: 0 auto;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(10px);
}
.hero-search:focus-within {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
}
.hero-search svg { color: rgba(255,255,255,0.5); flex-shrink: 0; }
.hero-search input {
  flex: 1;
  background: none; border: none; outline: none;
  font-family: inherit; font-size: 15px;
  color: white;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.45); }
.hero-search kbd {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 5px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
}


/* ═══════════════════════════════════════
   HOME CARDS
   ═══════════════════════════════════════ */
.home-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px 48px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.home-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1.5px solid var(--border-c);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none !important;
}
.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.13);
}

.home-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
}
.card-blue::before { background: linear-gradient(90deg, var(--blue), var(--blue-mid)); }
.card-blue:hover { border-color: #bfdbfe; }
.card-teal::before { background: linear-gradient(90deg, var(--teal), #0d9488); }
.card-teal:hover { border-color: #99f6e4; }
.card-gold::before { background: linear-gradient(90deg, var(--gold), #f59e0b); }
.card-gold:hover { border-color: #fde68a; }

.card-icon {
  font-size: 32px;
  line-height: 1;
}

.card-content h2 {
  font-family: 'Merriweather', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.card-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}
.card-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue-mid);
}
.card-teal .card-link { color: var(--teal); }
.card-gold .card-link { color: var(--amber); }

.card-tag {
  position: absolute;
  top: 18px; right: 18px;
  background: var(--surface2);
  border: 1px solid var(--border-c);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-xmuted);
}


/* ═══════════════════════════════════════
   QUICK LINKS
   ═══════════════════════════════════════ */
.quick-links-section {
  padding: 0 48px 40px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.section-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-c);
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-c);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  text-decoration: none;
}
.quick-link:hover {
  border-color: #bfdbfe;
  background: var(--blue-light);
  transform: translateX(2px);
}

.ql-num {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: white;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
}

.ql-text { flex: 1; }

.ql-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  flex-shrink: 0;
}
.ql-badge.agent { background: #dbeafe; color: #1a3f7c; }
.ql-badge.sop  { background: #fef3c7; color: #92400e; }


/* ═══════════════════════════════════════
   CHECKLIST & CONTENT SECTIONS
   ═══════════════════════════════════════ */
.content-section {
  background: var(--surface);
  border: 1px solid var(--border-c);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.content-section-header {
  background: var(--surface2);
  border-bottom: 1px solid var(--border-c);
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.wiki-checklist {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.wiki-checklist li {
  position: relative;
  padding: 12px 16px 12px 42px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.6;
  border-bottom: 1px dashed var(--border-c);
}

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

.wiki-checklist li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 13px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--text-xmuted);
  background: var(--surface);
}

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

.guide-list li {
  position: relative;
  padding: 10px 0 10px 24px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.6;
  border-bottom: 1px solid var(--border-c);
}

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

.guide-list li::before {
  content: '•';
  position: absolute;
  left: 6px;
  top: 10px;
  font-size: 18px;
  color: var(--blue-mid);
  line-height: 1.4;
}

/* ═══════════════════════════════════════
   CONTACTS STRIP
   ═══════════════════════════════════════ */
.contacts-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border-top: 1px solid var(--border-c);
  border-bottom: 1px solid var(--border-c);
  padding: 22px 48px;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 0;
}

.contact-item {
  flex: 1;
  min-width: 180px;
  padding: 0 24px;
}
.contact-item:first-child { padding-left: 0; }
.contact-item:last-child  { padding-right: 0; }

.contact-divider {
  width: 1px;
  height: 48px;
  background: var(--border-c);
  flex-shrink: 0;
}

.contact-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.contact-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.contact-val a { color: var(--blue-mid); }
.contact-val a:hover { text-decoration: underline; }
.contact-phone {
  font-size: 12px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.page-footer {
  padding: 20px 48px;
  text-align: center;
  font-size: 12px;
  color: var(--text-xmuted);
  background: var(--surface);
}


/* ═══════════════════════════════════════
   CONTENT PAGES (shared)
   ═══════════════════════════════════════ */
.content-page {
  flex: 1;
  max-width: 900px;
  width: 100%;
  padding: 40px 48px 80px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 36px;
}

.page-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-tag.teal { background: var(--teal-light); color: var(--teal); }
.page-tag.gold { background: var(--gold-light); color: var(--amber); }

.page-title {
  font-family: 'Merriweather', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 12px;
}

.page-desc {
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 700px;
}

/* Step number header bar */
.step-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  border-radius: 14px;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  color: white;
}
.step-circle {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  flex-shrink: 0;
}
.step-header-text h1 {
  font-family: 'Merriweather', serif;
  font-size: 20px; font-weight: 700;
  margin-bottom: 4px;
}
.step-header-badge {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 2px 12px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Content sections */
.content-section {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border-c);
  overflow: hidden;
  margin-bottom: 20px;
}
.content-section-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-c);
  background: var(--surface2);
}

/* Callout boxes */
.callout {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.65;
}
.callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.callout-label {
  font-size: 9px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 3px;
}
.callout.tip   { background: var(--teal-light);  border-left: 4px solid var(--teal); }
.callout.tip .callout-label { color: var(--teal); }
.callout.warn  { background: var(--amber-light); border-left: 4px solid var(--amber); }
.callout.warn .callout-label { color: var(--amber); }
.callout.info  { background: var(--blue-light);  border-left: 4px solid var(--blue-mid); }
.callout.info .callout-label { color: var(--blue); }
.callout.crit  { background: var(--rose-light);  border-left: 4px solid var(--rose); }
.callout.crit .callout-label { color: var(--rose); }
.callout.purple { background: #ede9fe; border-left: 4px solid var(--violet); }
.callout.purple .callout-label { color: var(--violet); }

/* Card grid */
.card-grid-sm {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.info-card {
  border-radius: 12px;
  padding: 18px;
  border: 1px solid;
}
.info-card.blue { background: linear-gradient(135deg, #eff6ff,#dbeafe); border-color: #bfdbfe; }
.info-card.teal { background: linear-gradient(135deg, #f0fdfa,#ccfbf1); border-color: #99f6e4; }
.info-card.amber { background: linear-gradient(135deg, #fffbeb,#fef3c7); border-color: #fde68a; }
.info-card.rose  { background: linear-gradient(135deg, #fff1f2,#ffe4e6); border-color: #fecdd3; }
.info-card.violet { background: linear-gradient(135deg, #f5f3ff,#ede9fe); border-color: #ddd6fe; }

a.info-card {
  display: block;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
a.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.info-card h4 {
  font-size: 13px; font-weight: 700;
  margin-bottom: 8px;
}
.info-card.blue h4  { color: var(--blue); }
.info-card.teal h4  { color: var(--teal); }
.info-card.amber h4 { color: var(--amber); }
.info-card.rose h4  { color: var(--rose); }
.info-card.violet h4 { color: var(--violet); }
.info-card p {
  font-size: 13px;
  color: #374151;
  line-height: 1.55;
}

/* Formula box */
.formula-box {
  background: linear-gradient(135deg, #0f2557, #1a3f7c);
  color: white;
  border-radius: 14px;
  padding: 24px 28px;
  margin: 18px 0;
  text-align: center;
  font-family: 'Merriweather', serif;
  font-size: 15px;
  line-height: 1.8;
}
.formula-box .formula-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 10px;
}

/* Phase banner */
.phase-banner {
  background: linear-gradient(135deg, var(--teal), #0d9488);
  color: white;
  border-radius: 10px;
  padding: 12px 20px;
  margin: 20px 0 14px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Summary sidebar boxes */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.summary-box {
  border-radius: 8px;
  padding: 10px 13px;
}
.sb-label {
  font-size: 9px; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 5px;
}
.sb-text { font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.5; }

/* Tables */
.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
}
.wiki-table th {
  background: var(--blue);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}
.wiki-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-c);
  color: var(--text);
}
.wiki-table tr:nth-child(even) td { background: var(--surface2); }

/* Typography for content pages */
.content-body h2 {
  font-size: 20px; font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-c);
}
.content-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.content-body h3 {
  font-size: 15px; font-weight: 700;
  color: var(--blue);
  margin: 22px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--blue-mid);
}
.content-body h4 {
  font-size: 14px; font-weight: 700;
  color: var(--slate);
  margin: 16px 0 6px;
}
.content-body p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
}
.content-body strong { color: var(--text); }
.content-body ul, .content-body ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
.content-body li {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 6px;
}

/* Page nav (prev/next) */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--border-c);
  gap: 16px;
}
.page-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border-c);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.page-nav a:hover { border-color: #bfdbfe; background: var(--blue-light); color: var(--blue); }
.page-nav .next { margin-left: auto; }

/* TOC on content pages */
.page-toc {
  background: var(--surface);
  border: 1px solid var(--border-c);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 28px;
}
.page-toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-xmuted);
  margin-bottom: 12px;
}
.page-toc ol {
  margin: 0; padding-left: 18px;
}
.page-toc li {
  font-size: 14px;
  padding: 3px 0;
}
.page-toc a {
  color: var(--blue-mid);
}
.page-toc a:hover { text-decoration: underline; }


/* ═══════════════════════════════════════
   CHECKLIST PAGE SPECIFIC
   ═══════════════════════════════════════ */
.checklist-step {
  background: var(--surface);
  border: 1px solid var(--border-c);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
}
.cs-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border-c);
}
.cs-num {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: white;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  flex-shrink: 0;
}
.cs-num.teal { background: linear-gradient(135deg, #1a5c52, var(--teal)); }
.cs-num.gold { background: linear-gradient(135deg, #a16207, var(--gold)); }
.cs-title {
  font-size: 15px; font-weight: 700;
  color: var(--text);
  flex: 1;
}
.cs-badge {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.cs-badge.agent { background: #dbeafe; color: var(--blue); }
.cs-badge.wait  { background: var(--teal-light); color: var(--teal); }
.cs-badge.handoff { background: var(--gold-light); color: var(--amber); }

.cs-body {
  padding: 18px 22px;
}
.cs-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--surface2);
  border-left: 3px solid var(--blue-mid);
  border-radius: 0 8px 8px 0;
}
.cs-desc.teal { border-color: var(--teal); }
.cs-desc.gold { border-color: var(--gold); }
.cs-list { list-style: none; }
.cs-list li {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-c);
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
  align-items: flex-start;
}
.cs-list li:last-child { border-bottom: none; }
.cs-box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--blue);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
  background: transparent;
  display: inline-block;
}
.cs-box.teal { border-color: var(--teal); }

/* Handoff panels */
.handoff-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.handoff-panel {
  background: var(--surface2);
  border: 1px solid var(--border-c);
  border-radius: 10px;
  padding: 14px 16px;
}
.hp-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.hp-role { font-size: 11px; color: var(--text-muted); font-style: italic; margin-bottom: 10px; }
.hp-items { font-size: 13px; color: var(--text-muted); line-height: 1.8; }

/* Ongoing rules */
.ongoing-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}
.ongoing-panel {
  border-radius: 10px;
  padding: 16px;
}
.ongoing-panel.navy { background: #0d2456; }
.ongoing-panel.gold { background: var(--gold-light); border: 1px solid #e8c96e; }
.ob-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 6px;
}
.ongoing-panel.navy .ob-label { color: rgba(255,255,255,0.5); }
.ongoing-panel.gold .ob-label { color: #8a5d00; }
.ob-text { font-size: 13px; line-height: 1.6; }
.ongoing-panel.navy .ob-text { color: rgba(255,255,255,0.85); }
.ongoing-panel.gold .ob-text { color: #5a3e00; }


/* ═══════════════════════════════════════
   SEARCH RESULTS OVERLAY
   ═══════════════════════════════════════ */
.search-overlay {
  display: none;
  position: fixed;
  top: 60px; left: var(--sidebar-w); right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 200;
  backdrop-filter: blur(4px);
  padding-bottom: 40px;
}
.search-overlay.open { display: block; }
.search-results-box {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border-c);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  margin: 16px auto 0;
  max-width: 620px;
  max-height: 80vh;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-c);
  cursor: pointer;
  transition: background 0.1s;
}
.search-result-item:hover { background: var(--surface2); }
.search-result-item:last-child { border-bottom: none; }
.sr-icon { font-size: 20px; flex-shrink: 0; }
.sr-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.sr-desc  { font-size: 12.5px; color: var(--text-muted); }
.search-no-results {
  padding: 32px 22px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}


/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .home-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop.open { display: block; }

  .main-wrapper { margin-left: 0; }

  .mobile-menu-btn { display: flex; }

  .hero { padding: 40px 24px; }
  .hero-title { font-size: 32px; }

  .home-cards { grid-template-columns: 1fr; padding: 24px; }
  .quick-links-section { padding: 0 24px 32px; }
  .contacts-strip { padding: 20px 24px; flex-direction: column; }
  .contact-divider { width: 100%; height: 1px; }

  .content-page { padding: 24px; }
  .handoff-panels, .ongoing-panels { grid-template-columns: 1fr; }

  .hero-search kbd { display: none; }

  .topbar { padding: 0 16px; }
  .topbar-cta { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 26px; }
  .home-cards { padding: 16px; }
}

/* Smooth transitions */
* { transition: background-color 0.2s, border-color 0.2s, color 0.15s; }
a, button { transition: all 0.15s; }
