/* ============================================================
   Classicalia — revision page template
   revision.css — links alongside classicalia.css
   ============================================================ */

body { background: var(--cream); }

/* ── HEADER TAGS ── */
.header-meta { display: flex; gap: 10px; margin-top: 20px; }
.header-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 2px;
  background: rgba(107,160,255,0.15); color: #6ba0ff;
  border: 1px solid rgba(107,160,255,0.25);
}

/* ── PAGE BACKGROUND ── */
.page-bg { background: var(--cream); }

/* ── REVISION LAYOUT — sidebar + main ── */
.rev-body {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 70vh;
}

/* ── SIDEBAR ── */
.rev-sidebar {
  background: var(--cream);
  border-right: 1px solid var(--rule);
}
.rev-sidebar-inner {
  position: sticky;
  top: 0;
  padding: 40px 28px 80px 40px;
}
.rev-sidebar-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 20px;
}
.rev-nav-group { margin-bottom: 24px; }
.rev-nav-group-label {
  font-family: 'Lora', serif; font-style: italic; font-weight: 700;
  font-size: 17px; color: var(--navy); letter-spacing: -0.01em;
  display: block; margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.rev-nav { list-style: none; }
.rev-nav li a {
  display: block; font-size: 12px; color: var(--muted);
  text-decoration: none; padding: 5px 0;
  line-height: 1.4; transition: color 0.12s; cursor: pointer;
}
.rev-nav li a:hover { color: var(--brand); }
.rev-nav li a.active { color: var(--brand); font-weight: 600; }

/* ── MAIN CONTENT AREA ── */
.rev-main {
  background: var(--paper);
  padding: 52px 48px 80px;
  min-width: 0;
  min-height: 70vh;
}
.rev-panel { display: none; }
.rev-panel.active { display: block; }

/* ── PANEL HEADER ── */
.rev-title {
  font-family: 'Lora', serif; font-style: italic; font-weight: 700;
  font-size: 28px; color: var(--navy); letter-spacing: -0.01em;
  line-height: 1.0; margin-bottom: 6px;
}
.rev-rule {
  width: 48px; height: 3px; background: var(--brand);
  border-radius: 2px; margin-bottom: 8px;
}
.rev-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 24px;
}

/* ── ENTRY ── */
.entry { margin-bottom: 22px; }
.entry:last-of-type { margin-bottom: 0; }
.entry-head { margin-bottom: 6px; }
.term {
  font-family: 'Lora', serif; font-style: italic; font-weight: 700;
  font-size: 15.5px; color: var(--navy);
}
.term-gloss {
  font-family: 'Lora', serif; font-style: italic;
  font-size: 13px; color: var(--muted); margin-left: 8px;
}
.entry-divider {
  border: none; border-top: 1px solid var(--rule-faint); margin: 22px 0;
}

/* ── FACTS LIST ── */
.facts { list-style: none; }
.facts li {
  font-size: 13px; color: var(--ink); line-height: 1.55;
  padding: 3px 0 3px 16px; position: relative;
  border-bottom: 1px dotted var(--rule-faint);
}
.facts li:last-child { border-bottom: none; }
.facts li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--muted); font-size: 11px; top: 5px; opacity: 0.45;
}
.facts li.sub {
  padding-left: 28px; font-size: 12.5px; color: var(--muted);
}
.facts li.sub::before { content: '·'; left: 16px; top: 4px; }
.facts li.source { color: var(--muted); font-size: 12.5px; }
.facts li.source::before { content: '◎'; font-size: 9px; top: 6px; opacity: 0.5; }
.k { color: var(--navy); font-weight: 600; }

/* ── ANALYSIS ── */
.analysis {
  font-family: 'Lora', serif; font-style: italic; font-weight: 600;
  font-size: 15px; color: var(--navy); line-height: 1.7;
  margin-top: 22px;
  padding-left: 14px;
  border-left: 3px solid var(--brand);
}

/* ── COMPARISON TABLE ── */
.cmp-header { display: grid; grid-template-columns: 1fr 1fr; }
.cmp-col-head {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  padding: 0 12px 8px; border-bottom: 1px solid var(--rule);
}
.cmp-row {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule-faint);
  font-size: 13px; line-height: 1.55;
}
.cmp-row:last-of-type { border-bottom: 1px solid var(--rule-faint); }
.cmp-cell {
  padding: 10px 12px; color: var(--ink);
  border-right: 1px solid var(--rule-faint);
}
.cmp-cell:last-child { border-right: none; }

/* ── EXAM FOCUS BOX ── */
.explain-block {
  background: var(--cream); border: 1px solid var(--rule);
  border-radius: 4px; padding: 14px 16px; margin-top: 28px;
}
.explain-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.explain-q {
  font-size: 13px; color: var(--ink); padding: 5px 0;
  border-bottom: 1px dotted var(--rule-faint); line-height: 1.5;
}
.explain-q:last-child { border-bottom: none; padding-bottom: 0; }
.explain-q::before {
  content: 'Q  '; color: var(--brand);
  font-weight: 700; font-size: 10px; letter-spacing: 0.08em;
}

/* ── FLASHCARD ── */
.fc-wrap { margin-top: 8px; }
.fc {
  height: 280px; cursor: pointer;
  perspective: 1200px; margin-bottom: 16px;
}
.fc-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  transform-style: preserve-3d;
}
.fc-inner.flipped { transform: rotateY(180deg); }
.fc-front, .fc-back {
  position: absolute; inset: 0; border-radius: 8px;
  backface-visibility: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 40px;
}
.fc-front {
  background: var(--paper); border: 1.5px solid var(--rule);
}
.fc-front:hover { border-color: var(--brand); }
.fc-q {
  font-family: 'Lora', serif; font-style: italic; font-weight: 600;
  font-size: 18px; color: var(--navy); text-align: center;
  line-height: 1.55; max-width: 52ch;
}
.fc-hint {
  margin-top: 20px; font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); opacity: 0.5;
}
.fc-back {
  background: var(--navy); border: 1.5px solid var(--navy);
  transform: rotateY(180deg);
  align-items: flex-start; justify-content: center;
  overflow-y: auto;
}
.fc-back p {
  font-size: 14px; color: rgba(255,255,255,0.9);
  line-height: 1.7; margin: 0; text-align: left;
}
.fc-back ul { list-style: none; padding: 0; margin: 0; width: 100%; }
.fc-back li {
  font-size: 13.5px; color: rgba(255,255,255,0.88);
  line-height: 1.6; padding: 6px 0 6px 18px;
  position: relative; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.fc-back li:last-child { border-bottom: none; }
.fc-back li::before {
  content: '→'; position: absolute; left: 0;
  color: #6ba0ff; font-size: 12px; top: 8px;
}
.fc-back b { color: white; }
.fc-back em { color: rgba(255,255,255,0.65); }
.fc-controls {
  display: flex; align-items: center; justify-content: space-between;
}
.fc-btn {
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 600;
  color: var(--muted); background: none; border: 1px solid var(--rule);
  padding: 7px 16px; border-radius: 5px; cursor: pointer;
  transition: all 0.12s;
}
.fc-btn:hover:not(:disabled) { color: var(--navy); border-color: var(--navy); }
.fc-btn:disabled { opacity: 0.3; cursor: default; }
.fc-btn-next { color: var(--brand); border-color: var(--brand); }
.fc-btn-next:hover:not(:disabled) { background: var(--brand); color: white; }
.fc-counter {
  font-size: 12px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.06em;
}
