/* Soft Dialogue: interior pages (listings, detail pages, forms, information).
   Loaded by templates/sd/page.html after sd-page.css.
   Source of truth: docs/redesign/ssla-public-design-system.md and
   docs/redesign/implementation-02-core-pages.md */

/* Page head ------------------------------------------------------------------ */

.sd-head {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  overflow-y: visible;
  padding-block: clamp(16px, 2.5vw, 32px) clamp(40px, 6vw, 88px);
}
.sd-head::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline-end: -12vw;
  inset-block-start: calc(min(64vw, 940px) / -3);
  width: min(64vw, 940px);
  aspect-ratio: 1.5;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--g-soft, #ffdbda), transparent);
  opacity: .85;
  pointer-events: none;
}
.sd-head--quiet { padding-bottom: clamp(28px, 4vw, 48px); }
.sd-head--quiet::before { opacity: .55; }
.sd-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
}
.sd-head__grid--solo { grid-template-columns: minmax(0, 1fr); }
.sd-head__copy { display: grid; justify-items: start; gap: 18px; min-width: 0; }
.sd-head__title {
  max-width: 15em;
  color: var(--sd-ink);
  font-size: clamp(34px, 1rem + 3.3vw, 64px);
  font-weight: 820;
  line-height: 1.24;
}
.sd-head__title bdi, .sd-head__latin { font-family: var(--sd-font-latin); font-weight: 700; letter-spacing: -.02em; }
.sd-head__lede {
  max-width: 34em;
  color: var(--sd-ink-2);
  font-size: clamp(17px, 1rem + .35vw, 20px);
  line-height: 1.9;
}
.sd-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sd-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.sd-head__art { position: relative; justify-self: center; width: 100%; max-width: 440px; }
.sd-page--language .sd-head__art--editorial { max-width: 520px; width: 100%; }

/* The subject's object in the head: a greeting bubble, a course object, a person drop. */
.sd-head__speech { display: grid; justify-items: center; gap: 18px; container-type: inline-size; }
.sd-head__speech .sd-bubble { width: min(400px, 92%); font-size: min(92px, 17cqi); }
.sd-head__speech .sd-typing { justify-self: left; margin-left: 18%; }
.sd-head__object {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--sd-r-2xl);
  overflow: hidden;
  box-shadow: var(--sd-sh-2), inset 0 0 0 1px rgb(255 255 255 / .6);
}
.sd-head__object .sd-object { border-radius: inherit; }
.sd-head__drop {
  display: grid;
  place-items: center;
  width: min(260px, 70%);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50% 50% 46% 54% / 54% 50% 50% 46%;
  color: var(--g-on);
  font-size: clamp(72px, 9vw, 120px);
  font-weight: 820;
  line-height: 1;
}
.sd-head__photo {
  width: min(280px, 72%);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--sd-sh-2), 0 0 0 8px var(--sd-paper);
}

/* Breadcrumbs ---------------------------------------------------------------- */

.sd-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  color: var(--sd-ink-3);
  font-size: 14px;
  line-height: 1.6;
}
.sd-crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.sd-crumbs a { display: inline-block; padding-block: 8px; text-decoration: none; }
.sd-crumbs a:hover { color: var(--sd-ink); text-decoration: underline; text-underline-offset: 4px; }
.sd-crumbs .sd-icon { width: 14px; height: 14px; opacity: .7; }
[dir="ltr"] .sd-crumbs .sd-icon { transform: scaleX(-1); }
.sd-crumbs [aria-current] { color: var(--sd-ink-2); }

/* Tags: neutral pills for facts in heads --------------------------------------- */

.sd-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--sd-ink-2);
  background: rgb(255 250 249 / .78);
  box-shadow: inset 0 0 0 1px var(--sd-line);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}
.sd-tag .sd-icon { width: 16px; height: 16px; color: var(--sd-ink-3); }
a.sd-tag:hover { background: var(--sd-paper); box-shadow: inset 0 0 0 1px var(--sd-line-2); color: var(--sd-ink); }
.sd-tag--lang { color: var(--g-ink); font-weight: 650; }
.sd-tag--lang::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--g-hi), var(--g-base) 60%, var(--g-deep));
}
.sd-tag--latin { font-family: var(--sd-font-latin); letter-spacing: -.01em; }

/* Segmented view switch ------------------------------------------------------- */

.sd-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--sd-ground-2);
  box-shadow: var(--sd-inset-1);
}
.sd-switch a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--sd-ink-2);
  font-size: 14.5px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color .2s var(--sd-ease-ui), color .2s var(--sd-ease-ui);
}
.sd-switch a:hover { color: var(--sd-ink); }
.sd-switch a[aria-current="page"] { color: var(--sd-ink); background: var(--sd-paper); box-shadow: var(--sd-sh-1); }
.sd-switch small { color: var(--sd-ink-3); font-size: 13px; font-weight: 600; }

/* Listing layout: filters at inline-start, results beside ------------------------ */

.sd-listing { padding-block: 0 clamp(64px, 8vw, 128px); }
.sd-listing__grid {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 3vw, 48px);
}
.sd-listing__grid--wide { grid-template-columns: minmax(0, 1fr); }
.sd-results { display: grid; gap: 22px; min-width: 0; }
.sd-results__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 44px;
}
.sd-results__count { color: var(--sd-ink-2); font-size: 15px; line-height: 1.7; }
.sd-results__count strong { color: var(--sd-ink); font-weight: 750; }
.sd-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 292px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sd-listing .sd-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 252px), 1fr)); }
.sd-cards--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.sd-cards--rows { grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* Filters panel --------------------------------------------------------------- */

.sd-filters {
  position: sticky;
  inset-block-start: calc(var(--sd-header-h) + 20px);
  display: grid;
  max-height: calc(100vh - var(--sd-header-h) - 40px);
  border-radius: var(--sd-r-l);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.sd-filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 4px;
}
.sd-filters__title { font-size: 17px; font-weight: 760; line-height: 1.6; }
.sd-filters__close { display: none; }
.sd-filters__form { display: grid; gap: 20px; padding: 10px 20px 0; }
.sd-filters__more { border-top: 1px solid var(--sd-line); padding-top: 4px; }
.sd-filters__more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  color: var(--sd-ink-2);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.sd-filters__more > summary::-webkit-details-marker { display: none; }
.sd-filters__more > summary .sd-icon { width: 18px; height: 18px; transition: transform .35s var(--sd-ease-out); }
.sd-filters__more[open] > summary .sd-icon { transform: rotate(180deg); }
.sd-filters__more-body { display: grid; gap: 18px; padding: 6px 0 4px; }
.sd-filters__foot {
  position: sticky;
  inset-block-end: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-inline: -20px;
  padding: 16px 20px 20px;
  background: linear-gradient(to bottom, rgb(255 250 249 / 0), var(--sd-paper) 28%);
}
.sd-filters__foot .sd-btn--ink { flex: 1 1 auto; }
.sd-filters-btn { display: none; }
.sd-filters-btn .sd-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--sd-on);
  background: var(--sd-ink);
  font-size: 13px;
}

/* Fields ---------------------------------------------------------------------- */

.sd-field { display: grid; gap: 7px; min-width: 0; }
.sd-field > label,
.sd-field > legend,
.sd-field__label { color: var(--sd-ink-2); font-size: 14px; font-weight: 650; line-height: 1.6; }
.sd-field > legend { margin-bottom: 7px; }

.sd-input,
.sd-select,
/* :where() keeps the type filter out of the specificity, so :hover, :focus-visible and the
   error state below can restyle these fields. */
.sd-page .field input:where(:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"])),
.sd-page .field select,
.sd-page .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--sd-r-s);
  color: var(--sd-ink);
  background: var(--sd-ground);
  box-shadow: var(--sd-inset-1);
  font-size: 16px;
  line-height: 1.6;
  transition: box-shadow .2s var(--sd-ease-ui), background-color .2s var(--sd-ease-ui);
}
.sd-page .field textarea { min-height: 140px; resize: vertical; }
.sd-select,
.sd-page .field select {
  appearance: none;
  padding-inline-end: 44px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23716470' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: left 14px center;
  cursor: pointer;
}
[dir="ltr"] .sd-select, [dir="ltr"] .sd-page .field select { background-position: right 14px center; }
.sd-input::placeholder, .sd-page .field input::placeholder, .sd-page .field textarea::placeholder { color: #8d7f8b; }
.sd-input:hover, .sd-select:hover,
.sd-page .field input:hover, .sd-page .field select:hover, .sd-page .field textarea:hover { background-color: #f9e8e6; }
.sd-input:focus-visible, .sd-select:focus-visible,
.sd-page .field input:focus-visible, .sd-page .field select:focus-visible, .sd-page .field textarea:focus-visible {
  outline: none;
  background-color: var(--sd-paper);
  box-shadow: var(--sd-inset-1), 0 0 0 2.5px #365db8;
}

/* Choice chips (radio and checkbox) */
.sd-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-choice { position: relative; display: inline-flex; }
.sd-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.sd-choice span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--sd-ink-2);
  background: var(--sd-ground);
  box-shadow: inset 0 0 0 1px var(--sd-line);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.4;
  transition: background-color .2s var(--sd-ease-ui), color .2s var(--sd-ease-ui), box-shadow .2s var(--sd-ease-ui);
}
.sd-choice span i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--g-hi, #5d435a), var(--g-base, #2b1b2a) 60%, var(--g-deep, #170a16));
}
.sd-choice:hover span { color: var(--sd-ink); box-shadow: inset 0 0 0 1px var(--sd-line-2); }
.sd-choice input:checked + span {
  color: var(--sd-on);
  background:
    linear-gradient(to bottom, rgb(255 255 255 / .18), transparent 50%),
    radial-gradient(120% 140% at var(--sd-light-x) 0%, #5d435a, #2b1b2a 60%, #170a16);
  box-shadow: inset 0 -3px 8px -4px rgb(0 0 0 / .45), 0 6px 14px -8px rgb(23 10 22 / .7);
}
.sd-choice[data-gel] input:checked + span {
  color: var(--g-on);
  background:
    linear-gradient(to bottom, rgb(255 255 255 / .3), transparent 46%),
    radial-gradient(130% 110% at var(--sd-light-x) 0%, var(--g-hi), var(--g-base) 58%, var(--g-deep));
  box-shadow: inset 0 -4px 8px -4px rgb(43 27 42 / .32), 0 6px 14px -8px var(--g-shadow);
}
.sd-choice input:checked + span i { background: rgb(255 255 255 / .85); }
.sd-choice input:focus-visible + span { outline: 2.5px solid #365db8; outline-offset: 2px; }

/* Active filters --------------------------------------------------------------- */

.sd-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sd-active__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  padding-inline-end: 10px;
  border-radius: 999px;
  color: var(--sd-ink);
  background: var(--sd-paper);
  box-shadow: inset 0 0 0 1px var(--sd-line-2);
  font-size: 14px;
  font-weight: 620;
  text-decoration: none;
}
.sd-active__chip .sd-icon { width: 16px; height: 16px; color: var(--sd-ink-3); }
.sd-active__chip:hover { box-shadow: inset 0 0 0 1.5px var(--sd-ink-3); }
.sd-active__chip:hover .sd-icon { color: var(--sd-ink); }

/* Pager ------------------------------------------------------------------------ */

.sd-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.sd-pager__status { color: var(--sd-ink-3); font-size: 14px; }
.sd-pager__gap { min-width: 1px; }
[dir="ltr"] .sd-pager .sd-icon { transform: scaleX(-1); }

/* Empty state extras ------------------------------------------------------------- */

.sd-empty__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Program card (course) and card states ------------------------------------------ */

.sd-program__line { color: var(--sd-ink-2); font-size: 15px; line-height: 1.85; }
.sd-program__facts { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--sd-ink-3); font-size: 14px; line-height: 1.6; }
.sd-class--static:hover { box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line); }
.sd-class--static:active { transform: none; }
.sd-class--static:hover .sd-o--main, .sd-class--static:hover .sd-o--a { translate: none; }
.sd-class__action { position: relative; z-index: 4; justify-self: start; align-self: flex-start; margin-top: 4px; }

/* Term group (calendar) ---------------------------------------------------------- */

.sd-term { display: grid; gap: 18px; }
.sd-term + .sd-term { margin-top: clamp(28px, 4vw, 48px); }
.sd-term__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sd-line);
}
.sd-term__title { font-size: clamp(20px, 1rem + .5vw, 24px); font-weight: 780; line-height: 1.5; }
.sd-term__dates { color: var(--sd-ink-3); font-size: 14.5px; }

/* Countdowns --------------------------------------------------------------------- */

.sd-countdowns { display: grid; gap: 12px; margin-bottom: clamp(24px, 3vw, 36px); }
.sd-countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 16px 20px;
  border-radius: var(--sd-r-l);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
}
.sd-countdown__copy { display: grid; gap: 2px; }
.sd-countdown__title { font-size: 17px; font-weight: 750; line-height: 1.6; }
.sd-countdown time, .sd-countdown__done { color: var(--sd-ink-3); font-size: 14px; }
.sd-countdown__units { display: flex; gap: 8px; }
.sd-countdown__units div {
  display: grid;
  justify-items: center;
  min-width: 60px;
  padding: 6px 8px 4px;
  border-radius: var(--sd-r-s);
  background: var(--sd-ground);
  box-shadow: var(--sd-inset-1);
}
.sd-countdown__units strong { font-size: 22px; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; }
.sd-countdown__units span { color: var(--sd-ink-3); font-size: 12px; }

/* Detail layout: content and a sticky aside ---------------------------------------- */

.sd-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  align-items: start;
  gap: clamp(28px, 4vw, 72px);
  padding-bottom: clamp(56px, 7vw, 112px);
}
.sd-detail__main { display: grid; gap: clamp(44px, 5vw, 72px); min-width: 0; }
.sd-detail__aside { position: sticky; inset-block-start: calc(var(--sd-header-h) + 20px); display: grid; gap: 16px; }
.sd-block { display: grid; gap: 18px; min-width: 0; scroll-margin-top: calc(var(--sd-header-h) + 24px); }
.sd-block__title { font-size: clamp(22px, 1rem + .8vw, 30px); font-weight: 780; line-height: 1.45; }
.sd-block__lede { max-width: 36em; color: var(--sd-ink-2); }
.sd-block__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }

/* In-page jump links */
.sd-jump {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin-bottom: clamp(28px, 4vw, 48px);
  padding: 5px;
  border-radius: 999px;
  background: rgb(255 250 249 / .82);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  overflow-x: auto;
  scrollbar-width: none;
}
.sd-jump::-webkit-scrollbar { display: none; }
.sd-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--sd-ink-2);
  font-size: 14.5px;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
}
.sd-jump a:hover { color: var(--sd-ink); background: var(--sd-ground); }

/* Facts grid --------------------------------------------------------------------- */

.sd-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  border-radius: var(--sd-r-l);
  background: var(--sd-line);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
  overflow: hidden;
}
.sd-facts > div { display: grid; flex: 1 1 190px; align-content: start; gap: 2px; padding: 16px 20px; background: var(--sd-paper); }
.sd-facts dt { color: var(--sd-ink-3); font-size: 13.5px; font-weight: 600; line-height: 1.6; }
.sd-facts dd { color: var(--sd-ink); font-size: 16px; font-weight: 700; line-height: 1.65; }
.sd-facts dd a { text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 4px; }

/* Ticket: the class page's decision panel ------------------------------------------- */

.sd-ticket {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: var(--sd-r-xl);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-2), inset 0 0 0 1px var(--sd-line);
}
.sd-ticket__price { display: grid; gap: 0; }
.sd-ticket__price span { color: var(--sd-ink-3); font-size: 14px; font-weight: 600; }
.sd-ticket__price strong { font-size: clamp(26px, 1rem + 1vw, 32px); font-weight: 820; line-height: 1.4; }
.sd-ticket__rows { display: grid; gap: 10px; padding-block: 16px; border-block: 1px dashed var(--sd-line-2); }
.sd-ticket__rows > div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; line-height: 1.7; }
.sd-ticket__rows dt { color: var(--sd-ink-3); }
.sd-ticket__rows dd { color: var(--sd-ink); font-weight: 650; text-align: end; }
.sd-ticket__actions { display: grid; gap: 10px; }
.sd-ticket__fine { color: var(--sd-ink-3); font-size: 13.5px; line-height: 1.8; }
.sd-ticket__fine a { color: var(--sd-ink-2); }

/* Places meter: how full the class is */
.sd-meter { display: grid; gap: 8px; }
.sd-meter__track {
  height: 12px;
  border-radius: 999px;
  background: var(--sd-ground);
  box-shadow: var(--sd-inset-1);
  overflow: hidden;
}
.sd-meter__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgb(255 255 255 / .35), transparent 60%), linear-gradient(90deg, var(--g-deep), var(--g-base));
}
.sd-meter__label { display: flex; justify-content: space-between; gap: 12px; color: var(--sd-ink-2); font-size: 14px; }

/* Prose (rich text from the CMS) ------------------------------------------------------ */

.sd-prose { max-width: 42em; color: var(--sd-ink-2); font-size: 17px; line-height: 2; overflow-wrap: anywhere; }
.sd-prose > * + * { margin-top: 1em; }
.sd-prose h2, .sd-prose h3, .sd-prose h4 { color: var(--sd-ink); line-height: 1.55; }
.sd-prose h2 { margin-top: 1.7em; font-size: clamp(23px, 1rem + .6vw, 28px); font-weight: 780; }
.sd-prose h3 { margin-top: 1.5em; font-size: 21px; font-weight: 740; }
.sd-prose h4 { margin-top: 1.3em; font-size: 18px; font-weight: 720; }
.sd-prose > :first-child { margin-top: 0; }
.sd-prose a { color: #26499b; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.sd-prose a:hover { text-decoration-color: currentColor; }
.sd-prose strong, .sd-prose b { color: var(--sd-ink); font-weight: 720; }
.sd-prose ul, .sd-prose ol { padding-inline-start: 1.4em; }
.sd-prose li + li { margin-top: .4em; }
.sd-prose li::marker { color: var(--sd-ink-3); }
.sd-prose blockquote {
  margin-inline: 0;
  padding: 18px 24px;
  border-radius: 28px 28px 8px 28px;
  color: var(--sd-ink);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
}
[dir="ltr"] .sd-prose blockquote { border-radius: 28px 28px 28px 8px; }
.sd-prose img { border-radius: var(--sd-r-m); }
.sd-prose figure figcaption { margin-top: 8px; color: var(--sd-ink-3); font-size: 14px; }
.sd-prose hr { height: 1px; border: 0; background: var(--sd-line); }
.sd-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.sd-prose th, .sd-prose td { padding: 10px 12px; border-bottom: 1px solid var(--sd-line); text-align: start; vertical-align: top; }
.sd-prose th { color: var(--sd-ink); font-weight: 700; }
.sd-prose--wide { max-width: none; }
.sd-prose iframe { max-width: 100%; border: 0; border-radius: var(--sd-r-m); }

/* Learning path: headed blocks of course content ------------------------------------- */

.sd-path { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sd-path > li {
  display: grid;
  gap: 8px;
  padding: 20px 24px;
  border-radius: var(--sd-r-l);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
}
.sd-path h3 { font-size: 18px; font-weight: 740; line-height: 1.6; }
.sd-path .sd-prose { font-size: 16px; line-height: 1.95; }

/* Panels, two-column splits and plain lists -------------------------------------------- */

.sd-surface {
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--sd-r-xl);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
}
.sd-split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(24px, 4vw, 64px);
}
.sd-split > .sd-section__head { position: sticky; inset-block-start: calc(var(--sd-header-h) + 24px); margin-bottom: 0; }
.sd-links { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sd-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--sd-line);
  color: var(--sd-ink);
  font-weight: 650;
  text-decoration: none;
}
.sd-links a:hover { color: #26499b; }
.sd-links .sd-icon { width: 18px; height: 18px; color: var(--sd-ink-3); }
[dir="ltr"] .sd-links .sd-icon { transform: scaleX(-1); }

/* Article and book cards -------------------------------------------------------------- */

.sd-note {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--sd-r-l);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow .3s var(--sd-ease-ui);
}
.sd-note:hover { box-shadow: var(--sd-sh-2), inset 0 0 0 1px var(--sd-line-2); }
.sd-note:focus-within, .sd-book:focus-within { box-shadow: var(--sd-sh-2), 0 0 0 2.5px #365db8; }
.sd-note__media { aspect-ratio: 16 / 9; background: var(--sd-ground-2); }
.sd-note__media img { width: 100%; height: 100%; object-fit: cover; }
.sd-note__body { display: grid; align-content: start; gap: 10px; padding: 20px 22px 24px; }
.sd-note__meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--sd-ink-3); font-size: 14px; line-height: 1.6; }
.sd-note__title { font-size: 19px; font-weight: 750; line-height: 1.6; }
.sd-note__text { color: var(--sd-ink-2); font-size: 15.5px; line-height: 1.85; }

.sd-book {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  height: 100%;
  padding: 16px;
  border-radius: var(--sd-r-l);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
  isolation: isolate;
  transition: box-shadow .3s var(--sd-ease-ui);
}
.sd-book:hover { box-shadow: var(--sd-sh-2), inset 0 0 0 1px var(--sd-line-2); }
.sd-book__cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 6px 12px 12px 6px;
  overflow: hidden;
  background: radial-gradient(130% 110% at var(--sd-light-x) 0%, var(--g-hi), var(--g-base) 58%, var(--g-deep));
  box-shadow: 0 10px 18px -10px var(--g-shadow), inset 0 1px 0 rgb(255 255 255 / .5);
}
[dir="rtl"] .sd-book__cover { border-radius: 12px 6px 6px 12px; }
.sd-book__cover img { width: 100%; height: 100%; object-fit: cover; }
.sd-book__spine { position: absolute; inset-block: 0; inset-inline-end: 0; width: 9px; background: rgb(0 0 0 / .14); }
.sd-book__mark {
  position: absolute;
  inset-inline: 10px;
  inset-block-end: 10px;
  color: var(--g-on);
  font: 650 11px/1.35 var(--sd-font-latin);
  letter-spacing: -.01em;
  text-align: left;
}
.sd-book__body { display: grid; gap: 6px; padding-top: 2px; }
.sd-book__title { font-size: 17px; font-weight: 750; line-height: 1.6; }
.sd-book__original { color: var(--sd-ink-2); font: 500 14px/1.5 var(--sd-font-latin); text-align: right; }
[dir="ltr"] .sd-book__original { text-align: left; }
.sd-book__by { color: var(--sd-ink-3); font-size: 14px; }

.sd-person__photo {
  grid-row: span 2;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

/* Gallery ------------------------------------------------------------------------------ */

.sd-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sd-gallery figure { display: grid; gap: 8px; }
.sd-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--sd-r-m);
  object-fit: cover;
  background: var(--sd-ground-2);
}
.sd-gallery figcaption { color: var(--sd-ink-3); font-size: 14px; line-height: 1.7; }

/* Tabs (contact intents) ------------------------------------------------------------------ */

.sd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.sd-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: var(--sd-ink-2);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.sd-tab .sd-icon { width: 18px; height: 18px; }
.sd-tab:hover { color: var(--sd-ink); }
.sd-tab[aria-selected="true"] {
  color: var(--sd-on);
  background:
    linear-gradient(to bottom, rgb(255 255 255 / .18), transparent 50%),
    radial-gradient(120% 140% at var(--sd-light-x) 0%, #5d435a, #2b1b2a 60%, #170a16);
  box-shadow: inset 0 -3px 8px -4px rgb(0 0 0 / .45), 0 8px 16px -8px rgb(23 10 22 / .6);
}

/* Legacy form markup inside redesigned pages -------------------------------------------------
   components/form_field.html and inquiry_form.html keep their markup and site.js hooks;
   these rules give them the Soft Dialogue look. */

.sd-page .form-grid { display: grid; gap: 20px; }
.sd-page .form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sd-page .field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.sd-page .field > label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--sd-ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.6;
}
.sd-page .field-required {
  padding: 0 8px;
  border-radius: 999px;
  color: var(--sd-ink-3);
  background: var(--sd-ground);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.8;
}
.sd-page .field-help { color: var(--sd-ink-3); font-size: 14px; line-height: 1.8; }
.sd-page .field-error-text, .sd-page .errorlist { margin: 0; padding: 0; color: #a1241b; font-size: 14px; font-weight: 620; line-height: 1.7; list-style: none; }
.sd-page .field-error input:where(:not([type="checkbox"]):not([type="radio"])),
.sd-page .field-error select,
.sd-page .field-error textarea { box-shadow: var(--sd-inset-1), 0 0 0 2px #c4372c; background-color: #fff3f1; }
/* A focused invalid field keeps its error ring inside the focus ring. */
.sd-page .field-error input:where(:not([type="checkbox"]):not([type="radio"])):focus-visible,
.sd-page .field-error select:focus-visible,
.sd-page .field-error textarea:focus-visible { box-shadow: var(--sd-inset-1), 0 0 0 2px #c4372c, 0 0 0 4.5px #365db8; }
.sd-page .field-checkbox > label { align-items: flex-start; flex-wrap: nowrap; gap: 12px; font-weight: 520; color: var(--sd-ink-2); }
.sd-page .field input[type="checkbox"],
.sd-page .field input[type="radio"] { flex: none; width: 22px; height: 22px; margin: 3px 0 0; accent-color: #2b1b2a; }
.sd-page .field input[type="file"] { max-width: 100%; color: var(--sd-ink-2); font-size: 15px; }
.sd-page .field input[type="file"]::file-selector-button {
  margin-inline-end: 12px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  color: var(--sd-ink);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line-2);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.sd-page .form-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 4px; }
.sd-page .form-submit-row p { color: var(--sd-ink-3); font-size: 14px; }

.sd-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: var(--sd-ink);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
  font: 650 15.5px/1.2 var(--sd-font-fa);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .45s var(--sd-ease-spring), box-shadow .25s var(--sd-ease-ui);
}
.sd-page .btn:active { transform: scale(.96, .9); transition-duration: .12s; }
.sd-page .btn .icon, .sd-page .btn svg { width: 20px; height: 20px; }
.sd-page .btn-accent, .sd-page .btn-primary {
  color: var(--sd-on);
  background:
    linear-gradient(to bottom, rgb(255 255 255 / .2), transparent 50%),
    radial-gradient(120% 140% at var(--sd-light-x) 0%, #5d435a, #2b1b2a 60%, #170a16);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), inset 0 -4px 10px -4px rgb(0 0 0 / .45), 0 10px 22px -10px rgb(23 10 22 / .7);
}
.sd-page .btn-ghost { background: transparent; box-shadow: none; color: var(--sd-ink-2); }
.sd-page .btn-ghost:hover { color: var(--sd-ink); background: rgb(255 255 255 / .55); }
.sd-page .btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.sd-page .btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.sd-page .btn[disabled], .sd-page .btn.is-loading, .sd-btn[disabled] { opacity: .65; cursor: progress; }

.sd-page .alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--sd-r-m);
  color: var(--sd-ink);
  background: var(--sd-paper);
  box-shadow: inset 0 0 0 1px var(--sd-line);
  font-size: 15px;
  line-height: 1.8;
}
.sd-page .alert strong { display: block; font-weight: 720; }
.sd-page .alert-error { color: #6e1a12; background: #fde9e6; box-shadow: inset 0 0 0 1px #f3c4bd; }
.sd-page .alert-success { color: #22501d; background: #e6f4dc; box-shadow: inset 0 0 0 1px #c5e2b2; }
.sd-page .alert-info, .sd-page .alert-warning { color: #1f3c80; background: #e6eeff; box-shadow: inset 0 0 0 1px #c6d6f6; }
.sd-page .alert-mark {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: .7;
}
.sd-page form.is-pending { cursor: progress; }

/* Note boxes ------------------------------------------------------------------------------- */

.sd-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--sd-r-m);
  color: var(--sd-ink-2);
  background: rgb(255 250 249 / .7);
  box-shadow: inset 0 0 0 1px var(--sd-line);
  font-size: 15px;
  line-height: 1.85;
}
.sd-callout .sd-icon { width: 20px; height: 20px; margin-top: 5px; color: var(--sd-ink-3); }
.sd-callout--gel { background: var(--g-soft); box-shadow: none; color: var(--sd-ink); }
.sd-callout--gel .sd-icon { color: var(--g-ink); }

/* Responsive -------------------------------------------------------------------------------- */

@media (max-width: 1079px) {
  .sd-head__grid { grid-template-columns: 1fr; }
  .sd-head__art { justify-self: start; max-width: 360px; }
  .sd-detail { grid-template-columns: minmax(0, 1fr); }
  .sd-detail__aside { position: static; order: -1; }
  .sd-head__art:has(.sd-head__object) { display: none; }
  .sd-head__art.sd-head__art--media { display: block; }
  .sd-split { grid-template-columns: minmax(0, 1fr); }
  .sd-split > .sd-section__head { position: static; }
}

@media (max-width: 1023px) {
  .sd-listing__grid { grid-template-columns: minmax(0, 1fr); }
  .sd-filters { position: static; max-height: none; }
  .sd-filters-btn { display: inline-flex; }
  .sd-filters-btn[hidden] { display: none; }
  .sd-filters.is-enhanced {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 90;
    max-height: min(88vh, 760px);
    border-radius: var(--sd-r-xl) var(--sd-r-xl) 0 0;
    box-shadow: 0 0 0 100vmax rgb(30 17 28 / 0), var(--sd-sh-3);
    transform: translateY(104%);
    visibility: hidden;
    transition: transform .42s var(--sd-ease-out), box-shadow .42s var(--sd-ease-ui), visibility 0s linear .42s;
  }
  .sd-filters.is-enhanced.is-open {
    transform: none;
    visibility: visible;
    box-shadow: 0 0 0 100vmax rgb(30 17 28 / .42), var(--sd-sh-3);
    transition: transform .42s var(--sd-ease-out), box-shadow .42s var(--sd-ease-ui);
  }
  .sd-filters.is-enhanced .sd-filters__close { display: inline-grid; }
  .sd-filters.is-enhanced .sd-filters__head { position: sticky; inset-block-start: 0; z-index: 2; padding-top: 14px; background: var(--sd-paper); }
  .sd-filters.is-enhanced .sd-filters__head::before {
    content: "";
    position: absolute;
    inset-block-start: 6px;
    inset-inline-start: 50%;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--sd-line-2);
    transform: translateX(-50%);
  }
  .sd-filters__foot { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media (max-width: 760px) {
  .sd-page .form-grid--two { grid-template-columns: minmax(0, 1fr); }
  .sd-countdown { padding: 16px; }
  .sd-countdown__units div { min-width: 0; flex: 1; }
  .sd-countdown__units { width: 100%; }
}

@media (max-width: 599px) {
  .sd-head__title { font-size: clamp(32px, 9vw, 42px); }
  .sd-head__actions { width: 100%; }
  .sd-head__actions .sd-btn { flex: 1 1 100%; }
  .sd-head__art { max-width: 280px; }
  .sd-head__object { border-radius: var(--sd-r-xl); }
  .sd-switch { display: flex; width: 100%; }
  .sd-switch a { flex: 1 1 0; justify-content: center; padding: 0 10px; }
  .sd-switch small { display: none; }
  .sd-head__speech .sd-bubble { width: min(220px, 70%); }
  .sd-ticket { padding: 20px; border-radius: var(--sd-r-l); }
  .sd-surface { border-radius: var(--sd-r-l); }
  .sd-book { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
  .sd-facts > div { flex-basis: 130px; padding: 14px 16px; }
  .sd-facts dd { font-size: 15px; }
  .sd-jump { margin-inline: calc(var(--sd-gutter) * -1); border-radius: 0; width: auto; max-width: none; padding-inline: var(--sd-gutter); box-shadow: inset 0 -1px 0 var(--sd-line), inset 0 1px 0 var(--sd-line); }
}

@media (prefers-reduced-motion: reduce) {
  .sd-filters.is-enhanced, .sd-filters.is-enhanced.is-open, .sd-filters__more > summary .sd-icon, .sd-choice span, .sd-page .btn, .sd-switch a { transition: none; }
  .sd-page .btn:active { transform: none; }
}
[data-motion-level="none"] .sd-filters.is-enhanced,
[data-motion-level="none"] .sd-filters.is-enhanced.is-open { transition: none; }

/* Language flags inside redesigned pages */
.sd-page .language-flag { display: inline-flex; flex: none; }
.sd-page .language-flag img { width: 22px; height: 16.5px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgb(43 27 42 / .08); }

.sd-page-banners { margin-bottom: clamp(20px, 3vw, 32px); }
.sd-detail--single { grid-template-columns: minmax(0, 1fr); }
.sd-course-facts { margin-bottom: clamp(20px, 3vw, 32px); }
.sd-callback { padding-top: clamp(48px, 6vw, 96px); }

/* Inquiry forms: two columns on wide panels; long fields, notices and the submit row span both. */
@media (min-width: 761px) {
  .sd-page .inquiry-form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
  .sd-page .inquiry-form > :is(.alert, .form-submit-row, .field-checkbox, .field-error-text),
  .sd-page .inquiry-form > .field:has(textarea) { grid-column: 1 / -1; }
}
.sd-block__aside { color: var(--sd-ink-3); font-size: .62em; font-weight: 600; }
.sd-block.sd-split { gap: clamp(16px, 4vw, 64px); }
.sd-head .sd-switch { margin-top: 10px; }
.sd-results__aside { margin-top: 8px; color: var(--sd-ink-3); font-size: 14.5px; }
.sd-head__copy > .sd-crumbs { margin-bottom: -6px; }
.sd-filters .field select { min-height: 48px; }
.sd-checklist__note { display: block; color: var(--sd-ink-3); font-size: 14px; }
.sd-checklist--quiet .sd-icon { color: var(--sd-ink-3); }
.sd-ticket .sd-state { justify-self: start; }
.sd-detail__aside > .sd-ticket__fine { padding-inline: 8px; }
/* main is its own stacking context (z-index 2); lift it while a filter sheet is open
   so the sheet and its scrim cover the header and the mobile action bar. */
.sd-page .sd-site:has(.sd-filters.is-open), .sd-page main:has(.sd-filters.is-open) { z-index: 60; }

/* Teacher card (list) ---------------------------------------------------------------- */

.sd-teacher {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  height: 100%;
  padding: 22px;
  border-radius: var(--sd-r-l);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
  isolation: isolate;
  transition: box-shadow .3s var(--sd-ease-ui);
}
.sd-teacher:hover { box-shadow: var(--sd-sh-2), inset 0 0 0 1px var(--sd-line-2); }
.sd-teacher:focus-within { box-shadow: var(--sd-sh-2), 0 0 0 2.5px #365db8; }
.sd-teacher:hover .sd-person__drop { transform: rotate(-8deg) scale(1.04); }
.sd-teacher .sd-person__drop { grid-row: auto; }
.sd-teacher__body { display: grid; gap: 6px; min-width: 0; }
.sd-teacher__name { font-size: 19px; font-weight: 760; line-height: 1.55; }
.sd-teacher__role { color: var(--sd-ink-3); font-size: 14.5px; }
.sd-teacher__langs { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.sd-teacher__line { margin-top: 4px; color: var(--sd-ink-2); font-size: 15px; line-height: 1.85; }
.sd-head .sd-teacher__role { margin-top: -8px; font-size: 16px; }

/* Place card (about, contact) ----------------------------------------------------------- */

.sd-place-card__title { font-size: 19px; font-weight: 760; line-height: 1.6; }
.sd-place-card__facts { display: grid; gap: 14px; }
.sd-place-card__facts > div { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; }
.sd-place-card__facts dt { color: var(--sd-ink-3); padding-top: 4px; }
.sd-place-card__facts dt .sd-icon { width: 20px; height: 20px; }
.sd-place-card__facts dd { color: var(--sd-ink); font-weight: 600; line-height: 1.85; }
.sd-place-card__facts a { text-decoration: none; }
.sd-place-card__facts a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sd-reading { padding-bottom: clamp(64px, 8vw, 128px); }
@media (max-width: 1079px) { .sd-detail__aside--late { order: 0; } }

/* Contact ------------------------------------------------------------------------------- */

.sd-contact { display: grid; gap: 4px; }
.sd-contact__panel { display: grid; gap: 12px; scroll-margin-top: calc(var(--sd-header-h) + 24px); }
.sd-contact__panel .sd-surface { margin-top: 8px; }
.sd-contact:not(.is-ready) .sd-contact__panel + .sd-contact__panel { margin-top: 48px; }
.sd-place-card__facts small { color: var(--sd-ink-3); font-weight: 500; }

/* Horizontal filter bar (articles, books) ------------------------------------------------ */

.sd-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--sd-r-l);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
}
.sd-filterbar__types { flex: 1 1 320px; }
.sd-filterbar .sd-field { min-width: 180px; }
.sd-filterbar__actions { display: flex; gap: 8px; }

/* Article reading ------------------------------------------------------------------------- */

.sd-article__measure { max-width: calc(46em + 2 * var(--sd-gutter)); }
.sd-article__title { max-width: none; font-size: clamp(30px, 1rem + 2.6vw, 52px); }
.sd-article__byline { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--sd-ink-3); font-size: 15px; }
.sd-article__figure { max-width: calc(64em + 2 * var(--sd-gutter)); margin-bottom: clamp(28px, 4vw, 48px); }
.sd-article__figure img { width: 100%; max-height: 560px; border-radius: var(--sd-r-xl); object-fit: cover; }
.sd-article__body { font-size: 18px; line-height: 2.05; }
.sd-article__tags { margin-top: 36px; }
.sd-related { padding-top: 0; }
.sd-book__cover--large { width: min(260px, 70%); margin-inline: auto; border-radius: 10px 20px 20px 10px; box-shadow: var(--sd-sh-3); }
[dir="rtl"] .sd-book__cover--large { border-radius: 20px 10px 10px 20px; }
.sd-book__cover--large .sd-book__mark { font-size: 18px; inset-inline: 22px; inset-block-end: 22px; }
.sd-book__cover--large .sd-book__spine { width: 16px; }
.sd-book__headline { margin-top: -8px; color: var(--sd-ink-2); font-size: clamp(18px, 1rem + .6vw, 24px); text-align: right; }
[dir="ltr"] .sd-book__headline { text-align: left; }

/* Search page ------------------------------------------------------------------------------ */

.sd-search-page__copy { max-width: 760px; }
.sd-search-page__form { display: flex; gap: 10px; width: 100%; }
.sd-search-page__form .sd-input { flex: 1; min-height: 56px; background: var(--sd-paper); font-size: 17px; }
.sd-search-page__form .sd-btn { min-height: 56px; }
.sd-search-page__lang { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.sd-search-page__lang small { flex-basis: 100%; color: var(--sd-ink-3); font-size: 14px; font-weight: 500; }
@media (max-width: 599px) { .sd-search-page__form .sd-btn { padding: 0 16px; } }
.sd-error { min-height: min(72vh, 720px); display: grid; align-items: center; }
.sd-error__speech .sd-bubble { width: min(340px, 86%); font-size: min(96px, 18cqi); }
@media (max-width: 1079px) { .sd-error__speech .sd-bubble { width: min(240px, 70%); } }

/* Account airlock ------------------------------------------------------------------------- */

.sd-airlock { position: relative; isolation: isolate; overflow-x: clip; padding-block: clamp(28px, 5vw, 72px) clamp(64px, 8vw, 120px); }
.sd-airlock::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline-end: -10vw;
  inset-block-start: -20vw;
  width: min(60vw, 820px);
  aspect-ratio: 1.4;
  border-radius: 50%;
  background: radial-gradient(closest-side, #d9e7ff, transparent);
  opacity: .8;
  pointer-events: none;
}
.sd-airlock__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: start;
  gap: clamp(28px, 6vw, 96px);
  max-width: calc(1120px + 2 * var(--sd-gutter));
}
.sd-airlock__grid--narrow { grid-template-columns: minmax(0, 520px); justify-content: center; }
.sd-airlock__context { display: grid; justify-items: start; gap: 16px; padding-top: 12px; }
.sd-airlock__title { font-size: clamp(30px, 1rem + 2.4vw, 50px); font-weight: 820; line-height: 1.28; }
.sd-airlock__lede { max-width: 30em; color: var(--sd-ink-2); font-size: 18px; line-height: 1.9; }
.sd-airlock__card { gap: 20px; }
.sd-airlock__card-title { font-size: 20px; font-weight: 760; line-height: 1.5; }
.sd-airlock__card-lede { margin-top: -12px; color: var(--sd-ink-3); font-size: 14.5px; }
.sd-airlock__links { display: grid; gap: 8px; padding-top: 16px; border-top: 1px dashed var(--sd-line-2); color: var(--sd-ink-2); font-size: 15px; }
.sd-airlock__links a { color: #26499b; font-weight: 620; }
.sd-airlock__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sd-airlock__row form { margin: 0; }
.sd-airlock .btn-block { width: 100%; }
.sd-airlock .btn-text { background: transparent; box-shadow: none; color: var(--sd-ink-2); }
.sd-airlock .btn-secondary { background: var(--sd-paper); }
.sd-airlock .form-grid { gap: 18px; }
.sd-airlock__done { display: grid; justify-items: center; gap: 14px; text-align: center; }
.sd-airlock__done .sd-airlock__mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: var(--g-on);
  background:
    linear-gradient(to bottom, rgb(255 255 255 / .3), transparent 46%),
    radial-gradient(130% 110% at var(--sd-light-x) 0%, var(--g-hi), var(--g-base) 58%, var(--g-deep));
  box-shadow: inset 0 -6px 12px -6px rgb(43 27 42 / .32), 0 10px 22px -12px var(--g-shadow);
}
.sd-airlock__done .sd-airlock__mark .sd-icon { width: 32px; height: 32px; stroke-width: 2.4; }
.sd-steps-mini { display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; counter-reset: sd-step; }
.sd-steps-mini li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--sd-ink-2); font-size: 15.5px; line-height: 1.8; counter-increment: sd-step; }
.sd-steps-mini li::before {
  content: counter(sd-step, persian);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--sd-ink);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-1), inset 0 0 0 1px var(--sd-line);
  font-size: 14px;
  font-weight: 750;
}
.sd-steps-mini li[aria-current="step"]::before { color: var(--sd-on); background: var(--sd-ink); box-shadow: none; }
.sd-steps-mini strong { color: var(--sd-ink); font-weight: 700; }
@media (max-width: 860px) {
  .sd-airlock__grid { grid-template-columns: minmax(0, 1fr); }
  .sd-airlock__context { padding-top: 0; }
}

/* Registration flow (task-focused, behind the account airlock) ------------------------------ */

.sd-flow { padding-block: clamp(20px, 4vw, 48px) clamp(64px, 8vw, 120px); }
.sd-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 clamp(20px, 3vw, 32px);
  padding: 0;
  list-style: none;
  counter-reset: sd-flow;
}
.sd-progress li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px 0 10px;
  padding-inline-start: 6px;
  border-radius: 999px;
  color: var(--sd-ink-3);
  background: rgb(255 250 249 / .6);
  box-shadow: inset 0 0 0 1px var(--sd-line);
  font-size: 14px;
  font-weight: 620;
  counter-increment: sd-flow;
}
.sd-progress li::before {
  content: counter(sd-flow, persian);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sd-ground);
  font-size: 13px;
  font-weight: 750;
}
.sd-progress li.is-complete { color: #326a2d; }
.sd-progress li.is-complete::before { content: "✓"; color: #fff; background: #57914a; }
.sd-progress li.is-current { color: var(--sd-on); background: var(--sd-ink); box-shadow: none; }
.sd-progress li.is-current::before { color: var(--sd-ink); background: var(--sd-paper); }
.sd-flow__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: start;
  gap: clamp(20px, 3vw, 40px);
}
.sd-flow__card { padding: clamp(20px, 3vw, 32px); }
.sd-flow__summary { position: sticky; inset-block-start: calc(var(--sd-header-h) + 20px); }
.sd-flow__class { gap: 14px; }
.sd-flow__class-title { font-size: 19px; font-weight: 760; line-height: 1.6; }

/* Legacy inner markup of the flow forms */
.sd-flow .registration-panel-heading { display: grid; gap: 6px; }
.sd-flow .registration-panel-heading .eyebrow { color: var(--sd-ink-3); font-size: 14px; font-weight: 650; }
.sd-flow .registration-panel-heading .type-h2 { font-size: clamp(24px, 1rem + 1vw, 32px); font-weight: 800; line-height: 1.4; }
.sd-flow .registration-panel-heading p:last-child { color: var(--sd-ink-2); }
.sd-flow .registration-summary {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px 18px;
  border-radius: var(--sd-r-m);
  background: var(--sd-ground);
}
.sd-flow .registration-summary > div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.sd-flow .registration-summary dt { color: var(--sd-ink-3); }
.sd-flow .registration-summary dd { margin: 0; color: var(--sd-ink); font-weight: 650; text-align: end; }
.sd-flow .registration-legal-document { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--sd-r-m); box-shadow: inset 0 0 0 1px var(--sd-line); }
.sd-flow .registration-terms-copy { color: var(--sd-ink-3); font-size: 14px; line-height: 1.8; }
.sd-flow .registration-terms-copy a { color: #26499b; }
.sd-flow .registration-automatic-checks { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--sd-r-m); background: #e6eeff; color: #1f3c80; font-size: 15px; }
.sd-flow .registration-automatic-checks ul { margin: 0; padding-inline-start: 1.2em; }
.sd-flow .registration-automatic-checks small { display: block; opacity: .85; }
.sd-flow .sd-ticket > * + * { margin-top: 0; }
@media (max-width: 960px) {
  .sd-flow__grid { grid-template-columns: minmax(0, 1fr); }
  .sd-flow__summary { position: static; order: -1; }
}

/* Reservation, payment and waitlist status pages (legacy markup, Soft Dialogue look) ---------- */

.sd-flow .registration-confirmation-shell { width: 100%; max-width: calc(880px + 2 * var(--sd-gutter)); margin-inline: auto; padding-inline: var(--sd-gutter); }
.sd-flow .registration-confirmation-card {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--sd-r-xl);
  background: var(--sd-paper);
  box-shadow: var(--sd-sh-2), inset 0 0 0 1px var(--sd-line);
}
.sd-flow .registration-confirmation-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #132e11;
  background:
    linear-gradient(to bottom, rgb(255 255 255 / .3), transparent 46%),
    radial-gradient(130% 110% at var(--sd-light-x) 0%, #bcdf90, #90c770 58%, #57914a);
  box-shadow: inset 0 -6px 12px -6px rgb(43 27 42 / .32), 0 10px 22px -12px rgb(50 106 45 / .5);
}
.sd-flow .registration-confirmation-mark .sd-icon { width: 28px; height: 28px; stroke-width: 2.4; }
.sd-flow .registration-confirmation-mark-error {
  color: #fff8f7;
  background:
    linear-gradient(to bottom, rgb(255 255 255 / .3), transparent 46%),
    radial-gradient(130% 110% at var(--sd-light-x) 0%, #f45a54, #d02940 58%, #900d2a);
}
.sd-flow .eyebrow { color: var(--sd-ink-3); font-size: 14px; font-weight: 650; }
.sd-flow .type-h1 { font-size: clamp(28px, 1rem + 2vw, 44px); font-weight: 820; line-height: 1.3; }
.sd-flow .type-h3 { font-size: 20px; font-weight: 760; line-height: 1.5; }
.sd-flow .type-title-medium { font-size: 17px; font-weight: 720; }
.sd-flow .type-body-large { color: var(--sd-ink-2); font-size: 17px; line-height: 1.9; }
.sd-flow .registration-reference {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 12px 16px;
  border-radius: var(--sd-r-m);
  border: 1px dashed var(--sd-line-2);
  color: var(--sd-ink-3);
  font-size: 14px;
}
.sd-flow .registration-reference bdi { color: var(--sd-ink); font: 650 15px/1.4 var(--sd-font-latin); letter-spacing: .02em; }
.sd-flow :is(.registration-order-card, .registration-transfer-card, .registration-refund-card, .registration-withdrawal-card) {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: var(--sd-r-l);
  box-shadow: inset 0 0 0 1px var(--sd-line);
}
.sd-flow .registration-order-heading { display: grid; gap: 4px; }
.sd-flow :is(.registration-confirmation-actions, .registration-order-actions) { display: flex; flex-wrap: wrap; gap: 10px; }
.sd-flow .registration-payment-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sd-flow :is(.registration-refund-history, .registration-withdrawal-history) { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--sd-ink-2); font-size: 15px; }
.sd-flow .registration-legal-field { padding: 14px 16px; border-radius: var(--sd-r-m); box-shadow: inset 0 0 0 1px var(--sd-line); }
.sd-flow .waitlist-leave-form { margin: 0; }
.sd-page .badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--sd-ink-2);
  background: var(--sd-ground);
  font-size: 13px;
  font-weight: 650;
}
.sd-page .badge-info { color: #1f3c80; background: #e6eeff; }
.sd-page .badge-warning { color: #6d3d00; background: #fdf0d9; }
.sd-page .badge-success { color: #22501d; background: #e6f4dc; }
.sd-legal__facts { margin-bottom: clamp(28px, 4vw, 44px); }
.sd-reading > .sd-callout { margin-bottom: 20px; }
@media (max-width: 1079px) {
  .sd-head__art:has(.sd-head__drop, .sd-head__photo, .sd-book__cover--large) { order: -1; justify-self: start; max-width: none; width: auto; }
  .sd-head__drop { width: 104px; font-size: 48px; margin-inline: 0; }
  .sd-head__photo { width: 120px; margin-inline: 0; box-shadow: var(--sd-sh-2), 0 0 0 5px var(--sd-paper); }
  .sd-book__cover--large { width: 120px; margin-inline: 0; }
  .sd-book__cover--large .sd-book__mark { font-size: 12px; inset-inline: 12px; inset-block-end: 12px; }
  .sd-book__cover--large .sd-book__spine { width: 10px; }
}

/* Standalone error pages (500, CSRF 403) render without the shell; a quiet brand line replaces it. */
.sd-mini-head { padding-block: 22px 0; }
.sd-mini-head__brand { color: var(--sd-ink); font-size: 18px; font-weight: 820; text-decoration: none; }
.sd-mini-head__brand:focus-visible { outline: 2.5px solid #365db8; outline-offset: 4px; border-radius: 6px; }
