/* PSOBB Client Decompilation & Searchable Codebase Explorer */
.decryption-page {
    --dec-bg: rgba(8, 13, 28, 0.88);
    --dec-bg-soft: rgba(13, 21, 43, 0.72);
    --dec-border: rgba(0, 237, 255, 0.22);
    --dec-border-subtle: rgba(148, 163, 184, 0.18);
    --dec-cyan: var(--pso-blue, #00edff);
    --dec-orange: var(--pso-orange, #ffaa00);
    --dec-purple: var(--pso-purple, #9d4edd);
    --dec-green: #23d160;
    --dec-red: #ff4d6d;
    --dec-text: var(--pso-text, #e2e8f0);
    --dec-muted: #94a3b8;
    --dec-mono: 'JetBrains Mono', 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    max-width: 1260px;
    margin: 0 auto;
    padding: 28px 20px 64px;
    color: var(--dec-text);
    font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dec-card {
    background: var(--dec-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--dec-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ===========================
   1. HERO & UNIFIED PROGRESS
   =========================== */
.dec-hero {
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dec-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.dec-eyebrow-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.dec-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: 999px;
    font-family: var(--dec-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(35, 209, 96, 0.12);
    border: 1px solid rgba(35, 209, 96, 0.4);
    color: var(--dec-green);
}

.dec-status-pill.is-standby {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
}

.dec-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.dec-hero-title {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.dec-hero-lead {
    margin: 0;
    max-width: 740px;
    font-size: 1rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.dec-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.dec-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    border: 1px solid var(--dec-border);
    background: rgba(0, 237, 255, 0.1);
    color: var(--dec-cyan);
}

.dec-btn:hover {
    background: rgba(0, 237, 255, 0.2);
    border-color: var(--dec-cyan);
    color: #ffffff;
    text-shadow: none;
}

.dec-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--dec-border-subtle);
    color: #e2e8f0;
}

.dec-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Unified Progress Box */
.dec-progress-box {
    background: rgba(4, 8, 20, 0.65);
    border: 1px solid var(--dec-border-subtle);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dec-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.dec-progress-pct {
    font-family: var(--dec-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dec-cyan);
}

.dec-progress-caption {
    font-size: 0.92rem;
    color: #cbd5e1;
}

.dec-progress-track {
    width: 100%;
    height: 11px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.dec-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #00edff 0%, #3b82f6 55%, #23d160 100%);
    box-shadow: 0 0 12px rgba(0, 237, 255, 0.45);
    transition: width 0.6s ease;
}

.dec-region-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dec-region-item {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--dec-border-subtle);
    border-radius: 8px;
    padding: 9px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dec-region-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.dec-region-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
}

.dec-region-label code {
    font-family: var(--dec-mono);
    font-size: 0.7rem;
    color: var(--dec-muted);
    margin-left: 3px;
}

.dec-region-val {
    font-family: var(--dec-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dec-cyan);
}

.dec-region-bar {
    width: 100%;
    height: 5px;
    background: rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    overflow: hidden;
}

.dec-region-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

.dec-region-fill.is-belt { background: linear-gradient(90deg, #10b981, #23d160); }
.dec-region-fill.is-ext  { background: linear-gradient(90deg, #00edff, #3b82f6); }
.dec-region-fill.is-crt  { background: linear-gradient(90deg, #9d4edd, #c084fc); }

.dec-region-note {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.35;
}

.dec-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dec-kpi {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--dec-border-subtle);
    border-radius: 8px;
    padding: 11px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dec-kpi-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dec-muted);
}

.dec-kpi-val {
    font-family: var(--dec-mono);
    font-size: 1.08rem;
    font-weight: 700;
    color: #f8fafc;
}

.dec-kpi-sub {
    font-size: 0.76rem;
    color: #94a3b8;
}

/* Compact 5-step milestone strip */
.dec-roadmap {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.dec-step {
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid var(--dec-border-subtle);
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.83rem;
}

.dec-step.is-done {
    border-color: rgba(35, 209, 96, 0.35);
    background: rgba(35, 209, 96, 0.07);
}

.dec-step.is-active {
    border-color: rgba(0, 237, 255, 0.45);
    background: rgba(0, 237, 255, 0.09);
}

.dec-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--dec-mono);
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
}

.dec-step.is-done .dec-step-num {
    background: rgba(35, 209, 96, 0.2);
    color: var(--dec-green);
}

.dec-step.is-active .dec-step-num {
    background: rgba(0, 237, 255, 0.22);
    color: var(--dec-cyan);
}

.dec-step-text strong {
    display: block;
    font-size: 0.82rem;
    color: #f1f5f9;
    line-height: 1.2;
}

.dec-step-text span {
    font-size: 0.72rem;
    color: var(--dec-muted);
}

/* ===========================
   2. CODEBASE SEARCH EXPLORER
   =========================== */
.dec-explorer {
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dec-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.dec-section-head h2 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
}

.dec-section-head p {
    margin: 0;
    font-size: 0.92rem;
    color: #cbd5e1;
}

.dec-search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.dec-search-icon {
    position: absolute;
    left: 16px;
    color: var(--dec-cyan);
    font-size: 1rem;
    pointer-events: none;
}

.dec-search-input {
    width: 100%;
    padding: 13px 90px 13px 44px;
    border-radius: 10px;
    border: 1px solid rgba(0, 237, 255, 0.35);
    background: rgba(4, 8, 20, 0.85);
    color: #ffffff;
    font-size: 0.98rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dec-search-input::placeholder {
    color: #64748b;
}

.dec-search-input:focus {
    outline: none;
    border-color: var(--dec-cyan);
    box-shadow: 0 0 0 3px rgba(0, 237, 255, 0.16);
}

.dec-search-right {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dec-kbd-hint {
    font-family: var(--dec-mono);
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid var(--dec-border-subtle);
    color: var(--dec-muted);
    background: rgba(255, 255, 255, 0.04);
}

.dec-clear-btn {
    display: none;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 0.78rem;
    cursor: pointer;
}

.dec-clear-btn.is-visible {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dec-examples-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--dec-muted);
}

.dec-example-chip {
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 237, 255, 0.22);
    background: rgba(0, 237, 255, 0.06);
    color: #bae6fd;
    font-family: var(--dec-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dec-example-chip:hover {
    background: rgba(0, 237, 255, 0.18);
    border-color: var(--dec-cyan);
    color: #ffffff;
}

/* Topic & Scope Filter Bars */
.dec-filter-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dec-chip-row {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    align-items: center;
}

.dec-topic-chip,
.dec-scope-pill,
.dec-compiler-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--dec-border-subtle);
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5e1;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dec-topic-chip:hover,
.dec-scope-pill:hover,
.dec-compiler-pill:hover {
    border-color: rgba(0, 237, 255, 0.4);
    color: #ffffff;
}

.dec-topic-chip.active,
.dec-scope-pill.active,
.dec-compiler-pill.active {
    background: rgba(0, 237, 255, 0.16);
    border-color: var(--dec-cyan);
    color: #ffffff;
}

.dec-chip-count {
    font-family: var(--dec-mono);
    font-size: 0.72rem;
    color: var(--dec-muted);
}

.dec-scope-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.dec-compiler-pill {
    padding: 4px 10px;
    font-size: 0.78rem;
}

.dec-results-summary {
    font-size: 0.88rem;
    color: #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--dec-border-subtle);
}

/* Subsections inside Explorer */
.dec-subblock {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dec-subblock-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.dec-subblock-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dec-count-tag {
    font-family: var(--dec-mono);
    font-size: 0.76rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 237, 255, 0.12);
    border: 1px solid rgba(0, 237, 255, 0.3);
    color: var(--dec-cyan);
}

/* How It Works Guides Grid */
.dec-guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

.dec-guide-card {
    background: var(--dec-bg-soft);
    border: 1px solid var(--dec-border-subtle);
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
    text-align: left;
}

.dec-guide-card:hover {
    border-color: var(--dec-cyan);
    background: rgba(16, 28, 56, 0.9);
    transform: translateY(-2px);
}

.dec-guide-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.dec-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(157, 78, 221, 0.16);
    border: 1px solid rgba(157, 78, 221, 0.35);
    color: #e9d5ff;
}

.dec-guide-title {
    margin: 0;
    font-size: 1.04rem;
    font-weight: 700;
    color: #ffffff;
}

.dec-guide-summary {
    margin: 0;
    font-size: 0.87rem;
    line-height: 1.5;
    color: #cbd5e1;
    flex: 1;
}

.dec-guide-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--dec-muted);
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.dec-guide-cta {
    color: var(--dec-cyan);
    font-weight: 600;
}

/* Recovered Structs Grid */
.dec-structs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
}

.dec-struct-card {
    background: rgba(10, 16, 34, 0.8);
    border: 1px solid var(--dec-border-subtle);
    border-radius: 10px;
    padding: 15px 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.dec-struct-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.dec-struct-name {
    font-family: var(--dec-mono);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--dec-orange);
}

.dec-struct-meta {
    font-family: var(--dec-mono);
    font-size: 0.72rem;
    color: var(--dec-muted);
}

.dec-struct-desc {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.45;
    color: #cbd5e1;
}

.dec-offset-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
}

.dec-offset-row {
    display: grid;
    grid-template-columns: 78px 86px 1fr;
    gap: 8px;
    padding: 4px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.03);
    align-items: baseline;
}

.dec-offset-row code {
    font-family: var(--dec-mono);
    color: var(--dec-cyan);
    font-size: 0.76rem;
}

.dec-offset-type {
    font-family: var(--dec-mono);
    color: #93c5fd;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dec-offset-role {
    color: #cbd5e1;
    font-size: 0.8rem;
}

/* Functions Table */
.dec-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--dec-border-subtle);
    border-radius: 10px;
    background: rgba(4, 8, 20, 0.6);
}

.dec-fn-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.dec-fn-table th {
    padding: 11px 14px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dec-muted);
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid var(--dec-border-subtle);
    white-space: nowrap;
}

.dec-fn-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    vertical-align: top;
}

.dec-fn-table tr:last-child td {
    border-bottom: none;
}

.dec-fn-table tbody tr:hover {
    background: rgba(0, 237, 255, 0.05);
}

.dec-addr {
    font-family: var(--dec-mono);
    font-size: 0.83rem;
    color: var(--dec-cyan);
    white-space: nowrap;
}

.dec-fn-title {
    font-weight: 600;
    color: #f8fafc;
    word-break: break-word;
}

.dec-fn-snippet {
    margin-top: 3px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #94a3b8;
    max-width: 520px;
}

.dec-badge-match,
.dec-badge-mapped {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-family: var(--dec-mono);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.dec-badge-match {
    background: rgba(35, 209, 96, 0.14);
    border: 1px solid rgba(35, 209, 96, 0.45);
    color: var(--dec-green);
}

.dec-badge-mapped {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
}

.dec-inspect-btn {
    padding: 6px 11px;
    border-radius: 7px;
    border: 1px solid rgba(0, 237, 255, 0.35);
    background: rgba(0, 237, 255, 0.1);
    color: var(--dec-cyan);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.dec-inspect-btn:hover {
    background: rgba(0, 237, 255, 0.22);
    color: #ffffff;
}

.dec-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--dec-muted);
}

.dec-page-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dec-page-btn {
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid var(--dec-border-subtle);
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
    font-size: 0.82rem;
    cursor: pointer;
}

.dec-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===========================
   3. COLLAPSIBLE LIVE ACTIVITY
   =========================== */
.dec-drawer {
    overflow: hidden;
}

.dec-drawer > summary {
    list-style: none;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    cursor: pointer;
    user-select: none;
}

.dec-drawer > summary::-webkit-details-marker {
    display: none;
}

.dec-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    color: #f8fafc;
}

.dec-drawer-meta {
    font-family: var(--dec-mono);
    font-size: 0.8rem;
    color: var(--dec-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dec-drawer-chevron {
    transition: transform 0.2s ease;
}

.dec-drawer[open] .dec-drawer-chevron {
    transform: rotate(180deg);
}

.dec-drawer-body {
    border-top: 1px solid var(--dec-border-subtle);
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dec-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dec-tab-btn {
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid var(--dec-border-subtle);
    background: rgba(15, 23, 42, 0.6);
    color: #cbd5e1;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.dec-tab-btn.active {
    background: rgba(0, 237, 255, 0.16);
    border-color: var(--dec-cyan);
    color: #ffffff;
}

.dec-tab-pane {
    display: none;
}

.dec-tab-pane.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dec-feed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}

.dec-feed-item {
    padding: 10px 13px;
    border-radius: 8px;
    background: rgba(4, 8, 20, 0.65);
    border: 1px solid var(--dec-border-subtle);
    font-size: 0.86rem;
    line-height: 1.45;
}

.dec-feed-item-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    font-family: var(--dec-mono);
    font-size: 0.75rem;
    color: var(--dec-cyan);
}

.dec-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.dec-pre {
    margin: 0;
    padding: 14px 16px;
    border-radius: 9px;
    background: #040814;
    border: 1px solid rgba(0, 237, 255, 0.2);
    font-family: var(--dec-mono);
    font-size: 0.81rem;
    line-height: 1.55;
    color: #e2e8f0;
    overflow-x: auto;
    max-height: 380px;
    overflow-y: auto;
    white-space: pre;
}

/* ===========================
   4. INSPECTOR & GUIDE MODALS
   =========================== */
.dec-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(2, 6, 18, 0.82);
    backdrop-filter: blur(8px);
    padding: 24px 16px;
    align-items: center;
    justify-content: center;
}

.dec-modal-backdrop.is-open {
    display: flex;
}

.dec-modal-card {
    width: 100%;
    max-width: 880px;
    max-height: 88vh;
    overflow-y: auto;
    background: #0a1022;
    border: 1px solid rgba(0, 237, 255, 0.4);
    border-radius: 12px;
    padding: 24px 26px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dec-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.dec-modal-close {
    padding: 6px 11px;
    border-radius: 8px;
    border: 1px solid var(--dec-border-subtle);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.9rem;
}

.dec-modal-close:hover {
    background: rgba(255, 77, 109, 0.2);
    border-color: var(--dec-red);
    color: #ffffff;
}

.dec-modal-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dec-modal-block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.dec-modal-block-head h4 {
    margin: 0;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dec-muted);
}

.dec-how-box {
    padding: 14px 16px;
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--dec-border-subtle);
    font-size: 0.93rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.dec-how-box ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.dec-how-box li {
    margin-bottom: 5px;
}

.dec-guide-section {
    padding: 14px 16px;
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--dec-border-subtle);
}

.dec-guide-section h4 {
    margin: 0 0 6px;
    color: var(--dec-cyan);
    font-size: 0.98rem;
}

.dec-guide-section p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.58;
}

.dec-fn-link-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dec-fn-link-btn {
    width: 100%;
    text-align: left;
    padding: 10px 13px;
    border-radius: 8px;
    border: 1px solid var(--dec-border-subtle);
    background: rgba(4, 8, 20, 0.7);
    color: #f8fafc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dec-fn-link-btn:hover {
    border-color: var(--dec-cyan);
    background: rgba(0, 237, 255, 0.08);
}

/* Lightweight C/C++ Syntax Highlighting */
.tok-cmt { color: #64748b; font-style: italic; }
.tok-kw  { color: #c084fc; font-weight: 600; }
.tok-type { color: #38bdf8; }
.tok-num { color: #fbbf24; }
.tok-str { color: #4ade80; }

/* Responsive adjustments */
@media (max-width: 960px) {
    .dec-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dec-roadmap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dec-region-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .decryption-page {
        padding: 16px 12px 48px;
        gap: 16px;
    }
    .dec-hero,
    .dec-explorer {
        padding: 18px 16px;
    }
    .dec-kpi-grid,
    .dec-roadmap,
    .dec-modal-meta,
    .dec-structs-grid {
        grid-template-columns: 1fr;
    }
    .dec-kbd-hint {
        display: none;
    }
    .dec-offset-row {
        grid-template-columns: 70px 1fr;
    }
    .dec-offset-type {
        display: none;
    }
}
