/* Aurelian Learning Guide. Brand: Royal Blue on deep navy; Fraunces for voice, Instrument Sans for work.
   Fonts are bundled (SIL OFL) so no request leaves the visitor's browser. No shadows, glows or gradients. */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/fraunces-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/fraunces-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/instrument-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/instrument-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/instrument-sans-latin-600-normal.woff2') format('woff2'); }

html { --cl-fs: 1; }
html[data-cl-fs="-1"] { --cl-fs: .92; }
html[data-cl-fs="1"] { --cl-fs: 1.12; }
html[data-cl-fs="2"] { --cl-fs: 1.25; }
html[data-cl-fs="3"] { --cl-fs: 1.4; }

.cl {
  --cl-royal: #2A4BD7;
  --cl-primary: #2A4BD7;        /* links, accents */
  --cl-btn: #2A4BD7;            /* primary buttons */
  --cl-accent: #2A4BD7;
  --cl-sky: #9DB2FF;
  --cl-ink: #0E1A33;
  --cl-bg: #ffffff;
  --cl-surface: #F4F6FA;
  --cl-line: #E4E9F2;
  --cl-muted: #56627A;
  --cl-hero-bg: #0B1F4B;
  --cl-hero-ink: #ffffff;
  --cl-hero-accent: #9DB2FF;
  --cl-ok: #1d7a4a;
  --cl-warn: #8a5200;
  --cl-bad: #b3261e;
  --cl-radius: 8px;
  --cl-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --cl-sans: 'Instrument Sans', Arial, Helvetica, sans-serif;
  background: var(--cl-bg);
  color: var(--cl-ink);
  font-family: var(--cl-sans);
  font-size: calc(1.0625rem * var(--cl-fs));
  line-height: 1.6;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
}
html[data-cl-theme="dark"] .cl {
  --cl-primary: #9DB2FF;
  --cl-accent: #9DB2FF;
  --cl-ink: #E4E9F2;
  --cl-bg: #0B1F4B;
  --cl-surface: #07142F;
  --cl-line: #243b73;
  --cl-muted: #A9B4CC;
  --cl-hero-bg: #07142F;
  --cl-ok: #5fd195;
  --cl-warn: #f0b45a;
  --cl-bad: #ff8d84;
}
body.cl-page { overflow-x: clip; }
html[data-cl-theme="dark"] body.cl-page { background: #0B1F4B; color: #E4E9F2; }
html[data-cl-theme="dark"] body.cl-page :where(header, footer, .wp-block-template-part):not(.cl-hero) { background-color: #07142F; color: #E4E9F2; }
html[data-cl-theme="dark"] body.cl-page :where(header, footer, .wp-block-template-part):not(.cl-hero) a { color: #E4E9F2; }
body .cl.cl { width: 100vw !important; max-width: 100vw !important; margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important; padding-left: 0 !important; padding-right: 0 !important; }
body .cl.cl > :not(.cl-hero) { max-width: 1180px !important; margin-left: auto !important; margin-right: auto !important; }
.cl *, .cl *::before, .cl *::after { box-sizing: border-box; }
.cl > :not(.cl-hero) { max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.cl h1, .cl h2, .cl h3 { color: inherit; line-height: 1.25; margin: 0 0 .5em; }
.cl a { color: var(--cl-primary); text-underline-offset: 3px; }
.cl p { margin: 0 0 1em; }
.cl [hidden] { display: none !important; }
.cl-muted { color: var(--cl-muted); }
.cl-small { font-size: .88rem; }
.cl-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Hide the theme's own title on topic pages; the hero carries it. */
.single-canon_topic .entry-title, .single-canon_topic .wp-block-post-title, .single-canon_topic .page-header,
.cl-page .entry-header .entry-title, .cl-page .wp-block-post-title { display: none; }
.single-canon_topic .wp-block-post-author, .single-canon_topic .wp-block-post-author-name, .single-canon_topic .wp-block-post-date, .single-canon_topic .wp-block-post-terms, .single-canon_topic .wp-block-group:has(> .wp-block-post-author-name) { display: none; }
.single-canon_topic .entry-content, .single-canon_topic .wp-block-post-content, .cl-page .entry-content, .cl-page .wp-block-post-content {
  max-width: none !important; padding: 0 !important; margin: 0 !important;
}

/* Hero */
.cl-hero { background: var(--cl-hero-bg); color: var(--cl-hero-ink); padding: 52px 0 40px; width: 100%; }
.cl-hero__in { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.cl-hero a { color: inherit; }
.cl-kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 600; color: var(--cl-muted); margin-bottom: .8em; }
.cl-hero .cl-kicker { color: var(--cl-hero-accent); }
.cl-kicker a { text-decoration: none; }
.cl-title { font-size: clamp(2rem, 4.6vw, 3.2rem); margin: 0 0 .25em; font-weight: 700; }
.cl-by { font-size: 1.05rem; opacity: .85; margin-bottom: 1em; }
.cl-lede { max-width: 62ch; font-size: 1.12rem; opacity: .92; }
.cl-badges, .cl-chips, .cl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cl-chips { margin-top: 12px; }
.cl-chip { font-size: .8rem; padding: 3px 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 99px; text-decoration: none; }
.cl-chip:hover { background: rgba(255,255,255,.12); }
.cl-badge { display: inline-block; font-size: .75rem; padding: 2px 9px; border-radius: 99px; background: color-mix(in srgb, var(--cl-ink) 9%, var(--cl-bg)); color: var(--cl-ink); font-weight: 600; letter-spacing: .02em; }
.cl-hero .cl-badge { background: rgba(255,255,255,.14); color: #fff; }
.cl-badge--ok { background: color-mix(in srgb, var(--cl-ok) 16%, var(--cl-bg)); color: var(--cl-ok); }
.cl-hero .cl-badge--ok { background: var(--cl-ok); color: #fff; }
.cl-badge--pd { background: color-mix(in srgb, var(--cl-accent) 16%, var(--cl-bg)); color: var(--cl-primary); }
.cl-hero .cl-badge--pd { background: var(--cl-sky); color: #0B1F4B; }
.cl-stats { display: flex; gap: 32px; margin: 22px 0; flex-wrap: wrap; }
.cl-stats b { display: block; font-size: 1.9rem; line-height: 1.1; }
.cl-stats span { font-size: .82rem; opacity: .8; }

/* Buttons and forms */
.cl-btn { display: inline-block; cursor: pointer; font: inherit; font-weight: 600; font-size: .92rem; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--cl-primary); background: transparent; color: var(--cl-primary); text-decoration: none; line-height: 1.3; }
.cl-btn:hover { background: color-mix(in srgb, var(--cl-primary) 8%, var(--cl-bg)); }
.cl-btn--primary { background: var(--cl-btn); border-color: var(--cl-btn); color: #fff !important; }
.cl-btn--primary:hover { background: color-mix(in srgb, var(--cl-btn) 88%, #000); }
.cl-hero .cl-btn--primary { background: var(--cl-sky); border-color: var(--cl-sky); color: #0B1F4B !important; }
.cl-btn--danger { border-color: var(--cl-bad); color: var(--cl-bad); }
.cl-btn:focus-visible, .cl a:focus-visible, .cl input:focus-visible, .cl textarea:focus-visible, .cl summary:focus-visible { outline: 3px solid var(--cl-accent); outline-offset: 2px; }
.cl-form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.cl-form input[type=text], .cl-form input[type=email], .cl-form input[type=password], .cl-form input[type=search], .cl input[type=search], .cl textarea, .cl-form input[type=number] {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; font-weight: 400; border: 1px solid var(--cl-line); border-radius: 8px; background: var(--cl-bg); color: var(--cl-ink);
}
.cl-check { font-weight: 400 !important; }
.cl-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.cl-msg { padding: 12px 16px; border-radius: 8px; margin-top: 20px; font-weight: 600; }
.cl-msg--ok { background: color-mix(in srgb, var(--cl-ok) 12%, var(--cl-bg)); color: var(--cl-ok); }
.cl-msg--err { background: color-mix(in srgb, var(--cl-bad) 10%, var(--cl-bg)); color: var(--cl-bad); }

/* Cards */
.cl-card { background: var(--cl-bg); border: 1px solid var(--cl-line); border-radius: var(--cl-radius); padding: 18px 20px; margin-bottom: 16px; }
.cl-card h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cl-muted); }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.cl-grid .cl-card h3 { text-transform: none; letter-spacing: 0; font-size: 1.05rem; color: var(--cl-ink); }
.cl-auth { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; padding-top: 32px; padding-bottom: 48px; }
.cl-account > .cl-card, .cl-account > details { margin-top: 24px; }
.cl-narrow { max-width: 460px !important; margin-top: 40px; margin-bottom: 48px; }
.cl-lock { text-align: center; background: var(--cl-surface); border: 1px dashed var(--cl-line); border-radius: var(--cl-radius); padding: 28px 20px; }
.cl-lock h3 { text-transform: none; letter-spacing: 0; color: var(--cl-ink); font-size: 1.15rem; }

/* Topic layout */
.cl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; padding-top: 32px; padding-bottom: 56px; }
.cl-main { min-width: 0; max-width: 74ch; }
.cl-side { align-self: start; position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
body.admin-bar .cl-side { top: 52px; max-height: calc(100vh - 72px); }
.cl-sec { margin-bottom: 36px; }
.cl-sec h2 { font-size: 1.45rem; padding-bottom: .35em; border-bottom: 2px solid var(--cl-accent); display: inline-block; }
.cl-sec h3 { font-size: 1.1rem; margin-top: 1.2em; }
.cl-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; position: sticky; top: 0; background: var(--cl-bg); z-index: 3; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--cl-line); }
body.admin-bar .cl-jump { top: 32px; }
.cl-jump a { font-size: .85rem; padding: 4px 12px; border-radius: 99px; background: var(--cl-surface); text-decoration: none; }
.cl-jump a:hover { background: color-mix(in srgb, var(--cl-primary) 12%, var(--cl-bg)); }
.cl-sched { font-size: .9rem; color: var(--cl-muted); border-left: 3px solid var(--cl-accent); padding-left: 12px; }
.cl-draftnote { background: color-mix(in srgb, var(--cl-warn) 12%, var(--cl-bg)); color: var(--cl-warn); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.cl-chapters { list-style: none; counter-reset: ch; padding: 0; margin: 0; }
.cl-chapters > li { counter-increment: ch; position: relative; padding-left: 52px; margin-bottom: 26px; }
.cl-chapters > li::before { content: counter(ch); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--cl-btn); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.cl-chapters h3 { margin-top: 0; }
.cl-ideas { margin: 0 0 .8em; padding-left: 1.2em; color: var(--cl-muted); font-size: .95rem; }
.cl-srcs { font-size: .82rem; color: var(--cl-muted); margin: 0; }
.cl-src { margin-left: 6px; }
.cl-interp { border-left: 4px solid var(--cl-primary); background: var(--cl-surface); padding: 16px 20px; border-radius: 0 var(--cl-radius) var(--cl-radius) 0; margin-bottom: 18px; }
.cl-interp h3 { margin-top: 0; }
.cl-obj { font-size: .95rem; }
.cl-flag { font-size: .82rem; color: var(--cl-warn); margin: 0; }
.cl-terms dt { font-weight: 700; margin-top: 12px; }
.cl-terms dd { margin: 0 0 0 0; color: var(--cl-ink); }
.cl-terms--wide { padding-top: 24px; padding-bottom: 48px; column-width: 380px; column-gap: 40px; }
.cl-terms--wide dd { margin-bottom: 8px; break-inside: avoid; }
.cl-use { background: color-mix(in srgb, var(--cl-accent) 10%, var(--cl-bg)); padding: 20px 24px; border-radius: var(--cl-radius); }
.cl-curator { background: var(--cl-surface); padding: 20px 24px; border-radius: var(--cl-radius); }
.cl-pager { display: flex; gap: 16px; justify-content: space-between; margin-top: 40px; }
.cl-pager a { flex: 1; padding: 14px 16px; border: 1px solid var(--cl-line); border-radius: var(--cl-radius); text-decoration: none; font-weight: 600; }
.cl-pager a small { display: block; color: var(--cl-muted); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.cl-pager .cl-next { text-align: right; }

/* Sidebar */
.cl-timer__t { font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 4px 0 6px; color: var(--cl-primary); }
.cl-timer .cl-row { margin: 10px 0; }
.cl-stars { display: flex; gap: 2px; }
.cl-stars button { background: none; border: 0; cursor: pointer; font-size: 1.5rem; color: var(--cl-line); padding: 0 2px; line-height: 1; }
.cl-stars button.on { color: var(--cl-accent); }
.cl-video { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; margin-bottom: 8px; }
.cl-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cl-links ul { list-style: none; margin: 0; padding: 0; }
.cl-links li { padding: 7px 0; border-top: 1px solid var(--cl-line); display: flex; flex-direction: column; font-size: .93rem; }
.cl-links li:first-child { border-top: 0; }
.cl-links li small { color: var(--cl-muted); font-size: .78rem; }
.cl-checkin { background: color-mix(in srgb, var(--cl-accent) 18%, var(--cl-bg)); padding: 10px 12px; border-radius: 8px; font-size: .9rem; margin-top: 8px; }

/* Quiz, notes, tutor */
.cl-quiz, .cl-tutor, .cl-notes { background: var(--cl-surface); border-radius: var(--cl-radius); padding: 20px 22px; }
.cl-q__n { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--cl-muted); }
.cl-q__t { font-size: 1.15rem; font-weight: 600; margin: 4px 0 14px; }
.cl-opt { display: block; width: 100%; text-align: left; font: inherit; padding: 11px 14px; margin-bottom: 8px; border: 1px solid var(--cl-line); border-radius: 8px; background: var(--cl-bg); color: var(--cl-ink); cursor: pointer; }
.cl-opt:hover { border-color: var(--cl-primary); }
.cl-opt.is-sel { border-color: var(--cl-primary); background: color-mix(in srgb, var(--cl-primary) 9%, var(--cl-bg)); }
.cl-opt.is-ok { border-color: var(--cl-ok); background: color-mix(in srgb, var(--cl-ok) 12%, var(--cl-bg)); }
.cl-opt.is-bad { border-color: var(--cl-bad); background: color-mix(in srgb, var(--cl-bad) 9%, var(--cl-bg)); }
.cl-bar { height: 8px; border-radius: 99px; background: var(--cl-line); overflow: hidden; margin: 8px 0 16px; }
.cl-bar > i { display: block; height: 100%; background: var(--cl-accent); }
.cl-bar--ok > i { background: var(--cl-ok); }
.cl-score { font-size: 2.4rem; font-weight: 700; color: var(--cl-primary); line-height: 1.1; }
.cl-review-item { border-top: 1px solid var(--cl-line); padding: 14px 0; }
.cl-review-item .cl-explain { font-size: .93rem; color: var(--cl-muted); }
.cl-notes label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.cl-tutor textarea { margin-bottom: 10px; }
.cl-answer { background: var(--cl-bg); border: 1px solid var(--cl-line); border-radius: 8px; padding: 14px 16px; margin-top: 14px; white-space: pre-wrap; }
.cl-slider { width: 100%; }

/* Owner banner */
.cl-admin { background: #fff8e1; border: 1px solid #e6c65a; color: #3d3000; padding: 12px 16px; border-radius: 8px; margin-bottom: 24px; font-size: .92rem; }
.cl-admin .cl-row { margin-top: 10px; }
.cl-admin input { padding: 7px 10px; border: 1px solid #cdb560; border-radius: 6px; min-width: 240px; font: inherit; }
.cl-admin__err { color: var(--cl-bad); }

/* Library index */
.cl-tools { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; padding-top: 28px; }
.cl-tools input[type=search] { max-width: 420px; margin: 0; flex: 1 1 260px; }
.cl-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-fbtn { font: inherit; font-size: .85rem; border: 1px solid var(--cl-line); background: var(--cl-bg); color: var(--cl-ink); padding: 6px 14px; border-radius: 99px; cursor: pointer; }
.cl-fbtn.is-on { background: var(--cl-btn); color: #fff; border-color: var(--cl-btn); }
.cl-toc-nav { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 6px; }
.cl-toc-nav a { font-size: .82rem; padding: 4px 11px; border-radius: 99px; background: var(--cl-surface); text-decoration: none; }
.cl-part { margin: 40px 0 8px !important; font-size: 1.7rem; color: var(--cl-primary); }
.cl-secblock { border-top: 1px solid var(--cl-line); padding: 6px 0; scroll-margin-top: 20px; }
.cl-secblock summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; list-style: none; }
.cl-secblock summary::-webkit-details-marker { display: none; }
.cl-secblock summary h3 { margin: 0; font-size: 1.2rem; }
.cl-secblock summary::after { content: '+'; font-size: 1.4rem; color: var(--cl-muted); }
.cl-secblock details[open] summary::after { content: '–'; }
.cl-count { margin-left: auto; font-size: .8rem; color: var(--cl-muted); }
.cl-blurb { color: var(--cl-muted); max-width: 80ch; font-size: .95rem; }
.cl-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px 20px; }
.cl-item { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--cl-line); border-radius: 8px; }
.cl-item:hover { border-color: var(--cl-primary); background: var(--cl-surface); }
.cl-item a { text-decoration: none; display: block; flex: 1; color: var(--cl-ink); }
.cl-item__t { font-weight: 600; display: block; line-height: 1.35; }
.cl-item__s { font-size: .82rem; color: var(--cl-muted); display: block; }
.cl-item__b { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.cl-tick { color: var(--cl-ok); }
.cl-empty { padding: 24px 20px; color: var(--cl-muted); }

/* Dashboard */
.cl-dash { padding-top: 32px; padding-bottom: 56px; }
.cl-dash h2 { font-size: 1.5rem; }
.cl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--cl-line); margin: 20px 0 24px; flex-wrap: wrap; }
.cl-tab { font: inherit; font-weight: 600; background: none; border: 0; padding: 10px 16px; cursor: pointer; color: var(--cl-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.cl-tab.is-on { color: var(--cl-primary); border-bottom-color: var(--cl-accent); }
.cl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.cl-kpi { background: var(--cl-surface); border-radius: var(--cl-radius); padding: 14px 16px; }
.cl-kpi b { display: block; font-size: 1.7rem; color: var(--cl-primary); line-height: 1.15; }
.cl-kpi span { font-size: .8rem; color: var(--cl-muted); }
.cl-trow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--cl-line); flex-wrap: wrap; }
.cl-trow a { font-weight: 600; text-decoration: none; }
.cl-week { margin-bottom: 8px; border: 1px solid var(--cl-line); border-radius: var(--cl-radius); }
.cl-week > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; }
.cl-week[open] > summary { border-bottom: 1px solid var(--cl-line); }
.cl-sess { padding: 12px 16px; border-top: 1px solid var(--cl-line); display: grid; grid-template-columns: 110px 1fr; gap: 6px 16px; }
.cl-sess:first-of-type { border-top: 0; }
.cl-sess.is-today { background: color-mix(in srgb, var(--cl-accent) 12%, var(--cl-bg)); }
.cl-sess.is-done .cl-sess__d { color: var(--cl-ok); }
.cl-sess__d { font-size: .85rem; color: var(--cl-muted); font-weight: 600; }
.cl-sess__r { font-size: .95rem; }
.cl-sess__t { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.cl-pill { font-size: .8rem; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--cl-line); text-decoration: none; }
.cl-pill.is-done { background: color-mix(in srgb, var(--cl-ok) 14%, var(--cl-bg)); border-color: transparent; color: var(--cl-ok); }
.cl-note-item { border-top: 1px solid var(--cl-line); padding: 14px 0; }
.cl-note-item h3 { font-size: 1.05rem; margin: 0 0 6px; }
.cl-note-item dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cl-muted); margin-top: 8px; }
.cl-note-item dd { margin: 0; white-space: pre-wrap; }

@media (max-width: 960px) {
  .cl-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .cl-side { position: static; max-height: none; overflow: visible; }
  .cl-main { max-width: none; }
  .cl-hero { padding: 36px 0 28px; }
  .cl-jump { position: static; }
  .cl-sess { grid-template-columns: 1fr; }
  .cl-sess__t { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .cl * { scroll-behavior: auto !important; transition: none !important; } }


/* ---- Brand typography ---- */
.cl h1, .cl h2 { font-family: var(--cl-serif); font-weight: 400; letter-spacing: -.005em; }
.cl h3 { font-family: var(--cl-sans); font-weight: 600; }
.cl h1 em, .cl h2 em { font-style: italic; color: var(--cl-primary); }
.cl-hero h1 em { color: var(--cl-hero-accent); }
.cl-title { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; }
.cl-card h3, .cl-seglabel, .cl-q__n, .cl-kpi span, .cl-cnum { font-family: var(--cl-sans); }
.cl-card h3 { font-size: .75rem; letter-spacing: .16em; font-weight: 600; }
.cl-grid .cl-card h3 { font-size: 1.05rem; letter-spacing: 0; text-transform: none; }
.cl-sec h2 { border-bottom: 0; display: block; }
.cl-btn { font-family: var(--cl-sans); }
.cl-btn--sm { padding: 5px 12px; font-size: .82rem; }
.cl-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--cl-primary); text-decoration: underline; cursor: pointer; }

/* ---- Display toolbar ---- */
.cl-hero__in { position: relative; }
.cl-tb { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin: -24px 0 18px; }
.cl > .cl-tb { margin: 20px auto 0; padding: 0 20px; }
.cl-seg-ctl { display: inline-flex; border: 1px solid color-mix(in srgb, var(--cl-hero-ink) 40%, transparent); border-radius: 8px; overflow: hidden; }
.cl > .cl-tb .cl-seg-ctl { border-color: var(--cl-line); }
.cl-seg-ctl button { font: inherit; font-size: .8rem; font-weight: 600; background: transparent; color: inherit; border: 0; padding: 6px 12px; cursor: pointer; }
.cl > .cl-tb .cl-seg-ctl button { color: var(--cl-ink); }
.cl-seg-ctl button + button { border-left: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.cl-seg-ctl button.is-on { background: var(--cl-hero-accent); color: #0B1F4B; }
.cl > .cl-tb .cl-seg-ctl button.is-on { background: var(--cl-btn); color: #fff; }
.cl-tb button:focus-visible { outline: 3px solid var(--cl-sky); outline-offset: -3px; }

/* ---- Segmented reader ---- */
.cl-reader { margin-bottom: 36px; }
.cl-rbar { background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: var(--cl-radius); padding: 14px 18px 10px; margin-bottom: 26px; }
.cl-rmeta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--cl-muted); }
.cl-rtools { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-rbar .cl-bar { margin: 8px 0 12px; }
.cl-contents { margin-top: 10px; font-size: .92rem; }
.cl-contents summary { cursor: pointer; font-weight: 600; color: var(--cl-primary); }
.cl-contents ol { list-style: none; margin: 8px 0 0; padding: 0; max-height: 280px; overflow: auto; }
.cl-contents button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; background: none; border: 0; border-top: 1px solid var(--cl-line); padding: 8px 4px; cursor: pointer; color: var(--cl-ink); }
.cl-contents button small { margin-left: auto; color: var(--cl-muted); }
.cl-contents button.is-here { font-weight: 600; color: var(--cl-primary); }
.cl-cnum { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--cl-line); font-size: .75rem; flex: none; }
.cl-contents button.is-read .cl-cnum { background: var(--cl-ok); border-color: var(--cl-ok); color: #fff; }
.cl-reader.is-js:not(.is-all) .cl-seg { display: none; }
.cl-reader.is-js:not(.is-all) .cl-seg.is-on { display: block; }
.cl-reader:not(.is-js) .cl-rbar, .cl-reader:not(.is-js) .cl-rnav, .cl-reader.is-all .cl-rnav, .cl-reader.is-single .cl-rnav { display: none; }
.cl-seg { font-size: 1.06em; line-height: 1.78; }
.cl-seg + .cl-seg { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--cl-line); }
.cl-reader.is-js:not(.is-all) .cl-seg + .cl-seg { margin-top: 0; padding-top: 0; border-top: 0; }
.cl-seglabel { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 600; color: var(--cl-muted); margin-bottom: .4em; }
.cl-seg h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.12; margin-bottom: .6em; }
.cl-rnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; position: sticky; bottom: 0; background: var(--cl-bg); padding: 12px 0; border-top: 1px solid var(--cl-line); }
.cl-rnav .cl-btn:disabled { opacity: .4; cursor: default; }

/* ---- Focus mode (topic pages only) ---- */
.cl-chip-timer { display: none; position: fixed; right: 16px; bottom: 16px; z-index: 50; align-items: center; gap: 10px; background: var(--cl-hero-bg, #0B1F4B); color: #fff; padding: 8px 12px; border-radius: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.cl-chip-timer .cl-btn { border-color: #9DB2FF; color: #9DB2FF; }
html[data-cl-focus="1"] .cl-chip-timer { display: flex; }
html[data-cl-focus="1"] body.single-canon_topic :where(.wp-site-blocks > header, .wp-site-blocks > footer, #masthead, #colophon, .site-header, .site-footer) { display: none; }
html[data-cl-focus="1"] .single-canon_topic .cl-side, html[data-cl-focus="1"] .single-canon_topic .cl-sched, html[data-cl-focus="1"] .single-canon_topic .cl-pager { display: none; }
html[data-cl-focus="1"] .single-canon_topic .cl-hero { padding: 10px 0; }
html[data-cl-focus="1"] .single-canon_topic .cl-hero :where(.cl-kicker, .cl-title, .cl-by, .cl-badges, .cl-chips) { display: none; }
html[data-cl-focus="1"] .single-canon_topic .cl-tb { margin: 0; }
html[data-cl-focus="1"] .single-canon_topic .cl-layout { grid-template-columns: minmax(0, 1fr); }
html[data-cl-focus="1"] .single-canon_topic .cl-main { max-width: 68ch; margin: 0 auto; }
html[data-cl-focus="1"] .single-canon_topic .cl-seg { font-size: 1.12em; }

/* ---- Videos panel (links out, no embeds) ---- */
.cl-videos { padding-bottom: 12px; }
.cl-vlist { list-style: none; margin: 0 0 8px; padding: 0; max-height: 380px; overflow-y: auto; scrollbar-width: thin; }
.cl-vlist li + li { border-top: 1px solid var(--cl-line); }
.cl-v { display: flex; gap: 12px; padding: 10px 0; text-decoration: none; color: var(--cl-ink); align-items: flex-start; }
.cl-v:hover .cl-v__t { color: var(--cl-primary); text-decoration: underline; }
.cl-v__img { position: relative; flex: none; width: 112px; aspect-ratio: 16 / 9; background: var(--cl-surface); border-radius: 6px; overflow: hidden; display: block; }
.cl-v__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-v__img b { position: absolute; right: 4px; bottom: 4px; background: rgba(7, 20, 47, .85); color: #fff; font-size: .68rem; padding: 1px 5px; border-radius: 3px; }
.cl-v__img--ico { display: grid; place-items: center; color: var(--cl-primary); font-size: 1.2rem; }
.cl-v__t { font-size: .9rem; line-height: 1.35; font-weight: 500; }
.cl-v__t small { display: block; color: var(--cl-muted); font-weight: 400; font-size: .78rem; margin-top: 2px; }

/* ---- Flashcards, owner pin box ---- */
.cl-flash { background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: var(--cl-radius); padding: 36px 24px; min-height: 200px; text-align: center; cursor: pointer; margin: 12px 0; display: flex; flex-direction: column; justify-content: center; }
.cl-flash__t { font-family: var(--cl-serif); font-size: 1.8rem; line-height: 1.2; margin-bottom: .5em; }
.cl-pinbox textarea { width: 100%; margin: 8px 0; padding: 8px; font: inherit; border: 1px solid #cdb560; border-radius: 6px; }
.cl-admin input { min-width: 0; }

/* ---- Dark-mode touch-ups ---- */
html[data-cl-theme="dark"] .cl-hero .cl-btn { color: #9DB2FF; border-color: #9DB2FF; }
html[data-cl-theme="dark"] .cl-admin { background: #3a2f0a; border-color: #8a6d12; color: #ffe9a8; }
html[data-cl-theme="dark"] .cl-card, html[data-cl-theme="dark"] .cl-item, html[data-cl-theme="dark"] .cl-opt { background: var(--cl-surface); }
html[data-cl-theme="dark"] .cl-form input, html[data-cl-theme="dark"] .cl textarea, html[data-cl-theme="dark"] .cl input[type=search] { background: var(--cl-surface); color: var(--cl-ink); border-color: var(--cl-line); }
html[data-cl-theme="dark"] .cl-answer { background: var(--cl-surface); }
html[data-cl-theme="dark"] .cl-item a { color: var(--cl-ink); }
@media (max-width: 960px) { .cl-tb { margin-top: -10px; justify-content: flex-start; } .cl-rnav { bottom: 0; } }

/* ---------- Standalone shell ---------- */
body.cl-shell { margin: 0; background: #fff; color: #0E1A33; font-family: 'Instrument Sans', Arial, sans-serif; }
html[data-cl-theme="dark"] body.cl-shell { background: #0B1F4B; color: #E4E9F2; }
.cl-top { background: #07142F; color: #fff; position: relative; z-index: 50; }
.cl-top__in { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.cl-brand { font-family: 'Fraunces', Georgia, serif; font-size: 1.2rem; color: #fff; text-decoration: none; font-weight: 600; }
.cl-brand em { color: #9DB2FF; font-style: italic; font-weight: 400; }
.cl-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.cl-nav__a { color: #E4E9F2; text-decoration: none; padding: 20px 12px; font-size: .95rem; font-weight: 500; display: inline-block; }
.cl-nav__a:hover, .cl-nav__a.is-cur { color: #9DB2FF; }
.cl-nav__dd { position: relative; display: flex; align-items: center; }
.cl-nav__dd .cl-nav__a { padding-right: 2px; }
.cl-nav__tog { background: none; border: 0; color: #E4E9F2; cursor: pointer; padding: 20px 8px 20px 4px; }
.cl-nav__tog span { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
.cl-nav__menu { display: none; position: absolute; top: 100%; left: 0; min-width: 300px; max-height: 70vh; overflow-y: auto; background: #07142F; border: 1px solid #243b73; border-top: 2px solid #2A4BD7; padding: 6px 0; }
.cl-nav__dd:hover .cl-nav__menu, .cl-nav__dd:focus-within .cl-nav__menu, .cl-nav__dd.is-open .cl-nav__menu { display: block; }
.cl-nav__menu a { display: flex; justify-content: space-between; gap: 16px; padding: 8px 16px; color: #E4E9F2; text-decoration: none; font-size: .92rem; }
.cl-nav__menu a:hover, .cl-nav__menu a:focus { background: #2A4BD7; color: #fff; }
.cl-nav__menu small { opacity: .6; }
.cl-nav__part { display: block; padding: 10px 16px 4px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #9DB2FF; }
.cl-shell__main { min-height: 60vh; }
.cl-foot { background: #07142F; color: #A9B4CC; font-size: .85rem; }
.cl-foot__in { max-width: 1180px; margin: 0 auto; padding: 18px 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cl-foot a { color: #E4E9F2; }
.cl-shell .cl, .cl-shell .cl-hero { margin-top: 0; }
@media (max-width: 720px) { .cl-nav__a { padding: 12px 8px; } .cl-nav__menu { position: static; max-height: 50vh; } .cl-nav__dd { flex-wrap: wrap; } .cl-nav__dd .cl-nav__menu { width: 100%; } }

/* ---------- Depth indicator ---------- */
.cl-depth { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; padding: 2px 10px 2px 8px; border-radius: 99px; letter-spacing: .02em; border: 1px solid transparent; }
.cl-depth i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: currentColor; }
.cl-depth--red { color: #b3261e; background: #fdeceb; border-color: #f3b9b5; }
.cl-depth--amber { color: #8a5200; background: #fff3dc; border-color: #f0cf8e; }
.cl-depth--green { color: #1d7a4a; background: #e4f5ec; border-color: #a9dcc0; }
.cl-depth--red i { background: #d93025; } .cl-depth--amber i { background: #f5a623; } .cl-depth--green i { background: #1e9e5a; }
.cl-hero .cl-depth { background: rgba(255,255,255,.95); }
html[data-cl-theme="dark"] .cl-depth--red { color: #ffb3ad; background: #3a1a1c; border-color: #6b2b2b; }
html[data-cl-theme="dark"] .cl-depth--amber { color: #f7cf86; background: #3a2b10; border-color: #6b5220; }
html[data-cl-theme="dark"] .cl-depth--green { color: #8fe0b2; background: #11321f; border-color: #25603d; }
html[data-cl-theme="dark"] .cl-hero .cl-depth--red { color: #ffb3ad; background: #3a1a1c; }
html[data-cl-theme="dark"] .cl-hero .cl-depth--amber { color: #f7cf86; background: #3a2b10; }
html[data-cl-theme="dark"] .cl-hero .cl-depth--green { color: #8fe0b2; background: #11321f; }
.cl-flabel { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--cl-muted); margin-right: 4px; }
.cl-fbtn--d { padding: 2px; background: none; border-color: transparent; }
.cl-fbtn--d.is-on .cl-depth { outline: 2px solid var(--cl-primary); outline-offset: 1px; }

.cl-brandrow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cl-parent { color: #E4E9F2; text-decoration: none; font-size: .95rem; font-weight: 600; border-bottom: 1px solid #56627A; padding-bottom: 1px; }
.cl-parent:hover, .cl-parent:focus { color: #9DB2FF; border-color: #9DB2FF; }
.cl-brandsep { color: #56627A; }
