/* Student discount (student-discount.html only). A utility page in the
   shape of contact.html: a short title and one line, the request form
   beside how it works, then the student prices beside a few questions.
   No hero price, no product sections. Loaded after page.css (the plain
   page, its tokens, header, kicker, footer, toast) and fm.css (the solid
   button's lift, the text link, the screen-reader caption). The heading,
   the form card and its fields copy contact.css (its 3:1 control edge,
   white or card fill, 16 px text, green focus edge and soft ring), so
   that file need not be loaded. student-discount.js owns the form's
   checks. Every colour is a Clear token or a page.css / fm.css token. */

.sd-inline { font-weight: 600; color: var(--primary-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sd-inline:hover { text-decoration-thickness: 2px; }
.sd-inline:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 3px; }

/* ── 1 · Heading (contact.css's) ──────────────────────────────────── */
.sd-head { padding-top: 72px; }
.sd-head__title { margin-top: 18px; font-size: clamp(48px, 5.6vw, 72px); line-height: 1.02; font-weight: 700; letter-spacing: -0.045em; color: var(--ink); text-wrap: balance; }
.sd-head__lede { margin-top: 18px; max-width: 34em; font-size: 20px; line-height: 1.5; color: var(--muted-foreground); text-wrap: pretty; }

/* ── Layout ────────────────────────────────────────────────────────
   Two rows on one grid shape: the main thing left, a 340 px column
   right. One column from 900 px down. */
.sd-main { padding-top: 48px; }
.sd-lower { padding-top: 88px; }
.sd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 56px; row-gap: 40px; align-items: start; }

/* ── 2 · The form card (contact.css's .ct-form) ─────────────────── */
.sd-form-card { padding: 32px 36px 28px; border-radius: var(--radius-2xl); border: 1px solid var(--art-edge); background: var(--paper); box-shadow: var(--art-lift-front); scroll-margin-top: 96px; }
.sd-form__title { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.sd-form__lede { margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--muted-foreground); }

.form { display: grid; row-gap: 22px; margin-top: 24px; }
.field { display: grid; }
.field__label { margin-bottom: 8px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--card-foreground); }
.field__input { box-sizing: border-box; display: block; width: 100%; height: 48px; margin: 0; padding: 0 14px; border: 1px solid var(--input-border); border-radius: var(--radius-xl); background: var(--field-bg); color: var(--card-foreground); font: 16px/22px var(--font-sans); transition: border-color 150ms ease, box-shadow 150ms ease; }
.field__input:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ring) 22%, transparent); }
.field__select { position: relative; }
.field__select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; text-overflow: ellipsis; }
.field__select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: var(--muted-foreground); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") center / 16px 16px no-repeat; }
@media (forced-colors: active) { .field__select::after { background: CanvasText; } }
.field__hint { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }

/* Errors (student-discount.js adds them): the edge turns danger red and
   the message sits under the field with a mark, never colour alone. */
.field__input[aria-invalid="true"] { border-color: var(--danger); }
.field__input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px color-mix(in oklab, var(--danger) 22%, transparent); }
.field__error { display: flex; align-items: flex-start; gap: 7px; margin-top: 7px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--danger); }
.field__error svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.form__send { justify-self: start; min-width: 200px; margin-top: 6px; }
.form__send:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ring); }

/* The one piece of advice, under the button, a hairline above it. */
.sd-wait { display: flex; align-items: flex-start; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--hair-soft); font-size: 15px; line-height: 21px; color: var(--muted-foreground); }
.sd-wait b { font-weight: 650; color: var(--ink); }
.sd-wait svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ── How it works, who qualifies (contact.css's "ways", on the page) ─
   A small muted label over each; the steps numbered in ink in a neutral
   ring (no lane owns this). */
.sd-side { display: grid; row-gap: 32px; padding-top: 8px; }
.sd-label { font-size: 13px; line-height: 16px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); }
.sd-steps { counter-reset: sd-n; display: grid; row-gap: 18px; margin-top: 18px; }
.sd-steps li { counter-increment: sd-n; position: relative; padding-left: 44px; min-height: 30px; font-size: 16px; line-height: 1.5; color: var(--muted-foreground); text-wrap: pretty; }
.sd-steps li::before { content: counter(sd-n); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--border-strong); background: var(--paper); font-size: 14.5px; line-height: 1; font-weight: 700; color: var(--ink); }
.sd-steps b { display: block; font-weight: 650; color: var(--ink); }
.sd-who p { margin-top: 12px; font-size: 16px; line-height: 1.5; color: var(--card-foreground); text-wrap: pretty; }
.sd-free { padding-top: 22px; border-top: 1px solid var(--hair); font-size: 16px; line-height: 1.5; color: var(--muted-foreground); }
.sd-free b { font-weight: 650; color: var(--ink); }
.sd-free .sd-inline { white-space: nowrap; }

/* ── 3 · Student prices ────────────────────────────────────────────
   A modest heading (no section headline), then the table on paper:
   course left, the two prices right-aligned, the student price in ink. */
.sd-h2 { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); }
.sd-sub { margin-top: 8px; max-width: 34em; font-size: 16.5px; line-height: 1.5; color: var(--muted-foreground); text-wrap: pretty; }
.sd-table-card { margin-top: 22px; border-radius: var(--radius-xl); border: 1px solid var(--edge); background: var(--paper); box-shadow: var(--sheen); overflow: hidden; }
.sd-table { width: 100%; border-collapse: collapse; }
.sd-table th, .sd-table td { padding: 13px 20px; border-top: 1px solid var(--hair-soft); text-align: right; vertical-align: top; }
.sd-table thead th { white-space: nowrap; border-top: 0; padding-top: 13px; padding-bottom: 11px; font-size: 12.5px; line-height: 16px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
.sd-table tbody tr:first-child > * { border-top-color: var(--hair); }
.sd-table thead th:first-child, .sd-table tbody th { text-align: left; }
.sd-table tbody th { font-size: 16px; line-height: 22px; font-weight: 600; color: var(--ink); }
.sd-table tbody th small { display: block; margin-top: 2px; font-size: 14px; line-height: 19px; font-weight: 400; color: var(--muted-foreground); }
.sd-table td { width: 8.5em; font-size: 16.5px; line-height: 22px; color: var(--muted-foreground); white-space: nowrap; }
.sd-table td:last-child { width: 10em; font-weight: 650; color: var(--ink); }
.sd-table td.is-free { font-weight: 650; color: var(--primary-text); }
.sd-note { margin-top: 14px; font-size: 15px; line-height: 1.5; color: var(--muted-foreground); }

/* ── Questions: three short pairs, a soft rule between ─────────── */
.sd-qa { margin-top: 18px; border-top: 1px solid var(--hair); }
.sd-qa > div { padding: 16px 0 18px; border-bottom: 1px solid var(--hair-soft); }
.sd-qa dt { font-size: 16.5px; line-height: 1.4; font-weight: 650; color: var(--ink); }
.sd-qa dd { margin: 6px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--muted-foreground); text-wrap: pretty; }
.sd-more { margin-top: 18px; font-size: 15.5px; line-height: 1.5; color: var(--muted-foreground); }

/* The footer's links take a focus ring. */
.site-footer__links a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  .field__input { transition: none; }
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .sd-grid { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 40px; }
  .sd-form-card { padding: 28px 28px 26px; }
}
/* Tablet and phone: one column, the form first. */
@media (max-width: 900px) {
  .sd-grid { grid-template-columns: minmax(0, 1fr); row-gap: 36px; }
  .sd-form-card, .sd-side, .sd-prices, .sd-faq { max-width: 640px; }
  .sd-side { padding-top: 0; }
  .sd-lower { padding-top: 64px; }
  .sd-grid--lower { row-gap: 56px; }
}
@media (max-width: 768px) {
  .sd-head { padding-top: 40px; }
  .sd-head__title { font-size: 46px; }
  .sd-head__lede { margin-top: 14px; font-size: 17.5px; }
  .sd-main { padding-top: 32px; }
  .sd-h2 { font-size: 23px; }
}
@media (max-width: 600px) {
  .sd-form-card { padding: 22px 18px 20px; border-radius: var(--radius-xl); }
  .sd-form__title { font-size: 21px; line-height: 26px; }
  .form__send { justify-self: stretch; width: 100%; }
  /* Each row stacks: the course across the top, its two prices under it,
     each named (the column headers stay for screen readers; the explicit
     table roles keep the semantics through the display change). */
  .sd-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sd-table tbody { display: block; }
  .sd-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; padding: 14px 16px 16px; border-top: 1px solid var(--hair-soft); }
  .sd-table tbody tr:first-child { border-top: 0; }
  .sd-table th, .sd-table td, .sd-table tbody tr:first-child > * { padding: 0; border-top: 0; }
  .sd-table tbody th { grid-column: 1 / -1; }
  .sd-table tbody th small { font-size: 13.5px; }
  .sd-table td, .sd-table td:last-child { width: auto; margin-top: 10px; text-align: left; font-size: 16px; }
  .sd-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
}
