:root {
    --shaolin-red: #ff0000;
    --border-dim: rgba(255, 255, 255, 0.1);
    --bg-black: #0a0a0a;
    --text-gray: #888;
}

body {
    background-color: var(--bg-black);
    color: #eee;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
}

/* =========================================================
   SDS_SOVEREIGN_PARSER_STYLES
   High-Contrast Forensic UI for Markdown & LaTeX
   ========================================================= */

/* 1. Ticker Highlighting: $AAPL, $TSLA */
.sds-ticker {
    color: var(--shaolin-red);
    font-weight: bold;
    background: rgba(255, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 2px;
    border: 1px solid rgba(255, 0, 0, 0.2);
    letter-spacing: 1px;
}

/* 2. Tactical Table Multipliers */
.sds-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 25px 0;
    border: 1px solid var(--border-dim);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-transform: uppercase;
}

td, th {
    padding: 12px 15px;
    border: 1px solid var(--border-dim);
    text-align: left;
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

tr:hover {
    background: rgba(255, 0, 0, 0.05);
}

/* 3. LaTeX Math Container */
.sds-math-block {
    display: block;
    padding: 20px;
    margin: 20px 0;
    background: #000;
    border-left: 3px solid var(--shaolin-red);
    overflow-x: auto;
    font-family: serif; /* Better for Math characters */
}

.sds-math-inline {
    padding: 0 4px;
    color: #eee;
}

/* 4. Surgical Call-to-Action (CTA) */
.sds-cta-button {
    display: inline-block;
    background: var(--shaolin-red);
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 20px 0;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sds-cta-button:hover {
    background: transparent;
    border: 1px solid var(--shaolin-red);
    color: var(--shaolin-red);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

/* 5. Logic Blocks (Markdown formatting) */
h2, h3 {
    color: #fff;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 8px;
    margin-top: 40px;
    letter-spacing: 2px;
}

code {
    background: #1a1a1a;
    color: var(--shaolin-red);
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
}

/* =========================================================
   SDS_SOVEREIGN_REPORT_DELIVERY
   High-Contrast Forensic UI for Markdown & LaTeX
   ========================================================= */

#vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.mission-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dim);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mission-card:hover {
    border-color: var(--shaolin-red);
    background: rgba(255, 0, 0, 0.05);
    transform: translateY(-5px);
}

.card-meta {
    font-size: 0.7rem;
    color: var(--shaolin-red);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.card-summary {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.4;
    margin: 15px 0;
}

.card-action {
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* SDS REDACTION SYSTEM */
.sds-redacted {
    display: inline-block;
    background-color: #111; /* Darker than background */
    color: transparent;
    border-radius: 2px;
    padding: 0 4px;
    position: relative;
    user-select: none;
    cursor: help;
    transition: all 0.3s ease;
}

/* The "Static" or "Tape" look */
.sds-redacted::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.1),
        rgba(255, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.5;
}

/* Tooltip on hover to tease the upgrade */
.sds-redacted:hover::before {
    content: "CLEARANCE REQUIRED: UPGRADE TO FULL ASSAULT";
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--shaolin-red);
    color: white;
    font-size: 0.6rem;
    padding: 4px 8px;
    white-space: nowrap;
    border-radius: 2px;
    z-index: 10;
    letter-spacing: 1px;
}

.sds-disclaimer {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vault-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--shaolin-red);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.vault-status {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--shaolin-red);
    font-family: monospace;
}

.sds-loading-bar {
    color: var(--shaolin-red);
    font-family: monospace;
    text-align: center;
    padding: 50px;
    letter-spacing: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

#terminal-interface {
    border: 1px solid var(--border-dim);
    background: #000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.05);
}

.terminal-center {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
    font-family: 'Courier New', Courier, monospace;
}

.terminal-header {
    background: var(--shaolin-red);
    color: white;
    padding: 5px 15px;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.terminal-body {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--shaolin-red);
    padding: 20px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

#access-email {
    background: transparent;
    border: none;
    color: var(--shaolin-red);
    width: 70%;
    outline: none;
    font-size: 1rem;
}

.prompt { color: #555; margin-right: 10px; }

/* PRINT_SPECIFIC_STYLING */
@media print {
    body { background: white !important; color: black !important; }
    #vault-grid, .back-link, .vault-nav, .sds-cta-button { display: none !important; }
    
    .print-header {
        display: block !important;
        border-bottom: 2px solid #000;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .print-footer {
        display: block !important;
        position: fixed;
        bottom: 0;
        width: 100%;
        border-top: 1px solid #ccc;
        font-size: 0.7rem;
        padding-top: 10px;
    }
}

/* Hide these on the screen */
.print-header, .print-footer { display: none; }

/* WATERMARK_PROTOCOL */
.sds-sample-watermark {
    position: relative;
}

.sds-sample-watermark::before {
    content: "UNAUTHENTICATED SAMPLE // SHAOLIN DATA SERVICES";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 5rem;
    color: rgba(255, 0, 0, 0.05); /* Extremely faint on screen */
    pointer-events: none;
    white-space: nowrap;
    z-index: 1000;
}

@media print {
    .sds-sample-watermark::before {
        color: rgba(0, 0, 0, 0.1); /* Slightly darker for the printer */
        font-size: 4rem;
    }
}

/* REPORT_ACTIONS_UI */
.report-actions {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 1px solid var(--border-dim);
    display: flex;
    justify-content: center;
    gap: 20px;
}

.sds-cta-button {
    background: transparent;
    border: 1px solid var(--shaolin-red);
    color: var(--shaolin-red);
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sds-cta-button:hover {
    background: var(--shaolin-red);
    color: white;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

/* Ensure actions don't show up on the actual printout */
@media print {
    .report-actions, .vault-nav, .back-link {
        display: none !important;
    }
}
