@font-face {
  font-family: RedCollar;
  src: url('/assets/fonts/Redcollar.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: TTCommons;
  src: url('/assets/fonts/TTCommons-Medium.woff2') format('woff2');
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fafafa;
  --ink: #0d0c0c;
  --muted: #626262;
  --brand-red: #f51b1b;
  --rule: #d8d8d8;
  --panel: #efefef;
  --heading: RedCollar, Arial, sans-serif;
  --text: TTCommons, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.42 var(--text);
  scroll-padding-top: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, dd, dl { margin: 0; }
a { color: inherit; text-underline-offset: .22em; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 5px; }
::selection { background: var(--brand-red); color: white; }
h1, h2, h3 { font-family: var(--heading); font-weight: 400; line-height: 1.12; }
h1 { font-size: clamp(2.2rem, 5.05vw, 4rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.8rem, 3.95vw, 3rem); letter-spacing: -.038em; }
h3 { font-size: clamp(1.14rem, 2vw, 1.42rem); letter-spacing: -.02em; }

.shell {
  width: min(100% - 2 * clamp(16px, 5vw, 56px), 1180px);
  margin-inline: auto;
}

.skip-link { position: absolute; z-index: 10; top: 10px; left: 10px; padding: 10px 14px; background: white; }
.skip-link:not(:focus) { clip-path: inset(50%); }

.course-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.course-header a, .course-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.course-header nav { display: flex; gap: clamp(12px, 3vw, 30px); }
.course-header nav a { text-decoration: none; }
.course-header nav a:hover { text-decoration: underline; }
.course-brand { gap: 8px; font: 400 .83rem/1.2 var(--heading); text-decoration: none; white-space: nowrap; }
.brand-dots { display: inline-flex; gap: 3px; }
.brand-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-red); }

.course-hero { padding-block: clamp(36px, 6vw, 85px) clamp(22px, 4vw, 50px); background: var(--ink); color: var(--paper); }
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(22px, 4vw, 60px);
  row-gap: clamp(24px, 4vw, 52px);
  align-items: center;
}
.hero-copy { min-width: 0; }
.course-format { margin-bottom: 14px; color: #cfcfcf; font-size: .9rem; }
.course-lead { margin-top: 20px; max-width: 35ch; color: #e2e2e2; font-size: clamp(1.1rem, 1.9vw, 1.4rem); line-height: 1.3; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; }
.course-button, .course-text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 46px; }
.course-button {
  justify-content: center;
  padding: 10px 18px;
  background: var(--brand-red);
  color: white;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
}
.course-button:hover { background: #d90000; }
.course-button:focus-visible { outline-color: currentColor; }
.course-text-link span { display: inline-block; text-decoration: none; }
.hero-actions .course-text-link { color: var(--paper); text-decoration-color: #aaa; }

.course-cover, .role-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.course-cover { aspect-ratio: 16 / 10; background: #222; object-position: 56% center; }
.role-photo { aspect-ratio: 16 / 10; background: var(--panel); }
.course-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 8px; }
.course-facts > div {
  display: grid;
  grid-template-columns: minmax(55px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
  padding: clamp(13px, 2.5vw, 24px);
  background: var(--paper);
  color: var(--ink);
}
.course-facts dt { white-space: nowrap; font: 400 clamp(1.65rem, 3.5vw, 2.75rem)/1 var(--heading); letter-spacing: -.035em; }
.course-facts strong { display: block; font-size: 1.13rem; font-weight: 700; line-height: 1.1; }
.course-facts p { margin-top: 4px; color: var(--muted); font-size: .91rem; line-height: 1.22; }

.course-section { margin-block: clamp(54px, 8vw, 105px); }
.course-role { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 26px clamp(26px, 6vw, 80px); align-items: center; }
.course-role p { margin-top: 16px; color: var(--muted); font-size: clamp(1.06rem, 1.65vw, 1.26rem); }
.course-outcomes, .course-faq { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); gap: 22px clamp(26px, 6vw, 80px); }
.course-outcome { border-bottom: 1px solid var(--rule); }
.course-outcome:first-child { border-top: 1px solid var(--rule); }
.course-outcome[open] { background: var(--panel); }
.course-outcome summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  min-height: 62px;
  list-style: none;
  cursor: pointer;
  font: 400 clamp(1rem, 2.1vw, 1.25rem)/1.24 var(--heading);
}
.disclosure-copy { padding: 0 18px 19px; color: var(--muted); }
.outcome-result { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--brand-red); background: var(--paper); color: var(--ink); }
.outcome-result dt { font-weight: 700; }
.outcome-result dd { margin-top: 2px; }
.course-offer-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  align-items: center;
  gap: 20px 35px;
  padding: clamp(22px, 4vw, 44px);
  background: var(--ink);
  color: white;
}
.course-offer-summary h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.course-offer-summary p { margin-top: 9px; color: #dedede; max-width: 48ch; }
.offer-summary-action { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 20px; }
.offer-summary-action .course-price-current { font: 400 1.4rem/1.15 var(--heading); }
.offer-summary-action .course-price-meta { margin-bottom: 5px; color: #dedede; font-size: .87rem; }
.offer-summary-action .course-price-discount { margin-left: 9px; color: white; }
.offer-summary-action .course-price-base-label { display: none; }

.practice-header { display: flex; justify-content: space-between; align-items: end; gap: 14px; }
.practice-controls { display: flex; gap: 6px; }
.practice-controls[hidden] { display: none; }
.practice-controls button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}
.practice-controls button:disabled { opacity: .45; cursor: default; }
.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  margin: clamp(20px, 4vw, 32px) 0 0;
  list-style: none;
}
.practice-grid > li { display: flex; flex-direction: column; padding: clamp(16px, 2.7vw, 26px); background: var(--panel); }
.practice-copy p { margin-top: 7px; color: var(--muted); }
.practice-result {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 16px 0 0;
  background: var(--paper);
  border: 1px solid var(--rule);
}
.practice-result figcaption { padding: 12px 14px; }
.practice-result figcaption small { display: block; margin-bottom: 4px; color: var(--muted); }
.practice-result figcaption strong { display: block; line-height: 1.2; }
.practice-result dl { display: grid; gap: 1px; margin: auto 0 0; padding: 0 14px 12px; }
.practice-result dl > div { padding: 9px 0; border-top: 1px solid var(--rule); }
.practice-result dd { margin-top: 1px; color: var(--ink); font: 400 clamp(1.08rem, 2.3vw, 1.58rem)/1.2 var(--heading); }
.practice-photo { order: -1; display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }

.course-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .86fr);
  gap: 22px clamp(28px, 5vw, 60px);
  padding: clamp(20px, 4vw, 48px);
  background: var(--panel);
}
.course-project .project-label { display: block; margin-bottom: 12px; color: var(--muted); }
.course-project h2 + p { margin-top: 13px; color: var(--muted); }
.project-document {
  align-self: start;
  padding: clamp(14px, 2.4vw, 24px);
  background: var(--paper);
  border-top: 4px solid var(--brand-red);
  box-shadow: 0 0 0 1px var(--rule);
}
.project-document > p { margin-bottom: 14px; font-weight: 700; }
.project-document > div + div { margin-top: 15px; }
.project-document h3 { font: 700 .92rem/1.25 var(--text); }
.project-document ol { margin: 5px 0 0; padding-left: 1.35em; color: var(--muted); }
.project-document li + li { margin-top: 3px; }
.course-project-link { margin-top: 20px; }
.course-study ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
  counter-reset: study-step;
}
.course-study li { padding: 14px 0 0; border-top: 2px solid var(--ink); counter-increment: study-step; }
.course-study li::before {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  content: counter(study-step, decimal-leading-zero);
}
.course-study p { margin-top: 8px; color: var(--muted); }

.study-example {
  margin-top: clamp(25px, 5vw, 46px);
  padding: clamp(17px, 3.5vw, 30px);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brand-red);
  background: white;
}
.study-example > p { max-width: 64ch; }
.study-example details { margin-top: 12px; }
.study-example summary { width: fit-content; min-height: 44px; padding: 10px 0; color: var(--ink); text-decoration: underline; cursor: pointer; }
.study-example details p { margin-block: 0 8px; max-width: 64ch; }


.course-program { background: var(--panel); padding-block: clamp(42px, 7vw, 88px); }
.program-facts { display: flex; flex-wrap: wrap; gap: 5px 16px; margin: 12px 0 0; padding: 0; list-style: none; }
.program-facts li { white-space: nowrap; }
.program-facts strong { color: var(--ink); }
.stage-navigation { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-block: 17px 25px; }
.stage-navigation a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; border: 1px solid var(--rule); background: var(--paper); }
.program-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.55fr); gap: 16px 44px; margin-top: 30px; }
.stage-title { padding-top: 15px; border-top: 2px solid var(--ink); }
.stage-title p { margin-top: 8px; color: var(--muted); }
.stage-modules { display: grid; align-content: start; min-width: 0; }
.course-module { background: var(--paper); border-bottom: 1px solid var(--rule); }
.course-module:first-child { border-top: 1px solid var(--rule); }
.course-module[open] { background: white; box-shadow: inset 3px 0 var(--brand-red); }
.course-module summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(12px, 2vw, 25px);
  padding: 16px clamp(14px, 2.5vw, 26px);
  min-height: 62px;
  list-style: none;
  cursor: pointer;
}
:is(.course-module, .course-outcome) summary::-webkit-details-marker { display: none; }
:is(.course-module, .course-outcome) summary:hover { background: #e8e8e8; }
:is(.course-module, .course-outcome) summary:focus-visible { outline-offset: -4px; }
.module-label { display: grid; gap: 5px; line-height: 1.25; }
.module-label strong { font: 400 clamp(1rem, 2.1vw, 1.18rem)/1.24 var(--heading); }
.module-label > span { color: var(--muted); font-size: .92rem; }
.module-sign { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #c5c5c5; border-radius: 50%; }
.module-sign::before, .module-sign::after { grid-area: 1 / 1; width: 11px; height: 1px; background: var(--ink); content: ''; }
.module-sign::after { transform: rotate(90deg); }
details[open] > summary .module-sign::after { display: none; }
.module-topics { margin: 0; padding: 3px clamp(16px, 3vw, 32px) 20px clamp(38px, 5vw, 55px); color: var(--muted); }
.module-topics li + li { margin-top: 5px; }
.module-topics li::marker { color: var(--ink); }

.course-enroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .88fr);
  gap: 10px;
}
.enroll-offer, .enroll-actions { min-width: 0; padding: clamp(20px, 3.9vw, 44px); }
.enroll-offer { background: var(--ink); color: white; }
.enroll-offer h2 { max-width: 16ch; }
.enroll-offer p { margin-top: 8px; color: #dedede; }
.enroll-offer .purchase-details { margin-top: 13px; }
.enroll-price { margin-top: clamp(16px, 3vw, 24px); }
.enroll-price .course-price-current { color: white; font: 400 clamp(1.9rem, 3.5vw, 2.65rem)/1.1 var(--heading); }
.enroll-price .course-price-meta { margin-bottom: 7px; color: #dedede; font-size: .9rem; }
.enroll-price .course-price-base-label { margin-right: 7px; }
.enroll-price .course-price-discount { margin-left: 10px; color: white; }
.enroll-actions { display: grid; justify-items: start; align-content: center; gap: 12px; background: var(--panel); }
.enroll-actions .checkout-hint { max-width: 40ch; color: var(--muted); }
.enroll-actions .course-purchase { margin-top: 2px; }
.enroll-actions .course-purchase:focus-visible { outline-color: var(--ink); }
.enroll-links { display: flex; flex-wrap: wrap; gap: 0 16px; }
.enroll-links a { display: inline-flex; align-items: center; min-height: 44px; }

.course-footer { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: clamp(44px, 6vw, 72px); padding-block: 14px 26px; border-top: 1px solid var(--rule); color: var(--muted); }
.photo-credit { flex-basis: 100%; font-size: .85rem; }
.photo-credit a { min-height: 32px; }
.course-dock { display: none; }
.course-dock[hidden], [data-dock-price][hidden], .course-purchase[hidden] { display: none; }

@media (max-width: 800px) {
  :root { scroll-padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  h1 { font-size: clamp(1.96rem, 10.5vw, 4rem); }
  .course-header { min-height: 60px; }
  .hero-layout, .course-role, .course-outcomes, .course-faq { grid-template-columns: minmax(0, 1fr); }
  .hero-layout { row-gap: 18px; }
  .course-hero { padding-top: 31px; }
  .course-format { margin-bottom: 11px; }
  .course-lead { margin-top: 15px; }
  .hero-actions { margin-top: 10px; }
  .hero-actions .course-cta { display: none; }
  .course-cover { aspect-ratio: 4 / 3; }
  .course-facts { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .course-facts > div { grid-template-columns: minmax(54px, max-content) minmax(0, 1fr); gap: 12px; }
  .course-role { gap: 18px; }
  .program-stage { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 24px; }
  .stage-title { padding-top: 10px; }
  .course-enroll, .course-study ol, .course-offer-summary, .course-project {
    grid-template-columns: minmax(0, 1fr);
  }
  .practice-grid { grid-template-columns: minmax(0, 1fr); }
  .practice-grid:has(> li + li) {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .practice-grid > li { scroll-snap-align: start; }
  .course-study ol { gap: 17px; }
  .course-footer { padding-bottom: calc(98px + env(safe-area-inset-bottom)); }
  .course-dock {
    position: fixed;
    inset: auto 0 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 9px max(16px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    border-top: 1px solid var(--rule);
    background: var(--paper);
  }
  .dock-price { font: 400 1.02rem/1.2 var(--heading); white-space: nowrap; }
  .course-dock .course-cta { flex: 1; padding-inline: 12px; gap: 8px; }
  .enroll-actions .course-purchase { width: 100%; }
  .course-dock .course-cta:focus-visible { outline-color: var(--ink); }
}

@media (max-width: 390px) {
  .course-header nav { gap: 11px; font-size: .9rem; }
}
