/* Temple of Lucifer — Obsidian / Midnight / Lucifer Blue theme tokens. */
:root{
  color-scheme:dark;
  --black:#050608;
  --background:#050608;
  --background-secondary:#080D14;
  --surface:#0D1520;
  --surface-hover:#101C29;
  --surface-elevated:#111D2B;
  --border:#1A2A3A;
  --border-subtle:#182637;
  --blue-dark:#123B63;
  --blue:#215F9E;
  --blue-hover:#347FC4;
  --blue-light:#79B9F2;
  --blue-pale:#B7DCFF;
  --text-primary:#F4F8FC;
  --text-secondary:#CBD6E2;
  --text-muted:#8FA1B5;
  --blue-rgb:33,95,158;
  --blue-hover-rgb:52,127,196;
  --blue-light-rgb:121,185,242;

  /* Existing component API aliases. */
  --sf-bg:var(--background);
  --sf-surface:rgba(13,21,32,.88);
  --sf-surface-soft:rgba(121,185,242,.035);
  --sf-surface-strong:rgba(17,29,43,.94);
  --sf-border:var(--border);
  --sf-border-strong:rgba(var(--blue-hover-rgb),.42);
  --sf-border-focus:var(--blue-hover);
  --sf-text:var(--text-primary);
  --sf-text-soft:var(--text-secondary);
  --sf-text-muted:var(--text-muted);
  --sf-accent:var(--blue);
  --sf-accent-soft:rgba(var(--blue-rgb),.14);
  --sf-accent-soft-2:rgba(var(--blue-hover-rgb),.20);
  --sf-panel-bg:linear-gradient(180deg,rgba(17,29,43,.92),rgba(8,13,20,.88));
  --sf-panel-soft:linear-gradient(180deg,rgba(16,28,41,.82),rgba(8,13,20,.72));
  --sf-panel-border:var(--border-subtle);
  --sf-final-glass:linear-gradient(180deg,rgba(17,29,43,.94),rgba(8,13,20,.90));
  --sf-final-glass-soft:linear-gradient(180deg,rgba(16,28,41,.86),rgba(8,13,20,.80));
  --sf-final-border:var(--border-subtle);
  --sf-final-border-strong:rgba(var(--blue-hover-rgb),.38);
  --sf-final-highlight:rgba(var(--blue-light-rgb),.12);
  --sf-final-bg:
    radial-gradient(circle at 50% 35%,rgba(var(--blue-hover-rgb),.17) 0%,rgba(18,59,99,.08) 30%,rgba(5,6,8,0) 65%),
    linear-gradient(180deg,var(--background) 0%,var(--background-secondary) 52%,var(--background) 100%);
  --sf-library-crimson:var(--blue);

  /* Legacy feature aliases keep component APIs stable while changing the brand. */
  --adm-bg:var(--background);
  --adm-card:rgba(13,21,32,.88);
  --adm-card2:rgba(16,28,41,.94);
  --adm-border:var(--border);
  --adm-text:var(--text-primary);
  --adm-muted:var(--text-muted);
  --adm-red:var(--blue);
  --adm-red2:var(--blue-dark);
  --adm-blue:var(--blue-light);
  --color-page:var(--background);
  --color-page-secondary:var(--background-secondary);
  --color-surface:var(--surface);
  --color-surface-hover:var(--surface-hover);
  --color-surface-raised:var(--surface-elevated);
  --color-border:var(--border);
  --color-border-soft:var(--border-subtle);
  --color-gold:var(--blue);
  --color-gold-light:var(--blue-light);
  --color-gold-muted:var(--text-muted);
  --color-red:var(--blue);
  --color-red-light:var(--blue-hover);
  --color-red-dark:var(--blue-dark);
  --color-text:var(--text-primary);
  --color-text-secondary:var(--text-secondary);
  --color-text-muted:var(--text-muted);
  --sf-premium-bg:
    radial-gradient(ellipse at 50% 28%,rgba(var(--blue-hover-rgb),.17) 0%,rgba(18,59,99,.09) 38%,rgba(5,6,8,0) 78%),
    linear-gradient(180deg,rgba(5,6,8,.88),rgba(8,13,20,.64) 48%,rgba(5,6,8,.90)),
    url('/assets/sf-bg-blue-black-premium.webp');
}

html{background:var(--background)}
body{color:var(--text-primary)}
body:not(.sf-panel){background-color:var(--background)!important}
body:not(.sf-panel)::before{
  background-image:var(--sf-premium-bg)!important;
  background-size:100% 100%,100% 100%,cover!important;
  background-position:center top,center,center top!important;
  background-repeat:no-repeat!important;
  background-blend-mode:screen,normal,luminosity;
  filter:none!important;
}

::selection{background:rgba(var(--blue-hover-rgb),.35);color:var(--text-primary)}
*{scrollbar-color:var(--blue) var(--background-secondary)}
*::-webkit-scrollbar-track{background:var(--background-secondary)}
*::-webkit-scrollbar-thumb{background:var(--blue);border-color:var(--background-secondary)}
*::-webkit-scrollbar-thumb:hover{background:var(--blue-hover)}

:where(a,button,input,textarea,select,[tabindex]):focus-visible{
  outline:2px solid var(--blue-light);
  outline-offset:3px;
  box-shadow:0 0 0 4px rgba(var(--blue-light-rgb),.18);
}

.sf-topnav{
  background:rgba(5,8,12,.88);
  border-bottom-color:var(--border-subtle);
}
.sf-nav-link,.sf-topnav__link{color:#AEBAC7}
.sf-nav-link:hover,.sf-topnav__link:hover{color:var(--text-primary);border-color:rgba(var(--blue-hover-rgb),.36);background:rgba(var(--blue-rgb),.08)}
.sf-nav-link[aria-current="page"],.sf-topnav__link[aria-current="page"]{color:var(--blue-light);border-color:var(--blue-hover);background:rgba(var(--blue-rgb),.12)}
.sf-user-emoji{filter:drop-shadow(0 0 6px rgba(var(--blue-light-rgb),.26))}

.sf-page-hero,.sf-page-card,.sf-card,.sf-panel,.sf-auth-card,.sf-sidebar,.sf-reader,.adm-content,.adm-sidebar{
  border-color:var(--border-subtle);
  background:linear-gradient(180deg,rgba(17,29,43,.90),rgba(8,13,20,.90));
}
.sf-post-card,.sf-related-card{
  background:linear-gradient(180deg,rgba(13,21,32,.96),rgba(8,13,20,.96));
  border-color:var(--border-subtle);
}
.sf-post-card:hover,.sf-related-card:hover,.sf-card:hover{
  background:linear-gradient(180deg,rgba(16,28,41,.98),rgba(8,13,20,.98));
  border-color:#285E8C;
  box-shadow:0 12px 40px rgba(0,0,0,.30),0 0 28px rgba(var(--blue-hover-rgb),.07);
}
.sf-post-card__title a:hover,.sf-post-card__readmore,.sf-profile-link,a[href^="/profil/u"]{color:var(--blue-light)!important}
.sf-post-card__pentagram{color:var(--blue-light)}

.sf-primary-btn,.sf-auth-submit,.sf-topnav__btn--danger,.sf-btn-danger,.adm-btn-primary{
  color:var(--text-primary)!important;
  border-color:rgba(var(--blue-hover-rgb),.46)!important;
  background:var(--blue)!important;
}
.sf-primary-btn:hover,.sf-auth-submit:hover,.sf-topnav__btn--danger:hover,.sf-btn-danger:hover,.adm-btn-primary:hover{background:var(--blue-hover)!important}

.sf-input,.sf-in,.sf-textarea,.sf-select,select.sf-input,input.sf-input,textarea.sf-textarea,
.sf-auth-form .sf-in,.sf-field input,.sf-field textarea,.adm-input,.adm-textarea,.adm-select{
  background:#0A111A;
  border-color:var(--border);
  color:var(--text-primary);
}
.sf-input::placeholder,.sf-in::placeholder,.sf-textarea::placeholder{color:#66798C}
.sf-input:focus,.sf-in:focus,.sf-textarea:focus,.sf-select:focus,.adm-input:focus,.adm-textarea:focus,.adm-select:focus{
  border-color:var(--blue-hover)!important;
  box-shadow:0 0 0 3px rgba(var(--blue-hover-rgb),.12);
}

.sf-chip,.sf-pill,.sf-cat-badge,.adm-pill{
  color:var(--blue-light);
  border-color:rgba(var(--blue-hover-rgb),.30);
  background:rgba(var(--blue-rgb),.12);
}

article.prose,article.prose p,.sf-article-body{color:var(--text-secondary)}
article.prose h1,article.prose h2,article.prose h3,article.prose h4{color:var(--text-primary)}
article.prose a{color:var(--blue-light)}
article.prose a:hover{color:var(--blue-pale)}
article.prose blockquote{
  color:#D7E2EC;
  background:#0C1722;
  border-left-color:var(--blue-hover);
}

.sf-categories-page{
  --cat-bg:var(--background);
  --cat-surface:var(--surface);
  --cat-surface-raised:var(--surface-elevated);
  --cat-line:var(--border);
  --cat-line-soft:var(--border-subtle);
  --cat-text:var(--text-primary);
  --cat-muted:var(--text-secondary);
  --cat-dim:var(--text-muted);
  --cat-red:var(--blue);
  --cat-red-bright:var(--blue-hover);
  --cat-gold:var(--blue-light);
}
.sf-about-page{
  --about-bg:var(--background);
  --about-text:var(--text-primary);
  --about-muted:var(--text-secondary);
  --about-dim:var(--text-muted);
  --about-red:var(--blue);
  --about-red-bright:var(--blue-hover);
}

body.sf-panel,.sf-auth-body{
  background:
    radial-gradient(circle at 50% 18%,rgba(var(--blue-hover-rgb),.13),transparent 42%),
    linear-gradient(180deg,rgba(5,6,8,.90),rgba(8,13,20,.74) 48%,rgba(5,6,8,.92)),
    url('/assets/sf-bg-blue-black-premium.webp') center/cover fixed no-repeat,
    var(--background)!important;
}

.sf-site-footer{border-top-color:var(--border-subtle);background:rgba(5,8,12,.82)}
.sf-site-footer a:hover{color:var(--blue-pale)}

.sf-rules-hero,.sf-auth-aside{
  background:
    radial-gradient(900px 420px at 18% 0%,rgba(var(--blue-hover-rgb),.16),transparent 55%),
    linear-gradient(180deg,rgba(17,29,43,.90),rgba(8,13,20,.88));
}
.sf-rules-body blockquote{background:#0C1722;border-left-color:var(--blue-hover);color:#D7E2EC}
.sf-rules-body a,.sf-about-page a,.sf-category-page a{color:var(--blue-light)}
.sf-rules-body a:hover,.sf-about-page a:hover,.sf-category-page a:hover{color:var(--blue-pale)}

.sf-home-page .sf-card-linkable,.sf-category-card,.sf-book,.sf-top-bookbtn,.sf-mini-card,.sf-badge-chip{
  border-color:var(--border-subtle);
}
.sf-home-page .sf-card-linkable:hover,.sf-category-card:hover,.sf-book:hover,.sf-top-bookbtn:hover,.sf-mini-card:hover{
  border-color:#285E8C;
}

/* Legacy Tailwind class names remain in server-rendered markup; their brand role is blue. */
.text-red-300,.text-red-400,.text-red-500{color:var(--blue-light)!important}
.text-red-600,.text-red-700{color:var(--blue)!important}
.text-red-900,.text-red-950{color:var(--blue-dark)!important}
.bg-red-600,.bg-red-700{background-color:var(--blue)!important}
.bg-red-800,.bg-red-900,.bg-red-950{background-color:var(--blue-dark)!important}
.border-red-500,.border-red-600{border-color:var(--blue-hover)!important}
.border-red-900{border-color:var(--blue-dark)!important}
[class~="border-red-900/30"]{border-color:rgba(var(--blue-hover-rgb),.30)!important}
[class~="border-red-900/40"]{border-color:rgba(var(--blue-hover-rgb),.40)!important}
[class~="border-red-900/50"]{border-color:rgba(var(--blue-hover-rgb),.50)!important}
.hover\:text-red-300:hover,.hover\:text-red-400:hover,.hover\:text-red-500:hover{color:var(--blue-pale)!important}
.group:hover .group-hover\:text-red-400,.group:hover .group-hover\:text-red-500{color:var(--blue-pale)!important}
.hover\:border-red-500:hover,.hover\:border-red-600:hover,.hover\:border-red-900:hover{border-color:var(--blue-hover)!important}
[class~="hover:shadow-red-900/50"]:hover{--tw-shadow-color:rgba(var(--blue-rgb),.50)!important}
[class~="shadow-red-900/20"]{--tw-shadow-color:rgba(var(--blue-rgb),.20)!important}
.focus\:border-red-500:focus,.focus\:border-red-600:focus{border-color:var(--blue-light)!important}
.focus\:ring-red-600:focus{--tw-ring-color:rgba(var(--blue-hover-rgb),.65)!important}
.from-red-950\/20{--tw-gradient-from:rgba(18,59,99,.20) var(--tw-gradient-from-position)!important;--tw-gradient-to:rgba(18,59,99,0) var(--tw-gradient-to-position)!important}
.from-red-950\/30{--tw-gradient-from:rgba(18,59,99,.30) var(--tw-gradient-from-position)!important;--tw-gradient-to:rgba(18,59,99,0) var(--tw-gradient-to-position)!important}
.via-red-900{--tw-gradient-to:rgba(18,59,99,0) var(--tw-gradient-to-position)!important;--tw-gradient-stops:var(--tw-gradient-from),var(--blue-dark) var(--tw-gradient-via-position),var(--tw-gradient-to)!important}
.occult-glow{text-shadow:0 0 18px rgba(var(--blue-hover-rgb),.28)!important}
.pentagram-bg{background-image:radial-gradient(circle at center,transparent 30%,rgba(0,0,0,.95) 100%),repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(var(--blue-rgb),.035) 2px,rgba(var(--blue-rgb),.035) 4px)!important}

/* Semantic states deliberately remain red/green/amber. */
.sf-status-card--error,.sf-toast--error,[aria-invalid="true"]{--sf-danger:#ef4444}
.sf-status-card--error,.sf-toast--error,.sf-auth-msg.is-error,.sf-error,.error,[aria-invalid="true"]{
  border-color:rgba(239,68,68,.34)!important;
}
.sf-btn-danger.sf-semantic-danger,#btnReportProfile,
.adm-btn-danger,#banIpBtn,#fcDeleteRun{
  color:#fff!important;
  border-color:rgba(239,68,68,.48)!important;
  background:linear-gradient(180deg,rgba(239,68,68,.26),rgba(127,29,29,.24))!important;
}
.sf-btn-danger.sf-semantic-danger:hover,#btnReportProfile:hover,
.adm-btn-danger:hover,#banIpBtn:hover,#fcDeleteRun:hover{
  background:rgba(239,68,68,.30)!important;
}

/* Editorial disclosure: avoids a nested scroll box for the long home guide. */
.sf-home-seo-guide{padding:clamp(1.2rem,3vw,1.8rem)!important;border-radius:18px!important}
.sf-home-seo-guide__intro{max-width:54rem}
.sf-home-seo-guide__kicker{color:var(--blue-light);font:800 .68rem/1.3 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.14em;text-transform:uppercase}
.sf-home-seo-guide__intro h2{margin:.55rem 0 .55rem!important;font-size:clamp(1.25rem,2.6vw,1.75rem)!important}
.sf-home-seo-guide__intro p{margin:0!important;color:var(--text-secondary)!important}
.sf-home-seo-guide__details{margin-top:1.2rem;border-top:1px solid var(--border-subtle)}
.sf-home-seo-guide__details summary{min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem 0;color:var(--text-primary);font:800 .8rem/1.4 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.05em;cursor:pointer;list-style:none}
.sf-home-seo-guide__details summary::-webkit-details-marker{display:none}
.sf-home-seo-guide__details summary::after{content:"+";width:30px;height:30px;display:grid;place-items:center;flex:0 0 auto;border:1px solid rgba(var(--blue-hover-rgb),.34);border-radius:50%;color:var(--blue-light);font-size:1.1rem}
.sf-home-seo-guide__details[open] summary::after{content:"−"}
.sf-home-seo-guide__summary-meta{margin-left:auto;color:var(--text-muted);font-size:.72rem;font-weight:600;letter-spacing:0}
.sf-home-seo-guide__scroll{max-height:none!important;overflow:visible!important;padding:1.25rem 0 .25rem!important;border:0!important;background:transparent!important;box-shadow:none!important}
@media (max-width:640px){.sf-home-seo-guide__summary-meta{display:none}.sf-home-seo-guide__details summary{font-size:.76rem}.sf-home-seo-guide__scroll{padding-top:1rem!important}}
