/* TCF Learner Hub 2.0 — tcfenligne.com brand: Plus Jakarta Sans + Inter, navy, blue, orange goal.
   Structure: panel > section (h2) > 12-column grid > card (h3). Spacing scale: 4, 8, 12, 16, 20, 24, 32, 44. */

.tcfh {
    --navy: #0f2f6b;
    --navy-deep: #0a2458;
    --blue: #2563eb;
    --blue-hover: #1d4ed8;
    --electric: #385dff;
    --sky: #dceaff;
    --mist: #f3f7fe;
    --wash: #f7f9fc;
    --cream: #fffaf2;
    --orange: #f97316;
    --orange-ink: #c2410c;
    --ink: #1e2132;
    --muted: #5b6477;
    --faint: #8a93a6;
    --line: #e3e8f1;
    --line-soft: #eef2f7;
    --white: #ffffff;
    --plus: #137a4b;
    --minus: #b42318;
    --display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --card-pad: 24px;
    --grid-gap: 20px;
    --shadow: 0 1px 2px rgba(15, 47, 107, .04);
    --skill: var(--electric);
    --skill-ink: #2743d6;
    --skill-soft: #ebefff;

    box-sizing: border-box;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    /* Break out of narrow theme content columns (block-theme constrained layouts use !important). */
    width: min(1360px, calc(100vw - 40px));
    max-width: none !important;
    margin-top: 24px !important;
    margin-bottom: 56px !important;
    margin-left: calc(50% - min(680px, 50vw - 20px)) !important;
    margin-right: 0 !important;
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    text-align: left;
    -webkit-font-smoothing: antialiased;
}
/* Tabular figures only where numbers are compared. Applied globally, Inter also widens hyphens ("e - mail"). */
.tcfh :is(.tcfh-attempt__score, .tcfh-kpi__value, .tcfh-scoreboard__current strong, .tcfh-scoreboard__stats dd, .tcfh-wallet__figure strong, .tcfh-ladder__value, .tcfh-ladder__ticks, .tcfh-chart__y, .tcfh-chart__x, .tcfh-chart__value, .tcfh-rhythm__stats dd, .tcfh-ledger strong, .tcfh-chips button span, .tcfh-nav__meta, .tcfh-nav__wallets strong, .tcfh-nav__sublink small, .tcfh-gaps__value) { font-variant-numeric: tabular-nums; }
.tcfh *, .tcfh *::before, .tcfh *::after { box-sizing: border-box; }
/* The hub greets the learner itself; hide the theme's duplicate page title when the dashboard renders. */
.tcf-learner-hub-page:has(.tcfh) :is(.wp-block-post-title, .entry-title, .page-title) { display: none; }
.tcfh h1, .tcfh h2, .tcfh h3, .tcfh h4, .tcfh p, .tcfh ul, .tcfh ol, .tcfh dl, .tcfh dd, .tcfh figure { margin: 0; padding: 0; }
.tcfh ul, .tcfh ol { list-style: none; }
.tcfh h1, .tcfh h2, .tcfh h3, .tcfh h4 { font-family: var(--display); color: var(--navy); letter-spacing: -0.015em; line-height: 1.2; text-transform: none; }
.tcfh a { color: inherit; text-decoration: none; box-shadow: none; }
.tcfh button, .tcfh input, .tcfh select { font: inherit; }
.tcfh [hidden] { display: none !important; }
.tcfh :focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.tcfh [tabindex="-1"]:focus { outline: none; }
.tcfh-icon { flex: none; display: block; }
/* Pinned to its container: an absolutely positioned label left at its static position inside a
   truncated (overflow: hidden) line escapes that clipping and widens the page. */
.tcfh-sr { position: absolute !important; top: 0; left: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.tcfh h1, .tcfh h2, .tcfh h3, .tcfh h4, .tcfh p, .tcfh li, .tcfh dd { overflow-wrap: break-word; }
.tcfh-main, .tcfh-panel, .tcfh-section, .tcfh-grid > *, .tcfh-card { min-width: 0; max-width: 100%; }
/* Administrator content in inline custom tabs must never widen the page. */
.tcfh-custom__body { max-width: 100%; overflow-x: auto; overflow-wrap: break-word; }
.tcfh-custom__body :is(img, video, iframe, embed, object, canvas, svg) { max-width: 100%; height: auto; }
.tcfh-custom__body table { max-width: 100%; }

/* Skill colour families: marks use --skill, text on light surfaces uses --skill-ink. */
.tcfh-skill--co { --skill: #385dff; --skill-ink: #2743d6; --skill-soft: #ebefff; }
.tcfh-skill--ce { --skill: #14a3a5; --skill-ink: #0b6f71; --skill-soft: #e3f5f5; }
.tcfh-skill--eo { --skill: #8a3ffc; --skill-ink: #6d28d9; --skill-soft: #f2ebff; }
.tcfh-skill--ee { --skill: #22a06b; --skill-ink: #146c47; --skill-soft: #e4f5ec; }

.tcfh-code {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--skill-ink);
    color: var(--white);
    font: 700 12px/1 var(--display);
    letter-spacing: .02em;
}

/* Buttons, links, chips, progress ------------------------------------------ */
.tcfh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font: 600 14.5px/1.2 var(--body);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.tcfh-btn .tcfh-icon { width: 18px; height: 18px; }
.tcfh-btn--small { min-height: 40px; padding: 0 16px; font-size: 14px; }
/* Themes (Elementor kits in particular) restyle button/link :hover, :focus and :active with their own
   background and colour. Every state is declared here with !important so hub buttons stay legible. */
.tcfh .tcfh-btn { background-image: none !important; box-shadow: none !important; text-decoration: none !important; text-transform: none !important; letter-spacing: normal !important; }
.tcfh .tcfh-btn--primary,
.tcfh .tcfh-btn--primary:visited { background-color: var(--blue) !important; border-color: var(--blue) !important; color: var(--white) !important; }
.tcfh .tcfh-btn--primary:hover,
.tcfh .tcfh-btn--primary:focus,
.tcfh .tcfh-btn--primary:active { background-color: var(--blue-hover) !important; border-color: var(--blue-hover) !important; color: var(--white) !important; }
.tcfh .tcfh-btn--ghost,
.tcfh .tcfh-btn--ghost:visited { background-color: var(--white) !important; border-color: var(--line) !important; color: var(--navy) !important; }
.tcfh .tcfh-btn--ghost:hover,
.tcfh .tcfh-btn--ghost:focus,
.tcfh .tcfh-btn--ghost:active { background-color: var(--mist) !important; border-color: var(--blue) !important; color: var(--blue-hover) !important; }
.tcfh .tcfh-btn--light,
.tcfh .tcfh-btn--light:visited { background-color: var(--white) !important; border-color: var(--white) !important; color: var(--navy) !important; }
.tcfh .tcfh-btn--light:hover,
.tcfh .tcfh-btn--light:focus,
.tcfh .tcfh-btn--light:active { background-color: var(--sky) !important; border-color: var(--sky) !important; color: var(--navy) !important; }
.tcfh .tcfh-btn .tcfh-icon { color: currentColor; }
.tcfh .tcfh-btn:disabled,
.tcfh .tcfh-btn:disabled:hover { opacity: .6; cursor: progress; background-color: var(--white) !important; color: var(--navy) !important; }
.tcfh .tcfh-btn--primary:disabled,
.tcfh .tcfh-btn--primary:disabled:hover { background-color: var(--blue) !important; color: var(--white) !important; }
.tcfh-link { color: var(--blue) !important; font-weight: 600; font-size: 14px; white-space: nowrap; }
.tcfh-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.tcfh-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--wash);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.tcfh-chip--skill { background: var(--skill-soft); color: var(--skill-ink); }
.tcfh-chip--warn { background: #fff1e0; color: #9a3f06; }

.tcfh-progress { position: relative; height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.tcfh-progress > span { position: absolute; inset: 0 auto 0 0; width: var(--value); border-radius: inherit; background: var(--skill); }
.tcfh-progress--goal > span { background: linear-gradient(90deg, var(--skill), var(--skill-ink)); }

.tcfh-status { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.tcfh-status--done { background: #e4f4eb; color: #146c47; }
.tcfh-status--pending { background: #fff1e0; color: #9a3f06; }
.tcfh-status--failed { background: #fdeceb; color: #b42318; }
.tcfh-status--draft { background: #edf0f5; color: #475069; }

.tcfh .is-plus { color: var(--plus); }
.tcfh .is-minus { color: var(--minus); }
.tcfh-empty { color: var(--muted); font-size: 15px; }
.tcfh-error { color: var(--minus); font-weight: 600; margin-top: 12px !important; }

/* Navigation ------------------------------------------------------------------ */
/* Desktop sidebar: 56 px rows with 6 px between them, section labels with clear space above.
   It scrolls inside itself when taller than the window, so the account entries stay reachable. */
.tcfh-nav {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
    padding: 20px 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.admin-bar .tcfh-nav { top: 56px; max-height: calc(100vh - 80px); }
/* Themes add margins or line-height to list items; the menu keeps its own rhythm. */
.tcfh .tcfh-nav li { margin: 0 !important; line-height: inherit; list-style: none; }
.tcfh-nav__brand { display: grid; justify-items: start; gap: 8px; padding: 4px 12px 20px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.tcfh-nav__brand small { display: block; font-size: 12.5px; color: var(--muted); }
/* Site logo (bundled copy of the tcfenligne.com header logo, white background). */
.tcfh-logo { display: inline-flex; max-width: 100%; line-height: 0; border-radius: 8px; }
.tcfh-logo img { display: block; width: auto !important; max-width: 100%; height: 46px !important; object-fit: contain; }
.tcfh-logo--gate img { height: 58px !important; mix-blend-mode: multiply; }
.tcfh-nav__toggle, .tcfh-quicknav { display: none; }
.tcfh-nav__menu { display: flex; flex-direction: column; gap: 12px; }
.tcfh-nav__list { display: flex; flex-direction: column; gap: 6px; }
.tcfh-nav__group { padding: 22px 12px 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; color: var(--faint); }
.tcfh-nav__list > li:first-child + .tcfh-nav__group { padding-top: 20px; }
.tcfh-nav__link {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--ink) !important;
    transition: background-color .15s ease;
}
.tcfh-nav__icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; color: var(--muted); }
.tcfh-nav .tcfh-code { width: 34px; height: 34px; border-radius: 10px; }
.tcfh-nav__text { display: grid; gap: 3px; min-width: 0; line-height: 1.3; }
.tcfh-nav__name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.tcfh-nav__meta { font-size: 13px; color: var(--faint); font-weight: 500; }
.tcfh-nav__link:hover { background: var(--mist); }
.tcfh-nav__link.is-active { background: var(--navy); color: var(--white) !important; }
.tcfh-nav__link.is-active .tcfh-nav__icon, .tcfh-nav__link.is-active .tcfh-nav__meta { color: rgba(255, 255, 255, .72); }
.tcfh-nav__link.is-active .tcfh-code { background: var(--skill); }

/* Skill families with sub-entries (simulator, corrected examples). */
.tcfh-nav__parent { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 12px; color: var(--ink); }
.tcfh-nav__sub { display: grid; gap: 4px; margin: 2px 0 8px 28px !important; padding: 4px 0 4px 18px !important; border-left: 1.5px solid var(--line-soft); }
.tcfh-nav__sublink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted) !important;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.3;
    transition: background-color .15s ease, color .15s ease;
}
.tcfh-nav__sublink small { display: inline-grid; place-items: center; min-width: 26px; padding: 2px 7px; border-radius: 999px; background: var(--wash); font-size: 12px; font-weight: 600; color: var(--muted); }
.tcfh-nav__sublink.is-active small { background: rgba(255, 255, 255, .16); }
.tcfh-nav__sublink:hover { background: var(--mist); color: var(--navy) !important; }
.tcfh-nav__sublink.is-active { background: var(--navy); color: var(--white) !important; font-weight: 600; }
.tcfh-nav__sublink.is-active small { color: rgba(255, 255, 255, .72); }
.tcfh-nav__family:has(.tcfh-nav__sublink.is-active) .tcfh-code { background: var(--skill); }
.tcfh-nav__family:has(.tcfh-nav__sublink.is-active) .tcfh-nav__name { color: var(--navy); }
.tcfh-nav__wallets { display: grid; gap: 8px; margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.tcfh-nav__wallets .tcfh-nav__group { padding-top: 16px; }
.tcfh-nav__wallets a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--cream);
    border: 1px solid #f5e8d3;
    color: var(--ink) !important;
    font-size: 13.5px;
    font-weight: 500;
}
.tcfh-nav__wallets a:hover { border-color: #efd6ad; }
.tcfh-nav__wallet-label { display: flex; align-items: center; gap: 8px; }
.tcfh-nav__wallet-label .tcfh-icon { width: 18px; height: 18px; color: var(--orange-ink); }
.tcfh-nav__wallets strong { font: 700 15px/1 var(--display); color: var(--navy); }
.tcfh-nav__account { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.tcfh-nav__account .tcfh-nav__group { padding-top: 16px; }
.tcfh .tcfh-nav__link--logout { color: var(--muted); }
.tcfh .tcfh-nav__link--logout:hover { background: #fdf1ef; color: var(--minus) !important; }
.tcfh .tcfh-nav__link--logout:hover .tcfh-nav__icon { color: var(--minus); }

/* Panels, sections, grid, cards -------------------------------------------- */
.tcfh-main { min-width: 0; }
.tcfh-panel { display: grid; gap: 44px; }
.tcfh:not(.is-enhanced) .tcfh-panel + .tcfh-panel { margin-top: 64px; }

.tcfh-section { display: grid; gap: 16px; min-width: 0; }
.tcfh-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 0 4px; }
.tcfh-section__head h2 { font-size: 21px; font-weight: 700; }
.tcfh-section__head p { margin-top: 4px !important; font-size: 14.5px; color: var(--muted); max-width: 64ch; }
.tcfh-section__head p strong { color: var(--navy); }

.tcfh-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--grid-gap); align-items: stretch; }
.tcfh-col-5 { grid-column: span 5; }
.tcfh-col-6 { grid-column: span 6; }
.tcfh-col-7 { grid-column: span 7; }
.tcfh-col-12 { grid-column: 1 / -1; }

.tcfh-card {
    min-width: 0;
    padding: var(--card-pad);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.tcfh-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 16px; }
.tcfh-card__head h3 { font-size: 17px; font-weight: 700; }
.tcfh-card__aside { font-size: 13.5px; color: var(--faint); white-space: nowrap; }
.tcfh-card--stack { display: flex; flex-direction: column; }
.tcfh-card__foot { margin-top: auto !important; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.tcfh-card--stack .tcfh-attempts { margin-bottom: 10px !important; }

/* Skill levels against the goal (next-step card). */
.tcfh-gaps { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--line); }
.tcfh-gaps__caption { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--faint); }
.tcfh-gaps__caption span:last-child { display: inline-flex; align-items: center; gap: 6px; }
.tcfh-gaps__key { width: 2px; height: 12px; border-radius: 2px; background: var(--orange); }
.tcfh-gaps ul { display: grid; gap: 9px; }
.tcfh-gaps li { display: grid; grid-template-columns: 28px minmax(0, 1fr) 70px; align-items: center; gap: 12px; }
.tcfh-gaps__code { font: 700 12px/1 var(--display); color: var(--skill-ink); }
.tcfh-gaps .tcfh-progress { height: 6px; overflow: visible; }
.tcfh-gaps .tcfh-progress > span { opacity: .55; }
.tcfh-gaps li.is-focus .tcfh-progress > span { opacity: 1; }
.tcfh-progress__mark { position: absolute; top: -3px; bottom: -3px; left: var(--mark); width: 2px; margin-left: -1px; border-radius: 2px; background: var(--orange); }
.tcfh-gaps__value { font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: right; white-space: nowrap; }
.tcfh-gaps__value.is-ok { color: var(--plus); }
.tcfh-gaps li.is-focus .tcfh-gaps__value { color: var(--navy); }

/* Hero: NCLC profile --------------------------------------------------------- */
/* Light, calm hero: soft sky-to-cream wash, navy type, pastel tracks. */
.tcfh-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 3.2vw, 40px);
    border-radius: var(--radius-xl);
    border: 1px solid #dfe8f6;
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(56, 93, 255, .08) 0%, rgba(56, 93, 255, 0) 60%),
        linear-gradient(135deg, #f5f8ff 0%, #f0f5ff 55%, #fcf8f1 100%);
    color: var(--ink);
}
.tcfh-hero__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px 32px; flex-wrap: wrap; }
.tcfh-hero__intro { max-width: 62ch; }
.tcfh-hero h1 { color: var(--navy); font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; letter-spacing: -0.025em; }
.tcfh-hero__intro p { margin-top: 10px !important; font-size: 16px; line-height: 1.65; color: var(--muted); }
.tcfh-goal { display: grid; gap: 6px; justify-items: start; min-width: 150px; }
.tcfh-goal label { font-size: 13px; font-weight: 600; color: var(--muted); }
.tcfh-goal select {
    min-height: 44px;
    padding: 0 42px 0 18px;
    border-radius: 999px;
    border: 1.5px solid #f4c9a1;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230f2f6b' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 18px center;
    box-shadow: 0 1px 2px rgba(15, 47, 107, .06);
    color: var(--navy);
    font: 700 15.5px/1 var(--display);
    appearance: none;
    cursor: pointer;
    transition: border-color .15s ease;
}
.tcfh-goal select:hover { border-color: var(--orange); }
.tcfh-goal select option { color: var(--ink); background: var(--white); }
.tcfh-goal__status { min-height: 1.2em; font-size: 12.5px; color: var(--muted); }

.tcfh-ladder { margin-top: 28px; padding-top: 24px; border-top: 1px solid #dde6f3; }
.tcfh-ladder__scale, .tcfh-ladder__row {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) 112px;
    align-items: center;
    column-gap: 32px;
}
.tcfh-ladder__ticks { position: relative; height: 18px; }
.tcfh-ladder__ticks span {
    position: absolute;
    bottom: 0;
    left: var(--pos);
    transform: translateX(-50%);
    font: 600 12px/1 var(--display);
    color: var(--faint);
}
.tcfh-ladder__ticks span.is-target { color: var(--orange-ink); font-weight: 800; }
.tcfh-ladder__rows { display: grid; margin-top: 10px; }
.tcfh-ladder__row { min-height: 56px; }
.tcfh-ladder__label { display: flex; align-items: center; gap: 12px; color: var(--ink) !important; font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.tcfh-ladder__label .tcfh-code { background: var(--skill); }
.tcfh-ladder__label:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.tcfh-ladder__track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background-color: #e4ebf6;
    background-image: linear-gradient(to right, rgba(15, 47, 107, .08) 1px, transparent 1px);
    background-size: calc(100% / 7) 100%;
}
.tcfh-ladder__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--pos);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--skill-soft), var(--skill));
    animation: tcfh-fill .9s cubic-bezier(.2, .8, .2, 1) both;
}
.tcfh-ladder__target { position: absolute; top: -9px; bottom: -9px; left: var(--target); width: 2px; margin-left: -1px; background: var(--orange); border-radius: 2px; }
.tcfh-ladder__best { position: absolute; top: 50%; left: var(--best); width: 14px; height: 14px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px dashed rgba(15, 47, 107, .35); background: rgba(255, 255, 255, .7); }
.tcfh-ladder__marker {
    position: absolute;
    top: 50%;
    left: var(--pos);
    width: 22px;
    height: 22px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--white);
    border: 5px solid var(--skill);
    box-shadow: 0 0 0 3px var(--white), 0 3px 8px rgba(15, 47, 107, .18);
    animation: tcfh-marker .9s cubic-bezier(.2, .8, .2, 1) both;
}
.tcfh-ladder__row:nth-child(2) .tcfh-ladder__fill, .tcfh-ladder__row:nth-child(2) .tcfh-ladder__marker { animation-delay: .08s; }
.tcfh-ladder__row:nth-child(3) .tcfh-ladder__fill, .tcfh-ladder__row:nth-child(3) .tcfh-ladder__marker { animation-delay: .16s; }
.tcfh-ladder__row:nth-child(4) .tcfh-ladder__fill, .tcfh-ladder__row:nth-child(4) .tcfh-ladder__marker { animation-delay: .24s; }
.tcfh-ladder__row.is-empty .tcfh-ladder__fill { display: none; }
.tcfh-ladder__value { display: grid; line-height: 1.2; }
.tcfh-ladder__value strong { font: 700 16px/1.25 var(--display); color: var(--navy); }
.tcfh-ladder__value small { font-size: 12.5px; color: var(--faint); }
.tcfh-ladder__row.is-empty .tcfh-ladder__value strong { font: 600 13.5px/1.25 var(--body); color: var(--faint); }
.tcfh-ladder__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 16px !important; font-size: 12.5px; color: var(--faint); }
.tcfh-ladder__legend span { display: inline-flex; align-items: center; gap: 8px; }
.tcfh-ladder__legend span:last-child { margin-left: auto; }
.tcfh-ladder__key { display: inline-block; flex: none; }
.tcfh-ladder__key--target { width: 2px; height: 14px; border-radius: 2px; background: var(--orange); }
.tcfh-ladder__key--best { width: 12px; height: 12px; border-radius: 50%; border: 2px dashed rgba(15, 47, 107, .35); }
@keyframes tcfh-fill { from { width: 0; } }
@keyframes tcfh-marker { from { left: 0; } }

/* KPIs ------------------------------------------------------------------------ */
.tcfh-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--grid-gap); }
.tcfh-kpi {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 14px;
    row-gap: 2px;
    align-items: center;
    align-content: start;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.tcfh-kpi__icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--mist); color: var(--blue); }
.tcfh-kpi:last-child .tcfh-kpi__icon { background: #fff3e6; color: var(--orange-ink); }
.tcfh-kpi__label { align-self: end; font-size: 13.5px; color: var(--muted); }
.tcfh-kpi__value { align-self: start; font: 800 26px/1.15 var(--display); color: var(--navy); letter-spacing: -0.02em; }
.tcfh-kpi__value small { margin-left: 5px; font: 600 14px var(--body); color: var(--muted); letter-spacing: 0; }
.tcfh-kpi__hint { grid-column: 1 / -1; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--faint); }

/* Next step -------------------------------------------------------------------- */
.tcfh-next { display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg, var(--mist), var(--white) 70%); }
.tcfh-next .tcfh-card__head { margin-bottom: 0; }
.tcfh-next__skill { display: flex; align-items: center; gap: 12px; }
.tcfh-next__skill > span:last-child { display: grid; line-height: 1.3; }
.tcfh-next__skill strong { font: 700 16px/1.3 var(--display); color: var(--navy); }
.tcfh-next__skill small { font-size: 13px; color: var(--muted); }
.tcfh-next__reason { font-size: 14.5px; color: var(--ink); }
.tcfh-next__subject { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--line); }
.tcfh-next__subject small { font-size: 12.5px; color: var(--faint); }
.tcfh-next__subject strong { font: 700 15px/1.3 var(--display); color: var(--navy); }
.tcfh-next__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: auto; padding-top: 4px; }
.tcfh-next__resume { padding-top: 16px; border-top: 1px solid var(--line-soft); }
.tcfh-next__resume h4 { margin-bottom: 10px !important; font-size: 14px; }
.tcfh-pending { display: grid; gap: 10px; }
.tcfh-pending li { display: flex; gap: 10px; align-items: flex-start; }
.tcfh-pending .tcfh-attempt__mark { width: 30px; height: 30px; font-size: 11px; border-radius: 8px; }
.tcfh-pending__body { display: grid; gap: 4px; justify-items: start; font-size: 14px; font-weight: 600; line-height: 1.3; }
.tcfh-pending__body a { color: var(--navy) !important; }
.tcfh-pending__body a:hover { text-decoration: underline; }

/* Attempt rows ----------------------------------------------------------------- */
.tcfh-attempts { display: grid; gap: 2px; margin: -6px -12px !important; }
.tcfh-attempt {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: background-color .15s ease;
}
.tcfh-attempt + .tcfh-attempt::before { content: ""; position: absolute; top: -1px; left: 62px; right: 12px; border-top: 1px solid var(--line-soft); }
.tcfh-attempt.has-link:hover { background: var(--mist); }
.tcfh-attempt.has-link:hover::before, .tcfh-attempt.has-link:hover + .tcfh-attempt::before { border-color: transparent; }
.tcfh-attempt:focus-within { background: var(--mist); }
.tcfh-attempt__mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--skill-soft);
    color: var(--skill-ink);
    font: 700 12px/1 var(--display);
    letter-spacing: .02em;
}
.tcfh-attempt__body { min-width: 0; }
.tcfh-attempt__title { font-weight: 600; font-size: 14.5px; line-height: 1.4; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcfh-attempt__link { color: inherit !important; }
.tcfh-attempt__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tcfh-attempt__link:focus-visible { outline: none; }
.tcfh-attempt:has(.tcfh-attempt__link:focus-visible) { outline: 3px solid var(--orange); outline-offset: 1px; }
.tcfh-attempt__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px !important; font-size: 13px; color: var(--muted); }
.tcfh-attempt__score { display: grid; justify-items: end; gap: 2px; line-height: 1.1; min-width: 64px; }
.tcfh-attempt__score strong { font: 700 18px/1.1 var(--display); color: var(--navy); letter-spacing: -0.01em; }
.tcfh-attempt__score strong small { margin-left: 2px; font: 500 12px var(--body); color: var(--faint); }
.tcfh-attempt__score span { font-size: 12px; font-weight: 500; color: var(--muted); }
.tcfh-attempt__score .is-muted { color: #aab2c2; }
.tcfh-attempt__chevron { color: #b3bccb; transition: color .15s ease, transform .15s ease; }
.tcfh-attempt__chevron .tcfh-icon { width: 18px; height: 18px; }
.tcfh-attempt.has-link:hover .tcfh-attempt__chevron { color: var(--blue); transform: translateX(2px); }

/* Regularity -------------------------------------------------------------------- */
.tcfh-rhythm { display: flex; flex-direction: column; }
.tcfh-rhythm__body { display: grid; gap: 20px; }
.tcfh-heatmap {
    display: grid;
    grid-template-columns: 30px repeat(12, minmax(0, 1fr));
    grid-template-rows: 16px repeat(7, auto);
    gap: 6px;
    align-items: center;
    width: 100%;
    max-width: 560px;
}
.tcfh-heatmap__month { grid-row: 1; font-size: 11.5px; color: var(--faint); white-space: nowrap; line-height: 1; }
.tcfh-heatmap__day { grid-column: 1; font-size: 11px; color: var(--faint); line-height: 1; }
.tcfh-heat { display: block; width: 100%; aspect-ratio: 1; border-radius: 5px; background: #edf1f8; }
.tcfh-heat--1 { background: #c7d6ff; }
.tcfh-heat--2 { background: #7d9cff; }
.tcfh-heat--3 { background: #2743d6; }
.tcfh-heat.is-future { background: transparent; border: 1px dashed var(--line); }
.tcfh-rhythm__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.tcfh-rhythm__stats > div { display: flex; flex-direction: column; justify-content: space-between; gap: 2px; min-width: 0; }
.tcfh-rhythm__stats dt { font-size: 13px; color: var(--muted); }
.tcfh-rhythm__stats dd { font: 700 18px/1.3 var(--display); color: var(--navy); }
.tcfh-heatmap__legend { display: flex; align-items: center; gap: 5px; margin-top: 16px !important; font-size: 12px; color: var(--faint); }
.tcfh-heatmap__legend .tcfh-heat { width: 12px; }

/* Milestones checklist ----------------------------------------------------------- */
.tcfh-checklist { display: grid; }
.tcfh-checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.tcfh-checklist li:first-child { border-top: 0; padding-top: 0; }
.tcfh-checklist__mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed #c5cdda; }
.tcfh-checklist__mark .tcfh-icon { width: 14px; height: 14px; stroke-width: 2.6; }
.tcfh-checklist__text { display: grid; line-height: 1.3; }
.tcfh-checklist strong { font-size: 14px; font-weight: 600; color: var(--muted); }
.tcfh-checklist small { font-size: 12.5px; color: var(--faint); }
.tcfh-checklist li.is-done .tcfh-checklist__mark { background: var(--blue); border: 0; color: var(--white); }
.tcfh-checklist li.is-done strong { color: var(--ink); }
.tcfh-checklist li.is-done small { color: var(--plus); }

/* Wallets and ledger -------------------------------------------------------------- */
.tcfh-wallet { display: flex; flex-direction: column; gap: 18px; background: linear-gradient(180deg, var(--cream), var(--white) 80%); border-color: #f1e4cf; }
.tcfh-wallet__head { display: flex; align-items: flex-start; gap: 12px; }
.tcfh-wallet__head h3 { font-size: 16px; }
.tcfh-wallet__head p { margin-top: 2px !important; font-size: 13.5px; color: var(--muted); }
.tcfh-wallet__figure { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.tcfh-wallet__figure strong { display: inline-flex; align-items: baseline; gap: 6px; font: 800 40px/1 var(--display); color: var(--navy); letter-spacing: -0.02em; }
.tcfh-wallet__figure strong small { font: 600 15px var(--body); color: var(--muted); letter-spacing: 0; }
.tcfh-wallet.is-low .tcfh-wallet__figure strong { color: var(--orange-ink); }
.tcfh-wallet__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin-top: auto; padding-top: 16px; border-top: 1px solid #f1e8da; }
.tcfh-wallet__last { font-size: 13px; color: var(--faint); }
.tcfh-wallet__actions { display: flex; align-items: center; gap: 16px; }

.tcfh-ledger { display: grid; }
.tcfh-ledger li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.tcfh-ledger li:first-child { border-top: 0; padding-top: 0; }
.tcfh-ledger__text { display: grid; line-height: 1.35; font-size: 14.5px; }
.tcfh-ledger__text small { font-size: 12.5px; color: var(--faint); }
.tcfh-ledger strong { font: 700 16px/1 var(--display); }

/* Skill panels ----------------------------------------------------------------------- */
.tcfh-skillhead { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 4px; }
.tcfh-skillhead__title { display: flex; align-items: center; gap: 16px; }
.tcfh-skillhead__icon { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 16px; background: var(--skill-soft); color: var(--skill-ink); }
.tcfh-skillhead__icon .tcfh-icon { width: 28px; height: 28px; }
.tcfh-skillhead h1 { font-size: clamp(26px, 2.8vw, 34px); font-weight: 800; letter-spacing: -0.025em; }
.tcfh-skillhead p { margin-top: 2px !important; font-size: 15px; color: var(--muted); }
.tcfh-skillhead__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.tcfh-skillhead + .tcfh-scoreboard { margin-top: -20px; }
.tcfh-scoreboard {
    display: grid;
    grid-template-columns: minmax(200px, auto) minmax(0, 1fr);
    gap: 24px 32px;
    align-items: center;
    padding: 24px 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--skill);
}
.tcfh-scoreboard__current { display: grid; justify-items: start; gap: 6px; padding-right: 32px; border-right: 1px solid var(--line-soft); }
.tcfh-scoreboard__label { font-size: 13.5px; color: var(--muted); }
.tcfh-scoreboard__current strong { font: 800 56px/1 var(--display); color: var(--skill-ink); letter-spacing: -0.035em; }
.tcfh-scoreboard__current strong small { margin-left: 3px; font: 700 19px var(--display); color: var(--faint); letter-spacing: 0; }
.tcfh-scoreboard__current strong.is-muted { color: #aab2c2; }
.tcfh-scoreboard__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tcfh-scoreboard__stats > div { padding: 14px 16px; border-radius: var(--radius-md); background: var(--wash); }
.tcfh-scoreboard__stats dt { font-size: 12.5px; color: var(--muted); }
.tcfh-scoreboard__stats dd { margin-top: 2px !important; font: 700 20px/1.25 var(--display); color: var(--navy); }
.tcfh-scoreboard__goal { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.tcfh-scoreboard__goal-text { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.tcfh-scoreboard__goal-text > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.tcfh-scoreboard__goal-text .tcfh-icon { width: 18px; height: 18px; color: var(--orange-ink); }
.tcfh-scoreboard__goal-text strong { color: var(--navy); }
.tcfh-scoreboard__gap { font-weight: 700; color: var(--orange-ink); }

.tcfh-chart { color: var(--skill); }
.tcfh-chart__frame { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: 210px auto; column-gap: 10px; padding-top: 16px; }
.tcfh-chart__y { position: relative; }
.tcfh-chart__y span { position: absolute; right: 0; top: var(--y); transform: translateY(-50%); font: 500 12px/1 var(--body); color: var(--faint); }
.tcfh-chart__plot { position: relative; }
.tcfh-chart__grid, .tcfh-chart__target { position: absolute; left: 0; right: 0; top: var(--y); height: 0; }
.tcfh-chart__grid { border-top: 1px solid var(--line-soft); }
.tcfh-chart__target { border-top: 2px dashed var(--orange); margin-top: -1px; }
.tcfh-chart__svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.tcfh-chart__area { fill: currentColor; opacity: .08; }
.tcfh-chart__line { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tcfh-chart__dot { position: absolute; left: var(--x); top: var(--y); width: 10px; height: 10px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--white); border: 2.5px solid currentColor; }
.tcfh-chart__dot.is-last { width: 14px; height: 14px; background: currentColor; border: 3px solid var(--white); box-shadow: 0 0 0 2px currentColor; }
.tcfh-chart__value { position: absolute; z-index: 1; left: var(--x); top: var(--y); transform: translate(-50%, calc(-100% - 10px)); padding: 2px 5px; border-radius: 6px; background: var(--white); box-shadow: 0 0 0 1px var(--line-soft); font: 800 14px/1 var(--display); color: var(--navy); white-space: nowrap; }
.tcfh-chart__value.is-below { transform: translate(-50%, 14px); }
.tcfh-chart__value.is-end { transform: translate(calc(-100% + 8px), calc(-100% - 12px)); }
.tcfh-chart__value.is-end.is-below { transform: translate(calc(-100% + 8px), 14px); }
.tcfh-chart__x { position: relative; grid-column: 2; height: 14px; margin-top: 10px; }
.tcfh-chart__x span { position: absolute; top: 0; left: var(--x); transform: translateX(-50%); font: 500 12px/1 var(--body); color: var(--faint); white-space: nowrap; }
.tcfh-chart__x span.is-start { transform: translateX(-8px); }
.tcfh-chart__x span.is-end { transform: translateX(calc(-100% + 8px)); }
.tcfh-chart__legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.tcfh-chart__legend span { display: inline-flex; align-items: center; gap: 8px; }
.tcfh-chart__key { display: inline-block; width: 18px; height: 0; }
.tcfh-chart__key--line { border-top: 3px solid var(--skill); border-radius: 2px; }
.tcfh-chart__key--target { border-top: 2px dashed var(--orange); }

/* Library ---------------------------------------------------------------------------- */
.tcfh-search { position: relative; display: block; width: min(360px, 100%); }
.tcfh-search .tcfh-icon { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--faint); }
.tcfh-search input {
    width: 100%;
    min-height: 44px;
    padding: 0 16px 0 42px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font-size: 14.5px;
}
.tcfh-search input::placeholder { color: var(--faint); }
.tcfh-search input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .16); }
/* Five columns in the usual desktop width, so a load of 25 fills five full rows. */
.tcfh-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 14px; }

/* Corrected examples ------------------------------------------------------------------- */
.tcfh-tasks { margin: 0 !important; }
.tcfh-tasks button { min-height: 42px; padding: 0 16px; }
.tcfh-examples__count { margin-bottom: 14px !important; font-size: 13.5px; color: var(--muted); }
.tcfh-examples__count strong { color: var(--navy); }
.tcfh-examples__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.tcfh-examples[aria-busy="true"] .tcfh-examples__list { opacity: .55; }
.tcfh-example a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    height: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink) !important;
    transition: border-color .15s ease, background-color .15s ease;
}
.tcfh-example a:hover { border-color: var(--skill); background: var(--wash); }
.tcfh-example strong { font: 700 15.5px/1.35 var(--display); color: var(--navy); overflow-wrap: break-word; }
.tcfh-example__action { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--blue); }
.tcfh-example a:hover .tcfh-example__action { text-decoration: underline; text-underline-offset: 3px; }
.tcfh-library[aria-busy="true"] .tcfh-subjects { opacity: .55; }
/* Journey (test libraries): a progress banner, then tiles. Done tiles fill with the score, the recommended
   next test stands out in navy, tests not yet done wait in grey. Colours follow the skill (--skill). */
.tcfh-journey {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px 22px;
    padding: 18px 22px;
    border-radius: 20px;
    color: var(--white);
    background:
        radial-gradient(120% 160% at 100% 0%, var(--skill) 0%, rgba(255, 255, 255, 0) 58%),
        linear-gradient(120deg, var(--navy) 0%, var(--skill-ink) 100%);
    box-shadow: 0 18px 36px -26px rgba(15, 47, 107, .7);
}
.tcfh-journey__ring { position: relative; flex: none; width: 74px; height: 74px; }
.tcfh-journey__ring svg { display: block; }
.tcfh-journey__ring svg circle:last-child { transition: stroke-dashoffset .6s ease; }
.tcfh-journey__ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 18px/1 var(--display); color: var(--white); font-variant-numeric: tabular-nums; }
.tcfh-journey__ring small { font-size: 12px; font-weight: 700; opacity: .72; }
.tcfh .tcfh-journey__text h3 { font: 800 19px/1.25 var(--display); color: var(--white); }
.tcfh .tcfh-journey__text p { margin-top: 4px !important; font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .8); }
.tcfh-journey__filters { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.tcfh .tcfh-journey__filters button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, .9) !important;
    font: 600 13px/1 var(--body) !important;
    text-transform: none !important;
    white-space: nowrap;
    cursor: pointer;
}
.tcfh .tcfh-journey__filters button span { font-size: 11.5px; font-weight: 700; opacity: .75; font-variant-numeric: tabular-nums; }
.tcfh .tcfh-journey__filters button:hover { background: rgba(255, 255, 255, .14) !important; }
.tcfh .tcfh-journey__filters button[aria-pressed="true"] { background: var(--white) !important; color: var(--navy) !important; }
.tcfh .tcfh-journey__filters button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Tiles */
.tcfh-subject { min-width: 0; }
.tcfh .tcfh-subject a {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-height: 148px;
    height: 100%;
    padding: 14px 14px 16px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--wash);
    color: var(--ink) !important;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.tcfh .tcfh-subject a:hover { transform: translateY(-2px); border-color: var(--skill); background-color: var(--white); box-shadow: 0 14px 28px -18px rgba(15, 47, 107, .5); }
.tcfh-subject__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.tcfh-subject__kind { overflow: hidden; font-size: 12px; font-weight: 600; color: var(--faint); white-space: nowrap; text-overflow: ellipsis; }
.tcfh-subject__check { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--skill); color: var(--white); }
.tcfh-subject__check .tcfh-icon { width: 12px; height: 12px; stroke-width: 3.2; }
.tcfh-subject__check--pending { background: #f59e0b; }
.tcfh-subject__number { font: 800 44px/1 var(--display); letter-spacing: -0.04em; color: #c3cbdb; font-variant-numeric: tabular-nums; transition: color .18s ease; }
.tcfh-subject__title { display: -webkit-box; overflow: hidden; font: 700 15px/1.3 var(--display); color: var(--muted); -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tcfh .tcfh-subject a:hover .tcfh-subject__number { color: var(--skill-ink); }
.tcfh-subject__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 26px; }
.tcfh-subject__meta { font-size: 12.5px; font-weight: 600; color: var(--faint); }

/* Done: tinted, coloured number, score, NCLC (green once the goal is reached) and a score bar. */
.tcfh .tcfh-subject.is-done a { border-color: color-mix(in srgb, var(--skill) 28%, var(--white)); background: linear-gradient(160deg, var(--skill-soft), var(--white) 72%); }
.tcfh-subject.is-done .tcfh-subject__number { color: var(--skill-ink); }
.tcfh-subject.is-done .tcfh-subject__title { color: var(--navy); }
.tcfh-subject__score { min-width: 0; font-variant-numeric: tabular-nums; }
.tcfh-subject__score strong { font: 800 16px/1 var(--display); color: var(--navy); }
.tcfh-subject__score small { font-size: 11px; font-weight: 600; color: var(--faint); }
.tcfh-subject__nclc { flex: none; padding: 3px 8px; border-radius: 999px; background: var(--skill-ink); color: var(--white); font-size: 11px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.tcfh-subject__nclc.is-reached { background: var(--plus); }
.tcfh-subject__bar { position: absolute; right: 0; bottom: 0; left: 0; height: 5px; background: rgba(15, 47, 107, .07); }
.tcfh-subject__bar i { display: block; height: 100%; border-radius: 0 3px 3px 0; background: var(--skill); }

/* Opened or waiting for a correction. */
.tcfh .tcfh-subject.is-tried a, .tcfh .tcfh-subject.is-pending a { background: var(--white); }
.tcfh-subject.is-tried .tcfh-subject__number, .tcfh-subject.is-pending .tcfh-subject__number { color: var(--muted); }
.tcfh-subject.is-pending .tcfh-subject__meta { color: #9a3f06; }

/* Recommended next test. */
.tcfh .tcfh-subject.is-next a {
    border-color: var(--navy);
    background: var(--navy);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--skill) 22%, transparent), 0 18px 32px -18px rgba(15, 47, 107, .8);
}
.tcfh .tcfh-subject.is-next a:hover { background: var(--navy-deep); }
.tcfh-subject.is-next .tcfh-subject__kind { color: rgba(255, 255, 255, .74); }
.tcfh-subject.is-next .tcfh-subject__number, .tcfh .tcfh-subject.is-next a:hover .tcfh-subject__number { color: var(--white); }
.tcfh-subject.is-next .tcfh-subject__title { color: var(--white); }
.tcfh-subject__go { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px 7px 11px; border-radius: 999px; background: var(--white); color: var(--navy); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.tcfh-subject__go .tcfh-icon { width: 14px; height: 14px; }
.tcfh .tcfh-subject.is-next a:hover .tcfh-subject__go { background: var(--skill-soft); }
.tcfh-library__foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tcfh-library__foot:has(> :not([hidden])) { margin-top: 20px; }
.tcfh-library__shown { font-size: 13px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }

/* History, page heads, custom tabs --------------------------------------------------- */
.tcfh-pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 4px; }
.tcfh-pagehead h1 { font-size: clamp(26px, 2.8vw, 34px); font-weight: 800; letter-spacing: -0.025em; }
.tcfh-pagehead p { margin-top: 2px !important; font-size: 15px; color: var(--muted); }
.tcfh-pagehead + .tcfh-history, .tcfh-pagehead + .tcfh-frame, .tcfh-pagehead + .tcfh-custom__body { margin-top: -20px; }
.tcfh-history { display: grid; gap: 16px; }
.tcfh-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; }
.tcfh-toolbar__end { display: flex; align-items: center; gap: 16px; }
.tcfh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tcfh-chips button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--white);
    color: var(--navy);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}
.tcfh-chips button span { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--wash); font-size: 12px; color: var(--muted); text-align: center; }
.tcfh .tcfh-chips button { background-image: none !important; box-shadow: none !important; text-transform: none !important; letter-spacing: normal !important; }
.tcfh .tcfh-chips button,
.tcfh .tcfh-chips button:focus { background-color: var(--white) !important; border-color: var(--line) !important; color: var(--navy) !important; }
.tcfh .tcfh-chips button:hover,
.tcfh .tcfh-chips button:active { background-color: var(--mist) !important; border-color: var(--blue) !important; color: var(--navy) !important; }
.tcfh .tcfh-chips button[aria-pressed="true"],
.tcfh .tcfh-chips button[aria-pressed="true"]:hover,
.tcfh .tcfh-chips button[aria-pressed="true"]:focus,
.tcfh .tcfh-chips button[aria-pressed="true"]:active { background-color: var(--navy) !important; border-color: var(--navy) !important; color: var(--white) !important; }
.tcfh .tcfh-chips button[aria-pressed="true"] span { background: rgba(255, 255, 255, .16); color: var(--white); }
.tcfh-history__count { font-size: 13.5px; color: var(--muted); }

.tcfh-frame { display: block; width: 100%; height: 320px; border: 0; background: transparent; }

.tcfh-disclaimer { display: flex; align-items: flex-start; gap: 10px; margin-top: 44px !important; padding: 16px 4px 0; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.tcfh-disclaimer .tcfh-icon { width: 18px; height: 18px; margin-top: 1px; color: var(--faint); }
.tcfh-disclaimer span { max-width: 88ch; }

/* Login gate ------------------------------------------------------------------------ */
/* Sign-in screen: introduction and benefits on the left, a white sign-in card on the right. */
.tcfh--gate { display: block; width: min(1080px, calc(100vw - 40px)); margin-left: auto !important; margin-right: auto !important; }
.tcfh-gate {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 440px);
    grid-template-areas: "intro login" "benefits login";
    align-content: center;
    column-gap: clamp(28px, 5vw, 64px);
    row-gap: 28px;
    padding: clamp(24px, 4vw, 52px);
    border-radius: var(--radius-xl);
    border: 1px solid #dfe8f6;
    background:
        radial-gradient(90% 120% at 0% 0%, rgba(56, 93, 255, .07) 0%, rgba(56, 93, 255, 0) 60%),
        linear-gradient(135deg, #f5f8ff 0%, #f0f5ff 55%, #fcf8f1 100%);
    color: var(--ink);
}
.tcfh-gate__intro { grid-area: intro; align-self: end; }
.tcfh-gate__brand { display: flex; margin-bottom: 28px; }
.tcfh-gate h1 { max-width: 15ch; color: var(--navy); font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.tcfh-gate__intro > p { max-width: 44ch; margin-top: 14px !important; font-size: 16.5px; line-height: 1.65; color: var(--muted); }
.tcfh-gate__benefits { grid-area: benefits; align-self: start; display: grid; gap: 16px; }
.tcfh-gate__benefits li { display: flex; align-items: flex-start; gap: 14px; }
.tcfh-gate__icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--white); border: 1px solid #dfe8f6; color: var(--blue); box-shadow: 0 1px 2px rgba(15, 47, 107, .05); }
.tcfh-gate__benefits strong { display: block; font: 700 15px/1.3 var(--display); color: var(--navy); }
.tcfh-gate__benefits small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

.tcfh-login {
    grid-area: login;
    align-self: center;
    padding: clamp(22px, 3vw, 34px);
    border-radius: 20px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 24px 48px -28px rgba(15, 47, 107, .35);
}
.tcfh-login h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.tcfh-login__lead { margin-top: 6px !important; font-size: 14.5px; color: var(--muted); }
.tcfh .tcfh-login__form { display: grid; gap: 18px; margin: 24px 0 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.tcfh-login__form::before, .tcfh-login__form::after { display: none !important; }
.tcfh-field { display: grid; gap: 7px; }
.tcfh .tcfh-field label { margin: 0 !important; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tcfh-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tcfh .tcfh-field input[type="text"],
.tcfh .tcfh-field input[type="email"],
.tcfh .tcfh-field input[type="password"] {
    width: 100% !important;
    min-height: 50px;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 1.5px solid var(--line) !important;
    border-radius: 12px !important;
    background: var(--white) !important;
    box-shadow: none !important;
    color: var(--ink) !important;
    font: 500 15.5px/1.2 var(--body) !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tcfh .tcfh-field input:hover { border-color: #c9d4e6 !important; }
.tcfh .tcfh-field input:focus { border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(37, 99, 235, .16) !important; outline: none; }
.tcfh-field__password { position: relative; }
.tcfh .tcfh-field__password input { padding-right: 54px !important; }
.tcfh .tcfh-field__toggle {
    position: absolute;
    top: 50%;
    right: 5px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    transform: translateY(-50%);
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--muted) !important;
    cursor: pointer;
}
.tcfh .tcfh-field__toggle:hover,
.tcfh .tcfh-field__toggle:focus-visible { background: var(--mist) !important; color: var(--navy) !important; }
.tcfh-field__toggle [data-icon] { display: grid; place-items: center; }
.tcfh .tcfh-check { display: inline-flex; align-items: center; gap: 10px; margin: 0 !important; font-size: 14px; color: var(--ink); cursor: pointer; justify-self: start; }
.tcfh .tcfh-check input { width: 18px; height: 18px; margin: 0 !important; accent-color: var(--blue); cursor: pointer; }
.tcfh .tcfh-login__submit { width: 100%; min-height: 52px; margin-top: 2px; font-size: 16px; }
.tcfh .tcfh-login__submit.is-busy { opacity: .8; cursor: progress; }
.tcfh .tcfh-link--small { font-size: 13px; }
.tcfh-login__notices { margin-top: 18px; }
.tcfh .tcfh-login__notices :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) {
    margin: 0 !important;
    padding: 12px 14px !important;
    border: 1px solid #f3c7c2 !important;
    border-radius: 12px;
    background: #fdf1ef !important;
    color: #8f1d14 !important;
    font-size: 14px;
    line-height: 1.5;
    list-style: none;
}
.tcfh .tcfh-login__notices :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before { display: none !important; }
.tcfh .tcfh-login__notices li { margin: 0 !important; padding: 0 !important; }
.tcfh .tcfh-login__notices a { color: inherit !important; text-decoration: underline; }
.tcfh-login__register { margin-top: 22px !important; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 14.5px; color: var(--muted); text-align: center; }
.tcfh-login__secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px !important; font-size: 12.5px; color: var(--faint); }
.tcfh-login__secure .tcfh-icon { width: 15px; height: 15px; }
.tcfh .tcfh-login__form { position: relative; }
.tcfh-login__lead strong { color: var(--navy); overflow-wrap: anywhere; }
.tcfh-login .tcfh-login__notice { margin-top: 16px; font-size: 14px; }
.tcfh .tcfh-login__cta { margin-top: 24px; }
.tcfh .tcfh-textbutton--small { font-size: 13px !important; text-decoration: none; }
.tcfh .tcfh-textbutton--small:hover { text-decoration: underline; }
.tcfh-login__context { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px !important; padding: 12px 14px; border-radius: 12px; background: var(--mist); border: 1px solid #d3e0f5; color: var(--navy); font-size: 14px; line-height: 1.5; }
.tcfh-login__context .tcfh-icon { width: 18px; height: 18px; margin-top: 1px; color: var(--blue); }

/* Account ------------------------------------------------------------------------------ */
.tcfh-pagehead + .tcfh-account { margin-top: -20px; }
.tcfh-account { display: grid; gap: var(--grid-gap); }
.tcfh-notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid; border-radius: var(--radius-md); font-size: 15px; line-height: 1.5; }
.tcfh-notice .tcfh-icon { margin-top: 1px; }
.tcfh-notice--success { background: #eaf6ef; border-color: #bfe3cd; color: #0f5b3a; }
.tcfh-notice--info { background: var(--mist); border-color: #d3e0f5; color: var(--navy); }
.tcfh-notice--error { background: #fdf1ef; border-color: #f3c7c2; color: #8f1d14; }
.tcfh-profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 16px 28px; }
.tcfh-profile__avatar { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sky); color: var(--navy); font: 800 22px/1 var(--display); }
.tcfh-profile__text { display: grid; gap: 2px; min-width: 0; }
.tcfh-profile__text strong { font: 700 18px/1.3 var(--display); color: var(--navy); overflow-wrap: anywhere; }
.tcfh-profile__text span { font-size: 14.5px; color: var(--muted); overflow-wrap: anywhere; }
.tcfh-profile__meta { display: flex; gap: 28px; }
.tcfh-profile__meta dt { font-size: 12.5px; color: var(--faint); }
.tcfh-profile__meta dd { font-size: 14.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.tcfh .tcfh-profile__logout:hover, .tcfh .tcfh-profile__logout:focus { border-color: #f3c7c2 !important; background-color: #fdf1ef !important; color: var(--minus) !important; }
.tcfh-account__card { display: flex; flex-direction: column; gap: 20px; }
.tcfh-account__head { display: flex; align-items: flex-start; gap: 14px; }
.tcfh-account__icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--mist); color: var(--blue); }
.tcfh-account__head h2 { font-size: 19px; font-weight: 700; }
.tcfh-account__head p { margin-top: 4px !important; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
/* Fields start under the heading; the button sits at the card's foot so both cards' buttons line up. */
.tcfh .tcfh-form { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; gap: 16px; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.tcfh .tcfh-form .tcfh-btn { align-self: flex-start; margin-top: auto; }
.tcfh .tcfh-form .tcfh-btn.is-busy { opacity: .8; cursor: progress; }
.tcfh-field__hint { font-size: 13px; color: var(--faint); }
.tcfh-pending { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 14px; border: 1px solid #f1dfc2; border-radius: var(--radius-md); background: var(--cream); font-size: 14px; line-height: 1.5; color: #7a4a0c; }
.tcfh-pending p { overflow-wrap: anywhere; }
.tcfh-pending strong { color: #5c3708; }
.tcfh .tcfh-pending form { margin: 0 !important; }
.tcfh .tcfh-textbutton { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; color: var(--blue) !important; font: 600 14px/1.4 var(--body) !important; text-decoration: underline; text-underline-offset: 3px; text-transform: none !important; cursor: pointer; }

@media (max-width: 860px) {
    .tcfh-gate { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "login" "benefits"; row-gap: 24px; }
    .tcfh-gate__intro { align-self: start; }
    .tcfh-gate__brand { margin-bottom: 20px; }
    .tcfh-gate h1 { max-width: none; }
    .tcfh-gate__benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
}

@media (max-width: 520px) {
    .tcfh-logo--gate img { height: 48px !important; }
    .tcfh-gate { padding: 20px 16px; border-radius: 20px; }
    .tcfh-login { padding: 20px 18px; border-radius: 16px; }
    .tcfh-gate h1 { font-size: 28px; }
    .tcfh-gate__benefits { grid-template-columns: minmax(0, 1fr); }
}

/* Exam plan, questionnaire and "Mon examen" ------------------------------------------ */
.tcfh--plan .tcfh-gate { grid-template-columns: minmax(0, 1fr) minmax(340px, 460px); }
.tcfh--feedback .tcfh-gate { grid-template-columns: minmax(0, .85fr) minmax(360px, 560px); }
.tcfh--feedback .tcfh-gate { grid-template-rows: auto 1fr; }
.tcfh--feedback .tcfh-gate__intro { align-self: start; }
.tcfh--feedback .tcfh-gate__benefits { align-self: start; }
.tcfh .tcfh-field input[type="date"],
.tcfh .tcfh-field textarea {
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    border: 1.5px solid var(--line) !important;
    border-radius: 12px !important;
    background: var(--white) !important;
    box-shadow: none !important;
    color: var(--ink) !important;
    font: 500 15.5px/1.45 var(--body) !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tcfh .tcfh-field input[type="date"] { min-height: 50px; color-scheme: light; }
.tcfh .tcfh-field input[type="date"]:disabled { background: var(--wash) !important; color: var(--faint) !important; cursor: not-allowed; }
.tcfh .tcfh-field textarea { min-height: 84px; resize: vertical; }
.tcfh .tcfh-field textarea:focus, .tcfh .tcfh-field input[type="date"]:focus { border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(37, 99, 235, .16) !important; outline: none; }
.tcfh .tcfh-field label small { font-weight: 500; color: var(--faint); }
.tcfh fieldset.tcfh-field { min-width: 0; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.tcfh .tcfh-field legend { float: left; width: 100%; margin: 0 0 9px !important; padding: 0 !important; font-size: 13.5px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.tcfh .tcfh-field legend + * { clear: both; }

/* "Date pas encore fixée" switch. */
.tcfh .tcfh-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 0 !important; font-size: 14px !important; font-weight: 500 !important; color: var(--ink); cursor: pointer; justify-self: start; }
.tcfh-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tcfh-switch__track { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: #d5dce8; transition: background-color .15s ease; }
.tcfh-switch__track span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(15, 47, 107, .25); transition: transform .15s ease; }
.tcfh-switch input:checked + .tcfh-switch__track { background: var(--blue); }
.tcfh-switch input:checked + .tcfh-switch__track span { transform: translateX(16px); }
.tcfh-switch input:focus-visible + .tcfh-switch__track { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Country picker: enhances the native select. */
.tcfh-flag { display: block; flex: none; width: 24px; height: 18px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(15, 47, 107, .12); }
.tcfh-country { position: relative; }
.tcfh .tcfh-country__button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 1.5px solid var(--line) !important;
    border-radius: 12px !important;
    background: var(--white) !important;
    box-shadow: none !important;
    color: var(--ink) !important;
    font: 500 15.5px/1.2 var(--body) !important;
    text-align: left;
    text-transform: none !important;
    cursor: pointer;
}
.tcfh .tcfh-country__button:hover { border-color: #c9d4e6 !important; }
.tcfh .tcfh-country__button:focus-visible, .tcfh .tcfh-country.is-open .tcfh-country__button { border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(37, 99, 235, .16) !important; outline: none; }
.tcfh .tcfh-country.is-invalid .tcfh-country__button { border-color: var(--minus) !important; }
.tcfh-country__value { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tcfh-country__value.is-placeholder { color: var(--faint); }
.tcfh-country__globe { display: grid; place-items: center; flex: none; width: 24px; height: 18px; color: var(--faint); }
.tcfh-country__globe .tcfh-icon { width: 18px; height: 18px; }
.tcfh-country__chevron { flex: none; color: var(--muted); transition: transform .15s ease; }
.tcfh-country.is-open .tcfh-country__chevron { transform: rotate(180deg); }
.tcfh-country__panel { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 0 22px 44px -24px rgba(15, 47, 107, .45); }
.tcfh .tcfh-country__search { width: 100% !important; min-height: 42px; margin: 0 0 6px !important; padding: 0 12px !important; border: 1.5px solid var(--line) !important; border-radius: 10px !important; background: var(--wash) !important; box-shadow: none !important; font: 500 15px/1.2 var(--body) !important; color: var(--ink) !important; }
.tcfh .tcfh-country__search:focus { border-color: var(--blue) !important; background: var(--white) !important; outline: none; }
.tcfh-country__list { max-height: 272px; margin: 0 !important; padding: 0 !important; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.tcfh-country__group { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; color: var(--faint); }
.tcfh-country__option { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 10px; border-radius: 9px; font-size: 15px; color: var(--ink); cursor: pointer; }
.tcfh-country__option.is-active { background: var(--mist); }
.tcfh-country__option[aria-selected="true"] { font-weight: 600; color: var(--navy); }
.tcfh-country__option[aria-selected="true"]::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--blue); }
.tcfh-country__empty { padding: 14px 10px; font-size: 14px; color: var(--muted); }
.tcfh-country__error { margin-top: 6px !important; font-size: 13px; font-weight: 600; color: var(--minus); }

.tcfh .tcfh-plan__consent { align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--wash); line-height: 1.45; }
.tcfh .tcfh-plan__consent input { margin-top: 2px !important; flex: none; }
.tcfh-plan__consent small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--faint); }

/* Questionnaire choices and rating. */
.tcfh-choices__row { display: flex; flex-wrap: wrap; gap: 8px; }
.tcfh-choice { position: relative; margin: 0 !important; cursor: pointer; }
.tcfh-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tcfh-choice span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); font-size: 14.5px; font-weight: 600; color: var(--ink); transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.tcfh-choice:hover span { border-color: #c9d4e6; }
.tcfh-choice input:checked + span { border-color: var(--navy); background: var(--navy); color: var(--white); }
.tcfh-choice input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.tcfh-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.tcfh-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tcfh .tcfh-stars label { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 !important; border-radius: 10px; color: #c3cad8; cursor: pointer; }
.tcfh-stars label .tcfh-icon { width: 30px; height: 30px; }
.tcfh .tcfh-stars input:checked ~ label, .tcfh .tcfh-stars label:hover, .tcfh .tcfh-stars label:hover ~ label { color: #f59e0b; }
.tcfh-stars input:checked ~ label .tcfh-icon, .tcfh-stars label:hover .tcfh-icon, .tcfh-stars label:hover ~ label .tcfh-icon { fill: currentColor; }
.tcfh-stars input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 1px; }
.tcfh .tcfh-feedback__skip { justify-self: center; margin-top: -4px !important; color: var(--muted) !important; }

/* "Mon examen" on the overview. */
.tcfh-exam { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 32px; }
.tcfh-exam__count { display: grid; justify-items: center; min-width: 116px; padding: 14px 18px; border-radius: var(--radius-md); background: linear-gradient(135deg, #f5f8ff, #eef3ff); text-align: center; }
.tcfh-exam__count strong { font: 800 30px/1.1 var(--display); letter-spacing: -0.02em; color: var(--navy); }
.tcfh-exam__count small { margin-top: 2px; font-size: 13px; color: var(--muted); }
.tcfh-exam.is-unscheduled .tcfh-exam__count { background: var(--wash); }
.tcfh-exam__icon { color: var(--blue); }
.tcfh-exam__icon .tcfh-icon { width: 30px; height: 30px; }
.tcfh-exam__facts { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 0; }
.tcfh-exam__facts dt { font-size: 12.5px; color: var(--faint); }
.tcfh-exam__facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.tcfh-exam__country { display: flex; align-items: center; gap: 8px; }
.tcfh-main__notice { margin-bottom: 20px; }

@media (max-width: 860px) {
    .tcfh--plan .tcfh-gate, .tcfh--feedback .tcfh-gate { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
}
@media (max-width: 680px) {
    .tcfh-exam { grid-template-columns: minmax(0, 1fr); }
    .tcfh-exam__count { justify-items: start; text-align: left; }
    .tcfh-exam__action { width: 100%; }
    .tcfh-exam__facts { gap: 12px 24px; }
}

/* Responsive -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
    .tcfh { grid-template-columns: 272px minmax(0, 1fr); gap: 24px; }
    /* Narrower sidebar: every entry stays on one line. */
    .tcfh-nav { padding: 18px 10px; }
    .tcfh-nav__link, .tcfh-nav__parent { gap: 12px; }
    .tcfh-nav__name { font-size: 14.5px; }
    .tcfh-nav__sub { margin-left: 26px !important; padding-left: 12px !important; }
    .tcfh-nav__sublink { padding: 10px; font-size: 14px; white-space: nowrap; }
    .tcfh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tcfh-col-5, .tcfh-col-7 { grid-column: 1 / -1; }
    .tcfh-scoreboard { grid-template-columns: minmax(0, 1fr); }
    .tcfh-scoreboard__current { padding-right: 0; border-right: 0; }
    .tcfh-ladder__scale, .tcfh-ladder__row { grid-template-columns: minmax(170px, 200px) minmax(0, 1fr) 100px; column-gap: 24px; }
    .tcfh-profile { grid-template-columns: auto minmax(0, 1fr) auto; }
    .tcfh-profile__meta { grid-column: 2 / -1; grid-row: 2; }
}

@media (max-width: 960px) {
    /* Phones and tablets: fill the theme's content column instead of breaking out, so an off-centre theme can't push the hub off-screen. */
    .tcfh { grid-template-columns: minmax(0, 1fr); gap: 16px; width: auto; max-width: 100% !important; margin-top: 12px !important; margin-left: 0 !important; margin-right: 0 !important; overflow-x: clip; }
    /* The bar must not scroll or clip: its menu opens as a dropdown below it. */
    .tcfh-nav { top: 0; z-index: 30; max-height: none; overflow: visible; padding: 6px; gap: 0; border-radius: var(--radius-md); box-shadow: 0 8px 20px -14px rgba(15, 47, 107, .4); }
    .admin-bar .tcfh-nav { top: 32px; max-height: none; }
    .tcfh-nav__list { gap: 2px; }
    .tcfh-nav__link, .tcfh-nav__parent { min-height: 50px; padding: 8px 10px; }
    .tcfh-nav__brand { display: none; }
    .tcfh.is-enhanced .tcfh-nav__toggle { display: flex; }
    .tcfh-nav__toggle { width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 6px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--navy); cursor: pointer; text-align: left; }
    .tcfh .tcfh-nav__toggle,
    .tcfh .tcfh-nav__toggle:focus { background-color: transparent !important; background-image: none !important; box-shadow: none !important; color: var(--navy) !important; text-transform: none !important; }
    .tcfh .tcfh-nav__toggle:hover,
    .tcfh .tcfh-nav__toggle:active,
    .tcfh .tcfh-nav.is-open .tcfh-nav__toggle { background-color: var(--mist) !important; color: var(--navy) !important; }
    .tcfh-nav__toggle-label { display: grid; min-width: 0; line-height: 1.2; }
    .tcfh-nav__toggle-label small { font-size: 12px; color: var(--faint); }
    .tcfh-nav__toggle-label strong { overflow: hidden; font: 700 15px/1.25 var(--display); white-space: nowrap; text-overflow: ellipsis; }
    .tcfh-nav__toggle .tcfh-icon { transition: transform .15s ease; }
    .tcfh-nav.is-open .tcfh-nav__toggle .tcfh-icon { transform: rotate(180deg); }
    .tcfh.is-enhanced .tcfh-nav__menu {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        max-height: min(70vh, 560px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 8px;
        background: var(--white);
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        box-shadow: 0 18px 40px -18px rgba(15, 47, 107, .45);
    }
    .tcfh.is-enhanced .tcfh-nav.is-open .tcfh-nav__menu { display: flex; }

    /* Quick bar: overview, the four skills (coloured codes with a plain word) and the full menu. */
    .tcfh.is-enhanced .tcfh-quicknav { display: block; }
    /* The opened menu lists only what the bar doesn't show: history, custom tabs, credits and account. */
    .tcfh.is-enhanced .tcfh-nav__item--primary { display: none !important; }
    .tcfh.is-enhanced .tcfh-nav__menu .tcfh-nav__list > .tcfh-nav__group:not(.tcfh-nav__item--primary) { padding-top: 6px; }
    .tcfh-quicknav__bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
    .tcfh .tcfh-quicknav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-width: 0;
        min-height: 62px;
        margin: 0 !important;
        padding: 6px 2px !important;
        border: 0 !important;
        border-radius: 12px !important;
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        color: var(--muted) !important;
        font: 600 12px/1.15 var(--body) !important;
        letter-spacing: normal !important;
        text-align: center;
        text-decoration: none !important;
        text-transform: none !important;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .tcfh-quicknav__mark { display: grid; place-items: center; width: 36px; height: 30px; border-radius: 9px; background: var(--wash); color: var(--navy); font: 800 12px/1 var(--display); letter-spacing: .02em; transition: background-color .15s ease, color .15s ease; }
    .tcfh-quicknav__mark .tcfh-icon { width: 18px; height: 18px; }
    .tcfh-quicknav__item[class*="tcfh-skill--"] .tcfh-quicknav__mark { background: var(--skill-soft); color: var(--skill-ink); }
    .tcfh-quicknav__label { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .tcfh .tcfh-quicknav__item:hover,
    .tcfh .tcfh-quicknav__item:focus-visible { background: var(--mist) !important; color: var(--navy) !important; }
    .tcfh .tcfh-quicknav__item.is-active { background: var(--mist) !important; color: var(--navy) !important; font-weight: 700 !important; }
    .tcfh-quicknav__item.is-active .tcfh-quicknav__mark { background: var(--navy); color: var(--white); }
    .tcfh .tcfh-quicknav__item[class*="tcfh-skill--"].is-active { background: var(--skill-soft) !important; color: var(--skill-ink) !important; }
    .tcfh-quicknav__item[class*="tcfh-skill--"].is-active .tcfh-quicknav__mark { background: var(--skill); color: var(--white); }
    .tcfh .tcfh-nav.is-open .tcfh-quicknav__item--menu { background: var(--mist) !important; color: var(--navy) !important; }
    .tcfh-nav.is-open .tcfh-quicknav__item--menu .tcfh-quicknav__mark { background: var(--navy); color: var(--white); }
    /* Simulateur / Exemples corrigés: a segmented control, so the choice reads clearly on a phone. */
    .tcfh-quicknav__sub {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin-top: 10px;
        padding: 5px;
        border-radius: 14px;
        background: var(--wash);
        border: 1px solid var(--line-soft);
    }
    .tcfh .tcfh-quicknav__sublink {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-width: 0;
        min-height: 48px;
        padding: 8px 10px;
        border-radius: 10px;
        background: transparent;
        color: var(--muted) !important;
        font: 600 14px/1.25 var(--body);
        text-align: center;
        /* The label wraps rather than spilling out of its option on narrow phones. */
        white-space: normal;
        overflow-wrap: break-word;
        transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
    }
    .tcfh-quicknav__sublink small {
        display: inline-grid;
        place-items: center;
        flex: none;
        min-width: 24px;
        padding: 2px 7px;
        border-radius: 999px;
        background: var(--white);
        border: 1px solid var(--line);
        font-size: 12px;
        font-weight: 700;
        color: var(--muted);
    }
    .tcfh .tcfh-quicknav__sublink:hover { background: var(--white); color: var(--navy) !important; }
    .tcfh .tcfh-quicknav__sublink.is-active {
        background: var(--skill) !important;
        color: var(--white) !important;
        font-weight: 700;
        box-shadow: 0 2px 8px -3px rgba(15, 47, 107, .5);
    }
    .tcfh-quicknav__sublink.is-active small { background: rgba(255, 255, 255, .22); border-color: transparent; color: var(--white); }
    .tcfh-quicknav__current { display: flex; align-items: baseline; gap: 6px; min-width: 0; margin-top: 6px !important; padding: 8px 10px 4px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--faint); }
    .tcfh-quicknav__current strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; color: var(--navy); }
    .tcfh-nav__group { padding: 10px 12px 4px; }
    .tcfh-panel { gap: 36px; }
    .tcfh-col-6 { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .tcfh { --card-pad: 18px; --grid-gap: 14px; font-size: 15.5px; }
    .tcfh-panel { gap: 32px; }
    .tcfh-hero { border-radius: 20px; }
    .tcfh-ladder__scale { grid-template-columns: minmax(0, 1fr); }
    .tcfh-ladder__scale .tcfh-ladder__spacer { display: none; }
    .tcfh-ladder__row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; padding: 12px 0; border-top: 1px solid #e3eaf5; }
    .tcfh-ladder__label { grid-column: 1; }
    .tcfh-ladder__value { grid-column: 2; grid-row: 1; justify-items: end; text-align: right; }
    .tcfh-ladder__track { grid-column: 1 / -1; margin: 8px 0 2px; }
    .tcfh-ladder__legend span:last-child { margin-left: 0; }
    .tcfh-kpi { padding: 16px; column-gap: 12px; }
    .tcfh-kpi__icon { width: 36px; height: 36px; }
    .tcfh-kpi__value { font-size: 22px; }
    .tcfh-kpi__hint { margin-top: 10px; padding-top: 10px; }
    .tcfh-attempts { margin: -6px -8px !important; }
    .tcfh-attempt { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 8px; }
    .tcfh-attempt + .tcfh-attempt::before { left: 54px; right: 8px; }
    .tcfh-attempt__mark { width: 34px; height: 34px; border-radius: 10px; }
    .tcfh-attempt__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .tcfh-attempt__chevron { display: none; }
    .tcfh-heatmap { grid-template-columns: 28px repeat(12, minmax(0, 1fr)); gap: 4px; }
    .tcfh-rhythm__stats dd { font-size: 16px; }
    .tcfh-scoreboard { padding: 20px 18px; }
    .tcfh-scoreboard__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tcfh-scoreboard__current strong { font-size: 48px; }
    .tcfh-chart__frame { grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: 170px auto; column-gap: 8px; }
    .tcfh-card__head { flex-wrap: wrap; row-gap: 4px; }
    .tcfh-card__aside { white-space: normal; }
    .tcfh-wallet__actions { flex-wrap: wrap; width: 100%; gap: 10px 16px; }
    .tcfh-gaps__caption { flex-wrap: wrap; }
    .tcfh-link { white-space: normal; }
    .tcfh-next__actions .tcfh-btn { flex: 1 1 auto; }
    /* Main action first and full width; secondary actions share one row. */
    .tcfh-skillhead { gap: 16px; }
    .tcfh-skillhead__icon { width: 44px; height: 44px; border-radius: 13px; }
    .tcfh-skillhead__icon .tcfh-icon { width: 22px; height: 22px; }
    .tcfh-skillhead__title { gap: 12px; }
    .tcfh-skillhead__actions { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
    .tcfh-skillhead__actions .tcfh-btn--primary { order: -1; flex: 1 1 100%; }
    .tcfh-skillhead__actions .tcfh-btn--ghost { flex: 1 1 calc(50% - 5px); min-width: 0; padding: 0 12px; }
    .tcfh-tasks { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
    .tcfh-tasks button { justify-content: center; gap: 6px; padding: 0 6px; font-size: 13.5px; white-space: nowrap; }
    .tcfh-tasks button span { min-width: 18px; padding: 0 5px; }
    .tcfh-section__head .tcfh-search { width: 100%; }
    .tcfh-subjects { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
    .tcfh-toolbar__end { width: 100%; justify-content: space-between; }
    .tcfh-profile { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
    .tcfh-profile__avatar { width: 48px; height: 48px; font-size: 19px; }
    .tcfh-profile__meta { grid-column: 1 / -1; grid-row: auto; flex-wrap: wrap; gap: 12px 28px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
    .tcfh-profile__logout { grid-column: 1 / -1; width: 100%; }
    .tcfh-account__card { gap: 18px; }
    .tcfh .tcfh-form .tcfh-btn { align-self: stretch; }
}

@media (max-width: 782px) {
    .admin-bar .tcfh-nav { top: 46px; }
}

@media (max-width: 600px) {
    /* WordPress's admin bar scrolls away on small phones. */
    .admin-bar .tcfh-nav { top: 0; }
}

@media (max-width: 420px) {
    .tcfh { --card-pad: 16px; }
    .tcfh .tcfh-quicknav__item { font-size: 11.5px !important; }
    .tcfh-quicknav__mark { width: 32px; height: 28px; font-size: 11.5px; }
    .tcfh .tcfh-quicknav__sublink { min-height: 46px; padding: 8px 6px; font-size: 13.5px; gap: 6px; }
    .tcfh-quicknav__sublink small { min-width: 22px; padding: 2px 6px; }
    .tcfh-btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
    .tcfh-hero { padding: 20px 18px; }
    .tcfh-hero h1 { font-size: 28px; }
    .tcfh-ladder__label { gap: 10px; font-size: 14px; }
    .tcfh-ladder__label .tcfh-code { width: 28px; height: 28px; font-size: 11px; }
    /* Stacked KPI: icon, label, value at the top; hint pinned to the bottom so values line up across cards. */
    .tcfh-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; }
    .tcfh-kpi__icon { width: 32px; height: 32px; margin-bottom: 8px; }
    .tcfh-kpi__label { align-self: stretch; min-height: 2.6em; display: flex; align-items: flex-end; line-height: 1.3; }
    .tcfh-kpi__value { align-self: flex-start; }
    .tcfh-kpi__hint { width: 100%; margin-top: auto; }
    .tcfh-kpi__icon .tcfh-icon { width: 18px; height: 18px; }
    .tcfh-kpi__value { font-size: 22px; }
    .tcfh-heatmap { grid-template-columns: 24px repeat(12, minmax(0, 1fr)); gap: 3px; }
    .tcfh-heatmap__day { font-size: 10px; }
    .tcfh-heat { border-radius: 3px; }
    .tcfh-rhythm__stats dt { font-size: 12px; }
    .tcfh-rhythm__stats dd { font-size: 15px; }
    .tcfh-scoreboard__current strong { font-size: 42px; }
    .tcfh-scoreboard__stats > div { padding: 12px; }
    .tcfh-scoreboard__stats dd { font-size: 18px; }
    .tcfh-wallet__figure strong { font-size: 34px; }
    .tcfh-chart__x span.is-mid { display: none; }
    .tcfh-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tcfh .tcfh-subject a { min-height: 128px; padding: 12px 12px 14px; border-radius: 16px; }
    .tcfh-subject__number { font-size: 36px; }
    .tcfh-subject__title { font-size: 14px; }
    .tcfh-subject__foot { flex-wrap: wrap; row-gap: 6px; }
    .tcfh-subject__go { width: 100%; justify-content: center; }
    .tcfh-journey { grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; padding: 16px; border-radius: 18px; }
    .tcfh-journey__ring, .tcfh-journey__ring svg { width: 64px; height: 64px; }
    .tcfh-journey__filters { grid-column: 1 / -1; }
    .tcfh .tcfh-journey__filters button { flex: 1 1 0; padding: 0 8px !important; }
    .tcfh-attempt__score { min-width: 0; }
    .tcfh-chips button { min-height: 38px; padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .tcfh *, .tcfh *::before, .tcfh *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
    .tcfh { display: block; width: auto; margin: 0 !important; }
    .tcfh-nav, .tcfh-btn, .tcfh-goal, .tcfh-search, .tcfh-chips, .tcfh-frame, .tcfh-attempt__chevron { display: none !important; }
    .tcfh-hero { background: none; color: var(--ink); border: 1px solid var(--line); }
    .tcfh-hero h1, .tcfh-ladder__label, .tcfh-ladder__value strong { color: var(--navy) !important; }
    .tcfh-card, .tcfh-section { break-inside: avoid; }
}
