:root {
  --primary: #0f144f;          /* XamPro navy */
  --primary-dark: #090d38;
  --primary-light: #eef0f8;
  --accent: #db0914;           /* XamPro red */
  --accent-light: #fff0f0;
  --secondary: #6b7280;
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --sidebar-width: 280px;
  --radius: 8px;
  --site-logo: url('https://xampro.co.uk/images/exampro_logo_w.svg');
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--primary);          /* XamPro navy sidebar */
  border-right: 3px solid var(--accent); /* red accent stripe */
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

/* ── Sidebar logo area ── */
.sidebar-logo-img {
  display: block;
  width: 160px;
  height: 40px;
  background-image: var(--site-logo);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  
}

.sidebar-logo {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo img {
  height: 38px;
  width: auto;
  display: block;
}

/* ── Sidebar nav ── */
.sidebar-nav { padding: 10px 0; flex: 1; }

.nav-section-label {
  padding: 14px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.45);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 20px;
  color: rgba(255,255,255,.75);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
  border-left-color: rgba(219,9,20,.5);
}

.nav-item.active {
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 600;
  border-left: 3px solid var(--accent);  /* red active indicator */
}

/* ── Sidebar footer (version/brand strip) ── */
.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 11px;
  color: rgba(255,255,255,.4);
  text-align: center;
}

/* ── Main column ── */
.main { margin-left: var(--sidebar-width); flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ── Topbar ── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); text-decoration: none; }
.breadcrumb .sep { opacity: .4; }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ── Content area ── */
.content { padding: 36px 48px 48px; max-width: 820px; flex: 1; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a2070 100%);
  color: white;
  border-radius: 14px;
  padding: 36px 40px;
  margin-bottom: 36px;
  border-bottom: 4px solid var(--accent);
}

.hero h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.hero p { font-size: 15px; opacity: .88; max-width: 520px; }

/* ── Cards grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  text-decoration: none;
}

.card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.card h3 { font-size: 14px; font-weight: 600; color: var(--text); }
.card p { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

/* ── Page header ── */
.page-header { margin-bottom: 32px; }
.page-header .page-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.page-header h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: var(--primary); }
.page-header p { font-size: 15px; color: var(--text-muted); max-width: 560px; }

/* ── Section headings ── */
h2.section-title {
  font-size: 20px; font-weight: 700;
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  color: var(--primary);
}

h3.subsection-title { font-size: 16px; font-weight: 600; margin: 24px 0 10px; color: var(--primary); }

/* ── Step-by-step guide ── */
.step-list { display: flex; flex-direction: column; gap: 0; margin: 24px 0; }

.step {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.step:last-child { border-bottom: none; }

.step-number {
  width: 32px; height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-body { flex: 1; }
.step-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 5px; color: var(--primary); }
.step-body p { font-size: 13.5px; color: var(--text-muted); }

/* ── Callout boxes ── */
.callout {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
}

.callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.callout-body strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 3px; }

.callout-info { background: var(--primary-light); border-left: 3px solid var(--primary); }
.callout-info .callout-icon, .callout-info strong { color: var(--primary); }

.callout-tip { background: var(--success-light); border-left: 3px solid var(--success); }
.callout-tip .callout-icon, .callout-tip strong { color: var(--success); }

.callout-warning { background: var(--warning-light); border-left: 3px solid var(--warning); }
.callout-warning .callout-icon, .callout-warning strong { color: var(--warning); }

.callout-danger { background: var(--danger-light); border-left: 3px solid var(--accent); }
.callout-danger .callout-icon, .callout-danger strong { color: var(--accent); }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13.5px; }
th { background: var(--primary); color: #fff; font-weight: 600; padding: 10px 14px; text-align: left; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
td:first-child { color: var(--text); font-weight: 500; }
tr:hover td { background: var(--primary-light); }

/* ── Badge ── */
.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 12px;
}
.badge-blue   { background: var(--primary-light); color: var(--primary); }
.badge-green  { background: var(--success-light); color: var(--success); }
.badge-orange { background: var(--warning-light); color: var(--warning); }
.badge-red    { background: var(--accent-light);  color: var(--accent); }
.badge-gray   { background: #f1f5f9; color: var(--secondary); }

/* ── Quick-links bar ── */
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }

.quick-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px; color: var(--text-muted);
  transition: all .15s;
}

.quick-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
  background: var(--primary-light);
}

/* ── FAQ accordion ── */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 14px 18px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
  color: var(--primary);
}

.faq-question:hover { background: var(--primary-light); }
.faq-answer { padding: 0 18px 14px; font-size: 13.5px; color: var(--text-muted); display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-chevron { transition: transform .2s; font-size: 12px; color: var(--text-muted); }

/* ── Code blocks ── */
pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 12.5px;
  overflow-x: auto;
  line-height: 1.8;
}

/* ── Page footer ── */
.page-footer {
  background: var(--primary);
  color: rgba(255,255,255,.7);
  padding: 24px 48px;
  font-size: 12.5px;
  line-height: 1.8;
  margin-left: 0;     /* spans full width of .main */
}

.page-footer a { color: rgba(255,255,255,.7); text-decoration: underline; }
.page-footer a:hover { color: #fff; }

.footer-inner {
  max-width: 820px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-logo-img {
  display: block;
  width: 120px;
  height: 28px;
  background-image: var(--site-logo);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  
  opacity: .85;
}

.footer-text { flex: 1; min-width: 260px; }

.footer-divider {
  display: block;
  margin: 6px 0 0;
  color: rgba(255,255,255,.4);
  font-size: 11.5px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { width: 240px; }
  .main { margin-left: 240px; }
  .content { padding: 24px 24px 40px; }
  .page-footer { padding: 20px 24px; }
}

@media (max-width: 680px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .content { padding: 20px 16px 40px; }
  .card-grid { grid-template-columns: 1fr; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 20px; }
  .page-footer { padding: 20px 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

