* {
            font-family: 'Outfit', Inter, sans-serif
        }

        body {
            background-color: #020617;
            color: #e2e8f0;
            min-height: 100vh
        }

        /* ── Fondo animado ── */
        .bg-animated {
            position: fixed;
            inset: 0;
            z-index: 0;
            overflow: hidden;
            pointer-events: none
        }

        .bg-animated::before {
            content: '';
            position: absolute;
            top: -40%;
            left: -20%;
            width: 80%;
            height: 80%;
            background: radial-gradient(ellipse, rgba(255, 107, 53, .12) 0%, transparent 70%);
            animation: pulse-orb 8s ease-in-out infinite
        }

        .bg-animated::after {
            content: '';
            position: absolute;
            bottom: -30%;
            right: -10%;
            width: 60%;
            height: 60%;
            background: radial-gradient(ellipse, rgba(96, 165, 250, .07) 0%, transparent 70%);
            animation: pulse-orb 10s ease-in-out infinite reverse
        }

        @keyframes pulse-orb {

            0%,
            100% {
                transform: scale(1) translate(0, 0);
                opacity: 1
            }

            50% {
                transform: scale(1.1) translate(2%, 3%);
                opacity: .7
            }
        }

        /* ── Navbar ── */
        .glass-nav {
            background: rgba(2, 6, 23, .8);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid rgba(255, 255, 255, .06)
        }

        .glass-nav.scrolled {
            background: rgba(2, 6, 23, .95)
        }

        /* ── Cards base ── */
        .ripci-card {
            background: rgba(15, 23, 42, .6);
            border: 1px solid rgba(255, 255, 255, .08);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            transition: all .3s ease;
            position: relative;
            overflow: hidden
        }

        .ripci-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, transparent, rgba(255, 107, 53, .6), transparent);
            opacity: 0;
            transition: opacity .3s
        }

        .ripci-card:hover {
            background: rgba(30, 41, 59, .7);
            border-color: rgba(255, 107, 53, .25);
            transform: translateY(-3px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, .4), 0 0 30px rgba(255, 107, 53, .06)
        }

        .ripci-card:hover::before {
            opacity: 1
        }

        /* variantes de color */
        .card-blue::before {
            background: linear-gradient(90deg, transparent, rgba(96, 165, 250, .6), transparent)
        }

        .card-blue:hover {
            border-color: rgba(96, 165, 250, .3)
        }

        .card-green::before {
            background: linear-gradient(90deg, transparent, rgba(34, 197, 94, .6), transparent)
        }

        .card-green:hover {
            border-color: rgba(34, 197, 94, .3)
        }

        .card-purple::before {
            background: linear-gradient(90deg, transparent, rgba(168, 85, 247, .6), transparent)
        }

        .card-purple:hover {
            border-color: rgba(168, 85, 247, .3)
        }

        .card-yellow::before {
            background: linear-gradient(90deg, transparent, rgba(234, 179, 8, .6), transparent)
        }

        .card-yellow:hover {
            border-color: rgba(234, 179, 8, .3)
        }

        .card-cyan::before {
            background: linear-gradient(90deg, transparent, rgba(6, 182, 212, .6), transparent)
        }

        .card-cyan:hover {
            border-color: rgba(6, 182, 212, .3)
        }

        /* ── Badges ── */
        .badge-rd {
            background: rgba(255, 107, 53, .15);
            color: #ff6b35;
            border: 1px solid rgba(255, 107, 53, .3)
        }

        .badge-blue {
            background: rgba(59, 130, 246, .15);
            color: #60a5fa;
            border: 1px solid rgba(59, 130, 246, .3)
        }

        .badge-green {
            background: rgba(34, 197, 94, .12);
            color: #4ade80;
            border: 1px solid rgba(34, 197, 94, .3)
        }

        .badge-yellow {
            background: rgba(234, 179, 8, .12);
            color: #facc15;
            border: 1px solid rgba(234, 179, 8, .3)
        }

        .badge-purple {
            background: rgba(168, 85, 247, .15);
            color: #c084fc;
            border: 1px solid rgba(168, 85, 247, .3)
        }

        .badge-cyan {
            background: rgba(6, 182, 212, .12);
            color: #22d3ee;
            border: 1px solid rgba(6, 182, 212, .3)
        }

        .badge-red {
            background: rgba(239, 68, 68, .15);
            color: #f87171;
            border: 1px solid rgba(239, 68, 68, .3)
        }

        .badge-gray {
            background: rgba(100, 116, 139, .15);
            color: #94a3b8;
            border: 1px solid rgba(100, 116, 139, .3)
        }

        /* ── Stat items ── */
        .stat-item {
            background: rgba(15, 23, 42, .7);
            border: 1px solid rgba(255, 255, 255, .07);
            backdrop-filter: blur(8px)
        }

        /* ── Ticker ── */
        .alert-ticker {
            background: linear-gradient(90deg, rgba(255, 107, 53, .1), rgba(96, 165, 250, .1));
            border-bottom: 1px solid rgba(255, 107, 53, .2)
        }

        .ticker-inner {
            display: inline-flex;
            gap: 4rem;
            animation: ticker 45s linear infinite;
            white-space: nowrap
        }

        @keyframes ticker {
            0% {
                transform: translateX(0)
            }

            100% {
                transform: translateX(-50%)
            }
        }

        /* ── Tabs de sección ── */
        .sec-tab {
            padding: 10px 22px;
            border-radius: 12px;
            font-weight: 600;
            font-size: .85rem;
            border: 1px solid rgba(255, 255, 255, .1);
            color: #94a3b8;
            background: rgba(255, 255, 255, .03);
            cursor: pointer;
            transition: all .25s;
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap
        }

        .sec-tab:hover {
            background: rgba(255, 255, 255, .07);
            color: #e2e8f0
        }

        .sec-tab.active {
            background: rgba(255, 107, 53, .15);
            color: #ff6b35;
            border-color: rgba(255, 107, 53, .4);
            box-shadow: 0 0 20px rgba(255, 107, 53, .1)
        }

        .sec-panel {
            display: none
        }

        .sec-panel.visible {
            display: block
        }

        /* ── Accordion ── */
        .accordion-item {
            border: 1px solid rgba(255, 255, 255, .08);
            border-radius: 14px;
            overflow: hidden;
            transition: border-color .2s;
            background: rgba(15, 23, 42, .5)
        }

        .accordion-item:hover {
            border-color: rgba(255, 107, 53, .2)
        }

        .accordion-header {
            padding: 18px 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            user-select: none
        }

        .accordion-arrow {
            color: #475569;
            transition: transform .3s;
            flex-shrink: 0
        }

        .accordion-item.open .accordion-arrow {
            transform: rotate(180deg);
            color: #ff6b35
        }

        .accordion-body {
            display: none;
            padding: 0 20px 20px
        }

        .accordion-item.open .accordion-body {
            display: block
        }

        .accordion-item.open {
            border-color: rgba(255, 107, 53, .3)
        }

        /* ── Tabla normativa ── */
        .norm-table {
            width: 100%;
            border-collapse: collapse
        }

        .norm-table th {
            background: rgba(255, 107, 53, .12);
            color: #ff6b35;
            font-size: .72rem;
            font-weight: 700;
            letter-spacing: .08em;
            text-transform: uppercase;
            padding: 10px 14px;
            text-align: left;
            border-bottom: 1px solid rgba(255, 107, 53, .2)
        }

        .norm-table td {
            padding: 11px 14px;
            font-size: .82rem;
            color: #cbd5e1;
            border-bottom: 1px solid rgba(255, 255, 255, .05);
            vertical-align: top
        }

        .norm-table tr:last-child td {
            border-bottom: none
        }

        .norm-table tr:hover td {
            background: rgba(255, 255, 255, .03)
        }

        .norm-table .period {
            font-weight: 700;
            white-space: nowrap
        }

        .norm-table .period.tri {
            color: #22d3ee
        }

        .norm-table .period.sem {
            color: #4ade80
        }

        .norm-table .period.anu {
            color: #facc15
        }

        .norm-table .period.quin {
            color: #ff6b35
        }

        .norm-table .period.dec {
            color: #f87171
        }

        /* ── Timeline normativa ── */
        .timeline {
            position: relative;
            padding-left: 28px
        }

        .timeline::before {
            content: '';
            position: absolute;
            left: 8px;
            top: 8px;
            bottom: 8px;
            width: 2px;
            background: linear-gradient(to bottom, #ff6b35, rgba(96, 165, 250, .4), rgba(255, 255, 255, .1))
        }

        .tl-item {
            position: relative;
            margin-bottom: 24px
        }

        .tl-dot {
            position: absolute;
            left: -24px;
            top: 4px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            border: 2px solid;
            flex-shrink: 0
        }

        .tl-dot.orange {
            background: rgba(255, 107, 53, .3);
            border-color: #ff6b35;
            box-shadow: 0 0 10px rgba(255, 107, 53, .4)
        }

        .tl-dot.blue {
            background: rgba(96, 165, 250, .3);
            border-color: #60a5fa;
            box-shadow: 0 0 10px rgba(96, 165, 250, .3)
        }

        .tl-dot.green {
            background: rgba(34, 197, 94, .3);
            border-color: #4ade80;
            box-shadow: 0 0 10px rgba(34, 197, 94, .3)
        }

        .tl-dot.gray {
            background: rgba(100, 116, 139, .2);
            border-color: #64748b
        }

        .tl-date {
            font-size: .7rem;
            color: #475569;
            margin-bottom: 4px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: .06em
        }

        .tl-title {
            font-size: .9rem;
            font-weight: 700;
            color: #e2e8f0;
            margin-bottom: 4px
        }

        .tl-desc {
            font-size: .8rem;
            color: #94a3b8;
            line-height: 1.55
        }

        /* ── Buscador ── */
        .search-wrap {
            position: relative
        }

        .search-input {
            width: 100%;
            background: rgba(15, 23, 42, .8);
            border: 1px solid rgba(255, 255, 255, .1);
            color: #e2e8f0;
            border-radius: 14px;
            padding: 12px 20px 12px 46px;
            font-size: .9rem;
            outline: none;
            transition: border-color .2s, box-shadow .2s
        }

        .search-input::placeholder {
            color: #475569
        }

        .search-input:focus {
            border-color: rgba(255, 107, 53, .5);
            box-shadow: 0 0 0 3px rgba(255, 107, 53, .08)
        }

        .search-icon {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #475569;
            font-size: .85rem;
            pointer-events: none
        }

        .search-count {
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #475569;
            font-size: .75rem
        }

        /* ── Misc ── */
        .region-badge {
            font-size: .7rem;
            padding: 2px 8px;
            border-radius: 999px;
            background: rgba(255, 255, 255, .06);
            border: 1px solid rgba(255, 255, 255, .1);
            color: #94a3b8
        }

        .breadcrumb-sep {
            color: rgba(255, 255, 255, .2)
        }

        .no-results {
            display: none;
            text-align: center;
            padding: 48px 0;
            color: #475569
        }

        .no-results.visible {
            display: block
        }

        /* ── Barra progreso ── */
        #read-progress {
            position: fixed;
            top: 0;
            left: 0;
            height: 3px;
            z-index: 200;
            background: linear-gradient(90deg, #ff6b35, #60a5fa);
            width: 0%;
            transition: width .1s linear
        }

        /* ── Volver arriba ── */
        #back-to-top {
            position: fixed;
            bottom: 32px;
            right: 32px;
            z-index: 100;
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: rgba(255, 107, 53, .9);
            border: none;
            cursor: pointer;
            color: #fff;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transform: translateY(16px);
            transition: opacity .3s, transform .3s, box-shadow .2s;
            box-shadow: 0 4px 20px rgba(255, 107, 53, .35)
        }

        #back-to-top.visible {
            opacity: 1;
            transform: translateY(0)
        }

        #back-to-top:hover {
            box-shadow: 0 6px 28px rgba(255, 107, 53, .55)
        }

        /* ── Fade-up ── */
        @keyframes fadeUp {
            from {
                opacity: 0;
                transform: translateY(20px)
            }

            to {
                opacity: 1;
                transform: translateY(0)
            }
        }

        .fade-up {
            animation: fadeUp .55s ease forwards
        }

        .d1 {
            animation-delay: .05s;
            opacity: 0
        }

        .d2 {
            animation-delay: .12s;
            opacity: 0
        }

        .d3 {
            animation-delay: .19s;
            opacity: 0
        }

        .d4 {
            animation-delay: .26s;
            opacity: 0
        }

        .d5 {
            animation-delay: .33s;
            opacity: 0
        }

        .d6 {
            animation-delay: .40s;
            opacity: 0
        }

        /* Logo common override to match foro.html */
        .logo {
            display: flex;
            align-items: center;
            gap: .65rem;
            text-decoration: none;
            flex-shrink: 0;
        }

        .logo-flame {
            height: 32px;
            width: auto;
            object-fit: contain;
            filter: brightness(2) contrast(1.25) grayscale(1) drop-shadow(0 0 10px rgba(255, 107, 53, .3));
            transition: filter .3s ease, transform .3s ease;
        }

        .logo-text {
            font-family: 'Outfit', 'Syne', sans-serif;
            font-weight: 800;
            font-size: 1.5rem;
            letter-spacing: -0.6px;
            color: #fff;
        }

        .logo-text b {
            color: rgb(255, 107, 53);
            font-weight: 800;
        }

        /* ── Accesibilidad y reducción de movimiento ── */
        .skip-link {
            position: absolute;
            left: -999px;
            top: auto;
            width: 1px;
            height: 1px;
            overflow: hidden
        }

        .skip-link:focus {
            left: 16px;
            top: 16px;
            width: auto;
            height: auto;
            z-index: 9999;
            background: #ff6b35;
            color: #fff;
            padding: 10px 14px;
            border-radius: 10px;
            font-weight: 700;
            text-decoration: none
        }

        @media (prefers-reduced-motion: reduce) {

            *,
            *::before,
            *::after {
                animation-duration: .001ms !important;
                animation-iteration-count: 1 !important;
                scroll-behavior: auto !important;
                transition-duration: .001ms !important
            }

            .ticker-inner {
                animation: none !important;
                transform: none !important;
                white-space: normal;
                flex-wrap: wrap
            }
        }

/* Fase 2H · Ajustes de accesibilidad */
.accordion-header {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

.accordion-header:focus-visible,
.sec-tab:focus-visible {
    outline: 2px solid #ff6b35;
    outline-offset: 3px;
}

/* Fase 4C.4 · Pulido visual conservador de páginas internas */
.glass-nav {
  box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
}

.ripci-card,
.stat-item,
.norm-card,
.system-card,
.accordion-item,
.search-box {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background-color .22s ease;
}

.ripci-card:hover,
.stat-item:hover,
.norm-card:hover,
.system-card:hover,
.accordion-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 53, .24);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .30);
}

.sec-tab,
.accordion-header,
.expand-btn,
.search-btn {
  min-height: 42px;
}

.ripci-card strong,
.accordion-header,
.norm-card h3,
.system-card h3 {
  text-wrap: balance;
}

@media (max-width: 768px) {
  .alert-ticker {
    font-size: .78rem;
  }

  .stat-item {
    padding: 1rem !important;
  }

  .sec-tab,
  .accordion-header,
  .search-btn {
    min-height: 44px;
  }

  #back-to-top {
    right: 18px;
    bottom: 18px;
  }
}

@media (max-width: 520px) {
  .ripci-card,
  .norm-card,
  .system-card,
  .search-box {
    border-radius: 18px !important;
  }

  .ticker-inner span {
    padding-right: 1.25rem;
  }
}


/* Fase 4C.6 - Ajustes responsive y accesibilidad visual */
.ripci-card, .norm-card, .system-card, .search-box {
  overflow-wrap: anywhere;
}

.sec-tab, .accordion-header, .search-btn {
  touch-action: manipulation;
}

@media (max-width: 640px) {
  .sec-tab {
    flex: 1 1 auto;
    justify-content: center;
  }

  .search-box input {
    font-size: 16px;
  }
}
