@font-face {
  font-family: BDSerif;
  src: local("Georgia");
}
* {
  box-sizing: border-box;
}
html {
  font-size: 20px;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}
body {
  margin: 0;
  color: #302b32;
  background: #faf8f3;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  line-height: 1.65;
}
button,
input,
textarea,
select {
  font: inherit;
}
a {
  color: #583463;
  text-underline-offset: 4px;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.65;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #94701d;
  outline-offset: 4px;
}
h1,
h2,
h3 {
  font-family: Georgia, serif;
  line-height: 1.15;
  font-weight: 500;
  margin: 0 0 0.6em;
  color: #352138;
}
h1 {
  font-size: clamp(2.1rem, 5.3vw, 3.6rem);
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.45rem;
}
p {
  margin: 0.6em 0 1em;
}
.wrap {
  width: min(1200px, calc(100% - 48px));
  margin: auto;
}
.narrow {
  max-width: 760px;
}
.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 750;
  color: #80602e;
  margin: 0 0 1rem;
}
.muted {
  color: #6f666f;
}
.small {
  font-size: 0.8rem;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: white;
  z-index: 100;
  padding: 0.6rem;
}
.skip:focus {
  top: 1rem;
}
.header {
  background: #faf8f3f5;
  border-bottom: 1px solid #e3dce0;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #352138;
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: bold;
}
.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.brand small {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
}
.header nav {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 0.8rem;
}
.text-tools {
  display: flex;
  gap: 0;
}
.text-tools button {
  border: 1px solid #cbbecb;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
}
.text-tools button:first-child {
  border-radius: 6px 0 0 6px;
}
.text-tools button:last-child {
  border-left: 0;
  border-radius: 0 6px 6px 0;
}
.button,
button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #43274a;
  color: white;
  border: 1px solid #43274a;
  padding: 0.7rem 1.15rem;
  min-height: 52px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}
.button:hover,
button.primary:hover {
  background: #56325e;
}
.button.gold {
  background: #dfbd76;
  border-color: #dfbd76;
  color: #302233;
}
.button.secondary {
  background: transparent;
  color: #43274a;
  border-color: #baadbc;
}
.button.secondary:hover {
  background: #f0e9f0;
}
.button.light {
  background: white;
  color: #43274a;
  border-color: white;
}
.button.wide {
  width: 100%;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero {
  padding: 75px 0 66px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 70px;
  align-items: center;
}
.hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  font-size: 1.05rem;
  color: #665b67;
}
.hero h1 em {
  color: #886127;
  font-style: normal;
}
.hero-art {
  position: relative;
  background: #e9dfd0;
  border-radius: 160px 160px 16px 16px;
  padding: 36px 52px 0;
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  box-shadow: 0 20px 50px #35213835;
}
.hero-note {
  border-top: 1px solid #d9caba;
  padding: 20px 0;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 1rem;
}
.benefits {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 1.3rem;
  font-size: 0.78rem;
  color: #6a5d65;
}
.benefits span:before {
  content: "✓";
  color: #837033;
  padding-right: 8px;
}
.band {
  background: #3b2441;
  color: #eee7ed;
  padding: 42px 0;
}
.band .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}
.band h3 {
  color: #e3c184;
  font-size: 1.3rem;
}
.band p {
  font-size: 0.85rem;
  margin: 0;
}
.section {
  padding: 66px 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 30px;
}
.section-head p {
  max-width: 480px;
  color: #6f666f;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid #e4dfe2;
  padding: 28px;
  border-radius: 12px;
  min-width: 0;
}
.card .number {
  color: #967338;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  margin-bottom: 28px;
}
.card p {
  font-size: 0.83rem;
  color: #6c626d;
}
.card .actions {
  margin-top: auto;
}
.card .button {
  font-size: 0.76rem;
  padding: 0.6rem 0.8rem;
}
.lesson-card {
  display: flex;
  flex-direction: column;
}
.lesson-card h3 {
  font-size: 1.45rem;
}
.lesson-card.completed {
  border-color: #b3c7b6;
}
.lesson-card.completed .number {
  color: #3d724b;
}
.card-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  font-size: 0.72rem;
}
.card-status-text {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;
  font: inherit;
  font-weight: 400;
}
.card-status-text > .lesson-status,
.card-status-text > .dashboard-quiz-score {
  display: block;
  font: inherit;
  font-weight: 400;
}
.card-status-text > .dashboard-quiz-score {
  background: transparent;
  border-radius: 0;
}
.choice-feedback[hidden],
.quiz-retake[hidden] {
  display: none !important;
}
.card-status .lesson-status {
  border-radius: 20px;
  background: #f1ecef;
  padding: 4px 10px;
}
.bonus {
  margin-top: 22px;
  background: #f1eaf2;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px;
  align-items: center;
}
.study-preview {
  border: 1px solid #d9cbd9;
  border-radius: 12px;
  background: #fff;
  padding: 32px;
  box-shadow: 12px 14px 0 #eae1dc;
}
.study-preview p {
  border-bottom: 1px solid #e9e2e8;
  padding: 12px 0;
  margin: 0;
}
.study-preview p:last-child {
  border: 0;
}
.purchase {
  background: #eee5da;
  text-align: center;
}
.purchase h2,
.purchase p {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.price {
  font-family: Georgia, serif;
  font-size: 3rem;
  margin: 15px 0;
}
.price small {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: #6f666f;
}
.faq {
  max-width: 850px;
}
.faq details {
  border-bottom: 1px solid #d9d0d8;
  padding: 18px 0;
}
.faq summary {
  font-weight: 600;
  cursor: pointer;
}
.faq details p {
  font-size: 0.9rem;
}
.footer {
  border-top: 1px solid #ded6dd;
  padding: 34px 0;
  color: #6f666f;
  font-size: 0.75rem;
}
.footer .wrap {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.page-top {
  padding: 46px 0 30px;
}
.breadcrumb {
  font-size: 0.76rem;
  margin: 0 0 22px;
}
.app-content {
  padding-bottom: 70px;
  min-height: 60vh;
}
.notice {
  background: #f0e9da;
  border: 1px solid #d9c79c;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.86rem;
  margin: 20px 0;
}
.notice.error {
  background: #fff0ed;
  color: #843322;
  border-color: #dcb1a8;
}
.notice.success {
  background: #edf5ec;
  color: #345b36;
  border-color: #aec7b1;
}
.notice:empty {
  display: none;
}
.auth-card {
  max-width: 560px;
  margin: 36px auto;
  padding: 36px;
  background: white;
  border: 1px solid #dfd4df;
  border-radius: 14px;
}
.auth-card h1 {
  font-size: 2.1rem;
}
.auth-card .divider {
  text-align: center;
  color: #857687;
  font-size: 0.8rem;
  margin: 22px 0;
}
.auth-card label {
  font-size: 0.85rem;
}
.auth-card input {
  margin: 8px 0 18px;
}
.google-mark {
  font-size: 1.2rem;
  font-weight: 700;
  color: #4285f4;
}
.loading {
  text-align: center;
  padding: 70px 24px;
  color: #6f666f;
}
.progress-panel {
  background: #43274a;
  color: white;
  padding: 32px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  margin: 10px 0 36px;
}
.progress-panel h2 {
  color: white;
  font-size: 1.7rem;
}
.progress-panel p {
  margin: 0 0 14px;
  font-size: 0.87rem;
}
.progress-panel progress {
  display: block;
  accent-color: #dfbd76;
  width: 100%;
  max-width: 600px;
  height: 10px;
}
.section-label {
  font-size: 1.8rem;
  margin-top: 35px;
}
.help-bar {
  padding: 25px;
  background: #f0e9f0;
  border-radius: 10px;
  margin-top: 34px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 0.82rem;
}
.lesson-heading h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}
.video {
  aspect-ratio: 16/9;
  background: #2f2034;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  margin: 24px 0;
}
.video iframe,
.video > div {
  width: 100%;
  height: 100%;
  border: 0;
}
.video .video-unavailable {
  height: auto;
  text-align: center;
  max-width: 640px;
  padding: 28px;
}
.video-unavailable p {
  font-size: 0.85rem;
}
.video.bonus-thumbnail {
  aspect-ratio: auto;
  min-height: 0;
  padding: clamp(20px, 5vw, 48px);
  background: #f3e8d0;
}
.video.bonus-thumbnail img {
  display: block;
  width: min(100%, 480px);
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 45px rgb(28 17 29 / 24%);
}
.workbook-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 40px 0 20px;
}
.save-status {
  font-size: 0.78rem;
  font-weight: 650;
  color: #406444;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.save-status.unsaved {
  color: #8b4d22;
}
.save-status button {
  font-size: 0.75rem;
  min-height: 40px;
  border: 1px solid #baadbc;
  border-radius: 6px;
  background: white;
  padding: 4px 12px;
}
.workbook-layout {
  display: block;
}
.workbook {
  min-width: 0;
}
.workbook-subsection {
  margin-bottom: 18px;
  overflow: hidden;
  border: 2px solid #25594b;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 22px rgb(37 89 75 / 10%);
}
.workbook-subsection > summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  list-style: none;
  cursor: pointer;
  background: #25594b;
  color: #fff;
  font: 600 1.15rem/1.3 Georgia, serif;
}
.workbook-subsection > summary::-webkit-details-marker {
  display: none;
}
.subsection-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eebd4a;
  color: #311e33;
  font: 800 0.72rem/1 system-ui, sans-serif;
}
.subsection-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff4cf;
  color: #311e33;
  font: 1.1rem/1 system-ui, sans-serif;
}
.lesson-quiz {
  margin: 30px 0 8px;
  overflow: hidden;
  border: 2px solid #5a2234;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgb(90 34 52 / 14%);
}
.lesson-quiz > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  list-style: none;
  cursor: pointer;
  background: #5a2234;
  color: #fff;
  font: 600 1.25rem/1.3 Georgia, serif;
}
.lesson-quiz > summary::-webkit-details-marker {
  display: none;
}
.lesson-quiz > summary .eyebrow {
  display: block;
  margin: 0 0 4px;
  color: #f8d978;
}
.quiz-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: #f3e8d0;
  color: #5a2234;
  font: 1.15rem/1 system-ui, sans-serif;
}
.lesson-quiz-body {
  padding: clamp(20px, 4vw, 36px);
}
.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px clamp(20px, 4vw, 36px) 0;
}
.quiz-score-label {
  display: block;
  margin-bottom: 2px;
  color: #6d6269;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#quiz-score,
.dashboard-quiz-score {
  color: #b42333;
  font-weight: 850;
}
#quiz-score {
  font-size: 1.75rem;
  line-height: 1;
}
.dashboard-quiz-score {
  padding: 0 10px;
  font: inherit;
  font-weight: 400;
}
.quiz-retake {
  background: #f3e8d0;
  border-color: #c9b995;
  color: #5a2234;
}
.lesson-quiz fieldset {
  margin: 0 0 24px;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid #d9e7e2;
}
.lesson-quiz legend {
  margin-bottom: 13px;
  color: #311e33;
  font-weight: 750;
}
.lesson-quiz fieldset label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 0;
  cursor: pointer;
}
.choice-copy {
  display: block;
  width: 100%;
}
.choice-feedback {
  display: block;
  margin-top: 4px;
  font-size: .76rem;
  font-weight: 850;
}
.selected-correct .choice-feedback,
.correct-choice .choice-feedback {
  color: #23704f;
}
.selected-incorrect .choice-feedback {
  color: #b42333;
}
.lesson-quiz fieldset label.correct-choice {
  margin: 3px -10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #eaf5f1;
  box-shadow: inset 0 0 0 1px #8fc4b2;
}
.lesson-quiz fieldset label.selected-incorrect:not(.correct-choice) {
  margin: 3px -10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff0f1;
}
.lesson-quiz input {
  width: 21px;
  height: 21px;
  min-width: 21px;
  accent-color: #5a2234;
}
.quiz-submit {
  background: #5a2234;
  border-color: #5a2234;
}
.quiz-submit:hover {
  background: #431827;
}
.quiz-result {
  margin-top: 18px;
}
.quiz-result.quiz-passed {
  border-color: #347c68;
  background: #eaf5f1;
  color: #214f43;
}
.lesson-quiz fieldset.quiz-correct {
  border-left: 4px solid #347c68;
  padding-left: 14px;
}
@media (max-width: 560px) {
  .quiz-top {
    align-items: flex-start;
    flex-direction: column;
  }
}
.lesson-quiz fieldset.quiz-incorrect {
  border-left: 4px solid #9a3f4f;
  padding-left: 14px;
}
.workbook-section {
  background: white;
  border: 0;
  border-radius: 0;
  padding: 32px;
  margin: 0;
}
.workbook-section h2 {
  font-size: 1.75rem;
}
.workbook-section h3 {
  font-size: 1.15rem;
}
.workbook-section p {
  font-size: 0.92rem;
  white-space: pre-line;
}
.field {
  margin: 26px 0;
}
.field label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.91rem;
  font-weight: 600;
}
.field input,
.field textarea,
input.study-title {
  width: 100%;
  border: 1px solid #b8a9ba;
  border-radius: 7px;
  background: #fdfcfa;
  color: #302b32;
  padding: 12px 14px;
  min-height: 52px;
}
.field textarea {
  resize: vertical;
  min-height: 134px;
  line-height: 1.6;
}
.field.short textarea {
  min-height: 60px;
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  font-size: 0.9rem;
  cursor: pointer;
}
.check input {
  width: 23px;
  height: 23px;
  min-width: 23px;
  margin-top: 4px;
  accent-color: #55345f;
}
.callout {
  background: #f3eee5;
  padding: 18px 22px;
  border-left: 3px solid #b8975f;
  border-radius: 0 8px 8px 0;
  margin: 25px 0;
}
.callout strong {
  color: #634c22;
}
.callout p {
  margin: 0.5rem 0 0;
}
.exercise-grid {
  display: grid;
  gap: 16px;
  margin: 25px 0;
}
.exercise-row {
  border: 1px solid #dfd4e0;
  border-radius: 8px;
  padding: 18px;
}
.exercise-row .field {
  margin: 16px 0;
}
.exercise-row h3 {
  color: #765487;
}
.workbook-end {
  background: #f0e9f0;
  padding: 30px;
  border-radius: 12px;
}
.workbook-end h2 {
  font-size: 1.55rem;
}
.study-list {
  list-style: none;
  margin: 24px 0;
  padding: 0;
}
.study-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: white;
  border: 1px solid #e1d8e1;
  border-radius: 8px;
  margin-bottom: 12px;
  text-decoration: none;
  gap: 20px;
}
.study-list small {
  display: block;
  color: #756978;
  font-size: 0.7rem;
}
.study-form {
  display: flex;
  gap: 12px;
  align-items: end;
}
.study-form > div {
  flex: 1;
}
.study-form label {
  display: block;
  font-size: 0.85rem;
  margin: 8px 0;
}
.certificate {
  text-align: center;
  background: white;
  border: double 5px #a78956;
  padding: 50px;
  margin: 36px 0;
}
.certificate h2 {
  font-size: 2.4rem;
}
.certificate .person {
  font-size: 2rem;
  font-family: Georgia, serif;
  border-bottom: 1px solid #dbccb5;
  padding: 20px;
}
.conflict {
  border: 2px solid #bd814d;
  background: #fff7e9;
  border-radius: 8px;
  padding: 18px;
  margin: 16px 0;
}
.conflict pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 0.85rem;
  max-height: 200px;
  overflow: auto;
}
.tools {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.tools a {
  font-size: 0.8rem;
}
.hidden,
[hidden] {
  display: none !important;
}
.print-answer {
  display: none;
}
body.print-certificate .header {
  position: static;
}
.no-wrap {
  white-space: nowrap;
}
@media (max-width: 900px) {
  .hero-grid {
    gap: 32px;
  }
  .hero-art {
    padding: 25px 25px 0;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workbook-layout {
    grid-template-columns: 1fr;
  }
  .workbook-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
  }
  .workbook-nav a {
    font-size: 0.73rem;
    padding: 8px;
  }
  .split {
    gap: 30px;
  }
  .header nav {
    gap: 12px;
  }
  .header .brand small {
    display: none;
  }
}
@media (max-width: 650px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .header .wrap {
    min-height: 78px;
    gap: 10px;
  }
  .brand {
    font-size: 0.9rem;
    gap: 8px;
  }
  .brand img {
    width: 33px;
    height: 33px;
  }
  .header nav {
    font-size: 0.7rem;
    gap: 8px;
  }
  .header nav > a:first-child {
    display: none;
  }
  .text-tools button {
    min-width: 38px;
  }
  .hero {
    padding: 38px 0;
  }
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    gap: 32px;
  }
  .hero-art {
    max-width: 320px;
    margin: auto;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero-copy > p:not(.eyebrow) {
    font-size: 1rem;
  }
  .band .wrap {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .section {
    padding: 42px 0;
  }
  .section-head {
    display: block;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 24px;
  }
  .card .number {
    margin-bottom: 14px;
  }
  .progress-panel {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .workbook-section {
    padding: 22px 18px;
  }
  .study-form {
    display: block;
  }
  .study-form button {
    margin-top: 14px;
    width: 100%;
  }
  .auth-card {
    padding: 25px 20px;
  }
  .page-top {
    padding-top: 30px;
  }
  .video {
    aspect-ratio: auto;
    min-height: 220px;
  }
  .video:has(iframe) {
    aspect-ratio: 16/9;
    min-height: 200px;
  }
  .certificate {
    padding: 26px 16px;
  }
  .certificate h2 {
    font-size: 1.7rem;
  }
  .study-list a {
    padding: 18px;
    overflow-wrap: anywhere;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
@media print {
  html {
    font-size: 12pt;
  }
  body {
    background: white;
  }
  .header,
  .footer,
  .breadcrumb,
  .actions,
  .workbook-nav,
  .video,
  .save-status,
  .help-bar,
  .workbook-end,
  .workbook-head button,
  .workbook-head a,
  #global-message,
  .no-print {
    display: none !important;
  }
  .wrap {
    width: 100%;
  }
  .workbook-layout {
    display: block;
  }
  .workbook-section {
    border: 0;
    padding: 0;
    break-inside: auto;
  }
  .workbook-subsection {
    display: block;
    border: 0;
    box-shadow: none;
  }
  .workbook-subsection > summary {
    display: none;
  }
  .workbook-subsection > .workbook-section {
    display: block !important;
  }
  .field textarea,
  .field input {
    display: none;
  }
  .print-answer {
    display: block;
    white-space: pre-wrap;
    border-bottom: 1px solid #aaa;
    min-height: 45px;
    padding: 8px 0;
  }
  .field,
  .callout,
  .check,
  .exercise-row {
    break-inside: avoid;
  }
  .certificate {
    break-inside: avoid;
  }
  .print-certificate main > *:not(.certificate) {
    display: none !important;
  }
}
@media print {
  body.certificate-only > * {
    display: none !important;
  }
  body.certificate-only > #certificate-print {
    display: block !important;
    margin: 40px;
  }
}

/* Keep the course artwork inside a clean, even frame on every screen size. */
.hero-art {
  background: #e9dfd0;
  border: 1px solid #d9c9b5;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 18px 45px #35213826;
}
.hero-art img {
  border-radius: 10px;
  box-shadow: none;
}

/* Signed-in account controls must remain easy to find, especially after using the wrong account. */
.header-signout,
.account-signout {
  border: 0;
  background: transparent;
  color: #583463;
  padding: 8px 2px;
  min-height: 44px;
  font: inherit;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.account-row {
  margin: 0 0 22px;
}
.account-row p {
  margin-bottom: 4px;
}
.account-signout {
  text-align: left;
  padding: 4px 0;
  font-weight: 650;
}
@media (max-width: 650px) {
  .hero-art {
    max-width: 360px;
    padding: 10px;
    border-radius: 16px;
  }
  .hero-art img {
    border-radius: 8px;
  }
  .header-signout {
    font-size: 0.7rem;
    white-space: nowrap;
  }
}
/* Keep the full 40-step reading-size range usable on narrow screens. */
.brand,
.header nav,
.progress-panel > *,
.card-status > * {
  min-width: 0;
}
h1,
h2,
h3,
.button,
.brand,
.help-bar {
  overflow-wrap: anywhere;
}
@media (max-width: 650px) {
  .header .wrap {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .header nav {
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .card-status {
    flex-wrap: wrap;
  }
  .progress-panel .button {
    max-width: 100%;
  }
  .certificate .person {
    overflow-wrap: anywhere;
  }
}

.store-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 18px;
  overscroll-behavior-x: contain;
}
.store-card {
  flex: 0 0 calc((100% - 44px) / 3);
  min-width: 0;
  scroll-snap-align: start;
  background: white;
  border: 1px solid #e4dfe2;
  border-radius: 12px;
  overflow: hidden;
}
.store-card > a {
  display: block;
  text-decoration: none;
  padding: 18px;
  color: #43274a;
}
.store-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f6f4f1;
  border-radius: 8px;
}
.store-card h3 {
  font-size: 1.1rem;
  margin: 20px 0 12px;
}
.store-card span {
  font-size: 0.76rem;
  text-decoration: underline;
}
.store-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.store-controls p {
  margin: 0;
  text-align: center;
}
@media (max-width: 900px) {
  .store-card {
    flex-basis: calc((100% - 22px) / 2);
  }
}
@media (max-width: 650px) {
  .store-card {
    flex-basis: 85%;
  }
  .store-controls p {
    display: none;
  }
  .store-section .section-head {
    align-items: start;
  }
  .store-controls .button {
    font-size: 0.75rem;
  }
}
@media print {
  .store-section {
    display: none;
  }
}

.purchase-prices {
  white-space: nowrap;
}
.purchase-prices s {
  opacity: 0.8;
  text-decoration-thickness: 2px;
  margin-right: 0.3em;
}
.hero-copy > p.offer-note,
.offer-note {
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 0.6rem 0 1rem;
  color: #6f666f;
}
.offer-note strong {
  color: #5a2234;
  font-weight: 800;
}
.dashboard-program-link {
  justify-content: center;
  margin: 42px 0 10px;
}

.coaching-invite {
  margin: 40px 0 10px;
  padding: clamp(24px, 5vw, 52px);
  border-radius: 14px;
  background: #43274a;
  color: #f5eef4;
}
.coaching-invite .eyebrow {
  color: #e3c184;
}
.coaching-invite h2 {
  color: #fff;
  max-width: 850px;
}
.coaching-invite > p {
  max-width: 850px;
}
.coaching-invite .button {
  margin-top: 10px;
}
.coaching-invite .coaching-note {
  font-size: 0.75rem;
  margin-bottom: 0;
  color: #e4d8e5;
}
.footer-signout {
  border: 0;
  background: transparent;
  color: #583463;
  padding: 0;
  min-height: 44px;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer #footer-account {
  white-space: nowrap;
}

.footer .standard-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.standard-footer > :last-child { text-align: right; }
.footer-members { font-weight: 650; text-align: center; }
@media (max-width: 700px) {
  .footer .standard-footer { grid-template-columns: 1fr; text-align: center; gap: 14px; }
  .standard-footer > :last-child { text-align: center; }
}

.lesson-workbook { margin: 38px 0; border: 1px solid #d8cad8; border-radius: 16px; background: #f7f1f7; overflow: hidden; box-shadow: 0 14px 34px rgba(49,30,51,.08); }
.lesson-workbook > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; cursor: pointer; color: #311e33; font: 500 1.45rem/1.25 Georgia,serif; }
.lesson-workbook > summary::-webkit-details-marker { display: none; }
.lesson-workbook > summary .eyebrow { display: block; margin: 0 0 5px; }
.workbook-toggle { display: grid; place-items: center; width: 42px; height: 42px; min-width: 42px; border-radius: 50%; background: #43274a; color: #fff; font: 1.25rem/1 system-ui,sans-serif; }
.lesson-workbook-body { padding: 0 28px 30px; background: #faf8f3; border-top: 1px solid #e2d8e2; }
.lesson-workbook .workbook-head { margin-top: 30px; }
.coaching-invite { display: grid; grid-template-columns: minmax(180px,300px) minmax(0,1fr); gap: clamp(28px,5vw,58px); align-items: center; background: linear-gradient(135deg,#311e33 0%,#4a2a58 62%,#16233c 100%); border: 1px solid rgba(238,189,74,.48); box-shadow: 0 20px 48px rgba(49,30,51,.22); }
.coaching-photo { display: block; width: 280px; height: 280px; justify-self: center; object-fit: cover; border-radius: 50%; border: 6px solid #eebd4a; box-shadow: 0 0 0 10px rgba(238,189,74,.12); }
.coaching-copy p { max-width: 820px; margin: 0 0 1.25rem; line-height: 1.75; }
.coaching-copy h2 { margin-bottom: 1rem; }
.coaching-action { margin: 1.65rem 0 1.2rem; }
.coaching-invite .button { box-shadow: 0 8px 24px rgba(0,0,0,.2); }
@media (max-width:760px) { .lesson-workbook > summary { padding: 20px; font-size: 1.25rem; } .lesson-workbook-body { padding: 0 16px 22px; } .coaching-invite { grid-template-columns: 1fr; text-align: center; } .coaching-photo { width: 210px; height: 210px; max-width: 70vw; margin: auto; } .coaching-copy p { margin-bottom: 1.15rem; } .coaching-invite .button { width: 100%; } }
@media print { .lesson-workbook { display: block; border: 0; box-shadow: none; } .lesson-workbook > summary { display: none; } .lesson-workbook-body { display: block !important; padding: 0; border: 0; } .coaching-invite { display: none !important; } }
/* Matching typography for lesson panels; preserve their colors and layout. */
body[data-page="lesson"] .lesson-workbook > summary,
body[data-page="lesson"] .lesson-quiz > summary,
body[data-page="lesson"] .workbook-end h2 {
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: normal;
}
body[data-page="lesson"] .lesson-workbook > summary .eyebrow,
body[data-page="lesson"] .lesson-quiz > summary .eyebrow {
  font-family: Georgia, serif;
  font-size: .68rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: .18em;
}
@media (max-width: 760px) {
  body[data-page="lesson"] .lesson-workbook > summary,
  body[data-page="lesson"] .lesson-quiz > summary,
  body[data-page="lesson"] .workbook-end h2 {
    font-size: 1.25rem;
  }
}
/* Align the two account links with identical text and touch-target metrics. */
.header nav #account-link,
.header nav .header-signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 8px 2px;
  border: 0;
  font: inherit;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  white-space: nowrap;
}
/* Comfortable, consistent lesson reading and navigation. */
body[data-page="lesson"] .app-content { max-width: 1060px; }
body[data-page="lesson"] .lesson-heading { max-width: 850px; }
body[data-page="lesson"] .lesson-heading > .muted { color: #544b54; }
body[data-page="lesson"] .lesson-navigation {
  display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px;
}
body[data-page="lesson"] .lesson-navigation a {
  display: inline-flex; align-items: center; min-height: 48px;
  font-size: .95rem; font-weight: 600;
}
body[data-page="lesson"] .lesson-workbook,
body[data-page="lesson"] .lesson-quiz {
  margin: 28px 0; border-radius: 16px;
  box-shadow: 0 8px 24px #311e330a;
}
body[data-page="lesson"] .lesson-workbook > summary,
body[data-page="lesson"] .lesson-quiz > summary {
  padding: 24px; gap: 20px;
}
body[data-page="lesson"] .panel-hint {
  display: block; margin-top: 8px;
  font: 400 .85rem/1.5 system-ui, sans-serif;
  letter-spacing: normal; text-transform: none;
}
body[data-page="lesson"] .lesson-workbook .panel-hint { color: #58455e; }
body[data-page="lesson"] .lesson-quiz .panel-hint,
body[data-page="lesson"] .workbook-subsection .panel-hint { color: #fff; }
body[data-page="lesson"] .workbook-toggle,
body[data-page="lesson"] .quiz-toggle,
body[data-page="lesson"] .subsection-toggle {
  width: 44px; height: 44px; min-width: 44px;
}
body[data-page="lesson"] .workbook-section { padding: clamp(20px, 4vw, 36px); }
body[data-page="lesson"] .workbook-section p,
body[data-page="lesson"] .field label,
body[data-page="lesson"] .field textarea,
body[data-page="lesson"] .lesson-quiz legend,
body[data-page="lesson"] .lesson-quiz .choice-copy {
  font-family: system-ui, sans-serif; font-size: 1rem; line-height: 1.7;
}
body[data-page="lesson"] .workbook-section p { max-width: 68ch; margin-bottom: 1.2em; }
body[data-page="lesson"] .field { margin: 26px 0; }
body[data-page="lesson"] .field label { display: block; margin-bottom: 12px; color: #302b32; }
body[data-page="lesson"] .field textarea {
  background: #fff; border: 1px solid #a495a7; border-radius: 10px;
  padding: 16px; min-height: 140px;
}
body[data-page="lesson"] .lesson-workbook-body > .small,
body[data-page="lesson"] .save-status,
body[data-page="lesson"] .help-bar,
body[data-page="lesson"] .coaching-copy p { font-size: .95rem; line-height: 1.7; }
body[data-page="lesson"] .save-status { color: #25594b; }
body[data-page="lesson"] .save-status.unsaved { color: #7c2538; }
body[data-page="lesson"] .lesson-quiz fieldset { margin-bottom: 32px; padding-bottom: 26px; min-width: 0; }
body[data-page="lesson"] .lesson-quiz legend { font-weight: 650; margin-bottom: 18px; }
body[data-page="lesson"] .lesson-quiz fieldset label {
  min-height: 56px; padding: 16px; margin: 10px 0;
  border: 1px solid #d1c4cf; border-radius: 10px;
  background: #fff; gap: 14px;
}
body[data-page="lesson"] .lesson-quiz fieldset label:has(input:checked) {
  border-color: #5a2234; box-shadow: inset 0 0 0 1px #5a2234;
}
body[data-page="lesson"] .lesson-quiz fieldset label.correct-choice {
  background: #eaf5f1; border-color: #347c68; box-shadow: inset 0 0 0 1px #347c68;
}
body[data-page="lesson"] .lesson-quiz fieldset label.selected-incorrect {
  background: #fff0f1; border-color: #b42333;
}
body[data-page="lesson"] .lesson-quiz input { width: 26px; height: 26px; min-width: 26px; margin-top: 4px; }
body[data-page="lesson"] .choice-feedback { font-size: .85rem; }
body[data-page="lesson"] .button {
  min-height: 52px; padding: 14px 22px; font-size: .95rem; line-height: 1.5; border-radius: 10px;
}
body[data-page="lesson"] .workbook-end { padding: 28px; margin-top: 28px; }
body[data-page="lesson"] .workbook-end .actions { align-items: flex-start; flex-direction: column; gap: 18px; }
body[data-page="lesson"] .next-lesson-note { font-size: .95rem; color: #58455e; margin-bottom: 24px; }
body[data-page="lesson"] .workbook-end .check { font-size: .95rem; font-weight: 400; }
body[data-page="lesson"] .coaching-invite {
  grid-template-columns: 140px minmax(0, 1fr); padding: 28px;
  box-shadow: none;
}
body[data-page="lesson"] .coaching-photo { width: 140px; height: 140px; min-width: 0; }
body[data-page="lesson"] .coaching-copy h2 { font-size: 1.45rem; }
body[data-page="lesson"] .coaching-copy p { max-width: 65ch; margin-bottom: 1.1em; }
@media (max-width: 760px) {
  body[data-page="lesson"] .lesson-workbook > summary,
  body[data-page="lesson"] .lesson-quiz > summary { padding: 20px; }
  body[data-page="lesson"] .coaching-invite { grid-template-columns: 1fr; }
  body[data-page="lesson"] .coaching-photo { margin: auto; }
  body[data-page="lesson"] .workbook-end { padding: 22px; }
}
@media print {
  body[data-page="lesson"] .panel-hint,
  body[data-page="lesson"] .lesson-navigation { display: none !important; }
}
.completion-study-lab {
  scroll-margin-top: 120px;
  border-top: 1px solid #d8cad8;
  margin-top: 40px;
}
.completion-study-lab .study-form { flex-wrap: wrap; }
.completion-study-lab .study-form > div { min-width: 0; }
.saved-study { border: 1px solid #d8cad8; border-radius: 14px; background: #fff; margin-bottom: 18px; overflow: hidden; overflow-anchor: none; }
.saved-study > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; cursor: pointer; color: #43274a; font-size: 1.1rem; }
.saved-study > summary::-webkit-details-marker { display: none; }
.saved-study > summary small { display: block; font-size: .85rem; color: #706970; margin-top: 6px; }
.saved-study > summary:focus-visible { outline: 3px solid #8c713e; outline-offset: -4px; }
.study-toggle { font-size: 1.5rem; flex-shrink: 0; }
.study-editor { padding: 0 24px 24px; }
.study-actions { margin-bottom: 30px; }
.certificate {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #311e33;
  background: radial-gradient(ellipse at center, #fffdf7 20%, #f3e8d0 100%);
  border: 10px solid #311e33;
  outline: 1px solid #b28a37;
  outline-offset: 4px;
  padding: 48px 54px 34px;
  box-shadow: inset 0 0 0 3px #eebd4a, inset 0 0 0 9px #faf6ee, inset 0 0 0 10px #b28a37, 0 20px 50px #311e3326;
}
.certificate::before { content: ""; position: absolute; inset: 20px; border: 1px solid #b28a3780; pointer-events: none; }
.certificate-content { position: relative; }
.certificate-corner { position: absolute; width: 70px; height: 70px; border: double 5px #b28a37; transform: rotate(45deg); background: #311e33; box-shadow: 0 0 0 4px #eebd4a55; }
.corner-tl { top: -38px; left: -38px; }
.corner-tr { top: -38px; right: -38px; }
.corner-bl { bottom: -38px; left: -38px; }
.corner-br { bottom: -38px; right: -38px; }
.certificate-logo { display: block; width: 88px; height: 88px; object-fit: contain; margin: 0 auto 10px; }
.certificate .certificate-brand { font-size: .65rem; font-weight: 700; letter-spacing: .25em; margin: 0; color: #705222; }
.certificate-flourish { display: flex; align-items: center; justify-content: center; gap: 14px; color: #a67a26; margin: 16px auto; max-width: 310px; font-size: 16px; }
.certificate-flourish::before, .certificate-flourish::after { content: ""; height: 4px; border-top: 1px solid #b28a37; border-bottom: 1px solid #b28a37; flex: 1; }
.certificate .certificate-title { font: 500 clamp(2rem, 4vw, 3.3rem)/1.1 Georgia, serif; margin: 12px 0 24px; }
.certificate-title em { display: block; font-size: .55em; margin-top: 8px; font-weight: 400; color: #705222; }
.certificate .certificate-presented { font-size: .62rem; letter-spacing: .2em; margin: 12px 0 0; }
.certificate .person { font: italic 500 clamp(1.7rem, 4vw, 2.7rem)/1.2 Georgia, serif; overflow-wrap: anywhere; padding: 16px 0 18px; margin: 0 auto 20px; max-width: 700px; border-bottom: double 3px #b28a37; }
.certificate .certificate-recognition { font-size: .8rem; margin: 12px 0 4px; }
.certificate .certificate-course { font: 600 clamp(1.7rem, 3vw, 2.3rem)/1.2 Georgia, serif; margin: 8px 0 16px; }
.certificate .certificate-dedication { font: italic .85rem/1.6 Georgia, serif; color: #5c4b50; margin: 0; }
.certificate-footer { display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; gap: 24px; max-width: 700px; margin: 30px auto 20px; }
.certificate-host p, .certificate-motto p { font: italic 1rem/1.35 Georgia, serif; margin: 0 0 8px; }
.certificate-host, .certificate-motto { position: relative; align-self: start; margin-top: 58px; padding-top: 12px; border-top: 1px solid #b28a37; }
.certificate-signature { position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); width: 180px; max-width: 100%; height: 54px; object-fit: contain; mix-blend-mode: multiply; }
.certificate-host span, .certificate-motto span { font-size: .5rem; letter-spacing: .12em; }
.certificate-seal { width: 114px; height: 114px; border: double 5px #eebd4a; border-radius: 50%; background: #311e33; color: #f3e8d0; display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: 0 0 0 3px #b28a37; }
.certificate-seal > span { font-size: 13px; color: #eebd4a; line-height: 1; }
.certificate-seal strong { font: 30px/1.1 Georgia, serif; }
.certificate-seal small { font-size: 9px; letter-spacing: .08em; line-height: 1.3; }
.certificate .certificate-methods { font-size: .58rem; color: #705222; line-height: 1.7; margin: 0; }
.certificate-name-editor { margin: -12px 0 24px; }
.certificate-name-editor summary { display: inline-block; cursor: pointer; font-size: .8rem; text-decoration: underline; text-underline-offset: 4px; padding: 10px 0; color: #43274a; }
.certificate-name-editor form { max-width: 650px; padding: 16px 0; }
.certificate-name-editor input { flex: 1; min-width: 0; width: 100%; }
@media (max-width: 600px) {
  .certificate { padding: 34px 22px 26px; border-width: 7px; }
  .certificate::before { inset: 13px; }
  .certificate-logo { width: 72px; height: 72px; }
  .certificate-footer { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .certificate-seal { grid-column: 1 / -1; grid-row: 1; margin: auto; }
  .certificate-host p, .certificate-motto p { font-size: .8rem; }
}
@page certificate-page { size: landscape; margin: 12mm; }
@media print {
  body.certificate-only { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body.certificate-only > #certificate-print { page: certificate-page; margin: 0; padding: 8mm 14mm; width: 100%; box-sizing: border-box; box-shadow: inset 0 0 0 3px #eebd4a, inset 0 0 0 9px #faf6ee, inset 0 0 0 10px #b28a37; }
  #certificate-print .certificate-logo { width: 52px; height: 52px; margin-bottom: 4px; }
  #certificate-print .certificate-flourish { margin: 8px auto; }
  #certificate-print .certificate-title { font-size: 32pt; margin: 8px 0 14px; }
  #certificate-print .person { font-size: 28pt; padding: 8px 0 12px; margin-bottom: 10px; }
  #certificate-print .certificate-footer { grid-template-columns: 1fr 100px 1fr; margin: 18px auto 12px; }
  #certificate-print .certificate-seal { grid-column: auto; grid-row: auto; width: 90px; height: 90px; }
  #certificate-print .certificate-course { font-size: 22pt; margin: 6px 0 10px; }
}
.completion-study-lab .workbook-section p,
.completion-study-lab .field label,
.completion-study-lab .field textarea { font-size: 1rem; line-height: 1.7; }
@media print {
  body.study-only #app > :not(#study-lab) { display: none !important; }
  body.study-only #study-lab { margin: 0; padding: 0; border: 0; }
  body.study-only #study-lab-content > :not(#saved-studies),
  body.study-only .saved-study:not(.printing-study) { display: none !important; }
  body.study-only .saved-study { border: 0; overflow: visible; }
  body.study-only .study-editor { padding: 0; }
}


/* Foil stickers sit in the upper quadrants without interrupting the award. */
.certificate-faith-seal {
  position: absolute; right: 0; top: 0; width: 130px; height: 130px;
  max-width: 27%; object-fit: contain; transform: rotate(12deg);
  filter: drop-shadow(2px 5px 3px #70522255);
}
.certificate-bonus {
  position: absolute; left: 0; top: 22px; width: 170px; max-width: 29%;
  box-sizing: border-box; padding: 12px 8px; margin: 0;
  transform: rotate(-11deg); color: #fff0be;
  background: linear-gradient(135deg,#211424,#57345d 42%,#311e33 65%,#65446a);
  border: 3px double #eebd4a; border-radius: 8px 2px 8px 2px;
  box-shadow: 0 3px 0 #9b762d, 3px 7px 9px #311e3333, inset 0 0 0 3px #311e33;
}
.certificate-bonus[hidden] { display: none; }
.certificate-bonus p {
  font: italic 600 clamp(.7rem, 2vw, 1.05rem)/1.3 "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  margin: 3px 0; color: #fff0be; text-shadow: 0 1px 1px #171418;
}
.certificate-bonus > span { display: block; font: 20px/1 Georgia,serif; color: #eebd4a; }
.certificate-bonus > span:last-child { transform: rotate(180deg); }
.certificate-footer { grid-template-columns: 1fr 1fr; column-gap: 80px; }
@media (max-width: 600px) {
  .certificate-faith-seal { width: 90px; height: 90px; top: 3px; }
  .certificate-bonus { top: 8px; padding: 6px 4px; }
  .certificate-bonus p { font-size: 12px; }
  .certificate-bonus > span { font-size: 14px; }
  .certificate-footer { column-gap: 20px; }
}
/* Physical dimensions and fixed type keep reading-size preferences out of print. */
@page certificate-page { size: 11in 8.5in; margin: .375in; }
@media print {
  html:has(body.certificate-only), body.certificate-only {
    margin: 0 !important; padding: 0 !important; width: auto; min-height: 0;
  }
  body.certificate-only > #certificate-print {
    page: certificate-page; width: 10in; height: 7.25in; max-width: none;
    margin: 0 auto !important; padding: 24px 48px; border-width: 8px;
    box-sizing: border-box; break-inside: avoid; break-after: avoid;
    font-size: 14px; line-height: 1.3;
  }
  #certificate-print .certificate-content { height: 100%; }
  #certificate-print .certificate-logo { width: 48px; height: 48px; margin: 0 auto 5px; }
  #certificate-print .certificate-brand { font-size: 10px; line-height: 14px; margin: 0; }
  #certificate-print .certificate-flourish { font-size: 14px; line-height: 16px; margin: 8px auto; }
  #certificate-print .certificate-title { font-size: 38px; line-height: 1.05; margin: 8px 0 12px; }
  #certificate-print .certificate-title em { margin-top: 5px; }
  #certificate-print .certificate-presented { font-size: 10px; line-height: 14px; margin: 8px 0 0; }
  #certificate-print .person { font-size: 30px; line-height: 1.15; padding: 10px 0 12px; margin: 0 auto 12px; }
  #certificate-print .certificate-recognition { font-size: 13px; line-height: 18px; margin: 6px 0 4px; }
  #certificate-print .certificate-course { font-size: 28px; line-height: 1.15; margin: 6px 0 10px; }
  #certificate-print .certificate-dedication { font-size: 15px; line-height: 1.5; margin: 0; }
  #certificate-print .certificate-footer { grid-template-columns: 1fr 1fr; gap: 80px; margin: 18px auto 16px; max-width: 650px; }
  #certificate-print .certificate-host, #certificate-print .certificate-motto { margin-top: 48px; padding-top: 10px; }
  #certificate-print .certificate-host p, #certificate-print .certificate-motto p { font-size: 16px; line-height: 1.3; margin: 0 0 6px; }
  #certificate-print .certificate-host span, #certificate-print .certificate-motto span { font-size: 9px; line-height: 12px; }
  #certificate-print .certificate-signature { height: 44px; width: 160px; }
  #certificate-print .certificate-methods { font-size: 10px; line-height: 1.5; margin: 0; }
  #certificate-print .certificate-bonus { top: 22px; width: 160px; max-width: none; padding: 10px 8px; }
  #certificate-print .certificate-bonus p { font-size: 18px; line-height: 1.2; margin: 3px 0; }
  #certificate-print .certificate-bonus > span { font-size: 20px; }
  #certificate-print .certificate-faith-seal { top: 6px; width: 125px; height: 125px; max-width: none; }
}

/* Ornamental frame with a generous inner mat. */
.certificate { padding: 66px 76px 56px; }
.certificate::before {
  inset: 6px; border: 0; z-index: -1;
  background: url("/assets/certificate-ornamental-frame.svg") center / 100% 100% no-repeat;
}
.certificate-content { max-width: 780px; margin-inline: auto; }
.certificate-corner { width: 92px; height: 92px; border-width: 7px; }
.corner-tl { top: -52px; left: -52px; }
.corner-tr { top: -52px; right: -52px; }
.corner-bl { bottom: -52px; left: -52px; }
.corner-br { bottom: -52px; right: -52px; }
.certificate .person { max-width: 620px; }
.certificate-footer { max-width: 600px; }
.certificate-bonus { left: 16px; top: 72px; }
.certificate-faith-seal { right: 16px; top: 62px; }
.certificate-signature { bottom: calc(100% - 10px); }
@media (max-width: 700px) {
  .certificate { padding: 54px 34px 48px; }
  .certificate-bonus { left: 3px; top: 28px; }
  .certificate-faith-seal { right: 3px; top: 24px; }
  .certificate .certificate-title { margin-top: 38px; }
}
@media print {
  body.certificate-only > #certificate-print { padding: 44px 76px 40px; }
  #certificate-print .certificate-content { max-width: 780px; }
  #certificate-print .person { max-width: 580px; }
  #certificate-print .certificate-title { margin-top: 8px; }
  #certificate-print .certificate-footer { max-width: 580px; gap: 70px; margin-bottom: 14px; }
  #certificate-print .certificate-bonus { left: 16px; top: 64px; width: 145px; }
  #certificate-print .certificate-faith-seal { right: 16px; top: 58px; width: 120px; height: 120px; }
  #certificate-print .certificate-signature { bottom: calc(100% - 9px); }
}

/* Reserve space for the lower frame at every reading size. */
@media screen {
  .certificate { padding-bottom: calc(90px + 3rem); }
}

/* A centered Letter portrait composition with a protected inner area. */
.certificate {
  box-sizing: border-box; width: 816px; max-width: 100%; min-height: 1056px;
  margin-inline: auto; padding: 112px 64px;
  display: flex; align-items: center; justify-content: center;
}
.certificate .certificate-content { width: 100%; height: auto; margin: 0; }
.certificate .certificate-logo { width: 64px; height: 64px; margin: 0 auto 10px; }
.certificate .certificate-brand { font-size: 11px; }
.certificate .certificate-title { font-size: 42px; margin: 14px 0 24px; }
.certificate .certificate-presented { font-size: 11px; }
.certificate .person { font-size: 36px; }
.certificate .certificate-recognition { font-size: 14px; }
.certificate .certificate-course { font-size: 32px; }
.certificate .certificate-dedication { font-size: 16px; }
.certificate .certificate-methods { font-size: 11px; }
.certificate .certificate-host p, .certificate .certificate-motto p { font-size: 17px; }
.certificate .certificate-host span, .certificate .certificate-motto span { font-size: 10px; }
.certificate .certificate-bonus { left: 0; top: 82px; width: 128px; }
.certificate .certificate-bonus p { font-size: 16px; }
.certificate .certificate-faith-seal { right: 0; top: 74px; width: 108px; height: 108px; }
.certificate .certificate-footer { gap: 40px; }
@media screen and (max-width: 600px) {
  .certificate { min-height: 0; padding: 105px 34px; }
  .certificate .certificate-title { font-size: 32px; margin-top: 100px; }
  .certificate .person { font-size: 28px; }
  .certificate .certificate-bonus { top: 78px; width: 100px; max-width: 36%; }
  .certificate .certificate-bonus p { font-size: 12px; }
  .certificate .certificate-faith-seal { top: 76px; width: 84px; height: 84px; max-width: 32%; }
  .certificate .certificate-footer { gap: 16px; }
}
@page certificate-page { size: 8.5in 11in; margin: .375in; }
@media print {
  body.certificate-only > #certificate-print {
    display: flex !important; align-items: center; justify-content: center;
    width: 7.75in; height: 10.25in; min-height: 0; padding: 90px 55px;
  }
  #certificate-print .certificate-content { height: auto; width: 100%; }
  #certificate-print .certificate-logo { width: 56px; height: 56px; }
  #certificate-print .certificate-title { margin-top: 12px; font-size: 38px; }
  #certificate-print .certificate-bonus { left: 0; top: 68px; width: 122px; }
  #certificate-print .certificate-bonus p { font-size: 15px; }
  #certificate-print .certificate-faith-seal { right: 0; top: 64px; width: 100px; height: 100px; }
  #certificate-print .certificate-footer { gap: 38px; }
}

.certificate::before { top: 6px; left: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }

/* Emphasize the brand and make the optional bonus endorsement discreet. */
.certificate .certificate-logo { width: 128px; height: 128px; }
.certificate .certificate-bonus { transform: rotate(-11deg) scale(.5); transform-origin: center; }
@media print {
  #certificate-print .certificate-logo { width: 112px; height: 112px; }
}

/* Move both award stickers one inch toward the center. */
.certificate .certificate-bonus { left: 1in; }
.certificate .certificate-faith-seal { right: 1in; }
@media screen and (max-width: 600px) {
  .certificate .certificate-bonus { left: 8%; }
  .certificate .certificate-faith-seal { right: 8%; }
}
@media print {
  #certificate-print .certificate-bonus { left: 1in; }
  #certificate-print .certificate-faith-seal { right: 1in; }
}

/* Quiz-earned completion: wait until visible, then give a gentle acknowledgement. */
.lesson-completion { align-items: flex-start; }
.lesson-completion input:disabled { cursor: default; opacity: 1; flex-shrink: 0; }
.lesson-completion[data-earned="true"] { color: #32694a; }
.lesson-status[data-completion-reveal="pending"],
.certificate-bonus[data-completion-reveal="pending"] { opacity: 0; }
[data-completion-reveal="done"] { animation: completion-arrival .6s ease-out both; }
.lesson-completion[data-completion-reveal="done"] input { animation: completion-check .45s ease-out; }
@keyframes completion-arrival {
  from { opacity: .15; translate: 0 5px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes completion-check {
  0% { scale: .85; }
  60% { scale: 1.15; }
  100% { scale: 1; }
}
@media (prefers-reduced-motion: reduce) {
  [data-completion-reveal="done"],
  .lesson-completion[data-completion-reveal="done"] input { animation: none; }
}
@media print {
  .certificate-bonus[data-completion-reveal] { opacity: 1; animation: none; translate: none; }
}
