:root {
  --guide-canvas: #f5f7f3;
  --guide-paper: #ffffff;
  --guide-warm: #fbfaf6;
  --guide-tint: #edf4f1;
  --guide-ink: #173230;
  --guide-text: #405654;
  --guide-muted: #617370;
  --guide-line: #d7e1dd;
  --guide-brand: #0b6c64;
  --guide-brand-dark: #084c47;
  --guide-gold: #a9823f;
  --guide-radius: 10px;
}

html {
  scroll-padding-top: 6.25rem;
}

body[data-page="about-course"] {
  --ink: var(--guide-ink);
  --ink-soft: var(--guide-text);
  --muted: var(--guide-muted);
  --teal: var(--guide-brand);
  --teal-dark: var(--guide-brand-dark);
  --teal-soft: var(--guide-tint);
  --surface: var(--guide-paper);
  --surface-soft: #f1f5f2;
  --line: var(--guide-line);
  --radius: var(--guide-radius);
  --max: 1180px;
  margin: 0;
  background: var(--guide-canvas);
  color: var(--guide-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-page="about-course"] .site-header {
  border-bottom: 1px solid var(--guide-line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: none;
}

body[data-page="about-course"] .header-inner {
  min-height: 74px;
}

body[data-page="about-course"] .brand-mark {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 8px;
  background: var(--guide-brand);
}

body[data-page="about-course"] .primary-nav a {
  border-radius: 999px;
  color: #294744;
  font-weight: 700;
  padding: 0.62rem 0.82rem;
}

body[data-page="about-course"] .primary-nav a[aria-current="page"] {
  background: var(--guide-tint);
  color: var(--guide-brand-dark);
}

body[data-page="about-course"] .primary-nav a.header-register {
  border-color: var(--guide-brand);
  background: var(--guide-brand);
  color: #fff;
}

body[data-page="about-course"] .primary-nav a.header-register:hover {
  border-color: var(--guide-brand-dark);
  background: var(--guide-brand-dark);
  color: #fff;
}

body[data-page="about-course"] main {
  overflow: clip;
}

body[data-page="about-course"] h1,
body[data-page="about-course"] h2,
body[data-page="about-course"] h3 {
  color: var(--guide-ink);
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-weight: 500;
}

body[data-page="about-course"] h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(3.25rem, 6vw, 5rem);
  letter-spacing: -0.05em;
  line-height: 0.96;
}

body[data-page="about-course"] h2 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(2.35rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

body[data-page="about-course"] .eyebrow {
  margin-bottom: 0.65rem;
  color: var(--guide-brand);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.guide-intro {
  max-width: 58rem;
  margin-inline: auto;
  padding-block: clamp(4.5rem, 8vw, 7rem) clamp(3.5rem, 6vw, 5rem);
}

.guide-intro__lead {
  max-width: 49rem;
  margin: 1.35rem 0 0;
  color: var(--guide-text);
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  line-height: 1.75;
}

.guide-intro__author {
  margin: 0.85rem 0 0;
  color: var(--guide-muted);
  font-size: 0.86rem;
}

.guide-intro__author strong {
  color: var(--guide-ink);
}

.guide-intro__links,
.guide-end {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-top: 1.6rem;
}

.guide-intro__links a,
.guide-end a,
.method-source a,
.exam-note a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.4rem;
  color: var(--guide-brand-dark);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.guide-intro__links a:hover,
.guide-end a:hover,
.method-source a:hover,
.exam-note a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.guide-index {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 4.4rem;
  border-block: 1px solid var(--guide-line);
}

.guide-index > span {
  margin-right: auto;
  color: var(--guide-muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-index a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  border-radius: 7px;
  color: var(--guide-text);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 0.72rem;
  text-decoration: none;
}

.guide-index a:hover {
  background: var(--guide-tint);
  color: var(--guide-brand-dark);
}

.guide-section {
  padding-block: clamp(4.5rem, 8vw, 7rem);
  scroll-margin-top: 5.5rem;
}

.guide-section--compact {
  padding-top: 0;
}

.guide-section--tinted,
.guide-section--exam {
  width: 100%;
  border-block: 1px solid var(--guide-line);
  background: var(--guide-tint);
}

.guide-section--exam {
  background: var(--guide-warm);
}

.guide-heading {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr);
  gap: 1.2rem;
  max-width: 58rem;
}

.guide-heading__number {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid #bfd4cf;
  border-radius: 8px;
  background: var(--guide-paper);
  color: var(--guide-brand-dark);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 700;
}

.guide-heading p:last-child {
  max-width: 45rem;
  margin: 0.85rem 0 0;
  color: var(--guide-text);
  line-height: 1.7;
}

.paper-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.paper-groups article {
  border: 1px solid var(--guide-line);
  border-radius: var(--guide-radius);
  background: var(--guide-paper);
  padding: 1.5rem;
}

.paper-groups__label {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  border-bottom: 1px solid var(--guide-line);
  padding-bottom: 1.1rem;
}

.paper-groups__label > span {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border-radius: 7px;
  background: var(--guide-tint);
  color: var(--guide-brand-dark);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.5rem;
}

.paper-groups__label strong,
.paper-groups__label small {
  display: block;
}

.paper-groups__label strong {
  color: var(--guide-ink);
  font-size: 0.88rem;
}

.paper-groups__label small {
  margin-top: 0.2rem;
  color: var(--guide-muted);
  font-size: 0.7rem;
}

.paper-groups ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0.55rem 0 0;
  list-style: none;
}

.paper-groups li {
  min-height: 2.9rem;
  border-bottom: 1px solid #e7ece9;
  color: var(--guide-text);
  font-size: 0.84rem;
  line-height: 1.45;
  padding: 0.75rem 0;
}

.paper-groups li:last-child {
  border-bottom: 0;
}

.module-contents {
  display: grid;
  grid-template-columns: minmax(15rem, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  border-top: 1px solid var(--guide-line);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.module-contents__intro h3,
.home-behaviour h3 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.module-contents__intro p,
.home-behaviour > div > p {
  margin: 0.75rem 0 0;
  color: var(--guide-text);
  font-size: 0.86rem;
  line-height: 1.65;
}

.module-contents dl,
.home-behaviour dl {
  margin: 0;
  border-top: 1px solid var(--guide-line);
}

.module-contents dl > div,
.home-behaviour dl > div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.38fr) minmax(0, 1fr);
  gap: 1.25rem;
  border-bottom: 1px solid var(--guide-line);
  padding: 1rem 0;
}

.module-contents dt,
.home-behaviour dt {
  color: var(--guide-ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.module-contents dd,
.home-behaviour dd {
  margin: 0;
  color: var(--guide-text);
  font-size: 0.82rem;
  line-height: 1.6;
}

.method-steps {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  border-top: 1px solid #c9d9d5;
  list-style: none;
}

.method-steps li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1.25rem;
  min-height: 8.75rem;
  align-items: start;
  border-bottom: 1px solid #c9d9d5;
  padding: 1.4rem 0;
}

.method-steps__number {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid #b9d0ca;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--guide-brand-dark);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.method-steps__place {
  color: var(--guide-brand);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.method-steps h3 {
  margin: 0.3rem 0 0.35rem;
  font-size: 1.55rem;
}

.method-steps p {
  max-width: 48rem;
  margin: 0;
  color: var(--guide-text);
  font-size: 0.86rem;
  line-height: 1.65;
}

.method-source {
  max-width: 54rem;
  margin: 1.4rem 0 0 4.75rem;
  color: var(--guide-muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.method-source a {
  display: inline;
  min-height: 0;
  font-size: inherit;
}

.due-flow {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  border-top: 1px solid var(--guide-line);
  list-style: none;
}

.due-flow li {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr);
  gap: 1.2rem;
  border-bottom: 1px solid var(--guide-line);
  padding: 1.35rem 0;
}

.due-flow li > span {
  color: var(--guide-gold);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.due-flow strong {
  display: block;
  color: var(--guide-ink);
  font-size: 0.9rem;
}

.due-flow p {
  margin: 0.3rem 0 0;
  color: var(--guide-text);
  font-size: 0.83rem;
  line-height: 1.6;
}

.important-rule {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1.25rem;
  max-width: 56rem;
  margin-top: 1.4rem;
  border-left: 3px solid var(--guide-brand);
  background: var(--guide-paper);
  padding: 1rem 1.15rem;
}

.important-rule strong {
  color: var(--guide-brand-dark);
  font-size: 0.82rem;
}

.important-rule p {
  margin: 0;
  color: var(--guide-text);
  font-size: 0.82rem;
  line-height: 1.55;
}

.home-behaviour {
  display: grid;
  grid-template-columns: minmax(15rem, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 6vw, 5rem);
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  border-top: 1px solid var(--guide-line);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.saved-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 2.5rem;
  border-block: 1px solid var(--guide-line);
}

.saved-grid > div {
  min-width: 0;
  padding: 1.25rem;
}

.saved-grid > div + div {
  border-left: 1px solid var(--guide-line);
}

.saved-grid strong {
  color: var(--guide-ink);
  font-size: 0.84rem;
}

.saved-grid p {
  margin: 0.45rem 0 0;
  color: var(--guide-text);
  font-size: 0.79rem;
  line-height: 1.6;
}

.exam-table-wrap {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  overflow-x: auto;
  border: 1px solid #dedfd8;
  border-radius: var(--guide-radius);
  background: var(--guide-paper);
}

.exam-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
}

.exam-table th,
.exam-table td {
  border-bottom: 1px solid #e1e3dc;
  padding: 1rem 1.15rem;
  text-align: left;
  vertical-align: top;
}

.exam-table tr:last-child th,
.exam-table tr:last-child td {
  border-bottom: 0;
}

.exam-table th {
  width: 12rem;
  color: var(--guide-ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.exam-table td {
  color: var(--guide-text);
  font-size: 0.82rem;
  line-height: 1.6;
}

.exam-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.2rem;
}

.exam-note p {
  max-width: 48rem;
  margin: 0;
  color: #6b6658;
  font-size: 0.76rem;
  line-height: 1.6;
}

.exam-note a {
  flex: 0 0 auto;
  font-size: 0.76rem;
}

.creator-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--guide-line);
  padding-top: clamp(2rem, 4vw, 3rem);
}

.creator-summary h3,
.creator-details h3,
.creator-contact h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.creator-summary p {
  margin: 0.85rem 0 0;
  color: var(--guide-text);
  font-size: 0.86rem;
  line-height: 1.7;
}

.creator-details h3 {
  font-size: 1.35rem;
}

.creator-credentials {
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--guide-line);
  list-style: none;
}

.creator-credentials li {
  position: relative;
  border-bottom: 1px solid var(--guide-line);
  color: var(--guide-text);
  font-size: 0.82rem;
  line-height: 1.55;
  padding: 0.9rem 0 0.9rem 1.25rem;
}

.creator-credentials li::before {
  position: absolute;
  top: 1.23rem;
  left: 0.1rem;
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid var(--guide-brand);
  border-radius: 50%;
  content: "";
}

.creator-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-block: 1px solid #c7d9d4;
  background: var(--guide-tint);
  padding: 1.35rem 1.5rem;
}

.creator-contact h3 {
  font-size: 1.25rem;
}

.creator-contact p {
  max-width: 46rem;
  margin: 0.45rem 0 0;
  color: var(--guide-text);
  font-size: 0.8rem;
  line-height: 1.6;
}

.creator-contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.25rem;
}

.creator-contact__links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.35rem;
  color: var(--guide-brand-dark);
  font-size: 0.79rem;
  font-weight: 700;
  text-decoration: none;
}

.creator-contact__links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.guide-end {
  margin-top: 0;
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
  border-bottom: 1px solid var(--guide-line);
  padding-block: 1.2rem;
}

body[data-page="about-course"] .site-footer {
  border-top: 1px solid var(--guide-line);
  background: #fff;
}

.about-footer {
  align-items: flex-start;
}

.about-footer > div {
  flex: 0 0 auto;
}

.about-footer > p {
  max-width: 42rem;
  margin: 0;
  line-height: 1.55;
  text-align: right;
}

.about-footer a {
  color: var(--guide-brand-dark);
  font-weight: 700;
}

@media (min-width: 780px) {
  .method-steps li > div {
    display: grid;
    grid-template-columns: minmax(10rem, 0.45fr) minmax(0, 1.55fr);
    column-gap: 2rem;
    align-items: start;
  }

  .method-steps__place {
    grid-column: 1;
  }

  .method-steps h3 {
    grid-column: 1;
  }

  .method-steps p {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 860px) {
  body[data-page="about-course"] .primary-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0.75rem;
    left: 0.75rem;
    display: none;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--guide-line);
    border-radius: 10px;
    background: #fff;
    padding: 0.65rem;
    box-shadow: 0 12px 34px rgba(18, 48, 46, 0.09);
  }

  body[data-page="about-course"] .primary-nav.is-open {
    display: flex;
  }

  body[data-page="about-course"] .primary-nav a {
    justify-content: flex-start;
    border-radius: 7px;
    padding-inline: 0.8rem;
  }

  body[data-page="about-course"] .primary-nav a.header-register {
    margin: 0.2rem 0 0;
    justify-content: center;
  }

  body[data-page="about-course"] .menu-toggle {
    display: block;
  }

  .guide-index {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .guide-index::-webkit-scrollbar {
    display: none;
  }

  .guide-index > span {
    display: none;
  }

  .guide-index a {
    flex: 0 0 auto;
  }

  .module-contents,
  .home-behaviour {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .exam-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .creator-layout,
  .creator-contact {
    grid-template-columns: 1fr;
  }

  .creator-contact__links {
    justify-content: flex-start;
  }

  .about-footer {
    flex-direction: column;
  }

  .about-footer > p {
    max-width: 55rem;
    text-align: left;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 5.25rem;
  }

  body[data-page="about-course"] .header-inner {
    width: calc(100% - 1.2rem);
    min-height: 68px;
  }

  body[data-page="about-course"] .brand-mark {
    width: 2.5rem;
    height: 2.5rem;
  }

  body[data-page="about-course"] .brand-copy strong {
    font-size: 0.91rem;
  }

  body[data-page="about-course"] .brand-copy small {
    display: none;
  }

  body[data-page="about-course"] .shell {
    width: min(calc(100% - 1.25rem), var(--max));
  }

  body[data-page="about-course"] h1 {
    font-size: clamp(2.9rem, 14vw, 3.7rem);
  }

  body[data-page="about-course"] h2 {
    font-size: clamp(2.15rem, 10vw, 2.75rem);
  }

  .guide-intro {
    padding-block: 3.75rem 3rem;
  }

  .guide-intro__lead {
    font-size: 1rem;
    line-height: 1.7;
  }

  .guide-intro__links {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .guide-index {
    width: 100%;
    padding-inline: 0.62rem;
  }

  .guide-section {
    padding-block: 4rem;
  }

  .guide-section--compact {
    padding-top: 0;
  }

  .guide-heading {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .guide-heading__number {
    width: 2.35rem;
    height: 2.35rem;
  }

  .paper-groups {
    grid-template-columns: 1fr;
    margin-top: 2.25rem;
  }

  .paper-groups article {
    padding: 1.15rem;
  }

  .module-contents {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
  }

  .module-contents dl > div,
  .home-behaviour dl > div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .method-steps {
    margin-top: 2.25rem;
  }

  .method-steps li {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 0.8rem;
    min-height: auto;
    padding: 1.2rem 0;
  }

  .method-steps__number {
    width: 2.2rem;
    height: 2.2rem;
  }

  .method-source {
    margin-left: 0;
  }

  .due-flow {
    margin-top: 2.25rem;
  }

  .due-flow li {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.65rem;
  }

  .important-rule {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .home-behaviour {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
  }

  .saved-grid {
    grid-template-columns: 1fr;
  }

  .saved-grid > div {
    padding-inline: 0;
  }

  .saved-grid > div + div {
    border-top: 1px solid var(--guide-line);
    border-left: 0;
  }

  .exam-table-wrap {
    margin-inline: -0.1rem;
  }

  .creator-contact {
    gap: 0.75rem;
    padding: 1.1rem;
  }

  .creator-contact__links {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .guide-end {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .about-footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body[data-page="about-course"] *,
  body[data-page="about-course"] *::before,
  body[data-page="about-course"] *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
