/* BMT Master Theme - v2.31.2 */
:root {
 --bg-body: #f8fafc;
 --bg-surface: #ffffff;
 --bg-card: #f1f5f9;
 --bg-card-hover: #e2e8f0;
 --border-color: #cbd5e1;
 --border-subtle: #e2e8f0;
 --border-highlight: #0284c7;
 --text-primary: #0f172a;
 --text-secondary: #334155;
 --text-muted: #64748b;
 --accent-blue: #0284c7;
 --accent-blue-hover: #0369a1;
 --bg-blue-subtle: #f0f9ff;
 --accent-emerald: #059669;
 --bg-emerald-subtle: #ecfdf5;
 --accent-amber: #d97706;
 --bg-amber-subtle: #fffbeb;
 --accent-red: #dc2626;
 --bg-red-subtle: #fef2f2;
 --accent-slate: #475569;
 --bg-slate-subtle: #f1f5f9;
 --font-heading: 'Georgia', serif;
 --font-reading: 'Merriweather', Georgia, serif;
 --font-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
 --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
 --font-size-base: 18px;
 --line-height-reading: 1.8;
}

[data-theme="dark"] {
 --bg-body: #0b0f19;
 --bg-surface: #131b2e;
 --bg-card: #1b2640;
 --bg-card-hover: #223152;
 --border-color: #24324f;
 --border-subtle: #1e293b;
 --border-highlight: #38bdf8;
 --text-primary: #f8fafc;
 --text-secondary: #cbd5e1;
 --text-muted: #94a3b8;
 --accent-blue: #38bdf8;
 --accent-blue-hover: #7dd3fc;
 --bg-blue-subtle: rgba(56, 189, 248, 0.15);
 --accent-emerald: #10b981;
 --bg-emerald-subtle: rgba(16, 185, 129, 0.15);
 --accent-amber: #fbbf24;
 --bg-amber-subtle: rgba(251, 191, 36, 0.15);
 --accent-red: #f87171;
 --bg-red-subtle: rgba(239, 68, 68, 0.15);
 --accent-slate: #94a3b8;
 --bg-slate-subtle: #1e293b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
 background-color: var(--bg-body);
 color: var(--text-primary);
 font-family: var(--font-ui);
 font-size: var(--font-size-base);
 line-height: 1.6;
 min-height: 100vh;
 display: flex;
 flex-direction: column;
}

/* NAVBAR */
header.bmt-nav {
 background: var(--bg-surface);
 border-bottom: 2px solid var(--border-color);
 padding: 0.85rem 2rem;
 display: flex;
 align-items: center;
 justify-content: space-between;
 flex-wrap: wrap;
 gap: 1.25rem;
 position: sticky;
 top: 0;
 z-index: 100;
}
.nav-brand { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.nav-brand h1 { font-size: 1.45rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.nav-brand span { font-size: 0.82rem; font-weight: 600; color: var(--accent-blue); text-transform: none; letter-spacing: 0.2px; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a {
 text-decoration: none;
 color: var(--text-secondary);
 font-weight: 700;
 font-size: 1.15rem;
 padding: 0.3rem 0.6rem;
 border-radius: 6px;
 transition: color 0.15s, background-color 0.15s;
}
.nav-links a:hover { color: var(--accent-blue); background-color: var(--bg-card); }
.nav-links a.active {
 color: var(--accent-blue);
 border-bottom: 3px solid var(--accent-blue);
 border-radius: 6px 6px 0 0;
}
.nav-controls { display: flex; align-items: center; gap: 0.75rem; }
.select-input, .btn-action {
 padding: 7px 12px;
 border: 1px solid var(--border-color);
 border-radius: 6px;
 background: var(--bg-surface);
 color: var(--text-primary);
 font-family: inherit;
 font-size: 0.9rem;
 cursor: pointer;
}
.btn-action:hover { background: var(--bg-card); border-color: var(--border-highlight); }

/* MAIN CONTENT */
.main-content {
 flex: 1;
 max-width: 1440px;
 width: 100%;
 margin: 0 auto;
 padding: 2rem;
}

.section-title-row { margin-bottom: 1.5rem; }
.section-title-row h2 { font-size: 1.8rem; font-weight: 800; }

/* LIBRARY GRID */
.library-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
 gap: 1.75rem;
}
.book-card {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 10px;
 padding: 1.5rem;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
 box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.book-card:hover {
 transform: translateY(-2px);
 border-color: var(--border-highlight);
 box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.card-top {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 0.75rem;
}
.badge-status {
 font-size: 0.72rem;
 font-weight: 800;
 padding: 3px 8px;
 border-radius: 4px;
 text-transform: uppercase;
 letter-spacing: 0.5px;
 font-family: var(--font-mono);
}
.badge-status.completed { background: var(--bg-emerald-subtle); color: var(--accent-emerald); border: 1px solid var(--accent-emerald); }
.badge-status.partial_completed { background: var(--bg-emerald-subtle); color: var(--accent-emerald); border: 1px solid var(--accent-emerald); }
.badge-status.in_progress { background: var(--bg-amber-subtle); color: var(--accent-amber); border: 1px solid var(--accent-amber); }
.badge-status.baseline { background: var(--bg-slate-subtle); color: var(--accent-slate); border: 1px solid var(--border-color); }
.pg-badge { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

.card-title {
 font-family: var(--font-heading);
 font-size: 1.35rem;
 font-weight: 700;
 color: var(--text-primary);
 text-decoration: none;
 line-height: 1.3;
 margin-bottom: 0.25rem;
 display: block;
}
.card-title:hover { color: var(--accent-blue); }
.card-author { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1rem; }
.card-meta {
 font-size: 0.85rem;
 color: var(--text-secondary);
 font-family: var(--font-mono);
 margin-bottom: 1rem;
 display: flex;
 align-items: center;
 gap: 0.6rem;
 flex-wrap: wrap;
}

/* PILLS */
.lang-pills-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.25rem; }
.lang-pill {
 font-family: var(--font-mono);
 padding: 4px 6px;
 border-radius: 5px;
 text-decoration: none;
 display: inline-flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 min-width: 52px;
 line-height: 1.15;
 transition: all 0.15s;
}
.lang-pill .pill-code { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.5px; }
.lang-pill .pill-stat { font-size: 0.65rem; font-weight: 700; margin-top: 1px; white-space: nowrap; }
.lang-pill .pill-stat.stat-full { color: var(--accent-emerald); }
.lang-pill .pill-stat.stat-partial { color: var(--accent-red); }

.lang-pill.pill-orig { background: var(--bg-card); color: var(--accent-slate); border: 1px solid var(--border-color); }
.lang-pill.pill-orig .pill-stat.stat-orig { color: var(--accent-blue); font-weight: 800; }
.lang-pill.pill-orig:hover { background: var(--bg-card-hover); border-color: var(--accent-blue); }
.lang-pill.pill-full { background: var(--bg-emerald-subtle); color: var(--accent-emerald); border: 1px solid var(--accent-emerald); }
.lang-pill.pill-full:hover { background: var(--accent-emerald); color: #ffffff; }
.lang-pill.pill-full:hover .pill-stat { color: #ffffff; }
.lang-pill.pill-partial { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border-color); }
.lang-pill.pill-partial:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--border-highlight); }

.card-footer-links {
 border-top: 1px solid var(--border-subtle);
 padding-top: 0.75rem;
 display: flex;
 gap: 1rem;
 font-size: 0.85rem;
}
.card-footer-links a { color: var(--accent-blue); text-decoration: none; font-weight: 600; }
.card-footer-links a:hover { text-decoration: underline; }

/* READER STYLES */
.reader-book-picker { margin: 0.75rem 0 1rem 0; display: flex; align-items: center; gap: 0.75rem; }
.reader-book-header h3 { font-family: var(--font-heading); font-size: 1.45rem; font-weight: 700; color: var(--text-primary); }
.reader-book-header span { font-size: 0.95rem; color: var(--text-muted); }
.reader-toolbar {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 padding: 0.9rem 1.25rem;
 margin-bottom: 1.25rem;
 display: flex;
 justify-content: space-between;
 align-items: center;
 flex-wrap: wrap;
 gap: 1rem;
}
.toolbar-group { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.toolbar-group label { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); }

.reader-column-headers {
 display: grid;
 grid-template-columns: 75px 1fr 1fr;
 gap: 1.5rem;
 padding: 0.5rem 1.25rem;
 margin-bottom: 0.5rem;
 align-items: center;
}
.reader-column-headers.single-col { grid-template-columns: 75px 1fr 280px; }
.col-header-cell { display: flex; align-items: center; gap: 0.6rem; }
.col-header-cell label { font-size: 0.82rem; font-weight: 800; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
.col-header-cell select { font-weight: 600; }

.chapter-divider {
 background: var(--bg-card);
 border: 1px solid var(--border-color);
 border-left: 4px solid var(--accent-blue);
 border-radius: 6px;
 padding: 0.9rem 1.25rem;
 margin: 1.25rem 0 0.5rem 0;
}
.chapter-divider h4 { font-family: var(--font-heading); font-size: 1.15rem; color: var(--text-primary); letter-spacing: 0.5px; }

.reader-grid { display: flex; flex-direction: column; gap: 0.85rem; }
.sentence-row {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 padding: 1rem 1.25rem;
 display: grid;
 grid-template-columns: 75px 1fr 1fr;
 gap: 1.5rem;
 align-items: start;
 transition: border-color 0.2s, background-color 0.2s;
 scroll-margin-top: 90px;
}
.sentence-row.single-col { grid-template-columns: 75px 1fr; }
.sentence-row.anchor-target { border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2); }
.anchor-meta-col { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; font-family: var(--font-mono); }
.anchor-num { font-size: 0.85rem; font-weight: 700; color: var(--accent-blue); }
.xray-btn {
 background: transparent;
 border: 1px solid var(--border-color);
 border-radius: 4px;
 padding: 2px 6px;
 font-family: var(--font-mono);
 font-size: 0.72rem;
 color: var(--accent-blue);
 cursor: pointer;
 font-weight: 600;
}
.xray-btn:hover { background: var(--bg-card); border-color: var(--border-highlight); }
.score-badge { font-size: 0.75rem; font-weight: 800; color: var(--accent-emerald); }
.col-text { font-family: var(--font-reading); font-size: 1.05rem; line-height: var(--line-height-reading); color: var(--text-primary); }
.col-right { border-left: 1px solid var(--border-subtle); padding-left: 1.25rem; }

/* X-RAY PANEL & CANDIDATE BADGES */
.xray-panel {
 grid-column: 1 / -1;
 background: var(--bg-card);
 border: 1px solid var(--border-color);
 border-radius: 6px;
 padding: 1rem;
 margin-top: 0.75rem;
 display: none;
}
.xray-panel.open { display: block; }
.xray-header-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem; }
.xray-lang-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.xray-tab-btn {
 padding: 3px 8px;
 border: 1px solid var(--border-color);
 border-radius: 4px;
 background: var(--bg-surface);
 color: var(--text-secondary);
 font-family: var(--font-mono);
 font-size: 0.75rem;
 font-weight: 700;
 cursor: pointer;
}
.xray-tab-btn.active { background: var(--accent-blue); color: #ffffff; border-color: var(--accent-blue); }
.audit-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 0.5rem; background: var(--bg-surface); }
.audit-table th, .audit-table td { border: 1px solid var(--border-color); padding: 6px 10px; text-align: left; }
.audit-table th { background: var(--bg-card); font-weight: 700; color: var(--text-secondary); }
.badge-mut {
 background: var(--bg-amber-subtle);
 color: var(--accent-amber);
 border: 1px solid var(--accent-amber);
 border-radius: 4px;
 padding: 2px 6px;
 font-size: 0.75rem;
 font-family: var(--font-mono);
 font-weight: 800;
}

.badge-candidate-draft {
 background: var(--bg-slate-subtle);
 color: var(--accent-slate);
 border: 1px solid var(--border-color);
 border-radius: 4px;
 padding: 2px 6px;
 font-size: 0.72rem;
 font-family: var(--font-mono);
 font-weight: 800;
 text-transform: uppercase;
 display: inline-block;
}

.badge-candidate-refine {
 background: var(--bg-blue-subtle);
 color: var(--accent-blue);
 border: 1px solid var(--accent-blue);
 border-radius: 4px;
 padding: 2px 6px;
 font-size: 0.72rem;
 font-family: var(--font-mono);
 font-weight: 800;
 text-transform: uppercase;
 display: inline-block;
}

/* GAMES HUB & ARENA */
.games-info-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
 gap: 1.75rem;
}
.game-info-card {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 10px;
 padding: 1.75rem;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 box-shadow: 0 1px 3px rgba(0,0,0,0.05);
 transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.game-info-card:hover {
 transform: translateY(-2px);
 border-color: var(--border-highlight);
 box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.game-card-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 0.85rem;
}
.badge-game {
 font-size: 0.72rem;
 font-weight: 800;
 padding: 3px 8px;
 border-radius: 4px;
 font-family: var(--font-mono);
 text-transform: uppercase;
 letter-spacing: 0.5px;
}
.badge-game.live { background: var(--bg-emerald-subtle); color: var(--accent-emerald); border: 1px solid var(--accent-emerald); }
.badge-game.planned { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border-color); }
.game-info-title {
 font-family: var(--font-heading);
 font-size: 1.35rem;
 font-weight: 700;
 margin-bottom: 0.6rem;
}
.game-info-desc {
 font-size: 0.95rem;
 color: var(--text-secondary);
 line-height: 1.6;
 margin-bottom: 1.5rem;
}
.game-info-footer {
 border-top: 1px solid var(--border-subtle);
 padding-top: 1rem;
 display: flex;
 justify-content: space-between;
 align-items: center;
 font-size: 0.88rem;
}
.game-info-footer a {
 color: var(--accent-blue);
 text-decoration: none;
 font-weight: 700;
}
.game-info-footer a:hover { text-decoration: underline; }

.arena-card {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 12px;
 padding: 2rem;
 box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.arena-toolbar {
 display: flex;
 justify-content: space-between;
 align-items: center;
 flex-wrap: wrap;
 gap: 1.25rem;
 margin-bottom: 1.75rem;
 border-bottom: 1px solid var(--border-subtle);
 padding-bottom: 1.25rem;
}
.arena-meta-box {
 display: flex;
 justify-content: space-between;
 align-items: center;
 font-family: var(--font-mono);
 font-size: 0.85rem;
 color: var(--accent-blue);
 margin-bottom: 0.75rem;
}
.cloze-box {
 background: var(--bg-card);
 border: 1px solid var(--border-color);
 border-radius: 10px;
 padding: 1.75rem;
 margin-bottom: 1.75rem;
}
.source-prompt {
 font-family: var(--font-reading);
 font-size: 1.15rem;
 color: var(--text-secondary);
 line-height: 1.7;
 margin-bottom: 1.5rem;
 border-left: 4px solid var(--accent-blue);
 padding-left: 1.25rem;
 font-style: italic;
}
.target-prompt {
 font-family: var(--font-heading);
 font-size: 1.35rem;
 line-height: 2;
 color: var(--text-primary);
 font-weight: 700;
}

/* FLASH-REVEAL & ACTIVE RECALL */
.curtain-box {
 background: var(--bg-card);
 border: 2px dashed var(--border-color);
 border-radius: 10px;
 padding: 1.75rem;
 margin-top: 1rem;
 text-align: center;
 cursor: pointer;
 transition: all 0.2s;
 user-select: none;
}
.curtain-box:hover {
 border-color: var(--accent-blue);
 background: var(--bg-card-hover);
}
.curtain-hidden-text {
 font-size: 1.15rem;
 font-weight: 700;
 color: var(--accent-blue);
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 0.6rem;
}
.curtain-revealed {
 background: var(--bg-surface) !important;
 border: 2px solid var(--accent-emerald) !important;
 text-align: left;
 cursor: default;
}
.revealed-target-text {
 font-family: var(--font-heading);
 font-size: 1.35rem;
 line-height: 1.8;
 color: var(--text-primary);
 font-weight: 700;
}
.recall-rating-row {
 display: flex;
 gap: 0.75rem;
 justify-content: center;
 flex-wrap: wrap;
 margin-top: 1.5rem;
}
.btn-rating {
 padding: 8px 16px;
 border-radius: 8px;
 font-weight: 700;
 font-size: 0.95rem;
 cursor: pointer;
 border: 1px solid var(--border-color);
 background: var(--bg-surface);
 color: var(--text-primary);
 transition: all 0.15s;
}
.btn-rating:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.08); }
.btn-rating.rate-again { border-color: var(--accent-red); color: var(--accent-red); background: var(--bg-red-subtle); }
.btn-rating.rate-hard { border-color: var(--accent-amber); color: var(--accent-amber); background: var(--bg-amber-subtle); }
.btn-rating.rate-good { border-color: var(--accent-blue); color: var(--accent-blue); background: var(--bg-blue-subtle); }
.btn-rating.rate-easy { border-color: var(--accent-emerald); color: var(--accent-emerald); background: var(--bg-emerald-subtle); }

.btn-review-deck {
 background: var(--bg-amber-subtle);
 color: var(--accent-amber);
 border: 1px solid var(--accent-amber);
 font-weight: 700;
}
.btn-review-deck.active {
 background: var(--accent-amber) !important;
 color: #ffffff !important;
}

/* MATCHER */
.matcher-container { display: flex; flex-direction: column; gap: 1.5rem; }
.matcher-instructions { font-size: 0.95rem; color: var(--text-secondary); font-style: italic; text-align: center; margin-bottom: 0.5rem; }
.matcher-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 1.5rem; align-items: stretch; }
.matcher-col-header {
 font-size: 0.85rem; font-weight: 800; text-transform: uppercase; color: var(--text-muted);
 letter-spacing: 0.5px; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border-subtle);
 display: flex; justify-content: space-between; align-items: center;
}
.matcher-card {
 background: var(--bg-surface); border: 2px solid var(--border-color); border-radius: 8px;
 padding: 1rem 1.25rem; font-family: var(--font-reading); font-size: 1rem; line-height: 1.6;
 color: var(--text-primary); cursor: pointer; transition: all 0.15s; user-select: none;
 min-height: 64px; display: flex; align-items: flex-start;
}
.matcher-card:hover:not(.matched):not(.selected) { border-color: var(--accent-blue); background: var(--bg-card); transform: translateY(-2px); }
.matcher-card.selected { border-color: var(--accent-blue); background: var(--bg-blue-subtle); color: var(--accent-blue); font-weight: 700; }
.matcher-card.matched { border-color: var(--accent-emerald); background: var(--bg-emerald-subtle); color: var(--accent-emerald); cursor: default; font-weight: 700; pointer-events: none; }
.matcher-card.wrong { border-color: var(--accent-red); background: var(--bg-red-subtle); color: var(--accent-red); }

/* DETECTIVE */
.detective-container { display: flex; flex-direction: column; gap: 1.5rem; }
.detective-instructions { font-size: 0.95rem; color: var(--text-secondary); font-style: italic; text-align: center; margin-bottom: 0.5rem; }
.detective-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: stretch; }
.detective-card {
 background: var(--bg-surface); border: 2px solid var(--border-color); border-radius: 10px;
 padding: 1.25rem 1.5rem; display: flex; flex-direction: column; justify-content: space-between;
 cursor: pointer; transition: all 0.15s; user-select: none; min-height: 140px;
}
.detective-card:hover:not(.evaluated) { border-color: var(--accent-blue); background: var(--bg-card); transform: translateY(-2px); }
.detective-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.detective-card-tag { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 800; text-transform: uppercase; color: var(--accent-blue); }
.detective-card-text { font-family: var(--font-reading); font-size: 1.1rem; line-height: 1.7; color: var(--text-primary); margin-bottom: 1rem; }
.detective-card.chosen-correct { border-color: var(--accent-emerald) !important; background: var(--bg-emerald-subtle) !important; }
.detective-card.chosen-wrong { border-color: var(--accent-red) !important; background: var(--bg-red-subtle) !important; }
.detective-card.is-champ { border-color: var(--accent-emerald); }
.detective-card.is-chal { border-color: var(--border-color); opacity: 0.85; }
.detective-card.evaluated { cursor: default; }
.detective-xray-reveal {
 background: var(--bg-card); border-top: 1px solid var(--border-subtle); border-radius: 6px;
 padding: 0.75rem 1rem; margin-top: 0.75rem; font-family: var(--font-mono); font-size: 0.82rem;
 display: flex; flex-direction: column; gap: 0.35rem;
}
.xray-mini-row { display: flex; justify-content: space-between; align-items: center; }
.badge-winner-tag { color: var(--accent-emerald); font-weight: 800; }
.badge-chal-tag { color: var(--text-muted); font-weight: 700; }

/* MEMORY GAME (Igra br. 6) */
.memory-container { display: flex; flex-direction: column; gap: 1.5rem; }
.memory-instructions { font-size: 0.95rem; color: var(--text-secondary); font-style: italic; text-align: center; margin-bottom: 0.5rem; }
.memory-grid {
 display: grid;
 grid-template-columns: repeat(5, 1fr);
 gap: 1rem;
 perspective: 1000px;
}
.memory-card {
 background: var(--bg-surface);
 border: 2px solid var(--border-color);
 border-radius: 10px;
 padding: 1.25rem 0.85rem;
 min-height: 130px;
 display: flex;
 flex-direction: column;
 justify-content: center;
 align-items: center;
 text-align: center;
 cursor: pointer;
 transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
 user-select: none;
 position: relative;
}
.memory-card:hover:not(.matched):not(.flipped) {
 border-color: var(--accent-blue);
 transform: translateY(-2px);
 box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.memory-card.flipped {
 border-color: var(--accent-blue);
 background: var(--bg-blue-subtle);
}
.memory-card.matched {
 border-color: var(--accent-emerald) !important;
 background: var(--bg-emerald-subtle) !important;
 color: var(--accent-emerald);
 cursor: default;
 pointer-events: none;
}
.memory-card.wrong {
 border-color: var(--accent-red) !important;
 background: var(--bg-red-subtle) !important;
}
.memory-card-back {
 font-size: 1.8rem;
 color: var(--accent-blue);
 font-weight: 800;
 user-select: none;
}
.memory-card-front {
 font-family: var(--font-reading);
 font-size: 0.95rem;
 line-height: 1.5;
 color: var(--text-primary);
 word-break: break-word;
}
.memory-card-lang {
 position: absolute;
 top: 6px;
 left: 8px;
 font-family: var(--font-mono);
 font-size: 0.7rem;
 font-weight: 800;
 color: var(--accent-blue);
 text-transform: uppercase;
 background: var(--bg-card);
 padding: 1px 5px;
 border-radius: 3px;
 border: 1px solid var(--border-subtle);
}

/* SCRAMBLE */
.scramble-drop-zone {
 min-height: 64px; background: var(--bg-surface); border: 2px dashed var(--border-color);
 border-radius: 8px; padding: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.75rem;
}
.scramble-drop-zone.zone-empty { color: var(--text-muted); font-size: 0.95rem; font-style: italic; justify-content: center; }
.scramble-drop-zone.zone-correct { border: 2px solid var(--accent-emerald) !important; background: var(--bg-emerald-subtle) !important; }
.scramble-drop-zone.zone-wrong { border: 2px solid var(--accent-red) !important; background: var(--bg-red-subtle) !important; }

/* BLANKS & CHIPS */
.blank-slot {
 display: inline-flex; align-items: center; justify-content: center; min-width: 90px; min-height: 38px;
 padding: 2px 10px; margin: 0 4px; border-bottom: 3px dashed var(--accent-blue); color: var(--accent-blue);
 background: var(--bg-surface); border-radius: 4px; font-family: var(--font-ui); font-size: 1.1rem; font-weight: 700; cursor: pointer;
}
.blank-slot.slot-empty { color: var(--text-muted); font-size: 0.85rem; }
.blank-slot.slot-filled { border-bottom: 3px solid var(--accent-blue); background: var(--bg-surface); }
.blank-slot.slot-correct { border-bottom: 3px solid var(--accent-emerald) !important; color: var(--accent-emerald) !important; background: var(--bg-emerald-subtle) !important; }
.blank-slot.slot-wrong { border-bottom: 3px solid var(--accent-red) !important; color: var(--accent-red) !important; background: var(--bg-red-subtle) !important; text-decoration: line-through; }

.word-bank-wrapper { margin: 1.75rem 0; }
.word-bank-header { font-size: 0.88rem; font-weight: 800; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75rem; }
.chips-container { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.chip-token {
 background: var(--bg-surface); border: 2px solid var(--border-color); border-radius: 8px;
 padding: 8px 14px; font-size: 1.05rem; font-weight: 700; color: var(--text-primary); cursor: pointer; user-select: none;
}
.chip-token:hover:not(:disabled) { border-color: var(--accent-blue); transform: translateY(-2px); }
.chip-token:disabled { opacity: 0.35; cursor: not-allowed; border-style: dashed; }
.chip-token.placed-chip { background: var(--bg-surface); border-color: var(--accent-blue); color: var(--accent-blue); }

.arena-actions { display: flex; justify-content: space-between; align-items: center; min-height: 48px; flex-wrap: wrap; gap: 1rem; }
.stat-pill { background: var(--bg-card); border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 20px; font-size: 0.88rem; font-weight: 700; font-family: var(--font-mono); }
.stat-pill.streak { color: var(--accent-amber); border-color: var(--accent-amber); background: var(--bg-amber-subtle); }
.stat-pill.score { color: var(--accent-emerald); border-color: var(--accent-emerald); background: var(--bg-emerald-subtle); }
.feedback-msg { font-size: 1.05rem; font-weight: 700; }
.feedback-msg.correct { color: var(--accent-emerald); }
.feedback-msg.incorrect { color: var(--accent-red); }

/* STATUS DASHBOARD */
.status-subtabs { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; }
.status-tab-btn {
 padding: 0.55rem 1.25rem; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-surface);
 color: var(--text-secondary); font-family: var(--font-ui); font-size: 0.95rem; font-weight: 700; cursor: pointer;
}
.status-tab-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.status-tab-btn.active { background: var(--accent-blue); color: #ffffff; border-color: var(--accent-blue); }

.status-matrix-wrapper { overflow-x: auto; margin-bottom: 2.5rem; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 8px; }
.status-matrix-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.85rem; text-align: center; }
.status-matrix-table th, .status-matrix-table td { padding: 8px 10px; border: 1px solid var(--border-color); white-space: nowrap; }
.status-matrix-table th { background: var(--bg-card); color: var(--text-secondary); font-weight: 700; }
.status-matrix-table th.th-book { text-align: left; min-width: 220px; }
.status-matrix-table td.td-book { text-align: left; font-family: var(--font-ui); font-weight: 700; }
.status-matrix-table td.td-book a { color: var(--text-primary); text-decoration: none; }
.status-matrix-table td.td-book a:hover { color: var(--accent-blue); text-decoration: underline; }

.cell-stat-100 { background: var(--bg-emerald-subtle); color: var(--accent-emerald); font-weight: 800; }
.cell-stat-prog { background: var(--bg-amber-subtle); color: var(--accent-amber); font-weight: 700; }
.cell-stat-base { background: var(--bg-slate-subtle); color: var(--text-muted); }

.status-cards-list { display: flex; flex-direction: column; gap: 2rem; }
.status-book-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 10px; padding: 1.5rem; }
.status-card-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.75rem; }
.status-card-title { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; }
.status-card-meta { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); }
.status-details-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-bottom: 1rem; }
.status-details-table th, .status-details-table td { padding: 8px 12px; border: 1px solid var(--border-color); text-align: left; }
.status-details-table th { background: var(--bg-card); font-weight: 700; color: var(--text-secondary); }
.status-badge-complete { color: var(--accent-emerald); font-weight: 800; }
.status-badge-progress { color: var(--accent-amber); font-weight: 800; }

.gaps-box { background: var(--bg-card); border: 1px dashed var(--border-color); border-radius: 6px; padding: 0.75rem 1rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.75rem; line-height: 1.5; }
.backlog-box { background: var(--bg-amber-subtle); border: 1px solid var(--accent-amber); border-radius: 6px; padding: 0.75rem 1rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent-amber); margin-top: 0.75rem; line-height: 1.5; }
.clean-box { background: var(--bg-emerald-subtle); border: 1px solid var(--accent-emerald); border-radius: 6px; padding: 0.5rem 1rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-emerald); margin-top: 0.75rem; }

/* QUALITY & LINGUISTICS */
.quality-toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; background: var(--bg-surface); padding: 1rem 1.25rem; border-radius: 8px; border: 1px solid var(--border-color); }
.quality-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.88rem; margin-bottom: 2rem; background: var(--bg-surface); }
.quality-table th, .quality-table td { padding: 8px 12px; border: 1px solid var(--border-color); text-align: right; }
.quality-table th { background: var(--bg-card); font-weight: 700; color: var(--text-secondary); }
.quality-table th:first-child, .quality-table td:first-child { text-align: left; font-family: var(--font-ui); }
.quality-table td.q-sample { font-weight: 700; }
.quality-table td.q-avg { font-weight: 800; color: var(--accent-emerald); }
.delta-badge { background: var(--bg-red-subtle); color: var(--accent-red); border: 1px solid var(--accent-red); padding: 2px 6px; border-radius: 4px; font-weight: 800; }
.outlier-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-left: 4px solid var(--accent-red); border-radius: 6px; padding: 1rem 1.25rem; margin-bottom: 0.85rem; }
.outlier-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; font-family: var(--font-mono); font-size: 0.85rem; }

.pagination-container { display: flex; justify-content: center; align-items: center; gap: 1.25rem; padding: 1rem 0; margin-top: 1.5rem; }

footer {
 text-align: center; padding: 2rem; font-size: 0.85rem; color: var(--text-muted);
 border-top: 1px solid var(--border-color); margin-top: auto; background: var(--bg-surface);
}

/* ==========================================================================
 NETWORK & GRAPH STYLES (network.html)
 ========================================================================== */
.network-toolbar {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 padding: 0.75rem 1.25rem;
 display: flex;
 justify-content: space-between;
 align-items: center;
 flex-wrap: wrap;
 gap: 1rem;
 margin-bottom: 1.25rem;
}

.network-workspace {
 display: grid;
 grid-template-columns: 1fr 340px;
 gap: 1.25rem;
 align-items: stretch;
}

.network-canvas-container {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 position: relative;
 overflow: hidden;
 min-height: 650px;
}

.network-sidebar {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 padding: 1.25rem;
 display: flex;
 flex-direction: column;
 max-height: 800px;
 overflow-y: auto;
}

.filter-type-pill {
 padding: 0.25rem 0.65rem;
 font-size: 0.78rem;
 font-weight: 700;
 border-radius: 12px;
 border: 1px solid var(--border-color);
 background: var(--bg-card);
 color: var(--text-muted);
 cursor: pointer;
 transition: all 0.12s;
}

.filter-type-pill.active { color: #ffffff; }
.filter-type-pill.pill-person.active { background: var(--accent-emerald); border-color: var(--accent-emerald); }
.filter-type-pill.pill-gpe.active { background: var(--accent-blue); border-color: var(--accent-blue); }
.filter-type-pill.pill-loc.active { background: var(--accent-amber); border-color: var(--accent-amber); }
.filter-type-pill.pill-fac.active { background: #9333ea; border-color: #9333ea; }

.entity-badge-tag {
 font-size: 0.72rem;
 font-weight: 800;
 padding: 2px 7px;
 border-radius: 4px;
 font-family: var(--font-mono);
 text-transform: uppercase;
}

.sidebar-stat-row {
 display: flex;
 justify-content: space-between;
 align-items: center;
 padding: 0.4rem 0;
 border-bottom: 1px solid var(--border-subtle);
 font-size: 0.88rem;
}

.sidebar-anchors-header {
 font-size: 0.82rem;
 font-weight: 800;
 text-transform: uppercase;
 color: var(--text-muted);
 margin: 1rem 0 0.5rem 0;
 letter-spacing: 0.5px;
}

.anchor-link-chip {
 display: inline-block;
 padding: 2px 8px;
 margin: 2px 4px 2px 0;
 background: var(--bg-card);
 border: 1px solid var(--border-color);
 border-radius: 4px;
 font-family: var(--font-mono);
 font-size: 0.78rem;
 font-weight: 700;
 color: var(--accent-blue);
 text-decoration: none;
 transition: all 0.12s;
}
.anchor-link-chip:hover {
 background: var(--accent-blue);
 color: #ffffff;
 border-color: var(--accent-blue);
}

/* ==========================================================================
 SEMANTIC GEOMETRY & UMAP 2D STYLES (geometry.html)
 ========================================================================== */
.geometry-toolbar {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 padding: 0.75rem 1.25rem;
 display: flex;
 justify-content: space-between;
 align-items: center;
 flex-wrap: wrap;
 gap: 1rem;
 margin-bottom: 1.25rem;
}

.filter-family-pill {
 padding: 0.25rem 0.65rem;
 font-size: 0.78rem;
 font-weight: 700;
 border-radius: 12px;
 border: 1px solid var(--border-color);
 background: var(--bg-card);
 color: var(--text-muted);
 cursor: pointer;
 transition: all 0.12s;
}

.filter-family-pill.active { color: #ffffff; }
.filter-family-pill.pill-bhs.active { background: #059669; border-color: #059669; }
.filter-family-pill.pill-romance.active { background: #0284c7; border-color: #0284c7; }
.filter-family-pill.pill-germanic.active { background: #d97706; border-color: #d97706; }
.filter-family-pill.pill-slavic.active { background: #9333ea; border-color: #9333ea; }
.filter-family-pill.pill-other.active { background: #e11d48; border-color: #e11d48; }

.geometry-workspace {
 display: grid;
 grid-template-columns: 1fr 340px;
 gap: 1.25rem;
 align-items: stretch;
}

.geometry-canvas-container {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 position: relative;
 overflow: hidden;
 min-height: 650px;
 display: flex;
 align-items: center;
 justify-content: center;
}

.geometry-sidebar {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 padding: 1.25rem;
 display: flex;
 flex-direction: column;
 max-height: 800px;
 overflow-y: auto;
}

.geom-dot {
 cursor: pointer;
 transition: opacity 0.2s, r 0.2s;
}

.geom-dot:hover {
 stroke: #ffffff;
 stroke-width: 2.5px;
}

.dot-dimmed { opacity: 0.12 !important; }
.dot-highlighted { opacity: 1 !important; r: 7px !important; stroke: #ffffff !important; stroke-width: 2px !important; }

.constellation-ray { pointer-events: none; }

.geom-tooltip {
 position: absolute;
 pointer-events: none;
 background: rgba(15, 23, 42, 0.95);
 color: #ffffff;
 padding: 0.5rem 0.75rem;
 border-radius: 6px;
 font-size: 0.82rem;
 z-index: 1000;
 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
 border: 1px solid rgba(255, 255, 255, 0.15);
 display: none;
}

.geom-edu-box {
 background: var(--bg-card);
 border: 1px solid var(--border-subtle);
 border-radius: 6px;
 padding: 1rem;
 font-size: 0.88rem;
 line-height: 1.55;
 color: var(--text-secondary);
}

.geom-edu-box h5 {
 font-size: 0.95rem;
 font-weight: 700;
 color: var(--text-primary);
 margin: 0.8rem 0 0.3rem 0;
}

.geom-edu-box h5:first-child { margin-top: 0; }

.geom-lang-item {
 padding: 0.6rem;
 background: var(--bg-surface);
 border: 1px solid var(--border-subtle);
 border-radius: 5px;
 margin-bottom: 0.5rem;
}

.geom-translations-scroll {
 max-height: 480px;
 overflow-y: auto;
 padding-right: 4px;
}

@media (max-width: 900px) {
 .reader-column-headers { grid-template-columns: 1fr; gap: 0.5rem; }
 .sentence-row { grid-template-columns: 1fr; gap: 0.75rem; }
 .anchor-meta-col { flex-direction: row; align-items: center; }
 .col-right { border-left: none; padding-left: 0; border-top: 1px solid var(--border-subtle); padding-top: 0.75rem; }
 .matcher-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem 0.85rem; }
 .matcher-card { padding: 0.75rem 0.85rem; font-size: 0.9rem; min-height: 56px; }
 .detective-grid { grid-template-columns: 1fr; gap: 1rem; }
 .memory-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem; }
 .arena-actions { flex-direction: column; align-items: stretch; }
 .network-workspace { grid-template-columns: 1fr; }
 .geometry-workspace { grid-template-columns: 1fr; }
}

/* ==========================================================================
 TEXT-ONLY CLEAN READING MODE (reader.html) - REFINED BOOK SPREAD
 ========================================================================== */
#reader-text-only-btn.active {
 background: var(--accent-blue);
 color: #ffffff;
 border-color: var(--accent-blue);
 font-weight: 700;
}

body.text-only-mode .reader-column-headers {
 grid-template-columns: 48px 1fr 1fr;
 gap: 1.25rem;
 padding: 0.4rem 1rem;
}
body.text-only-mode .reader-column-headers.single-col {
 grid-template-columns: 48px 1fr 280px;
}

body.text-only-mode .reader-grid {
 gap: 0;
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 overflow: hidden;
 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.text-only-mode .sentence-row {
 grid-template-columns: 48px 1fr 1fr;
 gap: 1.25rem;
 background: transparent;
 border: none;
 border-bottom: 1px solid var(--border-subtle);
 border-radius: 0;
 padding: 0.55rem 1rem;
 box-shadow: none;
 transition: background-color 0.15s ease;
 scroll-margin-top: 90px;
}

body.text-only-mode .sentence-row.single-col {
 grid-template-columns: 48px 1fr;
}

body.text-only-mode .sentence-row:last-child {
 border-bottom: none;
}

body.text-only-mode .sentence-row:hover {
 background-color: var(--bg-card);
}

body.text-only-mode .sentence-row.anchor-target {
 background-color: var(--bg-blue-subtle) !important;
 box-shadow: inset 3px 0 0 var(--accent-blue);
}

body.text-only-mode .chapter-divider {
 background: var(--bg-card);
 border: none;
 border-top: 1px solid var(--border-color);
 border-bottom: 1px solid var(--border-color);
 border-left: 4px solid var(--accent-blue);
 border-radius: 0;
 padding: 0.75rem 1rem;
 margin: 0;
}

body.text-only-mode .col-text {
 line-height: 1.65;
}

body.text-only-mode .col-right {
 border-left: 1px solid var(--border-subtle);
 padding-left: 1.25rem;
}

body.text-only-mode .anchor-meta-col {
 padding-top: 2px;
}

body.text-only-mode .xray-btn,
.reader-grid.text-only-mode .xray-btn,
body.text-only-mode .score-badge,
.reader-grid.text-only-mode .score-badge,
body.text-only-mode .xray-panel,
.reader-grid.text-only-mode .xray-panel {
 display: none !important;
}

body.text-only-mode .anchor-num,
.reader-grid.text-only-mode .anchor-num {
 color: var(--text-muted) !important;
 opacity: 0.42 !important;
 font-size: 0.75rem !important;
 font-weight: 600 !important;
 user-select: none;
}

@media (max-width: 900px) {
 body.text-only-mode .reader-column-headers { grid-template-columns: 1fr; gap: 0.5rem; }
 body.text-only-mode .sentence-row { grid-template-columns: 1fr; gap: 0.5rem; padding: 0.65rem 0.85rem; }
 body.text-only-mode .col-right { border-left: none; padding-left: 0; border-top: 1px solid var(--border-subtle); padding-top: 0.5rem; }
}

/* ==========================================================================
 SEMANTIC DISPERSION SUMMARY CARD (status.html#quality) - APPEND-ONLY
 ========================================================================== */
.dispersion-summary-card {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 padding: 1.25rem;
 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dispersion-summary-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 1rem;
 border-bottom: 1px solid var(--border-subtle);
 padding-bottom: 0.5rem;
}

.dispersion-extremes-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 1.25rem;
}

.dispersion-extreme-box {
 background: var(--bg-card);
 border: 1px solid var(--border-subtle);
 border-radius: 6px;
 padding: 1rem;
 display: flex;
 flex-direction: column;
 gap: 0.5rem;
}

.dispersion-extreme-box.box-min {
 border-left: 4px solid var(--accent-emerald);
}

.dispersion-extreme-box.box-max {
 border-left: 4px solid var(--accent-amber);
}

.dispersion-box-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
}

.dispersion-tag {
 font-size: 0.78rem;
 font-weight: 800;
 text-transform: uppercase;
 font-family: var(--font-mono);
}

.dispersion-tag.tag-harmony {
 color: var(--accent-emerald);
}

.dispersion-tag.tag-divergence {
 color: var(--accent-amber);
}

.dispersion-val {
 font-family: var(--font-mono);
 font-size: 0.9rem;
 font-weight: 800;
 color: var(--text-primary);
}

.dispersion-anchor-row {
 display: flex;
 align-items: flex-start;
 gap: 0.6rem;
}

.dispersion-en-text {
 font-family: var(--font-reading);
 font-size: 0.92rem;
 line-height: 1.5;
 color: var(--text-secondary);
}

@media (max-width: 900px) {
 .dispersion-extremes-grid {
 grid-template-columns: 1fr;
 }
}

/* ==========================================================================
 ERRATUM BADGE & ERRATA TABLE (reader.html & status.html#errata) - APPEND-ONLY
 ========================================================================== */
.erratum-chip {
 display: inline-flex;
 align-items: center;
 gap: 0.25rem;
 background: var(--bg-amber-subtle);
 color: var(--accent-amber);
 border: 1px solid var(--accent-amber);
 border-radius: 4px;
 padding: 1px 5px;
 font-size: 0.68rem;
 font-weight: 800;
 font-family: var(--font-mono);
 text-transform: uppercase;
 letter-spacing: 0.3px;
 cursor: help;
 user-select: none;
 line-height: 1.2;
}

body.text-only-mode .erratum-chip {
 opacity: 0.65;
 font-size: 0.62rem;
 padding: 0 4px;
 margin-top: 2px;
}
body.text-only-mode .erratum-chip:hover {
 opacity: 1;
}

.errata-table {
 width: 100%;
 border-collapse: collapse;
 font-family: var(--font-mono);
 font-size: 0.88rem;
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 overflow: hidden;
}

.errata-table th, .errata-table td {
 padding: 10px 14px;
 border: 1px solid var(--border-color);
 text-align: left;
}

.errata-table th {
 background: var(--bg-card);
 font-weight: 700;
 color: var(--text-secondary);
}

/* ==========================================================================
 ENCYCLOPEDIC INFOBOX STYLES (status.html#quality) - APPEND-ONLY v2.30.5
 ========================================================================== */
.infobox-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 1.25rem;
 margin-bottom: 1.5rem;
}

@media (max-width: 960px) {
 .infobox-grid {
 grid-template-columns: 1fr;
 }
}

.infobox-card {
 background: var(--bg-surface);
 border: 1px solid #b0c4de;
 border-radius: 6px;
 overflow: hidden;
 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .infobox-card {
 border-color: #334155;
}

.infobox-header {
 background: #dbeafe;
 color: #1e3a8a;
 font-family: var(--font-heading);
 font-weight: 700;
 font-size: 0.96rem;
 text-align: center;
 padding: 0.55rem 1rem;
 border-bottom: 1px solid #b0c4de;
 letter-spacing: 0.3px;
}

[data-theme="dark"] .infobox-header {
 background: #1e293b;
 color: #93c5fd;
 border-bottom-color: #334155;
}

.infobox-table {
 width: 100%;
 border-collapse: collapse;
 font-size: 0.88rem;
}

.infobox-table tr {
 border-bottom: 1px solid var(--border-subtle);
}

.infobox-table tr:last-child {
 border-bottom: none;
}

.infobox-label {
 width: 32%;
 min-width: 130px;
 padding: 0.55rem 0.85rem;
 font-weight: 700;
 color: var(--text-primary);
 background: rgba(0, 0, 0, 0.015);
 vertical-align: top;
 border-right: 1px solid var(--border-subtle);
 line-height: 1.4;
 font-size: 0.85rem;
}

[data-theme="dark"] .infobox-label {
 background: rgba(255, 255, 255, 0.02);
}

.infobox-value {
 padding: 0.55rem 0.85rem;
 color: var(--text-secondary);
 line-height: 1.5;
 vertical-align: top;
 font-size: 0.86rem;
}

/* ==========================================================================
 PORTAL HUB & 8 FEATURE CARDS (index.html) - APPEND-ONLY v2.31.0
 ========================================================================== */
.hub-hero {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 12px;
 padding: 2.25rem 2.5rem;
 margin-bottom: 2.25rem;
 box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
 text-align: center;
}

.hub-hero h2 {
 font-family: var(--font-heading);
 font-size: 2.1rem;
 font-weight: 800;
 color: var(--text-primary);
 margin-bottom: 1rem;
 letter-spacing: -0.5px;
 line-height: 1.25;
}

.hub-hero p {
 font-size: 1.12rem;
 color: var(--text-secondary);
 line-height: 1.75;
 max-width: 1080px;
 margin: 0 auto;
}

.hub-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
 gap: 1.75rem;
 margin-bottom: 2.5rem;
}

.hub-card {
 background: var(--bg-surface);
 border: 1px solid var(--border-color);
 border-radius: 10px;
 padding: 1.65rem;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
 transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.hub-card:hover {
 transform: translateY(-3px);
 border-color: var(--border-highlight);
 box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.hub-card-header {
 display: flex;
 align-items: center;
 gap: 0.75rem;
 margin-bottom: 0.85rem;
}

.hub-card-icon {
 font-size: 1.6rem;
 line-height: 1;
}

.hub-card-title {
 font-family: var(--font-heading);
 font-size: 1.35rem;
 font-weight: 700;
 color: var(--text-primary);
 line-height: 1.3;
}

.hub-card-desc {
 font-size: 0.95rem;
 color: var(--text-secondary);
 line-height: 1.65;
 margin-bottom: 1.5rem;
 flex-grow: 1;
}

.hub-card-footer {
 border-top: 1px solid var(--border-subtle);
 padding-top: 1rem;
 display: flex;
 justify-content: flex-end;
 align-items: center;
}

.hub-card-btn {
 display: inline-flex;
 align-items: center;
 gap: 0.35rem;
 padding: 7px 14px;
 border-radius: 6px;
 background: var(--bg-card);
 color: var(--accent-blue);
 border: 1px solid var(--border-color);
 font-size: 0.9rem;
 font-weight: 700;
 text-decoration: none;
 transition: all 0.15s;
}

.hub-card-btn:hover {
 background: var(--accent-blue);
 color: #ffffff;
 border-color: var(--accent-blue);
 transform: translateX(2px);
}

@media (max-width: 900px) {
 .hub-hero { padding: 1.5rem 1.25rem; }
 .hub-hero h2 { font-size: 1.65rem; }
 .hub-hero p { font-size: 1rem; }
 .hub-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ==========================================================================
   CORPUS KPI METRIC GRID (status.html#technical) - APPEND-ONLY v2.33.1
   ========================================================================== */
.corpus-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

@media (max-width: 992px) {
  .corpus-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .corpus-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.corpus-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.corpus-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07);
}

.corpus-kpi-val {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--accent-blue);
  line-height: 1.2;
  margin-bottom: 0.35rem;
  letter-spacing: -0.5px;
}

.corpus-kpi-label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.corpus-kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}
