@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500&family=IBM+Plex+Mono:wght@400&display=swap');

:root {
  --navy: #060e1a;
  --dark-blue: #0f1b30;
  --navy-gate: #040a12;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #d1d5db;
  --border-light: #e5e7eb;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-section: #f1f5f9;
  --sidebar-w: 260px;
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body {
  font-family: 'IBM Plex Sans', Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* === GATE OVERLAY (Oculus-style keypad) === */

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--navy-gate);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.4s ease;
}

.gate-box {
  text-align: center;
  color: #fff;
  user-select: none;
}

.gate-box h1 {
  font-family: Inter, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.gate-box p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 32px;
}

.gate-dots {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 36px;
}

.gate-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.gate-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
}

.gate-dot.error {
  background: #ef4444;
  border-color: #ef4444;
}

.gate-dot.success {
  background: #16a34a;
  border-color: #16a34a;
}

.gate-keypad {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  gap: 16px;
  justify-content: center;
}

.gate-key {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.gate-key:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

.gate-key:active, .gate-key.pressed {
  background: rgba(37,99,235,0.35);
  border-color: rgba(37,99,235,0.5);
}

.gate-key.empty {
  visibility: hidden;
  cursor: default;
}

.gate-key.backspace {
  font-size: 18px;
  color: rgba(255,255,255,0.5);
}

.gate-key.backspace:hover {
  color: rgba(255,255,255,0.8);
}

.gate-dots.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

@media (max-width: 768px) {
  .gate-keypad {
    grid-template-columns: repeat(3, 56px);
    gap: 14px;
  }
  .gate-key {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }
  .gate-box h1 { font-size: 22px; }
}

/* === LAYOUT === */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  font-family: Inter, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
  text-decoration: none;
  display: block;
}

.sidebar-logo span {
  color: var(--accent);
}

.sidebar-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  padding: 12px 20px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.nav-link.active {
  color: #fff;
  background: rgba(37,99,235,0.15);
  border-left-color: var(--accent);
}

.nav-link .icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.7;
}

.nav-sub {
  padding-left: 14px;
}

.nav-sub .nav-link {
  font-size: 12.5px;
  padding: 5px 20px 5px 34px;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}

.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 28px;
}

/* === MOBILE HAMBURGER === */

.hamburger {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  background: var(--navy);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 22px;
  cursor: pointer;
}

/* === HEADINGS === */

h1 {
  font-family: Inter, sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

h2 {
  font-family: Inter, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

h3 {
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-blue);
  margin-top: 20px;
  margin-bottom: 8px;
}

.page-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* === BREADCRUMB === */

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

/* === CARDS === */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(37,99,235,0.10);
  transform: translateY(-2px);
}

.card:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(37,99,235,0.08);
}

.card-cat {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  margin-bottom: 6px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--navy);
}

.card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-meta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* === WEEK CARDS === */

.week-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.week-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.week-card .desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

/* === PROGRESS === */

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === DOC VIEWER === */

.pdf-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 16px 0;
}

.pdf-container iframe {
  width: 100%;
  height: 80vh;
  border: none;
  display: block;
}

.doc-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: #1e40af; transform: scale(0.97); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-light); }
.btn-outline:active { background: #bfdbfe; transform: scale(0.97); }

.btn-mark {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 13px;
  padding: 8px 16px;
}
.btn-mark.marked {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

/* === TABLES === */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13.5px;
}

thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

tbody tr:nth-child(even) { background: var(--bg-section); }

/* === STATS ROW === */

.stats-row {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  flex: 1;
  min-width: 140px;
}

.stat-box .num {
  font-family: Inter, sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-box .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === SEARCH === */

.search-wrap {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.search-input::placeholder { color: rgba(255,255,255,0.3); }
.search-input:focus { border-color: var(--accent); }

.search-results {
  padding: 0 16px;
  max-height: 200px;
  overflow-y: auto;
}

.search-result {
  display: block;
  padding: 6px 8px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 12.5px;
  border-radius: 4px;
}

.search-result:hover { background: rgba(255,255,255,0.08); }

/* === DOC LIST === */

.doc-list {
  list-style: none;
  padding: 0;
}

.doc-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.doc-list li:last-child { border-bottom: none; }

.doc-list .check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
}

.doc-list .check.done {
  background: var(--accent);
  border-color: var(--accent);
}

.doc-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.doc-list a:hover { color: var(--accent); }

.doc-list .meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

/* === MOBILE === */

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .sidebar-close { display: block; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .content {
    padding: 60px 16px 24px;
  }

  h1 { font-size: 22px; }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    flex-direction: column;
  }

  .pdf-container iframe {
    height: 60vh;
  }

  .gate-box h1 { font-size: 22px; }
  .gate-input-wrap { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .content { padding: 56px 12px 20px; }
  .pdf-container iframe { height: 50vh; }
}

/* === LEARNING WIDGETS === */

.learn-section {
  margin-top: 40px;
  border-top: 2px solid var(--border-light);
  padding-top: 32px;
}

.learn-heading {
  margin-top: 40px;
}

.widget-section {
  margin-bottom: 32px;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.widget-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* ── Flashcards ── */

.fc-deck {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.fc-due-badge {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.fc-viewport {
  perspective: 800px;
  margin: 16px 0;
}

.fc-card {
  width: 100%;
  min-height: 180px;
  cursor: pointer;
  position: relative;
}

.fc-inner {
  position: relative;
  width: 100%;
  min-height: 180px;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.fc-card.flipped .fc-inner {
  transform: rotateY(180deg);
}

.fc-front, .fc-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.fc-front {
  background: var(--bg-section);
  border: 1px solid var(--border-light);
  color: var(--text);
}

.fc-back {
  background: var(--dark-blue);
  color: #fff;
  transform: rotateY(180deg);
}

.fc-counter {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 0;
}

.fc-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.fc-rate {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.fc-rate:hover {
  background: var(--bg-section);
  border-color: var(--accent);
}

.fc-rate:active {
  transform: scale(0.95);
}

.fc-rate[data-q="0"] { border-color: #ef4444; color: #ef4444; }
.fc-rate[data-q="2"] { border-color: #f59e0b; color: #f59e0b; }
.fc-rate[data-q="3"] { border-color: var(--accent); color: var(--accent); }
.fc-rate[data-q="4"] { border-color: #16a34a; color: #16a34a; }
.fc-rate[data-q="5"] { border-color: #7c3aed; color: #7c3aed; }

/* ── Multiple Choice ── */

.mcq-block {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.mcq-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.mcq-item:last-child { border-bottom: none; }

.mcq-item.mastered {
  opacity: 0.6;
}

.mcq-question {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text);
}

.mcq-mastery {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.mcq-streak {
  font-size: 12px;
  color: var(--text-muted);
}

.mcq-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.mcq-option {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
}

.mcq-option:hover {
  background: var(--bg-section);
  border-color: var(--accent);
}

.mcq-option.selected {
  background: #dbeafe;
  border-color: var(--accent);
  font-weight: 500;
}

.mcq-option.correct {
  background: #dcfce7;
  border-color: #16a34a;
}

.mcq-option.incorrect {
  background: #fef2f2;
  border-color: #ef4444;
}

.mcq-lock-btn {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mcq-lock-btn:hover { background: var(--accent-hover); }
.mcq-lock-btn:active { background: #1e40af; transform: scale(0.97); }

.mcq-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 14px;
}

.mcq-correct { background: #dcfce7; border: 1px solid #16a34a; }
.mcq-incorrect { background: #fef2f2; border: 1px solid #ef4444; }

/* ── Fill in the Blank ── */

.fill-block {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.fill-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.fill-item:last-child { border-bottom: none; }

.fill-template {
  font-size: 15px;
  line-height: 2.2;
  color: var(--text);
}

.fill-input {
  width: 120px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-family: 'IBM Plex Mono', monospace;
  background: var(--bg-section);
  text-align: center;
}

.fill-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.fill-input.fill-correct {
  border-color: #16a34a;
  background: #dcfce7;
}

.fill-input.fill-wrong {
  border-color: #ef4444;
  background: #fef2f2;
}

.fill-hint-btn, .fill-check-btn {
  margin-top: 8px;
  margin-right: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.fill-check-btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.fill-hint {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  font-size: 13px;
  color: #92400e;
}

.fill-result {
  margin-top: 8px;
  font-size: 13px;
}

.fill-pass { color: #16a34a; font-weight: 600; }
.fill-fail { color: #ef4444; }
.fill-answer { color: var(--text-muted); font-size: 12px; }

/* ── AI Response / Feedback ── */

.ai-block {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.ai-prompt-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.ai-prompt-item:last-child { border-bottom: none; }

.ai-prompt-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.5;
}

.ai-textarea, .cold-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  background: var(--bg-section);
}

.ai-textarea:focus, .cold-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.ai-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-submit-btn, .cold-submit-btn {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ai-submit-btn:hover, .cold-submit-btn:hover { background: var(--accent-hover); }
.cold-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ai-loading {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.ai-feedback, .cold-feedback {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-section);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.ai-score {
  display: inline-block;
  font-size: 24px;
  font-weight: 700;
  border: 3px solid;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  line-height: 50px;
  text-align: center;
  margin-bottom: 12px;
}

.ai-section {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
  color: var(--text);
}

.ai-error {
  color: #dc2626;
  font-size: 13px;
}

.ai-retry-btn {
  margin-left: 8px;
  padding: 4px 10px;
  border: 1px solid #dc2626;
  border-radius: 4px;
  background: transparent;
  color: #dc2626;
  font-size: 12px;
  cursor: pointer;
}

.ai-history-toggle {
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.ai-history {
  margin-top: 8px;
  padding: 8px;
  background: var(--bg-section);
  border-radius: var(--radius);
}

.ai-hist-entry {
  font-size: 13px;
  padding: 4px 0;
  color: var(--text-muted);
}

.ai-hist-score {
  font-weight: 600;
  color: var(--text);
}

/* ── Cold Read Timer ── */

.cold-block {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.cold-item {
  padding: 16px 0;
}

.cold-prompt {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.5;
}

.cold-timer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.cold-timer-display {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  min-width: 120px;
}

.cold-timer-display.cold-warning { color: #f59e0b; }
.cold-timer-display.cold-urgent { color: #ef4444; }

.cold-start-btn, .cold-pause-btn, .cold-reset-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.cold-start-btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.cold-result-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.cold-time {
  font-size: 14px;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
}

/* ── Widget responsive ── */

@media (max-width: 768px) {
  .fc-controls {
    gap: 6px;
  }
  .fc-rate {
    padding: 6px 10px;
    font-size: 12px;
  }
  .cold-timer-display {
    font-size: 28px;
  }
  .ai-score {
    font-size: 20px;
    width: 44px;
    height: 44px;
    line-height: 38px;
  }
}

/* === PRINT === */

@media print {
  .sidebar, .hamburger, .gate-overlay { display: none !important; }
  .main { margin-left: 0; }
}
