:root {
  --ink: #301c25;
  --muted: #746670;
  --wine: #59061e;
  --line: #eadfe3;
  --paper: #fffafb;
  --rose: #f8e9ee;
  --green: #146445;
  --radius: 22px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.65 'Noto Sans Thai',
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}
button,
a,
input,
select,
textarea,
summary:focus-visible {
  outline-offset: 4px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #be5375;
}
button {
  cursor: pointer;
}
img {
  max-width: 100%;
  display: block;
}
.skip {
  position: absolute;
  top: -100px;
  padding: 12px;
  background: white;
  z-index: 100;
}
.skip:focus {
  top: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fffefef5;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.nav {
  max-width: 1280px;
  margin: auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--wine);
}
.brand img {
  width: 46px;
  height: 46px;
}
.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.17em;
  line-height: 1.3;
}
.navlinks {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}
.navlink {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 99px;
  white-space: nowrap;
}
.navlink[aria-current='page'] {
  background: var(--rose);
  color: var(--wine);
}
.navlink:hover {
  background: #f6f1f3;
}
.nav-cart .admin-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.count {
  border-radius: 99px;
  min-width: 23px;
  height: 23px;
  background: var(--wine);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
}
.avatar {
  height: 34px;
  width: 34px;
  border-radius: 50%;
  background: var(--wine);
  color: white;
  display: grid;
  place-items: center;
}
.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px 28px 80px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--wine);
  margin: 0 0 10px;
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 10px 0 34px;
}
.hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.04em;
  line-height: 1.3;
  margin: 0 0 12px;
  font-weight: 700;
}
.hero p {
  margin: 0;
  color: var(--muted);
}
.hero-note {
  background: linear-gradient(130deg, #59061e, #901d43);
  color: #fff;
  border-radius: 22px;
  padding: 22px 28px;
  max-width: 320px;
  font-size: 14px;
  flex-shrink: 0;
}
.hero-note strong {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}
.hero-note p {
  color: #f9e4ec;
}
.searchbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 210px 240px auto;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.searchbar label {
  margin: 0;
}
.searchbar button {
  align-self: end;
}
.input,
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8c9d0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  min-height: 48px;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
.searchbar label span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 5px;
  color: var(--muted);
}
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}
.catalog-search {
  margin: 0 0 28px;
}
.catalog-search > summary {
  cursor: pointer;
  width: fit-content;
  padding: 10px 0;
  color: var(--wine);
  font-weight: 600;
}
.catalog-search .searchbar {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  margin: 12px 0 0;
  border-radius: 12px;
}
.category-pills .pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.purchase-terms {
  margin: 20px 0;
  padding: 16px;
  border-radius: 14px;
  background: #fff3f6;
}
.purchase-terms h2 {
  font-size: 16px;
  margin: 0 0 10px;
}
.purchase-terms small {
  font-size: 14px;
  color: var(--muted);
}
.course-shelf-grid {
  grid-auto-rows: 1fr;
}
.shelf-course .cardbody {
  gap: 10px;
  padding: 15px 18px 17px;
}
.shelf-course .cardmeta,
.shelf-course-note {
  margin: 0;
}
.shelf-renewal-note {
  display: block;
  margin-top: 3px;
}
.shelf-course .shelf-course-heading h3 {
  margin: 0;
  line-height: 1.45;
}
.shelf-course-heading .teacher {
  margin: 3px 0 0;
}
.shelf-course .cardmeta .access-status {
  margin-inline-start: auto;
  padding: 4px 8px;
  white-space: nowrap;
}
.shelf-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shelf-progress progress {
  flex: 1;
  min-width: 0;
  height: 13px;
  appearance: none;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: #e5eee9;
}
.shelf-progress progress::-webkit-progress-bar {
  background: #e5eee9;
}
.shelf-progress progress::-webkit-progress-value {
  background: #2f7956;
  border-radius: 99px;
}
.shelf-progress progress::-moz-progress-bar {
  background: #2f7956;
  border-radius: 99px;
}
.shelf-coverage.tag {
  background: #e6f4ec;
  color: #15573d;
  white-space: nowrap;
}
.shelf-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 125px), 1fr));
  gap: 8px;
  margin: 4px 0 0;
}
.shelf-metrics div {
  border-radius: 11px;
  background: #f7f5f6;
  padding: 9px 11px;
}
.shelf-metrics dt {
  font-size: 13px;
  color: var(--muted);
}
.shelf-metrics dd {
  margin: 3px 0 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pill {
  font-size: 14px;
  padding: 9px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.pill.active {
  background: var(--wine);
  border-color: var(--wine);
  color: white;
}
.results-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin: 0 0 18px;
}
.results-line h2 {
  font-size: 22px;
  margin: 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px #59061e0d;
}
.cover {
  aspect-ratio: 16/9;
  background: #f3edf0;
  overflow: hidden;
  display: block;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cardbody {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cardmeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.tag {
  display: inline-block;
  background: var(--rose);
  color: var(--wine);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
}
.card h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.6;
  margin: 0 0 10px;
}
.teacher {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
}
.card-bottom {
  margin-top: auto;
}
.meta {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}
.price {
  color: var(--wine);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.4;
}
.oldprice {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-decoration: line-through;
  margin-left: 8px;
}
.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-top: 16px;
}
.card-actions > .btn,
.card-actions form {
  margin: 0;
  min-width: 0;
  width: 100%;
}
.card-actions form {
  display: flex;
}
.card-actions form .btn {
  width: 100%;
}
.btn {
  border: 1px solid var(--wine);
  border-radius: 12px;
  padding: 12px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--wine);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  min-height: 48px;
  text-align: center;
  line-height: 1.5;
}
.btn:hover {
  background: #761134;
}
.btn.secondary {
  background: white;
  color: var(--wine);
  border-color: #d7bcc7;
}
.btn.secondary:hover {
  background: var(--rose);
}
.btn.quiet {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}
.btn.full {
  width: 100%;
}
.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.success,
.error,
.notice {
  border-radius: 14px;
  padding: 14px 18px;
  margin: 0 0 22px;
  font-size: 14px;
}
.success {
  color: #16533b;
  background: #eaf7ef;
  border: 1px solid #c5e5d1;
}
.error {
  background: #fff0f0;
  color: #951f2e;
  border: 1px solid #eab9c1;
}
.notice {
  background: #fff4e4;
  color: #715126;
  border: 1px solid #f0dabd;
}
.breadcrumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 26px;
}
.breadcrumbs a {
  color: var(--wine);
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}
.detail-title {
  font-size: clamp(26px, 3.5vw, 37px);
  line-height: 1.5;
  margin: 14px 0;
}
.detail-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #f5f1f3;
  border-radius: 20px;
  border: 1px solid var(--line);
  margin-bottom: 28px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  margin-bottom: 22px;
}
.panel h2 {
  font-size: 22px;
  margin: 0 0 18px;
}
.purchase {
  position: sticky;
  top: 112px;
}
.purchase .price {
  font-size: 34px;
}
.purchase p {
  color: var(--muted);
  font-size: 14px;
}
.purchase .btn {
  margin-top: 10px;
}
.purchase .test-label {
  color: var(--wine);
  background: var(--rose);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}
.facts {
  display: grid;
  gap: 10px;
  padding: 18px 0;
  margin: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 14px;
}
.facts span:first-child {
  color: var(--muted);
}
.prose {
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.prose h3 {
  font-size: 18px;
}
.prose a {
  text-decoration: underline;
}
.module {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.module:first-child {
  border-top: 0;
}
.module summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  padding-right: 10px;
}
.module summary span {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}
.lesson-list {
  padding: 0;
  list-style: none;
  margin: 16px 0 0;
}
.lesson {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 0;
  border-top: 1px solid #f0e9ec;
  font-size: 14px;
}
.lesson-num {
  color: #9a8290;
  font-size: 12px;
  min-width: 26px;
  padding-top: 3px;
}
.lesson-title {
  flex: 1;
}
.lesson-state {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.lesson.lesson-sample {
  padding: 0;
  margin: 4px 0;
  border-top: 0;
}
.course-sample-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #e4ccd5;
  border-left: 3px solid var(--wine);
  border-radius: 8px;
  background: #fff;
  color: var(--wine);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.course-sample-button:hover {
  background: #fbf3f6;
}
.course-sample-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}
.course-sample-button > svg {
  width: 20px;
  height: 20px;
}
.course-sample-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.course-sample-tag {
  padding: 2px 8px;
  border-radius: 6px;
  background: #f5e6ed;
  color: var(--wine);
  font-size: 12px;
  white-space: nowrap;
}
.course-sample-duration {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.course-sample-dialog.account-dialog {
  width: min(820px, calc(100vw - 24px));
  padding: clamp(12px, 3vw, 24px);
}
.course-sample-dialog header h2 {
  font-size: clamp(16px, 3vw, 22px);
  overflow-wrap: anywhere;
}
.course-sample-dialog header button {
  flex: none;
}
.course-sample-screen {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #201923;
  margin-top: 14px;
}
/* Keep Bunny's protected presentation intact during screen sharing. */
.course-sample-screen:has(> iframe) {
  overflow: visible;
}
.course-sample-screen iframe,
.course-sample-screen video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.course-sample-dialog [data-sample-status] {
  margin: 8px 0 0;
}
.course-sample-dialog [data-sample-status]:empty {
  display: none;
}
.included {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.included img {
  width: 110px;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.included strong {
  font-size: 15px;
}
.included p {
  font-size: 13px;
  margin: 5px 0;
  color: var(--muted);
}
.included:hover strong {
  text-decoration: underline;
}
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}
.cart-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 20px;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 16px;
  align-items: start;
}
.cart-list-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.cart-list-actions form {
  margin: 0;
}
.cart-item img {
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  aspect-ratio: 16/9;
  object-fit: contain;
}
.cart-item h2 {
  font-size: 18px;
  margin: 8px 0;
}
.cart-item p {
  font-size: 13px;
  margin: 5px 0;
  color: var(--muted);
}
.remove {
  background: transparent;
  color: #925367;
  border: 0;
  padding: 8px 0;
  font-size: 13px;
  text-decoration: underline;
}
.total-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 12px 0;
  font-size: 14px;
}
.total-line.charge {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
}
.total-line.charge strong {
  font-size: 26px;
  color: var(--wine);
}
.empty {
  text-align: center;
  border: 1px dashed #d7bcc7;
  border-radius: 24px;
  padding: 60px 24px;
  background: white;
}
.empty h2 {
  margin: 0 0 8px;
  font-size: 24px;
}
.empty p {
  color: var(--muted);
  margin: 0 0 26px;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  max-width: 1060px;
  margin: 12px auto;
  gap: 50px;
  align-items: start;
}
.auth-intro {
  padding: 42px 0;
}
.auth-intro h1 {
  font-size: 40px;
  line-height: 1.4;
  margin: 16px 0;
}
.auth-intro p {
  color: var(--muted);
}
.steps {
  margin-top: 32px;
  display: grid;
  gap: 20px;
}
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 15px;
}
.step b {
  background: var(--rose);
  color: var(--wine);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.form-card {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid label {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.form-grid input,
.form-grid select {
  margin-top: 8px;
}
.form-grid .span2 {
  grid-column: 1/-1;
}
.field-help {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-top: 6px;
}
.field-error {
  display: block;
  color: #9a2034;
  font-size: 13px;
  font-weight: 400;
  margin-top: 6px;
}
.form-card h2 {
  font-size: 23px;
  margin: 0 0 6px;
}
.form-card > p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 26px;
}
.form-actions {
  margin-top: 26px;
}
.form-actions p {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 20px 0 0;
}
.form-actions a {
  color: var(--wine);
  text-decoration: underline;
}
.receipt {
  max-width: 780px;
  margin: auto;
}
.receipt-heading {
  text-align: center;
  padding: 20px 0 32px;
}
.checkmark {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  background: #e7f5ec;
  color: var(--green);
  font-size: 34px;
}
.receipt-heading h1 {
  font-size: 32px;
  margin: 18px 0 8px;
}
.receipt-heading p {
  color: var(--muted);
  margin: 0;
}
.receipt .included {
  justify-content: space-between;
}
.receipt-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}
.shelf-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 30px;
}
.shelf-heading h1 {
  font-size: 34px;
  margin: 0;
}
.classroom-pdf-welcome {
  width: min(640px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: clamp(16px, 4vw, 26px);
  border: 1px solid #e8d6df;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 20px 60px #2b182b38;
}
.classroom-pdf-welcome::backdrop { background: #29152083; }
.classroom-pdf-welcome[open] { display: flex; flex-direction: column; }
.classroom-pdf-welcome > header { margin-bottom: 18px; }
.classroom-pdf-welcome > header h1 { margin: 0; font-size: clamp(22px, 5vw, 29px); }
.classroom-pdf-welcome > header h1:focus { outline: none; }
.classroom-pdf-welcome > header p { margin: 4px 0 0; overflow-wrap: anywhere; }
.classroom-pdf-welcome > footer { display: flex; justify-content: flex-end; margin-top: 16px; }
.classroom-pdf-welcome .pdf-access-center {
  overflow: auto;
  min-height: 0;
  margin-bottom: 0;
  box-shadow: none;
}
.classroom-pdf-welcome .pdf-course-group > header {
  justify-content: flex-end;
  padding-inline-end: 17px;
}
.classroom-pdf-welcome [data-download-all] {
  color: #fff;
  border-color: var(--wine);
  background: var(--wine);
}
.classroom-pdf-welcome [data-download-all]:hover { background: #761134; }
.classroom-pdf-welcome .pdf-access-item .btn { width: auto; }
.classroom-pdf-welcome .pdf-course-group:has([data-download-all]) .pdf-access-item .btn {
  color: var(--wine);
  border-color: #d7bcc7;
  background: var(--rose);
}
.classroom-pdf-welcome .pdf-course-group:has([data-download-all]) .pdf-access-item .btn:hover {
  background: color-mix(in srgb, var(--wine) 6%, var(--rose));
}
.classroom-pdf-welcome .pdf-access-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 16px;
  overflow-wrap: anywhere;
}
.classroom-pdf-welcome .pdf-access-item:not(.is-pending, .is-expired) { border-color: #e4eee7; }
@media (max-width: 520px) {
  .classroom-pdf-welcome .pdf-access-item { grid-template-columns: 1fr; }
  .classroom-pdf-welcome .pdf-access-item .btn { justify-self: end; }
}
.pdf-access-center {
  margin: 0 0 16px;
  padding: 22px;
  border: 1px solid #b8d9c5;
  border-radius: 20px;
  background: linear-gradient(135deg, #f1fbf5, #fffdfd 72%);
  box-shadow: 0 12px 35px #245c3830;
}
.pdf-access-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.pdf-access-heading > div > span {
  color: #35704b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pdf-access-heading h2 {
  scroll-margin-top: 110px;
  margin: 4px 0;
  font-size: 25px;
}
.pdf-access-heading p {
  margin: 0;
  color: #557060;
}
.pdf-access-heading .pdf-access-help {
  margin-top: 8px;
  color: #254b35;
}
.pdf-access-help a {
  color: #1d623c;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pdf-access-heading > svg {
  width: 34px;
  height: 34px;
  color: #35704b;
}
.pdf-access-list {
  display: grid;
  gap: 10px;
}
.pdf-course-group {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #dbe7df;
}
.pdf-course-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.pdf-course-group > header div {
  display: grid;
  gap: 2px;
}
.pdf-course-group > header span,
.pdf-download-status {
  color: var(--muted);
  font-size: 12px;
}
.pdf-download-status:empty {
  display: none;
}
.pdf-access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #d7e9dd;
  border-radius: 14px;
  background: white;
}
.pdf-access-item > div {
  display: grid;
  gap: 3px;
}
.pdf-access-item > div > span,
.pdf-access-item small {
  color: var(--muted);
}
.pdf-access-item small {
  font-size: 12px;
}
.pdf-access-item.is-pending {
  border-color: #ead7a7;
  background: #fffbf0;
}
.pdf-pending-label {
  color: #8a6414;
  font-size: 13px;
  font-weight: 800;
}
.pdf-access-item.is-expired {
  border-color: var(--line);
  background: #fbf8f9;
}
.pdf-expired-label {
  color: #895f6e;
  font-size: 13px;
  font-weight: 700;
}
.active-tag {
  background: #e7f5ec;
  color: var(--green);
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
}
.footer {
  border-top: 1px solid var(--line);
  padding: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: white;
}
.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 36px;
}
.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 14px 22px;
  font-size: 14px;
}
.stat strong {
  display: block;
  font-size: 26px;
  color: var(--wine);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  background: var(--rose);
  padding: 14px 18px;
  white-space: nowrap;
}
.data-table td {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.data-table .muted {
  font-size: 12px;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.profile-actions {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}
.history {
  list-style: none;
  padding: 0;
}
.history li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 1050px) {
  .searchbar {
    grid-template-columns: 1fr 1fr;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav {
    gap: 12px;
    padding: 12px 20px;
  }
  .navlink {
    padding: 9px 10px;
  }
  .hero-note {
    max-width: 270px;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .auth-layout {
    gap: 28px;
  }
  .auth-intro h1 {
    font-size: 32px;
  }
}
@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
    gap: 8px;
    min-height: unset;
    padding: 10px 16px;
  }
  .brand {
    font-size: 18px;
  }
  .brand img {
    width: 37px;
    height: 37px;
  }
  .brand small {
    font-size: 10px;
  }
  .navlinks {
    gap: 0;
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .navlink {
    font-size: 13px;
    padding: 8px;
  }
  .navlink .nav-name {
    display: none;
  }
  .shell {
    padding: 26px 18px 55px;
  }
  .hero {
    display: block;
    padding: 0 0 25px;
  }
  .hero-note {
    max-width: none;
    margin-top: 22px;
    padding: 15px 20px;
  }
  .hero-note strong {
    font-size: 15px;
  }
  .hero-note p {
    font-size: 13px;
  }
  .searchbar {
    padding: 14px;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
  }
  .searchbar label:first-of-type {
    grid-column: 1/-1;
  }
  .searchbar button {
    grid-column: 1/-1;
  }
  .searchbar select {
    font-size: 14px;
  }
  .grid {
    gap: 16px;
  }
  .cardbody {
    padding: 17px;
  }
  .card h3 {
    font-size: 17px;
  }
  .cardmeta {
    flex-wrap: wrap;
  }
  .card-actions {
    flex-wrap: wrap;
  }
  .card-actions .btn {
    font-size: 14px;
    padding: 10px;
  }
  .teacher {
    font-size: 12px;
  }
  .price {
    font-size: 21px;
  }
  .detail-grid,
  .cart-layout,
  .auth-layout,
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .purchase {
    position: static;
    grid-row: 1;
  }
  .detail-title {
    font-size: 27px;
  }
  .auth-intro {
    padding: 0;
  }
  .auth-intro h1 {
    font-size: 30px;
  }
  .steps {
    display: none;
  }
  .form-card {
    padding: 24px;
  }
  .cart-item {
    grid-template-columns: 100px 1fr;
    gap: 15px;
    padding: 18px;
  }
  .cart-item > .price {
    grid-column: 2;
  }
  .cart-item h2 {
    font-size: 16px;
  }
  .shelf-heading {
    align-items: flex-start;
  }
  .shelf-heading h1 {
    font-size: 28px;
  }
  .receipt .included {
    flex-wrap: wrap;
  }
  .included img {
    width: 85px;
  }
  .panel {
    padding: 22px;
  }
  .meta {
    flex-wrap: wrap;
    gap: 6px;
  }
  .lesson-state {
    white-space: normal;
    text-align: right;
    max-width: 85px;
  }
  .topbar .navlinks .navlink {
    min-height: 40px;
  }
}
@media (max-width: 440px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span2 {
    grid-column: auto;
  }
  .brand small {
    display: none;
  }
  .navlink {
    font-size: 12px;
    padding: 7px;
  }
  .navlinks {
    flex-basis: 100%;
    justify-content: space-between;
  }
  .nav {
    justify-content: center;
  }
  .hero h1 {
    font-size: 32px;
  }
  .card h3 {
    font-size: 20px;
  }
  .teacher {
    font-size: 14px;
  }
  .card-actions {
    flex-wrap: nowrap;
  }
  .shelf-heading {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  .card:hover {
    transform: none;
  }
}
.nav-logout {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  color: #79646e;
  font-size: 13px;
}
.navlinks form,
.admin-account form {
  margin: 0;
}
.account-dialog {
  color: #31151e;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 28px;
  border: 1px solid #eadfe3;
  border-radius: 24px;
  box-shadow: 0 24px 100px #28061238;
}
.account-dialog::backdrop {
  background: #21131a88;
  backdrop-filter: blur(4px);
}
.account-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.account-dialog h2 {
  font-size: 24px;
  margin: 0;
}
.account-dialog [data-close-account] {
  border: 0;
  background: #f8f2f4;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}
.account-dialog p {
  color: #79646e;
}
.account-dialog label {
  display: block;
  margin: 18px 0;
}
.account-dialog input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  border: 1px solid #d9cdd2;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
}
.account-dialog input:focus {
  outline: 3px solid #f4d9e2;
  border-color: #7b1434;
}
.account-dialog-links,
.account-dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}
.account-dialog .error {
  color: #991b1b;
}
.account-dialog [hidden] {
  display: none;
}
.course-search-picker {
  position: relative;
  min-width: 0;
  color: var(--ink);
}
.course-search-picker summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
}
.course-search-picker summary::-webkit-details-marker {
  display: none;
}
.course-search-picker summary::after {
  content: '⌄';
  flex: none;
}
.course-search-picker[open] summary {
  border-color: var(--wine);
}
.course-search-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(420px, calc(100vw - 48px));
  z-index: 30;
  background: white;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 40px #3e092226;
}
.course-search-panel label,
.course-shelf-search label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
.course-search-panel input,
.course-shelf-search input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: white;
  font-size: 16px;
}
.course-search-results {
  display: grid;
  gap: 5px;
  max-height: min(330px, 45vh);
  overflow-y: auto;
  margin-top: 12px;
}
.course-search-results button {
  text-align: left;
  font: inherit;
  font-size: 14px;
  padding: 12px;
  border: 0;
  background: white;
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
  line-height: 1.6;
}
.course-search-results button:hover,
.course-search-results button:focus-visible {
  background: #faf0f4;
}
.course-search-results button[aria-pressed='true'] {
  background: #f4e5eb;
  color: var(--wine);
  font-weight: 600;
}
.course-search-count {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 0;
}
.course-shelf-search {
  display: flex;
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}
.course-shelf-search label {
  width: min(100%, 460px);
}
.course-shelf-search p {
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
}
[data-shelf-course][hidden],
.course-search-results button[hidden],
[data-course-picker][hidden] {
  display: none !important;
}

/* Shared interaction vocabulary: brand actions, separate semantic status colors. */
.access-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}
.access-status-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  flex: none;
}
.access-status--danger {
  color: #a41425;
  background: #fff0f1;
  border-color: #ed9ba6;
}
.access-status--warning {
  color: #784506;
  background: #fff6db;
  border-color: #dfb75a;
}
.access-status--positive {
  color: #14603e;
  background: #eaf8ef;
  border-color: #8ec7a4;
}
.access-status--info {
  color: #195b96;
  background: #edf5ff;
  border-color: #9fc3e8;
}
.access-status--neutral {
  color: #555b66;
  background: #f2f4f7;
  border-color: #bfc5ce;
}
.access-expiry {
  font-size: 15px;
  font-weight: 600;
}
.access-expiry--danger {
  color: #a41425 !important;
}
.access-expiry--warning {
  color: #784506 !important;
}
.access-row[data-access-tone='danger'],
.card[data-access-tone='danger'] {
  border-color: #e7a1aa;
  border-left: 4px solid #c42f40;
}
.access-row[data-access-tone='warning'],
.card[data-access-tone='warning'] {
  border-color: #dfbd75;
  border-left: 4px solid #cb8b21;
}
.cardmeta:has(.access-status) {
  align-items: flex-start;
  flex-wrap: wrap;
}

body details.abig-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid #d9c8d0;
  border-radius: 10px;
  background: #faf5f7;
  color: #432331;
  cursor: pointer;
  line-height: 1.6;
  font-size: 16px;
  font-weight: 600;
  transition:
    background-color 160ms,
    border-color 160ms,
    box-shadow 160ms;
}
body details.abig-disclosure > summary::-webkit-details-marker {
  display: none;
}
body details.abig-disclosure > summary::marker {
  content: '';
}
body details.abig-disclosure > summary > .disclosure-label {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  overflow-wrap: anywhere;
}
body details.abig-disclosure > summary > .disclosure-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin: 0;
  color: #6a2842;
}
body details.abig-disclosure .disclosure-hint {
  margin: 0;
  font-size: 14px;
  color: inherit;
  font-weight: 500;
}
.disclosure-action::after {
  content: '';
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 230ms;
}
details[data-disclosure-open='true'] > summary .disclosure-action::after {
  transform: rotate(135deg);
}
body details.abig-disclosure[data-disclosure-open='true'] > summary {
  background: #f4e7ed;
  border-color: #b58b9d;
}
body details.abig-disclosure > summary:focus-visible {
  outline: 2px solid #966079;
  outline-offset: 2px;
}
.classroom-module.abig-disclosure > summary .disclosure-hint {
  display: none;
}
.classroom-module.abig-disclosure > summary small {
  margin-left: 0;
}
.admin-panel details.abig-disclosure {
  padding-top: 0;
  border-top: 0;
}
body details.abig-disclosure > summary + * {
  margin-top: 12px;
}

/* Keep existing button/card feedback. Text links get a subtle color response,
   not a generic rectangular hover ring or a second card shadow. */
:where(
  .btn,
  .navlink,
  .admin-tabs a,
  .admin-mainnav a,
  .content-text-button,
  .content-lesson-title,
  .classroom-lesson-actions a,
  .classroom-tabs a,
  .classroom-quicklinks a
) {
  transition:
    background-color 160ms ease,
    color 160ms ease;
}
:where(button, a, summary):focus:not(:focus-visible) {
  outline: none;
}
:where(button:disabled, [aria-disabled='true']) {
  cursor: not-allowed;
}
@media (hover: hover) {
  body details.abig-disclosure > summary:hover {
    background: #f1e8ed;
  }
  :where(
    .content-text-button,
    .content-lesson-title,
    .classroom-lesson-actions a,
    .classroom-quicklinks a
  ):hover {
    color: #8b2e50;
  }
}
@media (max-width: 600px) {
  body details.abig-disclosure > summary {
    gap: 10px;
    padding: 12px;
  }
  .abig-disclosure .disclosure-hint {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  body details.abig-disclosure > summary,
  .disclosure-action::after,
  :where(.btn, button, a, .card, .admin-course-card, .admin-task-card) {
    transition: none !important;
    animation: none !important;
  }
}

/* Course material choice and reusable learner addresses. */
.checkout-materials,
.checkout-bonus,
.checkout-address,
.checkout-proof {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffafa;
}
.checkout-address[hidden] {
  display: none !important;
}
.checkout-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.checkout-section-heading > span {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: white;
  background: var(--wine);
  font-weight: 800;
}
.checkout-section-heading h3,
.checkout-section-heading p {
  margin: 0;
}
.checkout-section-heading p {
  color: var(--muted);
  font-size: 13px;
}
.material-choice {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}
.material-choice legend {
  margin-bottom: 8px;
  font-weight: 750;
  width: 100%;
}
.course-material-heading {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.course-material-heading img {
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: cover;
}
.course-material-heading small,
.course-material-heading strong {
  display: block;
}
.course-material-heading small {
  color: var(--wine);
  font-size: 13px;
}
.course-material-heading strong {
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.45;
}
.material-choice-grid {
  display: grid;
  gap: 9px;
}
.order-material-choice .material-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.material-choice-grid label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 13px;
  border: 1px solid #ddcdd3;
  border-radius: 12px;
  background: white;
  cursor: pointer;
}
.material-choice-grid label:has(input:checked) {
  border-color: var(--wine);
  box-shadow: 0 0 0 2px #f5dfe7;
}
.material-choice-grid input {
  width: auto;
  margin-top: 4px;
}
.material-choice-grid strong,
.material-choice-grid small {
  display: block;
}
.material-choice-grid small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.course-material-choice-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.course-material-choice {
  min-inline-size: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #eadde2;
  border-radius: 14px;
  background: white;
}
.course-material-choice .material-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  align-content: start;
}
.course-material-choice.is-fixed .material-choice-grid,
.course-material-choice.is-bonus .material-choice-grid {
  grid-template-columns: 1fr;
}
.material-fixed {
  padding: 13px;
  border: 1px solid #cfe3d5;
  border-radius: 12px;
  background: #f3faf5;
}
.material-fixed strong,
.material-fixed small {
  display: block;
}
.material-fixed small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}
.checkout-bonus {
  border-color: #e2c997;
  background: #fffbf1;
}
.checkout-bonus-summary {
  display: grid;
  gap: 3px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #e2c997;
  border-radius: 12px;
  background: #fffaf0;
}
.checkout-bonus-summary span {
  color: var(--muted);
  font-size: 12px;
}
.cart-bonus-status {
  margin: 14px 0 18px;
}
.cart-bonus-status small,
.cart-bonus-status a {
  display: block;
  margin-top: 5px;
  line-height: 1.5;
}
.cart-bonus-status.is-used {
  border-color: var(--line);
  background: #faf7f8;
}
@media (max-width: 720px) {
  .course-material-choice .material-choice-grid {
    grid-template-columns: 1fr;
  }
}
.checkout-address-preview {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.checkout-address-preview > div {
  padding: 12px;
  border-radius: 10px;
  background: white;
  border: 1px solid var(--line);
}
.checkout-address-preview strong,
.checkout-address-preview small {
  display: block;
}
.checkout-address-preview small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}
.cart-summary {
  padding: 28px;
}
.cart-summary-heading {
  margin-bottom: 22px;
}
.cart-summary-heading > span,
.checkout-dialog-header > div > span,
.checkout-review > span {
  display: block;
  color: var(--wine);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cart-summary-heading h2 {
  margin: 4px 0 0;
  font-size: 28px;
}
.checkout-promotion {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: #f9e8ee;
  color: var(--wine);
  font-size: 13px;
}
.checkout-launch {
  margin-top: 22px !important;
}
.checkout-launch-help {
  margin: 9px 0 0 !important;
  text-align: center;
  line-height: 1.5;
}
.checkout-dialog {
  color: var(--ink);
  width: min(940px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid #eadde2;
  border-radius: 26px;
  background: #fffdfd;
  box-shadow: 0 28px 100px #2c071943;
  overflow: auto;
}
.checkout-dialog:not([open]) {
  display: none;
}
.checkout-dialog::backdrop {
  background: #23151c99;
  backdrop-filter: blur(5px);
}
.checkout-dialog-shell {
  min-height: 0;
}
.checkout-dialog-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
  background: #fffdfdf2;
  backdrop-filter: blur(12px);
}
.checkout-dialog-header h2 {
  margin: 3px 0;
  font-size: 30px;
}
.checkout-dialog-header p {
  margin: 0;
  color: var(--muted);
}
.checkout-dialog-header form {
  margin: 0;
}
.checkout-dialog-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 26px;
  cursor: pointer;
}
.checkout-dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 26px;
  padding: 8px 28px 28px;
}
.checkout-dialog-layout.is-reviewing {
  grid-template-columns: minmax(0, 1fr) 320px;
}
.checkout-wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 18px 28px 4px;
}
.checkout-wizard-progress button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  color: var(--muted);
  text-align: left;
}
.checkout-wizard-progress button[hidden] {
  display: none;
}
.checkout-wizard-progress span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #f3e8ec;
  color: var(--wine);
  font-weight: 800;
}
.checkout-wizard-progress button[aria-current='true'] {
  border-color: #b35f7d;
  background: #fff6f9;
  color: var(--wine);
  box-shadow: inset 0 -3px 0 var(--wine);
}
.checkout-wizard-progress button[aria-current='true'] span,
.checkout-wizard-progress button.is-complete span {
  background: var(--wine);
  color: white;
}
.checkout-wizard-step[hidden],
.checkout-review[hidden] {
  display: none !important;
}
.checkout-step-title {
  margin: 22px 0 8px;
}
.checkout-step-title > span {
  color: var(--wine);
  font-size: 13px;
  font-weight: 800;
}
.checkout-step-title h3 {
  margin: 4px 0 2px;
  font-size: 26px;
  line-height: 1.35;
}
.checkout-step-title p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.checkout-wizard-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
  background: #fffdfdf2;
  backdrop-filter: blur(10px);
}
.checkout-wizard-actions > p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
.checkout-wizard-actions [hidden] {
  display: none;
}
.checkout-flow {
  min-width: 0;
}
.checkout-material-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.checkout-material-list .material-choice {
  margin: 0;
  padding: 16px;
  border: 1px solid #eadde2;
  border-radius: 14px;
  background: white;
}
.checkout-material-list .material-choice-grid {
  align-content: start;
}
.checkout-review {
  position: sticky;
  top: 112px;
  margin-top: 20px;
  padding: 22px;
  border: 1px solid #e4d2d9;
  border-radius: 18px;
  background: #fff7f9;
}
.checkout-review h3 {
  margin: 5px 0 18px;
  font-size: 22px;
}
.checkout-review-items {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}
.checkout-review-items > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
}
.checkout-review .promo-terms {
  max-height: 260px;
  overflow: auto;
}
.checkout-review .total-line.charge {
  margin-bottom: 0;
}
.checkout-submit {
  display: block;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border: 1px solid #ddcbd2;
  border-radius: 16px;
  background: white;
}
.checkout-submit p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.checkout-submit .btn {
  margin: 0;
}
@media (max-width: 900px) {
  .checkout-dialog-layout.is-reviewing,
  .checkout-dialog-layout {
    grid-template-columns: 1fr;
  }
  .checkout-review {
    position: static;
    grid-row: 1;
    margin-bottom: 0;
  }
}
@media (max-width: 650px) {
  .checkout-dialog {
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  .checkout-dialog-header {
    padding: 18px;
  }
  .checkout-dialog-header h2 {
    font-size: 24px;
  }
  .checkout-dialog-header p {
    font-size: 13px;
  }
  .checkout-dialog-layout {
    padding: 0 14px 24px;
    gap: 8px;
  }
  .checkout-wizard-progress {
    gap: 5px;
    padding: 12px 14px 4px;
  }
  .checkout-wizard-progress button {
    justify-content: center;
    min-height: 44px;
    padding: 7px;
  }
  .checkout-wizard-progress strong {
    display: none;
  }
  .checkout-step-title h3 {
    font-size: 23px;
  }
  .course-material-heading {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .course-material-heading img {
    width: 88px;
  }
  .checkout-wizard-actions {
    grid-template-columns: auto 1fr;
  }
  .checkout-wizard-actions > p {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .checkout-material-list {
    grid-template-columns: 1fr;
  }
  .order-material-choice .material-choice-grid {
    grid-template-columns: 1fr;
  }
  .checkout-submit {
    grid-template-columns: 1fr;
  }
  .pdf-access-item {
    align-items: stretch;
    flex-direction: column;
  }
  .pdf-access-item .btn {
    width: 100%;
  }
}
.address-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}
.address-layout.has-addresses {
  grid-template-columns: minmax(0, 1fr) minmax(400px, 0.9fr);
}
.address-layout.is-first-address {
  max-width: 780px;
  margin-inline: auto;
}
.address-list {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}
.address-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}
.address-card.is-default {
  border-color: rgba(109, 0, 36, 0.34);
  box-shadow: inset 4px 0 0 var(--wine);
}
.address-card-copy {
  min-width: 0;
}
.address-card-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.address-card h2 {
  margin: 12px 0 6px;
  font-size: 20px;
}
.address-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.address-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}
.address-actions form {
  margin: 0;
}
.address-primary {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(109, 0, 36, 0.24);
  border-radius: 12px;
  background: #fff8f5;
  color: var(--wine);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.address-primary:hover {
  background: #fbece8;
}
.address-primary.active {
  display: inline-flex;
  align-items: center;
  min-height: auto;
  padding: 6px 10px;
  border-color: rgba(109, 0, 36, 0.18);
  border-radius: 999px;
  background: #fbece8;
  cursor: default;
  font-size: 13px;
}
.address-form-panel textarea {
  min-height: 124px;
}
.address-form-panel {
  padding: clamp(22px, 4vw, 36px);
}
.address-form-eyebrow {
  color: var(--wine);
  font-size: 13px;
  font-weight: 800;
}
.address-form-intro {
  margin: -6px 0 24px;
  color: var(--muted);
}
.address-form-section {
  margin: 0 0 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.address-form-section h3 {
  margin: 0 0 14px;
  font-size: 18px;
}
.address-form-panel label {
  font-size: 15px;
  font-weight: 650;
}
.address-default-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffafa;
  cursor: pointer;
}
.address-default-choice input {
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  flex: 0 0 22px;
  accent-color: var(--wine);
}
.address-default-choice span,
.address-default-choice strong,
.address-default-choice small {
  display: block;
}
.address-default-choice small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 400;
}
.address-form-panel .btn {
  margin-top: 18px;
}
@media (max-width: 850px) {
  .address-layout.has-addresses,
  .address-layout {
    grid-template-columns: 1fr;
  }
  .address-card {
    flex-direction: column;
  }
}

/* Compact learner order history and the same fulfillment state used by staff. */
.order-history-list {
  display: grid;
  gap: 12px;
  max-width: 1040px;
}
.order-history-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 22px;
  min-height: 116px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  transition:
    border-color 160ms,
    transform 160ms;
}
.order-history-card:hover {
  border-color: #b98a9c;
  transform: translateY(-1px);
}
.order-history-id,
.order-history-price {
  display: grid;
  gap: 3px;
}
.order-history-id strong {
  color: var(--wine);
  font-size: 15px;
}
.order-history-id span,
.order-history-main p,
.order-history-price span {
  color: var(--muted);
  font-size: 14px;
}
.order-history-main h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.45;
}
.order-history-main h2 small {
  color: var(--wine);
  font-size: 13px;
  white-space: nowrap;
}
.order-history-main p {
  margin: 4px 0 0;
}
.order-history-price {
  justify-items: end;
  text-align: right;
}
.order-history-price strong {
  font-size: 20px;
}
.order-history-price span {
  color: var(--wine);
  font-weight: 700;
}
.learner-shipment {
  overflow: hidden;
}
.learner-shipment-heading,
.learner-tracking {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.learner-shipment-heading span,
.learner-tracking span,
.learner-tracking small {
  display: block;
  color: var(--muted);
}
.learner-shipment-heading h2 {
  margin: 3px 0 0;
}
.shipment-complete-mark {
  display: grid !important;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1f8759;
  color: white !important;
  font-size: 24px;
  font-weight: 800;
}
.learner-shipment-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}
.learner-shipment-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}
.learner-shipment-steps li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #f1e7eb;
}
.learner-shipment-steps li.done,
.learner-shipment-steps li.current {
  color: var(--wine);
}
.learner-shipment-steps li.done > span,
.learner-shipment-steps li.current > span {
  background: var(--wine);
  color: white;
}
.learner-tracking {
  padding: 18px;
  border-radius: 14px;
  background: #f1faf5;
}
.learner-tracking strong {
  display: block;
  margin: 2px 0;
  color: var(--wine);
  font-size: 25px;
  letter-spacing: 0.04em;
}
.learner-shipment-note {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #faf6f8;
  color: var(--muted);
}
.learner-shipment.has-issue {
  border-color: #d89696;
}
@media (max-width: 720px) {
  .order-history-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .order-history-price {
    justify-items: start;
    text-align: left;
  }
  .learner-shipment-steps {
    grid-template-columns: 1fr 1fr;
  }
  .learner-tracking {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Account creation keeps the existing auth layout; returning-user login stays compact. */
.returning-student {
  background: #fff7fa;
  border: 1px solid #e5c8d3;
  border-radius: 14px;
  padding: 18px;
  margin-top: 24px;
}
.returning-student h3 {
  margin: 0;
  font-size: 17px;
}
.returning-student p {
  font-size: 13px;
}
.account-onboarding {
  max-width: 1060px;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.35fr);
}
.account-onboarding .form-card {
  min-width: 0;
}
.account-onboarding .form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.account-onboarding input,
.account-onboarding select,
.account-onboarding textarea {
  font-size: 16px;
  min-width: 0;
  max-width: 100%;
}
.account-onboarding h2 {
  text-wrap: balance;
}
.account-onboarding .source-address p {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.email-recipient {
  overflow-wrap: anywhere;
  font-weight: 600;
}
.local-mail {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 12px !important;
}
.account-review {
  width: min(560px, calc(100vw - 32px));
  overflow: auto;
}
.account-review-facts {
  margin: 20px 0;
}
.account-review-facts > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.account-review-facts dt {
  color: var(--muted);
}
.account-review-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.account-review .account-dialog-actions > * {
  flex: 1;
}
@media (max-width: 900px) {
  .account-onboarding {
    max-width: 640px;
    grid-template-columns: 1fr;
  }
  .account-onboarding .auth-intro {
    display: none;
  }
}
@media (max-width: 600px) {
  .account-onboarding .form-grid {
    grid-template-columns: 1fr;
  }
  .account-onboarding .span2 {
    grid-column: auto;
  }
  .account-review-facts > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .account-review .account-dialog-actions {
    flex-direction: column;
  }
  .account-dialog-links {
    flex-wrap: wrap;
  }
}

.account-onboarding form > label {display:block;margin:0 0 18px;font-size:14px;font-weight:600}
.account-onboarding form > label input,.account-onboarding form > label textarea{margin-top:8px}
.account-onboarding .form-grid{margin-bottom:22px}
.account-onboarding .source-address{margin:14px 0 18px}
.account-onboarding form + p {margin-top:16px}
