/* ═══════════════════════════════════════════════════════════════
   FMRP LEO POLICY MANUAL — STYLES
   Design language shared with floridamanrp.com rules site.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --primary-orange: #FF8C42;
    --orange-deep: #FF6B35;
    --primary-blue: #0D7FFF;
    --light-blue: #3B9AFF;
    --dark-blue: #0A1628;
    --mid-blue: #0d1f3a;
    --surface: #0f1f38;
    --surface-2: #132847;
    --accent-yellow: #FFD700;
    --text-light: #F5F5F5;
    --text-muted: rgba(245,245,245,0.55);
    --gradient-1: linear-gradient(135deg,#FF8C42 0%,#FF6B35 100%);
    --gradient-2: linear-gradient(135deg,#0D7FFF 0%,#3B9AFF 100%);
    --sidebar-width: 292px;
    --header-h: 64px;
    --line: rgba(255,255,255,0.07);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
    font-family:'Outfit',sans-serif;
    background:var(--dark-blue);
    color:var(--text-light);
    line-height:1.75;
    overflow-x:hidden;
}
::selection { background:rgba(255,140,66,0.35); }

/* ─── Particles ──────────────────────────────────── */
#particles {
    position:fixed; inset:0;
    width:100%; height:100%;
    z-index:0; pointer-events:none;
}

/* ─── Header ─────────────────────────────────────── */
.manual-header {
    position:fixed; top:0; left:0; right:0;
    height:var(--header-h);
    background:rgba(10,22,40,0.95);
    backdrop-filter:blur(12px);
    border-bottom:1px solid rgba(255,140,66,0.18);
    display:flex; align-items:center; justify-content:space-between;
    gap:1rem;
    padding:0 1.5rem;
    z-index:1000;
}
.header-brand {
    display:flex; align-items:center; gap:0.75rem;
    text-decoration:none; flex-shrink:0;
}
.header-brand img {
    width:38px; height:38px; object-fit:contain;
    filter:drop-shadow(0 0 6px rgba(255,140,66,0.4));
}
.brand-text { display:flex; flex-direction:column; line-height:1.05; }
.brand-top {
    font-family:'Bebas Neue',sans-serif;
    font-size:1.15rem; letter-spacing:2px;
    background:var(--gradient-1);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.brand-sub {
    font-size:0.62rem; letter-spacing:3.5px; text-transform:uppercase;
    color:var(--text-muted); font-weight:600;
}

.header-center { flex:1; display:flex; justify-content:center; min-width:0; }

/* Tabs */
.tab-bar {
    display:flex;
    background:rgba(255,255,255,0.04);
    border:1px solid rgba(255,255,255,0.08);
    border-radius:9px; overflow:hidden;
}
.tab-btn {
    padding:0.5rem 1.3rem;
    background:transparent; border:none;
    color:var(--text-muted);
    font-family:'Outfit',sans-serif;
    font-size:0.85rem; font-weight:600; letter-spacing:0.4px;
    cursor:pointer; transition:all .2s ease; white-space:nowrap;
}
.tab-btn .tab-count {
    margin-left:0.45rem; font-size:0.7rem; opacity:0.7;
}
.tab-btn.active { background:var(--gradient-1); color:#fff; }
.tab-btn:hover:not(.active) { color:var(--text-light); }

/* Search */
.header-right { flex-shrink:0; }
.search-wrap { position:relative; }
.search-icon {
    position:absolute; left:0.7rem; top:50%; transform:translateY(-50%);
    width:15px; height:15px; color:var(--text-muted); pointer-events:none;
}
#search-input {
    width:250px;
    padding:0.5rem 2.1rem 0.5rem 2.15rem;
    background:rgba(255,255,255,0.05);
    border:1px solid rgba(255,255,255,0.1);
    border-radius:9px;
    color:var(--text-light);
    font-family:'Outfit',sans-serif; font-size:0.85rem;
    outline:none; transition:all .2s ease;
}
#search-input:focus {
    border-color:rgba(255,140,66,0.55);
    background:rgba(255,140,66,0.05);
    width:300px;
}
#search-input::placeholder { color:var(--text-muted); }
#search-input::-webkit-search-cancel-button { -webkit-appearance:none; }
.search-kbd {
    position:absolute; right:0.6rem; top:50%; transform:translateY(-50%);
    font-family:'Outfit',sans-serif; font-size:0.68rem;
    color:var(--text-muted);
    border:1px solid rgba(255,255,255,0.15);
    border-radius:4px; padding:0 0.35rem; line-height:1.4;
    pointer-events:none;
}
.search-wrap.searching .search-kbd { display:none; }

/* Search results dropdown */
.search-results {
    position:absolute; top:calc(100% + 8px); right:0;
    width:min(480px, 92vw);
    max-height:min(560px, 72vh);
    overflow-y:auto;
    background:rgba(13,31,58,0.98);
    backdrop-filter:blur(14px);
    border:1px solid rgba(255,140,66,0.25);
    border-radius:12px;
    box-shadow:0 18px 50px rgba(0,0,0,0.55);
    padding:0.4rem;
    z-index:1200;
}
.search-results::-webkit-scrollbar { width:5px; }
.search-results::-webkit-scrollbar-thumb { background:rgba(255,140,66,0.3); border-radius:4px; }
.sr-meta {
    padding:0.45rem 0.8rem 0.35rem;
    font-size:0.7rem; letter-spacing:1.5px; text-transform:uppercase;
    color:var(--text-muted); font-weight:700;
}
.sr-item {
    display:block; width:100%; text-align:left;
    background:transparent; border:none; cursor:pointer;
    padding:0.6rem 0.8rem;
    border-radius:8px;
    font-family:'Outfit',sans-serif;
    color:var(--text-light);
    transition:background .15s ease;
}
.sr-item:hover, .sr-item.kb-active { background:rgba(255,140,66,0.1); }
.sr-item .sr-where {
    display:flex; align-items:baseline; gap:0.5rem; margin-bottom:0.15rem;
}
.sr-item .sr-num {
    font-family:'Bebas Neue',sans-serif;
    font-size:0.85rem; letter-spacing:1.5px;
    color:var(--primary-orange);
}
.sr-item .sr-sec {
    font-size:0.78rem; font-weight:600;
    color:var(--light-blue);
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.sr-item .sr-snippet {
    font-size:0.8rem; color:rgba(245,245,245,0.72); line-height:1.5;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.sr-item mark, .doc-main mark {
    background:rgba(255,215,0,0.28);
    color:var(--accent-yellow);
    border-radius:3px; padding:0 2px;
}
.sr-empty {
    padding:1rem 0.9rem; font-size:0.85rem; color:var(--text-muted);
}

/* ─── Layout ─────────────────────────────────────── */
.docs-layout {
    display:flex;
    margin-top:var(--header-h);
    min-height:calc(100vh - var(--header-h));
    position:relative; z-index:2;
}

/* ─── Sidebar ────────────────────────────────────── */
.sidebar {
    width:var(--sidebar-width); flex-shrink:0;
    position:sticky; top:var(--header-h);
    height:calc(100vh - var(--header-h));
    overflow-y:auto;
    background:rgba(10,22,40,0.7);
    backdrop-filter:blur(8px);
    border-right:1px solid var(--line);
    padding:1.4rem 0 3rem;
}
.sidebar::-webkit-scrollbar { width:4px; }
.sidebar::-webkit-scrollbar-thumb { background:rgba(255,140,66,0.3); border-radius:4px; }
.sidebar-title {
    font-family:'Bebas Neue',sans-serif;
    font-size:0.82rem; letter-spacing:3px;
    color:var(--text-muted);
    padding:0 1.25rem 0.7rem;
    text-transform:uppercase;
    border-bottom:1px solid var(--line);
    margin-bottom:0.6rem;
}
.sidebar-nav { list-style:none; }
.sidebar-nav a {
    display:flex; align-items:baseline; gap:0.6rem;
    padding:0.5rem 1.25rem;
    font-size:0.83rem; color:var(--text-muted);
    text-decoration:none;
    border-left:2px solid transparent;
    transition:all .18s ease; line-height:1.35;
}
.sidebar-nav a .nav-num {
    font-family:'Bebas Neue',sans-serif;
    font-size:0.82rem; letter-spacing:1px;
    color:rgba(255,140,66,0.65);
    flex-shrink:0; min-width:58px;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    color:var(--text-light);
    border-left-color:var(--primary-orange);
    background:rgba(255,140,66,0.06);
}
.sidebar-nav a.active .nav-num { color:var(--primary-orange); }

/* ─── Main ───────────────────────────────────────── */
.doc-main {
    flex:1; min-width:0;
    padding:2.75rem 3.25rem 6rem;
    max-width:940px;
}

/* Hero */
.doc-hero { margin-bottom:2.75rem; }
.doc-hero .eyebrow {
    display:inline-block;
    font-size:0.72rem; letter-spacing:3px; text-transform:uppercase;
    color:var(--primary-orange); font-weight:700;
    margin-bottom:0.6rem;
}
.doc-hero h1 {
    font-family:'Bebas Neue',sans-serif;
    font-size:clamp(2.4rem,5vw,3.4rem);
    letter-spacing:3px;
    background:var(--gradient-1);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
    line-height:1.08; margin-bottom:0.9rem;
}
.doc-hero .doc-meta {
    font-size:0.85rem; color:var(--text-muted);
    padding:0.65rem 1rem;
    background:rgba(255,140,66,0.06);
    border-left:3px solid var(--primary-orange);
    border-radius:0 6px 6px 0;
    line-height:1.7; max-width:70ch;
}

/* ─── Directive card ─────────────────────────────── */
.directive {
    margin-bottom:3.25rem;
    scroll-margin-top:calc(var(--header-h) + 16px);
}
.directive-head {
    background:linear-gradient(135deg, rgba(19,40,71,0.85), rgba(13,31,58,0.85));
    border:1px solid rgba(59,154,255,0.18);
    border-radius:14px 14px 0 0;
    padding:1.3rem 1.6rem 1.15rem;
    display:flex; align-items:flex-start; gap:1.1rem;
}
.directive-num {
    font-family:'Bebas Neue',sans-serif;
    font-size:1.05rem; letter-spacing:1.5px;
    background:var(--gradient-1);
    color:#fff;
    border-radius:8px;
    padding:0.35rem 0.7rem 0.25rem;
    white-space:nowrap;
    box-shadow:0 4px 14px rgba(255,107,53,0.3);
    flex-shrink:0;
    margin-top:0.2rem;
}
.directive-titles { min-width:0; }
.directive-titles h2 {
    font-family:'Bebas Neue',sans-serif;
    font-size:clamp(1.5rem,2.6vw,2rem);
    letter-spacing:2px; line-height:1.12;
    background:var(--gradient-2);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.directive-titles .directive-sub {
    font-size:0.88rem; color:var(--text-muted); margin-top:0.2rem;
}
.directive-meta {
    display:flex; flex-wrap:wrap; gap:0.4rem 1.4rem;
    background:rgba(10,22,40,0.5);
    border:1px solid rgba(59,154,255,0.14); border-top:none;
    padding:0.5rem 1.6rem;
    font-size:0.72rem; letter-spacing:1px; text-transform:uppercase;
    color:var(--text-muted); font-weight:600;
}
.directive-meta strong { color:rgba(245,245,245,0.8); font-weight:700; }
.directive-body {
    border:1px solid var(--line); border-top:none;
    border-radius:0 0 14px 14px;
    background:rgba(15,31,56,0.35);
    padding:0.5rem 1.6rem 1.4rem;
}

/* Sections */
.pol-section {
    padding-top:1.4rem;
    scroll-margin-top:calc(var(--header-h) + 14px);
}
.pol-section + .pol-section { border-top:1px solid var(--line); margin-top:1.4rem; }
.pol-section h3 {
    font-family:'Bebas Neue',sans-serif;
    font-size:1.22rem; letter-spacing:1.6px;
    color:var(--primary-orange);
    margin-bottom:0.75rem;
}
.pol-section p {
    font-size:0.96rem; color:rgba(245,245,245,0.88);
    margin-bottom:0.9rem; max-width:75ch;
}
.pol-section strong { color:var(--primary-orange); font-weight:700; }

/* Rule lists — lettered like real directives */
.rule-list { list-style:none; counter-reset:rule; margin-bottom:0.9rem; }
.rule-list > li {
    counter-increment:rule;
    position:relative;
    padding:0.45rem 0 0.45rem 2.3rem;
    font-size:0.94rem; color:rgba(245,245,245,0.86);
    line-height:1.7; max-width:78ch;
}
.rule-list > li::before {
    content:counter(rule, upper-alpha) ".";
    position:absolute; left:0.35rem; top:0.45rem;
    font-family:'Bebas Neue',sans-serif;
    font-size:0.95rem; letter-spacing:1px;
    color:var(--light-blue);
    width:1.5rem;
}
.rule-list > li + li { border-top:1px dashed rgba(255,255,255,0.05); }
.rule-list ul { list-style:disc; margin:0.35rem 0 0 1.2rem; }
.rule-list ul li { font-size:0.9rem; color:rgba(245,245,245,0.75); margin-bottom:0.3rem; }

/* Note callout */
.pol-note {
    margin:1rem 0 0.4rem;
    padding:0.75rem 1.1rem;
    background:rgba(59,154,255,0.07);
    border-left:3px solid var(--light-blue);
    border-radius:0 8px 8px 0;
    font-size:0.88rem; color:rgba(245,245,245,0.8);
    line-height:1.65; max-width:75ch;
}
.pol-note::before {
    content:"★  ";
    color:var(--accent-yellow);
}

/* Radio exchange */
.radio-block {
    margin:0.9rem 0 1rem;
    background:rgba(10,22,40,0.65);
    border:1px solid rgba(255,255,255,0.08);
    border-radius:10px;
    padding:0.9rem 1.1rem;
    max-width:560px;
    font-size:0.88rem;
}
.radio-line { display:flex; gap:0.7rem; padding:0.28rem 0; }
.radio-line .r-who {
    font-family:'Bebas Neue',sans-serif;
    letter-spacing:1.2px; font-size:0.86rem;
    color:var(--primary-orange);
    min-width:74px; flex-shrink:0; text-align:right;
    padding-top:0.08rem;
}
.radio-line.r-disp .r-who { color:var(--light-blue); }
.radio-line .r-msg { color:rgba(245,245,245,0.88); }

/* Flash highlight on jump */
@keyframes flashTarget {
    0% { background:rgba(255,215,0,0.16); }
    100% { background:transparent; }
}
.flash-target { animation:flashTarget 1.8s ease-out 1; border-radius:8px; }

/* ─── Footer ─────────────────────────────────────── */
.manual-footer {
    position:relative; z-index:10;
    background:rgba(10,22,40,0.95);
    border-top:1px solid rgba(255,140,66,0.15);
    padding:1.6rem 2rem;
    text-align:center;
    color:rgba(245,245,245,0.45);
    font-size:0.82rem; line-height:1.7;
}
.manual-footer a { color:var(--primary-orange); text-decoration:none; }
.manual-footer a:hover { text-decoration:underline; }
.footer-links { margin-top:0.4rem; }
.footer-fine { margin-top:0.5rem; font-size:0.72rem; opacity:0.7; }

/* ─── Sidebar toggle (mobile) ────────────────────── */
.sidebar-toggle {
    display:none;
    position:fixed; bottom:1.4rem; right:1.4rem;
    width:50px; height:50px; border-radius:50%;
    background:var(--gradient-1);
    border:none; cursor:pointer;
    box-shadow:0 6px 20px rgba(255,140,66,0.35);
    z-index:900;
    align-items:center; justify-content:center;
}
.sidebar-toggle svg { width:22px; height:22px; color:#fff; }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 1080px) {
    #search-input { width:180px; }
    #search-input:focus { width:230px; }
}
@media (max-width: 900px) {
    :root { --header-h: 104px; }
    .manual-header { flex-wrap:wrap; height:auto; padding:0.6rem 1rem; row-gap:0.55rem; }
    .header-center { order:3; flex:1 1 100%; justify-content:flex-start; }
    .docs-layout { margin-top:0; }
    body { padding-top:112px; }
    .manual-header { position:fixed; }
    .sidebar {
        position:fixed; top:0; left:0; bottom:0;
        padding-top:120px;
        transform:translateX(-100%);
        transition:transform .3s ease;
        z-index:800;
        background:rgba(10,22,40,0.98);
        width:min(320px, 84vw);
        height:100vh;
    }
    .sidebar.open { transform:translateX(0); }
    .doc-main { padding:1.75rem 1.25rem 5rem; }
    .sidebar-toggle { display:flex; }
    .directive-head { flex-direction:column; gap:0.6rem; padding:1.1rem 1.15rem 1rem; }
    .directive-meta, .directive-body { padding-left:1.15rem; padding-right:1.15rem; }
}
@media (max-width: 560px) {
    .brand-sub { display:none; }
    #search-input { width:100%; }
    .header-right { flex:1; }
    .search-wrap { width:100%; }
}

/* ─── Print ──────────────────────────────────────── */
@media print {
    body { background:#fff; color:#111; padding-top:0; }
    #particles, .manual-header, .sidebar, .sidebar-toggle, .manual-footer { display:none !important; }
    .docs-layout { margin-top:0; }
    .doc-main { max-width:100%; padding:0; }
    .doc-hero h1, .directive-titles h2, .pol-section h3, .brand-top {
        -webkit-text-fill-color:initial; background:none; color:#111;
    }
    .directive-head, .directive-meta, .directive-body {
        background:none; border-color:#ccc;
    }
    .directive-num { background:#333; box-shadow:none; }
    .pol-section p, .rule-list > li, .pol-note, .directive-sub { color:#222; max-width:none; }
    .pol-section strong { color:#000; }
    .rule-list > li::before { color:#555; }
    .pol-note { background:#f3f3f3; border-left-color:#888; }
    .radio-block { background:#f7f7f7; border-color:#ccc; }
    .radio-line .r-msg { color:#222; }
    .directive { page-break-inside:avoid; }
}
