/* French course in the Viva Vox identity of the homepage (brand-premium.css):
   wine and ivory, terracotta for actions, champagne as decoration,
   Cormorant Garamond for headings and Manrope for everything else.
   Loaded last on every page of /course-fr-present/ only: the shared
   lesson.css keeps its own look for the other courses. */
:root {
  --navy: #4a2636;
  --navy-2: #61394b;
  --gold: #c9973a;
  --gold-2: #e6cfa4;
  --cream: #faf7f3;
  --cream-2: #eedfd8;
  --ink: #392f32;
  --muted: #65545b;
  --line: #ded0c5;
  --ok: #3f7a57;
  --err: #a94a3b;
  --fr-action: #a94a3b;
  --fr-action-hover: #903d31;
  --fr-accent: #84582a;
  --fr-surface: #fffdfa;
  --fr-serif: 'Cormorant Garamond', Georgia, serif;
  --fr-sans: 'Manrope', system-ui, -apple-system, sans-serif;
}

/* Type. lesson.css names Literata and Inter in many places, so the
   families are set here once for the whole page. */
body { background: var(--cream); color: var(--ink); font-size: 16.5px; line-height: 1.7; }
body, body * { font-family: var(--fr-sans) !important; }
body :is(h1, h2, h3, .lesson-title, .lesson-top .course-name, .fp-card strong,
         .fp-q > summary, .fp-flip-list, .ov-stats strong, .ov-progress-box .pb-text strong,
         .ov-progress-box .pb-pct, .ov-lesson-card h3),
body :is(h1, h2, h3) * { font-family: var(--fr-serif) !important; }
body :is(h1, h2, h3) { font-weight: 500; letter-spacing: 0; }
.lesson-title { font-size: 3rem; font-weight: 500; line-height: 1.1; }
.lesson-title em { color: var(--fr-action); }
.exercise h2, .theory h2, .theory h3, .fold > summary h2 { font-size: 1.75rem; }
.fp-stage-content h3, .fp-outcomes h3, .fp-talk h3 { font-size: 1.5rem; font-weight: 600; }
.fp-q > summary { font-size: 1.15rem; font-weight: 600; }
.fp-flip-list { font-size: 1.15rem; }
.fr-text h3 { font-size: 1.7rem; font-weight: 600; }
.fr-text p { font-size: 1.04rem; }

/* Top bar: ivory, like the homepage header */
.lesson-top { background: rgba(250, 247, 243, .96); color: var(--ink); border-bottom: 1px solid var(--line);
              box-shadow: none; backdrop-filter: saturate(1.2) blur(8px); }
.lesson-top a.back, .lesson-top .breadcrumb a.bc-active { color: var(--navy); }
.lesson-top a.back:hover, .lesson-top .breadcrumb a:hover { background: var(--cream-2); color: var(--navy); }
.lesson-top .breadcrumb a { color: var(--muted); }
.lesson-top .course-name { color: var(--navy); font-size: 1.2rem; font-weight: 600; }
.lesson-top .top-progress { color: var(--muted); }
.lesson-top .progress-bar { background: var(--cream-2); }
.lesson-top .progress-bar span { background: var(--fr-action); }

/* Overview hero */
.ov-hero { background: var(--navy); }
.ov-hero h1 { font-weight: 500; }

/* Shapes: quieter corners, no heavy shadows */
:is(.exercise, .theory, .callout, .fr-text, .fp-stage, .fp-card, .fp-outcomes, .fp-talk,
    .fp-lesson-head, .fp-reference > summary, .teacher-notes, .ov-progress-box, .ov-lesson-card,
    .fp-flip-face, .fp-q, .fp-role, .quiz-item, .sound-key) { border-radius: 6px; }
.fp-photo-q img, .fr-scene img, .dial-shot img { border-radius: 4px; }
.fp-stage, .fp-card, .ov-lesson-card { box-shadow: 0 2px 12px rgba(74, 38, 54, .04); }
.fr-text { background: var(--fr-surface); border-color: var(--line); }
.fr-text b { color: var(--fr-action); }
.callout { background: var(--fr-surface); border-left-color: var(--gold) !important; }
.lesson-eyebrow { background: var(--cream-2); color: var(--navy); }

/* Actions are terracotta, as on the homepage */
:is(.btn-check, .lesson-nav .done-btn, .fp-flip-btn:not(.fp-flip-btn--back), .text-audio-btn) {
  background: var(--fr-action); color: var(--cream); border-radius: 4px; font-weight: 600;
}
:is(.btn-check, .lesson-nav .done-btn, .fp-flip-btn:not(.fp-flip-btn--back), .text-audio-btn):hover {
  background: var(--fr-action-hover); color: var(--cream);
}
.text-audio-btn.playing { background: var(--navy); color: var(--cream); }
.lesson-nav .done-btn.completed { background: var(--ok); }
.lesson-nav a, .fp-tools button, .fp-next { border-radius: 4px; }
.lesson-nav .next { background: var(--navy); }
.btn-retry { border-radius: 4px; }
a { color: var(--navy); }

/* Answers on a dark exercise stay legible on wine */
.quiz-feedback.ok { color: #b9e4c9; }
.quiz-feedback.err { color: #f6c1b6; }
.quiz-feedback.warn { color: #f0d9a8; }

/* Overview cards */
.ov-lesson-card h3 { font-size: 1.45rem; font-weight: 600; }
body .lesson-top .course-name { font-weight: 600; }
.lesson-top .course-name { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* Hover-sound switch: a quiet outline, not a second action colour */
.fl-toggle { background: transparent !important; color: var(--navy) !important; border: 1px solid var(--line) !important; border-radius: 4px !important; }
.fl-toggle[aria-pressed="true"] { background: var(--cream-2) !important; border-color: #d3bfb6 !important; }

/* The reading text and the speaking parts sit straight on the stage page:
   the stage is the only frame */
.fp-stage-content > .fr-text { background: none; border: 0; border-radius: 0; padding: 0; margin: 1.2rem 0; }
.fp-stage-content > .fp-talk { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0;
                               padding: 1.5rem 0 .4rem; margin: 1.5rem 0; }
.fp-stage-content > .fp-talk:first-child { border-top: 0; padding-top: 0; }

/* Compact exercises: one frame, not a frame for every question */
.exercise { padding: 1.4rem 1.5rem 1.2rem; margin: 1.5rem 0; }
.exercise h2 { margin: .2rem 0 .3rem; }
.exercise .task { margin-bottom: .6rem; font-size: .95rem; }
.exercise .ex-num { background: none; padding: 0; border-radius: 0; color: var(--gold-2); opacity: .8;
                    font-size: .72rem; letter-spacing: .12em; }
.exercise .quiz-item { background: none; border: 0; border-top: 1px solid rgba(255,255,255,.12);
                       border-radius: 0; padding: .8rem 0; margin: 0; }
.exercise .quiz-item:first-of-type { border-top: 0; }
.exercise .quiz-item .q { font-size: 1rem; margin-bottom: .5rem; }
.exercise .quiz-options { gap: .4rem; }
.exercise .quiz-options button { padding: .42rem .9rem; border-radius: 4px; font-size: .92rem; }
.exercise .quiz-item input[type=text] { border-radius: 4px; padding: .5rem .7rem; }
.exercise .quiz-feedback { margin-top: .4rem; font-size: .86rem; }
.exercise .quiz-feedback:empty { display: none; }
.exercise .fp-why { margin-top: .3rem; }
.exercise .btn-retry { margin-top: .6rem; padding: .45rem .9rem; border-radius: 4px; font-size: .85rem;
                       color: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.3); }
.exercise .btn-retry:hover { color: #fff; border-color: rgba(255,255,255,.6); }
.exercise .btn-check { margin-top: .6rem; padding: .6rem 1.2rem; }

@media (max-width: 620px) {
  /* Inside a stage, the big blocks run edge to edge: no frame inside a frame */
  .fp-stage-content > :is(.exercise, .theory) {
    margin-left: -.85rem; margin-right: -.85rem; border-radius: 0; border-left: 0; border-right: 0;
  }
  .fp-stage-content > .exercise { padding: 1.1rem .95rem 1rem; }
  .fp-stage-content > .theory { padding: 1rem .95rem; }
  .fp-stage-content > .fp-talk { padding-top: 1.1rem; }
  .exercise h2 { font-size: 1.55rem; }
  .exercise .quiz-item { padding: .7rem 0; }
}

/* Questions to talk about: rows, not boxes */
.fp-qs { gap: 0; border-top: 1px solid var(--line); }
.fp-q { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.fp-q > summary { padding: .65rem 0; }
.fp-q > p { padding: 0 0 .7rem; }

/* Disappearing dialogue */
.fp-vanish { margin: .4rem 0 0; }
.fp-vanish p { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; line-height: 1.6; }
.fp-vanish p:first-child { border-top: 1px solid var(--line); }
.fp-vanish .who { display: inline-block; min-width: 4.6rem; font-weight: 700; color: var(--navy); }
.fp-v-gap { color: transparent; border-bottom: 1.5px solid #c4ada3; user-select: none; }
.fp-vanish.is-names-only .fp-v-line { display: inline-block; min-width: 55%; border-bottom: 1.5px dotted #c4ada3; color: transparent; }
.fp-vanish.is-names-only .fp-v-gap { border: 0; }
.fp-vanish-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; margin-top: .9rem; }
.fp-vanish-more { background: var(--fr-action); color: var(--cream); border: 0; border-radius: 4px; padding: .6rem 1rem; font-weight: 600; cursor: pointer; }
.fp-vanish-more:hover { background: var(--fr-action-hover); }
.fp-vanish-reset { background: none; border: 1px solid var(--line); border-radius: 4px; padding: .55rem .9rem; color: var(--navy); cursor: pointer; }
.fp-vanish-bar button:disabled { opacity: .45; cursor: default; }
.fp-vanish-step { color: var(--muted); font-size: .85rem; }
@media (max-width: 620px) { .fp-vanish .who { display: block; min-width: 0; font-size: .85rem; } }
