/* Notebook
   ========================================================================
   The look of the site: paper, blue ruling, school ink for everything you
   can press and a teacher's red pen for marks. It replaces the purple
   gradients, glass cards and coloured icon tiles of project.css by
   overriding them, so the templates keep their classes while the pages are
   redrawn one by one. The canvas the look comes from:
   https://claude.ai/artifact/MVymFmRdcpkLnGk4aDP98o

   A new file rather than an edit of project.css: static URLs here are
   signed and only change once a day, so a visitor holding yesterday's copy
   of a renamed rule would get new markup on old styles. Nobody has a stale
   copy of a file that did not exist yesterday. */

:root {
  --ch-paper: #ffffff;
  --ch-desk: #f5f7fa;
  --ch-graphite: #17191e;
  --ch-graphite-soft: #3d4350;
  --ch-pencil: #5b6272;
  --ch-hairline: #e6eaf0;
  --ch-border: #dde4ef;
  --ch-ink: #1f3fa6;
  --ch-ink-dark: #172f7d;
  --ch-ink-tint: #e8eef9;
  --ch-red-pen: #c8341c;
  --ch-red-pen-dark: #a32b16;
  --ch-red-pen-tint: #fbe9e5;
  --ch-amber-text: #6e4300;
  --ch-amber-tint: #fff1d6;
  --ch-green-text: #1d5c3f;
  --ch-green-tint: #e3f1ea;
  --ch-rule: #c9d8ee;
  --ch-rule-strong: #8faad6;
  --ch-margin: #eba59a;

  /* Neither Atkinson nor Bricolage draws Cyrillic. Golos Text, drawn for
     Russian public services with legibility first, takes those letters
     alone: the browser falls back per glyph, and the baseline stays the
     first font's, so a rule drawn under a Russian line still sits where the
     letters stand. */
  --ch-font-body: "Atkinson Hyperlegible Next", "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ch-font-display: "Bricolage Grotesque", "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* The hand the courses teach: Zaner-Bloser, the same letterforms the
     reference inks are rendered from. Its x-height is exactly half its
     ascender, so on handwriting paper the font size equals the band. */
  --ch-font-model: "Playwrite US Trad", cursive;
  --ch-font-mark: "Caveat", cursive;

  /* Bootstrap 5.2 reads these */
  --bs-body-font-family: var(--ch-font-body);
  --bs-body-color: var(--ch-graphite);
  --bs-body-bg: var(--ch-desk);
  --bs-primary: #1f3fa6;
  --bs-primary-rgb: 31, 63, 166;
  --bs-link-color: #1f3fa6;
  --bs-link-hover-color: #172f7d;
  --bs-border-color: #dde4ef;
  --bs-border-radius: 10px;
  --bs-border-radius-lg: 14px;

  /* The old gradients, flattened. Every background that used one is now
     solid ink, which still carries the white text those blocks were built
     with (9:1). Text-bearing badges and the icon tiles get tints below. */
  --ch-gradient-primary: #1f3fa6;
  --ch-gradient-secondary: #1f3fa6;
  --ch-gradient-success: #1f3fa6;
  --ch-gradient-info: #1f3fa6;
  --ch-gradient-warning: #1f3fa6;
  --ch-gradient-danger: #c8341c;
  --ch-gradient-btn: #1f3fa6;
}

/* The desk goes under the page too: on a page shorter than the window the
   body ended and a white band showed below the footer. */
html,
body {
  background-color: var(--ch-desk);
  color: var(--ch-graphite);
  font-family: var(--ch-font-body);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--ch-font-display);
  font-weight: 800;
  letter-spacing: -0.015em;
}
h4, h5, h6,
.h4, .h5, .h6 {
  font-weight: 700;
  letter-spacing: -0.005em;
}

/* Bootstrap's grey measures 4.48:1 on white and 4.37:1 on the desk;
   pencil is 6.1:1 */
.text-muted {
  color: var(--ch-pencil) !important;
}
.form-text {
  color: var(--ch-pencil);
}
.breadcrumb {
  --bs-breadcrumb-item-active-color: var(--ch-pencil);
}

:focus-visible {
  outline: 3px solid var(--ch-ink);
  outline-offset: 2px;
}

/* Wordmark: the printed half and the written half, which is the product */
.ch-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  color: var(--ch-graphite);
  text-decoration: none;
}
.ch-wordmark-print {
  font-family: var(--ch-font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1;
}
.ch-wordmark-script {
  /* Playwrite letters start with an entry stroke that reaches back left of
     the glyph box; without the gap the h runs into the i */
  margin-left: 0.14em;
  font-family: var(--ch-font-model);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ch-ink);
}

/* Navbar
   ------------------------------------------------------------------------ */
.navbar-brand {
  font-family: var(--ch-font-display);
  font-size: inherit !important;
  color: var(--ch-graphite) !important;
  letter-spacing: normal;
}
/* The visitor's button stays beside the menu on a 360px phone. In Russian,
   Spanish, French and Portuguese its label pushed the toggler onto a
   second line, which is how half the visitors from Brazil saw every page. */
.ch-nav-cta {
  white-space: nowrap;
}
@media (max-width: 399.98px) {
  .ch-nav-cta {
    padding-right: 10px !important;
    padding-left: 10px !important;
    font-size: 0.9375rem;
  }
  .navbar .navbar-toggler {
    padding: 4px 8px;
  }
}
#learningDropdown,
#teachingDropdown,
#accountDropdown,
.navbar .nav-link {
  color: var(--ch-graphite) !important;
}
.navbar .nav-item.active > .nav-link,
.navbar .nav-item:hover > .nav-link,
.navbar .nav-item:not(.active):hover .nav-link,
.navbar .nav-item.active.dropdown .nav-link {
  color: var(--ch-ink) !important;
}
.navbar .nav-item.active .nav-link,
.navbar .nav-item.active:hover .nav-link,
.navbar .nav-item.active.dropdown .nav-link {
  font-weight: 700;
  border-bottom-color: var(--ch-ink);
}
.navbar .dropdown-menu {
  border: 1px solid var(--ch-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(23, 25, 30, 0.12);
}
.navbar .dropdown-item:hover {
  transform: none;
  background-color: var(--ch-desk);
}
.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--ch-ink-tint);
  color: var(--ch-ink);
}

/* Buttons
   ------------------------------------------------------------------------
   Ink for the action, an ink outline for the one beside it, red pen only
   where something is destroyed. No lift on hover: a button that moves
   under the pointer is harder to press, not easier. */
.btn {
  --bs-btn-font-weight: 700;
  --bs-btn-border-radius: 10px;
}
.btn-primary,
.btn-success,
.btn-info,
.btn-warning {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: var(--ch-ink);
  --bs-btn-border-color: var(--ch-ink);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: var(--ch-ink-dark);
  --bs-btn-hover-border-color: var(--ch-ink-dark);
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: var(--ch-ink-dark);
  --bs-btn-active-border-color: var(--ch-ink-dark);
  --bs-btn-disabled-color: #ffffff;
  --bs-btn-disabled-bg: var(--ch-ink);
  --bs-btn-disabled-border-color: var(--ch-ink);
  --bs-btn-focus-shadow-rgb: 31, 63, 166;
}
.btn-outline-primary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning {
  --bs-btn-color: var(--ch-ink);
  --bs-btn-border-color: var(--ch-ink);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: var(--ch-ink);
  --bs-btn-hover-border-color: var(--ch-ink);
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: var(--ch-ink-dark);
  --bs-btn-active-border-color: var(--ch-ink-dark);
  --bs-btn-disabled-color: var(--ch-ink);
  --bs-btn-disabled-border-color: var(--ch-ink);
  --bs-btn-focus-shadow-rgb: 31, 63, 166;
  border-width: 2px;
}
.btn-danger {
  --bs-btn-bg: var(--ch-red-pen);
  --bs-btn-border-color: var(--ch-red-pen);
  --bs-btn-hover-bg: var(--ch-red-pen-dark);
  --bs-btn-hover-border-color: var(--ch-red-pen-dark);
  --bs-btn-active-bg: var(--ch-red-pen-dark);
  --bs-btn-active-border-color: var(--ch-red-pen-dark);
}
.btn-outline-secondary {
  --bs-btn-color: var(--ch-graphite-soft);
  --bs-btn-border-color: #b9c2d0;
  --bs-btn-hover-color: var(--ch-graphite);
  --bs-btn-hover-bg: var(--ch-desk);
  --bs-btn-hover-border-color: var(--ch-pencil);
  --bs-btn-active-color: var(--ch-graphite);
  --bs-btn-active-bg: var(--ch-hairline);
  --bs-btn-active-border-color: var(--ch-pencil);
}
.btn-outline-danger {
  --bs-btn-color: var(--ch-red-pen-dark);
  --bs-btn-border-color: var(--ch-red-pen);
  --bs-btn-hover-bg: var(--ch-red-pen);
  --bs-btn-hover-border-color: var(--ch-red-pen);
}

.btn-gradient,
.btn-cta,
.btn-trial,
.btn-game,
.btn-success-custom,
.btn-warning-custom,
.btn[class*="bg-gradient-"] {
  background: var(--ch-ink) !important;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 700;
  box-shadow: none;
}
.btn-gradient:hover,
.btn-gradient:focus-visible,
.btn-cta:hover,
.btn-trial:hover,
.btn-game:hover,
.btn-success-custom:hover,
.btn-warning-custom:hover,
.btn[class*="bg-gradient-"]:hover {
  background: var(--ch-ink-dark) !important;
  color: #ffffff;
  transform: none;
  box-shadow: none;
}
.btn.bg-gradient-danger {
  background: var(--ch-red-pen) !important;
}
.btn.bg-gradient-danger:hover {
  background: var(--ch-red-pen-dark) !important;
}

/* Cards
   ------------------------------------------------------------------------ */
.card {
  --bs-card-border-color: var(--ch-border);
  --bs-card-border-radius: 14px;
  --bs-card-inner-border-radius: 13px;
  --bs-card-cap-bg: var(--ch-paper);
}
.card-glass,
.glass-card {
  background: var(--ch-paper);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid var(--ch-border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(23, 25, 30, 0.05);
}

/* A card's title sits on a rule, the way a heading sits on the line of an
   exercise book. Templates put .text-white on these titles for the old
   purple fill; on paper that has to go back to graphite. */
.card-header-gradient,
.card-header[class*="bg-gradient-"] {
  background: var(--ch-paper) !important;
  color: var(--ch-graphite) !important;
  border-bottom: 2px solid var(--ch-rule-strong);
  border-radius: 14px 14px 0 0;
}
.card-header-gradient .text-white,
.card-header[class*="bg-gradient-"] .text-white {
  color: var(--ch-graphite) !important;
}
.card-header-gradient .text-muted,
.card-header[class*="bg-gradient-"] .text-muted {
  color: var(--ch-pencil) !important;
}
.card-header-gradient i,
.card-header[class*="bg-gradient-"] i,
.course-page .card-glass > .card-header > h5 > i,
.course-page .card-glass > .card-header > h6 > i {
  color: var(--ch-ink) !important;
}

/* Badges: tints with dark type, the way the score chips are drawn */
.badge {
  border-radius: 999px;
  font-weight: 700;
}
.badge.bg-gradient-primary,
.badge.bg-gradient-info,
.badge.bg-primary,
.badge.bg-info {
  background: var(--ch-ink-tint) !important;
  color: var(--ch-ink) !important;
}
.badge.bg-gradient-success,
.badge.bg-success {
  background: var(--ch-green-tint) !important;
  color: var(--ch-green-text) !important;
}
.badge.bg-gradient-warning,
.badge.bg-warning {
  background: var(--ch-amber-tint) !important;
  color: var(--ch-amber-text) !important;
}
.badge.bg-gradient-secondary,
.badge.bg-secondary {
  background: #eef1f5 !important;
  color: var(--ch-graphite-soft) !important;
}
.badge.bg-gradient-danger,
.badge.bg-danger {
  background: var(--ch-red-pen-tint) !important;
  color: var(--ch-red-pen-dark) !important;
}

/* Icon tiles: one quiet tint whatever colour the template asked for, so
   the icon reads as a label rather than as decoration. Some hold a step
   number instead of an icon, still marked up as white type. */
.icon-shape {
  box-shadow: none !important;
}
.icon-shape[class*="bg-gradient-"] {
  background: var(--ch-ink-tint) !important;
}
.icon-shape i,
.icon-shape[class*="bg-gradient-"] i,
.icon-shape[class*="bg-gradient-"] .text-white {
  color: var(--ch-ink) !important;
}
/* The same tint for the avatar discs and the picture-less course covers,
   which were a 200px field of solid colour round one white icon */
.avatar[class*="bg-gradient-"],
div:is(.border-radius-lg, .rounded-top)[class*="bg-gradient-"]:not(.btn, .badge, .card) {
  background: var(--ch-ink-tint) !important;
  box-shadow: none !important;
}
.avatar[class*="bg-gradient-"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
}
.avatar[class*="bg-gradient-"] :is(i, .text-white),
div:is(.border-radius-lg, .rounded-top)[class*="bg-gradient-"]:not(.btn, .badge, .card) :is(i, .text-white) {
  color: var(--ch-ink) !important;
}

/* Bootstrap's own colours
   ------------------------------------------------------------------------
   The templates still ask for info, warning and success by name. Left
   alone those are a cyan white type cannot sit on (1.96:1) and a yellow
   no type can sit on, from outside the palette. Info is ink, warning is
   the amber the tips are drawn in, success the green of the strengths. */
:root {
  --bs-info: #1f3fa6;
  --bs-info-rgb: 31, 63, 166;
  --bs-danger: #c8341c;
  --bs-danger-rgb: 200, 52, 28;
  --bs-warning: #e0a328;
  --bs-warning-rgb: 224, 163, 40;
}
.text-success {
  color: var(--ch-green-text) !important;
}
.text-warning {
  color: #9a5a00 !important;
}
.alert {
  --bs-alert-border-radius: 12px;
}
.alert-info,
.alert-primary {
  --bs-alert-color: var(--ch-ink-dark);
  --bs-alert-bg: var(--ch-ink-tint);
  --bs-alert-border-color: var(--ch-rule);
}
.alert-warning {
  --bs-alert-color: var(--ch-amber-text);
  --bs-alert-bg: var(--ch-amber-tint);
  --bs-alert-border-color: #f0d9a8;
}
.alert-success {
  --bs-alert-color: var(--ch-green-text);
  --bs-alert-bg: var(--ch-green-tint);
  --bs-alert-border-color: #bfdccd;
}
.alert-danger {
  --bs-alert-color: var(--ch-red-pen-dark);
  --bs-alert-bg: var(--ch-red-pen-tint);
  --bs-alert-border-color: #f2c4ba;
}
.alert .alert-link {
  color: inherit;
}
/* Meters are ink whatever they measure; only a short one turns amber */
.progress-bar.bg-success,
.progress-bar.bg-info,
.progress-bar.bg-primary {
  background-color: var(--ch-ink) !important;
}
.progress-bar.bg-warning {
  background-color: #b86e00 !important;
}
.card-header.bg-info {
  background: var(--ch-paper) !important;
  border-bottom: 2px solid var(--ch-rule-strong);
}
.card-header.bg-info,
.card-header.bg-info .text-white {
  color: var(--ch-graphite) !important;
}
/* The language picker: chosen languages as small ink pills. The picker's
   own stylesheet loads after this one, so the rule carries one more class. */
.choices .choices__list--multiple .choices__item,
.choices .choices__list--multiple .choices__item.is-highlighted {
  background-color: var(--ch-ink);
  border-color: var(--ch-ink);
}

/* Accordions open in ink; the chevron is Bootstrap's own, recoloured */
.accordion {
  --bs-accordion-active-color: var(--ch-ink);
  --bs-accordion-active-bg: var(--ch-ink-tint);
  --bs-accordion-btn-focus-border-color: var(--ch-ink);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 3px rgba(31, 63, 166, 0.2);
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231f3fa6'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Meters: ink on a lighter step of the same blue */
.progress,
.progress-custom {
  --bs-progress-bg: var(--ch-ink-tint);
  --bs-progress-bar-bg: var(--ch-ink);
  background-color: var(--ch-ink-tint);
  border-radius: 999px;
}
.progress-bar-custom {
  background: var(--ch-ink);
}

/* Forms
   ------------------------------------------------------------------------ */
.form-control,
.form-select {
  border-color: var(--ch-border);
  border-radius: 10px;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--ch-ink);
  box-shadow: 0 0 0 3px rgba(31, 63, 166, 0.2);
}
.form-check-input:checked {
  background-color: var(--ch-ink);
  border-color: var(--ch-ink);
}
.form-check-input:focus {
  border-color: var(--ch-ink);
  box-shadow: 0 0 0 3px rgba(31, 63, 166, 0.2);
}
#languageFilter option:first-child {
  color: var(--ch-ink);
}

/* Footer
   ------------------------------------------------------------------------ */
footer {
  background: var(--ch-desk);
  border-top: 1px solid var(--ch-hairline);
}
footer h6 {
  color: var(--ch-pencil) !important;
}
.btn-social {
  background: var(--ch-paper);
  border: 1px solid var(--ch-border);
  color: var(--ch-graphite);
}
.btn-social:hover {
  border-color: var(--ch-ink);
  color: var(--ch-ink);
  transform: none;
}

/* Page heads shared by the course, lesson and exercise pages
   ------------------------------------------------------------------------ */
.page-head-back {
  color: var(--ch-ink);
}
.page-head-back:hover,
.page-head-back:focus {
  color: var(--ch-ink-dark);
  background: var(--ch-ink-tint);
}
.page-head-title,
.course-hero-title,
.hero-title {
  font-family: var(--ch-font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}
/* The head reads as the page's title, not as one more card: larger type,
   no icon beside it, the back link as a plain ink line above */
.page-head-back {
  min-height: 40px;
  padding: 10px 1.25rem 0;
  border-bottom: 0;
  font-weight: 700;
}
.page-head-body {
  padding: 0.5rem 1.25rem 1.375rem;
}
.page-head-title {
  font-size: clamp(1.75rem, 4.2vw, 2.5rem);
  line-height: 1.08;
}
.page-head-title > i {
  display: none;
}
.page-head-meta {
  font-size: 0.9375rem;
  color: var(--ch-pencil);
}
/* Each block's title stands on a rule, the way a heading sits on the line
   of an exercise book. The icons that stood before them were decoration;
   a step keeps its number, written in the course's hand on the same rule. */
.card-glass > .card-header:not(.p-0, [class*="bg-gradient-"]) {
  padding: 1.125rem 1.25rem 0;
  border-bottom: 0;
}
.card-glass > .card-header:not([class*="bg-gradient-"]) > :is(h5, h6) {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ch-rule-strong);
  font-family: var(--ch-font-display);
  font-size: 1.1875rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ch-graphite);
}
.card-glass > .card-header > :is(h5, h6) > i {
  display: none;
}
.card-glass > .card-header > :is(h5, h6) > .badge.rounded-pill {
  margin: 0 !important;
  padding: 0 2px 0 0;
  border-radius: 0;
  background: none !important;
  color: var(--ch-ink) !important;
  font-family: var(--ch-font-model);
  font-size: 1.875rem;
  font-weight: 400;
  line-height: 1;
  /* Playwrite's baseline is 0.038em above the bottom of a line-height 1 box */
  transform: translateY(calc(6px + 0.038em));
}
.course-page .card-glass > .card-body {
  padding: 1rem 1.25rem 1.25rem;
}
/* Section titles inside a course card lose their leading icon too */
.course-page .card-body :is(h5, h6) > i.fas:first-child {
  display: none;
}
/* A page's own title, where it stands outside a card */
.ch-page-title {
  margin: 0 0 6px;
  font-family: var(--ch-font-display);
  font-size: clamp(1.875rem, 4.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ch-graphite);
}
/* The model to copy lies on the card as a sheet of paper */
.course-page .card-body img.border.rounded {
  border-color: #e0e5ec !important;
  border-radius: 4px !important;
  box-shadow: 0 1px 2px rgba(23, 25, 30, 0.05), 0 8px 20px rgba(23, 25, 30, 0.06) !important;
}
/* Catalogue cards: the picture sits inside the card on paper, instead of
   floating half above its top edge in a shadow */
.course-item > .card-header {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid var(--ch-hairline);
}
.course-item .course-image,
.course-item > .card-header > div[class*="bg-gradient-"] {
  display: block;
  width: 100%;
  height: 180px !important;
  object-fit: contain;
  background: var(--ch-paper);
  border-radius: 16px 16px 0 0 !important;
  box-shadow: none !important;
}
.course-item .blur-shadow-image {
  border-radius: 16px 16px 0 0;
  box-shadow: none;
}
/* The course's sample is a written word, so it is shown whole on paper with
   the title under it, never cropped under a dark wash with white type over it */
.course-hero-img {
  object-fit: contain;
  background: var(--ch-paper);
}
.course-hero-caption {
  padding: 1rem 1.25rem 0;
}
.course-hero-title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  color: var(--ch-graphite);
}
.course-hero-author {
  color: var(--ch-pencil);
}
@media (min-width: 768px) {
  .course-hero {
    margin: 0;
  }
  .course-hero-img {
    height: 220px;
    object-fit: contain;
    border-bottom: 1px solid var(--ch-hairline);
    border-radius: 0;
    box-shadow: none;
  }
  .course-hero-caption {
    position: static;
    padding: 1.5rem 1.5rem 0;
    background: none;
  }
  .course-hero-title {
    color: var(--ch-graphite);
  }
  .course-hero-author {
    color: var(--ch-pencil);
    opacity: 1;
  }
}
.lesson-nav-item {
  color: var(--ch-ink);
}
.lesson-nav-item:hover,
.lesson-nav-item.is-current {
  background: var(--ch-ink-tint);
}
.lesson-nav-item:hover {
  color: var(--ch-ink-dark);
}
.lesson-nav-item.is-current {
  color: var(--ch-graphite);
}
.lesson-nav-item.is-locked {
  color: var(--ch-pencil);
}
.level-card:hover {
  border-color: var(--ch-ink);
}

/* Steps: a written numeral standing on a rule instead of a purple disc */
.step-number {
  width: auto;
  min-width: 3rem;
  height: auto;
  padding: 0 0.5rem;
  border-radius: 0;
  border-bottom: 2px solid var(--ch-rule-strong);
  background: none;
  color: var(--ch-ink);
  font-family: var(--ch-font-model);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.5;
}

/* Big blocks
   ------------------------------------------------------------------------
   Ink is for things you press. A screen-wide field of it outshouts the
   buttons it is meant to frame, so the page heads and the large cards that
   used to be gradients go back to paper: dark type, ink buttons. Their
   markup still asks for white type and light buttons; that is undone here,
   so the templates can wait for their own redraw. */
.hero-section,
.trial-hero {
  background: var(--ch-paper);
  color: var(--ch-graphite);
  border-bottom: 1px solid var(--ch-hairline);
}
.result-hero,
.card[class*="bg-gradient-"] {
  background: var(--ch-ink-tint) !important;
  color: var(--ch-graphite) !important;
  border: 1px solid var(--ch-rule);
}
:is(.hero-section, .trial-hero, .result-hero, .card[class*="bg-gradient-"]) .text-white {
  color: var(--ch-graphite) !important;
}
:is(.hero-section, .trial-hero, .result-hero, .card[class*="bg-gradient-"]) a.text-white {
  color: var(--ch-ink) !important;
}
:is(.hero-section, .trial-hero, .result-hero, .card[class*="bg-gradient-"]) :is(.text-white-50, .text-muted) {
  color: var(--ch-pencil) !important;
}
.hero-subtitle,
.result-hero p {
  color: var(--ch-graphite-soft);
  opacity: 1;
}
:is(.hero-section, .trial-hero) h1 > i,
.result-hero-icon,
.card[class*="bg-gradient-"] i {
  color: var(--ch-ink);
}
:is(.hero-section, .trial-hero, .result-hero, .card[class*="bg-gradient-"]) .btn-light {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: var(--ch-ink);
  --bs-btn-border-color: var(--ch-ink);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: var(--ch-ink-dark);
  --bs-btn-hover-border-color: var(--ch-ink-dark);
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: var(--ch-ink-dark);
  --bs-btn-active-border-color: var(--ch-ink-dark);
}
:is(.hero-section, .trial-hero, .result-hero, .card[class*="bg-gradient-"]) .btn-outline-light {
  --bs-btn-color: var(--ch-ink);
  --bs-btn-border-color: var(--ch-ink);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: var(--ch-ink);
  --bs-btn-hover-border-color: var(--ch-ink);
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: var(--ch-ink-dark);
  --bs-btn-active-border-color: var(--ch-ink-dark);
  border-width: 2px;
}
/* The "you'll need" pill was white at a tenth over purple */
.trial-hero .bg-white.bg-opacity-10 {
  background-color: var(--ch-ink-tint) !important;
}
.hero-sample {
  border: 1px solid var(--ch-border);
  box-shadow: 0 1px 2px rgba(23, 25, 30, 0.05), 0 12px 32px rgba(23, 25, 30, 0.08);
}
/* A Material Dashboard leftover Bootstrap never defined */
.btn-white {
  background: var(--ch-paper);
  border: 2px solid var(--ch-ink);
  color: var(--ch-ink);
}
.btn-white:hover {
  background: var(--ch-ink);
  color: #ffffff;
}

.cta-section {
  background: var(--ch-graphite);
}
/* Half-white on ink measures 3.3:1; four fifths is 6.2:1. The class only
   ever sits on these dark blocks. */
.text-white-50 {
  color: rgba(255, 255, 255, 0.8) !important;
}
.cta-section::before {
  display: none;
}
.plan-card,
.plan-card:hover,
.plan-card.featured,
.plan-card.featured:hover {
  transform: none;
  box-shadow: none;
}
.plan-card.featured,
.plan-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}
.btn-signup-primary {
  background: var(--ch-paper);
  border-radius: 12px;
  color: var(--ch-ink);
}
.btn-signup-primary:hover {
  background: var(--ch-ink-tint);
  color: var(--ch-ink-dark);
  transform: none;
  box-shadow: none;
}
.btn-signup-secondary {
  border-radius: 12px;
}
.check-item i {
  color: #a9bedf;
}
.testimonial-card {
  border-left-color: var(--ch-margin);
}

.result-card,
.trial-card {
  border: 1px solid var(--ch-border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 25, 30, 0.05), 0 12px 32px rgba(23, 25, 30, 0.06);
}
.locked-badge,
.vs-badge,
.child-avatar,
.history-pill.current,
.day-circle.completed {
  background: var(--ch-ink);
  box-shadow: none;
}
.score-badge-inline {
  background: var(--ch-ink-tint);
  color: var(--ch-ink);
}

/* Score discs: ink when the page reads well, a dark amber when it needs
   work. Still no red, for the reason project.css gives. */
.score-circle.score-excellent,
.score-circle.score-good {
  background: var(--ch-ink);
}
.score-circle.score-needs-work,
.score-circle.score-low {
  background: #8a4b00;
}
.score-badge.score-excellent {
  background: var(--ch-green-tint);
  color: var(--ch-green-text);
}
.score-badge.score-good {
  background: var(--ch-amber-tint);
  color: var(--ch-amber-text);
}
.score-badge.score-needs-work {
  background: var(--ch-red-pen-tint);
  color: var(--ch-red-pen-dark);
}
.progress-ring-circle {
  background: conic-gradient(var(--ch-ink) var(--progress, 0%), var(--ch-ink-tint) 0%);
}
.activity-item::before {
  background: var(--ch-ink);
  box-shadow: 0 0 0 2px var(--ch-ink);
}
.stats-number {
  color: var(--ch-ink);
  font-family: var(--ch-font-display);
}

/* Upload: a dashed sheet. No ruling inside: it holds typeset text, and a
   rule that does not sit on the text's own baseline runs through it. */
.upload-area {
  border: 2px dashed #a9bedf;
  border-radius: 16px;
  background: #fbfcfe;
}
.upload-area:hover {
  border-color: var(--ch-ink);
  background-color: var(--ch-paper);
}
.upload-area.dragover {
  border-color: var(--ch-ink);
  background-color: var(--ch-ink-tint);
}
.upload-icon,
.feature-icon,
.feature-highlight i {
  color: var(--ch-ink);
}
.spinner {
  border-top-color: var(--ch-ink);
}

/* Feedback blocks: the red margin line instead of a coloured edge */
.feedback-item,
.locked-content {
  border-left: 2px solid var(--ch-margin);
}
.feature-highlight {
  background: var(--ch-ink-tint);
  border: 0;
}
.weak-area-card,
.tip-card {
  background: var(--ch-amber-tint);
  border: 1px solid #f0d9a8;
}
.strength-card {
  background: var(--ch-green-tint);
  border: 1px solid #bfdccd;
}
.worksheet-cta,
.course-banner {
  background: var(--ch-ink-tint);
  border: 1px solid #c9d8ee;
}
.issue-critical {
  border-left-color: var(--ch-red-pen);
}
.issue-high {
  border-left-color: #c26a00;
}
.issue-medium {
  border-left-color: #d9b34a;
}
.issue-fix {
  color: var(--ch-ink);
}
.comparison-images img,
.comparison-img {
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(23, 25, 30, 0.06), 0 8px 20px rgba(23, 25, 30, 0.08);
}

/* Child dashboard: paper on the desk, not a pastel wash */
.child-dashboard-page {
  background: var(--ch-desk);
}
.achievement-badge.earned {
  background: var(--ch-amber-tint);
  border-color: #e0b65a;
  transform: none;
}

/* A finger needs 44px: the small buttons stay compact only under a mouse */
@media (pointer: coarse) {
  .btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
}
