/* ==========================================================================
   Evangelist Academy — design system
   Dark "anointing" theme by default; [data-theme="light"] is Sunlight mode
   (high contrast for reading a phone outdoors). Mobile first: the header nav
   becomes a bottom tab bar under 1000px.
   ========================================================================== */

:root {
  --bg: #070b14;
  --bg-2: #0d1322;
  --surface: rgba(19, 27, 46, 0.86);
  --surface-2: rgba(26, 37, 62, 0.92);
  --surface-sunk: rgba(0, 0, 0, 0.25);
  --input: rgba(7, 11, 20, 0.75);

  --text: #f8fafc;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --dim: #7c8ba1;

  --gold: #f59e0b;
  --amber: #fbbf24;
  --orange: #f97316;
  --crimson: #ef4444;
  --cyan: #38bdf8;
  --emerald: #10b981;
  --purple: #8b5cf6;

  --accent-text: #fbbf24;       /* headings/labels in gold */
  --spirit-text: #fef08a;       /* Holy Spirit prompt text */
  --socratic-text: #bae6fd;
  --warn-text: #fca5a5;
  --good-text: #a7f3d0;

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(245, 158, 11, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.65);
  --glow: 0 0 24px rgba(245, 158, 11, 0.2);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 64px;
  --tabbar-h: 62px;

  --btn-primary-text: #1a1204;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #fbf8f1;
  --bg-2: #f3eee2;
  --surface: #ffffff;
  --surface-2: #fffdf7;
  --surface-sunk: #f4efe4;
  --input: #ffffff;

  --text: #111827;
  --text-2: #1f2937;
  --muted: #4b5563;
  --dim: #5b6472;

  --accent-text: #92400e;
  --spirit-text: #713f12;
  --socratic-text: #0c4a6e;
  --warn-text: #991b1b;
  --good-text: #065f46;

  --border: #e3dccb;
  --border-strong: #cfc6b1;
  --border-glow: #e9b949;
  --shadow-sm: 0 1px 3px rgba(60, 40, 0, 0.1);
  --shadow-md: 0 6px 18px rgba(60, 40, 0, 0.1);
  --shadow-lg: 0 12px 30px rgba(60, 40, 0, 0.14);
  --glow: 0 0 0 transparent;
  color-scheme: light;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 8%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 12%, rgba(56, 189, 248, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(239, 68, 68, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
[data-theme="light"] body { background-image: none; }

a { color: var(--cyan); }
[data-theme="light"] a { color: #075985; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
[data-theme="light"] :focus-visible { outline-color: #b45309; }
strong { font-weight: 700; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.01em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 1.75rem 0 3rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.center { text-align: center; justify-content: center; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 1rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mb-2 { margin-bottom: 1rem; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--amber); color: #111; padding: 0.6rem 1rem; font-weight: 700; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
main:focus { outline: none; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 11, 20, 0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .site-header { background: rgba(251, 248, 241, 0.95); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); min-width: 0; flex-shrink: 1; }
@media (min-width: 560px) { .brand { flex-shrink: 0; } .brand-text { white-space: nowrap; } }
.brand-icon {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.35rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(239, 68, 68, 0.2));
  border: 1px solid var(--border-glow); border-radius: 12px; box-shadow: var(--glow);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title {
  font-size: 1.05rem; font-weight: 800; letter-spacing: 0.01em; line-height: 1.15; text-transform: uppercase;
  background: linear-gradient(90deg, #fff, var(--amber)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
[data-theme="light"] .brand-title { background: none; -webkit-text-fill-color: #7c2d12; color: #7c2d12; }
.brand-subtitle { display: none; font-size: 0.68rem; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
[data-theme="light"] .brand-subtitle { color: #92400e; }

.nav-main { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.8rem; border-radius: var(--r-pill);
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.88rem; white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-link.active { color: var(--btn-primary-text); background: linear-gradient(135deg, var(--amber), var(--gold)); font-weight: 700; }
[data-theme="light"] .nav-link:hover { background: #efe7d4; }

.header-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.xp-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.7rem; border-radius: var(--r-pill);
  background: rgba(245, 158, 11, 0.12); border: 1px solid var(--border-glow); color: var(--accent-text);
  font-size: 0.8rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.xp-chip:hover { background: rgba(245, 158, 11, 0.2); }
.xp-chip-rank { display: none; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 1.05rem; text-decoration: none;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text);
}
.icon-btn:hover { border-color: var(--border-glow); background: rgba(245, 158, 11, 0.1); }
[data-theme="light"] .icon-btn { background: #fff; }

@media (max-width: 420px) {
  .brand-icon { width: 34px; height: 34px; font-size: 1.1rem; }
  .brand-title { font-size: 0.82rem; letter-spacing: 0; }
  .header-actions { gap: 0.25rem; }
  .icon-btn { width: 34px; height: 34px; font-size: 0.95rem; }
  .xp-chip { padding: 0.3rem 0.5rem; font-size: 0.75rem; }
}
@media (min-width: 560px) {
  .brand-subtitle { display: block; }
  .xp-chip-rank { display: inline; }
}
@media (min-width: 1000px) {
  body { padding-bottom: 0; }
  .nav-main { display: flex; align-items: center; gap: 0.15rem; padding: 0.25rem; border-radius: var(--r-pill); background: rgba(13, 19, 34, 0.7); border: 1px solid var(--border); }
  [data-theme="light"] .nav-main { background: #fff; }
  .tabbar { display: none !important; }
  .brand-subtitle { display: none; }
  .xp-chip-rank { display: none; }
}
@media (min-width: 1180px) { .xp-chip-rank { display: inline; } }

/* ---------- bottom tab bar (phones/tablets) ---------- */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(10, 15, 27, 0.96); border-top: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
[data-theme="light"] .tabbar { background: rgba(255, 253, 247, 0.98); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-decoration: none; color: var(--muted); font-size: 0.7rem; font-weight: 600; }
.tab-icon { font-size: 1.25rem; line-height: 1; filter: grayscale(0.6); opacity: 0.85; }
.tab.active { color: var(--accent-text); }
.tab.active .tab-icon { filter: none; opacity: 1; transform: translateY(-1px); }

/* ---------- footer ---------- */

.site-footer { margin-top: 3rem; padding: 2.5rem 0 2rem; border-top: 1px solid var(--border); background: rgba(4, 7, 14, 0.6); text-align: center; color: var(--dim); font-size: 0.85rem; }
[data-theme="light"] .site-footer { background: var(--bg-2); }
.footer-emblem { font-size: 1.6rem; margin-bottom: 0.4rem; }
.footer-title { font-weight: 800; color: var(--text); font-size: 1rem; margin-bottom: 0.4rem; }
.footer-verse { max-width: 600px; margin: 0 auto 1rem; line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; margin-bottom: 0.8rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--accent-text); }
.noscript-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; background: #7c2d12; color: #fff; padding: 0.5rem 1rem; text-align: center; font-size: 0.85rem; }

/* ---------- buttons, pills, badges ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.7rem 1.3rem; min-height: 44px; border-radius: var(--r-md); border: 1px solid transparent;
  font-weight: 700; font-size: 0.95rem; line-height: 1.2; text-decoration: none; text-align: center;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn-primary { background: linear-gradient(135deg, var(--amber), var(--orange)); color: var(--btn-primary-text); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45); }
.btn-secondary { background: rgba(255, 255, 255, 0.05); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--border-glow); background: rgba(255, 255, 255, 0.09); transform: translateY(-1px); }
[data-theme="light"] .btn-secondary { background: #fff; }
[data-theme="light"] .btn-secondary:hover { background: #fdf6e3; }
.btn-spirit { background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.35); color: var(--cyan); }
[data-theme="light"] .btn-spirit { color: #075985; background: #e0f2fe; border-color: #7dd3fc; }
.btn-danger { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); color: #f87171; }
[data-theme="light"] .btn-danger { color: #991b1b; background: #fee2e2; }
.btn-sm { padding: 0.4rem 0.8rem; min-height: 36px; font-size: 0.82rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.btn-row.center { justify-content: center; }

.star-btn { white-space: nowrap; }
.star-btn.is-on { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.4); color: var(--cyan); }
[data-theme="light"] .star-btn.is-on { color: #075985; background: #e0f2fe; }

.pill { display: inline-flex; align-items: center; padding: 0.15rem 0.6rem; border-radius: var(--r-pill); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; border: 1px solid var(--border-strong); color: var(--muted); }
.pill-beginner { color: #34d399; border-color: rgba(52, 211, 153, 0.4); }
.pill-intermediate { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }
.pill-advanced { color: #f87171; border-color: rgba(248, 113, 113, 0.4); }
[data-theme="light"] .pill-beginner { color: #047857; }
[data-theme="light"] .pill-intermediate { color: #92400e; }
[data-theme="light"] .pill-advanced { color: #b91c1c; }

.badge-cat {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.65rem; border-radius: var(--r-pill);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: rgba(var(--c, 148, 163, 184), 0.14); color: rgb(var(--c, 148, 163, 184)); border: 1px solid rgba(var(--c, 148, 163, 184), 0.32);
}
[data-theme="light"] .badge-cat { color: rgb(var(--cd, 55, 65, 81)); background: rgba(var(--c, 148, 163, 184), 0.12); }

.cat-atheist     { --c: 56, 189, 248;  --cd: 3, 105, 161; }
.cat-street      { --c: 248, 113, 113; --cd: 185, 28, 28; }
.cat-good_person { --c: 251, 146, 60;  --cd: 154, 52, 18; }
.cat-progressive { --c: 125, 211, 252; --cd: 30, 64, 175; }
.cat-muslim      { --c: 52, 211, 153;  --cd: 4, 120, 87; }
.cat-jewish      { --c: 253, 224, 71;  --cd: 133, 77, 14; }
.cat-eastern     { --c: 163, 230, 53;  --cd: 77, 124, 15; }
.cat-catholic    { --c: 45, 212, 191;  --cd: 15, 118, 110; }
.cat-lds         { --c: 167, 139, 250; --cd: 91, 33, 182; }
.cat-jw          { --c: 251, 146, 60;  --cd: 154, 52, 18; }
.cat-new_age     { --c: 244, 114, 182; --cd: 157, 23, 77; }
.cat-power       { --c: 251, 191, 36;  --cd: 146, 64, 14; }

.tone-gold   { --c: 251, 191, 36;  --cd: 146, 64, 14; }
.tone-cyan   { --c: 56, 189, 248;  --cd: 3, 105, 161; }
.tone-green  { --c: 52, 211, 153;  --cd: 4, 120, 87; }
.tone-red    { --c: 248, 113, 113; --cd: 185, 28, 28; }
.tone-purple { --c: 167, 139, 250; --cd: 91, 33, 182; }
.tone-orange { --c: 251, 146, 60;  --cd: 154, 52, 18; }
.tone-yellow { --c: 253, 224, 71;  --cd: 133, 77, 14; }
.tone-pink   { --c: 244, 114, 182; --cd: 157, 23, 77; }
.tone-blue   { --c: 96, 165, 250;  --cd: 30, 64, 175; }

/* ---------- generic surfaces ---------- */

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.card-link { display: block; text-decoration: none; color: inherit; transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.card-link:hover { transform: translateY(-3px); border-color: var(--border-glow); box-shadow: var(--glow), var(--shadow-sm); }
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid { gap: 1.25rem; } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.page-head { padding: 1.5rem 0 1rem; }
.page-head h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); font-weight: 800; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.page-head p { color: var(--muted); max-width: 760px; margin-top: 0.3rem; }
.crumbs { font-size: 0.82rem; color: var(--dim); margin-bottom: 0.5rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }
.section-title { font-size: 1.25rem; font-weight: 800; margin: 2rem 0 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.eyebrow { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-text); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state h1, .empty-state h2, .empty-state h3 { color: var(--text); margin-bottom: 0.5rem; }
.empty-icon { font-size: 2.6rem; margin-bottom: 0.5rem; }

input[type="text"], input[type="search"], select {
  width: 100%; min-height: 46px; padding: 0.65rem 0.9rem; border-radius: var(--r-md);
  background: var(--input); border: 1px solid var(--border-strong); color: var(--text);
}
input[type="text"]:focus, input[type="search"]:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2); }

/* ---------- toasts ---------- */

.toast-stack { position: fixed; z-index: 300; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 0.5rem; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 1000px) { .toast-stack { bottom: 24px; } }
.toast { pointer-events: auto; background: #111a2e; color: #f8fafc; border: 1px solid var(--border-glow); border-radius: var(--r-md); padding: 0.7rem 1rem; font-weight: 700; box-shadow: var(--shadow-lg); animation: toastIn 0.25s var(--ease); text-align: center; }
.toast-xp { border-color: rgba(251, 191, 36, 0.6); color: #fde68a; }
.toast-badge { border-color: rgba(52, 211, 153, 0.6); color: #a7f3d0; }
.toast-rank { border-color: rgba(251, 191, 36, 0.9); background: linear-gradient(135deg, #3b2203, #1a1204); color: #fde68a; font-size: 1.05rem; }
.toast-warn { border-color: rgba(248, 113, 113, 0.6); color: #fecaca; }
.toast-out { opacity: 0; transform: translateY(8px); transition: all 0.4s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulseGlow { 0% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.2); } 100% { box-shadow: 0 0 26px rgba(239, 68, 68, 0.4); } }

/* ---------- rich text ---------- */

.rt p { margin: 0 0 0.75rem; }
.rt p:last-child { margin-bottom: 0; }
.rt-list { list-style: none; margin: 0.25rem 0 0.8rem; }
.rt-list li { position: relative; padding-left: 1.2rem; margin: 0.3rem 0; }
.rt-list li::before { content: ''; position: absolute; left: 0.2rem; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.rt-list li.rt-sub { margin-left: 1.2rem; }
.rt-list li.rt-sub::before { background: transparent; border: 1.5px solid var(--gold); }
.rt-num { display: flex; gap: 0.7rem; margin: 0 0 0.9rem; }
.rt-n { flex-shrink: 0; width: 26px; height: 26px; margin-top: 0.1rem; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; color: var(--btn-primary-text); background: linear-gradient(135deg, var(--amber), var(--orange)); }
.rt-body { flex: 1; min-width: 0; }
.rt-body p { margin-bottom: 0.4rem; }
.rt strong { color: var(--text); }

/* ---------- home ---------- */

.hero { text-align: center; padding: 2rem 0 1rem; }
.hero-pill { display: inline-flex; gap: 0.4rem; align-items: center; padding: 0.3rem 0.9rem; border-radius: var(--r-pill); background: rgba(245, 158, 11, 0.12); border: 1px solid var(--border-glow); color: var(--accent-text); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 0.8rem; }
.hero-gradient { background: linear-gradient(135deg, #fff 25%, var(--amber) 65%, var(--crimson) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
[data-theme="light"] .hero-gradient { background: none; -webkit-text-fill-color: #b45309; color: #b45309; }
.hero p { color: var(--muted); max-width: 720px; margin: 0 auto 1.4rem; font-size: 1.08rem; }

.status-card { display: grid; gap: 1rem; align-items: center; grid-template-columns: auto 1fr; }
.status-icon { font-size: 2.4rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: var(--r-md); background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(239, 68, 68, 0.14)); border: 1px solid var(--border-glow); }
.status-name { font-weight: 800; font-size: 1.15rem; }
.status-meta { font-size: 0.85rem; color: var(--muted); }
.status-actions { grid-column: 1 / -1; }
@media (min-width: 760px) { .status-card { grid-template-columns: auto 1fr auto; } .status-actions { grid-column: auto; } }

.xp-track { height: 10px; border-radius: var(--r-pill); background: rgba(148, 163, 184, 0.2); overflow: hidden; margin: 0.45rem 0 0.2rem; }
.xp-fill { height: 100%; width: 0; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--amber), var(--orange)); transition: width 0.6s var(--ease); }

.verse-card { border-left: 4px solid var(--gold); }
.verse-text { font-style: italic; color: var(--spirit-text); font-size: 1.02rem; }
.verse-ref { margin-top: 0.35rem; font-weight: 800; color: var(--accent-text); font-size: 0.85rem; }

.path { display: grid; gap: 1rem; }
.module { position: relative; }
.module-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.module-icon { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.3rem; border-radius: 12px; background: var(--surface-sunk); border: 1px solid var(--border); }
.module-title { font-weight: 800; font-size: 1.05rem; }
.module-goal { font-size: 0.85rem; color: var(--muted); }
.module-count { margin-left: auto; font-size: 0.78rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.module.is-complete { border-color: rgba(16, 185, 129, 0.45); }
.module.is-complete .module-count { color: var(--emerald); }
.path-items { list-style: none; display: grid; gap: 0.45rem; }
.path-item a { display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.75rem; border-radius: var(--r-md); background: var(--surface-sunk); border: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: 0.93rem; min-height: 48px; }
.path-item a:hover { border-color: var(--border-glow); }
.path-check { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); font-size: 0.75rem; color: transparent; }
.path-item.is-done .path-check { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.path-item.is-done .path-label { color: var(--muted); }
.path-kind { margin-left: auto; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.path-item.is-next a { border-color: var(--gold); box-shadow: var(--glow); }

.tool-card { display: flex; gap: 0.9rem; align-items: flex-start; }
.tool-icon { font-size: 1.8rem; line-height: 1; }
.tool-card h3 { font-size: 1.02rem; font-weight: 800; margin-bottom: 0.2rem; }
.tool-card p { font-size: 0.87rem; color: var(--muted); }

/* ---------- encounter list ---------- */

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin-bottom: 1.25rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.85rem; min-height: 38px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-strong); color: var(--muted); font-size: 0.83rem; font-weight: 600; text-decoration: none;
}
[data-theme="light"] .chip { background: #fff; }
.chip:hover { color: var(--text); border-color: var(--border-glow); }
.chip.active, .chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--btn-primary-text); font-weight: 700; }
.chip-count { font-size: 0.72rem; opacity: 0.75; }

.enc-card { display: flex; flex-direction: column; gap: 0.85rem; position: relative; overflow: hidden; }
.enc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; flex-wrap: wrap; }
.persona { display: flex; gap: 0.7rem; align-items: center; }
.avatar { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 1.45rem; background: var(--surface-sunk); border: 1px solid var(--border); }
.persona h2, .persona h3 { font-size: 1.08rem; font-weight: 800; }
.persona-role { font-size: 0.82rem; color: var(--muted); }
.enc-setting { font-size: 0.87rem; color: var(--muted); background: var(--surface-sunk); padding: 0.6rem 0.8rem; border-radius: var(--r-sm); border-left: 3px solid var(--gold); }
.enc-stance { font-size: 0.85rem; color: var(--text-2); }
.enc-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: auto; padding-top: 0.8rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.xp-tag { font-weight: 800; color: var(--accent-text); font-size: 0.85rem; }
.status-tag { font-size: 0.78rem; font-weight: 700; color: var(--dim); }
.status-passed { color: var(--emerald); }
.status-excellent { color: var(--accent-text); }
.status-tried { color: #f59e0b; }
[data-theme="light"] .status-passed { color: #047857; }

/* ---------- simulator ---------- */

.sim { max-width: 860px; margin: 0 auto; }
.sim-card { background: var(--bg-2); border: 1px solid var(--border-glow); border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--shadow-lg); animation: fadeIn 0.3s var(--ease); }
[data-theme="light"] .sim-card { background: var(--surface); }
@media (min-width: 640px) { .sim-card { padding: 1.75rem; } }
.sim-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding-bottom: 0.9rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.sim-progress { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; font-weight: 800; color: var(--accent-text); }
.dots { display: flex; gap: 0.3rem; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(148, 163, 184, 0.3); }
.dot.done-best { background: var(--emerald); }
.dot.done-fair { background: var(--gold); }
.dot.done-poor { background: var(--crimson); }
.dot.current { background: var(--amber); box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3); }

.persona-sheet { display: grid; gap: 0.6rem; margin: 1rem 0 1.25rem; }
.persona-sheet div { font-size: 0.9rem; }
.persona-sheet dt { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.persona-sheet dd { color: var(--text-2); }
@media (min-width: 640px) { .persona-sheet { grid-template-columns: 1fr 1fr; } }

.option-row { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.8rem 0.9rem; border-radius: var(--r-md); background: var(--surface-sunk); border: 1px solid var(--border); margin-bottom: 1.25rem; cursor: pointer; }
.option-row input { margin-top: 0.3rem; width: 18px; height: 18px; accent-color: var(--gold); flex-shrink: 0; }
.option-row strong { display: block; }
.option-row span { font-size: 0.85rem; color: var(--muted); }

.speech { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem 1.1rem; margin-bottom: 1rem; position: relative; }
.speech-who { font-size: 0.82rem; font-weight: 800; color: var(--cyan); margin-bottom: 0.35rem; }
[data-theme="light"] .speech-who { color: #075985; }
.speech-text { font-size: 1.06rem; line-height: 1.6; }

.insight { margin-bottom: 1.1rem; }
.insight-btn { background: transparent; border: 1px dashed var(--border-glow); color: var(--accent-text); border-radius: var(--r-md); padding: 0.55rem 0.9rem; font-weight: 700; font-size: 0.85rem; width: 100%; text-align: left; min-height: 44px; }
.insight-btn:hover { background: rgba(245, 158, 11, 0.08); }
.insight-body { background: linear-gradient(135deg, rgba(245, 158, 11, 0.09), rgba(239, 68, 68, 0.06)); border: 1px solid rgba(245, 158, 11, 0.3); border-radius: var(--r-md); padding: 0.85rem 1rem; color: var(--spirit-text); font-size: 0.92rem; }
[data-theme="light"] .insight-body { background: #fef9e7; }

.timer { height: 6px; border-radius: var(--r-pill); background: rgba(148, 163, 184, 0.2); overflow: hidden; margin: -0.3rem 0 1rem; }
.timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--crimson), var(--amber)); transform-origin: left; }
.timer-label { font-size: 0.78rem; font-weight: 800; color: var(--muted); margin-bottom: 0.3rem; text-align: right; }

.choices { display: grid; gap: 0.7rem; margin-bottom: 1.1rem; }
.choice {
  display: flex; gap: 0.75rem; align-items: flex-start; text-align: left; width: 100%;
  padding: 0.9rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--text);
  line-height: 1.5; font-size: 0.95rem; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}
.choice:hover:not(:disabled) { border-color: var(--cyan); transform: translateX(3px); }
.choice:disabled { cursor: default; }
.choice-key { flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; color: var(--cyan); border: 1px solid rgba(56, 189, 248, 0.4); }
[data-theme="light"] .choice-key { color: #075985; }
.choice-verdict { display: block; margin-top: 0.35rem; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.choice.is-dim { opacity: 0.5; }
.choice.q-best { border-color: var(--emerald); background: rgba(16, 185, 129, 0.08); }
.choice.q-best .choice-verdict { color: var(--emerald); }
.choice.q-fair { border-color: var(--gold); background: rgba(245, 158, 11, 0.07); }
.choice.q-fair .choice-verdict { color: var(--gold); }
.choice.q-poor { border-color: var(--crimson); background: rgba(239, 68, 68, 0.07); }
.choice.q-poor .choice-verdict { color: #f87171; }
[data-theme="light"] .choice.q-poor .choice-verdict { color: #b91c1c; }
[data-theme="light"] .choice.q-fair .choice-verdict { color: #92400e; }
[data-theme="light"] .choice.q-best .choice-verdict { color: #047857; }

.feedback { border-radius: var(--r-md); padding: 1rem 1.1rem; margin-bottom: 1rem; border-left: 4px solid var(--gold); background: var(--surface); animation: fadeIn 0.25s var(--ease); }
.feedback.q-best { border-left-color: var(--emerald); }
.feedback.q-poor { border-left-color: var(--crimson); }
.feedback-head { font-weight: 800; margin-bottom: 0.4rem; }
.feedback-body { font-size: 0.92rem; color: var(--text-2); }
.feedback-why { margin-top: 0.6rem; font-size: 0.87rem; color: var(--muted); }
.feedback-why strong { color: var(--accent-text); }
.feedback-best { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed var(--border-strong); font-size: 0.87rem; color: var(--good-text); }

.result-hero { text-align: center; padding: 0.5rem 0 1rem; }
.result-emblem { font-size: 3rem; margin-bottom: 0.3rem; }
.result-grade { font-size: 1.7rem; font-weight: 900; }
.grade-excellent { color: var(--accent-text); }
.grade-pass { color: var(--emerald); }
.grade-retry { color: #f87171; }
[data-theme="light"] .grade-pass { color: #047857; }
[data-theme="light"] .grade-retry { color: #b91c1c; }
.score-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0; }
.score-box { min-width: 110px; padding: 0.7rem 1rem; border-radius: var(--r-md); background: var(--surface-sunk); border: 1px solid var(--border); text-align: center; }
.score-box .k { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); font-weight: 800; }
.score-box .v { font-size: 1.35rem; font-weight: 900; }
.lesson { border: 1px solid var(--border-glow); border-radius: var(--r-md); padding: 0.9rem 1rem; background: rgba(245, 158, 11, 0.07); margin: 1rem 0; }
.debrief-list { list-style: none; display: grid; gap: 0.7rem; margin: 0.75rem 0 1.25rem; }
.debrief-item { padding: 0.8rem 0.9rem; border-radius: var(--r-md); background: var(--surface-sunk); border: 1px solid var(--border); font-size: 0.9rem; }
.debrief-item .dk { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dim); margin-bottom: 0.25rem; }
.debrief-item .yours.q-best { color: var(--good-text); }
.debrief-item .yours.q-fair { color: var(--accent-text); }
.debrief-item .yours.q-poor { color: var(--warn-text); }
.debrief-item .best { margin-top: 0.4rem; color: var(--good-text); }

/* ---------- armory ---------- */

.search-panel { margin-bottom: 1.25rem; display: grid; gap: 0.85rem; }
.search-wrap { position: relative; }
.search-wrap input { padding-left: 2.6rem; }
.search-icon { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.result-count { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.9rem; }

.obj-card { display: flex; flex-direction: column; gap: 0.8rem; }
.obj-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.obj-quote { font-size: 1.05rem; font-weight: 800; line-height: 1.4; }
.obj-quote a { color: var(--text); text-decoration: none; }
.obj-quote a:hover { color: var(--accent-text); }
.obj-summary { font-size: 0.9rem; color: var(--muted); }
.obj-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.obj-card.is-mastered { border-color: rgba(56, 189, 248, 0.35); }

.box { border-radius: var(--r-md); padding: 0.85rem 1rem; font-size: 0.92rem; border: 1px solid; }
.box-title { display: block; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.3rem; }
.box-socratic { background: rgba(56, 189, 248, 0.08); border-color: rgba(56, 189, 248, 0.3); color: var(--socratic-text); }
.box-warn { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.28); color: var(--warn-text); }
.box-spirit { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.3); color: var(--spirit-text); }
.box-good { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.3); color: var(--good-text); }
[data-theme="light"] .box-socratic { background: #eef8ff; }
[data-theme="light"] .box-warn { background: #fef2f2; }
[data-theme="light"] .box-spirit { background: #fefae8; }
[data-theme="light"] .box-good { background: #ecfdf5; }

.detail-layout { display: grid; gap: 1.25rem; }
@media (min-width: 980px) { .detail-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .detail-aside { position: sticky; top: calc(var(--header-h) + 1rem); } }
.detail-quote { font-size: clamp(1.3rem, 4vw, 1.75rem); font-weight: 800; line-height: 1.35; margin: 0.6rem 0 0.8rem; }
.quick-answer { font-size: 1.05rem; color: var(--text-2); }
.defense { font-size: 0.97rem; color: var(--text-2); }
.scripture { padding: 0.7rem 0.9rem; border-left: 3px solid var(--gold); background: var(--surface-sunk); border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-bottom: 0.6rem; }
.scripture-ref { font-weight: 800; color: var(--accent-text); font-size: 0.85rem; }
.scripture-text { font-style: italic; color: var(--text-2); }
.pushback { display: grid; gap: 0.7rem; }
.exchange { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); }
.exchange .they, .exchange .you { padding: 0.75rem 0.95rem; font-size: 0.92rem; }
.exchange .they { background: rgba(239, 68, 68, 0.07); color: var(--text-2); }
.exchange .you { background: rgba(16, 185, 129, 0.07); color: var(--text-2); }
.exchange .who { display: block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.15rem; }
.exchange .they .who { color: #f87171; }
.exchange .you .who { color: var(--emerald); }
[data-theme="light"] .exchange .they .who { color: #b91c1c; }
[data-theme="light"] .exchange .you .who { color: #047857; }
.pager { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.pager a { flex: 1 1 240px; }
.pager .k { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); font-weight: 800; }

details.more { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-sunk); }
details.more > summary { cursor: pointer; padding: 0.75rem 1rem; font-weight: 800; color: var(--accent-text); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; min-height: 44px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: '▾'; transition: transform 0.2s var(--ease); }
details.more[open] > summary::after { transform: rotate(180deg); }
details.more > .more-body { padding: 0 1rem 1rem; }

/* ---------- drill ---------- */

.drill-wrap { max-width: 720px; margin: 0 auto; }
.drill-setup { display: grid; gap: 1rem; }
.drill-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 800; color: var(--muted); margin-bottom: 0.6rem; }
.flash { perspective: 1400px; }
.flash-inner { position: relative; min-height: 360px; transition: transform 0.55s var(--ease); transform-style: preserve-3d; }
.flash.flipped .flash-inner { transform: rotateY(180deg); }
.flash-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-lg); padding: 1.4rem; border: 1px solid var(--border-glow); background: var(--bg-2); box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 0.8rem; overflow-y: auto; }
[data-theme="light"] .flash-face { background: var(--surface); }
.flash-back { transform: rotateY(180deg); }
.flash-q { font-size: 1.25rem; font-weight: 800; line-height: 1.4; margin: auto 0; text-align: center; }
.flash-hint { text-align: center; font-size: 0.85rem; color: var(--dim); }
.grade-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-top: 1rem; }
.grade-row .btn { flex-direction: column; gap: 0.1rem; padding: 0.6rem 0.4rem; }
.grade-row small { font-weight: 600; font-size: 0.72rem; opacity: 0.85; }
.btn-again { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); color: #f87171; }
.btn-hard { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.4); color: var(--amber); }
.btn-good { background: rgba(16, 185, 129, 0.13); border-color: rgba(16, 185, 129, 0.45); color: #34d399; }
[data-theme="light"] .btn-again { color: #b91c1c; }
[data-theme="light"] .btn-hard { color: #92400e; }
[data-theme="light"] .btn-good { color: #047857; }
@media (prefers-reduced-motion: reduce) { .flash.flipped .flash-front { visibility: hidden; } }

/* ---------- masterclasses ---------- */

.class-tabs { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem; margin-bottom: 1.25rem; scrollbar-width: thin; }
.class-tabs .chip { flex-shrink: 0; }
.class-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.class-title { font-size: clamp(1.5rem, 4.5vw, 2rem); font-weight: 900; }
.class-sub { color: var(--accent-text); font-weight: 700; }
.core-verse { border-left: 3px solid var(--gold); padding: 0.75rem 1rem; background: var(--surface-sunk); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-style: italic; color: var(--spirit-text); margin-bottom: 1rem; }
.steps { display: grid; gap: 1rem; counter-reset: step; }
.step-card { padding: 1.25rem; }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.step-head h3 { font-size: 1.08rem; font-weight: 800; display: flex; align-items: center; gap: 0.6rem; }
.step-num { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--btn-primary-text); background: linear-gradient(135deg, var(--amber), var(--orange)); }
.mnemonic { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.6rem; border-radius: var(--r-pill); border: 1px solid var(--border-glow); color: var(--accent-text); background: rgba(245, 158, 11, 0.08); }
.step-body { font-size: 0.95rem; color: var(--text-2); margin-bottom: 0.9rem; }
.checkpoint { margin-top: 1.5rem; }
.cp-q { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.cp-q:last-of-type { border-bottom: 0; }
.cp-q legend { font-weight: 800; margin-bottom: 0.6rem; }
.cp-q fieldset { border: 0; }
.cp-opt { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.6rem 0.75rem; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-sunk); margin-bottom: 0.45rem; cursor: pointer; font-size: 0.93rem; }
.cp-opt input { margin-top: 0.3rem; accent-color: var(--gold); width: 18px; height: 18px; flex-shrink: 0; }
.cp-opt.correct { border-color: var(--emerald); background: rgba(16, 185, 129, 0.1); }
.cp-opt.wrong { border-color: var(--crimson); background: rgba(239, 68, 68, 0.08); }
.cp-why { font-size: 0.87rem; margin-top: 0.3rem; color: var(--muted); }
.cp-why.show-good { color: var(--good-text); }
.cp-why.show-bad { color: var(--warn-text); }
.cp-result { margin-top: 1rem; }
.done-flag { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 800; color: var(--muted); font-size: 0.9rem; }
.done-flag.is-done { color: var(--emerald); }

/* ---------- heaven quiz ---------- */

.quiz-box { max-width: 760px; margin: 0 auto; }
.quiz-bar { height: 8px; border-radius: var(--r-pill); background: rgba(148, 163, 184, 0.2); overflow: hidden; margin: 0.5rem 0 1.4rem; }
.quiz-fill { height: 100%; background: linear-gradient(90deg, var(--amber), var(--crimson)); transition: width 0.4s var(--ease); }
.quiz-q { font-size: clamp(1.2rem, 4vw, 1.45rem); font-weight: 800; margin-bottom: 1.2rem; line-height: 1.35; }
.verdict { padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--surface-sunk); border-left: 4px solid var(--gold); color: var(--spirit-text); margin-bottom: 1rem; animation: fadeIn 0.25s var(--ease); }
.gospel-box { text-align: left; border: 1px solid rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.08); border-radius: var(--r-md); padding: 1.2rem; margin: 1.2rem 0; color: var(--text-2); }
.gospel-box h3 { color: var(--emerald); margin-bottom: 0.4rem; }
[data-theme="light"] .gospel-box h3 { color: #047857; }

/* ---------- progress ---------- */

.rank-card { display: grid; gap: 1.25rem; align-items: center; }
@media (min-width: 760px) { .rank-card { grid-template-columns: 1fr 340px; } }
.rank-main { display: flex; align-items: center; gap: 1rem; }
.rank-icon { font-size: 3rem; width: 80px; height: 80px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(239, 68, 68, 0.14)); border: 1px solid var(--border-glow); }
.rank-title { font-size: 1.55rem; font-weight: 900; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin: 1.25rem 0; }
@media (min-width: 760px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 0.9rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.stat .v { font-size: 1.45rem; font-weight: 900; }
.stat .k { font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.75rem; }
.badge-tile { display: flex; gap: 0.75rem; align-items: center; padding: 0.85rem; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-sunk); opacity: 0.55; filter: grayscale(0.85); }
.badge-tile.unlocked { opacity: 1; filter: none; border-color: var(--border-glow); background: var(--surface); box-shadow: var(--glow); }
.badge-icon { font-size: 1.75rem; }
.badge-name { font-weight: 800; font-size: 0.9rem; }
.badge-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.table-wrap { overflow-x: auto; }
table.results { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.results th, table.results td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.results th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); }
table.results a { color: var(--text); text-decoration: none; font-weight: 700; }
table.results a:hover { color: var(--accent-text); }
.log { list-style: none; max-height: 340px; overflow-y: auto; }
.log li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 0.87rem; }
.log time { color: var(--dim); font-size: 0.75rem; white-space: nowrap; }
.inline-form { display: flex; gap: 0.5rem; }
.inline-form input { flex: 1; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- pocket guide ---------- */

.pocket-grid { columns: 1; column-gap: 1rem; }
@media (min-width: 760px) { .pocket-grid { columns: 2; } }
.pocket-sec { break-inside: avoid; margin-bottom: 1rem; border-left: 4px solid rgb(var(--c, 251, 191, 36)); }
.pocket-sec h2 { font-size: 1.05rem; font-weight: 800; color: rgb(var(--c, 251, 191, 36)); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.45rem; }
[data-theme="light"] .pocket-sec h2 { color: rgb(var(--cd, 146, 64, 14)); }
.pocket-sec ul { list-style: none; display: grid; gap: 0.45rem; }
.pocket-sec li { font-size: 0.92rem; color: var(--text-2); padding-left: 1rem; position: relative; }
.pocket-sec li::before { content: '›'; position: absolute; left: 0; color: rgb(var(--c, 251, 191, 36)); font-weight: 900; }
.pocket-sec .more-link { display: inline-block; margin-top: 0.6rem; font-size: 0.82rem; font-weight: 700; text-decoration: none; }
.pocket-toc { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 0.4rem; margin-bottom: 1.25rem; padding-bottom: 0.4rem; scrollbar-width: thin; }
.pocket-toc .chip { flex-shrink: 0; }
@media (min-width: 760px) { .pocket-toc { flex-wrap: wrap; overflow: visible; } }
.pocket-sec { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- installable app (EA.app in core.js) ---------- */

.app-back { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.app-card { display: grid; gap: 0.8rem; }
.app-card-head { display: flex; gap: 0.9rem; align-items: center; }
.app-card-head img { border-radius: 14px; flex-shrink: 0; }
.app-card h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.15rem; }
.app-card p { font-size: 0.9rem; }
.app-offline { display: grid; gap: 0.45rem; justify-items: start; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.app-offline p { font-size: 0.82rem; }

/* ---------- training certificate (certificate.php) ---------- */

.cert-link { margin-bottom: 0.5rem; }
#cert-name-form { flex-wrap: wrap; align-items: center; }
#cert-name-form label { flex-basis: 100%; font-size: 0.9rem; }
.certificate {
  margin-top: 1.25rem; padding: 10px; border-radius: 6px;
  background: #fffdf6; color: #1c1917;
  border: 3px double #b45309; box-shadow: var(--shadow-lg);
  font-family: Georgia, 'Times New Roman', serif;
}
.cert-inner { border: 1px solid #d6a756; padding: clamp(1.1rem, 4vw, 2.5rem) clamp(0.9rem, 4vw, 3rem); text-align: center; }
.cert-emblem { font-size: 2.2rem; color: #b45309; line-height: 1; }
.cert-org { font-family: 'Outfit', system-ui, sans-serif; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; font-size: clamp(0.62rem, 2.2vw, 0.8rem); color: #92400e; margin-top: 0.5rem; }
.cert-title { font-size: clamp(1.5rem, 6vw, 2.5rem); font-weight: 700; margin: 0.35rem 0 0.9rem; color: #1c1917; }
.cert-line { font-style: italic; color: #44403c; }
.cert-name { font-size: clamp(1.6rem, 7vw, 2.8rem); font-weight: 700; color: #7c2d12; margin: 0.3rem auto 0.45rem; padding: 0 1rem 0.2rem; border-bottom: 1px solid #d6a756; display: inline-block; min-width: 60%; overflow-wrap: anywhere; }
.cert-modules { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.1rem; margin: 0.9rem 0; font-family: 'Outfit', system-ui, sans-serif; font-size: 0.85rem; color: #292524; }
.cert-record { font-family: 'Outfit', system-ui, sans-serif; font-size: 0.8rem; color: #57534e; }
.cert-verse { margin: 1rem auto 0; max-width: 40rem; font-style: italic; font-size: 0.95rem; color: #292524; }
.cert-verse cite { display: block; font-style: normal; font-size: 0.8rem; color: #78716c; margin-top: 0.2rem; }
.cert-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.6rem; }
.cert-sign-value { border-bottom: 1px solid #44403c; min-height: 1.6rem; font-size: 1rem; padding-bottom: 0.15rem; }
.cert-sign-label { font-family: 'Outfit', system-ui, sans-serif; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #78716c; margin-top: 0.3rem; }
.cert-foot { font-family: 'Outfit', system-ui, sans-serif; font-size: 0.72rem; color: #78716c; margin-top: 1.2rem; }
