/* Content pages: the Retention Guide, About, Contact, Privacy, Terms, Newsletter status.
   Prefix: ct-. Uses the shared tokens from site.css. */

/* ---------- Small type utilities (scoped to these pages) ---------- */
.h4 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.005em; line-height: 1.3; }
.h3-like { font-size: var(--fs-h3); font-weight: 600; }
.h2-like { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem); }
.on-dark { color: #E6EFEC; }
.on-dark h2, .on-dark h3 { color: #fff; }
.on-dark a:not(.btn) { color: var(--signal); }

/* ---------- Reading progress ---------- */
.ct-progress { position: fixed; top: var(--header-h); inset-inline: 0; height: 3px; z-index: 99; background: transparent; opacity: 0; transition: opacity .25s; pointer-events: none; }
.ct-progress.is-visible { opacity: 1; }
.ct-progress__bar { display: block; height: 100%; background: linear-gradient(90deg, var(--signal), var(--green)); transform: scaleX(0); transform-origin: 0 50%; }
[dir="rtl"] .ct-progress__bar { transform-origin: 100% 50%; }

/* ---------- Hero ---------- */
.ct-hero { padding-block: clamp(2rem, 1.5rem + 3vw, 4.5rem) clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.ct-hero--short { padding-block-end: clamp(2.25rem, 1.5rem + 3vw, 4rem); }
.ct-hero h1 { font-size: clamp(2rem, 1.45rem + 2.4vw, 3.25rem); }
.ct-hero__grid { align-items: start; }
.ct-hero__narrow { max-width: 820px; }
.ct-byline { color: #A9BDB8; margin: 0; }
.ct-takeaways { padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.ct-takeaways h2 { color: #fff; margin-bottom: .9rem; }
.ct-takeaways .list-check li { margin-bottom: .7rem; }
.ct-takeaways .list-check li::before { background-color: rgba(43, 212, 143, .14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%232BD48F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Breadcrumb */
.ct-crumbs { margin-bottom: var(--space-5); font-size: var(--fs-sm); }
.ct-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; color: #A9BDB8; }
.ct-crumbs li + li::before { content: "/"; margin-inline-end: .4rem; opacity: .6; }
.ct-crumbs a { color: #C7D8D3; text-decoration: none; }
.ct-crumbs a:hover { color: var(--signal); text-decoration: underline; }
.ct-crumbs [aria-current] { color: #fff; }

/* ---------- Article layout with table of contents ---------- */
.ct-article-wrap { padding-block-start: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.ct-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
.ct-article { min-width: 0; max-width: 780px; }
.ct-sec { scroll-margin-top: calc(var(--header-h) + 20px); }
.ct-sec + .ct-sec { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); }
.ct-article .chapter-num { margin-bottom: var(--space-2); }
.ct-article h3[id], .ct-article h4[id] { scroll-margin-top: calc(var(--header-h) + 20px); }
.ct-article .card h3, .ct-article .card h4, .ct-article .callout h3 { margin-top: 0; }
.ct-article ul li { margin-bottom: .45rem; }

.ct-aside .toc { position: static; }
.ct-toc { background: var(--mist-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .25rem .25rem .5rem; }
.ct-toc__summary { list-style: none; cursor: pointer; font-weight: 600; padding: .75rem 1rem; display: flex; justify-content: space-between; align-items: center; min-height: 44px; border-radius: var(--radius-sm); }
.ct-toc__summary::-webkit-details-marker { display: none; }
.ct-toc__summary::after { content: ""; width: 12px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9l7 7 7-7' fill='none' stroke='%230B7550' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform .2s var(--ease); }
.ct-toc[open] .ct-toc__summary::after { transform: rotate(180deg); }
.ct-toc ol { margin: .25rem .75rem .5rem; }
.ct-toc a { padding-block: .45rem; }
.ct-toc a.is-active { font-weight: 600; }
.ct-aside__offer { margin-top: var(--space-4); padding: 1rem; border-radius: var(--radius); background: #FFF8E8; border: 1px solid #F4D58E; display: grid; gap: .5rem; }
.ct-aside__offer p { margin: 0; }
.ct-aside__offer .progress { height: 6px; }

@media (min-width: 980px) {
  .ct-layout { grid-template-columns: 250px minmax(0, 1fr); gap: clamp(2.5rem, 1rem + 4vw, 5rem); align-items: start; }
  .ct-aside { height: 100%; }
  .ct-aside .toc { position: sticky; top: calc(var(--header-h) + 1.5rem); max-height: calc(100vh - var(--header-h) - 3rem); overflow-y: auto; }
  .ct-toc { background: transparent; border: 0; padding: 0; }
  .ct-toc__summary { padding: 0 0 .75rem; cursor: default; pointer-events: none; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--slate); min-height: 0; }
  .ct-toc__summary::after { display: none; }
  .ct-toc ol { margin: 0; }
}

/* ---------- Example callout ---------- */
.ct-example { margin: var(--space-6) 0 0; background: #FFF8E8; border-color: #F4D58E; }
.ct-example__tag { margin-bottom: .5rem; }
.ct-example p { font-size: 1.0625rem; }
.ct-example figcaption { margin-top: .5rem; }

/* ---------- Revenue cycle ---------- */
.ct-cycle { margin-block: var(--space-6); display: grid; gap: var(--space-5); background: var(--mist-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1rem, .75rem + 1.5vw, 1.75rem); }
.ct-cycle__svg { width: 100%; max-width: 320px; margin-inline: auto; }
@media (min-width: 720px) {
  .ct-cycle { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); align-items: start; }
}
.ct-cycle .cycle__node circle { fill: #fff; stroke: var(--deep); stroke-width: 2.5; transition: fill .25s, stroke .25s; }
.ct-cycle .cycle__node text { font-family: var(--font-display); font-weight: 700; font-size: 20px; fill: var(--deep); }
.ct-cycle .cycle__node .ct-cycle__label { font-family: var(--font-text); font-weight: 600; font-size: 15px; fill: var(--midnight); }
.ct-cycle .cycle__node.is-active circle { fill: var(--signal); stroke: var(--deep); }
.ct-cycle .cycle__node.is-active text:not(.ct-cycle__label) { fill: var(--midnight); }
.ct-cycle .cycle__node:hover circle { stroke: var(--gold-2); stroke-width: 4; }
.ct-cycle__kicker { font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; fill: var(--slate); }
.ct-cycle__center { font-family: var(--font-display); font-weight: 700; font-size: 22px; fill: var(--midnight); }
.ct-cycle__fig { display: grid; gap: .5rem; justify-items: center; }
.ct-cycle__legend { display: flex; gap: .5rem; align-items: center; color: var(--slate); margin: 0; max-width: 300px; line-height: 1.4; }
.ct-cycle__dot { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: var(--midnight); font: 700 12px/20px var(--font-display); text-align: center; }
.ct-cycle .cycle__node text { font-size: 22px; }
.ct-cycle__leak circle { fill: var(--gold); }
.ct-cycle__leak text { font: 700 12px var(--font-display); fill: var(--midnight); }
.ct-cycle__tabs { gap: .4rem; margin-bottom: var(--space-4); }
.ct-cycle__tabs .tabs__tab { padding: .5rem .8rem; font-size: .875rem; min-height: 44px; }
.ct-stage { font-size: 1rem; line-height: 1.65; }
.ct-stage:focus-visible { border-radius: var(--radius-sm); }
.ct-stage p { margin-bottom: .75em; }
.ct-leak { background: #fff; border: 1px solid var(--line); border-inline-start: 4px solid var(--overdue); border-radius: var(--radius-sm); padding: .75rem 1rem; }
.ct-leak--seed { border-inline-start-color: var(--dormant); }
.ct-leak__label { font-weight: 600; color: var(--midnight); display: block; }
.no-js .ct-stage + .ct-stage { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--line); }

.ct-try { margin-top: var(--space-5); font-size: 1rem; }
.ct-try .link-arrow { margin-inline-start: .25rem; }

/* ---------- Why customers quit ---------- */
.ct-reasons { display: grid; gap: .75rem; margin-top: var(--space-5); }
@media (min-width: 720px) { .ct-reasons { grid-template-columns: 1fr 1fr; align-items: start; } }
.ct-reason { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s, box-shadow .2s; }
.ct-reason[open] { border-color: #B7CEC6; box-shadow: var(--shadow-sm); }
.ct-reason summary { list-style: none; cursor: pointer; padding: 1rem 2.75rem 1rem 1.1rem; position: relative; display: grid; gap: .15rem; border-radius: inherit; }
[dir="rtl"] .ct-reason summary { padding: 1rem 1.1rem 1rem 2.75rem; }
.ct-reason summary::-webkit-details-marker { display: none; }
.ct-reason summary::after { content: ""; position: absolute; inset-inline-end: 1rem; top: 1.25rem; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%230B7550' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform .2s var(--ease); }
.ct-reason[open] summary::after { transform: rotate(45deg); }
.ct-reason__name { font-weight: 600; font-size: 1.0625rem; }
.ct-reason__quote { color: var(--slate); font-size: var(--fs-sm); font-style: italic; }
.ct-reason__body { padding: 0 1.1rem 1rem; font-size: .975rem; line-height: 1.6; }
.ct-reason__body p { margin-bottom: .6em; }

.ct-silent { margin-top: var(--space-6); padding: clamp(1.5rem, 1rem + 2vw, 2.25rem); }
.ct-silent .eyebrow { color: var(--signal); }
.ct-silent__quote { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); line-height: 1.15; color: #fff; letter-spacing: -.02em; }
.ct-silent strong { color: #fff; }

.ct-check { margin-top: var(--space-6); }
.ct-check__list { border: 0; padding: 0; margin: var(--space-4) 0; display: grid; gap: .75rem; }
.ct-check__list .checkbox { font-size: 1rem; padding: .65rem .8rem; border-radius: var(--radius-sm); background: var(--mist-2); border: 1px solid transparent; min-height: 44px; align-items: center; }
.ct-check__list .checkbox:has(input:checked) { border-color: #F4D58E; background: #FFF8E8; }
.ct-check__list .checkbox input { margin-top: 0; }
.ct-check__result { border-radius: var(--radius); padding: 1rem 1.15rem; background: var(--mist); font-size: 1rem; border-inline-start: 4px solid var(--line); }
.ct-check__result[data-level="ok"] { border-inline-start-color: var(--green); }
.ct-check__result[data-level="mid"] { border-inline-start-color: var(--gold); background: #FFF8E8; }
.ct-check__result[data-level="high"] { border-inline-start-color: var(--overdue); background: #FDF1E6; }

/* ---------- Economics ---------- */
.ct-stats { display: grid; gap: 1rem; margin-block: var(--space-5); }
@media (min-width: 640px) { .ct-stats { grid-template-columns: 1fr 1fr; } }
.ct-stat { display: grid; gap: .4rem; align-content: start; }
.ct-stat .stat { margin: 0; white-space: nowrap; }
.ct-stat .stat-label { font-size: 1rem; color: var(--ink); margin: 0; }
.ct-stat .source { margin: 0; line-height: 1.5; }

.ct-worked { margin-block: var(--space-5); display: grid; gap: 1rem; }
.ct-worked p { font-size: 1.0625rem; }
.ct-worked__tag { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: var(--fs-sm) !important; color: var(--slate); margin: 0; }
.ct-worked__controls { display: grid; gap: 1rem; }
@media (min-width: 640px) { .ct-worked__controls { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.ct-worked__controls label { font-weight: 600; font-size: var(--fs-sm); }
.ct-worked__table { margin: 0 !important; }
.ct-worked__table td, .ct-worked__table th { font-size: .95rem; }
.ct-worked__table tfoot th, .ct-worked__table tfoot td { font-weight: 600; border-bottom: 0; border-top: 2px solid var(--midnight); }
.ct-worked__table .amount { font-size: 1rem; }
.ct-math { font-family: var(--font-mono); font-size: .78rem; color: var(--slate); line-height: 1.4; display: inline-block; }
.ct-worked__diff { margin: 0; padding: .9rem 1.1rem; border-radius: var(--radius); background: var(--midnight); color: #E6EFEC; }
.ct-worked__diff strong { color: var(--signal); font-size: 1.2rem; }
.ct-worked.is-negative .ct-worked__diff strong { color: #FF9D94; }

.ct-formula { font-family: var(--font-mono); font-size: .95rem; line-height: 1.6; background: var(--mist-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem 1rem; overflow-wrap: anywhere; }
.ct-formula span { font-weight: 500; color: var(--deep); }

/* ---------- Metrics ---------- */
.ct-metrics { display: grid; gap: 1rem; margin-block: var(--space-5); }
.ct-metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; background: #fff; }
.ct-metric .ct-formula { font-size: .875rem; margin: .5rem 0 .75rem; }
.ct-metric p.small { margin-bottom: .5em; }

.ct-mini { margin-top: var(--space-5); }
.ct-mini__grid { display: grid; gap: 1.25rem; margin-block: var(--space-4); }
@media (min-width: 640px) { .ct-mini__grid { grid-template-columns: 1fr 1fr; } }
.ct-mini__set { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0; display: grid; gap: .75rem; background: #fff; min-width: 0; }
.ct-mini__set legend { font-weight: 600; padding-inline: .35rem; font-size: 1rem; }
.ct-mini__out { margin: 0; font-size: 1rem; padding-top: .25rem; }
.ct-mini__out strong { font-family: var(--font-mono); color: var(--deep); font-size: 1.15rem; }

/* ---------- Inline newsletter ---------- */
.ct-news { display: grid; gap: 1rem; margin-top: var(--space-6); background: var(--mist-2); }
@media (min-width: 860px) { .ct-news { grid-template-columns: 1fr 1.1fr; align-items: center; } }
.ct-news p { font-size: var(--fs-sm); }

/* ---------- Playbook ---------- */
.ct-pb-bar { position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; display: grid; gap: .6rem; padding: .85rem 1rem; margin-block: var(--space-5); background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); }
.ct-pb-bar__head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; align-items: center; font-size: 1rem; }
.ct-pb-bar .progress { height: 8px; }
/* Keep focused playbook items clear of the sticky header and progress bar (WCAG 2.4.11).
   --pb-bar-h is measured by retention.js; the fallback covers the bar when it wraps at 360 px. */
.ct-weeks :is(input, label, a, button) { scroll-margin-top: calc(var(--header-h) + 8px + var(--pb-bar-h, 132px) + 12px); }
.ct-weeks { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.ct-week { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1rem, .8rem + 1vw, 1.5rem); background: #fff; }
.ct-week h3 { display: grid; gap: .2rem; }
.ct-week__num { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--deep); font-weight: 500; }
.ct-tasks { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .5rem; }
.ct-article .ct-tasks li { margin: 0; }
.ct-tasks .checkbox { font-size: 1rem; line-height: 1.55; padding: .55rem .6rem; border-radius: var(--radius-sm); min-height: 44px; }
.ct-tasks .checkbox:hover { background: var(--mist-2); }
.ct-tasks li.is-done .checkbox > span { color: var(--slate); text-decoration: line-through; text-decoration-color: rgba(75, 93, 97, .5); }

/* Sample email */
.ct-email { margin-block: var(--space-5); display: grid; gap: 1rem; }
.ct-email__head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; justify-content: space-between; align-items: center; }
.ct-email__head h4 { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ct-email .tabs__tab { min-height: 44px; }
.ct-email .tabs__panel { display: grid; gap: .75rem; justify-items: start; }
.ct-email__body { width: 100%; background: var(--mist-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; font-size: 1rem; line-height: 1.6; }
.ct-email__body p { margin-bottom: .7em; }
.ct-email__body.arabic { font-size: 1.0625rem; line-height: 1.9; text-align: right; }
.ct-email .tabs__panel[id="email-ar"] { justify-items: end; }

/* CTA band inside the article */
.ct-band { margin-top: var(--space-7); grid-template-columns: 1fr !important; }
.ct-band h3 { margin-top: 0; }
.ct-band .lead { font-size: 1.0625rem; }
.ct-band__note { color: #A9BDB8; margin: 0; }
.ct-band .btn { white-space: normal; text-align: center; }

/* ---------- AI section ---------- */
.ct-pull { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 1.05rem + .9vw, 1.6rem); line-height: 1.3; color: var(--midnight); border-inline-start: 4px solid var(--green); padding-inline-start: 1rem; margin-block: var(--space-5); }
.ct-ai { display: grid; gap: 1rem; margin-block: var(--space-5); }
@media (min-width: 640px) { .ct-ai { grid-template-columns: 1fr 1fr; } }
.ct-ai__item { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; background: #fff; }
.ct-ai__item:last-child { background: var(--mist-2); }
.ct-ai__item .badge { margin-inline-end: .35rem; }

.ct-sources li { margin-bottom: .35rem; }

/* Button styled as a card link */
.ct-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--deep); cursor: pointer; text-align: start; }
.ct-linkbtn:hover { color: var(--deep-2); }

/* Final CTA cards */
.ct-final .card { display: grid; align-content: start; gap: .4rem; }
.ct-final .card .badge { justify-self: start; }

/* ---------- About ---------- */
.ct-mission { display: grid; gap: .75rem; }
.ct-mission__text { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); line-height: 1.15; color: #fff; letter-spacing: -.02em; margin: 0; }
.ct-mission .small { color: #C7D8D3; }
.ct-principles .card { display: grid; align-content: start; }
.ct-principles__cta { align-content: center !important; }
.ct-principles__cta h3 { color: #fff; }
.ct-isnot { background: var(--mist-2); }

/* ---------- Contact ---------- */
.ct-contact__grid { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .ct-contact__grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.ct-form { display: grid; gap: 1.1rem; }
.ct-form__grid { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .ct-form__grid { grid-template-columns: 1fr 1fr; } }
.ct-form .btn { justify-self: start; }
@media (max-width: 480px) { .ct-form .btn { justify-self: stretch; } }
.ct-form .field__label .field__hint { font-weight: 400; }
.ct-form .select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%234B5D61' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 16px; padding-inline-end: 2.5rem; }
[dir="rtl"] .ct-form .select { background-position: left .9rem center; }
.ct-form.is-done .field, .ct-form.is-done .ct-form__grid { opacity: .6; }
.ct-steps { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: .6rem; font-size: var(--fs-sm); }
.ct-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.ct-side-offer .eyebrow { color: var(--signal); }

/* ---------- Legal ---------- */
.ct-draft { margin-bottom: var(--space-6); font-size: 1rem; }
.ct-legal h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); margin-top: 0; }
.ct-legal .ct-sec + .ct-sec { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.ct-legal { font-size: 1.0625rem; }

/* ---------- Newsletter status ---------- */
.ct-nl-hero { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.ct-nl-icon { display: grid; place-items: center; }
.ct-nl-icon svg { width: 72px; height: 72px; filter: drop-shadow(0 10px 24px rgba(43, 212, 143, .25)); }
.ct-nl-form { max-width: 520px; margin-inline: auto; justify-content: center; text-align: start; }
.ct-nl-form .input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .2); color: #fff; }
.ct-nl-form .input::placeholder { color: #8FA8A2; }
.ct-nl-form .form-status.is-success { color: var(--signal); }
.ct-nl-form .form-status.is-error { color: #FF9D94; }

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  .ct-progress__bar { transition: none; }
}
@media print {
  .ct-progress, .ct-aside, .ct-hero .cluster, .ct-pb-bar .cluster, .ct-band, .ct-news, .ct-final, [data-copy], .ct-cycle__tabs { display: none !important; }
  .ct-layout { display: block; }
  .ct-hero { padding-block: 1rem; }
  .ct-hero h1, .ct-hero .lead, .ct-byline { color: #000 !important; }
  .ct-cycle .tabs__panel[hidden] { display: block !important; }
  .ct-week, .ct-reason { break-inside: avoid; }
  .ct-reason:not([open]) .ct-reason__body { display: block; }
}

/* ---------- Tables that stack into cards on small screens ---------- */
@media (max-width: 639px) {
  .ct-table-stack, .ct-table-stack tbody, .ct-table-stack tfoot, .ct-table-stack tr { display: block; width: 100%; }
  .ct-table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ct-table-stack tr { border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem .9rem; margin-bottom: .75rem; background: #fff; }
  .ct-table-stack td, .ct-table-stack th { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: .75rem; padding: .5rem 0 !important; border-bottom: 1px dashed var(--line) !important; border-top: 0 !important; background: none !important; }
  .ct-table-stack tr > :last-child { border-bottom: 0 !important; }
  .ct-table-stack td::before { content: attr(data-label); font-weight: 600; color: var(--slate); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; padding-top: .15em; }
  .ct-table-stack tbody td:first-child:not(:only-child) { display: block; font-weight: 600; font-family: var(--font-display); font-size: 1.05rem; color: var(--midnight); }
  .ct-table-stack tbody td:first-child::before { content: none; }
  .ct-table-stack th[scope="row"] { display: block; font-family: var(--font-display); font-size: 1.05rem; }
  .ct-worked__table tbody td:first-child::before { content: attr(data-label); }
  .ct-worked__table tbody td:first-child { display: grid !important; font-family: var(--font-text) !important; font-size: .95rem !important; font-weight: 400 !important; }
  .ct-worked__table tfoot tr { background: var(--mist-2); border-color: var(--midnight); }
  .ct-worked__table tfoot th, .ct-worked__table tfoot td { border-top: 0 !important; }
}

/* Links on dark cards */
.card--dark a:not(.btn), .card--dark .ct-linkbtn { color: var(--signal); }
.card--dark a:not(.btn):hover { color: #6FE6B5; }
