/* ══════════════════════════════════════════════════════════════════
   A CATHOLIC LATIN PRIMER — /topics/catholic-latin-primer
   Loaded only by that page. Everything here is scoped under .clp-page
   so the primer's typography cannot leak into the shared stylesheet's
   components, and the page still inherits every token from styles.css.

   The primer is a teaching page, not an essay: the reader scans for a
   table, a paradigm, or a prayer far more often than they read it
   straight through. So the visual system is built on three repeating
   objects — the part band, the lesson, and the panel (table, note,
   prayer, vocabulary) — and nothing else. A reader who learns those
   three shapes in Part I can navigate the remaining six parts without
   looking at the page twice.
   ══════════════════════════════════════════════════════════════════ */

.clp-page{
  --clp-w:860px;              /* wider than --measure: the tables need it */
  --clp-narrow:700px;         /* prose that is meant to be read, not scanned */
  --clp-parch:#f3eee3;
  --clp-parch-2:#ece4d4;
  --clp-rule-soft:rgba(154,122,46,.22);
  --clp-tint:rgba(154,122,46,.045);
}

/* The masthead — the interior of St Peter's dome, layered by .pagehead-image
   over the dark base from .pagehead-dark. The crop holds the oculus just above
   the middle of the band, so its light falls behind the headline as a halo and
   the ribs radiate symmetrically to both edges. The dome carries Sixtus V's
   inscription around the lantern, which suits a page about Latin. */
.clp-head{
  --pagehead-image:url("images/catholic-latin-primer-masthead.webp");
  --pagehead-position:center 48%;
  --pagehead-position-mobile:center 50%;
  --pagehead-veil:linear-gradient(180deg,rgba(26,18,11,.52) 0%,rgba(26,18,11,.70) 70%,rgba(26,18,11,.90) 100%);
}
.clp-head .clp-head-latin{
  font-family:var(--head);
  font-style:italic;
  font-size:clamp(17px,2.2vw,21px);
  color:var(--champagne);
  margin:14px auto 0;
  max-width:34rem;
}

/* ── Wrappers ───────────────────────────────────────────────────── */
.clp-wrap{max-width:var(--clp-w);margin:0 auto;padding:0 32px;}
.clp-narrow{max-width:var(--clp-narrow);margin:0 auto;}

/* Prose measure is set on the containers, not on `p`, so it reaches the
   paragraphs by inheritance. A blanket `.clp-page p` rule would outrank every
   single-class component below it (.clp-eyebrow, .clp-note-l, .clp-ex-lat …)
   and quietly reset their font sizes; inherited values lose to any rule that
   matches, which is exactly the behaviour wanted here. */
.clp-narrow,
.clp-lesson,
.clp-prayer-block{font-size:19px;line-height:1.62;}
.clp-narrow p + p,
.clp-lesson > p + p,
.clp-prayer-block > p + p{margin-top:16px;}
.clp-page em{font-style:italic;}

/* ── Opening ────────────────────────────────────────────────────── */
.clp-open{padding:52px 0 10px;}
/* styles.css resets every margin to zero, so headings outside the lesson
   components need their own spacing declared. */
.clp-open h2{
  font-family:var(--head);font-size:clamp(26px,3.6vw,34px);
  line-height:1.14;margin:0 0 16px;
}

.clp-epigraph{
  max-width:38rem;margin:0 auto 44px;text-align:center;
  padding:26px 22px;
  border-top:1px solid var(--clp-rule-soft);
  border-bottom:1px solid var(--clp-rule-soft);
}
.clp-epigraph p{
  font-family:var(--head);font-style:italic;
  font-size:clamp(20px,2.6vw,25px);line-height:1.42;color:var(--ink);
}
.clp-epigraph cite{
  display:block;margin-top:14px;font-family:var(--display);font-style:normal;
  font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--gold-deep);
}

/* The four promises of the primer — what the reader will be able to do. */
.clp-promise{
  list-style:none;display:grid;gap:12px;margin:30px 0 0;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}
.clp-promise li{
  background:var(--paper-card);border:1px solid var(--rule);border-radius:3px;
  padding:16px 18px 18px;
}
.clp-promise b{
  display:block;font-family:var(--display);font-size:11px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--gold-deep);font-weight:600;margin-bottom:7px;
}
.clp-promise span{font-family:var(--head);font-size:18px;line-height:1.4;color:var(--ink);display:block;}

/* ── The seven parts, as jump chips ─────────────────────────────── */
.clp-parts{
  list-style:none;display:grid;gap:10px;margin:34px 0 0;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
}
.clp-parts a{
  display:flex;align-items:baseline;gap:12px;height:100%;
  padding:13px 16px;background:var(--paper-card);
  border:1px solid var(--rule);border-radius:3px;
  color:var(--ink);
  transition:border-color .2s,box-shadow .2s,transform .2s,background-color .2s;
}
.clp-parts a:hover{
  border-color:var(--gold);background:#fff;transform:translateY(-2px);
  box-shadow:0 4px 18px rgba(154,122,46,.14);
}
.clp-parts .n{
  font-family:var(--display);font-size:12px;letter-spacing:.1em;
  color:var(--gold);flex:none;min-width:1.9em;
}
.clp-parts .t{font-family:var(--head);font-size:19px;line-height:1.2;}

/* ── Part band — the chapter break ──────────────────────────────── */
.clp-band{
  margin:78px 0 0;padding:46px 0 44px;
  background:
    radial-gradient(ellipse at 50% 22%, rgba(201,168,90,.15), transparent 62%),
    linear-gradient(180deg,var(--espresso) 0%, #251910 58%, var(--espresso) 100%);
  border-top:1px solid rgba(201,162,75,.26);
  border-bottom:1px solid rgba(201,162,75,.26);
  text-align:center;
}
.clp-band-num{
  display:block;font-family:var(--display);font-size:12px;letter-spacing:.34em;
  text-transform:uppercase;color:var(--champagne);margin-bottom:14px;
}
.clp-band h2{
  font-family:var(--display);font-weight:500;
  font-size:clamp(24px,4vw,38px);letter-spacing:.05em;color:#f5ecd6;
  margin:0;
}
.clp-band p{
  font-family:var(--head);font-style:italic;font-size:19px;
  color:var(--muted-dark);max-width:32rem;margin:14px auto 0;
}

/* ── Lesson ─────────────────────────────────────────────────────── */
.clp-section{padding:44px 0 0;}
.clp-lesson{
  padding:34px 0 38px;
  border-bottom:1px solid var(--rule);
}
.clp-lesson:last-child{border-bottom:none;}
.clp-eyebrow{
  font-family:var(--display);font-size:11px;letter-spacing:.2em;
  text-transform:uppercase;color:var(--gold-deep);margin-bottom:9px;
}
.clp-lesson > h3,.clp-prayer-block > h3{
  font-family:var(--head);font-size:clamp(25px,3.4vw,33px);
  line-height:1.14;margin:0 0 4px;
}
.clp-lesson-latin{
  font-family:var(--head);font-style:italic;font-size:19px;color:var(--gold-deep);
  margin:0 0 18px;
}
/* Its own bottom margin is the gap; the generic p + p rule would double it. */
.clp-lesson-latin + p{margin-top:0;}
.clp-lesson h4,.clp-h4{
  font-family:var(--display);font-size:12.5px;font-weight:600;letter-spacing:.16em;
  text-transform:uppercase;color:var(--gold-deep);
  margin:34px 0 12px;
}
.clp-lesson h4 em{font-family:var(--head);font-size:16px;letter-spacing:.04em;text-transform:none;color:var(--muted);}

/* ── Tables ─────────────────────────────────────────────────────── */
.clp-tw{margin:18px 0 6px;}
.clp-table{width:100%;border-collapse:collapse;background:var(--paper-card);}
.clp-table caption{
  caption-side:top;text-align:left;
  font-family:var(--display);font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--muted);padding:0 0 8px;
}
.clp-table th{
  font-family:var(--display);font-size:10.5px;font-weight:600;letter-spacing:.13em;
  text-transform:uppercase;color:var(--gold-deep);text-align:left;
  padding:11px 14px;border-bottom:2px solid var(--rule);
  background:rgba(154,122,46,.06);
}
.clp-table td{
  font-family:var(--body);font-size:17.5px;line-height:1.45;
  padding:11px 14px;border-bottom:1px solid var(--rule);vertical-align:top;
}
.clp-table tbody tr:nth-child(even) td{background:var(--clp-tint);}
.clp-table tbody tr:last-child td{border-bottom:none;}
/* First column carries the Latin in nearly every table on this page. */
.clp-table td:first-child{
  font-family:var(--head);font-size:19px;font-weight:600;color:var(--ink);
}
.clp-table .clp-en{font-style:italic;color:var(--muted);}
.clp-table .clp-say{font-family:var(--head);font-style:italic;color:var(--gold-deep);}
.clp-table .clp-g{
  font-family:var(--display);font-size:10px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted);
}

/* Paradigms: the case name is a label, not a word of Latin. */
.clp-table--decl td:first-child{
  font-family:var(--display);font-size:11px;font-weight:600;letter-spacing:.11em;
  text-transform:uppercase;color:var(--gold-deep);white-space:nowrap;
  padding-top:14px;
}
.clp-table--decl td{font-family:var(--head);font-size:20px;}
.clp-table--decl{max-width:34rem;}

@media(max-width:660px){
  /* Stacked cards. Every cell carries its column name in data-l, written
     by the page's own markup, so the header row can be dropped entirely
     without the values losing their meaning. */
  .clp-table,.clp-table thead,.clp-table tbody,.clp-table tr,.clp-table th,.clp-table td{display:block;}
  .clp-table{background:none;}
  .clp-table thead{display:none;}
  .clp-table tr{
    background:var(--paper-card);border:1px solid var(--rule);border-radius:3px;
    padding:12px 14px 13px;margin-bottom:10px;
  }
  .clp-table tbody tr:nth-child(even) td{background:none;}
  .clp-table td{padding:4px 0;border:none;}
  .clp-table tbody tr:last-child td{border-bottom:none;}
  .clp-table td:empty{display:none;}
  .clp-table td::before{
    content:attr(data-l);display:block;
    font-family:var(--display);font-size:9.5px;letter-spacing:.13em;text-transform:uppercase;
    color:var(--muted);margin-bottom:1px;
  }
  .clp-table td:first-child::before{content:none;}
  .clp-table td:first-child{font-size:21px;padding-bottom:6px;}
  .clp-table--decl td:first-child{font-size:11px;}
  .clp-table--decl td{font-size:19px;}
}

/* ── Notes, tips, and the boxes that interrupt ──────────────────── */
.clp-note{
  margin:24px 0;padding:18px 22px;
  background:var(--paper-card);
  border:1px solid var(--rule);
  border-left:3px solid var(--gold);
  border-radius:0 3px 3px 0;
}
.clp-note p{font-size:18px;line-height:1.56;}
.clp-note p + p{margin-top:12px;}
.clp-note-l{
  font-family:var(--display);font-size:10.5px;letter-spacing:.17em;text-transform:uppercase;
  color:var(--gold-deep);margin-bottom:7px;
}
/* Notes that point at something the reader will hear at Mass are keyed to
   the day's liturgical colour, so the page quietly agrees with the rest
   of the site's theming. */
.clp-note--altar{border-left-color:var(--liturgical-accent,var(--gold));}
.clp-note--altar .clp-note-l{color:var(--liturgical-accent,var(--gold-deep));}
.clp-note--altar{background:linear-gradient(90deg,rgba(154,122,46,.05),var(--paper-card) 40%);}

/* ── Pronunciation practice ─────────────────────────────────────── */
.clp-sounds{
  list-style:none;display:grid;gap:10px;margin:18px 0 0;
  grid-template-columns:repeat(auto-fill,minmax(168px,1fr));
}
.clp-sounds li{
  background:var(--paper-card);border:1px solid var(--rule);border-radius:3px;
  padding:13px 15px 14px;text-align:center;
}
.clp-sounds .lat{display:block;font-family:var(--head);font-size:22px;font-weight:600;line-height:1.15;}
.clp-sounds .say{display:block;font-family:var(--head);font-style:italic;font-size:15px;color:var(--gold-deep);margin-top:4px;}
.clp-sounds .en{
  display:block;font-family:var(--display);font-size:9.5px;letter-spacing:.13em;
  text-transform:uppercase;color:var(--muted);margin-top:7px;
}

/* ── Prayers ────────────────────────────────────────────────────── */
.clp-prayer-block{padding:38px 0 40px;border-bottom:1px solid var(--rule);}
.clp-prayer-block:last-child{border-bottom:none;}

.clp-latin{
  margin:20px 0 0;padding:28px 30px;
  background:linear-gradient(180deg,var(--clp-parch),var(--clp-parch-2));
  border:1px solid var(--clp-rule-soft);border-radius:3px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.5);
  text-align:center;
}
.clp-latin p{
  font-family:var(--head);font-size:clamp(20px,2.7vw,25px);line-height:1.5;
  color:#241d18;
}
.clp-latin p + p{margin-top:10px;}
.clp-latin--left{text-align:left;}
.clp-latin--left p{font-size:clamp(19px,2.4vw,22px);}

.clp-trans{
  margin:16px 0 0;font-family:var(--head);font-style:italic;
  font-size:19px;line-height:1.55;color:var(--muted);
}
.clp-trans b{
  font-family:var(--display);font-style:normal;font-size:10.5px;letter-spacing:.16em;
  text-transform:uppercase;color:var(--gold-deep);display:block;margin-bottom:6px;font-weight:600;
}

/* Line-by-line: Latin beside English, with the grammar underneath. */
.clp-lines{list-style:none;margin:22px 0 0;border-top:1px solid var(--rule);}
.clp-lines li{
  display:grid;gap:2px 22px;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  padding:13px 14px 14px;
  border-bottom:1px solid var(--rule);
}
.clp-lines li:nth-child(even){background:var(--clp-tint);}
.clp-lines .lat{font-family:var(--head);font-size:20px;font-weight:600;line-height:1.3;}
.clp-lines .en{font-family:var(--body);font-size:17.5px;line-height:1.4;color:var(--ink);}
.clp-lines .note{
  grid-column:1/-1;margin-top:7px;
  font-family:var(--body);font-size:15.5px;line-height:1.5;color:var(--muted);
  padding-left:12px;border-left:2px solid var(--clp-rule-soft);
}
@media(max-width:620px){
  .clp-lines li{grid-template-columns:1fr;gap:3px;}
  .clp-lines .en{color:var(--muted);font-style:italic;}
}

/* Word-by-word glosses, as a run of inline pairs rather than a list. */
.clp-gloss{list-style:none;margin:18px 0 0;display:grid;gap:8px;}
.clp-gloss li{
  font-family:var(--body);font-size:17.5px;line-height:1.45;
  padding-left:15px;position:relative;
}
.clp-gloss li::before{
  content:"";position:absolute;left:0;top:.62em;
  width:5px;height:5px;border-radius:50%;background:var(--gold);opacity:.55;
}
.clp-gloss .lat{font-family:var(--head);font-size:19px;font-weight:600;}
.clp-gloss .sep{color:var(--gold);padding:0 5px;}

/* ── Vocabulary ─────────────────────────────────────────────────── */
.clp-vocab{
  display:grid;gap:10px;margin:20px 0 0;
  grid-template-columns:repeat(auto-fill,minmax(232px,1fr));
}
.clp-vocab > div{
  background:var(--paper-card);border:1px solid var(--rule);border-radius:3px;
  padding:14px 16px 15px;
}
.clp-vocab dt{
  font-family:var(--head);font-size:21px;font-weight:600;line-height:1.2;color:var(--ink);
}
.clp-vocab dt .g{
  font-family:var(--display);font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted);margin-left:7px;vertical-align:1px;
}
.clp-vocab dd{font-family:var(--body);font-size:17px;line-height:1.4;color:var(--ink);margin-top:3px;}
.clp-vocab dd.in{
  font-family:var(--head);font-style:italic;font-size:15.5px;color:var(--gold-deep);
  margin-top:7px;padding-top:7px;border-top:1px solid var(--clp-rule-soft);
}

/* ── Exercises ──────────────────────────────────────────────────── */
.clp-ex{
  margin:20px 0 0;padding:22px 24px 24px;
  background:var(--paper-card);border:1px solid var(--rule);border-radius:3px;
}
.clp-ex-ref{
  font-family:var(--display);font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--gold-deep);margin-bottom:10px;
}
.clp-ex-lat{font-family:var(--head);font-size:clamp(20px,2.5vw,24px);line-height:1.4;color:var(--ink);}
.clp-ex-en{font-family:var(--head);font-style:italic;font-size:18px;color:var(--muted);margin-top:9px;}

.clp-det{margin-top:16px;border-top:1px solid var(--clp-rule-soft);padding-top:14px;}
.clp-det > summary{
  display:inline-flex;align-items:center;gap:8px;cursor:pointer;list-style:none;
  font-family:var(--display);font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--gold-deep);
}
.clp-det > summary::-webkit-details-marker{display:none;}
.clp-det > summary::after{
  content:"";width:6px;height:6px;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:translateY(-2px) rotate(45deg);transition:transform .2s ease;
}
.clp-det[open] > summary::after{transform:translateY(1px) rotate(-135deg);}
.clp-det > summary:hover{color:var(--gold);}
.clp-det .clp-gloss{margin-top:14px;}

/* A run of numbered sentences to translate. */
.clp-drill{list-style:none;counter-reset:drill;margin:18px 0 0;}
.clp-drill li{
  counter-increment:drill;display:grid;gap:3px 14px;
  grid-template-columns:auto minmax(0,1fr);
  padding:11px 0;border-bottom:1px solid var(--rule);
}
.clp-drill li:last-child{border-bottom:none;}
.clp-drill li::before{
  content:counter(drill);grid-row:1/span 2;
  font-family:var(--display);font-size:12px;color:var(--gold);padding-top:.45em;min-width:1.4em;
}
.clp-drill .lat{font-family:var(--head);font-size:20px;font-weight:600;}
.clp-drill .ref{font-family:var(--body);font-size:15px;color:var(--muted);font-style:italic;}
.clp-drill .en{font-family:var(--body);font-size:17px;color:var(--muted);}

/* ── Next steps ─────────────────────────────────────────────────── */
/* Child selectors throughout, not descendant ones: a step can contain a
   nested .clp-res list, and a descendant selector would give those items a
   numbered circle of their own — landing on top of their titles — as well as
   advancing the step counter past them. */
.clp-steps{list-style:none;counter-reset:step;margin:22px 0 0;}
.clp-steps > li{
  counter-increment:step;position:relative;
  padding:0 0 26px 62px;
}
.clp-steps > li:last-child{padding-bottom:0;}
.clp-steps > li::before{
  content:counter(step);
  position:absolute;left:0;top:-2px;
  width:42px;height:42px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--display);font-size:15px;color:var(--gold-deep);
  background:var(--paper-card);border:1px solid var(--rule);
}
.clp-steps > li::after{
  content:"";position:absolute;left:21px;top:44px;bottom:8px;width:1px;
  background:var(--rule);
}
.clp-steps > li:last-child::after{display:none;}
.clp-steps > li > h4{
  font-family:var(--head);font-size:22px;font-weight:600;letter-spacing:0;
  text-transform:none;color:var(--ink);margin:0 0 6px;
}
.clp-steps > li > p{font-size:18px;}

.clp-res{list-style:none;margin:16px 0 0;display:grid;gap:9px;}
.clp-res li{
  padding:12px 16px;background:var(--paper-card);
  border:1px solid var(--rule);border-radius:3px;
}
.clp-res .t{font-family:var(--head);font-size:19px;font-weight:600;}
.clp-res .n{font-family:var(--body);font-size:16px;color:var(--muted);display:block;margin-top:2px;}

/* ── Flashcards ─────────────────────────────────────────────────── */
/* The trainer built by latin-flashcards.js. The markup is generated, so
   every class here is created by that script; the only thing the page
   itself supplies is #clp-flashcards and its no-script fallback. */
.clp-fc{margin:26px 0 0;}

.clp-fc-decks{
  display:flex;flex-wrap:wrap;gap:8px;
  margin:0 0 22px;
}
.clp-fc-deck{
  display:flex;align-items:center;gap:8px;
  padding:8px 13px;
  background:var(--paper-card);
  border:1px solid var(--rule);border-radius:3px;
  font-family:var(--body);font-size:15.5px;color:var(--muted);
  cursor:pointer;
  transition:border-color .15s ease,color .15s ease,background-color .15s ease;
}
.clp-fc-deck:hover{border-color:var(--gold);color:var(--ink);}
.clp-fc-deck:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
.clp-fc-deck.is-on{
  background:var(--clp-tint);
  border-color:var(--gold);
  color:var(--ink);
}
.clp-fc-deck-n{font-family:var(--head);font-weight:600;font-size:17px;}
.clp-fc-deck-c{
  font-family:var(--display);font-size:10px;letter-spacing:.08em;
  color:var(--muted);
  padding:2px 6px;
  background:rgba(154,122,46,.1);border-radius:2px;
}
.clp-fc-deck.is-on .clp-fc-deck-c{background:rgba(154,122,46,.2);color:var(--gold-deep);}
/* A deck cleared at least once, remembered from a previous visit. */
.clp-fc-deck.is-done .clp-fc-deck-n::after{
  content:"✓";
  margin-left:7px;
  font-family:var(--body);
  color:var(--gold);
}

.clp-fc-stage{max-width:620px;}

.clp-fc-count{
  font-family:var(--display);font-size:10.5px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--muted);
  margin:0 0 8px;
}

.clp-fc-bar{
  height:3px;
  background:var(--clp-rule-soft);
  border-radius:2px;
  overflow:hidden;
  margin:0 0 16px;
}
.clp-fc-fill{
  display:block;height:100%;width:0;
  background:var(--liturgical-accent,var(--gold));
  transition:width .25s ease;
}

/* The card. One button holding both faces, stacked in a single grid cell
   so the box is as tall as the longer of the two and does not resize when
   it turns. The hidden face is visibility:hidden rather than merely
   transparent, so the answer cannot be read by selecting the text. */
.clp-fc-card{
  position:relative;
  display:grid;grid-template-columns:1fr;
  align-items:center;justify-items:center;
  width:100%;min-height:230px;
  padding:34px 26px 46px;
  background:
    linear-gradient(180deg,var(--paper-card) 0%,var(--clp-parch) 100%);
  border:1px solid var(--rule);border-radius:4px;
  box-shadow:0 1px 14px rgba(36,26,16,.06);
  font-family:var(--head);text-align:center;
  cursor:pointer;
  transition:border-color .15s ease,box-shadow .15s ease;
}
.clp-fc-card:hover{border-color:var(--gold);box-shadow:0 2px 18px rgba(36,26,16,.09);}
.clp-fc-card:focus-visible{outline:2px solid var(--gold);outline-offset:3px;}
.clp-fc-card::before{
  content:"";position:absolute;inset:5px;
  border:1px solid var(--clp-rule-soft);border-radius:3px;
  pointer-events:none;
}

.clp-fc-front,
.clp-fc-back{
  grid-area:1/1;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:10px;
  transition:opacity .18s ease;
}
.clp-fc-front{
  font-size:clamp(26px,4.4vw,38px);font-weight:600;line-height:1.2;
  color:var(--ink);
}
.clp-fc-back{opacity:0;visibility:hidden;}
.clp-fc-stage.is-flipped .clp-fc-front{opacity:0;visibility:hidden;}
.clp-fc-stage.is-flipped .clp-fc-back{opacity:1;visibility:visible;}

.clp-fc-answer{
  font-size:clamp(23px,3.6vw,31px);font-weight:600;line-height:1.24;
  color:var(--ink);
}
.clp-fc-hint{
  font-family:var(--head);font-style:italic;font-size:17px;line-height:1.4;
  color:var(--gold-deep);
  max-width:26rem;
}

.clp-fc-tap{
  position:absolute;left:0;right:0;bottom:18px;
  font-family:var(--display);font-size:9.5px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--muted);
}

/* The finished state: the card keeps its shape, the cross sits alone. */
.clp-fc-stage.is-cleared .clp-fc-card{cursor:default;opacity:.92;}
.clp-fc-stage.is-cleared .clp-fc-front{font-size:40px;color:var(--gold);}
.clp-fc-stage.is-cleared .clp-fc-tap{
  font-family:var(--head);font-style:italic;font-size:16px;
  letter-spacing:0;text-transform:none;color:var(--muted);
}

.clp-fc-judge{display:flex;gap:10px;margin:14px 0 0;}
.clp-fc-btn{
  flex:1;
  padding:13px 18px;
  border:1px solid var(--rule);border-radius:3px;
  background:var(--paper-card);
  font-family:var(--display);font-size:11.5px;letter-spacing:.16em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease;
}
.clp-fc-btn:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
.clp-fc-btn:disabled{opacity:.45;cursor:default;}
.clp-fc-again{color:var(--muted);}
.clp-fc-again:not(:disabled):hover{border-color:var(--muted);color:var(--ink);}
.clp-fc-got{
  color:var(--gold-deep);
  border-color:var(--gold);
  background:var(--clp-tint);
}
.clp-fc-got:not(:disabled):hover{background:var(--gold);border-color:var(--gold);color:var(--paper);}

.clp-fc-tools{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0;}
.clp-fc-tool{
  padding:7px 12px;
  background:none;
  border:1px solid var(--clp-rule-soft);border-radius:3px;
  font-family:var(--display);font-size:10px;letter-spacing:.13em;
  text-transform:uppercase;color:var(--muted);
  cursor:pointer;
  transition:border-color .15s ease,color .15s ease,background-color .15s ease;
}
.clp-fc-tool:hover{border-color:var(--gold);color:var(--gold-deep);}
.clp-fc-tool:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
.clp-fc-tool.is-on{background:var(--clp-tint);border-color:var(--gold);color:var(--gold-deep);}

.clp-fc-keys{
  font-family:var(--body);font-size:14px;color:var(--muted);
  margin:16px 0 0;
}
.clp-fc-keys kbd{
  font-family:var(--body);font-size:12.5px;
  padding:2px 6px;margin:0 3px 0 10px;
  background:var(--paper-card);
  border:1px solid var(--rule);border-radius:2px;
  color:var(--ink);
}
.clp-fc-keys kbd:first-child{margin-left:0;}

/* Announced to screen readers only — the visible card is the same text. */
.clp-fc-sr{
  position:absolute;width:1px;height:1px;
  margin:-1px;padding:0;border:0;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;
}

/* The fallback the page ships in the markup, replaced by the script. */
.clp-fc-noscript{
  padding:20px 22px;
  background:var(--paper-card);
  border:1px solid var(--rule);border-radius:3px;
  font-family:var(--head);font-style:italic;font-size:18px;color:var(--muted);
}

/* ── Close ──────────────────────────────────────────────────────── */
.clp-close{
  margin-top:70px;padding:56px 0 52px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(201,168,90,.16), transparent 62%),
    linear-gradient(180deg,var(--espresso) 0%, #251910 60%, var(--espresso) 100%);
  border-top:1px solid rgba(201,162,75,.26);
  text-align:center;
}
.clp-close .clp-eyebrow{color:var(--champagne);}
.clp-close h2{font-family:var(--display);font-weight:500;font-size:clamp(22px,3.4vw,32px);letter-spacing:.04em;color:#f5ecd6;margin:0 0 20px;}
.clp-close p{color:var(--muted-dark);max-width:34rem;margin:0 auto;}
.clp-close p + p{margin-top:16px;}
.clp-close .clp-deo{
  font-family:var(--head);font-style:italic;font-size:clamp(22px,3vw,28px);
  color:var(--champagne);margin-top:32px;
}

.clp-foot{padding:44px 0 60px;text-align:center;}
.clp-seealso{
  font-family:var(--head);font-style:italic;font-size:17px;color:var(--muted);
  margin-top:14px;
}

@media(max-width:560px){
  .clp-wrap{padding:0 20px;}
  .clp-fc-card{min-height:200px;padding:26px 20px 42px;}
  .clp-fc-judge{gap:8px;}
  .clp-fc-keys{display:none;}
  .clp-latin{padding:22px 18px;}
  .clp-ex{padding:18px 16px 20px;}
  .clp-steps > li{padding-left:52px;}
  .clp-steps > li::before{width:36px;height:36px;font-size:13px;}
  .clp-steps > li::after{left:18px;top:38px;}
}

@media(prefers-reduced-motion:reduce){
  .clp-parts a,.clp-det > summary::after{transition:none;}
  .clp-fc-deck,.clp-fc-card,.clp-fc-front,.clp-fc-back,
  .clp-fc-fill,.clp-fc-btn,.clp-fc-tool{transition:none;}
}

@media print{
  .clp-band,.clp-close{
    background:none;border-top:1px solid #ccc;border-bottom:1px solid #ccc;
    padding:18pt 0;margin-top:24pt;
  }
  .clp-band h2,.clp-close h2{color:#000;}
  .clp-band-num,.clp-close .clp-eyebrow{color:#555;}
  .clp-band p,.clp-close p,.clp-close .clp-deo{color:#333;}
  /* An interactive trainer cannot print; the tables it draws from do. */
  .clp-parts,.clp-foot,.clp-fc,.clp-fc-noscript{display:none;}
  .clp-det{border:none;}
  .clp-det > summary{display:none;}
  .clp-det > *:not(summary){display:block !important;}
  .clp-latin{background:none;border:1px solid #ccc;}
}
