/* Case Files, in the homepage identity (brand-premium.css): wine, ivory and
   powder, terracotta only for actions, champagne as decoration. */
.cf-page { background: var(--brand-ivory); min-height: 100vh; }
.cf-wrap { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }
.cf-wide { max-width: 1040px; }
.cf-page [hidden] { display: none !important; }

.cf-top { background: var(--brand-ivory); border-bottom: 1px solid var(--color-border); }
.cf-top-in { max-width: 1040px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cf-top img { display: block; height: 42px; width: auto; }
.cf-top a.cf-back-link { font-size: .85rem; color: var(--brand-wine); }

.cf-link { color: var(--brand-terracotta); text-decoration: underline; text-underline-offset: 3px; }

/* ── hero ── */
.cf-hero { background: linear-gradient(135deg, #3d1f2c 0%, var(--brand-wine) 62%, #61394b 100%); color: var(--brand-ivory); padding: 3.5rem 0 3rem; }
.cf-hero-sm { padding: 2.2rem 0 1.8rem; }
.cf-eyebrow { margin: 0 0 .7rem; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--brand-champagne); }
.brand-premium .cf-hero h1 { color: var(--brand-ivory); font-size: clamp(2.5rem, 6vw, 4rem); margin: 0 0 .7rem; }
.brand-premium .cf-hero-sm h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
.cf-hero h1 em { font-style: italic; color: var(--brand-champagne); }
.cf-lede { max-width: 600px; margin: 0; font-size: 1.05rem; line-height: 1.65; color: rgba(250, 247, 243, .78); }
.cf-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.cf-accent { display: inline-flex; border: 1px solid rgba(200, 182, 154, .55); border-radius: 100px; padding: 2px; }
.cf-accent button { border: 0; background: none; color: var(--brand-ivory); font: inherit; font-size: .8rem; padding: .35rem .85rem; min-height: 36px; border-radius: 100px; cursor: pointer; }
.cf-accent button.on { background: var(--brand-champagne); color: var(--brand-wine); font-weight: 600; }

/* ── the list of cases ── */
.cf-list { list-style: none; margin: 0; padding: 2.5rem 0 4rem; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.cf-case { display: flex; flex-direction: column; height: 100%; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 4px; padding: 1.5rem; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.cf-case:hover { border-color: var(--brand-champagne); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cf-case-no { font-family: var(--font-heading); font-size: 2.3rem; line-height: 1; color: var(--brand-champagne); }
.brand-premium .cf-case h2 { font-size: 1.6rem; color: var(--brand-wine); margin: .5rem 0 .25rem; }
.cf-case-tag { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-terracotta); font-weight: 600; }
.cf-case p { font-size: .93rem; line-height: 1.6; color: var(--color-text-light); margin: .6rem 0 1rem; flex: 1; }
.cf-case-foot { display: flex; justify-content: space-between; font-size: .8rem; color: var(--color-text-light); }
.cf-case-foot b { color: var(--brand-wine); font-weight: 600; }

/* ── the lesson ── */
.cf-steps { display: flex; gap: 4px; padding: 1.2rem 0 .3rem; }
.cf-steps button { flex: 1; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--brand-powder); cursor: pointer; min-width: 0; position: relative; }
.cf-steps button::after { content: ''; position: absolute; inset: -10px 0; }
.cf-steps button.ok { background: var(--brand-champagne); }
.cf-steps button.now { background: var(--brand-terracotta); }
.cf-steps button:disabled { cursor: default; }
.cf-stepname { margin: .2rem 0 1.2rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--brand-terracotta); }
.cf-stage { padding-bottom: 1rem; }
.cf-stage p { margin: 0 0 .8rem; }
.cf-brief { font-weight: 500; color: var(--brand-wine); }
.cf-hook { font-family: var(--font-heading); font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.25; color: var(--brand-wine); margin: .2rem 0 1.6rem !important; }
.cf-hook-sm { font-size: clamp(1.4rem, 3vw, 1.75rem); margin-bottom: 1rem !important; }
.cf-note { font-size: .88rem; color: var(--color-text-light); }

.cf-block { padding: 1.4rem 0; border-top: 1px solid var(--color-border); }
.cf-block:first-of-type { margin-top: 1rem; }
.brand-premium .cf-block h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; line-height: 1.45; color: var(--brand-ink); margin: 0 0 .8rem; }
.cf-q { font-size: 1.05rem; color: var(--brand-ink); }

.cf-words { list-style: none; margin: 0; padding: 0; }
.cf-words li { display: flex; align-items: center; gap: .7rem; padding: .7rem 0; border-top: 1px solid var(--color-border); }
.cf-words strong { font-weight: 600; color: var(--brand-wine); min-width: 7.5rem; }
.cf-words span { color: var(--color-text-light); }

/* player */
.cf-player { display: flex; align-items: center; gap: .9rem; background: var(--brand-wine); color: var(--brand-ivory); padding: .75rem .9rem; border-radius: 4px; margin: .7rem 0 1rem; }
.cf-play { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--brand-terracotta); color: #fff; cursor: pointer; display: grid; place-items: center; }
.cf-play:hover { background: var(--brand-terracotta-hover); }
.cf-player-mid { flex: 1; min-width: 0; }
.cf-player-label { font-size: .8rem; color: rgba(250, 247, 243, .75); margin-bottom: .4rem; }
.cf-bar { position: relative; height: 5px; border-radius: 3px; background: rgba(250, 247, 243, .22); cursor: pointer; }
.cf-bar::after { content: ''; position: absolute; inset: -10px 0; }
.cf-bar span { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--brand-champagne); }
.cf-speed { display: flex; flex: none; }
.cf-speed button { background: none; border: 0; color: rgba(250, 247, 243, .65); font: inherit; font-size: .78rem; min-width: 38px; min-height: 40px; padding: 0 .2rem; cursor: pointer; border-radius: 4px; }
.cf-speed button.on { color: var(--brand-wine); background: var(--brand-champagne); font-weight: 600; }
.cf-sound { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--brand-wine); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.cf-sound:hover { border-color: var(--brand-champagne); }

/* answer box */
.cf-tabs { display: inline-flex; border: 1px solid var(--color-border); border-radius: 100px; padding: 2px; margin-bottom: .6rem; }
.cf-tabs button { border: 0; background: none; font: inherit; font-size: .84rem; color: var(--brand-ink); padding: .3rem .95rem; min-height: 36px; border-radius: 100px; cursor: pointer; }
.cf-tabs button.on { background: var(--brand-wine); color: var(--brand-ivory); }
.cf-answer textarea, .cf-field { width: 100%; box-sizing: border-box; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-surface); padding: .7rem .8rem; font: inherit; font-size: 1rem; color: var(--brand-ink); }
.cf-answer textarea:focus, .cf-field:focus, .cf-gaptext input:focus { outline: 2px solid var(--brand-champagne); outline-offset: 1px; }
.cf-voice { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.cf-rec { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid var(--brand-wine); background: var(--color-surface); color: var(--brand-wine); font: inherit; font-size: .92rem; font-weight: 500; padding: .55rem 1rem; min-height: 44px; border-radius: 100px; cursor: pointer; }
.cf-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--brand-terracotta); }
.is-rec .cf-rec { background: var(--brand-terracotta); border-color: var(--brand-terracotta); color: #fff; }
.is-rec .cf-dot { background: #fff; animation: cf-pulse 1s infinite; }
@keyframes cf-pulse { 50% { opacity: .35; } }
.cf-rec-note { font-size: .84rem; color: var(--color-text-light); }
.cf-rec-done { width: 100%; }
.cf-rec-done audio { width: 100%; max-width: 380px; height: 40px; }
.cf-saved { font-size: .88rem; color: #3f6b4b; font-weight: 500; }

/* yes/no, options */
.cf-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 0; }
.cf-row p { margin: 0; }
.cf-yesno, .cf-options { display: flex; flex-wrap: wrap; gap: .45rem; }
.cf-yesno { flex: none; }
.cf-yesno button, .cf-options button { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--brand-ink); font: inherit; font-size: .94rem; min-height: 44px; padding: .4rem .95rem; border-radius: 4px; cursor: pointer; text-align: left; }
.cf-yesno button:hover:not(:disabled), .cf-options button:hover:not(:disabled) { border-color: var(--brand-wine); }
.cf-yesno button:disabled, .cf-options button:disabled { cursor: default; color: var(--brand-ink); }
.cf-page button.right { background: #e7f1e6; border-color: #79a57f; color: #2f5a39; }
.cf-page button.wrong { background: #f7e4df; border-color: var(--brand-terracotta); color: #843527; }

/* text */
.cf-text { font-size: 1.1rem; line-height: 1.95; color: var(--brand-ink); margin-top: 1.2rem; }
.cf-text p { margin: 0 0 1.1rem; }
.cf-word { cursor: pointer; border-radius: 2px; }
.cf-word:hover { background: var(--brand-powder); }
.cf-sent.is-now { background: var(--brand-powder); box-shadow: 0 0 0 2px var(--brand-powder); border-radius: 2px; }
.cf-pop { position: absolute; z-index: 50; background: var(--brand-wine); color: var(--brand-ivory); border-radius: 4px; padding: .6rem .8rem; display: flex; flex-direction: column; gap: .2rem; max-width: 240px; box-shadow: var(--shadow-md); font-size: .92rem; }
.cf-pop strong { font-weight: 600; }
.cf-pop-uk { color: var(--brand-champagne); }
.cf-pop .cf-ghost { color: var(--brand-ivory); padding: .2rem 0; min-height: 30px; text-align: left; }

.cf-bank { display: flex; flex-wrap: wrap; gap: .4rem; }
.cf-bank span { background: var(--brand-powder); color: var(--brand-wine); border-radius: 100px; padding: .2rem .8rem; font-size: .9rem; font-weight: 500; }
.cf-gaptext { line-height: 2.5; }
.cf-gaptext input { font: inherit; border: 0; border-bottom: 2px solid var(--brand-champagne); background: var(--color-surface); color: var(--brand-wine); font-weight: 600; text-align: center; padding: 0 .2rem; max-width: 100%; border-radius: 2px 2px 0 0; }
.cf-gaptext input.right { border-color: #79a57f; color: #2f5a39; background: #e7f1e6; }
.cf-gaptext input.wrong, .cf-gaptext input.empty { border-color: var(--brand-terracotta); background: #f7e4df; }
.cf-gaptext input.almost { border-color: var(--brand-gold); background: #f8eed7; }

/* phrases */
.brand-premium .cf-phrase-head strong { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 500; color: var(--brand-wine); }
.cf-phrase-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.cf-context { font-size: 1rem; color: var(--color-text-light); }
.cf-context mark { background: var(--brand-powder); color: var(--brand-wine); font-weight: 600; padding: 0 .15em; }
.cf-reveal { margin-top: .8rem; }
.cf-example { display: flex; align-items: center; gap: .6rem; }
.cf-model { background: var(--brand-powder); color: var(--brand-wine); padding: .7rem .85rem; border-radius: 4px; margin-top: .6rem !important; }

/* exercise pieces */
.cf-key { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--brand-wine); background: var(--brand-powder); padding: .05rem .5rem; border-radius: 3px; }
.cf-frame .cf-field { display: inline-block; width: auto; max-width: 100%; padding: .3rem .5rem; margin: .15rem .2rem; }
.cf-built, .cf-pool { display: flex; flex-wrap: wrap; gap: .4rem; min-height: 46px; }
.cf-built { border-bottom: 1px solid var(--brand-champagne); padding-bottom: .4rem; margin-bottom: .6rem; }
.cf-built button, .cf-pool button { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--brand-ink); font: inherit; font-size: .95rem; padding: .35rem .75rem; min-height: 40px; border-radius: 4px; cursor: pointer; }
.cf-built button { background: var(--brand-powder); border-color: var(--brand-powder); }
.cf-listen { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .55rem; }

/* buttons */
.cf-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; margin-top: .8rem; }
.cf-primary { background: var(--brand-terracotta); color: #fff; border: 0; border-radius: 4px; font: inherit; font-size: .95rem; font-weight: 500; min-height: 46px; padding: .55rem 1.3rem; cursor: pointer; }
.cf-primary:hover:not(:disabled) { background: var(--brand-terracotta-hover); }
.cf-primary:disabled { background: var(--color-border); color: var(--color-text-light); cursor: not-allowed; }
.cf-small { min-height: 40px; padding: .35rem 1rem; font-size: .88rem; }
.cf-ghost { background: none; border: 0; color: var(--brand-terracotta); font: inherit; font-size: .9rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: .4rem 0; min-height: 40px; }
.cf-ghost:disabled { color: var(--color-text-light); text-decoration: none; cursor: default; }
.cf-result { font-size: .92rem; color: var(--color-text-light); }
.cf-result .ok { color: #3f6b4b; font-weight: 600; }
.cf-result strong { color: var(--brand-wine); }
.cf-nav { display: flex; justify-content: space-between; padding: 1.2rem 0 4rem; border-top: 1px solid var(--color-border); }
.cf-score { display: flex; align-items: baseline; gap: .8rem; padding: 1.2rem 0; border-top: 1px solid var(--color-border); }
.cf-score strong { font-family: var(--font-heading); font-size: 3rem; line-height: 1; font-weight: 500; color: var(--brand-wine); }
.cf-score span { font-size: .9rem; color: var(--color-text-light); }
.cf-fallback { margin: .5rem 0 1rem; }

/* ── teacher ── */
.cf-login { max-width: 360px; padding: 3rem 0; }
.cf-tabs-big { display: flex; gap: 1.6rem; border-bottom: 1px solid var(--color-border); margin: 1.8rem 0 1.4rem; overflow-x: auto; }
.cf-tabs-big button { background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; font-size: .95rem; color: var(--color-text-light); padding: .6rem 0; cursor: pointer; white-space: nowrap; min-height: 44px; }
.cf-tabs-big button.on { color: var(--brand-wine); font-weight: 600; border-bottom-color: var(--brand-terracotta); }
.cf-t-row { display: grid; grid-template-columns: 1fr auto; gap: .7rem 1.2rem; align-items: center; padding: 1rem 0; border-top: 1px solid var(--color-border); }
.cf-t-row h3 { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 500; color: var(--brand-wine); margin: 0; }
.cf-t-sub { font-size: .8rem; color: var(--color-text-light); }
.cf-t-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; }
.cf-seg { display: inline-flex; border: 1px solid var(--color-border); border-radius: 4px; overflow: hidden; }
.cf-seg button { border: 0; border-right: 1px solid var(--color-border); background: var(--color-surface); font: inherit; font-size: .85rem; padding: .3rem .8rem; min-height: 40px; color: var(--brand-ink); cursor: pointer; }
.cf-seg button:last-child { border-right: 0; }
.cf-seg button.on { background: var(--brand-wine); color: var(--brand-ivory); font-weight: 600; }
.cf-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; cursor: pointer; }
.cf-form label.cf-l, .cf-l { display: block; font-size: .82rem; font-weight: 600; color: var(--brand-wine); margin: .9rem 0 .3rem; }
.cf-form textarea.cf-field { line-height: 1.6; }
.brand-premium .cf-form h2 { font-size: 1.8rem; color: var(--brand-wine); margin: 2.2rem 0 .2rem; }
.cf-help { font-size: .84rem; color: var(--color-text-light); margin: 0 0 .5rem; }
.cf-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; margin-top: .3rem; }
.cf-count.over { color: var(--brand-terracotta); font-weight: 600; }
.cf-item { border-top: 1px solid var(--color-border); padding: .3rem 0 .8rem; }
.cf-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .4rem; }
.cf-item-foot select, .cf-add select, select.cf-field { font: inherit; font-size: .88rem; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-surface); padding: .35rem .5rem; min-height: 40px; color: var(--brand-ink); max-width: 100%; }
.cf-ex { border-top: 2px solid var(--brand-champagne); margin-top: 1.4rem; padding-top: .6rem; }
.cf-ex-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cf-ex-head strong { color: var(--brand-wine); font-weight: 600; }
.cf-add { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 1.2rem; }
.cf-sticky { position: sticky; bottom: 0; background: var(--brand-ivory); border-top: 1px solid var(--color-border); padding: .8rem 0; margin-top: 2rem; z-index: 5; }
.cf-sub { padding: 1.2rem 0; border-top: 1px solid var(--color-border); }
.cf-sub-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; }
.cf-sub-head strong { color: var(--brand-wine); font-size: 1.05rem; }
.cf-sub-a { margin-top: .9rem; }
.cf-sub-a p { margin: 0 0 .25rem; }
.cf-sub-q { font-size: .86rem; color: var(--color-text-light); }
.cf-sub-a audio { width: 100%; max-width: 380px; height: 40px; }

@media (max-width: 560px) {
  .cf-player { flex-wrap: wrap; }
  .cf-player-mid { flex-basis: calc(100% - 70px); }
  .cf-speed { width: 100%; justify-content: flex-end; }
  .cf-row { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .cf-text { font-size: 1.04rem; }
  .cf-hero-row { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .cf-case, .is-rec .cf-dot { transition: none; animation: none; } }

/* ── Next says why it did not move ── */
.cf-flash { animation: cf-blink .45s ease-in-out 3; border-radius: 4px; }
@keyframes cf-blink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 39, 45, 0); background-color: transparent; }
  50% { box-shadow: 0 0 0 3px #c0272d; background-color: rgba(192, 39, 45, .12); }
}
.cf-primary.cf-flash { animation-name: cf-blink-btn; }
@keyframes cf-blink-btn { 50% { background-color: #c0272d; box-shadow: 0 0 0 3px rgba(192, 39, 45, .35); } }
.cf-vox { position: fixed; right: 18px; bottom: 14px; z-index: 60; display: flex; align-items: flex-end; gap: .35rem; max-width: calc(100vw - 28px); pointer-events: none; visibility: hidden; }
.cf-vox.show, .cf-vox.leave { visibility: visible; }
.cf-vox.show { animation: cf-vox-in .75s cubic-bezier(.2, .75, .3, 1) both; }
.cf-vox.leave { animation: cf-vox-out .45s ease-in both; }
@keyframes cf-vox-in { from { transform: translateX(calc(100% + 40px)); } to { transform: none; } }
@keyframes cf-vox-out { from { transform: none; } to { transform: translateX(calc(100% + 40px)); } }
.cf-robot { flex: none; width: 118px; height: auto; overflow: visible; transform-origin: 50% 100%; filter: drop-shadow(0 8px 12px rgba(74, 38, 54, .28)); }
/* running in, then stamping and shaking an arm */
.cf-vox.show .cf-robot { animation: cf-hop .15s ease-in-out 5 alternate, cf-stamp .28s ease-in-out .78s 3; }
.cf-vox.leave .cf-robot { animation: cf-hop .13s ease-in-out infinite alternate; }
@keyframes cf-hop { from { transform: translateY(0) rotate(-5deg); } to { transform: translateY(-13px) rotate(5deg); } }
@keyframes cf-stamp { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg) translateY(-5px); } 75% { transform: rotate(7deg) translateY(-5px); } }
.cf-foot { transform-box: fill-box; transform-origin: 50% 0; }
.cf-vox.show .cf-foot-l, .cf-vox.leave .cf-foot-l { animation: cf-step .15s linear 5 alternate; }
.cf-vox.show .cf-foot-r, .cf-vox.leave .cf-foot-r { animation: cf-step .15s linear 5 alternate-reverse; }
@keyframes cf-step { from { transform: rotate(-32deg); } to { transform: rotate(32deg); } }
.cf-arm { transform-box: fill-box; transform-origin: 0 50%; }
.cf-vox.show .cf-arm { animation: cf-wag .2s ease-in-out .8s 8 alternate; }
@keyframes cf-wag { from { transform: rotate(-38deg); } to { transform: rotate(14deg); } }
.cf-vox p { position: relative; margin: 0 0 58px; background: var(--color-surface); border: 2px solid #c0272d; border-radius: 12px; padding: .65rem .95rem; font-weight: 600; color: #a61e24; font-size: 1rem; line-height: 1.35; box-shadow: 0 10px 28px rgba(74, 38, 54, .22); transform-origin: 100% 70%; max-width: 230px; }
.cf-vox.show p { animation: cf-say .3s cubic-bezier(.3, 1.5, .5, 1) .62s both; }
@keyframes cf-say { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
.cf-vox p::after { content: ''; position: absolute; right: -9px; bottom: 16px; width: 14px; height: 14px; background: var(--color-surface); border-right: 2px solid #c0272d; border-top: 2px solid #c0272d; transform: rotate(45deg); }
@media (max-width: 560px) { .cf-robot { width: 92px; } .cf-vox p { font-size: .92rem; margin-bottom: 44px; } }
@media (prefers-reduced-motion: reduce) { .cf-vox.show, .cf-vox.leave, .cf-vox.show *, .cf-vox.leave * { animation: none !important; } }

/* ── the word box ── */
.cf-pop-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.cf-pop-head .cf-sound { width: 30px; height: 30px; background: transparent; border-color: rgba(250, 247, 243, .4); color: var(--brand-ivory); }
.cf-pop-ipa { color: rgba(250, 247, 243, .78); font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: .9rem; }
.cf-pop-ipa:empty { display: none; }

/* ── in class ── */
.cf-topic { padding: 1.2rem 0; border-top: 1px solid var(--color-border); }
.brand-premium .cf-topic h3 { font-family: var(--font-heading); font-size: 1.55rem; font-weight: 500; color: var(--brand-wine); margin: 0 0 .5rem; }
.cf-topic-l { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--brand-terracotta); margin: .7rem 0 .15rem; }
.cf-topic ul { margin: 0; padding-left: 1.1rem; }
.cf-topic p { margin: 0; }
.cf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; margin-top: 1rem; }
.cf-card { display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 4px; overflow: hidden; }
.cf-card-top { background: var(--brand-wine); color: var(--brand-ivory); padding: 1rem 1.1rem; }
.cf-card-top span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-champagne); font-weight: 600; }
.brand-premium .cf-card-top h3 { font-family: var(--font-heading); color: var(--brand-ivory); font-size: 1.55rem; font-weight: 500; margin: .2rem 0 0; }
.cf-card-body { padding: 1rem 1.1rem; flex: 1; font-size: .95rem; line-height: 1.55; }
.cf-card-body p { margin: 0 0 .6rem; }
.cf-card-body ol { margin: 0; padding-left: 1.2rem; }
.cf-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .3rem 1.1rem .5rem; border-top: 1px solid var(--color-border); }

@media print {
  body.cf-printing .cf-top, body.cf-printing .cf-hero, body.cf-printing .cf-tabs-big,
  body.cf-printing .cf-class-only, body.cf-printing .cf-card-foot, body.cf-printing .cf-card:not(.is-picked) { display: none !important; }
  body.cf-printing .cf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; margin: 0; }
  body.cf-printing .cf-card { break-inside: avoid; border: 1px solid #999; }
  body.cf-printing .cf-card-top { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { .cf-flash { animation-duration: .01s; outline: 3px solid #c0272d; } .cf-vox { transition: none; } }

/* the way in for the teacher: there, but not in the learners' way */
.cf-foot { text-align: center; padding: 0 1.25rem 1.6rem; }
.cf-foot a { font-size: .75rem; color: var(--color-text-light); text-decoration: underline; text-underline-offset: 3px; }
.cf-foot a:hover { color: var(--brand-wine); }

/* the AI button under the text */
.cf-gen { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin: .8rem 0 .4rem; padding: .9rem 1rem; background: var(--brand-powder); border-radius: 4px; }

/* the teacher's list: what a story is about, and finding one */
.cf-tagbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .6rem 0 1.2rem; }
.cf-tag { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--brand-ink); font: inherit; font-size: .8rem; padding: .25rem .75rem; min-height: 34px; border-radius: 100px; cursor: pointer; }
.cf-tag:hover { border-color: var(--brand-champagne); }
.cf-tag.on { background: var(--brand-wine); border-color: var(--brand-wine); color: var(--brand-ivory); }
.cf-t-info { grid-column: 1 / -1; }
.cf-t-about { margin: 0 0 .55rem; font-size: .95rem; line-height: 1.6; color: var(--brand-ink); max-width: 720px; }
.cf-t-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.cf-t-tags span { background: var(--brand-powder); color: var(--brand-wine); font-size: .74rem; font-weight: 500; padding: .12rem .6rem; border-radius: 100px; }
.cf-t-vocab { margin: .55rem 0 0; font-size: .84rem; color: var(--color-text-light); max-width: 720px; }
.cf-t-vocab:empty { display: none; }
.cf-t-actions .cf-link { font-size: .9rem; font-weight: 500; }

/* footnotes for a harder form under the text */
.cf-notes { margin: -.4rem 0 1rem; padding-top: .6rem; border-top: 1px solid var(--color-border); }
.cf-notes p { margin: 0 0 .2rem; font-size: .88rem; color: var(--color-text-light); }

/* photos */
.cf-case-img { display: block; width: calc(100% + 3rem); max-width: none; margin: -1.5rem -1.5rem 1rem; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.cf-case { overflow: hidden; }
.cf-photo { margin: .2rem 0 1.2rem; }
.cf-photo img { display: block; width: 100%; aspect-ratio: 16 / 8; height: auto; object-fit: cover; border-radius: 4px; }
.cf-photo figcaption { margin-top: .3rem; font-size: .72rem; color: var(--color-text-light); }
.cf-photo-about { margin: .45rem 0 0 !important; font-size: .95rem; line-height: 1.55; color: var(--brand-ink); }

/* the end of a case for a visitor from a video: the Speaking Club */
.cf-club { margin-top: 1.2rem; padding: 1.4rem 1.3rem; border: 1px solid var(--brand-champagne); border-radius: 8px; background: #fbf7f1; }
.cf-club-text { margin: 0 0 1rem; line-height: 1.6; color: var(--brand-ink); }
.cf-club-form { display: grid; gap: .7rem; max-width: 460px; }
.cf-club-form .cf-actions { margin-top: .2rem; }

/* the other levels of a story, under its card on /case-files/ */
.cf-list > li { display: flex; flex-direction: column; }
.cf-list > li > .cf-case { flex: 1; height: auto; }
.cf-case-levels { margin: .6rem 0 0; font-size: .82rem; color: var(--color-text-light); }
.cf-case-levels a { display: inline-block; margin-left: .3rem; padding: .15rem .65rem; border: 1px solid var(--brand-champagne); border-radius: 99px; color: var(--brand-wine); font-weight: 600; text-decoration: none; }
.cf-case-levels a:hover { background: var(--brand-champagne); color: #fff; }

/* a story's YouTube video, on the Listen step */
.cf-video { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #000; margin: .2rem 0 1.2rem; }
.cf-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
