  :root {
    --midnight: #0a0e1a;
    --midnight-rgb: 10, 14, 26;
    --surface-rgb: 31, 41, 66;
    --footer-bg: #06080f;
    --indigo: #131a2e;
    --surface: #1f2942;
    --gold: #c9a96e;
    --gold-deep: #a8884a;
    --parchment: #f4ecd8;
    --linen: #e8e4d8;
    --stone: #5f5e5a;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Inter', 'Helvetica Neue', sans-serif;
  }
  html[data-theme="light"] {
    --midnight: #f7f2e9;
    --indigo: #efe7d6;
    --surface: #ffffff;
    --parchment: #211f1a;
    --linen: #46433b;
    --gold: #9c7a37;
    --gold-deep: #7c6029;
    --stone: #6f6e68;
    --midnight-rgb: 247, 242, 233;
    --surface-rgb: 255, 255, 255;
    --footer-bg: #ece2cd;
  }
  .theme-toggle { background: none; border: none; cursor: pointer; padding: 6px; color: var(--gold); display: flex; align-items: center; opacity: 0.8; transition: opacity 0.2s; }
  .theme-toggle:hover { opacity: 1; }
  .theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; }
  .theme-toggle .icon-sun { display: block; }
  .theme-toggle .icon-moon { display: none; }
  html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
  html[data-theme="light"] .theme-toggle .icon-moon { display: block; }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { background: var(--midnight); color: var(--linen); font-family: var(--sans); font-weight: 300; line-height: 1.6; overflow-x: hidden; }
  .main-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1.2rem 3rem; background: rgba(var(--midnight-rgb), 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 0.5px solid rgba(201, 169, 110, 0.15); display: flex; align-items: center; }
  .nav-brand { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; text-decoration: none; }
  .nav-brand svg { width: 42px; height: 38px; }
  .nav-brand-text { font-family: var(--serif); font-size: 1.5rem; color: var(--parchment); letter-spacing: 0.02em; }
  .nav-brand-text em { color: var(--gold); font-style: italic; }
  .nav-links { display: flex; gap: 2.5rem; list-style: none; margin-left: auto; }
  .nav-links a { color: var(--linen); text-decoration: none; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 400; transition: color 0.3s; position: relative; }
  .nav-links a:hover, .nav-links a.active { color: var(--gold); }
  .nav-links a::after { content: ''; position: absolute; bottom: -6px; left: 0; width: 0; height: 1px; background: var(--gold); transition: width 0.3s; }
  .nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
  .nav-toggle { display: none; background: transparent; border: 0; padding: 12px; cursor: pointer; margin: -12px; }
  .nav-toggle-bar { display: block; width: 24px; height: 1.5px; background: var(--gold); margin: 5px 0; transition: all 0.3s; }
  .nav-toggle.open .nav-toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle.open .nav-toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .mobile-drawer { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(var(--midnight-rgb), 0.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 90; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 5rem 2rem 2rem; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .mobile-drawer.open { opacity: 1; pointer-events: auto; }
  .mobile-drawer a { color: var(--linen); text-decoration: none; font-family: var(--serif); font-size: 1.6rem; padding: 0.85rem 1.5rem; transition: color 0.2s; text-align: center; }
  .mobile-drawer a:hover, .mobile-drawer a.active { color: var(--gold); }
  .mobile-drawer-rule { width: 60px; height: 0.5px; background: rgba(201, 169, 110, 0.3); margin: 0.5rem 0; }
  .mobile-drawer-tagline { font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); opacity: 0.65; margin-top: 1rem; }
  .page-header { padding: 10rem 2rem 2rem; text-align: center; background: radial-gradient(ellipse at center top, var(--indigo) 0%, var(--midnight) 70%); border-bottom: 0.5px solid rgba(201, 169, 110, 0.1); position: relative; }
  .page-header .stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.5), transparent), radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.4), transparent), radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.4), transparent), radial-gradient(1px 1px at 85% 15%, rgba(255,255,255,0.4), transparent); opacity: 0.4; pointer-events: none; }
  .page-eyebrow { font-size: 0.75rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.25rem; display: block; position: relative; }
  .page-eyebrow.arabic { font-family: 'Amiri', serif; font-size: 1.25rem; letter-spacing: 0.05em; text-transform: none; }
  .page-header h1 { font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 400; color: var(--parchment); letter-spacing: 0.01em; margin-bottom: 0.75rem; position: relative; }
  .page-header h1 em { color: var(--gold); font-style: italic; }
  .page-header p { max-width: 650px; margin: 0 auto; color: var(--linen); opacity: 0.85; font-size: 1.05rem; position: relative; }
  .page-header .back-link { display: inline-block; margin-top: 1.25rem; color: var(--gold); text-decoration: none; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.85; position: relative; transition: opacity 0.2s; }
  .page-header .back-link:hover { opacity: 1; }
  .star-divider { width: 28px; height: 28px; margin: 1rem auto; opacity: 0.5; display: block; position: relative; }
  section { padding: 3rem 2rem; }
  .container { max-width: 1100px; margin: 0 auto; }
  .narrow { max-width: 850px; margin: 0 auto; }
  footer { background: var(--footer-bg); padding: 4rem 3rem 2rem; border-top: 0.5px solid rgba(201, 169, 110, 0.15); margin-top: 0; }
  .footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
  .footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
  .footer-brand svg { width: 50px; height: 42px; }
  .footer-brand-text { font-family: var(--serif); font-size: 1.6rem; color: var(--parchment); }
  .footer-brand-text em { color: var(--gold); font-style: italic; }
  .footer-tagline { color: var(--linen); opacity: 0.6; font-size: 0.9rem; margin-bottom: 1.5rem; max-width: 320px; }
  .footer-col h4 { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; font-weight: 500; }
  .footer-col ul { list-style: none; }
  .footer-col li { margin-bottom: 0.6rem; }
  .footer-col a { color: var(--linen); opacity: 0.65; text-decoration: none; font-size: 0.85rem; transition: opacity 0.3s, color 0.3s; }
  .footer-col a:hover { opacity: 1; color: var(--gold); }
  .footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 2rem; border-top: 0.5px solid rgba(201, 169, 110, 0.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
  .footer-bottom p { font-size: 0.75rem; color: var(--linen); opacity: 0.4; }
  .acrux-badge { display: flex; align-items: center; gap: 0.5rem; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--linen); opacity: 0.5; text-decoration: none; }
  .acrux-badge:hover { opacity: 0.85; }
  .acrux-badge svg { width: 60px; height: auto; }
  .breadcrumb { background: rgba(var(--midnight-rgb), 0.6); border-bottom: 0.5px solid rgba(201, 169, 110, 0.12); padding: 1rem 2rem; margin-top: 5rem; }
  .breadcrumb + .page-header { padding-top: 4rem; }
  .breadcrumb-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 0.6rem; font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; }
  .breadcrumb-inner a { color: var(--gold); text-decoration: none; opacity: 0.8; transition: opacity 0.2s; }
  .breadcrumb-inner a:hover { opacity: 1; }
  .breadcrumb-sep { color: var(--gold); opacity: 0.4; }
  .breadcrumb-current { color: var(--linen); opacity: 0.65; }
  @media (max-width: 800px) {
    .breadcrumb { padding: 0.85rem 1.25rem; }
    .breadcrumb-inner { font-size: 0.72rem; gap: 0.5rem; }
    .main-nav { padding: 0.85rem 1.25rem; }
    .nav-brand svg { width: 36px; height: 32px; }
    .nav-brand-text { font-size: 1.25rem; }
    .nav-links { display: none; }
    .search-wrap { margin-left: auto; }
    .nav-toggle { display: block; }
    .mobile-drawer { display: flex; }
    .page-header { padding: 7rem 1.25rem 1.5rem; }
    section { padding: 2rem 1.25rem; }
    footer { padding: 3rem 1.5rem 2rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
    .footer-brand { justify-content: center; }
  }
  @media (max-width: 480px) {
    .nav-brand-text { font-size: 1.1rem; }
  }
  .back-to-top { position: fixed; bottom: 1.75rem; right: 1.75rem; width: 44px; height: 44px; border-radius: 50%; background: rgba(var(--midnight-rgb), 0.92); border: 0.5px solid rgba(201, 169, 110, 0.5); color: var(--gold); cursor: pointer; z-index: 90; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s, border-color 0.2s; padding: 0; }
  .back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
  .back-to-top:hover { background: var(--gold); color: var(--midnight); border-color: var(--gold); transform: translateY(-2px); }
  .back-to-top svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; }
  @media (max-width: 700px) { .back-to-top { bottom: 1.25rem; right: 1.25rem; width: 42px; height: 42px; } }
  .search-wrap { position: relative; margin-left: 1.5rem; }
  .search-toggle { background: none; border: none; cursor: pointer; padding: 6px; color: var(--gold); display: flex; align-items: center; opacity: 0.8; transition: opacity 0.2s; }
  .search-toggle:hover { opacity: 1; }
  .search-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; }
  .search-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(var(--midnight-rgb), 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 200; padding: 6rem 2rem 2rem; flex-direction: column; align-items: center; }
  .search-overlay.open { display: flex; }
  .search-close { position: absolute; top: 1.5rem; right: 2rem; background: none; border: none; cursor: pointer; color: var(--gold); font-size: 1.5rem; opacity: 0.7; transition: opacity 0.2s; }
  .search-close:hover { opacity: 1; }
  .search-input-wrap { width: 100%; max-width: 600px; position: relative; }
  .search-input { width: 100%; background: rgba(var(--surface-rgb), 0.6); border: 0.5px solid rgba(201, 169, 110, 0.4); border-radius: 4px; padding: 1rem 1.25rem 1rem 3rem; font-family: var(--sans); font-size: 1.1rem; color: var(--parchment); outline: none; transition: border-color 0.2s; }
  .search-input::placeholder { color: var(--linen); opacity: 0.4; }
  .search-input:focus { border-color: var(--gold); }
  .search-input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--gold); fill: none; stroke-width: 1.5; opacity: 0.5; }
  .search-results { width: 100%; max-width: 600px; margin-top: 1rem; max-height: 60vh; overflow-y: auto; }
  .search-result { display: block; padding: 1rem 1.25rem; text-decoration: none; border-bottom: 0.5px solid rgba(201, 169, 110, 0.1); transition: background 0.15s; }
  .search-result:hover { background: rgba(201, 169, 110, 0.08); }
  .search-result-title { color: var(--parchment); font-family: var(--serif); font-size: 1.15rem; margin-bottom: 0.2rem; }
  .search-result-page { color: var(--gold); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; }
  .search-header { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-bottom: 2.5rem; }
  .search-header-mark { width: 60px; opacity: 0.7; }
  .search-header-title { font-family: var(--serif); font-size: 1.6rem; color: var(--parchment); font-weight: 400; }
  .search-header-title em { color: var(--gold); font-style: italic; }
  .search-suggestions { width: 100%; max-width: 600px; margin-top: 2rem; text-align: center; }
  .search-suggestions-label { font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); opacity: 0.5; margin-bottom: 1rem; }
  .search-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
  .search-tag { display: inline-block; text-decoration: none; background: rgba(var(--surface-rgb), 0.5); border: 0.5px solid rgba(201, 169, 110, 0.25); border-radius: 20px; padding: 0.5rem 1rem; color: var(--linen); opacity: 0.8; font-family: var(--sans); font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
  .search-tag:hover { border-color: var(--gold); color: var(--gold); opacity: 1; background: rgba(201, 169, 110, 0.08); }
  .search-shortcut { margin-top: 2rem; font-size: 0.7rem; color: var(--linen); opacity: 0.3; text-align: center; }
  .search-shortcut kbd { background: rgba(201, 169, 110, 0.1); border: 0.5px solid rgba(201, 169, 110, 0.2); border-radius: 3px; padding: 0.15rem 0.4rem; font-family: var(--sans); font-size: 0.65rem; color: var(--gold); }
  .search-empty { text-align: center; color: var(--linen); opacity: 0.5; padding: 3rem 1rem; font-size: 0.95rem; }
