/* ============================================================
   reglas.css — Página pública de Reglas del Servidor
   AstrumLux Network
   ============================================================ */

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

:root {
    --accent:       #5865F2;
    --accent-light: #818cf8;
    --bg:           #0a0e1a;
    --surface:      rgba(255,255,255,.035);
    --border:       rgba(255,255,255,.07);
    --text:         #e2e4f0;
    --text-muted:   rgba(255,255,255,.45);
    --radius-card:  16px;
}

html { scroll-padding-top: 80px; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── Login fijo ─────────────────────────────────────────── */
.fixed-login {
    position: fixed; top: 1.5rem; right: 1.5rem; z-index: 1000;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 12px;
    background: #5865F2; color: #fff;
    font-weight: 700; font-size: 14px; text-decoration: none;
    transition: background .2s, transform .2s;
    box-shadow: 0 4px 20px rgba(88,101,242,.4);
}
.fixed-login:hover { background: #4752c4; transform: translateY(-1px); }

/* ── User button ────────────────────────────────────────── */
.user-account-fixed { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 1001; }
.user-account-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px; border-radius: 12px;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    color: #fff; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600;
    transition: all .2s;
}
.user-account-btn:hover { background: rgba(255,255,255,.1); }
.user-account-avatar { width: 28px; height: 28px; border-radius: 50%; }
.user-account-arrow { font-size: 11px; color: rgba(255,255,255,.5); transition: transform .2s; }
.user-account-fixed.active .user-account-arrow { transform: rotate(180deg); }
.user-account-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: #16151f; border: 1px solid rgba(88,101,242,.2); border-radius: 12px;
    padding: 6px; min-width: 200px;
    box-shadow: 0 16px 48px rgba(0,0,0,.5); display: none;
}
.user-account-fixed.active .user-account-dropdown { display: block; }
.user-account-dropdown-menu { display: flex; flex-direction: column; gap: 2px; }
.user-account-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    color: rgba(255,255,255,.7); text-decoration: none;
    font-size: 13px; font-weight: 500; transition: all .15s;
}
.user-account-dropdown-item:hover { background: rgba(88,101,242,.12); color: #fff; }
.user-account-dropdown-item i { width: 16px; text-align: center; color: rgba(255,255,255,.4); }
.user-account-dropdown-divider { height: 1px; background: rgba(255,255,255,.07); margin: 4px 0; }

/* ══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
.reglas-hero {
    position: relative; min-height: 46vh;
    display: flex; align-items: center; justify-content: center;
    padding: 6rem 2rem 2.5rem; overflow: hidden;
    background:
        radial-gradient(ellipse 70% 60% at 10% 40%,  rgba(88,101,242,.2)  0%, transparent 65%),
        radial-gradient(ellipse 50% 45% at 90% 20%,  rgba(139,92,246,.12) 0%, transparent 65%),
        radial-gradient(ellipse 60% 50% at 50% 110%, rgba(69,34,160,.18)  0%, transparent 65%),
        linear-gradient(180deg, #0d1224 0%, var(--bg) 100%);
}
.reglas-hero[style*="--hero-bg"]::before {
    content: ''; position: absolute; inset: 0;
    background: var(--hero-bg) center/cover no-repeat; opacity: .07;
}
.reglas-hero-inner {
    position: relative; z-index: 1; max-width: 860px; width: 100%;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 1rem; padding-bottom: 0;
}
.reglas-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 18px; border-radius: 20px;
    background: rgba(88,101,242,.13); border: 1px solid rgba(88,101,242,.28);
    color: var(--accent-light); font-size: 13px; font-weight: 700; letter-spacing: .03em;
}
.reglas-hero-title {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 900; letter-spacing: -.02em;
    background: linear-gradient(135deg, #e0e7ff 0%, #fff 25%, #a78bfa 60%, #60a5fa 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1;
}
.reglas-hero-sub {
    font-size: clamp(1rem, 2vw, 1.15rem); color: rgba(255,255,255,.48); max-width: 560px;
}
.reglas-last-updated {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; color: rgba(255,255,255,.32);
    margin-top: 0.75rem;
}
.reglas-last-updated i { font-size: 0.72rem; opacity: .7; }
.reglas-last-updated strong { color: rgba(255,255,255,.5); font-weight: 600; }

/* ── Tab nav ─────────────────────────────────────────────── */
.reglas-tab-nav {
    display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
    margin-top: 1.75rem; padding: 6px;
    background: rgba(255,255,255,.03); border: 1px solid var(--border);
    border-radius: 16px; transition: all .3s;
}
.reglas-tab-nav.sticky {
    position: fixed; top: 0; left: 0; right: 0; z-index: 500;
    margin: 0; border-radius: 0; border-top: none; border-left: none; border-right: none;
    background: rgba(10,14,26,.93); backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(88,101,242,.18);
    box-shadow: 0 4px 24px rgba(0,0,0,.45); padding: 8px 16px;
}
.reglas-tab-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 10px; border: 1px solid transparent;
    background: transparent; color: rgba(255,255,255,.5);
    font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.reglas-tab-btn:hover { color: #fff; background: rgba(88,101,242,.1); }
.reglas-tab-btn.active {
    background: rgba(88,101,242,.17); border-color: rgba(88,101,242,.38); color: #fff;
    box-shadow: 0 2px 12px rgba(88,101,242,.18);
}
.tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 20px;
    background: rgba(88,101,242,.2); color: var(--accent-light);
    font-size: 11px; font-weight: 800;
}
.reglas-tab-btn.active .tab-count { background: rgba(88,101,242,.38); color: #fff; }

/* ══════════════════════════════════════════════════════════
   LAYOUT: SIDEBAR + CONTENT
══════════════════════════════════════════════════════════ */
.reglas-layout {
    display: grid; grid-template-columns: 260px minmax(0, 1fr);
    gap: 2rem; max-width: 1200px; margin: 0 auto;
    padding: 2.5rem 2rem 6rem; align-items: start;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════ */
.reglas-sidebar {
    position: sticky; top: 72px;
    max-height: calc(100vh - 90px);
    overflow-y: auto; overflow-x: hidden;
    background: rgba(255,255,255,.025); border: 1px solid var(--border);
    border-radius: 16px; display: flex; flex-direction: column;
    scrollbar-width: thin; scrollbar-color: rgba(88,101,242,.3) transparent;
}
.reglas-sidebar::-webkit-scrollbar { width: 4px; }
.reglas-sidebar::-webkit-scrollbar-track { background: transparent; }
.reglas-sidebar::-webkit-scrollbar-thumb { background: rgba(88,101,242,.3); border-radius: 4px; }

.sidebar-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; font-size: 13px; font-weight: 800;
    letter-spacing: .04em; text-transform: uppercase; color: var(--accent-light);
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sidebar-toc { flex: 1; overflow-y: auto; padding: 10px 8px; overflow-x: hidden; }

.stoc-group { margin-bottom: 6px; }
.stoc-group-header {
    display: flex; align-items: center; gap: 7px; padding: 6px 8px;
    font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .05em; color: rgba(255,255,255,.3); border-radius: 6px;
}
.stoc-group-num {
    width: 18px; height: 18px; border-radius: 5px;
    background: rgba(88,101,242,.2); color: var(--accent-light);
    font-size: 10px; font-weight: 900;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stoc-list { list-style: none; padding: 2px 0 4px 4px; }
.stoc-list li + li { margin-top: 1px; }
.stoc-link {
    display: flex; align-items: baseline; gap: 7px;
    padding: 6px 10px; border-radius: 8px;
    color: rgba(255,255,255,.45); text-decoration: none;
    font-size: 12.5px; font-weight: 500; line-height: 1.4;
    transition: all .15s; border: 1px solid transparent;
}
.stoc-link:hover { background: rgba(88,101,242,.08); color: rgba(255,255,255,.75); border-color: rgba(88,101,242,.15); }
.stoc-link.active { background: rgba(88,101,242,.14); border-color: rgba(88,101,242,.28); color: #fff; }
.stoc-num { flex-shrink: 0; font-size: 10px; font-weight: 800; font-family: monospace; color: var(--accent-light); opacity: .7; min-width: 26px; }
.stoc-link.active .stoc-num { opacity: 1; }
.stoc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-back-top {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 16px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.3);
    border: none; background: none; cursor: pointer; font-family: inherit;
    border-top: 1px solid var(--border); transition: color .15s; flex-shrink: 0;
}
.sidebar-back-top:hover { color: rgba(255,255,255,.6); }

/* ══════════════════════════════════════════════════════════
   SECTIONS / GROUPS
══════════════════════════════════════════════════════════ */
.reglas-section { display: none; }
.reglas-section.active { display: block; animation: secFadeIn .28s ease-out; }
@keyframes secFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.rules-group { margin-bottom: 3.5rem; }
.rules-group-header {
    display: flex; align-items: flex-start; gap: 14px;
    margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.rules-group-num {
    flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 900; color: #fff;
    box-shadow: 0 4px 16px rgba(88,101,242,.35); margin-top: 2px;
}
.rules-group-info { flex: 1; min-width: 0; }
.rules-group-title { font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.rules-group-desc { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-style: italic; line-height: 1.5; }
.rules-list { display: flex; flex-direction: column; gap: 10px; }

/* ══════════════════════════════════════════════════════════
   RULE CARD
══════════════════════════════════════════════════════════ */
.rule-card {
    background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid transparent; border-radius: var(--radius-card);
    padding: 20px 22px;
    transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}
.rule-card:hover {
    background: rgba(88,101,242,.04); border-color: rgba(88,101,242,.22);
    border-left-color: var(--accent); transform: translateX(2px);
    box-shadow: 0 4px 24px rgba(0,0,0,.2);
}

/* Severity left-border */
.sev-accent-low      { border-left-color: rgba(251,191,36,.55); }
.sev-accent-medium   { border-left-color: rgba(249,115,22,.6);  }
.sev-accent-high     { border-left-color: rgba(239,68,68,.65);  }
.sev-accent-critical { border-left-color: rgba(220,38,38,.8);   }

/* Deep-link highlight */
.rule-card.highlight { animation: ruleHighlight 2s ease-out forwards; }
@keyframes ruleHighlight {
    0%  { box-shadow: 0 0 0 3px rgba(88,101,242,.6); background: rgba(88,101,242,.1); }
    100%{ box-shadow: none; background: var(--surface); }
}

/* Card header */
.rule-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rule-num-tag {
    flex-shrink: 0; padding: 3px 10px; border-radius: 6px;
    background: rgba(88,101,242,.13); border: 1px solid rgba(88,101,242,.22);
    color: var(--accent-light); font-size: 12px; font-weight: 800; font-family: monospace; letter-spacing: .02em;
}
.rule-title { font-size: .98rem; font-weight: 700; color: #fff; flex: 1; min-width: 0; }
.rule-head-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }

/* Severity badges */
.severity-badge {
    display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 20px;
    font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.sev-low      { background: rgba(251,191,36,.1);  border: 1px solid rgba(251,191,36,.28); color: #fbbf24; }
.sev-medium   { background: rgba(249,115,22,.1);  border: 1px solid rgba(249,115,22,.28); color: #fb923c; }
.sev-high     { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.3);   color: #f87171; }
.sev-critical { background: rgba(185,28,28,.16);  border: 1px solid rgba(220,38,38,.4);   color: #fca5a5; }

/* Permalink button */
.rule-permalink {
    width: 28px; height: 28px; border-radius: 7px;
    border: 1px solid transparent; background: transparent;
    color: rgba(255,255,255,.2); cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center; transition: all .15s; flex-shrink: 0;
}
.rule-card:hover .rule-permalink { color: rgba(255,255,255,.4); border-color: rgba(255,255,255,.1); }
.rule-permalink:hover { background: rgba(88,101,242,.15) !important; color: var(--accent-light) !important; border-color: rgba(88,101,242,.3) !important; }

/* ══════════════════════════════════════════════════════════
   DESCRIPTION — markdown styles
══════════════════════════════════════════════════════════ */
.rule-desc {
    font-size: 14px; color: rgba(255,255,255,.68);
    line-height: 1.8; margin-bottom: 10px;
}
.rule-desc p { margin-bottom: .6rem; }
.rule-desc p:last-child { margin-bottom: 0; }
.rule-desc ul {
    margin: .4rem 0 .6rem 0; list-style: none; padding: 0;
    display: flex; flex-direction: column; gap: 3px;
}
.rule-desc ul li { position: relative; padding-left: 1.1rem; line-height: 1.65; }
.rule-desc ul li::before {
    content: ''; position: absolute; left: 0; top: .62em;
    width: 5px; height: 5px; border-radius: 50%; background: rgba(88,101,242,.6);
}
.rule-desc strong { color: #fff; font-weight: 700; }
.rule-desc em     { color: rgba(255,255,255,.75); font-style: italic; }

/* ── Inline links (markdown [texto](url)) ────────────────── */
.md-link {
    color: var(--accent-light);
    text-decoration: underline;
    text-decoration-color: rgba(129,140,248,.4);
    text-underline-offset: 2px;
    transition: color .15s, text-decoration-color .15s;
}
.md-link:hover {
    color: #c7d2fe;
    text-decoration-color: rgba(199,210,254,.6);
}

/* ══════════════════════════════════════════════════════════
   CALLOUT BOXES
══════════════════════════════════════════════════════════ */
.callout {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-radius: 10px;
    font-size: 13.5px; line-height: 1.65; margin: 8px 0;
    border-left: 3px solid transparent;
}
.callout > i { margin-top: 2px; flex-shrink: 0; font-size: 14px; }
.callout > div { flex: 1; min-width: 0; }
.callout > div p { margin-bottom: 4px; }
.callout > div ul { margin: 4px 0 0 1rem; }
.callout strong { font-weight: 800; margin-right: 2px; }

.callout-nota        { background: rgba(88,101,242,.08); border-color: rgba(88,101,242,.35); color: rgba(255,255,255,.8); }
.callout-nota > i    { color: #818cf8; }
.callout-nota strong { color: #a5b4fc; }

.callout-consejo        { background: rgba(16,185,129,.07); border-color: rgba(16,185,129,.35); color: rgba(255,255,255,.8); }
.callout-consejo > i    { color: #34d399; }
.callout-consejo strong { color: #6ee7b7; }

.callout-advertencia        { background: rgba(251,191,36,.07); border-color: rgba(251,191,36,.35); color: rgba(255,255,255,.8); }
.callout-advertencia > i    { color: #fbbf24; }
.callout-advertencia strong { color: #fcd34d; }

.callout-importante        { background: rgba(239,68,68,.07); border-color: rgba(239,68,68,.4); color: rgba(255,255,255,.8); }
.callout-importante > i    { color: #f87171; }
.callout-importante strong { color: #fca5a5; }

/* Callout inside rule-desc */
.rule-desc .callout { font-size: 13px; margin: 6px 0; }

/* ══════════════════════════════════════════════════════════
   EXAMPLES / COMPARISONS
══════════════════════════════════════════════════════════ */
.rule-examples { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }

/* Comparison */
.example-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.example-side { border-radius: 12px; overflow: hidden; border: 2px solid transparent; }
.example-yes { border-color: rgba(87,242,135,.3); background: rgba(87,242,135,.04); }
.example-no  { border-color: rgba(240,71,71,.3);  background: rgba(240,71,71,.04);  }

.example-label {
    display: flex; align-items: center; gap: 7px; padding: 9px 13px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.example-yes .example-label { color: #57f287; }
.example-no  .example-label { color: #f04747; }

/* Text comparison list */
.comp-text-wrap { padding: 6px 14px 14px; }

/* ── Comparison text list ── */
.comp-text-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 4px;
}
.comp-text-list.is-multi {
    display: block; columns: 2; column-gap: 12px;
}
.comp-text-list.is-multi li { break-inside: avoid; -webkit-column-break-inside: avoid; margin-bottom: 4px; }
.comp-text-list li {
    display: flex; align-items: flex-start; gap: 7px;
    font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.75);
    word-break: break-word; overflow-wrap: break-word;
}
.comp-text-list li::before { content: '•'; flex-shrink: 0; margin-top: 3px; font-size: 9px; opacity: .8; }
.example-yes .comp-text-list li::before { color: #57f287; }
.example-no  .comp-text-list li::before { color: #f04747; }
.comp-text-list strong { color: #fff; }

/* ── "Ver lista completa" button ── */
.list-expand-btn {
    display: inline-flex; align-items: center; gap: 5px;
    margin: 8px 0 0 .5rem;
    padding: 4px 12px; border-radius: 20px;
    border: 1px solid; background: transparent;
    font-size: 12px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: opacity .15s;
    opacity: .75;
}
.list-expand-btn:hover { opacity: 1; }

/* ── Shared overlay ── */
.reglas-overlay {
    display: none; position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,.82);
    align-items: center; justify-content: center; padding: 20px;
    opacity: 0; transition: opacity .2s ease;
}
.reglas-overlay.visible { opacity: 1; }

/* ── List modal ── */
.reglas-modal {
    background: #16151f; border: 1px solid rgba(88,101,242,.2);
    border-radius: 16px; width: min(640px, 100%); max-height: 80vh;
    display: flex; flex-direction: column;
    box-shadow: 0 32px 80px rgba(0,0,0,.6);
}
.reglas-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: 14px; flex-shrink: 0;
}
.reglas-modal-body {
    overflow-y: auto; padding: 18px 20px;
}
.reglas-modal-body::-webkit-scrollbar { width: 4px; }
.reglas-modal-body::-webkit-scrollbar-thumb { background: rgba(88,101,242,.3); border-radius: 2px; }
.reglas-modal-close {
    width: 30px; height: 30px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,.1); background: transparent;
    color: rgba(255,255,255,.4); font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s; line-height: 1;
}
.reglas-modal-close:hover { background: rgba(255,255,255,.07); color: #fff; }

/* ── Lightbox ── */
.lightbox-close {
    position: fixed; top: 20px; right: 20px;
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15);
    color: rgba(255,255,255,.7); font-size: 20px; z-index: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); color: #fff; }
.lightbox-content { display: flex; align-items: center; justify-content: center; }

/* ── Clickable media ── */
.ex-media { display: block; width: 100%; max-height: 300px; object-fit: cover; border: none; }
.ex-media--clickable { cursor: zoom-in; transition: opacity .15s; }
.ex-media--clickable:hover { opacity: .88; }
iframe.ex-media { aspect-ratio: 16/9; max-height: none; height: auto; }

/* Placeholder */
.example-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; padding: 28px 16px; color: rgba(255,255,255,.2); font-size: 12px;
}
.example-placeholder i { font-size: 20px; opacity: .3; }

/* Single */
.example-single { border-radius: 12px; overflow: hidden; border: 1px solid rgba(88,101,242,.18); background: rgba(88,101,242,.04); }
.example-single .example-label { color: rgba(255,255,255,.55); }

/* ── Sanction (al final de la card) ─────────────────────── */
.rule-sancion {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 14px; border-radius: 8px;
    background: rgba(251,191,36,.07); border: 1px solid rgba(251,191,36,.16);
    color: #fbbf24; font-size: 12px; font-weight: 600; margin-top: 14px;
}
.rule-sancion strong { color: #fcd34d; }

/* ══════════════════════════════════════════════════════════
   DISCLAIMER — top (antes del layout)
══════════════════════════════════════════════════════════ */
.reglas-disclaimer-top {
    background: rgba(251,191,36,.06);
    border-bottom: 1px solid rgba(251,191,36,.2);
}

.disclaimer-top-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: flex-start; gap: 16px;
    padding: 14px 2rem;
}
.disclaimer-top-icon {
    flex-shrink: 0; margin-top: 2px;
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(251,191,36,.15); border: 1px solid rgba(251,191,36,.3);
    display: flex; align-items: center; justify-content: center;
    color: #fbbf24; font-size: 15px;
}
.disclaimer-top-body { flex: 1; min-width: 0; }
.disclaimer-top-header-row {
    display: flex; align-items: center; gap: 10px;
    min-height: 28px;
}
.disclaimer-top-label {
    font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .08em;
    color: #fbbf24; flex: 1;
}
/* text body — collapses smoothly */
.disclaimer-top-text {
    font-size: 13.5px; color: rgba(255,255,255,.58); line-height: 1.75;
    overflow: hidden;
    max-height: 600px;
    transition: max-height .35s ease, opacity .3s ease, margin-top .3s ease;
    opacity: 1;
    margin-top: 6px;
}
.reglas-disclaimer-top.collapsed .disclaimer-top-text {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}
.disclaimer-top-text p { margin-bottom: .45rem; }
.disclaimer-top-text p:last-child { margin-bottom: 0; }
.disclaimer-top-text strong { color: rgba(255,255,255,.85); }
.disclaimer-top-text ul { margin: .4rem 0 .5rem 1rem; }
.disclaimer-top-text ul li { list-style: disc; line-height: 1.6; }

.disclaimer-top-toggle {
    flex-shrink: 0;
    width: 26px; height: 26px; border-radius: 7px;
    border: 1px solid rgba(251,191,36,.25); background: transparent;
    color: rgba(251,191,36,.5); cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.disclaimer-top-toggle:hover {
    background: rgba(251,191,36,.12); color: #fbbf24;
    border-color: rgba(251,191,36,.5);
}

/* ══════════════════════════════════════════════════════════
   CATEGORY INTRO — editorial
══════════════════════════════════════════════════════════ */
.rules-category-intro {
    margin-bottom: 3rem;
    padding: 28px 32px 0;
    background: linear-gradient(135deg, rgba(88,101,242,.06) 0%, rgba(124,58,237,.04) 100%);
    border: 1px solid rgba(88,101,242,.15);
    border-radius: 20px;
    overflow: hidden;
}

.cat-intro-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 20px;
}
.cat-intro-icon {
    flex-shrink: 0;
    width: 52px; height: 52px; border-radius: 16px;
    background: linear-gradient(135deg, rgba(88,101,242,.2), rgba(124,58,237,.15));
    border: 1px solid rgba(88,101,242,.25);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--accent-light);
}
.cat-intro-meta { flex: 1; min-width: 0; }
.cat-intro-label {
    display: block; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em;
    color: rgba(129,140,248,.6); margin-bottom: 4px;
}
.cat-intro-title {
    font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: -.01em;
    line-height: 1.2;
}

.cat-intro-text {
    font-size: 14.5px; color: rgba(255,255,255,.65);
    line-height: 1.85; padding-bottom: 24px;
}
.cat-intro-text p { margin-bottom: .7rem; }
.cat-intro-text p:last-child { margin-bottom: 0; }
.cat-intro-text ul { margin: .5rem 0 .7rem 1.1rem; }
.cat-intro-text ul li { list-style: disc; line-height: 1.7; }
.cat-intro-text strong { color: #fff; font-weight: 700; }
.cat-intro-text em { color: rgba(255,255,255,.75); font-style: italic; }
.cat-intro-text .callout { font-size: 13.5px; margin: 8px 0; }

.cat-intro-divider {
    height: 2px; margin: 0 -32px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(88,101,242,.3) 20%,
        rgba(124,58,237,.25) 60%,
        transparent 100%);
}

/* ══════════════════════════════════════════════════════════
   FAQ SECTION
══════════════════════════════════════════════════════════ */
.reglas-faq-section {
    background: rgba(255,255,255,.015);
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
}
.reglas-faq-inner { max-width: 860px; margin: 0 auto; }

.faq-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 2rem;
}
.faq-header i { font-size: 1.4rem; color: var(--accent-light); }
.faq-header h2 { font-size: 1.5rem; font-weight: 800; color: #fff; }

.faq-list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; overflow: hidden; transition: border-color .2s;
}
.faq-item.open { border-color: rgba(88,101,242,.3); }

.faq-question {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; background: none; border: none; cursor: pointer;
    color: #fff; font-family: inherit; font-size: 15px; font-weight: 600;
    text-align: left; transition: background .15s;
}
.faq-question:hover { background: rgba(88,101,242,.06); }
.faq-question i {
    flex-shrink: 0; font-size: 13px; color: rgba(255,255,255,.35);
    transition: transform .25s;
}
.faq-item.open .faq-question i { transform: rotate(180deg); color: var(--accent-light); }

.faq-answer {
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.faq-item.open .faq-answer { max-height: 1200px; }

.faq-answer-inner {
    padding: 0 20px 18px;
    font-size: 14px; color: rgba(255,255,255,.65); line-height: 1.8;
}
.faq-answer-inner p { margin-bottom: .6rem; }
.faq-answer-inner p:last-child { margin-bottom: 0; }
.faq-answer-inner ul { margin: .4rem 0 .6rem 1rem; }
.faq-answer-inner ul li { list-style: disc; line-height: 1.65; }
.faq-answer-inner strong { color: #fff; }
.faq-answer-inner .callout { font-size: 13px; margin: 6px 0; }

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════ */
.reglas-empty {
    text-align: center; padding: 6rem 2rem;
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.reglas-empty i    { font-size: 3rem; color: rgba(88,101,242,.25); }
.reglas-empty h2   { font-size: 1.4rem; color: rgba(255,255,255,.35); font-weight: 700; }
.reglas-empty p    { color: rgba(255,255,255,.2); font-size: 14px; }

/* ── Toast ────────────────────────────────────────────────── */
.reglas-toast {
    position: fixed; bottom: 1.75rem; left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(20,22,35,.96); border: 1px solid rgba(88,101,242,.3);
    color: #fff; font-size: 13px; font-weight: 600;
    padding: 10px 22px; border-radius: 30px; backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    display: flex; align-items: center; gap: 8px;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
    z-index: 9999; white-space: nowrap;
}
.reglas-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.reglas-toast i { color: #57f287; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .reglas-layout { grid-template-columns: 1fr; padding: 2rem 1rem 5rem; }
    .reglas-sidebar { display: none; }
    .example-comparison { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .reglas-hero { padding-top: 5rem; min-height: 38vh; }
    .rule-card { padding: 16px; }
    .reglas-tab-btn { padding: 9px 14px; font-size: 13px; }
    .reglas-faq-section, .reglas-disclaimer { padding: 2.5rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .rule-card, .reglas-section.active, .faq-answer { animation: none; transition: none; }
}
