/* ===================================================================
 * phoenixcognition.com — site-wide dark professional theme
 * Applied to all main content pages (landing, legal, history,
 * forschungs-preview, etc.) via base.html.
 * Bait pages override back to a neutral/generic look so they don't
 * look "branded" — see .bait-frame at the end of this file.
 * =================================================================== */

:root {
    --bg:         #0a0e1a;
    --bg-2:       #0d1322;
    --surface:    #131826;
    --surface-2:  #1c2333;
    --border:     #232b3d;
    --text:       #f4f6fb;
    --text-mute:  #94a3b8;
    --text-dim:   #64748b;
    --accent:     #f59e0b;
    --accent-2:   #d97706;
    --blue:       #3b82f6;
    --green:      #10b981;
    --red:        #ef4444;
    --mono:       ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --serif:      "Iowan Old Style", "Charter", "Georgia", serif;
    --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted rgba(245,158,11,0.4);
}
a:hover {
    color: var(--text);
    border-bottom-color: var(--accent);
}

/* ===================== HEADER / NAV ===================== */
.site-header {
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.site-header .brand {
    color: var(--text);
    font-weight: 700;
    font-size: 16px;
    border: none;
    letter-spacing: -0.2px;
}
.site-header .brand:hover { color: var(--accent); }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.site-nav a { color: var(--text-mute); border: none; }
.site-nav a:hover { color: var(--accent); }

/* ===================== MAIN ===================== */
.site-main {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.site-main h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 0 24px 0;
    color: var(--text);
}
.site-main h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 40px 0 12px 0;
    color: var(--text);
    border-top: 1px solid var(--border);
    padding-top: 28px;
}
.site-main h2:first-of-type { border-top: none; padding-top: 0; }
.site-main h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 28px 0 8px 0;
    color: var(--text);
}
.site-main p {
    color: var(--text-mute);
    margin: 12px 0;
    line-height: 1.75;
}
.site-main p strong { color: var(--text); }
.site-main ul, .site-main ol {
    color: var(--text-mute);
    line-height: 1.75;
}
.site-main hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

.site-main table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.site-main th, .site-main td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
    color: var(--text);
}
.site-main th {
    background: var(--surface);
    font-weight: 600;
    color: var(--text);
}
.site-main td { color: var(--text-mute); }

.site-main code {
    background: var(--surface-2);
    color: #fbbf24;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 0.9em;
}
.site-main pre {
    background: #050810;
    border: 1px solid var(--border);
    color: #e5e7eb;
    padding: 16px 20px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.55;
}
.site-main pre code { background: transparent; padding: 0; color: inherit; }

.site-main blockquote {
    border-left: 3px solid var(--accent);
    background: var(--surface);
    padding: 14px 20px;
    margin: 20px 0;
    border-radius: 0 6px 6px 0;
}

/* ===================== LANDING ===================== */
.lang-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 32px 0;
}
@media (min-width: 720px) {
    .lang-split { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.lang-split section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}
.lang-split section h2 {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    font-size: 14px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.notice {
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 14px 18px;
    margin: 28px 0;
    color: var(--text);
    font-size: 14px;
}
.notice p { margin: 4px 0; color: var(--text); }
.notice strong { color: var(--accent); }

/* ===================== LEGAL ARTICLES ===================== */
article.legal { color: var(--text-mute); }
article.legal h1 {
    font-size: 32px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 12px;
    margin-bottom: 28px;
}
article.legal h2 {
    color: var(--text);
    border-top-color: var(--border);
}
article.legal hr { margin: 48px 0; }
article.legal.supplement { font-size: 14.5px; line-height: 1.7; }
article.legal.supplement h2 { font-size: 18px; }

/* ===================== HISTORY (Tiananmen) ===================== */
article.history-page {
    font-family: var(--serif);
    color: var(--text);
    max-width: 680px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.85;
}
article.history-page h1 {
    text-align: center;
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 18px;
}
article.history-page h2 {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-mute);
    text-align: center;
    border-top: none;
    margin-top: 36px;
    padding-top: 0;
}
article.history-page p {
    color: var(--text);
    font-family: var(--serif);
    text-align: justify;
}
article.history-page .caption {
    background: var(--surface);
    border-left: 2px solid var(--accent);
    padding: 16px 20px;
    margin: 28px 0;
    font-size: 15px;
}
article.history-page .caption p { margin: 6px 0; }
article.history-page .caption strong {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 6px;
    font-weight: 600;
}
article.history-page .cite {
    font-size: 13px;
    color: var(--text-mute);
    font-style: italic;
    margin-top: 8px !important;
}
article.history-page ul {
    color: var(--text);
    font-family: var(--serif);
    list-style: none;
    padding-left: 0;
}
article.history-page ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
article.history-page ul li:last-child { border-bottom: none; }

/* ===================== FOOTER ===================== */
.site-footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    padding: 32px 24px;
    text-align: center;
    font-size: 13px;
    line-height: 1.7;
}
.site-footer a { color: var(--text-mute); border: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .ts {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 8px;
}

/* ===================== BONA-FIDE WARNING BANNER ===================== */
.bf-warning {
    max-width: 600px;
    margin: 48px auto;
    background: var(--surface);
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 28px;
    color: var(--text);
}
.bf-warning h1 { color: var(--accent); margin-top: 0; font-size: 22px; }
.bf-warning p { color: var(--text); }
.bf-warning .bf-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.bf-warning button, .bf-warning a.btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
}
.bf-warning button.primary, .bf-warning a.btn.primary {
    background: var(--accent);
    color: #1a1208;
    border-color: var(--accent);
}
.bf-warning button.secondary, .bf-warning a.btn.secondary {
    background: var(--surface-2);
    color: var(--text);
}

/* Forschungs-preview disclosure ribbon (visible to bona-fide humans only) */
.bf-research-ribbon {
    background: #2a1c0d;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 14px 18px;
    margin: 24px auto;
    max-width: 820px;
    font-size: 14px;
    color: #fed7aa;
    line-height: 1.6;
}
.bf-research-ribbon p { margin: 6px 0; color: #fed7aa; }
.bf-research-ribbon strong { color: var(--accent); }
.bf-research-ribbon a { color: var(--accent); border: none; }

/* ===================== BAIT FRAME (override back to neutral) =====================
 * Bait pages (/admin, /wp-login.php, /phpmyadmin, /cpanel, /login) wrap their
 * form in <div class="bait-frame">. We override the dark theme back to a
 * generic light/neutral look so scanners see a normal-shape login wall,
 * not our branded dark theme.
 * ================================================================== */
.bait-frame {
    max-width: 360px;
    margin: 80px auto;
    background: #ffffff;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    padding: 32px 28px;
    color: #222;
    font-family: -apple-system, sans-serif;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bait-frame h1 {
    font-size: 17px;
    margin: 0 0 20px 0;
    color: #222;
    text-align: center;
}
.bait-frame form { display: flex; flex-direction: column; gap: 12px; }
.bait-frame label { font-size: 13px; color: #555; }
.bait-frame input[type=text],
.bait-frame input[type=password] {
    border: 1px solid #ccc;
    padding: 8px 10px;
    border-radius: 3px;
    font-size: 14px;
    color: #222;
    background: #fff;
}
.bait-frame input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}
.bait-frame button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
}
.bait-frame button:hover { background: #1e6097; }
.bait-frame .error { color: #d63638; font-size: 13px; margin: 8px 0; }

/* When a bait page renders, neutralize the dark theme body so the
 * generic admin wall isn't surrounded by dark phoenixcognition chrome. */
body.bait {
    background: #f5f5f5 !important;
    color: #222 !important;
}
body.bait .site-header,
body.bait .site-footer { display: none !important; }

/* ===================== UTILITY ===================== */
.mono { font-family: var(--mono); }
.muted { color: var(--text-mute); }
.center { text-align: center; }
