@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&family=DM+Mono:wght@500&display=swap');

:root {
  --bg: #f7f6f2;
  --white: #ffffff;
  --ink: #1c1c1a;
  --muted: #6b6b65;
  --border: #e2e0da;
  --a1: #1d4ed8; --a2: #065f46; --a3: #92400e;
  --a4: #5b21b6; --a5: #be123c; --a6: #0e7490; --a7: #1d4ed8;
  --b1: #9333ea; --b2: #c2410c; --b3: #0f766e;
  --b4: #1d4ed8; --b5: #be123c; --b6: #065f46; --b7: #9333ea;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

/* -- Nav -- */
.nav {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 0 2rem; display: flex; align-items: center;
  justify-content: space-between; height: 56px;
  position: sticky; top: 0; z-index: 100;
}
.nav-brand { font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--ink); text-decoration: none; }
.nav-brand span { color: var(--a1); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

/* -- Page -- */
.page { max-width: 820px; margin: 0 auto; padding: 3rem 2rem 6rem; }

/* -- Topic header -- */
.topic-breadcrumb { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 8px; }
.topic-title { font-family: 'DM Serif Display', serif; font-size: 42px; line-height: 1.1; color: var(--ink); margin-bottom: 10px; }
.topic-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topic-meta .dot { width: 4px; height: 4px; background: var(--border); border-radius: 50%; }

/* -- Topic hero -- */
.topic-hero {
  border-radius: 20px;
  padding: 40px 36px 36px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.topic-hero-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  background: rgba(255,255,255,0.7);
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.topic-hero .topic-title {
  margin-bottom: 0;
}
.progress-bar { background: rgba(255,255,255,0.5); border-radius: 99px; height: 8px; margin-top: 1.5rem; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; border-radius: 99px; transition: width 0.5s ease; }
.progress-fill.path-a { background: var(--a1); }
.progress-fill.path-b { background: var(--b1); }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink); opacity: 0.75; margin-top: 8px; font-weight: 500; }

/* -- Pathway selector -- */
.pathway-section { margin: 2rem 0; }
.pathway-heading { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 12px; }
.pathway-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pathway-card {
  border: 2px solid var(--border); border-radius: 14px; padding: 22px 22px 20px;
  cursor: pointer; background: var(--white); transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  text-align: left; position: relative; overflow: hidden;
}
.pathway-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-1px); }
.pathway-card-stripe { position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 14px 14px 0 0; }
.stripe-a { background: var(--a1); } .stripe-b { background: var(--b1); }
.pathway-icon { font-size: 28px; margin-bottom: 10px; display: block; }
.pathway-name { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--ink); margin-bottom: 6px; }
.pathway-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.pathway-steps { display: flex; flex-direction: column; gap: 5px; }
.pathway-step { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--ink); }
.pathway-step-dot {
  width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 9px; font-weight: 700; flex-shrink: 0;
  margin-top: 2px; font-family: 'DM Mono', monospace;
}
.dot-a { background: #dbeafe; color: var(--a1); }
.dot-b { background: #f3e8ff; color: var(--b1); }
.pathway-step .highlight { color: var(--a1); font-weight: 600; }
.pathway-step .highlight-b { color: var(--b1); font-weight: 600; }
.pathway-select-btn {
  margin-top: 16px; width: 100%; padding: 10px; border-radius: 8px; border: none;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.btn-a { background: var(--a1); color: #fff; } .btn-a:hover { background: #1e40af; }
.btn-b { background: var(--b1); color: #fff; } .btn-b:hover { background: #7e22ce; }
.pathway-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; font-style: italic; }

/* -- Steps -- */
.steps-container { display: none; }
.steps-container.visible { display: block; }

.step {
  background: var(--white); border: 1px solid var(--border); border-radius: 16px;
  margin-bottom: 14px; overflow: hidden; transition: box-shadow 0.25s, transform 0.2s, border-color 0.2s;
}
.step.active { box-shadow: 0 8px 32px rgba(0,0,0,0.08); transform: translateY(-1px); }
.step.locked { opacity: 0.55; pointer-events: none; background: var(--bg); }
.step.done { border-color: #bbf7d0; background: #f7fdf9; }

/* -- READ+CHAT step -- */
.step.read-chat-step {
  overflow: visible;
  position: relative;
}
.step.read-chat-step .step-body {
  padding: 0;
  border-top: 1px solid var(--border);
}
.step.read-chat-step .step-body.open {
  display: flex;
  flex-direction: column;
}

.step-header {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px; cursor: pointer;
}
.step-num {
  width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 22px; flex-shrink: 0;
  transition: transform 0.2s;
}
.step.active .step-num { transform: scale(1.05); }
.step-info { flex: 1; }
.step-title { font-size: 16px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: -0.01em; }
.step-time { font-family: 'DM Mono', monospace; font-size: 11px; padding: 3px 8px; border-radius: 5px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.step-subtitle { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.step-chevron { font-size: 18px; color: var(--muted); transition: transform 0.2s; flex-shrink: 0; }
.step-chevron.open { transform: rotate(180deg); }
.step-body { padding: 0 22px 22px; border-top: 1px solid var(--border); display: none; }
.step-body.open { display: block; }
.tick { display: none; font-size: 14px; }
.step.done .tick { display: inline; }
.step.done .step-title { color: #065f46; }

/* -- Instruction -- */
.instruction {
  border-radius: 8px; padding: 14px 16px; margin: 16px 0 0;
  font-size: 14px; line-height: 1.6;
}
.instruction strong { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 6px; opacity: 0.75; }
.instr-blue   { background: #eff6ff; border-left: 3px solid var(--a1); color: #1e3a8a; }
.instr-green  { background: #f0fdf4; border-left: 3px solid #16a34a; color: #14532d; }
.instr-amber  { background: #fffbeb; border-left: 3px solid #d97706; color: #78350f; }
.instr-purple { background: #faf5ff; border-left: 3px solid #9333ea; color: #4c1d95; }
.instr-red    { background: #fff1f2; border-left: 3px solid #e11d48; color: #881337; }
.instr-teal   { background: #f0fdfa; border-left: 3px solid #0d9488; color: #134e4a; }
.instr-orange { background: #fff7ed; border-left: 3px solid #ea580c; color: #7c2d12; }

/* -- READ + CHAT PANEL -- */
.read-chat-intro {
  padding: 16px 22px 0;
}

.read-chat-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 16px 0 0;
  border-top: 1px solid var(--border);
  min-height: 560px;
}

.rc-left {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.rc-pane-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}
.rc-pane-icon { font-size: 16px; }
.rc-pane-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.rc-pane-sub   { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.rc-sheet-frame {
  flex: 1;
  background: #f0eeea;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.rc-sheet-frame .frame-icon { font-size: 36px; }
.rc-sheet-frame .frame-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.rc-sheet-frame .frame-sub { font-size: 12px; line-height: 1.5; max-width: 220px; }
.open-sheet-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--white); border: 1px solid var(--border); border-radius: 7px;
  padding: 9px 14px; font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-decoration: none; margin-top: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.open-sheet-btn:hover { border-color: #aaa; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.rc-tips {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #f0fdf4;
  flex-shrink: 0;
}
.rc-tips-label { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #16a34a; margin-bottom: 6px; }
.rc-tip {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 12px; color: #14532d; margin-bottom: 4px; line-height: 1.4;
}
.rc-tip:last-child { margin-bottom: 0; }
.rc-tip-bullet { flex-shrink: 0; font-weight: 700; margin-top: 1px; }

.rc-right {
  display: flex;
  flex-direction: column;
}

.chat-tip-bar {
  padding: 10px 14px;
  background: #faf5ff;
  border-bottom: 1px solid #e9d5ff;
  flex-shrink: 0;
}
.chat-tip-bar-label { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #7e22ce; margin-bottom: 5px; }
.chat-tips { display: flex; flex-wrap: wrap; gap: 5px; }
.chat-tip-pill {
  background: var(--white); border: 1px solid #d8b4fe;
  border-radius: 99px; padding: 3px 10px;
  font-size: 11.5px; color: #6b21a8; cursor: pointer;
  transition: background 0.1s;
}
.chat-tip-pill:hover { background: #f3e8ff; }

.chat-frame {
  flex: 1;
  background: #fdf4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.chat-frame .frame-icon { font-size: 36px; }
.chat-frame .frame-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.chat-frame .frame-sub { font-size: 12px; line-height: 1.5; max-width: 220px; }

.mock-chat {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  text-align: left;
}
.chat-msg {
  max-width: 85%;
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.5;
}
.chat-msg.student {
  align-self: flex-end;
  background: #7e22ce;
  color: #fff;
  border-bottom-right-radius: 3px;
}
.chat-msg.tutor {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 3px;
}
.chat-msg-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 3px;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  background: var(--bg);
}
.chat-input:focus { border-color: #a855f7; }
.chat-send {
  width: 34px; height: 34px;
  background: #7e22ce; border: none; border-radius: 7px;
  color: #fff; font-size: 15px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

.read-chat-footer {
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border);
}

/* -- Complete button -- */
.complete-btn {
  width: 100%; padding: 13px; border: none; border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: filter 0.15s, transform 0.1s; color: #fff;
  margin-top: 16px;
}
.complete-btn:active { transform: scale(0.99); }
.complete-btn:hover { filter: brightness(1.1); }

/* -- Pre-quiz -- */
.prequiz { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.prequiz-q { background: var(--bg); border-radius: 8px; padding: 14px 16px; }
.prequiz-q .q-num { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.prequiz-q p { font-weight: 500; font-size: 14px; margin-bottom: 8px; }
.prequiz-q textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 6px;
  padding: 9px 11px; font-family: 'DM Sans', sans-serif; font-size: 13.5px;
  color: var(--ink); background: var(--white); resize: vertical; min-height: 60px; outline: none;
}
.prequiz-q textarea:focus { border-color: var(--a1); }
.prequiz-note { font-size: 12px; color: var(--muted); font-style: italic; text-align: center; padding: 8px 0 4px; }

/* -- Recall steps -- */
.recall-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.recall-step { background: var(--bg); border-radius: 8px; padding: 14px; display: flex; gap: 10px; }
.recall-step-num { font-family: 'DM Mono', monospace; font-size: 14px; font-weight: 500; color: var(--a2); flex-shrink: 0; width: 22px; }
.recall-step p { font-size: 13px; color: var(--ink); line-height: 1.5; }
.recall-step strong { display: block; font-size: 13px; margin-bottom: 2px; }

/* -- Verbal recall -- */
.verbal-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.verbal-step { background: var(--bg); border-radius: 8px; padding: 14px; display: flex; gap: 10px; }
.verbal-step-num { font-family: 'DM Mono', monospace; font-size: 14px; font-weight: 500; color: var(--b1); flex-shrink: 0; width: 22px; }
.verbal-step p { font-size: 13px; color: var(--ink); line-height: 1.5; }
.verbal-step strong { display: block; font-size: 13px; margin-bottom: 2px; }

/* -- Resource buttons -- */
.resource-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.resource-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 13px 15px; text-decoration: none; color: var(--ink);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.resource-btn:hover { border-color: #aaa; background: #f0eeea; }
.resource-icon { font-size: 22px; flex-shrink: 0; width: 36px; text-align: center; }
.resource-label { font-size: 13px; font-weight: 600; }
.resource-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* -- Supp cards -- */
.supp-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; margin-top: 16px; }
.supp-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: border-color 0.15s;
}
.supp-card:hover { border-color: #aaa; }
.supp-card .s-icon { font-size: 24px; }
.supp-card .s-label { font-size: 13px; font-weight: 600; }
.supp-card .s-sub { font-size: 12px; color: var(--muted); }

/* -- Embed placeholder -- */
.embed-placeholder {
  background: var(--bg); border: 2px dashed var(--border); border-radius: 10px;
  padding: 40px 24px; text-align: center; margin-top: 16px; color: var(--muted);
}
.embed-placeholder .embed-icon { font-size: 32px; margin-bottom: 10px; }
.embed-placeholder .embed-title { font-weight: 600; color: var(--ink); margin-bottom: 4px; font-size: 15px; }
.embed-placeholder .embed-sub { font-size: 13px; }

/* -- Spaced return -- */
.return-box {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
  padding: 18px 20px; margin-top: 14px; display: flex; gap: 14px; align-items: flex-start;
}
.return-icon { font-size: 24px; flex-shrink: 0; }
.return-title { font-weight: 600; color: #78350f; font-size: 14px; margin-bottom: 4px; }
.return-text  { font-size: 13px; color: #92400e; }
.return-dates { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.return-date {
  background: #fff; border: 1px solid #fde68a; border-radius: 6px;
  padding: 5px 10px; font-family: 'DM Mono', monospace; font-size: 11.5px; color: #78350f;
}

/* -- Done banner -- */
.done-banner {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
  padding: 18px 22px; display: none; align-items: center; gap: 14px; margin-bottom: 14px;
}
.done-banner .db-icon { font-size: 28px; }
.done-banner .db-title { font-weight: 600; color: #14532d; font-size: 15px; }
.done-banner .db-sub { font-size: 13px; color: #166534; margin-top: 2px; }

/* -- Switch -- */
.switch-pathway { text-align: center; margin-bottom: 24px; }
.switch-pathway button {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 14px; font-family: 'DM Sans', sans-serif;
  font-size: 12.5px; color: var(--muted); cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.switch-pathway button:hover { border-color: #aaa; color: var(--ink); }

/* -- Password gate -- */
.password-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(247, 246, 242, 0.97);
  display: flex; align-items: center; justify-content: center;
}
.password-gate.hidden { display: none; }
.password-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 16px;
  padding: 40px 36px; text-align: center; max-width: 380px; width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}
.password-card h2 {
  font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--ink); margin-bottom: 6px;
}
.password-card h2 span { color: var(--a1); }
.password-card p {
  font-size: 14px; color: var(--muted); margin-bottom: 20px;
}
.password-card input {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 11px 14px; font-family: 'DM Sans', sans-serif; font-size: 14px;
  color: var(--ink); outline: none; background: var(--bg); text-align: center;
  margin-bottom: 12px;
}
.password-card input:focus { border-color: var(--a1); }
.password-card button {
  width: 100%; padding: 12px; border: none; border-radius: 8px;
  background: var(--a1); color: #fff; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.password-card button:hover { background: #1e40af; }
.gate-error {
  color: #be123c; font-size: 13px; margin-top: 10px;
}

/* -- Index hero -- */
.index-hero {
  background: linear-gradient(135deg, #1a2332 0%, #2a3f5f 50%, #1e3554 100%);
  position: relative;
  overflow: visible;
  margin-bottom: 20px;
}
.index-hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -5%;
  right: -5%;
  height: 60px;
  background: linear-gradient(135deg, #1a2332 0%, #2a3f5f 50%, #1e3554 100%);
  border-radius: 0 0 50% 50%;
}
.index-hero-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
  position: relative;
  z-index: 1;
  text-align: center;
}
.index-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}
.index-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.index-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.6;
}
.index-section-heading {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.index-section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 6px;
}
.index-section-sub {
  font-size: 14px;
  color: var(--muted);
}

/* -- Index / Topics grid -- */
.topics-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 1.5rem;
}
.topic-card {
  background: #ffffff;
  border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s; display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.topic-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.1); transform: translateY(-3px); }
.topic-card-code { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); margin-bottom: 10px; letter-spacing: 0.02em; }
.topic-card-title { font-family: 'DM Sans', sans-serif; font-size: 19px; font-weight: 700; color: #1e2a4a; letter-spacing: -0.01em; }

/* -- Inline media -- */
.inline-audio { width: 100%; margin-top: 12px; border-radius: 8px; }
.inline-video { width: 100%; margin-top: 12px; border-radius: 10px; background: #000; }
.inline-pdf { width: 100%; height: 500px; border: 1px solid var(--border); border-radius: 10px; margin-top: 12px; }
.inline-image { width: 100%; margin-top: 12px; border-radius: 10px; border: 1px solid var(--border); }

/* -- PDF overlay -- */
.pdf-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: #fff;
  display: flex; flex-direction: column;
}
.pdf-overlay.hidden { display: none; }
.pdf-overlay-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pdf-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 14px; font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: background 0.15s;
}
.pdf-back-btn:hover { background: var(--bg); }
.pdf-overlay-title {
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.pdf-overlay iframe,
.pdf-overlay object {
  flex: 1; width: 100%; border: none;
}
#pdf-overlay-content {
  flex: 1; display: flex;
}

/* -- Flashcards -- */
.flashcard-container { margin-top: 16px; }
.flashcard-deck { position: relative; min-height: 220px; }
.flashcard {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  padding: 32px 24px; text-align: center; cursor: pointer;
  min-height: 200px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  transition: box-shadow 0.2s;
}
.flashcard:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.flashcard-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted);
}
.flashcard-text { font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--ink); }
.flashcard-hint { font-size: 12px; color: var(--muted); font-style: italic; }
.flashcard-answer .flashcard-text { font-size: 14px; font-weight: 400; }
.flashcard-answer { background: #f0fdf4; border-color: #bbf7d0; }
.flashcard-actions {
  display: flex; gap: 10px; margin-top: 14px; justify-content: center;
}
.flashcard-actions button {
  padding: 10px 24px; border: none; border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: filter 0.15s;
}
.flashcard-actions button:hover { filter: brightness(1.1); }
.fc-correct { background: #16a34a; color: #fff; }
.fc-incorrect { background: #e11d48; color: #fff; }
.flashcard-progress {
  text-align: center; font-size: 12px; color: var(--muted);
  font-family: 'DM Mono', monospace; margin-bottom: 10px;
}
.flashcard-summary {
  background: var(--bg); border-radius: 10px; padding: 20px; margin-top: 16px;
}
.flashcard-summary h4 {
  font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 12px;
}
.fc-summary-correct { color: #16a34a; }
.fc-summary-incorrect { color: #e11d48; }
.fc-summary-list {
  display: flex; flex-direction: column; gap: 6px; margin-top: 10px;
}
.fc-summary-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--ink); line-height: 1.4;
}
.fc-summary-item .fc-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px;
}
.fc-dot-correct { background: #16a34a; }
.fc-dot-incorrect { background: #e11d48; }
.fc-revise-heading {
  font-size: 13px; font-weight: 600; color: #e11d48; margin-top: 14px; margin-bottom: 6px;
}
.fc-well-done {
  font-size: 13px; font-weight: 600; color: #16a34a; margin-top: 10px;
}
.flashcard-start-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 13px 15px; font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
  width: 100%; text-align: left;
}
.flashcard-start-btn:hover { border-color: #aaa; background: #f0eeea; }
.flashcard-start-btn .resource-icon { font-size: 22px; flex-shrink: 0; width: 36px; text-align: center; }
