/* ==========================================================
   Tips4IELTS: course and lesson pages (loaded after styles.css)
   ========================================================== */
.eyebrow-write { color: #b45309; }
.hero-write {
  background:
    radial-gradient(700px 360px at 95% 0%, color-mix(in srgb, var(--write) 20%, transparent), transparent 65%),
    radial-gradient(600px 320px at 0% 100%, rgba(59, 130, 246, .10), transparent 60%),
    var(--bg);
}
.meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.meta-chips li { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px; font-size: .88rem; color: var(--muted); }
.meta-chips strong { color: var(--navy); }

/* Course cards (Writing hub) */
.course-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.course-pick .practice-card { padding: 30px 28px; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; }
a.practice-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--write); }
.course-pick .practice-abbr { background: color-mix(in srgb, var(--write) 16%, white); color: #b45309; }
.go { font-weight: 600; color: var(--coral-dark); margin-top: 8px; }

/* Lesson list (course page) */
.lesson-list { display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; max-width: 900px; }
.lesson-card {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
  text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.lesson-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--write); }
.lesson-num {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-family: var(--font-head); font-size: 1.4rem; font-weight: 700;
}
.lesson-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.lesson-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.lesson-time { font-size: .85rem; color: var(--muted); white-space: nowrap; text-align: right; }
.lesson-status { display: none; font-size: .78rem; font-weight: 700; color: var(--read); text-transform: uppercase; letter-spacing: .06em; }
.lesson-card.done .lesson-num { background: var(--read); }
.lesson-card.done .lesson-status { display: block; }

/* Lesson body */
.lesson-body { display: grid; gap: 64px; }
.lesson-body > section { scroll-margin-top: 90px; min-width: 0; }
.aims { background: var(--tint); border-radius: var(--radius); padding: 22px 26px; max-width: 900px; }
.aims h2 { font-size: 1.2rem; margin-bottom: .4em; }
.aims ul { margin: 0; padding-left: 20px; color: #333d4d; }
.aims li { margin: 4px 0; }

.sample {
  max-width: 820px; margin: 22px 0; padding: 22px 26px; background: #fffdf6;
  border: 1px solid #f1e3c2; border-radius: 14px; font-size: 1.02rem; line-height: 1.75; color: #2b3443;
}
.sample p { margin: 0 0 .8em; }
.sample p:last-child { margin: 0; }
.sample .label { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #b45309; margin-bottom: 8px; }
.sample b { color: var(--navy); background: color-mix(in srgb, var(--write) 18%, transparent); padding: 0 3px; border-radius: 4px; }
.sample u { text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.table-scroll { overflow-x: auto; max-width: 820px; }
.data-table { border-collapse: collapse; margin: 18px 0; font-size: .95rem; width: 100%; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.data-table th { background: var(--tint); color: var(--navy); font-weight: 600; }
.data-table td b { color: #b45309; }

.wordbank { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.wordbank li { background: var(--tint); border: 1px dashed #c9d1dd; border-radius: 8px; padding: 4px 12px; font-size: .92rem; color: var(--navy); }

/* Charts */
.chart-wrap { max-width: 720px; margin: 22px 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 12px; }
.chart-wrap h4 { margin: 0 0 4px; font-family: var(--font-head); color: var(--navy); font-size: 1.05rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart-title { font: 600 14px var(--font-body); fill: var(--navy); }
.chart-tick { font: 11px var(--font-body); fill: var(--muted); }
.chart-axis { font: 600 11px var(--font-body); fill: var(--muted); }
.chart-value { font: 600 10px var(--font-body); fill: var(--ink); }
.chart-grid { stroke: #e9edf3; }
.chart-baseline { stroke: #9aa3b1; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; list-style: none; padding: 0; margin: 6px 0 0; font-size: .88rem; color: var(--muted); }
.chart-legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 1100px; margin-top: 22px; }
.chart-grid-2 .chart-wrap { margin: 0; max-width: none; }

/* Diagrams */
.diagram { max-width: 720px; margin: 22px 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.diagram svg { width: 100%; height: auto; display: block; }
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; padding: 0; list-style: none; max-width: 1000px; counter-reset: step; }
.process li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px 16px; font-size: .93rem; color: #333d4d; }
.process li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 10px;
}
.process li:not(:last-child)::after {
  content: "\2192"; position: absolute; right: -13px; top: 22px; color: var(--coral-dark); font-weight: 700; font-size: 1.1rem;
}

/* Exercises */
.exercise {
  max-width: 900px; margin-top: 26px; background: #fff; border: 1px solid var(--line);
  border-left: 5px solid var(--write); border-radius: var(--radius); padding: 24px 26px;
}
.ex-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #b45309; }
.exercise h3 { margin: 4px 0 6px; font-size: 1.2rem; }
.ex-instr { color: var(--muted); margin-bottom: 16px; }
.ex-items { margin: 0; padding-left: 22px; display: grid; gap: 18px; }
.ex-items > li { padding-left: 4px; }
.ex-items .q { display: block; margin-bottom: 6px; color: var(--ink); }
.ex-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; line-height: 2; }
.ex-match { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(200px, 1.2fr); gap: 10px 16px; align-items: center; margin: 0; }
.ex-match dt { color: var(--ink); }
.ex-match dd { margin: 0; }

.exercise input.gap, .exercise select, .exercise textarea {
  font: inherit; font-size: .97rem; color: var(--ink); background: #fff;
  border: 1.5px solid #cdd4df; border-radius: 8px; padding: 6px 10px;
  transition: border-color .15s, background .15s; max-width: 100%;
}
.exercise input.gap { width: 130px; }
.exercise input.gap.mid { width: 220px; }
.exercise input.gap.wide { flex: 1 1 300px; width: auto; min-width: 200px; }
.exercise input.gap:focus, .exercise select:focus, .exercise textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 42, 74, .12); }
.exercise .correct { border-color: var(--read) !important; background: #ecfdf5 !important; }
.exercise .incorrect { border-color: #e5484d !important; background: #fff1f1 !important; }
.mc { display: flex; flex-wrap: wrap; gap: 8px 22px; border-radius: 8px; padding: 4px 8px; border: 1.5px solid transparent; }
.mc label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.exercise textarea { width: 100%; min-height: 150px; line-height: 1.6; resize: vertical; }
.exercise textarea.short { min-height: 64px; }
.wordcount { font-size: .82rem; color: var(--muted); text-align: right; margin: 4px 0 0; }

.ex-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.ex-score { font-weight: 600; color: var(--navy); font-size: .93rem; }
.model { margin-top: 18px; background: #ecfdf5; border: 1px solid #b7ebd3; border-radius: 12px; padding: 16px 18px; color: #1f3d33; }
.model > strong:first-child { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #047857; margin-bottom: 6px; }
.model p:last-child, .model ul:last-child, .model ol:last-child { margin-bottom: 0; }
.model ol, .model ul { padding-left: 20px; margin: 6px 0; }
.model[hidden] { display: none; }

.timer { margin-left: auto; font-size: .82rem; padding: 4px 12px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; font-weight: 600; font-family: inherit; }
.timer.running { background: var(--coral); border-color: var(--coral); color: #fff; }

/* Click-to-tag */
.tag-text { line-height: 2.2 !important; }
.tok { cursor: pointer; border-radius: 4px; padding: 1px 2px; transition: background .15s; }
.tok:hover { background: var(--tint); }
.tok[data-chosen="verb"] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--listen); text-underline-offset: 4px; }
.tok[data-chosen="adverb"] { outline: 2px solid var(--coral); outline-offset: 1px; border-radius: 99px; }
.tok-right { background: #d1fae5 !important; }
.tok-wrong { background: #fee2e2 !important; }
.tag-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); margin: 0 0 6px; }
.tag-key .k-verb { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--listen); text-underline-offset: 4px; color: var(--ink); }
.tag-key .k-adv { outline: 2px solid var(--coral); border-radius: 99px; padding: 0 4px; color: var(--ink); }

/* Lesson footer */
.lesson-end { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; max-width: 900px; padding-top: 28px; border-top: 1px solid var(--line); }
.complete-btn { border: 2px solid var(--read); color: #047857; background: #fff; font-family: inherit; }
.complete-btn:hover { background: #ecfdf5; }
.complete-btn.done { background: var(--read); color: #fff; }
.lesson-pager { display: flex; gap: 10px; flex-wrap: wrap; }
.credit { font-size: .82rem; color: var(--muted); max-width: 900px; margin-top: 18px; }

.parts-2 { grid-template-columns: repeat(2, 1fr); max-width: 900px; }

@media (max-width: 900px) {
  .course-pick, .chart-grid-2, .parts-2 { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .process li:not(:last-child)::after { display: none; }
}
@media (max-width: 600px) {
  .lesson-card { grid-template-columns: 44px 1fr; padding: 18px; }
  .lesson-num { width: 44px; height: 44px; font-size: 1.15rem; }
  .lesson-time { grid-column: 2; text-align: left; }
  .ex-match { grid-template-columns: 1fr; gap: 4px; }
  .ex-match dd { margin-bottom: 10px; }
  .exercise { padding: 20px 16px; }
  .exercise input.gap.mid { width: 100%; }
  .process { grid-template-columns: 1fr; }
  .sample { padding: 18px; }
  .chart-wrap { padding: 12px 8px 10px; }
}

/* ==========================================================
   Task 2 additions
   ========================================================== */
.tok[data-chosen="extent"] { background: #fde68a; box-shadow: 0 0 0 2px #f59e0b; }
.tok[data-chosen="position"] { background: #c7d2fe; box-shadow: 0 0 0 2px #6366f1; }
.tok[data-chosen="topic"] { background: #dbeafe; box-shadow: 0 0 0 2px #3b82f6; }
.tok[data-chosen="instruction"] { background: #ffe4d6; box-shadow: 0 0 0 2px var(--coral); }
.k-topic { background: #dbeafe; box-shadow: 0 0 0 2px #3b82f6; border-radius: 4px; padding: 0 4px; color: var(--ink); }
.k-instr { background: #ffe4d6; box-shadow: 0 0 0 2px var(--coral); border-radius: 4px; padding: 0 4px; color: var(--ink); }
.k-extent { background: #fde68a; box-shadow: 0 0 0 2px #f59e0b; border-radius: 4px; padding: 0 4px; color: var(--ink); }

/* Put-in-order lists */
.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ord; }
.order-list > li {
  counter-increment: ord; display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center;
  background: #fff; border: 1.5px solid #cdd4df; border-radius: 10px; padding: 10px 12px; font-size: .96rem;
}
.order-list > li::before {
  content: counter(ord); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; font-size: .85rem;
}
.order-btns { display: flex; flex-direction: column; gap: 4px; }
.order-btns button {
  width: 30px; height: 24px; border: 1px solid var(--line); background: var(--tint); border-radius: 6px;
  cursor: pointer; color: var(--navy); font-size: .7rem; line-height: 1;
}
.order-btns button:hover { background: #e2e8f0; }
.exercise .order-list > li.correct { border-color: var(--read); background: #ecfdf5; }
.exercise .order-list > li.incorrect { border-color: #e5484d; background: #fff1f1; }

/* Annotated model essays */
.essay { max-width: 820px; margin: 22px 0; padding: 24px 28px; background: #fffdf6; border: 1px solid #f1e3c2; border-radius: 14px; line-height: 1.8; color: #2b3443; }
.essay .q { display: block; font-style: italic; color: var(--muted); margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed #e8d9b0; }
.essay p { margin: 0 0 1em; position: relative; }
.essay p:last-child { margin-bottom: 0; }
.essay .para-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b45309; margin-bottom: 2px; }
.essay.annotated .ts { background: #fee2e2; }
.essay.annotated .ex { background: #dbeafe; }
.essay.annotated .eg { background: #dcfce7; }
.essay.annotated .pos { background: #fde68a; font-weight: 600; }
.essay.annotated .ca { background: #ffe4d6; }
.essay.annotated .sum { background: #f1f5f9; }
.essay .band8 { background: #ede9fe; border-bottom: 2px dotted #7c3aed; }
.legend-row { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .86rem; color: var(--muted); margin: 6px 0 0; padding: 0; list-style: none; }
.legend-row li span { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.essay-toggle { margin-top: 4px; }

/* Planning cards */
.plan-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 1000px; margin: 22px 0; padding: 0; list-style: none; counter-reset: ps; }
.plan-steps li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; font-size: .93rem; color: #333d4d; }
.plan-steps li strong { display: block; color: var(--navy); font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 4px; }
.plan-steps li::before { counter-increment: ps; content: "Step " counter(ps); display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b45309; margin-bottom: 4px; }
.essay-plan { display: grid; gap: 8px; max-width: 760px; margin: 18px 0; }
.essay-plan div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--write); border-radius: 10px; padding: 10px 14px; font-size: .95rem; }
.essay-plan div b { color: var(--navy); }
.qtype-box { max-width: 820px; background: var(--navy); color: #fff; border-radius: 14px; padding: 20px 24px; margin: 18px 0; }
.qtype-box p { margin: 0 0 .5em; }
.qtype-box p:last-child { margin: 0; }
.qtype-box em { color: #fde68a; font-style: normal; font-weight: 600; }
.lesson-group { font-family: var(--font-head); color: var(--navy); font-size: 1.25rem; margin: 18px 0 4px; }

@media (max-width: 900px) {
  .plan-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .plan-steps { grid-template-columns: 1fr; }
  .essay { padding: 18px; }
  .essay-plan div { grid-template-columns: 1fr; gap: 2px; }
}

/* ==========================================================
   Reading course
   ========================================================== */
.eyebrow-read { color: #047857; }
.hero-read {
  background:
    radial-gradient(700px 360px at 95% 0%, color-mix(in srgb, var(--read) 18%, transparent), transparent 65%),
    radial-gradient(600px 320px at 0% 100%, rgba(59, 130, 246, .10), transparent 60%),
    var(--bg);
}
.read-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.read-split .exercise { margin-top: 0; }
.read-split .questions { display: grid; gap: 22px; min-width: 0; }
.passage {
  position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
  font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.7; color: #22262e;
  box-shadow: var(--shadow);
}
.passage h4 { font-family: var(--font-head); color: var(--navy); font-size: 1.3rem; margin: 0 0 2px; }
.passage .sub { font-family: var(--font-body); color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.passage .note { font-family: var(--font-body); font-size: .82rem; color: var(--muted); font-style: italic; margin-bottom: 12px; }
.passage p { margin: 0 0 .9em; }
.passage .pl { display: inline-block; min-width: 1.6em; font-family: var(--font-body); font-weight: 700; color: #047857; }
.passage .gloss { font-family: var(--font-body); font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 14px; }
.passage .src { font-family: var(--font-body); font-size: .75rem; color: var(--muted); margin-top: 10px; }
.passage-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #047857; margin-bottom: 6px; display: block; font-family: var(--font-body); }

.timed-reveal { margin: 6px 0 10px; }
.timed-reveal .reveal-body { margin-top: 14px; }
.reveal-status { margin-left: 12px; font-weight: 600; color: var(--coral-dark); font-size: .92rem; }

.task-box { background: var(--tint); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; font-size: .95rem; }
.task-box p { margin: 0 0 .4em; }
.task-box p:last-child { margin: 0; }
.task-box .opts { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.task-box .opts b { display: inline-block; min-width: 2.2em; color: var(--navy); }

.flow { display: grid; justify-items: center; gap: 6px; margin: 10px 0; font-size: .95rem; }
.flow .box { background: #fff; border: 1.5px solid var(--navy); border-radius: 10px; padding: 8px 14px; text-align: center; max-width: 100%; }
.flow .arrow { color: var(--coral-dark); font-weight: 700; }
.flow .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }

.qtypes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; max-width: 1100px; }
.qtypes a { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: inherit; }
.qtypes a:hover { border-color: var(--read); box-shadow: var(--shadow); }
.qtypes b { display: block; color: var(--navy); }
.qtypes span { font-size: .88rem; color: var(--muted); }

.strategy { counter-reset: st; list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; max-width: 820px; }
.strategy li { counter-increment: st; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.strategy li::before { content: counter(st); width: 30px; height: 30px; border-radius: 50%; background: #047857; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.tok[data-chosen="key"] { background: #fde68a; box-shadow: 0 0 0 2px #f59e0b; }
.k-key { background: #fde68a; box-shadow: 0 0 0 2px #f59e0b; border-radius: 4px; padding: 0 4px; color: var(--ink); }

@media (max-width: 960px) {
  .read-split { grid-template-columns: 1fr; }
  .passage { position: static; max-height: 60vh; }
}

/* ==========================================================
   Listening course
   ========================================================== */
.eyebrow-listen { color: #1d4ed8; }
.hero-listen {
  background:
    radial-gradient(700px 360px at 95% 0%, color-mix(in srgb, var(--listen) 18%, transparent), transparent 65%),
    radial-gradient(600px 320px at 0% 100%, rgba(16, 185, 129, .10), transparent 60%),
    var(--bg);
}
.player {
  position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
}
.player-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #1d4ed8; display: block; margin-bottom: 6px; }
.player h4 { font-family: var(--font-head); color: var(--navy); font-size: 1.2rem; margin: 0 0 4px; }
.player .intro { color: var(--muted); font-size: .92rem; font-style: italic; margin: 0 0 12px; }
.player audio { width: 100%; margin: 4px 0 8px; }
.player-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.player-btns label { font-size: .85rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.player-btns select { font: inherit; font-size: .85rem; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; }
.player-status { font-size: .85rem; color: #1d4ed8; font-weight: 600; min-height: 1.2em; margin: 8px 0 0; }
.player-note { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }
.transcript { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.transcript summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: .92rem; }
.transcript .tx { font-family: Georgia, "Times New Roman", serif; font-size: .97rem; line-height: 1.65; margin-top: 10px; }
.transcript .tx p { margin: 0 0 .7em; }
.transcript .tx b { font-family: var(--font-body); font-size: .8rem; color: #1d4ed8; margin-right: 6px; }
.transcript .tx p.speaking { background: #eff6ff; border-radius: 6px; }
button.say { border: 1px solid var(--line); background: #eff6ff; color: #1d4ed8; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; margin-right: 6px; }
button.say:hover { background: #dbeafe; }
.form-box { border: 1.5px solid var(--navy); border-radius: 10px; padding: 14px 16px; background: #fff; }
.form-box h4 { margin: 0 0 10px; text-align: center; font-size: 1rem; color: var(--navy); }
.form-box .row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.form-box .row:last-child { border-bottom: 0; }
.form-box .row > span:first-child { color: var(--muted); font-size: .92rem; }
.listen-qtypes { counter-reset: none; }
@media (max-width: 960px) { .player { position: static; max-height: none; } }

/* ==========================================================
   Speaking course
   ========================================================== */
.eyebrow-speak { color: #7e22ce; }
.hero-speak {
  background:
    radial-gradient(700px 360px at 95% 0%, color-mix(in srgb, var(--speak) 18%, transparent), transparent 65%),
    radial-gradient(600px 320px at 0% 100%, rgba(245, 158, 11, .10), transparent 60%),
    var(--bg);
}
.v { background: #f3e8ff; color: #581c87; border-radius: 4px; padding: 0 3px; font-weight: 600; cursor: help; border-bottom: 1px dotted #7e22ce; }
.qa { display: grid; gap: 12px; }
.qa-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.qa-item .qq { font-weight: 700; color: var(--navy); margin: 0 0 6px; display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.qa-item .qa-a { margin: 0; line-height: 1.7; }
.vocab-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.vocab-list li { background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.vocab-list b { display: block; color: #581c87; }
.word-bank { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 12px; background: var(--tint); border: 1px solid var(--line); border-radius: 12px; }
.word-bank span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: .9rem; }
.chip { font: inherit; font-size: .9rem; border: 1.5px solid #c084fc; background: #faf5ff; color: #581c87; border-radius: 999px; padding: 4px 12px; cursor: grab; }
.chip.selected { background: #7e22ce; color: #fff; border-color: #7e22ce; }
.chip.used { opacity: .35; cursor: default; text-decoration: line-through; }
.exercise input.drop { cursor: pointer; background: #fff; border-style: dashed; min-width: 150px; }
.exercise .gap-text { line-height: 2.4; margin: 0 0 10px; }
.cw-wrap { overflow-x: auto; }
.cw { border-collapse: collapse; margin: 4px 0 14px; }
.cw td { width: 34px; height: 34px; padding: 0; position: relative; }
.cw td.on { border: 1.5px solid var(--navy); background: #fff; }
.cw td .n { position: absolute; top: 1px; left: 3px; font-size: .62rem; font-weight: 700; color: var(--muted); pointer-events: none; }
.exercise .cw input { width: 100%; height: 100%; border: 0 !important; border-radius: 0; text-align: center; text-transform: uppercase; font-weight: 700; font-size: 1rem; padding: 6px 0 0; background: transparent; box-shadow: none !important; }
.exercise .cw input.correct { background: #ecfdf5 !important; }
.exercise .cw input.incorrect { background: #fef2f2 !important; }
.cw-clues { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 24px; font-size: .92rem; }
.cw-clues h4 { margin: 0 0 6px; color: var(--navy); }
.cw-clues ol { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.recorder, .cue-picker, .q-picker { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.rec-btns, .cue-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rec-status, .cue-clock { font-weight: 600; color: #7e22ce; margin: 8px 0 0; min-height: 1.2em; }
.recorder audio { width: 100%; margin-top: 8px; }
.cue-card { border: 2px solid var(--navy); border-radius: 12px; padding: 16px 18px; margin: 12px 0 4px; background: #fffdf7; }
.cue-card ul { margin: 6px 0 0; }
.q-out { display: block; margin: 12px 0 6px; font-size: 1.1rem; }
.q-out .q-topic { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7e22ce; }
.q-model { background: #faf5ff; border-radius: 10px; padding: 10px 12px; }
.autosave-note { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: .88rem; color: var(--muted); background: var(--tint); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 20px; }
.track-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.track-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.track-card:hover { border-color: var(--speak); }
.track-card h3 { margin: 6px 0 6px; font-family: var(--font-head); color: var(--navy); font-size: 1.4rem; }
.track-card p { margin: 0 0 10px; color: var(--muted); }
.track-card .track-progress { font-weight: 700; color: #7e22ce; font-size: .9rem; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.topic-grid a { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; text-decoration: none; color: var(--navy); font-weight: 600; }
.topic-grid a:hover { border-color: var(--speak); }
.topic-grid a .tick { color: var(--read); visibility: hidden; }
.topic-grid a.done .tick { visibility: visible; }
.gram-table td:first-child { white-space: nowrap; }

/* ==========================================================
   Accounts (login.html, account.html)
   ========================================================== */
.auth-card, .acc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); margin-bottom: 22px; }
.auth-card h1 { margin: 4px 0 6px; }
.auth-card label, .acc-form label { display: block; font-weight: 600; font-size: .92rem; margin: 12px 0 4px; }
.auth-card input, .acc-form input, .sub textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; box-sizing: border-box; }
.auth-card input:focus, .acc-form input:focus, .sub textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 42, 74, .12); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.form-error, .acc-flash.err, .err { color: #b91c1c; }
.acc-flash { margin: 12px 0 0; }
.acc-flash.ok { color: #047857; }
.acc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.acc-head h1 { margin: 4px 0; }
.acc-head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.acc-row h2, .acc-card h2 { margin: 0 0 10px; }
.acc-form { max-width: 420px; }
.acc-form button { margin-top: 14px; }
.acc-inline { max-width: none; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 8px; }
.acc-inline label { flex: 1 1 200px; margin: 0; }
.acc-inline button { margin: 0; }
.acc-table td { vertical-align: top; }
.acc-table tr.inactive td { opacity: .6; }
.acc-actions { white-space: nowrap; }
.acc-actions .btn { margin: 2px 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--navy); text-decoration: underline; cursor: pointer; }
.cred { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 12px; padding: 12px 14px; color: var(--ink, #1f2937); }
.cred code, .acc-card code { background: #f1f5f9; padding: 1px 6px; border-radius: 6px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; margin-left: 6px; }
.badge.ok { background: #d1fae5; color: #065f46; }
.sub { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; }
.sub summary { cursor: pointer; }
.sub-body { white-space: pre-wrap; background: var(--tint); border-radius: 10px; padding: 12px 14px; margin: 10px 0; line-height: 1.6; }
.sub-fb { border-left: 4px solid var(--read); padding: 6px 12px; margin: 8px 0; white-space: pre-wrap; }
.sub-fb-label { display: block; font-weight: 600; margin: 8px 0; }
.acc-progress { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.acc-course { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: inherit; }
.acc-course b { display: block; color: var(--navy); }
.acc-course span { font-size: .88rem; color: var(--muted); }
.acc-bar { display: block; height: 8px; background: #eef2f7; border-radius: 999px; margin-top: 8px; overflow: hidden; }
.acc-bar i { display: block; height: 100%; background: var(--read); }
.submit-box { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .9rem; }
