/* Languanauts brand: navy ink on cream, terracotta for actions, gold for progress,
   teal for done, wine for attention. */
:root {
  --navy: #16233f; --navy-2: #24365e; --wine: #7a2338; --terra: #b8562f; --terra-dark: #a04a27;
  --gold: #c9972b; --teal: #2a7a78; --cream: #f6efe2; --paper: #fffaf1; --line: #e2d6c1;
  --muted: #5f6577;
  --display: "Spectral", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--cream); color: var(--navy); font: 16px/1.55 var(--body); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.08rem; }
a { color: var(--terra); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0 0 4px; }

/* Header */
.top { background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--navy); text-decoration: none; }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--navy); text-decoration: none; font-weight: 500; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: .92rem; }
.linkbutton { background: none; border: 0; padding: 0; color: var(--terra); cursor: pointer; text-decoration: underline; }

main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 56px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.stack { display: grid; gap: 20px; }

/* Buttons and chips */
[hidden] { display: none !important; } /* .btn and others set display, which would beat the hidden attribute */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 600; cursor: pointer; background: var(--terra); color: var(--paper); text-decoration: none; }
.btn:hover { background: var(--terra-dark); }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--cream); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.chip { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.chip.done { background: var(--teal); color: var(--paper); }
.chip.progress { background: #f6e7c4; color: #7a5a10; }
.chip.todo { background: #ece6da; color: var(--muted); }
.chip.attn { background: #f3dde2; color: var(--wine); }
.bar { height: 8px; background: #ece6da; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); }
.notice { background: #f6e7c4; border-radius: 8px; padding: 10px 14px; }
/* Messages stay in view at the top while you scroll, so you see the result of an htmx action. */
.messages { position: sticky; top: 8px; z-index: 60; display: grid; gap: 8px; margin-bottom: 16px; }
.messages:empty { display: none; }
.messages .notice { margin: 0; padding-right: 40px; box-shadow: 0 2px 10px rgba(22, 35, 63, .15); }
.messages .close { position: absolute; top: 4px; right: 8px; background: none; border: 0; font-size: 1.4rem; line-height: 1; padding: 4px; cursor: pointer; color: var(--navy); }
/* htmx adds .htmx-request to a form while it waits for the answer. */
.htmx-request [type=submit], [type=submit].htmx-request { opacity: .6; pointer-events: none; }

/* Course home */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin: 20px 0; }
.next { background: var(--navy); color: var(--cream); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.next .kicker { color: #c9c2b3; }
.next h2 { color: var(--paper); font-size: 1.6rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 4px; align-content: start; }
.stat b { font-family: var(--display); font-size: 1.6rem; }
.week { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.week.progress { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.week summary { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.week summary::-webkit-details-marker { display: none; }
.week .summary { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; }
.week.locked { color: var(--muted); }
.week .w { font-family: var(--display); font-weight: 600; }
.week ol { margin: 0; padding: 0 14px 12px 108px; display: grid; gap: 6px; }
.week li { display: flex; justify-content: space-between; gap: 10px; }

/* Lesson */
.lesson-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.video { aspect-ratio: 16 / 9; background: var(--navy); color: var(--cream); border-radius: 10px; display: grid; place-items: center; text-align: center; padding: 20px; }
.prose { max-width: 68ch; }
.prose p, .prose li { font-size: 1.05rem; }
.prose table { border-collapse: collapse; margin: 12px 0; background: var(--paper); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 6px 10px; border: 1px solid var(--line); }
.prose th { background: var(--cream); font-weight: 600; }
.gap { width: 140px; border: 0; border-bottom: 2px solid var(--navy); background: transparent; padding: 0 4px; text-align: center; }
.gap.right { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.gap.wrong { border-color: var(--wine); color: var(--wine); }
.items { display: grid; gap: 12px; margin: 12px 0; max-width: 68ch; }
.score { font-weight: 600; }
.side { position: sticky; top: 16px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* Forms */
.form-card { max-width: 420px; margin: 40px auto; }
.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.errorlist { color: var(--wine); margin: 0 0 12px; padding-left: 18px; }

@media (max-width: 900px) {
  .hero, .lesson-grid { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 480px) {
  .top { padding: 12px 16px; }
  .week summary, .week .summary { grid-template-columns: 1fr auto; }
  .week .w { grid-column: 1 / -1; }
  .week ol { padding-left: 14px; }
  h1 { font-size: 1.55rem; }
}
.who .btn.small { color: var(--paper); text-decoration: none; }
.field input[type="checkbox"] { width: auto; }
.field .errorlist { margin: 4px 0 0; }
.question { border: 0; padding: 0; margin: 0; scroll-margin-top: 20px; }
.question legend { font-weight: 600; margin-bottom: 6px; }
.question.missing { border-left: 4px solid var(--wine); padding-left: 12px; }
.missing-note { color: var(--wine); font-weight: 600; margin: 0 0 4px; }

/* Evaluations */
.skill-row { display: grid; grid-template-columns: 1fr 130px 320px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.skill-row:last-child { border-bottom: 0; }
.skill-action { display: flex; gap: 12px; align-items: center; justify-content: flex-end; }
.criteria { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.day legend { font-family: var(--display); font-weight: 600; font-size: 1.08rem; padding: 0 6px; }
.times { display: flex; flex-wrap: wrap; gap: 8px; }
.time { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; background: var(--paper); }
.time:has(input:checked) { border-color: var(--terra); box-shadow: inset 0 0 0 1px var(--terra); }
.teach-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.row-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.slots { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.slots li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; }
.copy { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; background: var(--cream); }
.field textarea, .field select, .rubric input[type="text"] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); width: 100%; }
.field ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 16px; }
@media (max-width: 900px) { .teach-grid { grid-template-columns: 1fr; } .skill-row { grid-template-columns: 1fr auto; } .skill-action { grid-column: 1 / -1; justify-content: flex-start; } }
.eval-strip { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

/* Teacher classes */
.class-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.class-head > div:last-child { display: flex; gap: 10px; align-items: center; }
.class-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.add-box { display: grid; gap: 8px; }
.add-box textarea, .request-row input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); width: 100%; }
.request-row { margin-top: 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: end; }
.request-row select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.request-row p { grid-column: 1 / -1; }
@media (max-width: 900px) { .class-grid, .request-row { grid-template-columns: 1fr; } }

/* Footer */
.site-foot { max-width: 1180px; margin: 40px auto 0; padding: 18px 24px 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.site-foot nav { display: flex; gap: 16px; }
.lang-switch { display: flex; gap: 8px; align-items: center; }
.lang-switch select { width: auto; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }

/* Language packs (23 Nov). Our two fonts have no Hindi, Bengali, Tamil or Chinese letters.
   These pages use the fonts on the device: nothing more to download. */
:lang(hi) { --body: "Source Sans 3", "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", sans-serif; --display: var(--body); }
:lang(bn) { --body: "Source Sans 3", "Noto Sans Bengali", "Nirmala UI", "Kohinoor Bangla", sans-serif; --display: var(--body); }
:lang(ta) { --body: "Source Sans 3", "Noto Sans Tamil", "Nirmala UI", "Tamil Sangam MN", sans-serif; --display: var(--body); }
:lang(zh-hans) { --body: "Source Sans 3", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; --display: "Spectral", "Songti SC", "SimSun", "Noto Serif SC", serif; }

/* Landing page */
.landing { display: grid; gap: 28px; }
/* IELTS hero (24 Nov): copy on the left; voyage map and a sample feedback card on the right. */
.ih { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 65%, var(--teal) 140%); color: var(--paper); border-radius: 16px; padding: 56px 48px; }
.ih-grid { display: flex; flex-wrap: wrap; gap: 44px; align-items: flex-start; }
.ih-copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.ih-art { flex: 1 1 470px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ih-pill { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(201,151,43,.16); border: 1px solid rgba(201,151,43,.55); color: #e7c27a; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ih h1 { font-size: clamp(2.2rem, 4.6vw, 3.3rem); line-height: 1.12; letter-spacing: -.01em; max-width: 13ch; }
.ih h1 sup { font-size: .42em; vertical-align: super; line-height: 0; margin-left: .04em; }
.ih-sub { margin: 0; font-family: var(--display); font-size: 1.55rem; font-weight: 700; line-height: 1.25; }
.ih-em { margin: 0; display: grid; gap: 2px; font-size: 1.2rem; font-weight: 700; line-height: 1.35; color: #e7c27a; }
.ih-lead { margin: 0; font-size: 1.14rem; max-width: 46ch; color: rgba(255,250,241,.9); }
.ih-lead b { color: var(--paper); }
.ih-points { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 10px; max-width: 46ch; }
.ih-points b { color: #e7c27a; }
.ih-points li { display: flex; gap: 10px; align-items: flex-start; }
.ih-points svg { flex: none; margin-top: 2px; color: var(--gold); }
.ih-goals { align-self: stretch; margin-top: 8px; padding-top: 18px; border-top: 1px solid rgba(255,250,241,.18); display: grid; gap: 8px; justify-items: start; }
.ih-goals h2 { font-size: 1.45rem; color: var(--paper); }
.ih-goals p { margin: 0; max-width: 46ch; color: rgba(255,250,241,.9); }
.ih-goals .btn { margin-top: 6px; padding: 13px 22px; font-size: 1.02rem; }

/* Map: the SVG is the picture; the labels sit on top as HTML, placed in % of the 560 x 300 picture. */
.ih-map { position: relative; }
.ih-map svg { display: block; width: 100%; height: auto; border-radius: 14px; }
.ih-label { position: absolute; white-space: nowrap; font-size: 17px; font-weight: 700; line-height: 1; padding: 7px 13px; border-radius: 999px; color: var(--paper); }
.ih-now { left: 12.5%; top: 75.3%; transform: translate(-50%, calc(-100% - 6px)); background: var(--wine); }
.ih-step { padding: 4px 10px; font-size: 15px; background: rgba(255,250,241,.14); transform: translateX(-50%); }
.ih-s1 { left: 32.5%; top: 73.3%; }
.ih-s2 { left: 67.7%; top: 49.7%; }
.ih-flag { left: 92.4%; top: 15.7%; transform: translate(-50%, -50%); padding: 0; font-family: var(--display); font-size: 13px; font-weight: 800; }
.ih-goal { left: 84.6%; top: 40.7%; transform: translateX(-60%); background: var(--teal); }
.ih-back { left: 47.9%; top: 79%; padding: 4px 0; color: #e7a7b5; }

/* Sample feedback card */
.ih-card { width: min(100%, 470px); margin-left: auto; background: var(--paper); color: var(--navy); border-radius: 14px; padding: 18px 20px; box-shadow: 0 24px 50px rgba(8,14,30,.38); transform: rotate(-1.2deg); display: grid; gap: 14px; }
.ih-card-head { display: flex; align-items: center; gap: 14px; }
.ih-card-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.ih-card h2 { font-size: 1.3rem; margin-top: 6px; }
.ih-sample { margin: 0; display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #ece6da; padding: 2px 9px; border-radius: 999px; }
.ih-overall { display: flex; align-items: center; gap: 10px; }
.ih-overall span { display: grid; text-align: right; line-height: 1.25; font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ih-overall span b { font-size: .82rem; color: var(--teal); text-transform: none; letter-spacing: 0; }
.ih-overall strong { width: 62px; height: 62px; border-radius: 50%; border: 3px solid var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 1.6rem; }
.ih-skills { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ih-skills li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; }
.ih-skills span { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; }
.ih-skills b { font-family: var(--display); font-size: 1.35rem; line-height: 1.2; }
.ih-skills .ih-low b { color: var(--wine); }
.ih-card:has(#ih-w:checked) .ih-sk-w, .ih-card:has(#ih-s:checked) .ih-sk-s { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: var(--cream); }
.ih-tabs { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ih-tabs input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ih-tabs label { border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .86rem; line-height: 1; padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.ih-tabs label:hover { color: var(--navy); border-color: #c9b99c; }
.ih-tabs input:checked + label { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.ih-tabs input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }
.ih-scale { margin-left: auto; font-size: .8rem; color: var(--muted); }
.ih-panel { display: grid; gap: 14px; }
.ih-card .ih-ps, .ih-card:has(#ih-s:checked) .ih-pw { display: none; }
.ih-card:has(#ih-s:checked) .ih-ps { display: grid; }
.ih-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.ih-row { display: grid; gap: 4px; }
.ih-row-head { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ih-crit { font-weight: 700; font-size: .95rem; }
.ih-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; color: var(--wine); background: #f3dde2; padding: 1px 8px 1px 6px; border-radius: 999px; white-space: nowrap; }
.ih-band { margin-left: auto; font-family: var(--display); font-size: 1.15rem; }
.ih-band.b5 { color: var(--wine); } .ih-band.b7 { color: #1f5f5d; }
.ih-bar { height: 7px; background: #ece6da; border-radius: 999px; overflow: hidden; }
.ih-bar span { display: block; height: 100%; border-radius: 999px; }
.ih-bar .b5 { width: 55.6%; background: var(--wine); }
.ih-bar .b6 { width: 66.7%; background: var(--gold); }
.ih-bar .b7 { width: 77.8%; background: var(--teal); }
.ih-note { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.ih-next { margin: 0; display: flex; gap: 10px; align-items: flex-start; background: #e6f0ef; border-left: 4px solid var(--teal); border-radius: 8px; padding: 10px 12px; font-size: .9rem; line-height: 1.45; }
.ih-next svg { flex: none; margin-top: 2px; color: var(--teal); }
.ih-next b { color: #1f5f5d; }
@media (max-width: 560px) {
  .ih { padding: 32px 18px 22px; }
  .ih-goals { justify-items: stretch; }
  .ih-goals .btn { justify-content: center; }
  .ih-sub { font-size: 1.35rem; }
  .ih-label { font-size: 14px; padding: 6px 10px; }
  .ih-step { font-size: 12px; padding: 3px 8px; }
  .ih-flag { display: none; }
  .ih-goal { top: 5%; transform: translateX(-100%); }  /* above the 7.0 label */
  .ih-card { transform: none; padding: 16px 14px; }
  .ih-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ih-skills li { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 6px 10px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.land-section { display: grid; gap: 14px; }
.land-section > header { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 8px; align-content: start; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--terra); }
.card .thumb { aspect-ratio: 16 / 9; border-radius: 8px; background: #e9dfcd; object-fit: cover; width: 100%; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, calc((100% - 32px) / 3)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.carousel > * { scroll-snap-align: start; }
@media (max-width: 700px) { .carousel { grid-auto-columns: 85%; } }
.tag { display: inline-block; font-size: .78rem; border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; color: var(--muted); text-decoration: none; }
.tag.on { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.article { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.article .cover { width: 100%; border-radius: 12px; }
.cta-box { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 22px; text-align: center; display: grid; gap: 10px; justify-items: center; }

/* Share links (Flow 2) */
.qr svg { width: 100%; height: auto; display: block; background: #fff; }

/* Lesson blocks (#16, #18): every block gets the same red or green outline after a check. */
.gap.wrong { background: rgba(122, 35, 56, .08); }
.gap.right { background: rgba(42, 122, 120, .08); }
select.gap { width: auto; min-width: 120px; border: 2px solid var(--navy); border-radius: 6px; padding: 2px 6px; text-align: left; }
select.gap.right { border-color: var(--teal); }
select.gap.wrong { border-color: var(--wine); }
.gap-mark { font-weight: 700; margin-left: 2px; }
.gap-mark.right { color: var(--teal); }
.gap-mark.wrong { color: var(--wine); }
.question-box.right { border: 2px solid var(--teal); }
.question-box.wrong { border: 2px solid var(--wine); }
/* #45: empty answers before "Check my answers", and the Score and Tries box */
.question-box.unanswered { border: 2px solid var(--wine); }
.question-box.unanswered::after { content: "This has not been answered. Are you sure?"; display: block; margin-top: 8px; color: var(--wine); font-weight: 700; }
.gap.unanswered { border-color: var(--wine); background: rgba(122, 35, 56, .08); }
.unanswered-note { color: var(--wine); font-weight: 700; }
.score-box { display: inline-flex; gap: 18px; margin-left: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; vertical-align: middle; }
.word-count.in-range { color: var(--teal); font-weight: 600; }
.word-count.over { color: var(--wine); font-weight: 600; }
/* Audio and listening blocks (24 Nov): one frame holds the player and its questions. */
.listening { border: 2px solid var(--navy); border-radius: 12px; padding: 16px 18px; margin: 20px 0; background: var(--paper); }
.listening .question-box { background: #fff; }
.audio-player { display: grid; gap: 6px; }
.audio-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #ece6da; border-radius: 8px; padding: 8px 12px; }
.audio-bar { flex: 1; min-width: 120px; height: 6px; border-radius: 99px; background: #d6ccb8; overflow: hidden; }
.audio-bar span { display: block; height: 100%; width: 0; background: var(--navy); }
.audio-left { margin: 0; font-size: .9rem; }
.audio-player .btn:disabled { opacity: .45; cursor: not-allowed; }
.transcript { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.transcript summary { font-weight: 600; cursor: pointer; }
.pager .locked { opacity: .55; cursor: not-allowed; }
.gap-wrap { white-space: nowrap; }
.question-box textarea { width: 100%; }
.question-box input[type="text"], .question-box input:not([type]) { width: 100%; max-width: 520px; }

/* Matching box; .puzzle-scroll also holds the scope-and-sequence tables */
.puzzle-scroll { overflow-x: auto; margin: 4px 0 10px; }
.puzzle-pairs td { padding: 6px 12px 6px 0; vertical-align: middle; }
.puzzle-pairs select { width: auto; min-width: 180px; }
.pager > a, .pager > form { align-self: flex-start; }

/* Scope and sequence: the uploaded spreadsheet, shown as it is */
.scope-table { border-collapse: collapse; font-size: .9rem; }
.scope-table td { border: 1px solid var(--line); padding: 4px 8px; vertical-align: top; white-space: pre-wrap; }

/* Course outline in the builder (#31, #36) */
.outline-weeks { list-style: none; padding: 0; margin: 0; }
.outline-weeks > li { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; background: var(--paper); }
.outline-lessons { list-style: none; padding: 0; margin: 8px 0; min-height: 2.2em; }
.outline-lessons li { padding: 4px 0; }
.outline-lessons:empty::before { content: "No lessons yet. Add one, or drag one here."; color: var(--muted); font-size: .9rem; }
.drag-handle { cursor: grab; color: var(--muted); padding: 0 4px; user-select: none; }
.sortable-ghost { opacity: .4; }
details.rename summary { cursor: pointer; display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 2px 10px; font-size: .9rem; }
details.rename[open] { flex-basis: 100%; }
details.rename input { margin-top: 6px; max-width: 420px; }

/* Tutoring (23 Nov) */
.tutor-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tutor-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.tutor-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--cream); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-size: 2rem; }
.tutor-photo.big { width: 160px; height: 160px; font-size: 3rem; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.pack { display: grid; gap: 6px; align-content: start; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.pack b { font-family: var(--display); font-size: 1.2rem; }
.pack .price { font-family: var(--display); font-size: 1.6rem; font-weight: 700; }
.pack .btn { justify-content: center; margin-top: 6px; }
