/* ── RESET ─────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── BASE ──────────────────────────────────────────────────────────────────── */
html, body {
    background-color: #000;
    margin: 0;
    padding: 0;
    color: #00ff41;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

body {
    padding: 40px 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── TERMINAL CONTAINER ────────────────────────────────────────────────────── */
#terminal {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
}

/* ── HEADER ────────────────────────────────────────────────────────────────── */
#eligibility-header {
    font-weight: 900;
    font-size: 1.4rem;
    border-bottom: 3px solid #00ff41;
    padding-bottom: 10px;
    margin-bottom: 30px;
    line-height: 1.2;
}

#eligibility-header span {
    font-size: 0.6rem;
    opacity: 0.7;
    display: block;
    margin-top: 5px;
    font-weight: 400;
}

.count-display {
    font-size: 0.55rem !important;
    color: rgba(0, 255, 65, 0.5) !important;
    letter-spacing: 0.08em;
}

/* ── AUDIT OUTPUT ──────────────────────────────────────────────────────────── */
#audit-output {
    text-transform: none;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    min-height: 40px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ── MATHJAX — force green, prevent white-on-black ─────────────────────────── */
mjx-container {
    color: #00ff41 !important;
    display: block !important;
    margin: 12px 0 !important;
    background: transparent !important;
}

/* ── ANIMATIONS ────────────────────────────────────────────────────────────── */
.flashing-amber {
    color: #ffaa00 !important;
    font-weight: 900;
    animation: blink 0.8s infinite;
}

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

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── INPUT SECTION ─────────────────────────────────────────────────────────── */
#input-section {
    display: flex;
    flex-direction: column;
}

#user-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
    color: #00ff41 !important;
    font-family: inherit;
    font-size: 1.1rem;
    width: 100%;
    min-height: 120px;
    padding: 10px 0;
    margin-bottom: 10px;
    outline: none;
    resize: none;
    overflow: hidden;
    text-transform: none;
}

#user-input::placeholder {
    color: rgba(0, 255, 65, 0.3);
    text-transform: none;
}

/* ── TICKER ────────────────────────────────────────────────────────────────── */
#sample-ticker {
    font-size: 0.8rem;
    color: rgba(0, 255, 65, 0.6);
    margin-bottom: 35px;
    min-height: 3.5rem;
    display: flex;
    gap: 8px;
    text-transform: none;
}

#ticker-text {
    transition: opacity 0.6s ease-in-out;
    font-style: italic;
}

.fade-out { opacity: 0 !important; }

/* ── BUTTONS ───────────────────────────────────────────────────────────────── */
#submit-btn {
    width: 100%;
    background: #00ff41;
    color: #000;
    border: none;
    padding: 20px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    font-family: inherit;
    letter-spacing: 0.05em;
}

#submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── DECISION BOX ──────────────────────────────────────────────────────────── */
#decision-box {
    margin-top: 20px;
    text-transform: none;
    border: 1px solid rgba(0, 255, 65, 0.4);
    padding: 16px;
}

#decision-text {
    font-weight: 900;
    margin-bottom: 15px;
    color: #00ff41;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.decision-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── REWARD / DIRECTIVE BUTTONS ────────────────────────────────────────────── */
#reward-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#reward-title {
    font-size: 0.7rem;
    margin-bottom: 5px;
    color: #ffaa00;
    border-bottom: 1px solid rgba(255, 170, 0, 0.3);
    padding-bottom: 5px;
    font-weight: 900;
}

.reward-btn {
    width: 100%;
    display: block;
    border: 1px solid #00ff41;
    color: #00ff41;
    text-decoration: none;
    padding: 15px;
    text-align: center;
    font-size: 0.75rem;
    cursor: pointer;
    background: transparent;
    font-family: inherit;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.3;
}

/* ── DIRECTIVE EXPANSION ───────────────────────────────────────────────────── */
.directive-info {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    font-size: 0.7rem;
    text-transform: none;
    color: #ffaa00;
    padding: 0 10px;
    text-align: left;
    line-height: 1.4;
}

.directive-info.expanded {
    max-height: 150px;
    padding: 10px;
    margin-top: 5px;
    border-top: 1px dashed rgba(255, 170, 0, 0.3);
}

.proceed-link {
    display: inline-block;
    margin-top: 8px;
    color: #00ff41;
    font-weight: 900;
    text-decoration: underline;
    cursor: pointer;
}

/* ── FOOTER ────────────────────────────────────────────────────────────────── */
#legal-footer {
    display: none;
    margin-top: 60px;
    font-size: 0.6rem;
    opacity: 0.5;
    border-top: 1px solid rgba(0, 255, 65, 0.2);
    padding-top: 20px;
    text-transform: none;
}

#skin-suit-display {
    display: block;
    font-size: 1.6rem;
    font-weight: 900;
    color: #00ff41;
    margin-top: 10px;
    text-transform: uppercase;
}

/* ── UTILITIES ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.dim { opacity: 0.4; }

/* ── SCROLLBAR ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #003300; }

/* ── DECISION BOX — CP v2.7 ─────────────────────────────────────────────────── */
.decision-header {
    font-weight: 900;
    font-size: 0.75rem;
    color: #00ff41;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
    border-top: 1px solid rgba(0, 255, 65, 0.2);
    padding-top: 20px;
}

.dossier-link {
    background: #00ff41;
    color: #000 !important;
    font-weight: 900;
}

.dossier-link:hover {
    background: #00cc33;
}

/* ── PROPAGATION ZONE — RE-ENTRY LOOP ─────────────────────────────────────── */
#propagation-zone {
    margin-top: 24px;
    border: 1px solid rgba(255, 170, 0, 0.4);
    background: rgba(255, 170, 0, 0.03);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.propagation-header {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #ffaa00;
    opacity: 0.7;
    text-transform: uppercase;
}

.propagation-clip-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #ffaa00;
    text-transform: none;
    font-style: italic;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 170, 0, 0.3);
}

.propagation-clip-label {
    font-size: 0.72rem;
    line-height: 1.6;
    color: rgba(0, 255, 65, 0.7);
    text-transform: none;
    padding: 0 4px;
    margin-top: 4px;
}

.propagation-btn {
    width: 100%;
    background: transparent;
    border: 1px solid #ffaa00;
    color: #ffaa00;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.propagation-btn:hover {
    background: #ffaa00;
    color: #000;
}

#propagation-zone.zone-complete {
    opacity: 1;
    pointer-events: none;
    border-color: rgba(0, 255, 65, 0.15);
    background: rgba(0, 255, 65, 0.02);
}

#propagation-zone.zone-complete .propagation-header,
#propagation-zone.zone-complete .propagation-subheader,
#propagation-zone.zone-complete .propagation-clip-text {
    opacity: 0.3;
}

#propagation-zone.zone-complete .propagation-btn {
    display: none;
}

#propagation-zone.zone-complete .propagation-link {
    pointer-events: auto;
    opacity: 1;
    color: #00ff41;
    border: 1px solid #00ff41;
    animation: pulse-green 1.5s ease-in-out infinite;
}

/* ── TERMINAL BOTTOM PADDING — for fixed specimen file bar ─────────────────── */
#terminal {
    padding-bottom: 80px;
}

/* ── CONTEXTUAL NAVIGATOR — TERMINAL ─────────────────────────────────────── */
/* Amber direction block above input. One instruction at a time. */
#navigator-block {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-left: 3px solid #ffaa00;
    background: rgba(255, 170, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.navigator-header {
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #ffaa00;
    text-transform: uppercase;
}

.navigator-directive {
    font-size: 0.75rem;
    line-height: 1.6;
    color: rgba(255, 170, 0, 0.75);
    text-transform: none;
    white-space: pre-line;
    font-style: normal;
}

/* ── IDENTIFIER DISCLOSURE BLOCK ────────────────────────────────────────────── */
/* Amber. Appears below audit output on Turn 1 only. */
.identifier-disclosure {
    margin-top: 20px;
    padding: 16px;
    border-left: 3px solid #ffaa00;
    background: rgba(255, 170, 0, 0.04);
    font-size: 0.78rem;
    line-height: 1.7;
    color: rgba(255, 170, 0, 0.85);
    text-transform: none;
    font-style: normal;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ── SPECIMEN FILE BAR — FIXED BOTTOM STRIP ─────────────────────────────────── */
/* Slim fixed strip at bottom. Starts collapsed — header only visible.           */
/* Click to expand and read full content. White text.                            */
.specimen-file-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.specimen-file-header {
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 8px 16px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.specimen-file-header:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.specimen-file-chevron {
    font-size: 0.55rem;
    opacity: 0.5;
}

.specimen-file-body {
    font-size: 0.7rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    padding: 12px 16px;
    text-transform: none;
    font-style: normal;
    max-height: 220px;
    overflow-y: auto;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.specimen-file-body::-webkit-scrollbar { width: 2px; }
.specimen-file-body::-webkit-scrollbar-thumb { background: #222; }

/* Starts collapsed — body hidden until clicked */
.specimen-file-body.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

/* ── SPECIMEN FILE BAR — INNER ELEMENTS ─────────────────────────────────────── */
.sf-section-title {
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    margin-top: 12px;
    margin-bottom: 4px;
}

.sf-line {
    font-size: 0.72rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 4px 0;
    text-transform: none;
}

.sf-link {
    color: #00ff41;
    text-decoration: none;
    font-weight: 700;
    word-break: break-all;
}

.sf-link:hover {
    text-decoration: underline;
}

.sf-warning {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── PROPAGATION LINK — POST-COUNTDOWN FB LINK ──────────────────────────────── */
.propagation-link {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid #00ff41;
    color: #00ff41;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 20px;
    text-align: center;
    text-decoration: none;
    margin-top: 8px;
    transition: background 0.15s, color 0.15s;
}

.propagation-link:hover {
    background: #00ff41;
    color: #000;
}

.propagation-link.hidden {
    display: none;
}

/* ── DIRECTIVES — OIT REBUILD ────────────────────────────────────────────────── */
.directive-block {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid rgba(0, 255, 65, 0.15);
    background: rgba(0, 255, 65, 0.02);
}

.directive-label {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: rgba(0, 255, 65, 0.5);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.directive-body {
    font-size: 0.78rem;
    line-height: 1.6;
    color: rgba(0, 255, 65, 0.8);
    text-transform: none;
    margin-bottom: 12px;
}

.directive-cta {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid rgba(0, 255, 65, 0.4);
    color: #00ff41;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.directive-cta:hover {
    background: #00ff41;
    color: #000;
}

/* Hide old reward-btn styles for retired directives */
#reward-title {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: rgba(0, 255, 65, 0.4);
    margin-bottom: 4px;
    display: none; /* title no longer needed with OIT structure */
}

/* ── PROPAGATION SUBHEADER ───────────────────────────────────────────────────── */
.propagation-subheader {
    font-size: 0.72rem;
    line-height: 1.6;
    color: rgba(0, 255, 65, 0.7);
    text-transform: none;
    margin-bottom: 12px;
    padding: 0 4px;
}

/* ── GATE 4 FOLLOW DIRECTIVE (PATH_A only) ───────────────────────────────────── */
.follow-directive {
    border-top: 1px solid rgba(0, 255, 65, 0.2);
    margin-bottom: 12px;
    padding-top: 14px;
}

.follow-copy {
    font-size: 0.72rem;
    line-height: 1.7;
    color: rgba(0, 255, 65, 0.6);
    text-transform: none;
    margin-bottom: 12px;
}

.follow-copy em {
    color: #00ff41;
    font-style: normal;
}

.follow-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #00ff41;
    border: 1px solid #00ff41;
    text-decoration: none;
    margin-bottom: 10px;
    background: transparent;
    cursor: pointer;
}

.follow-btn:hover {
    background: rgba(0, 255, 65, 0.08);
}
