/* ============================================================
   KINGDOM.CSS — shared identity layer for all 9th Kingdom pages
   Injected LAST (before </head>) so it wins equal-specificity
   cascade ties against each page's own <style> block.
   Philosophy: restyle identity only (palette, type, borders).
   Never fight page layout — the pages keep their bones.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

:root {
    --green: #16281c;
    --green-2: #1d3325;
    --green-3: #0e1a12;
    --ivory: #f4efe4;
    --gold: #b98a4a;
    --gold-2: #c9a227;
    --hairline: rgba(201, 162, 39, 0.35);
}

/* ---------- Body: charcoal night becomes forest night ---------- */
body {
    background: linear-gradient(135deg, #0e1a12 0%, #16281c 50%, #0e1a12 100%) !important;
    color: #e8e2d0 !important;
    font-family: 'EB Garamond', Georgia, serif !important;
}

/* ---------- Typography ---------- */
h1, h2 {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
}
h3, h4 {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-weight: 600 !important;
}
.subtitle, .section-title {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    color: #d9c48a !important;
    font-style: italic;
}

/* ---------- Global nav: same bones, kingdom skin ---------- */
.global-nav {
    background: rgba(14, 26, 18, 0.96) !important;
    border-bottom: 1px solid var(--hairline) !important;
}
.global-nav-logo {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    letter-spacing: 0.26em !important;
    text-transform: uppercase !important;
    color: #f4efe4 !important;
    font-weight: 600 !important;
}
.global-nav-logo:hover { color: var(--gold-2) !important; }
.global-nav-link { color: #cfc9b4 !important; }
.global-nav-link:hover { color: var(--gold-2) !important; }
.global-nav-secondary { color: var(--gold-2) !important; }
.global-nav-secondary:hover { color: #e0d4a8 !important; }
.global-nav-cta {
    background: transparent !important;
    color: var(--gold-2) !important;
    border: 1px solid var(--gold-2) !important;
    border-radius: 2px !important;
    font-family: 'EB Garamond', Georgia, serif !important;
    letter-spacing: 0.06em;
    transition: all 0.25s ease;
}
.global-nav-cta:hover {
    background: rgba(201, 162, 39, 0.14) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.25) !important;
}

/* ---------- Buttons: the gold-outline language ---------- */
.btn, .submit-btn {
    font-family: 'EB Garamond', Georgia, serif !important;
    border-radius: 2px !important;
    transition: all 0.25s ease;
}
.btn-primary {
    background: linear-gradient(135deg, #c9a227 0%, #a8821e 100%) !important;
    color: #0e1a12 !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3) !important;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.45) !important;
}
.btn-secondary {
    background: transparent !important;
    color: var(--gold-2) !important;
    border: 1px solid var(--gold-2) !important;
    border-radius: 2px !important;
}
.btn-secondary:hover {
    background: rgba(201, 162, 39, 0.1) !important;
    transform: translateY(-3px);
    box-shadow: none !important;
}

/* ---------- Panels & cards: green-tinted parchment ---------- */
.card, .stat-card, .choice-card, .feature-card,
.what-is, .cidcore-section, .treasure-section {
    background: rgba(29, 51, 37, 0.55) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 4px !important;
}
.feature-card:hover, .choice-card:hover {
    border-color: rgba(201, 162, 39, 0.55) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], textarea, select {
    background: rgba(14, 26, 18, 0.7) !important;
    border: 1px solid var(--hairline) !important;
    color: #e8e2d0 !important;
    border-radius: 2px !important;
    font-family: 'EB Garamond', Georgia, serif !important;
}
input:focus, textarea:focus, select:focus {
    outline: none !important;
    border-color: var(--gold-2) !important;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15) !important;
}
::placeholder { color: #7a8a70 !important; font-style: italic; }

/* ---------- Links ---------- */
a { transition: color 0.25s ease; }
footer, footer p { color: #9aa694 !important; }
footer a { color: var(--gold-2) !important; }

/* ---------- Hairline ornaments ---------- */
header, footer {
    border-color: var(--hairline) !important;
}

/* ---------- Witness protocol & status chrome (portal pages) ---------- */
.witness-label, .status-label {
    font-family: 'EB Garamond', Georgia, serif !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--gold) !important;
}
.witness-value, .status-value {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    color: #e8e2d0 !important;
}

/* ---------- Poem / whisper text ---------- */
.poem-stanza {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-style: italic;
    color: #d9c48a !important;
}

/* ---------- Scrollbar, quiet ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0e1a12; }
::-webkit-scrollbar-thumb { background: #2b4230; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #b98a4a; }

/* ---------- Selection ---------- */
::selection { background: rgba(201, 162, 39, 0.35); color: #0e1a12; }

/* ============================================================
   PHASE 2 — full unification with the new front door
   ============================================================ */

/* Typography: kill the old glow, adopt Cormorant hierarchy */
h1, h2, h3, h4 { text-shadow: none !important; }
h1 { color: #f4efe4 !important; letter-spacing: 0.02em !important; }
h2 { color: #e8e2d0 !important; }
h3 { color: #d9c48a !important; }
h4 { color: #cfc9b4 !important; }

/* Old circular logo: quiet hairline instead of heavy glow */
.logo {
    border-color: var(--hairline) !important;
    box-shadow: 0 0 24px rgba(201, 162, 39, 0.15) !important;
}

/* Old warm-gray text classes → new sage tones */
.what-is p, .cidcore-section p, .treasure-section p,
.feature-card p, .choice-desc, .coin-desc, .section p {
    color: #b3ac97 !important;
}

/* Highlight spans keep the bright gold */
.highlight { color: var(--gold-2) !important; }

/* Stat blocks: Cormorant numerals, antique gold */
.stat-value {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    color: #d9c48a !important;
    font-weight: 600 !important;
}
.stat-label { color: #a89f7a !important; letter-spacing: 0.08em !important; }

/* Coin & choice cards */
.coin-name {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    color: #d9c48a !important;
    font-weight: 600 !important;
}
.choice-title {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    color: #e8e2d0 !important;
    font-weight: 600 !important;
}

/* Tables (ledger, lists) */
th, td { border-bottom: 1px solid var(--hairline) !important; }
th {
    color: var(--gold) !important;
    letter-spacing: 0.08em !important;
    font-weight: 500 !important;
}

/* Blockquotes: the whisper voice */
blockquote {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-style: italic !important;
    color: #d9c48a !important;
}

/* Split rows, form labels, misc chrome */
.split-row { border-color: var(--hairline) !important; }
.split-label { color: var(--gold) !important; letter-spacing: 0.08em !important; }
.split-amount { color: #e8e2d0 !important; }
.form-group label { color: #cfc9b4 !important; letter-spacing: 0.04em !important; }

/* Quiet links */
.back-link { color: var(--gold-2) !important; font-style: italic; }
.back-link:hover { color: #e0d4a8 !important; }
.login-link {
    background: transparent !important;
    border: 1px solid var(--hairline) !important;
    color: var(--gold-2) !important;
    border-radius: 2px !important;
    font-family: 'EB Garamond', Georgia, serif !important;
}
.login-link:hover { background: rgba(201, 162, 39, 0.1) !important; }

/* Loading & status lines */
.loading { color: #8a9280 !important; font-style: italic; }
.status-line { border-color: var(--hairline) !important; }

/* Hairlines everywhere */
hr { border: none; border-top: 1px solid var(--hairline) !important; }

/* Headers/footers: transparent bands with hairline edges */
header { background: transparent !important; }
section { border-color: var(--hairline); }