/* ===== SukukFi brand theme for mdBook =====
   Overrides mdBook's CSS variables. Brand tokens mirror docs/mdbook.css
   (the pre-migration docs theme) so the site keeps its identity. */

@font-face { font-family:'Branding SF'; src:url('/fonts/Branding SF Light.otf') format('opentype');    font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:'Branding SF'; src:url('/fonts/Branding SF Medium.otf') format('opentype');   font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'Branding SF'; src:url('/fonts/Branding SF SemiBold.otf') format('opentype'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'Branding SF'; src:url('/fonts/Branding SF Bold.otf') format('opentype');     font-weight:700; font-style:normal; font-display:swap; }

:root {
  --sukuk-display: 'Branding SF', system-ui, -apple-system, sans-serif;
  --sukuk-body: 'Figtree', system-ui, -apple-system, sans-serif;
  --sidebar-width: 300px;
  --content-max-width: 820px;
}

/* ---- Light (SukukFi light tokens) ---- */
.light {
  --bg:#f4f6fb; --fg:#0d0f1c;
  --sidebar-bg:#ffffff; --sidebar-fg:#0d0f1c; --sidebar-non-existant:#a2a6c4;
  --sidebar-active:#006255; --sidebar-spacer:#ced1e8;
  --scrollbar:#a2a6c4; --icons:#5c6480; --icons-hover:#006255;
  --links:#006255; --inline-code-color:#8a2f5e;
  --theme-popup-bg:#ffffff; --theme-popup-border:#ced1e8; --theme-hover:#eaecf5;
  --quote-bg:#eaecf5; --quote-border:#006255;
  --table-border-color:#ced1e8; --table-header-bg:#eaecf5; --table-alternate-bg:#f8f9fd;
  --searchbar-border-color:#ced1e8; --searchbar-bg:#ffffff; --searchbar-fg:#0d0f1c;
  --searchbar-shadow-color:#a2a6c4; --searchresults-header-fg:#5c6480;
  --searchresults-border-color:#ced1e8; --searchresults-li-hover-bg:#eaecf5;
  --search-mark-bg:rgba(0,98,85,0.22);
}

/* ---- Dark (SukukFi dark tokens) ---- */
.navy, .coal, .ayu {
  --bg:#0b0d14; --fg:#f0f0f0;
  --sidebar-bg:#121621; --sidebar-fg:#f0f0f0; --sidebar-non-existant:#5c6480;
  --sidebar-active:#00ffee; --sidebar-spacer:#22283a;
  --scrollbar:#3d4252; --icons:#9ba0b0; --icons-hover:#00ffee;
  --links:#00ffee; --inline-code-color:#7fe3d6;
  --theme-popup-bg:#121621; --theme-popup-border:#22283a; --theme-hover:#171b27;
  --quote-bg:#121621; --quote-border:#00ffee;
  --table-border-color:#22283a; --table-header-bg:#171b27; --table-alternate-bg:#121621;
  --searchbar-border-color:#22283a; --searchbar-bg:#121621; --searchbar-fg:#f0f0f0;
  --searchbar-shadow-color:#000000; --searchresults-header-fg:#9ba0b0;
  --searchresults-border-color:#22283a; --searchresults-li-hover-bg:#171b27;
  --search-mark-bg:rgba(0,255,238,0.25);
}

/* ---- Typography ---- */
html, body, .content { font-family:var(--sukuk-body); }
.content h1, .content h2, .content h3, .content h4,
.sidebar .sidebar-title, .menu-title {
  font-family:var(--sukuk-display); font-weight:700; letter-spacing:-0.015em;
}
.content h1 { font-size:2.1rem; margin-top:0.2em; }
.content h2 { font-size:1.5rem; margin-top:1.9em; }
.content h3 { font-size:1.18rem; font-weight:600; }
.content p, .content li { line-height:1.65; }
.content main { max-width:var(--content-max-width); }

/* ---- Chrome ---- */
.menu-title { font-weight:600; letter-spacing:-0.01em; }
.sidebar .chapter li.chapter-item { line-height:1.45; margin-top:0.4em; }
.sidebar .chapter li a { font-size:0.94rem; }
.chapter li.chapter-item a.active { font-weight:700; }

.content blockquote { border-left:3px solid var(--quote-border); border-radius:0 6px 6px 0; }
.content table { border-collapse:collapse; }
.content table th { font-family:var(--sukuk-display); font-weight:600; }
.content table td, .content table th { padding:0.55em 0.8em; }
.content pre, .content code { font-family:ui-monospace,'Cascadia Code','Fira Mono',monospace; }
.content :not(pre) > code { padding:0.12em 0.35em; border-radius:4px; background:var(--quote-bg); }
