/* ==========================================================================
   Design tokens — exercise-book palette: ink, paper, marker yellow, margin red
   ========================================================================== */
@font-face { font-family: "Bricolage"; src: url("/vendor/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/vendor/fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/vendor/fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* Self-hosted fonts (latin). */
@font-face { font-family: "Inter"; src: url("/vendor/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/vendor/fonts/roboto.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/vendor/fonts/open-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/vendor/fonts/dm-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("/vendor/fonts/work-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("/vendor/fonts/plus-jakarta-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/vendor/fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/vendor/fonts/geist-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/vendor/fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/vendor/fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/vendor/fonts/montserrat.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("/vendor/fonts/raleway.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("/vendor/fonts/rubik.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/vendor/fonts/playfair-display.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/vendor/fonts/lora.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("/vendor/fonts/baskerville-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("/vendor/fonts/baskerville-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("/vendor/fonts/great-vibes.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Dancing Script"; src: url("/vendor/fonts/dancing-script.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Parisienne"; src: url("/vendor/fonts/parisienne.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #0e2a17;
  --ink-2: #2d4a37;
  --paper: #f4f8f4;
  --white: #ffffff;
  --marker: #43b02a;
  --marker-deep: #369422;
  --margin: #d6454b;
  --ok: #1f7a2a;
  --line: #dbe6dc;
  --muted: #52665a;

  --bs-body-font-family: "Atkinson", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-primary: var(--ink);
  --bs-primary-rgb: 14, 42, 23;
  --bs-link-color: var(--ink);
  --bs-link-color-rgb: 14, 42, 23;
  --bs-link-hover-color: var(--margin);
  --bs-border-color: var(--line);
  --bs-border-radius: 6px;
  --bs-border-radius-lg: 10px;
  --bs-focus-ring-color: rgba(67, 176, 42, 0.6);
}

h1, h2, h3, h4, .display-font, .navbar-brand {
  font-family: "Bricolage", "Atkinson", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.25rem; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; }
.prose { max-width: 68ch; }
.prose p, .prose li { line-height: 1.7; }
.text-muted, .text-secondary { color: var(--muted) !important; }

a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--marker); border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 2000; }
.skip-link:focus { left: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------- Buttons ---------- */
.btn { font-weight: 700; border-radius: 6px; padding: .55rem 1.1rem; }
.btn-primary { --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: var(--ink-2); --bs-btn-hover-border-color: var(--ink-2); --bs-btn-active-bg: var(--ink-2); --bs-btn-disabled-bg: var(--ink); --bs-btn-disabled-border-color: var(--ink); }
.btn-marker { --bs-btn-color: var(--ink); --bs-btn-bg: var(--marker); --bs-btn-border-color: var(--ink); --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--marker-deep); --bs-btn-hover-border-color: var(--ink); --bs-btn-active-bg: var(--marker-deep); --bs-btn-active-color: var(--ink); --bs-btn-disabled-bg: var(--marker); --bs-btn-disabled-border-color: var(--ink); --bs-btn-disabled-color: var(--ink); border-width: 2px; box-shadow: 3px 3px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn-marker:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn-marker:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn-outline-dark { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: var(--ink); --bs-btn-hover-border-color: var(--ink); }
.form-control, .form-select { border-color: #b6c8b9; padding: .6rem .8rem; }
.form-select { padding-right: 2.25rem; }
.form-select-sm { padding: .3rem 2rem .3rem .6rem; }
.form-control:focus, .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--marker); }
.form-label { font-weight: 700; margin-bottom: .25rem; }
.form-text { color: var(--muted); }

/* ---------- Header / footer ---------- */
.site-header { background: var(--white); border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 1030; }
.navbar { padding-block: .6rem; }
.navbar-brand { font-size: 1.35rem; display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); }
.brand-mark { width: 1.35rem; height: 1.7rem; background: var(--marker); border: 2px solid var(--ink); border-left-width: 5px; border-left-color: var(--margin); border-radius: 2px 4px 4px 2px; display: inline-block; }
.nav-link { color: var(--ink); font-weight: 700; }
.nav-link:hover { color: var(--margin); }
.site-footer { background: var(--ink); color: #cfe0d2; margin-top: 5rem; padding: 3.5rem 0 2rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--marker); }
.site-footer h2 { font-size: 1rem; color: var(--marker); margin-bottom: .75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }

/* ---------- Hero: ruled exercise-book page with a margin line ---------- */
.hero { position: relative; background-color: var(--white); background-image: repeating-linear-gradient(to bottom, transparent 0 35px, rgba(14, 42, 23, .08) 35px 36px); border-bottom: 2px solid var(--ink); padding: clamp(2.5rem, 7vw, 5rem) 0; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(.6rem, 4vw, 3.4rem); width: 1px; background: var(--margin); opacity: .28; }
.hero .container { position: relative; padding-left: clamp(1.8rem, 6vw, 4.5rem); }
.hero h1 { max-width: 15ch; margin-bottom: 1rem; }
.hero-search { max-width: 640px; }
.hero-search .form-control { font-size: 1.15rem; padding: .85rem 1rem; border: 2px solid var(--ink); border-radius: 6px 0 0 6px; }
.hero-search .btn { border-radius: 0 6px 6px 0; border: 2px solid var(--ink); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; gap: .8rem; align-items: start; background: var(--white); border: 2px solid var(--ink); border-radius: 8px; padding: .9rem 1rem; box-shadow: 4px 4px 0 var(--ink); }
.steps li::before { content: counter(step); font-family: "Bricolage", sans-serif; font-weight: 800; font-size: 1.2rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; background: var(--marker); border: 2px solid var(--ink); border-radius: 50%; }
.steps strong { display: block; }

/* ---------- Catalog ---------- */
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .85rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink); font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; }
.chip:hover { background: var(--marker); color: var(--ink); }
.chip.active, .chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.res-card { background: var(--white); border: 1px solid #c3d3c5; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: border-color .15s, box-shadow .15s; }
.res-card:hover { border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.res-thumb { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; display: block; background: var(--paper); border-bottom: 1px solid var(--line); }
.res-thumb.fallback { display: grid; place-items: center; font-size: 2.6rem; color: var(--ink-2); background-color: #eaf3ea; background-image: repeating-linear-gradient(to bottom, transparent 0 23px, rgba(14, 42, 23, .08) 23px 24px); }
.res-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.res-title { font-size: 1.12rem; margin: 0; }
.res-title a { color: var(--ink); text-decoration: none; }
.res-title a::after { content: ""; position: absolute; inset: 0; }
.res-card { position: relative; }
.res-card .btn-buy { position: relative; z-index: 2; }
.res-meta { font-size: .88rem; color: var(--muted); }
.res-desc { font-size: .95rem; color: var(--ink-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.res-foot { margin-top: auto; padding-top: .6rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.price-tag { background: var(--marker); border: 2px solid var(--ink); padding: .1rem .55rem; font-family: "Bricolage", sans-serif; font-weight: 800; font-size: 1.05rem; border-radius: 4px; white-space: nowrap; }
.skeleton { background: linear-gradient(90deg, #e4ece4 25%, #f1f6f1 50%, #e4ece4 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; min-height: 18rem; }
@keyframes shimmer { to { background-position: -200% 0; } }
.badge-cat { background: #e4eee4; color: var(--ink-2); font-weight: 700; border-radius: 4px; }

/* ---------- Product page ---------- */
.product-hero-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 2px solid var(--ink); border-radius: 8px; background: var(--white); }
.buy-panel { background: var(--white); border: 2px solid var(--ink); border-radius: 10px; padding: 1.4rem; box-shadow: 5px 5px 0 var(--ink); }
.buy-panel .price-big { font-family: "Bricolage", sans-serif; font-size: 2.2rem; font-weight: 800; }
.facts { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; font-size: .95rem; }
.facts i { color: var(--ok); margin-right: .4rem; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--muted); font-size: .92rem; }

/* ---------- Sections, forms, modal ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.panel { background: var(--white); border: 1px solid #c3d3c5; border-radius: 10px; padding: 1.5rem; }
.auth-card { max-width: 460px; margin: 3rem auto; }
.modal-content { border: 2px solid var(--ink); border-radius: 10px; box-shadow: 6px 6px 0 var(--ink); }
.modal-header { border-bottom: 1px solid var(--line); }
.co-state { display: none; }
.co-state.active { display: block; }
.pulse-dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--margin); display: inline-block; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .4; } }
.accordion { --bs-accordion-border-color: #c3d3c5; --bs-accordion-active-bg: #e3f4dc; --bs-accordion-active-color: var(--ink); --bs-accordion-btn-focus-box-shadow: 0 0 0 4px var(--marker); }
.accordion-button { font-weight: 700; }
.toast-wrap { position: fixed; right: 1rem; bottom: 1rem; z-index: 3000; display: grid; gap: .5rem; max-width: min(92vw, 380px); }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 66px); }
.dash-side { background: var(--ink); color: #cfe0d2; padding: 1.25rem 1rem; position: sticky; top: 66px; align-self: start; height: calc(100vh - 66px); overflow-y: auto; }
.dash-side .nav-link { color: #cfe0d2; border-radius: 6px; display: flex; gap: .65rem; align-items: center; padding: .55rem .75rem; }
.dash-side .nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.dash-side .nav-link.active { background: var(--marker); color: var(--ink); }
.dash-side .side-label { color: #93b09a; font-size: .85rem; padding: .9rem .75rem .3rem; }
.dash-main { padding: clamp(1rem, 3vw, 2rem); min-width: 0; }
.dash-top { display: none; }
@media (max-width: 991.98px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { display: none; }
  .dash-top { display: flex; gap: .5rem; overflow-x: auto; padding: .6rem 1rem; background: var(--ink); position: sticky; top: 66px; z-index: 1000; }
  .dash-top .nav-link { display: flex; gap: .5rem; align-items: center; color: #cfe0d2; white-space: nowrap; border-radius: 6px; padding: .4rem .8rem; }
  .dash-top .nav-link.active { background: var(--marker); color: var(--ink); }
}
.stat { background: var(--white); border: 1px solid #c3d3c5; border-radius: 10px; padding: 1rem 1.1rem; height: 100%; }
.stat .k { color: var(--muted); font-size: .92rem; }
.stat .v { font-family: "Bricolage", sans-serif; font-weight: 800; font-size: 1.7rem; line-height: 1.2; overflow-wrap: anywhere; }
.stat.hl { border: 2px solid var(--ink); background: #e3f4dc; box-shadow: 4px 4px 0 var(--ink); }
.chart { width: 100%; height: 230px; display: block; }
.chart .bar { fill: var(--ink); }
.chart .bar:hover { fill: var(--margin); }
.chart text { font-size: 11px; fill: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid #c3d3c5; border-radius: 10px; }
.table { --bs-table-bg: transparent; margin: 0; font-size: .95rem; }
.table th { white-space: nowrap; color: var(--muted); font-weight: 700; background: #eef4ee; }
.table td { vertical-align: middle; }
.thumb-sm { width: 56px; height: 36px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: #eaf3ea; }
.status { font-weight: 700; font-size: .82rem; padding: .15rem .55rem; border-radius: 999px; border: 1.5px solid currentColor; white-space: nowrap; }
.status.published, .status.active, .status.paid { color: var(--ok); }
.status.draft, .status.pending { color: #8a6500; }
.status.archived, .status.suspended, .status.failed { color: var(--margin); }
.dropzone { border: 2px dashed var(--ink-2); border-radius: 8px; padding: 1rem; background: #fafcfa; }
.progress { height: .6rem; border-radius: 999px; }
.progress-bar { background: var(--ink); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty i { font-size: 2.4rem; display: block; margin-bottom: .5rem; color: var(--ink-2); }

.sticky-panel { position: sticky; top: 5.5rem; }
@media (max-width: 991.98px) { .sticky-panel { position: static; } }

/* ---------- Brand-colour overrides for Bootstrap components ---------- */
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.form-check-input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--marker); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--ink); --bs-nav-link-color: var(--ink); --bs-nav-link-hover-color: var(--margin); }
.nav-pills .nav-link { font-weight: 700; }
.pagination { --bs-pagination-color: var(--ink); --bs-pagination-hover-color: var(--ink); --bs-pagination-hover-bg: #e3f4dc; --bs-pagination-active-bg: var(--ink); --bs-pagination-active-border-color: var(--ink); --bs-pagination-focus-color: var(--ink); --bs-pagination-focus-box-shadow: 0 0 0 4px var(--marker); --bs-pagination-border-color: #c3d3c5; }
.list-group-item { border-color: #c3d3c5; }
.alert-warning { --bs-alert-bg: #fff8dc; --bs-alert-border-color: #f0dc8c; --bs-alert-color: #5c4a00; }
.brand-green { color: var(--ok); }

code { color: var(--ink-2); background: #eaf3ea; padding: .05rem .35rem; border-radius: 4px; font-size: .88em; }

/* Academy: progress bars use the brand green */
progress { accent-color: var(--marker-deep); height: .8rem; }

/* ---------- Rich text (lesson editor + lesson reader). Classes only: the CSP forbids inline styles. ---------- */
.rt-s-sm { font-size: .85rem; } .rt-s-md { font-size: 1rem; } .rt-s-lg { font-size: 1.25rem; } .rt-s-xl { font-size: 1.6rem; line-height: 1.25; } .rt-s-xxl { font-size: 2.1rem; line-height: 1.2; }
.rt-f-base { font-family: var(--bs-body-font-family); } .rt-f-serif { font-family: Georgia, "Times New Roman", serif; }
.rt-f-mono { font-family: ui-monospace, Menlo, Consolas, monospace; } .rt-f-hand { font-family: "Segoe Print", "Comic Sans MS", "Bradley Hand", cursive; }
.rt-f-inter { font-family: "Inter", system-ui, sans-serif; } .rt-f-roboto { font-family: "Roboto", system-ui, sans-serif; } .rt-f-opensans { font-family: "Open Sans", system-ui, sans-serif; } .rt-f-dmsans { font-family: "DM Sans", system-ui, sans-serif; } .rt-f-worksans { font-family: "Work Sans", system-ui, sans-serif; } .rt-f-jakarta { font-family: "Plus Jakarta Sans", system-ui, sans-serif; } .rt-f-geist { font-family: "Geist", system-ui, sans-serif; } .rt-f-poppins { font-family: "Poppins", system-ui, sans-serif; } .rt-f-montserrat { font-family: "Montserrat", system-ui, sans-serif; } .rt-f-raleway { font-family: "Raleway", system-ui, sans-serif; } .rt-f-rubik { font-family: "Rubik", system-ui, sans-serif; } .rt-f-playfair { font-family: "Playfair Display", Georgia, serif; } .rt-f-lora { font-family: "Lora", Georgia, serif; } .rt-f-baskerville { font-family: "Libre Baskerville", Georgia, serif; } .rt-f-greatvibes { font-family: "Great Vibes", cursive; } .rt-f-dancing { font-family: "Dancing Script", cursive; } .rt-f-parisienne { font-family: "Parisienne", cursive; } 
/* Exact sizes: rt-s-p<pixels>, typed or picked in the editor. */
.rt-s-p6 { font-size: 6px; line-height: 1.3; } .rt-s-p7 { font-size: 7px; line-height: 1.3; } .rt-s-p8 { font-size: 8px; line-height: 1.3; } 
.rt-s-p9 { font-size: 9px; line-height: 1.3; } .rt-s-p10 { font-size: 10px; line-height: 1.3; } .rt-s-p11 { font-size: 11px; line-height: 1.3; } .rt-s-p12 { font-size: 12px; line-height: 1.3; } .rt-s-p13 { font-size: 13px; line-height: 1.3; } .rt-s-p14 { font-size: 14px; line-height: 1.3; } .rt-s-p15 { font-size: 15px; line-height: 1.3; } .rt-s-p16 { font-size: 16px; line-height: 1.3; } 
.rt-s-p17 { font-size: 17px; line-height: 1.3; } .rt-s-p18 { font-size: 18px; line-height: 1.3; } .rt-s-p19 { font-size: 19px; line-height: 1.3; } .rt-s-p20 { font-size: 20px; line-height: 1.3; } .rt-s-p21 { font-size: 21px; line-height: 1.3; } .rt-s-p22 { font-size: 22px; line-height: 1.3; } .rt-s-p23 { font-size: 23px; line-height: 1.3; } .rt-s-p24 { font-size: 24px; line-height: 1.3; } 
.rt-s-p25 { font-size: 25px; line-height: 1.3; } .rt-s-p26 { font-size: 26px; line-height: 1.3; } .rt-s-p27 { font-size: 27px; line-height: 1.3; } .rt-s-p28 { font-size: 28px; line-height: 1.3; } .rt-s-p29 { font-size: 29px; line-height: 1.3; } .rt-s-p30 { font-size: 30px; line-height: 1.3; } .rt-s-p31 { font-size: 31px; line-height: 1.3; } .rt-s-p32 { font-size: 32px; line-height: 1.3; } 
.rt-s-p33 { font-size: 33px; line-height: 1.3; } .rt-s-p34 { font-size: 34px; line-height: 1.3; } .rt-s-p35 { font-size: 35px; line-height: 1.3; } .rt-s-p36 { font-size: 36px; line-height: 1.3; } .rt-s-p37 { font-size: 37px; line-height: 1.3; } .rt-s-p38 { font-size: 38px; line-height: 1.3; } .rt-s-p39 { font-size: 39px; line-height: 1.3; } .rt-s-p40 { font-size: 40px; line-height: 1.3; } 
.rt-s-p41 { font-size: 41px; line-height: 1.3; } .rt-s-p42 { font-size: 42px; line-height: 1.3; } .rt-s-p43 { font-size: 43px; line-height: 1.3; } .rt-s-p44 { font-size: 44px; line-height: 1.3; } .rt-s-p45 { font-size: 45px; line-height: 1.3; } .rt-s-p46 { font-size: 46px; line-height: 1.3; } .rt-s-p47 { font-size: 47px; line-height: 1.3; } .rt-s-p48 { font-size: 48px; line-height: 1.3; } 
.rt-s-p49 { font-size: 49px; line-height: 1.3; } .rt-s-p50 { font-size: 50px; line-height: 1.3; } .rt-s-p51 { font-size: 51px; line-height: 1.3; } .rt-s-p52 { font-size: 52px; line-height: 1.3; } .rt-s-p53 { font-size: 53px; line-height: 1.3; } .rt-s-p54 { font-size: 54px; line-height: 1.3; } .rt-s-p55 { font-size: 55px; line-height: 1.3; } .rt-s-p56 { font-size: 56px; line-height: 1.3; } 
.rt-s-p57 { font-size: 57px; line-height: 1.3; } .rt-s-p58 { font-size: 58px; line-height: 1.3; } .rt-s-p59 { font-size: 59px; line-height: 1.3; } .rt-s-p60 { font-size: 60px; line-height: 1.3; } .rt-s-p61 { font-size: 61px; line-height: 1.3; } .rt-s-p62 { font-size: 62px; line-height: 1.3; } .rt-s-p63 { font-size: 63px; line-height: 1.3; } .rt-s-p64 { font-size: 64px; line-height: 1.3; } 
.rt-s-p65 { font-size: 65px; line-height: 1.3; } .rt-s-p66 { font-size: 66px; line-height: 1.3; } .rt-s-p67 { font-size: 67px; line-height: 1.3; } .rt-s-p68 { font-size: 68px; line-height: 1.3; } .rt-s-p69 { font-size: 69px; line-height: 1.3; } .rt-s-p70 { font-size: 70px; line-height: 1.3; } .rt-s-p71 { font-size: 71px; line-height: 1.3; } .rt-s-p72 { font-size: 72px; line-height: 1.3; } 
.rt-s-p73 { font-size: 73px; line-height: 1.3; } .rt-s-p74 { font-size: 74px; line-height: 1.3; } .rt-s-p75 { font-size: 75px; line-height: 1.3; } .rt-s-p76 { font-size: 76px; line-height: 1.3; } .rt-s-p77 { font-size: 77px; line-height: 1.3; } .rt-s-p78 { font-size: 78px; line-height: 1.3; } .rt-s-p79 { font-size: 79px; line-height: 1.3; } .rt-s-p80 { font-size: 80px; line-height: 1.3; } 
.rt-s-p81 { font-size: 81px; line-height: 1.3; } .rt-s-p82 { font-size: 82px; line-height: 1.3; } .rt-s-p83 { font-size: 83px; line-height: 1.3; } .rt-s-p84 { font-size: 84px; line-height: 1.3; } .rt-s-p85 { font-size: 85px; line-height: 1.3; } .rt-s-p86 { font-size: 86px; line-height: 1.3; } .rt-s-p87 { font-size: 87px; line-height: 1.3; } .rt-s-p88 { font-size: 88px; line-height: 1.3; } 
.rt-s-p89 { font-size: 89px; line-height: 1.3; } .rt-s-p90 { font-size: 90px; line-height: 1.3; } .rt-s-p91 { font-size: 91px; line-height: 1.3; } .rt-s-p92 { font-size: 92px; line-height: 1.3; } .rt-s-p93 { font-size: 93px; line-height: 1.3; } .rt-s-p94 { font-size: 94px; line-height: 1.3; } .rt-s-p95 { font-size: 95px; line-height: 1.3; } .rt-s-p96 { font-size: 96px; line-height: 1.3; } 
.rt-s-p97 { font-size: 97px; line-height: 1.3; } .rt-s-p98 { font-size: 98px; line-height: 1.3; } .rt-s-p99 { font-size: 99px; line-height: 1.3; } .rt-s-p100 { font-size: 100px; line-height: 1.3; } .rt-s-p101 { font-size: 101px; line-height: 1.3; } .rt-s-p102 { font-size: 102px; line-height: 1.3; } .rt-s-p103 { font-size: 103px; line-height: 1.3; } .rt-s-p104 { font-size: 104px; line-height: 1.3; } 
.rt-s-p105 { font-size: 105px; line-height: 1.3; } .rt-s-p106 { font-size: 106px; line-height: 1.3; } .rt-s-p107 { font-size: 107px; line-height: 1.3; } .rt-s-p108 { font-size: 108px; line-height: 1.3; } .rt-s-p109 { font-size: 109px; line-height: 1.3; } .rt-s-p110 { font-size: 110px; line-height: 1.3; } .rt-s-p111 { font-size: 111px; line-height: 1.3; } .rt-s-p112 { font-size: 112px; line-height: 1.3; } 
.rt-s-p113 { font-size: 113px; line-height: 1.3; } .rt-s-p114 { font-size: 114px; line-height: 1.3; } .rt-s-p115 { font-size: 115px; line-height: 1.3; } .rt-s-p116 { font-size: 116px; line-height: 1.3; } .rt-s-p117 { font-size: 117px; line-height: 1.3; } .rt-s-p118 { font-size: 118px; line-height: 1.3; } .rt-s-p119 { font-size: 119px; line-height: 1.3; } .rt-s-p120 { font-size: 120px; line-height: 1.3; } 

.rt-size-in { width: 5rem; } .rt-size-go { font-weight: 700; }
.rt-c-ink { color: var(--ink); } .rt-c-red { color: #c0262d; } .rt-c-orange { color: #c2570c; } .rt-c-green { color: #1f7a2a; } .rt-c-teal { color: #0f7676; }
.rt-c-blue { color: #1d4ed8; } .rt-c-purple { color: #7e22ce; } .rt-c-pink { color: #be185d; } .rt-c-grey { color: #6b7280; }
.rt-h-none { background: transparent; } .rt-h-yellow { background: #fff3a3; } .rt-h-green { background: #c9f0c0; } .rt-h-blue { background: #cfe3ff; }
.rt-h-pink { background: #ffd3e6; } .rt-h-orange { background: #ffdcb8; } .rt-h-grey { background: #e3e6e8; }
.rt-al-left { text-align: left; } .rt-al-center { text-align: center; } .rt-al-right { text-align: right; } .rt-al-justify { text-align: justify; }
.rt-box-info, .rt-box-tip, .rt-box-warn, .rt-box-task { border-left: 5px solid; border-radius: 6px; padding: .6rem .9rem; margin: .8rem 0; }
.rt-box-info { background: #e7f0ff; border-color: #1d4ed8; } .rt-box-tip { background: #e6f6e2; border-color: #369422; }
.rt-box-warn { background: #fff3d6; border-color: #c2570c; } .rt-box-task { background: #f0e8ff; border-color: #7e22ce; }
.rt-box-info > :last-child, .rt-box-tip > :last-child, .rt-box-warn > :last-child, .rt-box-task > :last-child { margin-bottom: 0; }
.rt-content table, .rt-area table { border-collapse: collapse; width: 100%; margin: .8rem 0; }
.rt-content td, .rt-content th, .rt-area td, .rt-area th { border: 1px solid #b7c7ba; padding: .4rem .55rem; vertical-align: top; min-width: 3rem; }
.rt-content th, .rt-area th { background: #eaf3ea; text-align: left; }
.rt-content blockquote, .rt-area blockquote { border-left: 4px solid var(--marker); margin: .8rem 0; padding: .1rem 1rem; color: var(--ink-2); }
.rt-content hr, .rt-area hr { margin: 1.2rem 0; }
.rt-content a, .rt-area a { color: #1d4ed8; text-decoration: underline; }

/* editor chrome */
.rt { border: 2px solid var(--ink); border-radius: 8px; background: var(--white); overflow: hidden; }
.rt-bar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: .35rem; background: #eaf3ea; border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 3; }
.rt-btn { border: 1px solid transparent; background: transparent; border-radius: 6px; min-width: 2.2rem; height: 2.2rem; padding: 0 .4rem; color: var(--ink); font-size: 1rem; line-height: 1; }
.rt-btn-text { font-size: .85rem; font-weight: 700; }
.rt-btn:hover, .rt-btn:focus-visible { background: #fff; border-color: var(--ink-2); }
.rt-sep { width: 1px; height: 1.4rem; background: #9fb5a3; margin: 0 .25rem; }
.rt-panel { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .5rem; background: #f8fbf8; border-bottom: 1px solid var(--line); }
.rt-panel[hidden] { display: none; }
.rt-opt { border: 1px solid #b7c7ba; background: #fff; border-radius: 6px; padding: .3rem .65rem; min-height: 2.1rem; font-size: .9rem; }
.rt-opt:hover, .rt-opt:focus-visible { border-color: var(--ink); background: #eaf3ea; }
.rt-sw { min-width: 2.3rem; padding: .2rem .4rem; font-weight: 800; font-size: 1.05rem; }
.rt-sym { min-width: 2.1rem; padding: .2rem .35rem; font-size: 1.05rem; }
.rt-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-left: .25rem; }
.rt-area { min-height: 16rem; max-height: 70vh; overflow: auto; padding: .9rem 1rem; outline: none; line-height: 1.6; }
.rt-area:focus { box-shadow: inset 0 0 0 3px var(--marker); }
.rt-area h2 { font-size: 1.5rem; } .rt-area h3 { font-size: 1.25rem; } .rt-area h4 { font-size: 1.08rem; }

/* printing a lesson from the editor: show only the lesson */
.rt-print { display: none; }
@media print {
  body.rt-printing > *:not(#rtPrint) { display: none !important; }
  body.rt-printing #rtPrint { display: block; padding: 1rem; }
}

/* Lesson media, embeds, code and anchors */
.rt-content img, .rt-area img { max-width: 100%; height: auto; border-radius: 6px; }
.rt-content audio, .rt-area audio { width: 100%; margin: .5rem 0; }
.rt-content video, .rt-area video { max-width: 100%; border-radius: 6px; background: #000; }
.rt-embed { position: relative; aspect-ratio: 16 / 9; margin: .8rem 0; background: #000; border-radius: 6px; overflow: hidden; }
.rt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rt-content pre, .rt-area pre { background: #0e2a17; color: #e8f5e9; padding: .8rem 1rem; border-radius: 6px; overflow-x: auto; white-space: pre; font-size: .9rem; }
.rt-content code, .rt-area code { font-family: ui-monospace, Menlo, Consolas, monospace; }
.rt-area [id^="a-"] { border-left: 3px dashed var(--marker); padding-left: .5rem; }
.rt-htmlbox { width: 100%; }
.rt-html { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; margin-bottom: .4rem; }

/* ---- Code labs ---- */
.lab { border: 1px solid #1f4d2c; border-radius: 8px; margin: 1rem 0; background: #0e2a17; color: #e8f5e9; overflow: hidden; }
.lab-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; padding: .5rem .75rem; background: #143d22; }
.lab-title { font-weight: 700; font-size: .9rem; }
.lab-btns { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.lab-btns .btn-outline-dark { color: #e8f5e9; border-color: #5f8f6d; }
.lab-btns .btn-outline-dark:hover { background: #1f4d2c; color: #fff; }
.lab-views { display: inline-flex; }
.lab-views .btn { border-radius: 0; margin-left: -1px; }
.lab-views .btn:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.lab-views .btn:last-child { border-radius: 0 6px 6px 0; }
.lab-views .btn[aria-pressed="true"] { background: #f2c94c; border-color: #f2c94c; color: #1b1b1b; }
.lab-edit { display: flex; height: min(18rem, 50vh); }
.lab-gutter { margin: 0; padding: .5rem .4rem; width: 2.8rem; flex: none; overflow: hidden; text-align: right; color: #7fa88b; background: #0b2113; font: 16px/1.5rem ui-monospace, Menlo, Consolas, monospace; border-radius: 0; user-select: none; }
.lab-ta { flex: 1; min-width: 0; margin: 0; padding: .5rem; border: 0; outline: 0; resize: none; background: #0e2a17; color: #e8f5e9; caret-color: #fff; white-space: pre; overflow: auto; tab-size: 4; font: 16px/1.5rem ui-monospace, Menlo, Consolas, monospace; }
.lab-ta:focus-visible { box-shadow: inset 0 0 0 2px #f2c94c; }
.lab-keys { display: flex; gap: .3rem; overflow-x: auto; padding: .4rem .5rem; background: #143d22; }
.lab-key { flex: none; min-width: 2.6rem; min-height: 2.4rem; border: 1px solid #5f8f6d; border-radius: 6px; background: #0e2a17; color: #e8f5e9; font: 600 1rem ui-monospace, Menlo, Consolas, monospace; }
.lab-key:active { background: #1f4d2c; }
.lab-out { background: #fff; color: #111; }
.lab-result:empty { display: none; }
.lab-frame { display: block; width: 100%; min-height: 14rem; height: 16rem; border: 0; background: #fff; }
.lab-frame-hidden { display: none; }
.lab-console { max-height: 12rem; overflow: auto; padding: .5rem .75rem; background: #08170e; color: #e8f5e9; font: 14px/1.4 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.lab-l-warn { color: #f2c94c; } .lab-l-error { color: #ff8a80; }
.lab-status { padding: .3rem .75rem; font-size: .8rem; color: #a8c9b2; min-height: 1.6rem; }
@media (min-width: 992px) { .lab-keys { flex-wrap: wrap; overflow: visible; } }

/* layout buttons: Code only / Split / Result only */
.lab-view-code .lab-out { display: none; }
.lab-view-code .lab-edit { height: min(30rem, 65vh); }
.lab-view-out .lab-code { display: none; }
.lab-view-out .lab-frame { height: 30rem; }
.lab-view-out .lab-console { max-height: 26rem; min-height: 8rem; }
.lab-view-out .lab-out { min-height: 12rem; }

/* full screen: code and result side by side on wide screens */
.lab-full { position: fixed; inset: 0; z-index: 2000; margin: 0; border-radius: 0; display: flex; flex-direction: column; }
.lab-full .lab-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lab-full .lab-code { flex: 1 1 50%; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.lab-full .lab-edit { flex: 1; height: auto; min-height: 0; }
.lab-full .lab-out { flex: 1 1 50%; min-height: 0; min-width: 0; overflow: auto; display: flex; flex-direction: column; }
.lab-full .lab-result { flex: 1; min-height: 0; }
.lab-full .lab-frame { height: 100%; min-height: 12rem; }
.lab-full .lab-console { max-height: 40%; }
.lab-full.lab-view-code .lab-code, .lab-full.lab-view-out .lab-out { flex-basis: 100%; }
@media (min-width: 900px) { .lab-full .lab-main { flex-direction: row; } .lab-full .lab-out { border-left: 2px solid #1f4d2c; } }
body.lab-noscroll { overflow: hidden; }
.rt-area pre.rt-lab::before { content: "Code lab"; display: block; font: 700 .7rem sans-serif; color: #f2c94c; margin-bottom: .3rem; }

/* ---- Course page layout: outline only / side by side / lesson only, and full-screen lesson (laptops) ---- */
.course-tools { display: none; }
@media (min-width: 992px) { .course-tools { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-bottom: .75rem; } }
.course-tools .btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.reader-head { display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; }
.reader-head .btn { flex: none; }
#reader.reader-full { position: fixed; inset: 0; z-index: 1500; margin: 0 !important; border-radius: 0; overflow: auto; padding: 1.25rem max(1rem, 10vw); background: var(--bs-body-bg, #fff); }

/* ---- Footer social links and WhatsApp button ---- */
.site-footer { padding-bottom: 4.75rem; }
.site-footer .social-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.site-footer .social-links a { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border: 1px solid #3f6a4d; border-radius: 50%; color: #fff; transition: background .15s, color .15s, border-color .15s; }
.site-footer .social-links a:hover, .site-footer .social-links a:focus-visible { background: var(--marker); border-color: var(--marker); color: var(--ink); }
.wa-float { position: fixed; left: 1rem; bottom: 1rem; z-index: 1400; display: inline-flex; align-items: center; gap: .5rem; padding: .65rem; background: #25d366; color: #fff; border-radius: 999px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); text-decoration: none; font-weight: 700; }
.wa-float:hover, .wa-float:focus-visible { background: #1ebe5a; color: #fff; }
.wa-label { display: none; padding-right: .5rem; }
@media (min-width: 768px) { .wa-label { display: inline; } .wa-float { padding: .65rem .8rem; } }
@media print { .wa-float { display: none; } }

/* ---- Scientific calculator ---- */
.rt-area pre.rt-lang-calc::before { content: "Scientific calculator (learners see the keypad; write angle: deg or angle: rad)"; }
.calc { --calc-bg: #d9dbdd; --calc-bar: #3f7de0; --calc-ink: #1b1f24; --calc-screen: #fff; --calc-key: #f4f5f6; --calc-key2: #dcdfe2; --calc-keyline: #b3b8bd; position: relative; max-width: 40rem; margin: 1rem 0; background: var(--calc-bg); color: var(--calc-ink); border-radius: 8px; overflow: hidden; border: 1px solid var(--calc-keyline); }
.calc-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; padding: .45rem .7rem; background: var(--calc-bar); color: #fff; }
.calc-title { font-weight: 600; font-size: .95rem; }
.calc-tools { display: inline-flex; gap: .35rem; }
.calc-tb { border: 0; border-radius: 4px; padding: .2rem .7rem; min-height: 1.9rem; background: rgba(255, 255, 255, .28); color: #fff; font-weight: 700; font-size: .8rem; }
.calc-tb:hover { background: rgba(255, 255, 255, .42); }
.calc-tb.dark { background: #3f7de0; }
.calc-tb:focus-visible, .ck:focus-visible { outline: 3px solid #f2c94c; outline-offset: 1px; }
.calc-help { padding: .6rem .8rem; background: #fff; color: #111; font-size: .85rem; border-bottom: 1px solid var(--calc-keyline); }
.calc-help[hidden], .calc-hist[hidden] { display: none; }
.calc-help ul { margin: 0; padding-left: 1.1rem; }
.calc-help code { color: #1f4d2c; }
.calc-body { padding: .7rem; }
.calc-in { display: block; width: 100%; padding: .45rem .6rem; margin-bottom: .5rem; border: 1px solid var(--calc-keyline); border-radius: 4px; background: var(--calc-screen); color: #111; font: 1.1rem/1.4 ui-monospace, Menlo, Consolas, monospace; text-align: left; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.calc-in:focus { outline: 2px solid #3f7de0; }
.calc-outbox { position: relative; margin-bottom: .6rem; padding: .3rem .6rem; border: 1px solid var(--calc-keyline); border-radius: 4px; background: var(--calc-screen); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.calc-out { display: block; min-height: 2.2rem; text-align: right; color: #111; font: 1.6rem/1.4 Arial, Helvetica, sans-serif; overflow-x: auto; white-space: nowrap; }
.calc-out.err { font-size: .95rem; color: #b00020; white-space: normal; }
.calc-mem { position: absolute; left: .5rem; top: .25rem; font-size: .7rem; font-weight: 700; color: #1f4d2c; }
.calc-grid { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: .3rem; align-items: stretch; }
.calc-angle { grid-column: span 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; margin: 0 0 0 .3rem; padding: 0; border: 0; font-size: clamp(.65rem, 2.6vw, .8rem); min-width: 0; line-height: 1.25; }
.calc-angle label { display: inline-flex; align-items: center; gap: .15rem; white-space: nowrap; }
.calc-gap { grid-column: span 2; }
.ck { min-width: 0; min-height: 2.35rem; padding: 0; border: 1px solid var(--calc-keyline); border-radius: 5px; background: linear-gradient(var(--calc-key), var(--calc-key2)); color: var(--calc-ink); font: 600 clamp(.62rem, 2.7vw, .92rem) Arial, Helvetica, sans-serif; box-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.ck:hover { filter: brightness(.95); }
.ck:active { transform: translateY(1px); box-shadow: none; }
.ck { white-space: nowrap; overflow: hidden; }
.ck sup, .ck sub { font-size: .65em; line-height: 0; white-space: nowrap; }
.ck.k-fn { font-size: clamp(.5rem, 2.3vw, .85rem); letter-spacing: -.02em; }
.ck.k-mem, .ck.k-mod { font-weight: 700; }
.ck.k-num { font-size: clamp(.8rem, 3vw, 1.05rem); }
.ck.k-clr { background: linear-gradient(#ee5a4f, #d63a2f); border-color: #b32b21; color: #fff; }
.ck.k-back { grid-column: span 2; }
.ck.k-eq { grid-row: span 2; background: linear-gradient(#3fd17c, #26b062); border-color: #1d8d4e; color: #fff; font-size: 1.3rem; }
.ck.k-zero { grid-column: span 2; }
.calc-hist { max-height: 12rem; overflow-y: auto; margin: 0 .7rem .7rem; padding: .4rem; background: #fff; color: #111; border-radius: 6px; border: 1px solid var(--calc-keyline); }
.calc-h { display: block; width: 100%; text-align: right; border: 0; background: none; padding: .3rem .4rem; font: .9rem ui-monospace, Menlo, Consolas, monospace; border-bottom: 1px solid #e3e3e3; color: #111; overflow-wrap: anywhere; }
.calc-h:hover { background: #e6f0fc; }
.calc-status { min-height: 1.1rem; padding: 0 .7rem .5rem; font-size: .8rem; color: #444; }
.calc .lab-menu { top: 100%; right: .5rem; }

/* ---- Spreadsheet ---- */
.rt-area pre.rt-lang-sheet::before { content: "Spreadsheet (one row per line, cells separated by |, formulas start with =)"; }
.sheet { position: relative; margin: 1rem 0; padding: .6rem; background: #1b2a20; color: #fff; border-radius: 12px; }
.sheet-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.sheet-title { font-weight: 700; font-size: .9rem; }
.sheet-tools { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.sheet-tools .btn { color: #fff; border-color: rgba(255, 255, 255, .5); }
.sheet-tools .btn-danger { background: #a83232; border-color: #a83232; }
.sheet-bar { display: flex; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.sheet-name { min-width: 4.2rem; text-align: center; padding: .3rem .4rem; background: #e8f3e6; color: #111; border-radius: 6px; font: 700 .85rem ui-monospace, Menlo, Consolas, monospace; }
.sheet-fx { flex: 1; min-width: 0; padding: .3rem .5rem; border: 0; border-radius: 6px; background: #fff; color: #111; font: .95rem ui-monospace, Menlo, Consolas, monospace; }
.sheet-help { background: #fff; color: #111; border-radius: 8px; padding: .5rem .7rem; margin-bottom: .4rem; font-size: .85rem; }
.sheet-help[hidden] { display: none; }
.sheet-help span { color: #1f4d2c; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; }
.sheet-scroll { overflow: auto; max-height: 24rem; background: #fff; border-radius: 6px; outline: none; -webkit-overflow-scrolling: touch; }
.sheet-scroll:focus-visible { box-shadow: 0 0 0 3px #f2c94c; }
.sheet-tbl { border-collapse: separate; border-spacing: 0; color: #111; font-size: .9rem; user-select: none; }
.sheet-tbl th { position: sticky; top: 0; z-index: 2; background: #e9ece9; border-right: 1px solid #c9cfc9; border-bottom: 1px solid #c9cfc9; padding: .2rem .5rem; font-weight: 600; text-align: center; min-width: 5.6rem; }
.sheet-tbl tbody th { position: sticky; left: 0; top: auto; z-index: 1; min-width: 2.4rem; width: 2.4rem; }
.sheet-tbl th.corner { left: 0; z-index: 3; min-width: 2.4rem; width: 2.4rem; }
.sheet-tbl td { min-width: 5.6rem; max-width: 12rem; height: 2rem; padding: 0 .45rem; border-right: 1px solid #e2e6e2; border-bottom: 1px solid #e2e6e2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: cell; position: relative; }
.sheet-tbl tr.sp td { padding: 0; border: 0; min-width: 0; max-width: none; cursor: default; }
.sheet-name { cursor: pointer; }
.sheet-tbl td.num { text-align: right; }
.sheet-tbl td.bool { text-align: center; }
.sheet-tbl td.err { color: #b00020; font-weight: 600; text-align: center; }
.sheet-tbl td.in { box-shadow: inset 0 0 0 1000px rgba(31, 122, 58, .16); }
.sheet-tbl td.cur { outline: 2px solid #1f7a3a; outline-offset: -2px; }
.sheet-tbl td.editing { padding: 0; overflow: visible; }
/* batch 33: formatting bar, fill handle, resize grips */
.sheet-fmt { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-bottom: .45rem; }
.sheet-fmt .btn { color: #fff; border-color: rgba(255, 255, 255, .5); padding: .2rem .5rem; }
.sheet-fmt .btn[aria-pressed="true"] { background: #f2c94c; border-color: #f2c94c; color: #111; }
.sheet-fmt .btn:focus-visible { outline: 3px solid #f2c94c; outline-offset: 2px; }
.sf-sep { width: 1px; align-self: stretch; margin: 0 .15rem; background: rgba(255, 255, 255, .35); }
.sheet-pop { position: absolute; z-index: 20; top: 100%; display: flex; flex-wrap: wrap; gap: .3rem; width: 11.5rem; padding: .5rem; background: #fff; color: #111; border-radius: 8px; box-shadow: 0 6px 22px rgba(0, 0, 0, .35); }
.sheet-pop[hidden] { display: none; }
.sp-sw { width: 1.7rem; height: 1.7rem; border: 1px solid #888; border-radius: 4px; padding: 0; cursor: pointer; }
.sp-sw:focus-visible, .sp-it:focus-visible, .sp-none:focus-visible { outline: 3px solid #1f4d2c; outline-offset: 1px; }
.sp-none, .sp-it { flex: 1 0 100%; text-align: left; border: 0; background: #eef3ee; color: #111; border-radius: 5px; padding: .3rem .5rem; font-size: .88rem; cursor: pointer; }
.sp-none:hover, .sp-it:hover { background: #dcebdd; }
.sheet-wrap { position: relative; display: inline-block; min-width: 100%; }
.sheet-fill { position: absolute; z-index: 1; width: 20px; height: 20px; padding: 0; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; border-radius: 5px; background: #1f7a3a; color: #fff; font-size: 14px; line-height: 1; cursor: crosshair; touch-action: none; box-shadow: 0 0 0 1px #1f7a3a; }
.sheet-fill[hidden] { display: none; }
.sheet-tbl td.fillpv { outline: 2px dashed #1f7a3a; outline-offset: -2px; }
.sheet-tbl th .grip { position: absolute; z-index: 3; touch-action: none; }
.sheet-tbl th .g-c { top: 0; right: -5px; width: 11px; height: 100%; cursor: col-resize; }
.sheet-tbl th .g-r { left: 0; bottom: -5px; width: 100%; height: 11px; cursor: row-resize; }
.sheet-tbl th .grip:hover { background: rgba(31, 122, 58, .45); }
.sheet-tbl th[scope] { cursor: pointer; }
.sheet-tbl td[hidden] { display: none; }

.sheet-ed { position: absolute; inset: 0; width: 100%; min-width: 9rem; height: 100%; border: 2px solid #1f7a3a; padding: 0 .4rem; background: #fff; color: #111; font: inherit; z-index: 4; }
.sheet-status { min-height: 1.1rem; font-size: .8rem; margin-top: .3rem; color: #cfe8d3; }
.sheet.full { position: fixed; inset: 0; z-index: 1050; margin: 0; border-radius: 0; display: flex; flex-direction: column; overflow: auto; }
.sheet.full .sheet-scroll { max-height: none; flex: 1; }
body.sheet-noscroll { overflow: hidden; }

.sheet-imp { margin: 0; padding: .55rem .8rem; background: #fff8dc; border-bottom: 1px solid #e0c96a; font-size: .88rem; }
.sheet-imp[hidden] { display: none; }
.sheet-imp-t { margin: 0 0 .35rem; }
.sheet-imp-r { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.sheet-imp-r .form-select { width: auto; max-width: 100%; }
.sheet-imp-b { display: flex; flex-wrap: wrap; gap: .4rem; }
/* ---- Statistics and charts panel ---- */
.sheet-an { border-top: 2px solid var(--ink); background: #fff; color: #0e2a17; padding: .6rem .7rem .8rem; }
.sheet-an[hidden] { display: none; }
.an-top, .an-bar, .an-row, .an-act, .an-tabs { display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; }
.an-top { justify-content: space-between; margin-bottom: .3rem; }
.an-bar { margin-bottom: .5rem; font-size: .85rem; }
.an-range { color: #566573; flex: 1 1 12rem; }
.an-inl { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; }
.an-tabs { gap: .25rem; border-bottom: 2px solid var(--line); margin-bottom: .6rem; }
.an-tab { border: 2px solid transparent; border-bottom: 0; background: transparent; padding: .3rem .7rem; font-weight: 700; font-size: .88rem; border-radius: 6px 6px 0 0; color: #0e2a17; }
.an-tab.on { background: #0e2a17; color: #fff; }
.an-row { margin-bottom: .5rem; align-items: flex-end; }
.an-row label { display: flex; flex-direction: column; font-size: .8rem; font-weight: 600; gap: .15rem; min-width: 7rem; }
.an-row label.an-inl { flex-direction: row; align-items: center; min-width: 0; }
.an-checks { border: 1px solid var(--line); border-radius: 6px; padding: .3rem .6rem .5rem; margin-bottom: .5rem; display: flex; flex-wrap: wrap; gap: .2rem .9rem; }
.an-checks legend { float: none; width: auto; font-size: .8rem; font-weight: 700; padding: 0 .3rem; margin: 0; }
.an-checks label { font-size: .85rem; display: inline-flex; gap: .3rem; align-items: center; }
.an-scroll { overflow-x: auto; margin-bottom: .6rem; }
.an-tbl { border-collapse: collapse; font-size: .85rem; min-width: 100%; }
.an-tbl th, .an-tbl td { border: 1px solid var(--line); padding: .25rem .55rem; text-align: right; white-space: nowrap; }
.an-tbl thead th { background: #eef4ee; text-align: center; }
.an-tbl tbody th { text-align: left; font-weight: 600; background: #f7faf7; }
.an-chart { max-width: 680px; margin: .5rem 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.an-chart svg { display: block; width: 100%; height: auto; }
.an-act { margin: .4rem 0; }
.an-msg, .an-note { color: #566573; font-size: .88rem; margin: .3rem 0; }
.an-dice { display: flex; gap: .4rem; align-items: center; margin: .4rem 0; min-height: 2.6rem; }
.an-die, .an-coin { display: inline-grid; place-items: center; min-width: 2.4rem; height: 2.4rem; padding: 0 .3rem; border: 2px solid #0e2a17; border-radius: 8px; font-weight: 800; font-size: 1.1rem; background: #fff; }
.an-coin { border-radius: 50%; width: 2.6rem; background: #f2c94c; }
.an-coin.T { background: #cfd8dc; }
.an-sum { font-weight: 800; margin-left: .3rem; }
.tally5 { text-decoration: line-through; margin-right: .3rem; letter-spacing: -.05em; }
.an-tbl .tally5, .an-tbl span { font-weight: 800; letter-spacing: .05em; }
/* ---- Music writer ---- */
@font-face { font-family: "Bravura"; src: url("/vendor/fonts/bravura.woff2") format("woff2"); font-display: block; }
.rt-area pre.rt-lang-music::before { content: "Music writer (optional: staff: grand, key: G, time: 3/4, tempo: 100, treble: C4q D4q E4h | …, bass: C3w)"; }
.mg { font-family: "Bravura", serif; font-style: normal; font-weight: 400; line-height: 1; }
.mg.big { font-size: 1.9rem; }
.mg.dyn { font-size: 1.5rem; }
.mu { position: relative; margin: 1rem 0; padding: .6rem; background: #1b2a20; color: #fff; border-radius: 12px; }
.mu-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.mu-title { font-weight: 700; font-size: .9rem; }
.mu-tools { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.mu-tools .btn, .mu-piano-bar .btn, .mu-set .btn { color: #fff; border-color: rgba(255, 255, 255, .5); }
.mu-tools .btn-danger { background: #a83232; border-color: #a83232; }
.mu-piano-bar .btn.on, .mu-set .btn.on { background: #f2c94c; color: #111; border-color: #f2c94c; }
.mu-help { background: #fff; color: #111; border-radius: 8px; padding: .5rem .7rem; margin-bottom: .5rem; font-size: .85rem; }
.mu-help[hidden], .mu-sel[hidden] { display: none; }
.mu-set { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: .5rem; font-size: .75rem; }
.mu-set label { display: grid; gap: .1rem; }
.mu-set .form-select, .mu-set .form-control { width: auto; min-width: 5.5rem; max-width: 9rem; }
.mu-set input[type=number] { max-width: 5rem; }
.mu-pal { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.mu-grp { display: flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; background: rgba(255, 255, 255, .08); border-radius: 8px; }
.mu-b { min-width: 2.6rem; height: 2.6rem; padding: 0 .4rem; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: #f4f4f4; color: #111; font-size: 1.1rem; touch-action: none; user-select: none; }
.mu-b:hover { filter: brightness(.93); }
.mu-b.on { background: #f2c94c; outline: 2px solid #fff; }
.mu-b:focus-visible, .mu-chip:focus-visible { outline: 3px solid #f2c94c; outline-offset: 1px; }
.mu-ico { width: 1.5rem; height: 1.9rem; }
.mu-sel { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; padding: .35rem .45rem; margin-bottom: .5rem; background: #fff; color: #111; border-radius: 8px; }
.mu-sel-name { font-weight: 700; font-size: .85rem; margin-right: .3rem; }
.mu-chip { min-width: 2.3rem; height: 2.3rem; border: 1px solid #c9cfc9; border-radius: 6px; background: #f4f4f4; color: #111; font-size: 1rem; padding: 0 .4rem; }
.mu-chip.on { background: #1f7a3a; color: #fff; border-color: #1f7a3a; }
.mu-chip.danger { color: #a83232; }
.mu-stage { overflow: auto; background: #fff; border-radius: 6px; outline: none; -webkit-overflow-scrolling: touch; max-height: 70vh; }
.mu-stage:focus-visible { box-shadow: 0 0 0 3px #f2c94c; }
.mu-svg { display: block; user-select: none; touch-action: pan-x pan-y; cursor: crosshair; }
.mu-n { cursor: pointer; }
.mu-n.sel text, .mu-n.sel circle:not([fill=transparent]) { fill: #d97706; }
.mu-n.playing text, .mu-n.playing circle:not([fill=transparent]) { fill: #1f7a3a; }
.mu-ghost { position: fixed; z-index: 2000; pointer-events: none; padding: .2rem .5rem; background: #f2c94c; color: #111; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.mu-piano-bar { display: flex; gap: .4rem; flex-wrap: wrap; margin: .6rem 0 .3rem; }
.mu-piano { overflow-x: auto; overflow-y: hidden; background: #0c150f; border-radius: 6px; padding: 0 0 4px; -webkit-overflow-scrolling: touch; }
.mu-keys { position: relative; height: 9.5rem; }
.pk { position: absolute; top: 0; border: 1px solid #333; padding: 0 0 .3rem; display: flex; align-items: flex-end; justify-content: center; text-align: center; touch-action: pan-x; user-select: none; }
.pk.w { width: 38px; height: 100%; background: #fff; color: #333; font-size: .72rem; border-radius: 0 0 5px 5px; z-index: 1; }
.pk.b { width: 24px; height: 60%; background: #222; color: #fff; font-size: .6rem; line-height: 1.05; border-radius: 0 0 4px 4px; z-index: 2; }
.pk.w.hit { background: #f2c94c; }
.pk.b.hit { background: #1f7a3a; }
.mu-status { min-height: 1.1rem; font-size: .8rem; margin-top: .3rem; color: #cfe8d3; }
.mu.full { position: fixed; inset: 0; z-index: 1050; margin: 0; border-radius: 0; overflow: auto; }
.mu.full .mu-stage { max-height: none; }
.tool-print { display: none; }
@media print {
  .tool-print-tbl { border-collapse: collapse; font: 12pt sans-serif; }
  .tool-print-tbl td, .tool-print-tbl th { border: 1px solid #999; padding: 4px 10px; }
  .tool-print-tbl th { background: #eee; }
  body.printing-tool > *:not(.tool-print) { display: none !important; }
  body.printing-tool .tool-print { display: block !important; }
}

/* ---- Footer fit: long words (an email address) wrap instead of pushing the page wide ---- */
.site-footer { overflow-x: clip; overflow-wrap: anywhere; }
.site-footer .row > * { min-width: 0; }
.site-footer ul { grid-template-columns: minmax(0, 1fr); }
.site-footer li, .site-footer p, .site-footer a { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.site-footer p, .site-footer li { font-size: clamp(.82rem, 3.4vw, 1rem); }
.site-footer .small { font-size: clamp(.75rem, 3vw, .875rem); }
.site-footer .social-links { max-width: 100%; }

/* ---- Geometry lab ---- */
.rt-area pre.rt-lang-geo::before { content: "Geometry lab (starter figure lines: A 1 2 · segment A B · circle A B · polygon A B C · angle A B C · midpoint M A B; options grid/axes/snap/measure: on or off, unit: cm)"; }
.geo { position: relative; margin: 1rem 0; border: 2px solid #1b2a20; border-radius: 10px; overflow: visible; background: #eef2ef; color: #111; max-width: 62rem; }
.geo-bar { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; padding: .45rem .7rem; background: #1b2a20; color: #fff; border-radius: 8px 8px 0 0; }
.geo-title { font-weight: 700; }
.geo-acts { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.geo-ab { border: 0; border-radius: 6px; padding: .2rem .6rem; min-height: 2rem; background: rgba(255, 255, 255, .18); color: #fff; font-weight: 700; font-size: .85rem; }
.geo-ab:hover:not(:disabled) { background: rgba(255, 255, 255, .34); } .geo-ab:disabled { opacity: .4; }
.geo-menu { position: absolute; right: .6rem; top: 100%; z-index: 20; min-width: 12rem; }
.geo-menu[hidden] { display: none; }
.geo-tools { display: flex; flex-wrap: wrap; gap: .3rem; padding: .5rem .6rem 0; }
.geo-tool { display: inline-flex; flex-direction: column; align-items: center; gap: .05rem; min-width: 4.1rem; padding: .3rem .4rem; border: 1px solid #9aa59d; border-radius: 6px; background: #fff; color: #111; font-size: .68rem; font-weight: 700; line-height: 1.1; }
.geo-tool .bi { font-size: 1.1rem; }
.geo-tool[aria-pressed="true"] { background: #43b02a; border-color: #2d7f27; color: #0b1a11; }
.geo-opts { display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding: .45rem .7rem; font-size: .85rem; }
.geo-opts label { display: inline-flex; align-items: center; gap: .3rem; }
.geo-stage { padding: 0 .6rem; }
.geo-svg { display: block; width: 100%; height: auto; aspect-ratio: 800 / 560; background: #fff; border: 1px solid #9aa59d; border-radius: 6px; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.geo-svg:focus-visible { outline: 3px solid #43b02a; outline-offset: 1px; }
.geo-hint { margin: .5rem .7rem 0; padding: .4rem .7rem; min-height: 2.4rem; background: #fff8dc; border-left: 4px solid #f2c94c; border-radius: 4px; font-size: .9rem; }
.geo-cmd { display: flex; gap: .4rem; padding: .5rem .7rem 0; }
.geo-in { flex: 1 1 auto; min-width: 0; padding: .4rem .6rem; border: 1px solid #9aa59d; border-radius: 6px; background: #fff; color: #111; font: .9rem ui-monospace, Menlo, Consolas, monospace; }
.geo-go { border: 0; border-radius: 6px; padding: .4rem 1rem; background: #1b2a20; color: #fff; font-weight: 700; }
.geo-meas { padding: .5rem .7rem .8rem; font-size: .9rem; }
.geo-meas ul { margin: 0; padding-left: 1.1rem; } .geo-h { margin: 0 0 .25rem; font-size: 1rem; } .geo-empty { margin: 0; color: #52665a; }
@media (max-width: 575.98px) { .geo-tool { min-width: 3.5rem; font-size: .62rem; } }
@media print { .geo { display: none; } }

/* ---- Geometry instruments ---- */
.geo-inst { border-top: 1px dashed var(--line); padding-top: .35rem; }
.geo-sub, .geo-build { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: flex-end; padding: .4rem .6rem; background: #f4f8f4; border-bottom: 1px solid var(--line); color: #0e2a17; }
.geo-sub[hidden], .geo-build[hidden] { display: none; }
.geo-sub label, .geo-build label { display: flex; flex-direction: column; font-size: .78rem; font-weight: 700; gap: .15rem; }
.geo-sub input, .geo-build input { width: 6rem; }
.geo-sub select, .geo-build select { width: auto; min-width: 6rem; max-width: 16rem; }
.geo-bf { display: contents; }
/* ---- Mathematical tables ---- */
.mt { border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: #0e2a17; margin: 1rem 0; overflow: hidden; }
.mt-bar { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; padding: .45rem .7rem; }
.mt-title { font-weight: 700; }
.mt-tabs { display: flex; gap: .25rem; padding: .5rem .6rem 0; overflow-x: auto; border-bottom: 2px solid var(--line); }
.mt-tab { flex: 0 0 auto; border: 2px solid transparent; border-bottom: 0; background: transparent; padding: .3rem .65rem; font-weight: 700; font-size: .82rem; border-radius: 6px 6px 0 0; color: #0e2a17; white-space: nowrap; }
.mt-tab.on { background: #0e2a17; color: #fff; }
.mt-look { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: flex-end; padding: .6rem; background: #f4f8f4; }
.mt-look label { display: flex; flex-direction: column; font-size: .78rem; font-weight: 700; gap: .15rem; }
.mt-look input { width: 9rem; } .mt-look select { width: auto; min-width: 9rem; }
.mt-res { padding: 0 .7rem; }
.mt-ans { margin-top: .6rem; padding: .5rem .7rem; background: #e8f6e8; border-left: 4px solid #1b7f3b; border-radius: 4px; }
.mt-ans span { color: #566573; font-size: .88rem; }
.mt-steps { margin: .5rem 0 .2rem 1.1rem; padding: 0; font-size: .9rem; }
.mt-steps li { margin-bottom: .25rem; }
.mt-err { color: #b3261e; font-weight: 600; margin: .6rem 0 0; }
.mt-note { margin: .5rem .7rem; font-size: .85rem; color: #566573; }
.mt-scroll { overflow: auto; max-height: 26rem; border-top: 1px solid var(--line); }
.mt-tbl { border-collapse: separate; border-spacing: 0; font-size: .82rem; font-variant-numeric: tabular-nums; min-width: 100%; }
.mt-tbl th, .mt-tbl td { padding: .18rem .45rem; text-align: center; border-bottom: 1px solid #e3ebe3; border-right: 1px solid #eef3ee; white-space: nowrap; }
.mt-tbl thead th { position: sticky; background: #eef4ee; font-weight: 700; z-index: 2; }
.mt-tbl thead tr:first-child th { top: 0; }
.mt-tbl thead tr:nth-child(2) th { top: 1.65rem; }
.mt-tbl tbody th { position: sticky; left: 0; background: #f4f8f4; font-weight: 700; z-index: 1; border-right: 2px solid #c9d8c9; }
.mt-tbl .mt-corner { left: 0; z-index: 3; }
.mt-tbl .mt-dh, .mt-tbl .mt-d { background: #fff8e1; color: #5c4800; font-size: .76rem; }
.mt-tbl thead .mt-dh { background: #ffefb0; }
.mt-tbl td.mt-d:first-of-type, .mt-tbl .mt-d:nth-child(12) { border-left: 2px solid #c9d8c9; }
.mt-tbl .mt-hit { background: #ffd23f !important; color: #000; font-weight: 800; outline: 2px solid #c2570c; outline-offset: -2px; }
@media print { .mt-scroll { max-height: none; overflow: visible; } .mt-tbl { font-size: 8pt; } }
/* ---- Computer keyboard ---- */
.rt-area pre.rt-lang-keys::before { content: "Computer keyboard (learners see the keyboard; optional lines: text: a sentence for the typing test, nav: off, numpad: off)"; }
.kbtool { --kh: 2.35rem; --kg: .22rem; margin: 1rem 0; border: 2px solid #1b2a20; border-radius: 10px; overflow: hidden; background: #e9ecee; color: #111; max-width: 62rem; }
.kb-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; padding: .45rem .7rem; background: #1b2a20; color: #fff; }
.kb-title { font-weight: 700; }
.kb-tabs { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.kb-tab { border: 0; border-radius: 6px; padding: .25rem .8rem; min-height: 2rem; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; font-size: .85rem; }
.kb-tab[aria-selected="true"] { background: #43b02a; color: #0b1a11; }
.kb-panel { padding: .7rem; }
.kb-panel[hidden] { display: none; }
.kb-text { display: block; width: 100%; min-height: 5.5rem; resize: vertical; padding: .55rem .7rem; border: 1px solid #aab2ab; border-radius: 6px; background: #fff; color: #111; font: 1.05rem/1.5 ui-monospace, Menlo, Consolas, monospace; }
.kb-text:focus { outline: 3px solid #43b02a; outline-offset: 1px; }
.kb-target { margin-bottom: .5rem; padding: .6rem .8rem; background: #fff; border: 1px solid #aab2ab; border-radius: 6px; font: 1.15rem/1.7 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.kb-target[hidden], .kb-stats[hidden], .kb-next[hidden] { display: none; }
.kb-target .kb-ok { color: #1f7a2a; } .kb-target .kb-bad { color: #fff; background: #b00020; border-radius: 2px; } .kb-target .kb-cur { border-bottom: 3px solid #1b2a20; background: #fff3a3; }
.kb-stats { margin: .5rem 0 0; padding: .5rem .7rem; background: #e6f6e2; border: 1px solid #369422; border-radius: 6px; }
.kb-info { margin: .5rem 0 .3rem; min-height: 2.6rem; padding: .4rem .7rem; background: #fff8dc; border-left: 4px solid #f2c94c; border-radius: 4px; font-size: .92rem; }
.kb-opts { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; margin-bottom: .5rem; font-size: .85rem; }
.kb-opt { display: inline-flex; align-items: center; gap: .35rem; }
.kb-small { border: 1px solid #aab2ab; border-radius: 6px; background: #fff; color: #111; padding: .2rem .7rem; font-weight: 700; font-size: .8rem; min-height: 1.9rem; }
.kb-small:hover { background: #dff0da; }
.kb-scroll { overflow-x: auto; padding-bottom: .2rem; -webkit-overflow-scrolling: touch; }
.kb-board { display: grid; grid-template-columns: 60fr 12fr 16fr; column-gap: calc(var(--kh) * .45); min-width: 26rem; padding: .45rem; background: #cfd3d6; border-radius: 8px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.kbtool.kb-nonav .kb-navblock, .kbtool.kb-nopad .kb-padblock { display: none; }
.kbtool.kb-nonav:not(.kb-nopad) .kb-board { grid-template-columns: 60fr 16fr; }
.kbtool.kb-nopad:not(.kb-nonav) .kb-board { grid-template-columns: 60fr 12fr; }
.kbtool.kb-nonav.kb-nopad .kb-board { grid-template-columns: 1fr; }
.kb-main { display: grid; grid-template-columns: repeat(60, 1fr); grid-template-rows: repeat(6, var(--kh)); gap: var(--kg); }
.kb-navblock { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(6, var(--kh)); gap: var(--kg); }
.kb-padblock { display: grid; grid-template-columns: repeat(16, 1fr); grid-template-rows: repeat(6, var(--kh)); gap: var(--kg); }
.w2 { grid-column: span 2; } .w4 { grid-column: span 4; } .w5 { grid-column: span 5; } .w6 { grid-column: span 6; } .w7 { grid-column: span 7; } .w8 { grid-column: span 8; } .w9 { grid-column: span 9; } .w11 { grid-column: span 11; } .w12 { grid-column: span 12; } .w16 { grid-column: span 16; } .w25 { grid-column: span 25; }
.kb-gap { min-width: 0; }
.kb-key { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 0 1px; border: 1px solid #8e969c; border-bottom-width: 3px; border-radius: 5px; background: linear-gradient(#fdfdfd, #e4e7e9); color: #1b1f24; font: 700 clamp(.6rem, 1.6vw, .85rem)/1.1 Arial, Helvetica, sans-serif; cursor: pointer; overflow: hidden; }
.kb-key:hover { background: #fff; }
.kb-key:focus-visible { outline: 3px solid #f2c94c; outline-offset: 1px; z-index: 2; }
.kb-sym { gap: 0; } .kb-sym .kb-s { font-size: .85em; color: #4a525a; } .kb-s { font-size: .68em; font-weight: 600; color: #4a525a; }
.kb-wide, .kb-fn { background: linear-gradient(#e9ecee, #d2d6d9); } .kb-fn { font-size: clamp(.55rem, 1.4vw, .75rem); }
.kb-i { font-size: 1.05em; line-height: 1; }
.kb-b { white-space: nowrap; }
.kb-tall { grid-row: span 2; }
.kb-arrow { font-size: 1.1em; }
.kb-key.kb-on { background: #43b02a; color: #0b1a11; border-color: #2d7f27; }
.kb-key.kb-down { background: #f2c94c; border-color: #b8901a; transform: translateY(2px); border-bottom-width: 1px; }
.kb-lead { margin: 0 0 .5rem; }
.kb-h { margin: .9rem 0 .3rem; font-size: 1rem; }
.kb-dl { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .25rem .9rem; margin: 0; }
.kb-dl dt { font-weight: 700; } .kb-dl dd { margin: 0; }
.kb-dl kbd { display: inline-block; padding: .05rem .4rem; border: 1px solid #8e969c; border-bottom-width: 2px; border-radius: 4px; background: #fff; color: #111; font-size: .82rem; }
@media (max-width: 575.98px) { .kbtool { --kh: 2.2rem; } .kb-dl { grid-template-columns: 1fr; } .kb-dl dd { margin-bottom: .4rem; } }
@media print { .kbtool { display: none; } }

/* ---- Site identity and phone header ---- */
.brand-logo { height: 2.1rem; width: auto; max-width: 9rem; object-fit: contain; display: inline-block; }
.brand-logo[hidden], .brand-mark[hidden] { display: none; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { overflow-wrap: anywhere; }
.brand-tag { font-family: inherit; font-size: .68rem; font-weight: 600; letter-spacing: .01em; color: var(--muted); }
.site-logo-box { display: grid; place-items: center; min-height: 9rem; padding: .5rem; border: 2px dashed var(--line); border-radius: 8px; background: #fff; }
.site-logo-box img { max-width: 100%; max-height: 8rem; object-fit: contain; }
.hdr-guest { display: none; align-items: center; gap: .4rem; }
.hdr-guest-icon { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.hdr-guest-m { display: flex; gap: .5rem; }
@media (min-width: 440px) { .hdr-guest { display: flex; } .hdr-guest-icon, .hdr-guest-m { display: none; } }
/* On phones the page uses the full width instead of a centred narrow column, so the logo and menu button sit close to the screen edges. */
@media (max-width: 767.98px) {
  .container, .container-sm { max-width: 100%; padding-inline: .85rem; }
  .navbar > .container { padding-inline: .6rem; }
  .hero .container { padding-left: .85rem; }
}
@media (max-width: 575.98px) { .brand-tag { display: none; } .brand-logo { height: 1.9rem; max-width: 6.5rem; } }

/* ---- Lesson editor: tool block bar ---- */
.rt-blockbar{position:absolute;z-index:6;display:flex;gap:2px;padding:3px;background:var(--ink);border-radius:8px;box-shadow:0 4px 14px rgba(0,0,0,.3)}
.rt-blockbar[hidden]{display:none}
.rt-blockbar button{border:0;background:transparent;color:#fff;width:2rem;height:2rem;border-radius:6px;display:inline-flex;align-items:center;justify-content:center}
.rt-blockbar button:hover,.rt-blockbar button:focus-visible{background:rgba(255,255,255,.2);outline:0}
.rt-blockbar button[data-bb="del"]:hover{background:#c0392b}
.rt-area pre.rt-lab.rt-picked{outline:2px solid var(--marker,#f5c518);outline-offset:2px}
/* ---- Home button, small WhatsApp, faint margin ---- */
a.hdr-icon { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 575.98px), (min-width: 992px) { a#navHome { display: none; } }
.navbar-nav .nav-link, .hdr-tools .btn { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1279.98px) { .navbar-nav .nav-link { padding-inline: .4rem; font-size: .9rem; } #navOrders { display: none; } .navbar .brand-tag { display: none; } }
.wa-float { left: .6rem; bottom: .6rem; padding: .4rem; gap: .35rem; opacity: .92; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); font-size: .8rem; }
.wa-float .social-ico { width: 20px; height: 20px; }
@media (min-width: 768px) { .wa-float { padding: .4rem .65rem; } }
/* ---- Home banner picture and admin look controls ---- */
.hero { overflow: hidden; }
.hero-bgimg { position: absolute; top: 0; object-fit: cover; z-index: 0; pointer-events: none; }
.hero-bgimg[hidden], .hero-img-wrap[hidden] { display: none; }
.hero-img-wrap { display: flex; margin-bottom: 1.25rem; }
.hero-img-wrap img { display: block; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.look-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-bottom: .5rem; }
.look-row .btn { min-width: 2.2rem; }
.look-row .btn.on { background: var(--ink); color: #fff; }
.look-row input[type=color] { width: 2.4rem; height: 2.1rem; padding: 2px; border: 2px solid var(--ink); border-radius: 6px; background: var(--white); }
.look-prev { border: 2px dashed var(--line); border-radius: 6px; padding: .6rem .8rem; margin-bottom: 1.25rem; overflow-wrap: anywhere; }
.look-prev.dark { background: var(--ink); }
.look-card { border: 2px solid var(--ink); border-radius: 8px; padding: .8rem; margin-bottom: 1rem; background: var(--white); }
.look-card legend { font-size: 1rem; font-weight: 700; float: none; width: auto; padding: 0 .4rem; }
/* ---- Header icons, search, account menu ---- */
.hdr-tools { display: flex; align-items: center; gap: .4rem; }
.hdr-icon { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--white); color: var(--ink); font-size: 1.05rem; cursor: pointer; transition: background .15s, color .15s; }
.hdr-icon:hover, .hdr-icon:focus-visible { background: var(--marker); color: #0b1a11; }
.hdr-admin { white-space: nowrap; }
.hdr-user { display: inline-flex; align-items: center; gap: .4rem; }
.hdr-avatar { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--marker); color: #0b1a11; font-weight: 800; font-size: .85rem; }
.dropdown-menu { border: 2px solid var(--ink); border-radius: 8px; --bs-dropdown-link-active-bg: var(--marker); --bs-dropdown-link-hover-bg: rgba(67, 176, 42, .18); --bs-dropdown-bg: var(--white); --bs-dropdown-color: var(--ink); --bs-dropdown-link-color: var(--ink); --bs-dropdown-link-hover-color: var(--ink); --bs-dropdown-divider-bg: var(--line); }
.dropdown-item { font-weight: 700; }
@media (max-width: 991.98px) { .navbar-collapse { padding-top: .5rem; } }
@media (max-width: 380px) { .navbar-brand { font-size: 1.1rem; } .hdr-icon { width: 2.1rem; height: 2.1rem; } .hdr-tools { gap: .25rem; } }

.site-search { position: fixed; inset: 0; z-index: 2100; background: rgba(7, 18, 11, .6); display: flex; justify-content: center; align-items: flex-start; padding: 4.5rem 1rem 1rem; }
.site-search[hidden] { display: none; }
.site-search-box { width: min(640px, 100%); max-height: calc(100vh - 6rem); display: flex; flex-direction: column; background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 6px 6px 0 rgba(0, 0, 0, .45); padding: .8rem; gap: .5rem; }
.site-search-box .form-control { font-size: 1.1rem; border: 2px solid var(--ink); }
.site-search-list { overflow-y: auto; min-height: 3rem; }
.site-search-item { display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .6rem; align-items: center; padding: .55rem .6rem; border-radius: 6px; color: var(--ink); text-decoration: none; }
.site-search-item small { display: block; color: var(--muted); }
.site-search-item .ss-k { font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .05rem .5rem; }
.site-search-item:hover, .site-search-item[aria-selected="true"] { background: rgba(67, 176, 42, .2); outline: 2px solid var(--marker); }
.site-search-empty { padding: .8rem .6rem; margin: 0; color: var(--muted); }
.site-search-hint { color: var(--muted); }
body.search-open { overflow: hidden; }
@media (max-width: 575.98px) { .site-search { padding-top: 4rem; } .site-search-hint { display: none; } }

/* ---- Carousels ---- */
.car { position: relative; --car-gap: 1rem; --car-per: 1; }
.car-track { display: flex; gap: var(--car-gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: auto; scrollbar-width: none; padding: .25rem .25rem .75rem; margin: 0 -.25rem; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.car-track::-webkit-scrollbar { display: none; }
.car-track.car-drag { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.car-item { flex: 0 0 calc((100% - (var(--car-per) - 1) * var(--car-gap)) / var(--car-per)); scroll-snap-align: start; min-width: 0; }
.car-cards { --car-per: 1.15; }
@media (min-width: 576px) { .car-cards { --car-per: 2; } }
@media (min-width: 992px) { .car-cards { --car-per: 3; } }
@media (min-width: 1200px) { .car-cards { --car-per: 4; } }
.car-hero { --car-per: 1; }
.car-hero .car-item { scroll-snap-align: center; }
.car-btn { position: absolute; top: 40%; z-index: 4; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); color: var(--ink); display: grid; place-items: center; box-shadow: 2px 2px 0 rgba(0, 0, 0, .35); cursor: pointer; }
.car-btn:hover:not(:disabled) { background: var(--marker); color: #0b1a11; }
.car-btn:disabled { opacity: .35; cursor: default; }
.car-prev { left: -.6rem; } .car-next { right: -.6rem; }
.car-pause { top: auto; bottom: -.15rem; right: 0; width: 1.9rem; height: 1.9rem; }
.car-single .car-prev, .car-single .car-next { display: none; }
@media (max-width: 575.98px) { .car-prev { left: -.35rem; } .car-next { right: -.35rem; } .car-btn { width: 2.2rem; height: 2.2rem; } }
@media (hover: none) { .car-prev, .car-next { display: none; } }
.car-dots { display: flex; justify-content: center; gap: .45rem; margin-top: .15rem; }
.car-dot { width: .7rem; height: .7rem; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: transparent; cursor: pointer; }
.car-dot[aria-current="true"] { background: var(--marker); width: 1.5rem; border-radius: 999px; }
.car-hero .car-btn { top: 50%; }
.promo { padding: 1.25rem 0 0; }
.promo-slide { display: flex; align-items: center; gap: 1.25rem; padding: 1.4rem 1.6rem; border: 2px solid var(--ink); border-radius: 10px; min-height: 8.5rem; color: #fff; }
.promo-slide > i { font-size: 2.6rem; flex: 0 0 auto; color: var(--marker); }
.promo-slide > div { flex: 1 1 auto; min-width: 0; }
.promo-slide h2 { color: #fff; margin-bottom: .3rem; }
.promo-slide p { color: #e3efe5; }
.promo-slide .btn { flex: 0 0 auto; color: #0b1a11; }
.promo-a { background: #0e2a17; } .promo-b { background: #17415a; } .promo-c { background: #4a2a5e; }
@media (max-width: 575.98px) { .promo-slide { flex-wrap: wrap; padding: 1.1rem 1.1rem 1.4rem; } .promo-slide > i { font-size: 2rem; } .promo-slide .btn { width: 100%; } }

/* ---- Dark mode: one switch on <html data-bs-theme="dark">. Surfaces go dark; lesson text and tools stay on light "paper". ---- */
[data-bs-theme="dark"] {
  --ink: #e6f0e8; --ink-2: #b9cfbe; --paper: #0b1a11; --white: #13271a; --marker: #4cc233; --marker-deep: #43b02a;
  --margin: #ff8a8f; --ok: #6fdc7c; --line: #2c4634; --muted: #a2b8a7;
  --bs-primary-rgb: 230, 240, 232; --bs-link-color-rgb: 140, 220, 150; --bs-link-color: #8cdc96; --bs-link-hover-color: #ffb4b8;
  --bs-body-color: var(--ink); --bs-body-bg: var(--paper); --bs-border-color: var(--line);
  --bs-secondary-color: #a2b8a7; --bs-emphasis-color: #fff; --bs-tertiary-bg: #1a3223;
  color-scheme: dark;
}
[data-bs-theme="dark"] a:not([class]) { color: #8cdc96; }
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-bg: #2a7a2a; --bs-btn-border-color: #2a7a2a; --bs-btn-hover-bg: #348a33; --bs-btn-hover-border-color: #348a33; --bs-btn-active-bg: #348a33; --bs-btn-disabled-bg: #2a7a2a; --bs-btn-disabled-border-color: #2a7a2a; }
[data-bs-theme="dark"] .btn-marker { --bs-btn-color: #0b1a11; --bs-btn-hover-color: #0b1a11; --bs-btn-active-color: #0b1a11; --bs-btn-disabled-color: #0b1a11; --bs-btn-border-color: #0b1a11; --bs-btn-hover-border-color: #0b1a11; --bs-btn-disabled-border-color: #0b1a11; box-shadow: 3px 3px 0 #000; }
[data-bs-theme="dark"] .btn-marker:hover { box-shadow: 2px 2px 0 #000; }
[data-bs-theme="dark"] .btn-outline-dark { --bs-btn-color: var(--ink); --bs-btn-border-color: #7fa488; --bs-btn-hover-color: #0b1a11; --bs-btn-hover-bg: var(--ink); --bs-btn-hover-border-color: var(--ink); --bs-btn-active-color: #0b1a11; --bs-btn-active-bg: var(--ink); }
[data-bs-theme="dark"] .btn-outline-secondary { --bs-btn-color: var(--ink-2); --bs-btn-border-color: #5f8f6d; --bs-btn-hover-bg: #2c4634; --bs-btn-hover-color: #fff; }
[data-bs-theme="dark"] .btn-light, [data-bs-theme="dark"] .text-bg-light { background-color: #1f3a29 !important; color: #e6f0e8 !important; border-color: #3a5c45 !important; }
[data-bs-theme="dark"] .text-bg-dark { background-color: #2a7a2a !important; color: #fff !important; }
[data-bs-theme="dark"] .skip-link { background: #2a7a2a; }
[data-bs-theme="dark"] .site-header { border-bottom-color: #3a5c45; }
[data-bs-theme="dark"] .hdr-icon, [data-bs-theme="dark"] .car-btn, [data-bs-theme="dark"] .car-dot { border-color: #7fa488; }
[data-bs-theme="dark"] .navbar-toggler { color: var(--ink); } [data-bs-theme="dark"] .navbar-toggler .bi { color: var(--ink); }
[data-bs-theme="dark"] .site-footer { background: #07120b; border-top: 1px solid #1f3a29; }
[data-bs-theme="dark"] .dash-side, [data-bs-theme="dark"] .dash-top { background: #07120b; }
[data-bs-theme="dark"] .dash-side .nav-link.active, [data-bs-theme="dark"] .dash-top .nav-link.active { background: var(--marker); color: #0b1a11; }
[data-bs-theme="dark"] .hero { background-image: repeating-linear-gradient(to bottom, transparent 0 35px, rgba(230, 240, 232, .06) 35px 36px); border-bottom-color: #3a5c45; }
[data-bs-theme="dark"] .hero-search .form-control, [data-bs-theme="dark"] .hero-search .btn { border-color: #7fa488; }
[data-bs-theme="dark"] .chip { border-color: #7fa488; }
[data-bs-theme="dark"] .chip:hover, [data-bs-theme="dark"] .chip.active, [data-bs-theme="dark"] .chip[aria-pressed="true"] { background: var(--marker); color: #0b1a11; border-color: #7fa488; }
[data-bs-theme="dark"] .steps li, [data-bs-theme="dark"] .buy-panel, [data-bs-theme="dark"] .modal-content, [data-bs-theme="dark"] .stat.hl { border-color: #7fa488; box-shadow: 4px 4px 0 #000; }
[data-bs-theme="dark"] .steps li::before, [data-bs-theme="dark"] .price-tag { color: #0b1a11; border-color: #0b1a11; }
[data-bs-theme="dark"] .res-card, [data-bs-theme="dark"] .panel, [data-bs-theme="dark"] .stat, [data-bs-theme="dark"] .table-wrap, [data-bs-theme="dark"] .list-group-item { border-color: #2f4d3a; }
[data-bs-theme="dark"] .res-card:hover { border-color: #7fa488; box-shadow: 4px 4px 0 #000; }
[data-bs-theme="dark"] .res-thumb.fallback { background-color: #1a3223; background-image: repeating-linear-gradient(to bottom, transparent 0 23px, rgba(230, 240, 232, .07) 23px 24px); }
[data-bs-theme="dark"] .skeleton { background: linear-gradient(90deg, #17301f 25%, #1f3d29 50%, #17301f 75%); background-size: 200% 100%; }
[data-bs-theme="dark"] .badge-cat { background: #22402d; color: #d3e6d7; }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { background-color: #0f2216; color: var(--ink); border-color: #4a6b54; }
[data-bs-theme="dark"] .form-control::placeholder { color: #86a08c; }
[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { border-color: var(--marker); }
[data-bs-theme="dark"] .form-check-input { background-color: #0f2216; border-color: #6f947a; }
[data-bs-theme="dark"] .form-check-input:checked { background-color: var(--marker); border-color: var(--marker); }
[data-bs-theme="dark"] .table th { background: #1a3223; color: #b9cfbe; }
[data-bs-theme="dark"] .table { --bs-table-color: var(--ink); --bs-table-striped-bg: rgba(255, 255, 255, .03); --bs-table-hover-bg: rgba(255, 255, 255, .05); --bs-table-border-color: #2c4634; }
[data-bs-theme="dark"] .accordion { --bs-accordion-bg: var(--white); --bs-accordion-color: var(--ink); --bs-accordion-border-color: #2f4d3a; --bs-accordion-active-bg: #1f3d29; --bs-accordion-active-color: #fff; --bs-accordion-btn-color: var(--ink); --bs-accordion-btn-bg: var(--white); }
[data-bs-theme="dark"] .accordion-button::after { filter: invert(1) brightness(1.6); }
[data-bs-theme="dark"] .pagination { --bs-pagination-bg: var(--white); --bs-pagination-color: var(--ink); --bs-pagination-border-color: #2f4d3a; --bs-pagination-hover-bg: #1f3d29; --bs-pagination-hover-color: #fff; --bs-pagination-active-bg: var(--marker); --bs-pagination-active-color: #0b1a11; --bs-pagination-active-border-color: var(--marker); --bs-pagination-disabled-bg: #0f2216; --bs-pagination-disabled-color: #7f9886; --bs-pagination-disabled-border-color: #2f4d3a; }
[data-bs-theme="dark"] .nav-pills { --bs-nav-pills-link-active-bg: var(--marker); --bs-nav-pills-link-active-color: #0b1a11; }
[data-bs-theme="dark"] .modal-content { background: var(--white); color: var(--ink); }
[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(2); }
[data-bs-theme="dark"] .alert { --bs-alert-color: #e6f0e8; }
[data-bs-theme="dark"] .alert-warning { --bs-alert-bg: #3a3210; --bs-alert-border-color: #6b5a1a; --bs-alert-color: #f5e6a0; }
[data-bs-theme="dark"] .alert-danger { --bs-alert-bg: #3b1619; --bs-alert-border-color: #7a2a30; --bs-alert-color: #ffc9cc; }
[data-bs-theme="dark"] .alert-success { --bs-alert-bg: #12351d; --bs-alert-border-color: #2a6a3a; --bs-alert-color: #c4f0cc; }
[data-bs-theme="dark"] .alert-info { --bs-alert-bg: #12303f; --bs-alert-border-color: #2a5a70; --bs-alert-color: #c4e6f5; }
[data-bs-theme="dark"] code { background: #1f3a29; color: #c8e6cf; }
[data-bs-theme="dark"] .dropzone { background: #0f2216; }
[data-bs-theme="dark"] .status.draft, [data-bs-theme="dark"] .status.pending { color: #f2c94c; }
[data-bs-theme="dark"] .text-dark, [data-bs-theme="dark"] .link-dark { color: var(--ink) !important; }
[data-bs-theme="dark"] .border-dark { border-color: #7fa488 !important; }
[data-bs-theme="dark"] .bg-white, [data-bs-theme="dark"] .bg-light { background-color: var(--white) !important; }
[data-bs-theme="dark"] .promo-slide { border-color: #3a5c45; }
[data-bs-theme="dark"] .site-search { background: rgba(0, 0, 0, .7); }
[data-bs-theme="dark"] .site-search-box { border-color: #7fa488; }
[data-bs-theme="dark"] .site-search-box .form-control { border-color: #7fa488; }
/* Lesson pages, the lesson editor and the learning tools keep a light "paper" surface so teacher-chosen colours and highlights always stay readable. */
[data-bs-theme="dark"] .rt-content, [data-bs-theme="dark"] .rt-area, [data-bs-theme="dark"] .rt-bar, [data-bs-theme="dark"] .rt-panel, [data-bs-theme="dark"] .rt-lab {
  --ink: #0e2a17; --ink-2: #2d4a37; --white: #fff; --paper: #f4f8f4; --line: #dbe6dc; --muted: #52665a; --margin: #d6454b; --ok: #1f7a2a;
  color: #0e2a17; color-scheme: light;
}
[data-bs-theme="dark"] .rt-content, [data-bs-theme="dark"] .rt-area { background: #fbfdfb; border-radius: 8px; }
[data-bs-theme="dark"] .rt-content { padding: .9rem 1rem; }
[data-bs-theme="dark"] .rt-content .form-control, [data-bs-theme="dark"] .rt-content .form-select, [data-bs-theme="dark"] .rt-bar .form-select, [data-bs-theme="dark"] .rt-lab .form-control, [data-bs-theme="dark"] .rt-lab .form-select { background-color: #fff; color: #0e2a17; border-color: #b6c8b9; }
[data-bs-theme="dark"] .rt-bar .btn, [data-bs-theme="dark"] .rt-lab .btn-outline-dark { --bs-btn-color: #0e2a17; --bs-btn-border-color: #0e2a17; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #0e2a17; }
[data-bs-theme="dark"] .rt-lab .btn-primary { --bs-btn-bg: #0e2a17; --bs-btn-border-color: #0e2a17; }
[data-bs-theme="dark"] .rt-content a, [data-bs-theme="dark"] .rt-area a { color: #1d4ed8; }

/* Sticky footer: on short pages the footer sits at the bottom of the screen instead of floating up with empty space beneath it. */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
body > .site-footer { flex-shrink: 0; }

/* ---- Sticky footer: short pages keep the footer at the bottom of the screen instead of floating up ---- */
html { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body > .site-footer { flex-shrink: 0; }

/* ---- About page / team profiles: every photo is the same 4:5 portrait ---- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 1.25rem; }
.team-card { background: var(--white); border: 1px solid #c3d3c5; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.team-photo-wrap { width: 100%; aspect-ratio: 4 / 5; background: var(--paper); overflow: hidden; position: relative; border-bottom: 1px solid var(--line); }
.team-photo { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.team-photo[hidden] { display: none; }
.team-photo-empty { display: grid; place-items: center; font-size: 4rem; color: var(--ink-2); background: #eaf3ea; }
.team-photo-empty[hidden] { display: none; }
.team-body { padding: .9rem 1rem 1.1rem; overflow-wrap: anywhere; }
.team-role { color: var(--ink-2); font-weight: 700; font-size: .92rem; margin: .1rem 0 .5rem; }
.team-bio { font-size: .95rem; margin-bottom: .5rem; }
.team-quals { font-size: .88rem; color: var(--muted); margin: 0; }
.team-thumb { width: 64px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: 0 0 auto; }
#pForm .team-photo-wrap { max-width: 220px; border: 1px solid var(--line); border-radius: 8px; }
[data-bs-theme="dark"] .team-card { border-color: #2f4d3a; }
[data-bs-theme="dark"] .team-photo-empty { background: #1a3223; }

/* ---- Editor extras: list styles, line spacing, shading, titles, page view, lesson window controls ---- */
.rt-btn-menu, .rt-btn-text { display: inline-flex; align-items: center; }
.rt-caret { font-size: .5rem; margin-left: .25rem; opacity: .7; }
.rt-opt-on { background: var(--ink); color: #fff; }
.rt-panel { max-height: 40vh; overflow: auto; }
ul.rt-ls-circle { list-style-type: circle; } ul.rt-ls-square { list-style-type: square; }
ol.rt-ls-alpha { list-style-type: lower-alpha; } ol.rt-ls-ualpha { list-style-type: upper-alpha; }
ol.rt-ls-roman { list-style-type: lower-roman; } ol.rt-ls-uroman { list-style-type: upper-roman; }
.rt-lh-10 { line-height: 1; } .rt-lh-115 { line-height: 1.15; } .rt-lh-15 { line-height: 1.5; } .rt-lh-20 { line-height: 2; } .rt-lh-25 { line-height: 2.5; } .rt-lh-30 { line-height: 3; }
.rt-pl-yellow { background: #fff6bf; } .rt-pl-green { background: #e1f5e5; } .rt-pl-blue { background: #e0edfb; } .rt-pl-pink { background: #fde2ec; } .rt-pl-grey { background: #eceeed; }
.rt-pl-yellow, .rt-pl-green, .rt-pl-blue, .rt-pl-pink, .rt-pl-grey { padding: .5rem .8rem; border-radius: 6px; }
.rt-ts-title { font-size: 2.1rem; font-weight: 800; line-height: 1.2; margin: .2rem 0 .3rem; }
.rt-ts-sub { font-size: 1.2rem; color: var(--ink-2); margin: 0 0 1rem; }
.rt-content { overflow-wrap: break-word; }
.rt-content table { display: block; max-width: 100%; overflow-x: auto; }
.rt-area.rt-page-port, .rt-area.rt-page-land { margin: 1rem auto; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(0, 0, 0, .14); }
.rt-area.rt-page-port { max-width: 794px; } .rt-area.rt-page-land { max-width: 1123px; }
.rt.rt-full { position: fixed; inset: 0; z-index: 1700; margin: 0; border-radius: 0; background: #f3f6f3; display: flex; flex-direction: column; }
.rt.rt-full .rt-area { flex: 1; min-height: 0; max-height: none; background: #fff; }
@page rt-port { size: A4 portrait; margin: 15mm; } @page rt-land { size: A4 landscape; margin: 15mm; }
.rt-print.rt-port { page: rt-port; } .rt-print.rt-land { page: rt-land; }

/* lesson window controls (top left of the lesson) */
.reader-head { align-items: flex-start; justify-content: flex-start; }
.reader-ctl { display: flex; gap: .25rem; flex: none; padding-top: .15rem; }
.reader-title { flex: 1; min-width: 0; }
.rc-btn { width: 2rem; height: 2rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 6px; background: #fff; color: var(--ink); }
.rc-btn:hover:not(:disabled) { background: #eaf3ea; }
.rc-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.rc-btn:disabled { opacity: .4; }
.rc-toggle { display: none; }
@media (min-width: 992px) { .rc-toggle { display: inline-flex; } }
#reader.reader-min #rBody, #reader.reader-min .reader-foot { display: none; }
#reader.reader-min .reader-head p { margin-bottom: 0; }
#reader.reader-full .reader-head { position: sticky; top: -1.25rem; z-index: 2; background: var(--bs-body-bg, #fff); padding: .6rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
#reader.reader-full #rBody { max-width: 1100px; margin: 0 auto; }

/* code labs: open a file / export menu */
.lab { position: relative; }
.lab-bar { position: relative; }
.lab-menu { position: absolute; right: .6rem; top: calc(100% + 2px); z-index: 6; min-width: 16rem; padding: .3rem; background: #fff; color: #111; border: 1px solid #1f4d2c; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.lab-menu[hidden] { display: none; }
.lab-menu button { display: block; width: 100%; padding: .55rem .7rem; text-align: left; border: 0; background: none; border-radius: 6px; font-size: .95rem; }
.lab-menu button:hover, .lab-menu button:focus-visible { background: #e6f2e8; outline: none; }

/* ---- King James Bible ---- */
.bible-go { display: flex; gap: .5rem; max-width: 640px; margin-top: .75rem; }
.bible-go .form-control { flex: 1; min-width: 0; }
.bible-scope { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; margin-top: .6rem; font-size: .9rem; }
.bible-scope .form-select { display: inline-block; width: auto; margin-left: .35rem; }
.bible-wrap { max-width: 820px; padding-bottom: 3rem; }
.bible-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .6rem 0; background: var(--paper); border-bottom: 1px solid #cfe0d2; }
.bible-bar .form-select { width: auto; flex: 1 1 9rem; min-width: 0; }
.bible-nav, .bible-size { display: inline-flex; gap: .3rem; }
.bible-text { padding: 1rem 0 5rem; font-family: Georgia, 'Times New Roman', serif; line-height: 1.75; outline: none; }
.bible-text h2 { font-size: 1.6em; margin: .5rem 0 1rem; }
.bible-text p[data-v] { margin: 0 0 .35rem; padding: .1rem .4rem; border-radius: 6px; cursor: pointer; }
.bible-text p[data-v].sel { background: #d8f0cf; box-shadow: inset 3px 0 0 var(--marker-deep); }
.bible-text sup { font: 700 .62em/1 system-ui, sans-serif; color: var(--marker-deep); margin-right: .35em; }
.bible-selbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 20; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; max-width: calc(100% - 24px); padding: .55rem .8rem; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.3); font-size: .9rem; }
.bible-selbar[hidden] { display: none; }
.bible-pager { display: flex; justify-content: space-between; gap: .5rem; margin: 1rem 0 1.5rem; }
.bible-results { padding: 1rem 0; }
.bible-hits { padding-left: 0; list-style: none; }
.bible-hits li { padding: .6rem 0; border-bottom: 1px solid #dbe7dd; line-height: 1.55; }
.bible-hits mark { background: #fff1a8; padding: 0 .1em; }
.bible-count { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.bible-books { margin-top: 1rem; }
.bible-books summary { cursor: pointer; font-weight: 600; }
.bible-books h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.bible-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.bible-chips a { padding: .25rem .65rem; border: 1px solid #b9d3bd; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: .88rem; }
.bible-chips a:hover { background: #d8f0cf; }
.bible-note { margin-top: 1.5rem; font-size: .8rem; color: var(--ink-2); }
.bible-selbar { flex-wrap: nowrap; width: max-content; }
.bible-selbar #bibleSelTxt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 11rem; }
.bible-selbar .btn { white-space: nowrap; padding: .25rem .5rem; }

/* ---- Batch 7: back button, bold menu icon, moving highlights ---- */
.hdr-back { flex: none; margin-right: .5rem; width: 2.1rem; height: 2.1rem; }
.navbar-toggler .burger { display: block; color: var(--ink); }
.car-marquee .car-track { scroll-snap-type: none; }
.car-marquee .car-item { scroll-snap-align: none; }

/* ---- Batch 9: menu bars and shortcut table ---- */
.mb { display: flex; flex-wrap: wrap; gap: 0; background: #fff; border: 1px solid #cfdcd2; border-radius: 8px 8px 0 0; font-size: .88rem; position: relative; z-index: 6; }
.mb-m { position: relative; }
.mb-top { background: none; border: 0; padding: .3rem .7rem; color: var(--ink); cursor: pointer; border-radius: 6px; }
.mb-top:hover, .mb-top[aria-expanded="true"] { background: #d8f0cf; }
.mb-list { position: absolute; top: 100%; left: 0; min-width: 14rem; max-width: 85vw; background: #fff; border: 1px solid #b9cdbd; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); padding: .25rem; z-index: 30; }
.mb-list[hidden] { display: none; }
.mb-item { display: flex; justify-content: space-between; gap: 1.5rem; width: 100%; background: none; border: 0; text-align: left; padding: .35rem .6rem; border-radius: 6px; color: var(--ink); cursor: pointer; }
.mb-item:hover, .mb-item:focus-visible { background: #d8f0cf; outline: none; }
.mb-item kbd { background: none; color: #5b7a63; font-size: .75rem; padding: 0; white-space: nowrap; }
.mb-sep { height: 1px; background: #dbe7dd; margin: .25rem .2rem; }
.rt-top { position: sticky; top: 0; z-index: 4; }
.rt-top .rt-bar { position: static; }
.rt-keys { width: 100%; font-size: .85rem; }
.rt-keys th, .rt-keys td { padding: .15rem .5rem; text-align: left; font-weight: 400; }
.rt-keys kbd { background: #eaf3ea; color: var(--ink); border: 1px solid #b9cdbd; }
.sheet .mb { margin-bottom: .4rem; }
[data-bs-theme="dark"] .mb, [data-bs-theme="dark"] .mb-list { background: #16251b; border-color: #35513c; }
[data-bs-theme="dark"] .mb-top, [data-bs-theme="dark"] .mb-item { color: #e8f5e9; }
[data-bs-theme="dark"] .mb-top:hover, [data-bs-theme="dark"] .mb-item:hover { background: #26402d; }

/* ---- Batch 10: keyboard formatting preview ---- */
.kb-preview { margin: .4rem 0; padding: .5rem .7rem; background: #fff; color: #111; border: 1px dashed #8fb596; border-radius: 8px; }
.kb-prev-label { display: block; font-size: .75rem; color: #5b7a63; margin-bottom: .2rem; }
.kb-prev-out { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- Batch 11: star ratings ---- */
.stars { display: inline-flex; align-items: center; gap: 1px; color: #e0a800; font-size: .95rem; white-space: nowrap; }
.stars-n { margin-left: .35rem; color: var(--ink-2, #4b5f52); font-size: .8rem; }
.res-rate { margin: .1rem 0 .4rem; }
.review { margin: 1rem 0; padding: .7rem .9rem; background: #f4faf4; border-left: 3px solid var(--marker-deep, #2f8f3a); border-radius: 6px; }
.review blockquote { margin: .25rem 0; }
.review figcaption { font-size: .8rem; color: var(--ink-2, #4b5f52); }
.rate-dlg { border: 0; border-radius: 14px; padding: 1.1rem; width: min(26rem, calc(100% - 2rem)); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.rate-dlg::backdrop { background: rgba(0, 0, 0, .5); }
.rate-stars { display: flex; gap: .2rem; }
.rate-star { background: none; border: 0; padding: .15rem; font-size: 2rem; line-height: 1; color: #e0a800; cursor: pointer; }
.rate-star:focus-visible { outline: 2px solid var(--ink); border-radius: 6px; }

/* ---- Batch 13: picture position, columns, newspaper / textbook layouts, drop cap ---- */
.rt-content img.rt-im-left, .rt-area img.rt-im-left { float: left; margin: .25rem 1.1rem .6rem 0; }
.rt-content img.rt-im-right, .rt-area img.rt-im-right { float: right; margin: .25rem 0 .6rem 1.1rem; }
.rt-content img.rt-im-center, .rt-area img.rt-im-center { display: block; margin: .9rem auto; }
.rt-content img.rt-im-full, .rt-area img.rt-im-full { display: block; margin: .9rem 0; }
.rt-content img.rt-is-sm, .rt-area img.rt-is-sm { width: 25%; }
.rt-content img.rt-is-md, .rt-area img.rt-is-md { width: 40%; }
.rt-content img.rt-is-lg, .rt-area img.rt-is-lg { width: 65%; }
.rt-content img.rt-is-full, .rt-area img.rt-is-full { width: 100%; }
.rt-content img.rt-im-full:not([class*="rt-is-"]), .rt-area img.rt-im-full:not([class*="rt-is-"]) { width: 100%; }
.rt-area img.rt-img-sel { outline: 3px solid #1d4ed8; outline-offset: 2px; cursor: pointer; }
.rt-content h2, .rt-area h2 { clear: both; }
.rt-col-1 { column-count: 1; }
.rt-col-2 { column-count: 2; column-gap: 1.8rem; column-rule: 1px solid #cdd8cf; }
.rt-col-3 { column-count: 3; column-gap: 1.6rem; column-rule: 1px solid #cdd8cf; }
.rt-col-2 > *, .rt-col-3 > * { break-inside: avoid-column; }
.rt-col-2 > p, .rt-col-3 > p { break-inside: auto; }
.rt-lay-news, .rt-lay-book { font-family: Georgia, "Times New Roman", serif; text-align: justify; hyphens: auto; margin: .8rem 0; }
.rt-lay-news { line-height: 1.5; }
.rt-lay-news p { margin: 0 0 .65rem; }
.rt-lay-news h2, .rt-lay-news h3 { column-span: all; border-bottom: 2px solid var(--ink); padding-bottom: .2rem; margin: .6rem 0 .8rem; text-align: left; }
.rt-lay-book { line-height: 1.7; }
.rt-lay-book p { margin: 0; text-indent: 1.5em; }
.rt-lay-book p:first-child, .rt-lay-book h2 + p, .rt-lay-book h3 + p, .rt-lay-book h4 + p { text-indent: 0; }
.rt-lay-book h2, .rt-lay-book h3 { text-align: left; margin: 1.2rem 0 .5rem; padding-bottom: .2rem; border-bottom: 1px solid #b7c7ba; }
.rt-dc-on::first-letter { float: left; font-family: Georgia, "Times New Roman", serif; font-size: 3.4em; line-height: .82; font-weight: 800; padding: .06em .12em 0 0; }
@media (max-width: 640px) {
  .rt-col-2, .rt-col-3 { column-count: 1; column-rule: 0; }
  .rt-content img.rt-im-left, .rt-area img.rt-im-left, .rt-content img.rt-im-right, .rt-area img.rt-im-right { float: none; display: block; margin: .8rem auto; }
  .rt-content img.rt-is-sm, .rt-area img.rt-is-sm { width: 50%; }
  .rt-content img.rt-is-md, .rt-area img.rt-is-md { width: 70%; }
  .rt-content img.rt-is-lg, .rt-area img.rt-is-lg { width: 100%; }
}
.rt-opt-on, .rt-opt-on:hover, .rt-opt-on:focus-visible { background: var(--ink); color: #fff; }

/* ---- Batch 14: professional polish (trust strip, section heads, dark feature band, scrolling chips, card lift) ---- */
.trust-strip { background: #f3f8f3; border-block: 1px solid #d4e1d5; }
.trust-list { list-style: none; margin: 0; padding: .9rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem 1.25rem; }
.trust-list li { display: flex; align-items: center; gap: .65rem; }
.trust-list i { font-size: 1.5rem; color: var(--ink); }
.trust-list strong { display: block; font-size: .95rem; line-height: 1.2; }
.trust-list span { font-size: .82rem; color: #4b5d51; line-height: 1.25; }
@media (max-width: 767px) { .trust-list { grid-template-columns: repeat(2, 1fr); } }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: 1rem; }
.show-all { font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--marker); white-space: nowrap; }
.show-all:hover { background: var(--marker); }
.feature-band { background: var(--ink); color: #fff; border: 0; border-radius: 14px; padding: 1.75rem; }
.feature-band h2, .feature-band p { color: #fff; }
.feature-band .btn-marker { border-color: var(--marker); }
@media (max-width: 767px) {
  .hero .d-flex.flex-wrap.gap-2 { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; padding-bottom: .25rem; -webkit-overflow-scrolling: touch; }
  .hero .d-flex.flex-wrap.gap-2::-webkit-scrollbar { display: none; }
  .hero .d-flex.flex-wrap.gap-2 .chip { flex: 0 0 auto; }
}
[data-bs-theme="dark"] .trust-strip { background: #12241a; border-color: #24402f; }
[data-bs-theme="dark"] .trust-list i { color: var(--marker); }
[data-bs-theme="dark"] .trust-list span { color: #a9bfb0; }
[data-bs-theme="dark"] .feature-band { background: #1b3a28; }
.trust-strip { margin-top: 2.25rem; } .trust-list { padding-block: 1.1rem; }

/* ---- Batch 15: course page tabs, what you will learn, course facts ---- */
.course-tabs { display: flex; gap: .25rem; border-bottom: 2px solid #c3d3c5; margin-bottom: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.course-tab { appearance: none; background: none; border: 0; border-bottom: 4px solid transparent; margin-bottom: -2px; padding: .65rem 1rem; font-weight: 700; color: #4b5d51; white-space: nowrap; display: inline-flex; align-items: center; gap: .45rem; }
.course-tab:hover { color: var(--ink); }
.course-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--marker); }
.course-tab-n:not(:empty) { background: var(--ink); color: #fff; border-radius: 999px; padding: 0 .5rem; font-size: .78rem; line-height: 1.5; }
.learn-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem 1.25rem; }
.learn-list li, .facts-list li { display: flex; gap: .6rem; align-items: flex-start; }
.learn-list i { color: #1f7a2a; flex: 0 0 auto; margin-top: .15rem; }
.facts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.facts-list i { color: var(--ink); flex: 0 0 auto; margin-top: .15rem; }
@media (max-width: 575px) { .learn-list { grid-template-columns: 1fr; } }
[data-bs-theme="dark"] .course-tabs { border-color: #24402f; }
[data-bs-theme="dark"] .course-tab { color: #a9bfb0; }
[data-bs-theme="dark"] .course-tab:hover, [data-bs-theme="dark"] .course-tab[aria-selected="true"] { color: #fff; }
[data-bs-theme="dark"] .course-tab-n:not(:empty) { background: var(--marker); color: #0b1a11; }
[data-bs-theme="dark"] .learn-list i, [data-bs-theme="dark"] .facts-list i { color: var(--marker); }

/* ---- Batch 17: Bible passage and anthem tools ---- */
.rf-refs { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem .7rem 0; }
.rf-refs:empty { display: none; }
.rf-langs { display: flex; gap: .4rem; padding: .5rem .7rem 0; }
.rf-langs:empty { display: none; }
.rf-text { padding: .7rem 1rem 1rem; max-height: 26rem; overflow: auto; font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; line-height: 1.65; }
.rf-h { font-size: 1.15rem; margin: 0 0 .5rem; }
.rf-h small { font-weight: 400; color: #4b5d51; }
.rf-v { margin: 0 0 .35rem; }
.rf-v sup { font-weight: 700; color: #1f7a2a; margin-right: .2rem; }
.rf-verse { display: flex; gap: .7rem; margin-bottom: .9rem; }
.rf-n { flex: 0 0 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ink); color: #fff; font: 700 .8rem/1.6rem system-ui, sans-serif; text-align: center; }
.rf-verse p { margin: 0; }
.chip.on { background: var(--ink); color: #fff; }
[data-bs-theme="dark"] .rf { background: #12241a; color: #e6f0e8; }
[data-bs-theme="dark"] .rf-h small { color: #a9bfb0; }
.rt-area pre.rt-lang-bible::before { content: "Bible passage, KJV (one line per passage: ref: John 3:16-18. Learners can look up any other passage)"; }
.rt-area pre.rt-lang-anthem::before { content: "Anthems (anthem: kenya, tanzania, uganda or eac; one line per anthem. Leave empty to show all four)"; }

/* ---- Batch 18: melody import ---- */
.mu-import { padding: .6rem .8rem; background: #f3f8f3; border-block: 1px solid #d4e1d5; color: #0e2a17; }
.mu-imp-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .5rem; font-size: .85rem; }
.mu-imp-row label { display: flex; flex-direction: column; gap: .15rem; }
.mu-import textarea { font-family: ui-monospace, Menlo, Consolas, monospace; }
[data-bs-theme="dark"] .mu-import { background: #12241a; color: #e6f0e8; border-color: #24402f; }

/* ---- Batch 19: interactive atlas ---- */
.at { border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: #0e2a17; margin: 1rem 0; overflow: hidden; position: relative; }
.at.full { position: fixed; inset: 0; z-index: 2000; margin: 0; border-radius: 0; display: flex; flex-direction: column; }
.at.full .at-body { flex: 1; min-height: 0; }
.at.full .at-map { height: auto; }
.at .mt-bar { position: relative; }
.at-menu { position: absolute; right: .5rem; top: 2.6rem; z-index: 1500; }
.at-help { padding: .6rem .8rem; background: #f3f8f3; font-size: .88rem; border-bottom: 1px solid #d4e1d5; }
.at-tools { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; padding: .5rem .7rem; background: var(--ink); color: #fff; }
.at-grp { display: inline-flex; gap: .25rem; align-items: center; }
.at-t { width: 2.3rem; height: 2.3rem; border: 0; border-radius: 8px; background: #2f5239; color: #fff; font-size: 1.1rem; }
.at-t[aria-pressed="true"] { background: var(--marker); color: #0e2a17; }
.at-c { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid #fff; padding: 0; }
.at-c[aria-pressed="true"] { outline: 3px solid var(--marker); outline-offset: 1px; }
.at-form { display: inline-flex; gap: .3rem; }
.at-form .form-control { width: 11.5rem; max-width: 42vw; }
.at-lay { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; padding: .35rem .8rem; font-size: .85rem; background: #f3f8f3; border-bottom: 1px solid #d4e1d5; }
.at-edit { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; padding: .45rem .8rem; background: #1b3a28; color: #fff; }
.at-edit .form-control { width: 13rem; max-width: 70vw; display: inline-block; }
.at-cols { display: inline-flex; gap: .25rem; }
.at-m { font-size: .85rem; color: #e6f0e8; }
.at-body { display: flex; min-height: 0; }
.at-map { flex: 1 1 auto; height: 460px; min-width: 0; background: #cfe6f2; position: relative; z-index: 0; }
.at-map.at-cross { cursor: crosshair; }
.at-side { flex: 0 0 13rem; border-left: 1px solid #d4e1d5; display: flex; flex-direction: column; max-height: 460px; background: #fafcfa; }
.at.full .at-side { max-height: none; }
.at-side-h { display: flex; justify-content: space-between; align-items: center; padding: .4rem .6rem; border-bottom: 1px solid #d4e1d5; }
.at-side-b { display: inline-flex; gap: .15rem; }
.at-side .geo-ab { color: #0e2a17; background: transparent; }
.at-list { list-style: none; margin: 0; padding: .3rem; overflow-y: auto; flex: 1; }
.at-list li { display: flex; align-items: center; gap: .2rem; border-radius: 6px; }
.at-list li.on { background: #dcefdc; }
.at-eye, .at-name { background: none; border: 0; padding: .3rem; color: inherit; }
.at-name { text-align: left; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.at-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .25rem; vertical-align: -1px; }
.at-info { padding: .45rem .8rem; font-size: .9rem; border-top: 1px solid #d4e1d5; }
.at-info:empty { display: none; }
.at-info-b { display: inline-flex; gap: .4rem; margin-left: .6rem; }
.at-status { padding: .3rem .8rem; font-size: .82rem; background: #f3f8f3; border-top: 1px solid #d4e1d5; min-height: 1.9rem; }
.at-lay-b { margin-left: auto; }
.at-lays { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; padding: .5rem .8rem; background: #f3f8f3; border-bottom: 1px solid #d4e1d5; font-size: .85rem; }
.at-lays[hidden], .at-legend[hidden] { display: none; }
.at-lays fieldset { border: 0; margin: 0; padding: 0; min-width: 12rem; }
.at-lays legend { float: none; width: auto; margin: 0 0 .2rem; padding: 0; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #3d5a45; }
.at-lays label { display: flex; align-items: center; gap: .4rem; padding: .15rem 0; }
.at-legend { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; padding: .4rem .8rem; font-size: .8rem; border-top: 1px solid #d4e1d5; }
.at-legend small { flex: 1 0 100%; color: #566b5c; }
.at-lg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .2rem .45rem; }
.at-sw { display: inline-block; width: .8rem; height: .8rem; border: 1px solid #5a6b5f; border-radius: 3px; }
.at-ln { pointer-events: none; }
.at-ln span { position: absolute; white-space: nowrap; transform: translate(6px, -50%); font: 600 10.5px/1 system-ui, sans-serif; color: #1f2937; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.at-ln-reg span { transform: translate(-50%, -50%); font-style: italic; font-weight: 500; color: #5b4636; letter-spacing: .03em; }
.at-ln-lake span { transform: translate(-50%, -50%); font-style: italic; color: #1d5f93; }
.at.at-drawing .leaflet-atReg-pane path, .at.at-drawing .leaflet-atWater-pane path, .at.at-drawing .leaflet-atRoad-pane path, .at.at-drawing .leaflet-atPts-pane path { pointer-events: none !important; }
[data-bs-theme="dark"] .at-lays, [data-bs-theme="dark"] .at-legend { background: #12241a; color: #e6f0e8; border-color: #24402f; }
.at-cn { pointer-events: none; }
.at-cn span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 600 10px/1 system-ui, sans-serif; color: #3d5a45; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.at-cn.z3 span, .at-cn.z4 span { font-size: 11px; }
.at-cn.z5 span { font-size: 13px; }
.at-pin-d { display: block; width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); margin: 2px; }
.leaflet-tooltip.at-tip { background: rgba(255, 255, 255, .92); border: 1px solid #6b8f73; color: #0e2a17; font: 600 12px system-ui, sans-serif; padding: 1px 5px; box-shadow: none; }
.leaflet-container { font-family: system-ui, sans-serif; }
@media (max-width: 700px) {
  .at-body { flex-direction: column; } .at-side { flex-basis: auto; border-left: 0; border-top: 1px solid #d4e1d5; max-height: 12rem; }
  .at-map { height: 360px; } .at.full .at-map { height: auto; flex: 1; }
}
[data-bs-theme="dark"] .at, [data-bs-theme="dark"] .at-side, [data-bs-theme="dark"] .at-help, [data-bs-theme="dark"] .at-lay, [data-bs-theme="dark"] .at-status { background: #12241a; color: #e6f0e8; border-color: #24402f; }
[data-bs-theme="dark"] .at-side .geo-ab { color: #e6f0e8; } [data-bs-theme="dark"] .at-list li.on { background: #24402f; }
.at .at-map.leaflet-container { background: #cfe6f2; }

/* ---- Batch 20: certificates, verification ---- */
.narrow { max-width: 46rem; }
.narrow-wide { max-width: 62rem; }
.cert-card { display: flex; gap: .8rem; align-items: center; padding: .8rem 1rem; border: 2px solid var(--ink); border-radius: 10px; background: #fffbea; color: #0e2a17; }
.cert-card > i { font-size: 1.9rem; color: #b45309; }
.cert-name { max-width: 18rem; }
.vres { border-width: 3px !important; }
.vres-ok { border-color: #1f7a2a !important; background: #f1faf2; color: #0e2a17; }
.vres-bad { border-color: #b91c1c !important; background: #fdf1f1; color: #4a0f0f; }
.vres-h { font-size: 1.3rem; font-weight: 800; margin: 0 0 .6rem; }
.vres-ok .vres-h { color: #1f7a2a; } .vres-bad .vres-h { color: #b91c1c; }
.vres-d { display: grid; grid-template-columns: 7.5rem 1fr; gap: .3rem 1rem; margin: 0 0 .7rem; }
.vres-d dt { font-weight: 700; color: #4b5d51; } .vres-d dd { margin: 0; }
.cert-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
@media (max-width: 700px) { .vres-d { grid-template-columns: 1fr; } }
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #fff !important; }
  nav, header, footer, .navbar, .cert-actions, #cMsg, .wa-float, .site-footer, .skip-link { display: none !important; }
  .section { padding: 0 !important; } .narrow-wide { max-width: none; padding: 0; }
  .certificate { box-shadow: none; max-width: none; width: 100%; height: 190mm; aspect-ratio: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
[data-bs-theme="dark"] .vres-ok { background: #12301a; color: #e6f0e8; } [data-bs-theme="dark"] .vres-bad { background: #3a1212; color: #f6dede; }
[data-bs-theme="dark"] .vres-d dt { color: #a9bfb0; } [data-bs-theme="dark"] .cert-card { background: #2a2610; color: #f4efd0; }

/* ---- Batch 22: edge-to-edge pictures, readable tool buttons in every state, slim header while learning ---- */
/* Pictures: "Edge to edge" runs to the lesson panel's edges; "Banner" does the same but crops to a wide strip. */
.rt-content, .rt-area { --bleed: 1.5rem; }
.rt-area { --bleed: 1rem; }
.rt-content img.rt-is-bleed, .rt-area img.rt-is-bleed, .rt-content img.rt-is-cover, .rt-area img.rt-is-cover {
  display: block; float: none; max-width: none; width: calc(100% + 2 * var(--bleed)); margin: .9rem calc(-1 * var(--bleed)); border-radius: 0; }
.rt-content img.rt-is-cover, .rt-area img.rt-is-cover { height: clamp(9rem, 32vw, 20rem); object-fit: cover; }
#reader.reader-full #rBody { --bleed: 0px; }
#reader.reader-full { overflow-x: hidden; }
#reader.reader-full #rBody img.rt-is-bleed, #reader.reader-full #rBody img.rt-is-cover { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* Tool buttons: solid colours with at least 4.5:1 contrast in normal, hover, focus and selected states, light and dark. */
.calc { --calc-bar: #2457b8; }
.calc-tb { background: rgba(8, 24, 64, .45); }
.calc-tb:hover { background: rgba(8, 24, 64, .65); }
.calc-tb.dark { background: #1b3f86; }
.ck.k-clr { background: linear-gradient(#c8362b, #a82a21); border-color: #8a2019; }
.ck.k-eq { background: linear-gradient(#16884a, #127a40); border-color: #0d6434; }
.btn-marker { --bs-btn-hover-bg: #57c23d; --bs-btn-active-bg: #57c23d; --bs-btn-focus-shadow-rgb: 14, 42, 23; }
.mt-tab:hover { background: rgba(14, 42, 23, .1); }
.mt-tab.on:hover { background: #0e2a17; color: #fff; }
/* One focus ring that shows on light or dark backgrounds (yellow ring with a dark gap), for keyboard users. */
.rt-content :is(button, select, input, textarea, summary, a, [tabindex]):focus-visible, .lab :is(button, select, input, textarea, summary, a, [tabindex]):focus-visible { outline: 3px solid #f2c94c; outline-offset: 2px; box-shadow: 0 0 0 2px #0e2a17; }

/* Slim header while studying: phones lose the sticky bar altogether (it scrolls away); larger screens keep it, but thinner. */
body.learning .brand-tag { display: none; }
body.learning .navbar { padding-block: .15rem; }
body.learning .navbar-brand { font-size: 1.15rem; }
body.learning .brand-logo { height: 1.7rem; }
body.learning .hdr-icon { width: 2rem; height: 2rem; font-size: .95rem; }
body.learning .site-header { border-bottom-width: 1px; }
body.learning #main.section { padding-top: .75rem; }
body.learning #main nav[aria-label="Breadcrumb"] { margin-bottom: .35rem !important; font-size: .9rem; }
body.learning #badges, body.learning #cSummary { display: none; }
body.learning #cTitle { font-size: 1.2rem; margin-bottom: .4rem; }
body.learning #enrolBox { padding: .5rem .75rem; margin-bottom: .5rem !important; }
@media (max-width: 767.98px) { body.learning .site-header { position: static; } }
[data-bs-theme="dark"] .rf .mt-tab { color: #e6f0e8; }
[data-bs-theme="dark"] .rf .mt-tab:hover { background: rgba(255, 255, 255, .14); }
[data-bs-theme="dark"] .rf .mt-tab.on, [data-bs-theme="dark"] .rf .mt-tab.on:hover { background: #e6f0e8; color: #0e2a17; }
body.learning #badges { display: none !important; }
@media (max-width: 575.98px) { body.learning .brand-text { display: none; } body.learning .navbar-brand { margin-right: 0; } body.learning .hdr-tools { gap: .25rem; } }

/* ---- Batch 23: exam builder ---- */
.xb-mode { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; margin-bottom: 1rem; background: var(--white); }
.xb-mode-btn { border: 0; background: transparent; color: var(--ink); padding: .45rem 1.1rem; font-weight: 700; display: inline-flex; gap: .4rem; align-items: center; }
.xb-mode-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.xb-mode-btn:not([aria-pressed="true"]):hover { background: rgba(67, 176, 42, .2); }
.xb-work { display: grid; grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 767.98px) { .xb-work { grid-template-columns: 1fr; } }
.xb-list { display: flex; flex-direction: column; gap: .3rem; padding: .6rem; }
.xb-item { display: flex; align-items: center; gap: .4rem; text-align: left; width: 100%; border: 2px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); padding: .4rem .5rem; font-size: .92rem; }
.xb-item:hover { background: rgba(67, 176, 42, .16); }
.xb-item.on { background: var(--ink); color: #fff; }
.xb-item .xb-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xb-item small { opacity: .85; }
.xb-warn { color: #b42318; }
.xb-item.on .xb-warn { color: #ffb4a8; }
.xb-add { margin-top: .4rem; }
.xb-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.xb-opt { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.xb-opt .form-control { flex: 1; }
.xb-opts { border: 0; padding: 0; margin: 0; }
.xb-problem { color: #8a1c10; font-size: .9rem; font-weight: 600; }
.xb-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 2rem; }
[data-bs-theme="dark"] .xb-mode { background: transparent; border-color: #7fa488; }
[data-bs-theme="dark"] .xb-mode-btn { color: #e8f5e9; }
[data-bs-theme="dark"] .xb-mode-btn[aria-pressed="true"] { background: #e8f5e9; color: #0e2a17; }
[data-bs-theme="dark"] .xb-item { color: #e8f5e9; }
[data-bs-theme="dark"] .xb-item.on { background: #e8f5e9; color: #0e2a17; }
[data-bs-theme="dark"] .xb-item.on .xb-warn { color: #b42318; }
[data-bs-theme="dark"] .xb-warn { color: #ff9a8a; }
[data-bs-theme="dark"] .xb-problem { color: #ffb4a8; }

/* ---- Batch 24 polish: no flash of tool source code, steady placeholder, plain footer links ---- */
.rt-content pre.rt-lab { display: none; }
.tool-loading { min-height: 7rem; display: grid; place-items: center; margin: 1rem 0; border: 2px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: .9rem; }
.site-footer a, .site-footer a:hover, .site-footer a:focus-visible { text-decoration: none; }

/* ---- Batch 24: the learner's exam ---- */
.ex-facts { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .35rem; }
.ex-facts i { margin-right: .4rem; color: var(--ink); }
.ex-hist { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.ex-hist li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem 0; border-top: 1px solid var(--line); }
.ex-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem .8rem; margin-bottom: 1rem; background: var(--white); border: 2px solid var(--ink); border-radius: 10px; }
.ex-bar > :first-child { flex: 1 1 10rem; }
.ex-time { font-variant-numeric: tabular-nums; font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.ex-time.ex-low { color: #b42318; }
.ex-save { font-size: .85rem; color: var(--muted); min-width: 6rem; }
.ex-q { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; margin: 0 0 1rem; background: var(--white); }
.ex-q legend { float: none; width: auto; padding: 0 .4rem; font-size: 1rem; font-weight: 800; margin-bottom: .3rem; }
.ex-q legend small { font-weight: 500; color: var(--muted); margin-left: .4rem; }
.ex-ans { display: grid; gap: .4rem; margin-top: .6rem; }
.ex-opt { display: flex; align-items: flex-start; gap: .6rem; padding: .55rem .7rem; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; }
.ex-opt:hover { border-color: var(--ink); }
.ex-opt:has(input:checked) { border-color: var(--ink); background: rgba(67, 176, 42, .16); }
.ex-opt input { margin-top: .2rem; flex: none; }
.ex-opt:focus-within { outline: 3px solid #f2c94c; outline-offset: 2px; }
.ex-text { max-width: 24rem; }
.ex-end { margin: 1.2rem 0 2rem; }
.ex-score { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 12px; border: 2px solid var(--ink); margin-bottom: 1rem; }
.ex-pass { background: #e4f5dc; color: #0e2a17; }
.ex-fail { background: #fdecea; color: #5b1710; border-color: #b42318; }
.ex-big { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.ex-fb { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.ex-fbq { border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 10px; padding: .8rem 1rem; background: var(--white); }
.ex-fbq.ok { border-left-color: #1d8a3a; }
.ex-fbq.no { border-left-color: #b42318; }
.ex-fbh { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.ex-fbq.ok .ex-mark { color: #14692c; font-weight: 700; }
.ex-fbq.no .ex-mark { color: #b42318; font-weight: 700; }
.ex-rows { margin: .5rem 0 0; display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; }
.ex-rows dt { font-weight: 700; }
.ex-rows dd { margin: 0; }
@media (max-width: 575.98px) { .ex-rows { grid-template-columns: 1fr; } .ex-rows dd { margin-bottom: .3rem; } }
[data-bs-theme="dark"] .ex-bar, [data-bs-theme="dark"] .ex-q, [data-bs-theme="dark"] .ex-fbq { background: #12241a; border-color: #2c4636; }
[data-bs-theme="dark"] .ex-bar { border-color: #7fa488; }
[data-bs-theme="dark"] .ex-time { color: #e8f5e9; }
[data-bs-theme="dark"] .ex-time.ex-low { color: #ff9a8a; }
[data-bs-theme="dark"] .ex-opt { border-color: #2c4636; }
[data-bs-theme="dark"] .ex-opt:hover, [data-bs-theme="dark"] .ex-opt:has(input:checked) { border-color: #7fa488; }
[data-bs-theme="dark"] .ex-opt:has(input:checked) { background: rgba(67, 176, 42, .22); }
[data-bs-theme="dark"] .ex-pass { background: #14351f; color: #e4f5dc; }
[data-bs-theme="dark"] .ex-fail { background: #3a1814; color: #fdd; }
[data-bs-theme="dark"] .ex-fbq.ok .ex-mark { color: #7ddc96; }
[data-bs-theme="dark"] .ex-fbq.no .ex-mark { color: #ff9a8a; }
@media (max-width: 575.98px) { .course-tab { padding: .6rem .6rem; gap: .3rem; font-size: .92rem; } .course-tab .bi { display: none; } }

/* ---- Batch 25: designable certificates (see cert-render.js). Sizes use container units so the preview matches the print. ---- */
.certificate { --c-page: #fffef8; --c-ink: #1a2b1f; --c-primary: #1f4d2c; --c-accent: #c9a227; --c-muted: #4b5d51;
  --f-heading: Georgia, "Times New Roman", serif; --f-body: Georgia, "Times New Roman", serif; --f-name: Georgia, "Times New Roman", serif; --f-small: "Atkinson", system-ui, sans-serif;
  --z-issuer: 1; --z-title: 1; --z-name: 1; --z-course: 1; --z-body: 1; --z-units: 1;
  container-type: inline-size; position: relative; max-width: 62rem; margin: 0 auto; aspect-ratio: 297 / 210; padding: 1.1cqw;
  background: var(--c-page); color: var(--c-ink); font-family: var(--f-body); box-shadow: 0 6px 24px rgba(0, 0, 0, .15); border: 10px double var(--c-primary); }
.certificate[data-border="single"] { border: 8px solid var(--c-primary); }
.certificate[data-border="thin"] { border: 2px solid var(--c-primary); }
.certificate[data-border="none"] { border: 0; }
.cert-inner { height: 100%; border: 2px solid var(--c-accent); padding: 2.2cqw 3.2cqw; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; overflow: hidden; gap: .25cqw; }
.certificate[data-border="none"] .cert-inner { border-color: transparent; }
.certificate[data-grow] .cert-inner { height: auto; overflow: visible; }
.cert-head { width: 100%; display: flex; align-items: center; justify-content: center; gap: 2cqw; }
.cert-head[data-pos="left"] { justify-content: flex-start; } .cert-head[data-pos="right"] { justify-content: flex-end; flex-direction: row-reverse; }
.cert-pic { display: block; height: auto; max-width: 100%; object-fit: contain; }
.cert-icon { line-height: 1; } .cert-icon-name { margin: .3cqw 0; } .cert-seal { align-self: center; }
.cert-issuer { letter-spacing: .25em; text-transform: uppercase; font: 700 calc(var(--z-issuer) * 1.35cqw) var(--f-small); color: var(--c-primary); margin: 0; }
.cert-title { font-family: var(--f-heading); font-size: calc(var(--z-title) * 4.4cqw); margin: .3cqw 0 .6cqw; color: var(--c-primary); font-weight: 700; line-height: 1.15; }
.cert-lead { margin: .2cqw 0; font-size: calc(var(--z-body) * 1.7cqw); font-style: italic; }
.cert-name-big { font-family: var(--f-name); font-size: calc(var(--z-name) * 4.6cqw); margin: .4cqw 0; border-bottom: 2px solid var(--c-accent); padding: 0 1.5cqw .2cqw; font-weight: 700; word-break: break-word; line-height: 1.2; }
.cert-course { font-family: var(--f-heading); font-size: calc(var(--z-course) * 3.2cqw); font-weight: 700; margin: .3cqw 0; word-break: break-word; line-height: 1.2; }
.cert-meta { font: 600 calc(var(--z-body) * 1.5cqw) var(--f-small); color: var(--c-muted); margin: 0; }
.cert-note { font-size: calc(var(--z-body) * 1.45cqw); margin: .5cqw 0 0; color: var(--c-muted); }
.cert-units { width: 100%; margin-top: .8cqw; text-align: left; }
.cert-units-t { font: 700 calc(var(--z-units) * 1.4cqw) var(--f-small); text-transform: uppercase; letter-spacing: .12em; color: var(--c-primary); margin: 0 0 .3cqw; text-align: center; }
.cert-units-l { margin: 0; padding-left: 1.6em; font-size: calc(var(--z-units) * 1.35cqw); column-gap: 3cqw; color: var(--c-ink); }
.cert-units-l li { break-inside: avoid; margin-bottom: .15cqw; }
.cert-units-l ul { margin: 0; padding-left: 1.2em; font-size: .92em; color: var(--c-muted); list-style: disc; }
.cert-unit { font-weight: 700; }
.cert-sigs { width: 100%; margin-top: auto; padding-top: 1.2cqw; display: flex; flex-wrap: wrap; gap: 4cqw; justify-content: center; align-items: flex-end; }
.cert-sigs[data-pos="left"] { justify-content: flex-start; } .cert-sigs[data-pos="right"] { justify-content: flex-end; }
.cert-sig { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 10cqw; }
.cert-sig .cert-pic { margin-bottom: -.3cqw; }
.cert-sig-line { width: 100%; border-top: 1.5px solid var(--c-ink); margin-top: .3cqw; }
.cert-sig-n { font: 700 calc(var(--z-body) * 1.35cqw) var(--f-small); margin-top: .2cqw; }
.cert-sig-t { font: calc(var(--z-body) * 1.2cqw) var(--f-small); color: var(--c-muted); }
.cert-foot { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 2cqw; font: calc(var(--z-body) * 1.3cqw) var(--f-small); }
.cert-sigs + .cert-foot { margin-top: 1cqw; }
.cert-foot[data-qr="left"] .cert-qr { order: -1; } .cert-foot[data-qr="center"] .cert-qr { order: 0; } .cert-foot[data-qr="right"] .cert-qr { order: 9; }
.cert-fact { display: flex; flex-direction: column; text-align: left; }
.cert-k { font-size: .82em; text-transform: uppercase; letter-spacing: .1em; color: var(--c-muted); }
.cert-serial { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .05em; }
.cert-qr { display: flex; flex-direction: column; align-items: center; text-align: center; } .cert-qr svg { display: block; width: 9.5cqw; height: 9.5cqw; }
.cert-qr-t { font-size: .85em; color: var(--c-muted); }
.cert-verify { font: calc(var(--z-body) * 1.15cqw) var(--f-small); color: var(--c-muted); margin: .6cqw 0 0; }
.cert-revoked { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 clamp(2rem, 9cqw, 6rem) system-ui, sans-serif; color: rgba(185, 28, 28, .45); transform: rotate(-18deg); pointer-events: none; letter-spacing: .1em; }
.cert-revoked[hidden] { display: none; }
/* Layouts: classic is centred; left lines the text up on the left; band adds a coloured strip down the left side. */
.certificate[data-layout="left"] .cert-inner, .certificate[data-layout="band"] .cert-inner { align-items: flex-start; text-align: left; }
.certificate[data-layout="band"] .cert-inner { padding-left: 8cqw; }
.certificate[data-layout="band"] .cert-inner::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4.5cqw; background: var(--c-primary); }
.certificate[data-layout="left"] .cert-name-big { padding-left: 0; }
.certificate[data-layout="band"] .cert-name-big { padding-left: 0; }
@media (max-width: 700px) { .certificate { aspect-ratio: auto; } .cert-inner { padding: 5cqw 4cqw; } .cert-foot { flex-wrap: wrap; justify-content: center; } .cert-title { font-size: calc(var(--z-title) * 7cqw); } .cert-name-big { font-size: calc(var(--z-name) * 7cqw); } .cert-course { font-size: calc(var(--z-course) * 5.5cqw); } .cert-lead, .cert-note { font-size: calc(var(--z-body) * 3.6cqw); } .cert-meta, .cert-fact, .cert-units-l, .cert-verify { font-size: 3.2cqw; } .cert-issuer { font-size: 3cqw; } .cert-qr svg { width: 22cqw; height: 22cqw; } .cert-units-l { column-count: 1 !important; } }
@media print { .certificate[data-grow] { height: auto !important; } }

/* ---- batch 25: certificate designer ---- */
.cd { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.cd-sticky { position: sticky; top: .75rem; }
.cd-sec { border: 2px solid var(--ink); border-radius: .6rem; margin-bottom: .6rem; background: var(--white); }
.cd-sec > summary { cursor: pointer; padding: .6rem .8rem; font-weight: 700; }
.cd-body { padding: .2rem .8rem .8rem; display: grid; gap: .55rem; }
.cd-f label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .15rem; }
.cd-range { display: flex; align-items: center; gap: .5rem; }
.cd-range output { min-width: 2.2rem; text-align: right; font-variant-numeric: tabular-nums; }
.cd-colours { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.cd-col { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.cd-col input { width: 2.4rem; height: 2.2rem; padding: 0; border: 2px solid var(--ink); border-radius: .4rem; background: none; }
.cd-checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: .25rem .75rem; }
.cd-pic-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .3rem; }
.cd-thumb { width: 6rem; height: 3rem; border: 2px dashed var(--ink); border-radius: .4rem; display: grid; place-items: center; font-size: .8rem; background: #fff; color: #333; overflow: hidden; }
.cd-thumb img { max-width: 100%; max-height: 100%; }
.cd-pic-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.cd-icon-row { display: flex; align-items: center; gap: .75rem; }
.cd-icon-now { font-size: 1.8rem; }
.cd-prev-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.cd-kind { width: auto; } .cd-holder { width: 12rem; }
.cd-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0 .5rem; }
@media (max-width: 991px) { .cd { grid-template-columns: 1fr; } .cd-side { order: -1; } .cd-sticky { position: static; } }

/* ---- batch 26: tool tasks ---- */
.tool-tasks { margin-top: 1rem; padding: .8rem 1rem; border: 2px solid var(--ink); border-radius: .6rem; background: var(--white); color: var(--ink); }
.tt-list { list-style: none; margin: .4rem 0 .7rem; padding: 0; display: grid; gap: .35rem; }
.tt-list li { display: flex; gap: .5rem; align-items: baseline; }
.tt-ok i { color: #14532d; } .tt-no i { color: #991b1b; } .tt-todo i { color: #555; }
.tt-list small { color: #444; }
:root[data-theme="dark"] .tt-ok i, [data-theme="dark"] .tt-ok i { color: #86efac; } [data-theme="dark"] .tt-no i { color: #fca5a5; } [data-theme="dark"] .tt-todo i, [data-theme="dark"] .tt-list small { color: #cbd5e1; }
.tq-row { display: grid; grid-template-columns: 5rem 1fr; gap: .4rem .6rem; padding: .6rem; border: 1px solid #999; border-radius: .5rem; margin-bottom: .5rem; background: var(--white); }
.tq-row .tq-wide { grid-column: 1 / -1; }
.tq-row label { font-size: .8rem; font-weight: 600; display: block; }

/* ---- batch 27: seller quick actions ---- */
.qa-card { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; border: 2px solid var(--ink); border-radius: .7rem; background: var(--white); color: var(--ink); text-decoration: none; height: 100%; box-shadow: 3px 3px 0 var(--ink); }
.qa-card:hover, .qa-card:focus-visible { background: var(--ink); color: #fff; }
.qa-card:hover small, .qa-card:focus-visible small { color: #e5e7eb; }
.qa-card i { font-size: 1.9rem; }
.qa-card strong { display: block; font-size: 1.05rem; }
.qa-card small { display: block; color: #3f3f46; }
:root[data-theme="dark"] .qa-card small, [data-theme="dark"] .qa-card small { color: #cbd5e1; }

/* ---- batch 31: Constitution of Kenya reader and lesson tool ---- */
.cn-wrap { padding-bottom: 3rem; }
.cn-quick { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.cn-grid { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.cn-toc { position: sticky; top: .5rem; max-height: calc(100vh - 1rem); overflow: auto; border: 2px solid var(--ink); border-radius: .6rem; background: var(--white); padding: .4rem .7rem; }
.cn-toc > details > summary { font-weight: 700; padding: .4rem 0; cursor: pointer; }
.cn-toc-a, .cn-art { display: block; padding: .25rem .2rem; color: var(--ink); text-decoration: none; border-radius: .3rem; }
.cn-ch summary { cursor: pointer; font-weight: 600; padding: .15rem 0; }
.cn-arts { padding-left: .6rem; border-left: 2px solid #cfd8d2; margin: .2rem 0 .5rem .3rem; }
.cn-art { font-size: .9rem; }
.cn-art:hover, .cn-art:focus-visible, .cn-toc-a:hover, .cn-ch summary a:hover { background: #e8efe9; }
.cn-art.on { background: var(--ink); color: #fff; }
.cn-part { font-size: .75rem; letter-spacing: .04em; margin: .6rem 0 .2rem; color: #3f3f46; }
.cn-text { background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: .7rem; padding: 1.1rem 1.3rem; line-height: 1.65; }
.cn-main > .bible-bar { margin-bottom: .6rem; }
.cn-com { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #3f3f46; margin: 1rem 0 .2rem; }
.cn-h { font-size: 1.25em; margin: .2rem 0 .6rem; }
.cn-h span { font-weight: 600; }
.cn-part-h { font-size: 1.05em; margin: 1.6rem 0 .4rem; padding-top: .6rem; border-top: 2px solid #cfd8d2; }
.cn-art-box { margin: 0 0 1.4rem; }
.cn-p { margin: 0 0 .5rem; }
.cn-l1 { padding-left: 0; } .cn-l2 { padding-left: 1.6rem; } .cn-l3 { padding-left: 3.1rem; }
.cn-mk { font-weight: 700; margin-right: .15rem; }
.cn-pre { margin: 0 0 .8rem; } .cn-bless { text-align: center; font-weight: 700; letter-spacing: .08em; margin-top: 1.2rem; }
.cn-flash { background: #fff4b8; border-radius: .3rem; }
.cn-text mark, .cn-hit mark { background: #ffe066; color: #111; border-radius: .15rem; }
.cn-hit { display: block; width: 100%; text-align: left; padding: .7rem .9rem; margin: 0 0 .5rem; border: 2px solid var(--ink); border-radius: .5rem; background: var(--white); color: var(--ink); text-decoration: none; }
.cn-hit:hover, .cn-hit:focus-visible { background: #eef4ef; }
.cn-hit span { display: block; font-size: .9rem; color: #3f3f46; margin-top: .15rem; }
[data-theme="dark"] .cn-text, [data-theme="dark"] .cn-toc, [data-theme="dark"] .cn-hit { background: #1b1f24; color: #e5e7eb; }
[data-theme="dark"] .cn-com, [data-theme="dark"] .cn-part, [data-theme="dark"] .cn-hit span { color: #cbd5e1; }
[data-theme="dark"] .cn-toc-a, [data-theme="dark"] .cn-art, [data-theme="dark"] .cn-ch summary a { color: #e5e7eb; }
[data-theme="dark"] .cn-art:hover, [data-theme="dark"] .cn-toc-a:hover, [data-theme="dark"] .cn-ch summary a:hover, [data-theme="dark"] .cn-hit:hover { background: #2a3038; }
[data-theme="dark"] .cn-art.on { background: #e5e7eb; color: #111; }
[data-theme="dark"] .cn-flash { background: #5b4d00; }
@media (max-width: 899px) { .cn-grid { grid-template-columns: 1fr; } .cn-toc { position: static; max-height: none; } .cn-l2 { padding-left: 1.2rem; } .cn-l3 { padding-left: 2.3rem; } }
.mt .cn-text { border: 0; padding: .3rem .1rem; background: transparent; }
@media print { .cn-toc, .cn-quick, #cnBar { display: none !important; } .cn-grid { display: block; } }
.cn-ch summary a { display: inline; padding: .1rem .2rem; color: var(--ink); text-decoration: none; border-radius: .3rem; }

/* ---- batch 32: header, learner width and type, bleed alignment, piano buttons, pills ---- */
.hdr-tools { gap: .8rem; }
.hdr-icon { width: 2.1rem; height: 2.1rem; font-size: 1rem; }
.hdr-user { height: 2.1rem; padding-block: 0; }
@media (max-width: 380px) { .hdr-tools { gap: .5rem; } .hdr-icon { width: 1.95rem; height: 1.95rem; } }
body.learning .hdr-icon { width: 1.9rem; height: 1.9rem; font-size: .9rem; }
body.learning .hdr-tools { gap: .6rem; }

body.learning #main.container { max-width: 100%; padding-inline: clamp(.5rem, 2vw, 2rem); }
#rBody.prose, #rBody { max-width: none; font-size: 1.2rem; line-height: 1.75; }
#rBody.prose p, #rBody.prose li { line-height: 1.75; }
#reader.reader-full #rBody { max-width: none; }
/* an "edge to edge" picture is exactly as wide as the text beside it */
.rt-content, .rt-area, #reader.reader-full #rBody { --bleed: 0px; }
#reader.reader-full #rBody img.rt-is-bleed, #reader.reader-full #rBody img.rt-is-cover { width: 100%; margin-left: 0; margin-right: 0; }

/* the dark tool bars: readable on hover, focus and when pressed */
.mu-tools .btn:hover, .mu-piano-bar .btn:hover, .mu-set .btn:hover,
.mu-tools .btn:focus-visible, .mu-piano-bar .btn:focus-visible, .mu-set .btn:focus-visible { background: #fff; color: #111; border-color: #fff; }
.mu-tools .btn:focus-visible, .mu-piano-bar .btn:focus-visible, .mu-set .btn:focus-visible { outline: 3px solid #f2c94c; outline-offset: 2px; }
.mu-piano-bar .btn.on:hover, .mu-set .btn.on:hover, .mu-piano-bar .btn.on:focus-visible, .mu-set .btn.on:focus-visible { background: #f2c94c; color: #111; border-color: #fff; }
.mu-tools .btn-danger:hover, .mu-tools .btn-danger:focus-visible { background: #fff; color: #7a1010; }
.pk:focus-visible { outline: 3px solid #f2c94c; outline-offset: -3px; z-index: 5; }
.pk.b { font-size: .68rem; }
.pk.b:focus-visible { background: #f2c94c; color: #111; outline-color: #fff; }
.pk.w:focus-visible { background: #ffe58a; color: #111; outline-color: #0b3d91; }

/* pill buttons hold their contents instead of stretching */
.chip, .mt-tab, .kb-tab, .kb-small, .rf-refs .chip, .rf-langs .chip { flex: 0 0 auto; width: auto; }
.chip { padding: .2rem .7rem; font-size: .9rem; line-height: 1.35; }
.rf-refs, .rf-langs, .cn-quick, .bible-chips { align-items: center; align-content: flex-start; }

/* ---- Batch 36: blog ---- */
.blog-cats { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.blog-cats a { padding: .3rem .8rem; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .9rem; background: var(--white); }
.blog-cats a.on, .blog-cats a:hover { background: var(--ink); color: var(--white); }
.blog-search { display: flex; gap: .5rem; max-width: 28rem; margin: 0 0 1.25rem; }
.blog-card { background: var(--white); border: 1px solid #c3d3c5; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: border-color .15s, box-shadow .15s; }
.blog-card:hover { border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.blog-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #e6efe6; }
.blog-thumb.fallback { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--ink); text-decoration: none; }
.blog-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.blog-title { font-size: 1.1rem; margin: 0; line-height: 1.3; }
.blog-title a { color: var(--ink); text-decoration: none; }
.blog-title a:hover { text-decoration: underline; }
.blog-excerpt { margin: 0; color: #3e5645; font-size: .95rem; }
.blog-meta { margin: 0; color: #566b5c; font-size: .85rem; }
.blog-pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.blog-wide { max-width: 100%; padding-inline: clamp(.9rem, 3vw, 3rem); }
.blog-post .blog-cover { max-height: 34rem; }
@media (min-width: 992px) { .blog-content { font-size: 1.15rem; } .blog-head h1 { font-size: clamp(2rem, 3.4vw, 3rem); } .blog-post .lead { max-width: none; } }
.blog-head h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.2; margin: .6rem 0; }
.blog-cover { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border: 2px solid var(--ink); border-radius: 8px; margin: 1rem 0; }
.blog-toc { border: 1px solid #c3d3c5; border-left: 4px solid var(--ink); border-radius: 6px; padding: .75rem 1rem; margin: 1rem 0 1.5rem; background: var(--white); }
.blog-toc ol { margin: .4rem 0 0; padding-left: 1.2rem; }
.blog-toc li.l3 { margin-left: 1rem; list-style-type: circle; }
.blog-content { font-size: 1.05rem; line-height: 1.75; }
.blog-content h2, .blog-content h3 { scroll-margin-top: 5rem; margin-top: 1.8rem; }
.blog-content img { max-width: 100%; height: auto; }
.blog-tags { margin: 1.5rem 0 .5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.blog-tags a { color: #3e5645; text-decoration: none; font-size: .9rem; }
.blog-tags a:hover { text-decoration: underline; }
.blog-share { padding: 1rem 0; border-top: 1px solid #c3d3c5; border-bottom: 1px solid #c3d3c5; margin: 1rem 0; }
.blog-share-h { font-weight: 700; margin: 0 0 .5rem; }
.sh-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.sh { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; border: 2px solid var(--ink); text-decoration: none; cursor: pointer; padding: 0; transition: transform .12s, box-shadow .12s; }
.sh:hover, .sh:focus-visible { color: #fff; transform: translateY(-2px); box-shadow: 0 3px 0 var(--ink); }
.sh[hidden] { display: none; }
.sh-whatsapp { background: #25d366; } .sh-facebook { background: #1877f2; } .sh-x { background: #000; } .sh-linkedin { background: #0a66c2; }
.sh-reddit { background: #ff4500; } .sh-telegram { background: #26a5e4; } .sh-email { background: #6b7280; } .sh-copy { background: #0e2a17; } .sh-native { background: #43b02a; color: #0e2a17; }
.sh-youtube { background: #ff0000; } .sh-tiktok { background: #010101; } .sh-instagram { background: linear-gradient(45deg, #f09433, #dc2743 55%, #bc1888); } .sh-github { background: #24292f; }
.sh-note { min-height: 1.2rem; margin: .4rem 0 0; font-size: .85rem; color: #1f7a2a; }
.blog-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1rem; background: #eef8e9; border: 2px solid var(--ink); border-radius: 8px; padding: 1rem 1.25rem; margin: 1.25rem 0; }
.blog-cta div { display: flex; flex-direction: column; }
.blog-author { background: var(--white); border: 1px solid #c3d3c5; border-radius: 8px; padding: 1rem 1.25rem; margin: 1.25rem 0; }
.blog-related { margin-top: 2rem; }
.blog-admin-cover { height: 3.5rem; width: auto; border: 1px solid #c3d3c5; border-radius: 4px; }
@media (max-width: 575px) { .blog-search { max-width: none; } .blog-content { font-size: 1rem; } }
[data-theme="dark"] .blog-cta { background: #16301f; }
[data-theme="dark"] .blog-card, [data-theme="dark"] .blog-toc, [data-theme="dark"] .blog-author { background: #12241a; }

/* ---- About page: profiles stay short; the rest opens with "Read more" ---- */
.team-grid { align-items: start; }
.team-bio { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .35rem; }
.team-card.open .team-bio { display: block; -webkit-line-clamp: unset; overflow: visible; }
.team-quals { display: none; }
.team-card.open .team-quals { display: block; margin-top: .4rem; }
.team-more { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 700; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.team-more:hover { color: var(--marker-deep); }
.team-card:not(.has-more) .team-quals { display: block; }
.team-photo-wrap { aspect-ratio: 1 / 1; }

/* the whole blog card is one tap target (the headline link stretches over it) */
.blog-card { position: relative; }
.blog-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.blog-card .badge-cat { position: relative; z-index: 2; }
.blog-more { margin-top: auto; font-weight: 700; color: var(--ink); }
.blog-card:hover .blog-more { text-decoration: underline; }

/* ---------- Screens of every size: phones, tablets, laptops, desktops and big classroom displays ---------- */
@media (min-width: 1400px) { .container { max-width: min(1440px, 94vw); } }
@media (min-width: 1800px) { html { font-size: 17px; } .container { max-width: min(1680px, 94vw); } }
@media (min-width: 2300px) { html { font-size: 20px; } .container { max-width: min(2100px, 94vw); } }
@media (min-width: 3000px) { html { font-size: 24px; } .container { max-width: min(2700px, 94vw); } }
@media (pointer: coarse) { .btn, .rt-btn, .rt-opt, .nav-link, .form-select, .form-control { min-height: 44px; } }
@media (max-width: 575px) { .table-responsive, .rt-content table { max-width: 100%; overflow-x: auto; display: block; } img, video, iframe, canvas { max-width: 100%; } }
@media (max-width: 400px) { .container { padding-inline: .75rem; } h1, .display-4, .display-5 { overflow-wrap: anywhere; } }

/* ---------- Softer look: grey-green edges and gentle shadows instead of heavy black lines; pill buttons and chips ---------- */
:root { --edge: #c9d6cc; --edge-strong: #9fb3a4; --lift: 0 2px 10px rgba(14, 42, 23, .08); --lift-2: 0 8px 24px rgba(14, 42, 23, .14); }
[data-bs-theme="dark"] { --edge: #31483a; --edge-strong: #4d6a58; --lift: 0 2px 10px rgba(0, 0, 0, .35); --lift-2: 0 8px 24px rgba(0, 0, 0, .5); }
.btn { border-radius: 999px; }
.btn-marker:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(14, 42, 23, .2); }
.btn-marker:active { transform: none; box-shadow: none; }
.btn-outline-dark { --bs-btn-border-color: var(--edge-strong); }
.btn-outline-dark:hover { --bs-btn-hover-border-color: var(--ink); }
.panel, .res-card, .steps li, .look-card, .mt, .blog-card { border: 1px solid var(--edge); border-radius: 18px; box-shadow: var(--lift); }
.res-card:hover, .blog-card:hover { border-color: var(--edge-strong); box-shadow: var(--lift-2); transform: translateY(-2px); }
.buy-panel, .modal-content, .stat.hl { border: 1px solid var(--edge); border-radius: 18px; box-shadow: var(--lift-2); }
.chip { border: 1px solid var(--edge-strong); }
.price-tag { border: 1px solid var(--edge-strong); border-radius: 999px; padding: .1rem .7rem; }
.hdr-icon { border: 1px solid var(--edge-strong); }
.dropdown-menu, .site-search-box { border: 1px solid var(--edge); border-radius: 16px; box-shadow: var(--lift-2); }
.site-header { border-bottom: 1px solid var(--edge); box-shadow: 0 1px 8px rgba(14, 42, 23, .06); }

/* Course cards */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .65rem; border: 1px solid var(--edge); border-radius: 999px; background: var(--white); font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.pill-ok { background: #e3f4dc; border-color: #bfe3b2; color: var(--ink); }
.course-card { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--edge); border-radius: 20px; box-shadow: var(--lift); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.course-card:hover, .course-card:focus-within { transform: translateY(-3px); box-shadow: var(--lift-2); }
.cc-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e3ece5; }
.cc-thumb img, .cc-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.cc-thumb iframe { pointer-events: none; }
.cc-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .92); }
.cc-ph i { position: absolute; font-size: 6rem; opacity: .14; }
.cc-ph b { font: 800 3.4rem "Bricolage", sans-serif; }
.cc-ph-0 { background: linear-gradient(135deg, #1f7a3a, #43b02a); } .cc-ph-1 { background: linear-gradient(135deg, #0b5cad, #3aa0e8); } .cc-ph-2 { background: linear-gradient(135deg, #6b2fb3, #a46be0); }
.cc-ph-3 { background: linear-gradient(135deg, #c25b00, #f0a030); } .cc-ph-4 { background: linear-gradient(135deg, #b00d4f, #ee5a8f); } .cc-ph-5 { background: linear-gradient(135deg, #0e6b6b, #36bdb0); }
.cc-level { position: absolute; top: .6rem; left: .6rem; z-index: 2; padding: .15rem .7rem; border-radius: 999px; background: rgba(14, 42, 23, .85); color: #fff; font-size: .75rem; font-weight: 700; }
.cc-play { position: absolute; right: .6rem; bottom: .6rem; z-index: 2; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.cc-thumb:has(iframe) .cc-play { display: none; }
.cc-body { display: flex; flex-direction: column; gap: .5rem; flex: 1; padding: 1rem 1.1rem 1.1rem; }
.cc-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cc-title { font-size: 1.1rem; line-height: 1.3; margin: 0; }
.cc-title a { color: var(--ink); text-decoration: none; }
.cc-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cc-sum { margin: 0; color: var(--ink-2); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cc-more { position: relative; z-index: 2; align-self: flex-start; display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .7rem; border: 1px solid var(--edge-strong); border-radius: 999px; font-size: .82rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.cc-more:hover { background: #e3f4dc; }
.cc-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; margin-top: auto; padding-top: .3rem; font-size: .85rem; }
.cc-author { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; min-width: 0; }
.cc-author span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 11rem; }
.cc-av { width: 1.7rem; height: 1.7rem; display: inline-grid; place-items: center; border-radius: 50%; background: var(--marker); color: var(--ink); font-weight: 800; font-size: .8rem; flex: none; }
.cc-new { font-size: .75rem; font-weight: 700; color: var(--ink-2); padding: .1rem .55rem; border: 1px solid var(--edge); border-radius: 999px; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .6rem; border-top: 1px solid var(--edge); }
.cc-foot .btn { position: relative; z-index: 2; white-space: nowrap; }
.course-media { position: relative; aspect-ratio: 16 / 9; max-width: 56rem; margin: 0 0 1rem; border-radius: 20px; overflow: hidden; border: 1px solid var(--edge); box-shadow: var(--lift); background: #0e2a17; }
.course-media[hidden] { display: none; }
.course-media img, .course-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
@media (prefers-reduced-motion: reduce) { .course-card, .res-card, .blog-card { transition: none; transform: none !important; } }
.btn-marker, .btn-primary { border-width: 1px; box-shadow: 0 2px 6px rgba(14, 42, 23, .2); }
.qa-card { border: 1px solid var(--edge); border-radius: 18px; box-shadow: var(--lift); }
.car-btn { border-width: 1px; box-shadow: var(--lift); }
[data-bs-theme="dark"] .btn-marker, [data-bs-theme="dark"] .btn-primary { box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
[data-bs-theme="dark"] .btn-marker:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, .55); }
[data-bs-theme="dark"] .res-card:hover, [data-bs-theme="dark"] .blog-card:hover { border-color: var(--edge-strong); box-shadow: var(--lift-2); }
[data-bs-theme="dark"] .steps li, [data-bs-theme="dark"] .buy-panel, [data-bs-theme="dark"] .modal-content, [data-bs-theme="dark"] .stat.hl { border-color: var(--edge); box-shadow: var(--lift); }
[data-bs-theme="dark"] .course-card, [data-bs-theme="dark"] .pill { background: #16251c; }
