/* Contact page (contact.html only). Loaded after page.css (the plain page,
   its tokens, header, kicker, reveals, footer, toast) and fm.css (the text
   link, the solid button, the inline Clear link). This adds the heading,
   the form and its fields, the extension shortcut and the ways to reach
   us. The site had no form styles yet, so the fields follow the home
   page's one field (the course search): the 3:1 control edge, the white
   (light) or card (dark) fill, 16 px text, and the green focus edge with
   its soft ring.
   Every color is a Clear token or a page.css / fm.css token. */

:root, .theme-light {
  --well: var(--background);   /* the notes, set into the form's paper */
}
.theme-dark {
  --well: var(--muted);
}

.ct-form [hidden] { display: none !important; }

/* ── 1 · Heading ───────────────────────────────────────────────────── */
.ct-hero { padding-top: 72px; }
.ct-hero__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; }
.ct-hero__lede { margin-top: 18px; max-width: 34em; font-size: 20px; line-height: 1.5; color: var(--muted-foreground); text-wrap: pretty; }

/* ── 2 · Layout ────────────────────────────────────────────────────
   Desktop: the form on the left; the extension card, then the ways to
   reach us, on the right. Phones: extension, form, ways. */
.ct-main { padding-top: 48px; }
.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; grid-template-areas: "form ext" "form ways"; column-gap: 56px; row-gap: 48px; align-items: start; }
.ct-form { grid-area: form; }
.ct-ext { grid-area: ext; }
.ct-ways { grid-area: ways; }

/* Inline links in running text are underlined, so they never rely on
   color alone. */
.ct-inline { font-weight: 600; color: var(--primary-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ct-inline:hover { text-decoration-thickness: 2px; }
.ct-inline:focus-visible, .ct-way__main:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 3px; }

/* ── The form ──────────────────────────────────────────────────────
   One card: paper, a 1 px edge and the collage cards' front lift. */
/* No scroll anchoring inside: the error summary opening above the fields
   must not drag the page with it. */
.ct-form { container-type: inline-size; overflow-anchor: none; padding: 32px 36px 36px; border-radius: var(--radius-2xl); border: 1px solid var(--art-edge); background: var(--paper); box-shadow: var(--art-lift-front); }
.ct-form__title { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }

fieldset.fld { margin-left: 0; margin-right: 0; padding: 0; border: 0; min-width: 0; }
.fld { margin-top: 24px; }
.fld__label { display: block; float: none; padding: 0; margin-bottom: 8px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--card-foreground); }
.fld__opt { font-weight: 400; color: var(--muted-foreground); }
.fld__control { 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; }
.fld__control:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ring) 22%, transparent); }
.fld__area { height: auto; min-height: 148px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.fld__control::-webkit-calendar-picker-indicator { cursor: pointer; }
.fld__select { position: relative; }
.fld__select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; text-overflow: ellipsis; }
.fld__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; }
.fld__hint { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.ct-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }

/* Errors: the field's edge turns danger red, and the message sits under it
   with a mark, so it never relies on color alone. */
.fld__err { display: flex; align-items: flex-start; gap: 7px; margin-top: 7px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--danger); }
.fld__err::before { content: ""; flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; background: var(--danger);
  -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='1.8' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.6'/%3E%3Cpath d='M8 4.6v4.2M8 11.2v.2'/%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='1.8' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.6'/%3E%3Cpath d='M8 4.6v4.2M8 11.2v.2'/%3E%3C/svg%3E") center / 16px 16px no-repeat; }
.fld.is-invalid .fld__control { border-color: var(--danger); }
.fld.is-invalid .fld__control:focus { box-shadow: 0 0 0 4px color-mix(in oklab, var(--danger) 22%, transparent); }

/* The summary at the top of the form after a send with problems: each
   item links to its field. */
.ct-errors { margin-top: 20px; padding: 16px 18px 16px 20px; border-radius: var(--radius-xl); border: 1px solid var(--danger); background: var(--paper); }
.ct-errors:focus { outline: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ring); }
.ct-errors__title { display: flex; align-items: center; gap: 8px; font-size: 15.5px; line-height: 22px; font-weight: 700; color: var(--card-foreground); }
.ct-errors__title::before { content: ""; flex-shrink: 0; width: 18px; height: 18px; background: var(--danger);
  -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='1.8' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.6'/%3E%3Cpath d='M8 4.6v4.2M8 11.2v.2'/%3E%3C/svg%3E") center / 18px 18px 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='1.8' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.6'/%3E%3Cpath d='M8 4.6v4.2M8 11.2v.2'/%3E%3C/svg%3E") center / 18px 18px no-repeat; }
.ct-errors__list { display: grid; row-gap: 4px; margin-top: 8px; padding-left: 26px; }
.ct-errors__list a { display: inline-block; padding: 2px 0; font-size: 15px; line-height: 20px; font-weight: 500; color: var(--card-foreground); text-decoration: underline; text-underline-offset: 3px; }
.ct-errors__list a:hover { text-decoration-thickness: 2px; }
.ct-errors__list a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 3px; }

/* Notes (the extension note): a well set into the paper (the
   free page's wells). */
.ct-note { margin-top: 20px; padding: 18px 20px 20px; border-radius: var(--radius-xl); background: var(--well); font-size: 16px; line-height: 1.55; color: var(--card-foreground); }
.ct-note p + p { margin-top: 8px; }
.ct-note__title { margin-bottom: 6px; font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.ct-note__btn { margin-top: 16px; }
.ct-note__small { font-size: 14.5px; line-height: 20px; color: var(--muted-foreground); }
.ct-note__btn + .ct-note__small { margin-top: 14px; }
.ct-note .btn:focus-visible { box-shadow: 0 0 0 2px var(--well), 0 0 0 4px var(--ring); }

/* The extension request's way back, under its title. */
.ct-back { margin-top: 6px; padding: 2px 0; border: 0; background: none; font: inherit; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--primary-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.ct-back:hover { text-decoration-thickness: 2px; }
.ct-back:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 3px; }

.ct-send { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 30px; }
.ct-send__btn { min-width: 200px; }
.ct-send__btn:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ring); }
.ct-send__fine { font-size: 14px; line-height: 20px; color: var(--muted-foreground); }

/* ── Need an extension? ────────────────────────────────────────────
   The one shortcut on the page, a card beside the form: its button picks
   the extension request and moves to the form. */
.ct-ext { padding: 24px 24px 18px; border-radius: var(--radius-2xl); border: 1px solid var(--art-edge); background: var(--paper); box-shadow: var(--art-lift); }
.ct-ext__title { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.ct-ext__copy { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--muted-foreground); text-wrap: pretty; }
.ct-ext__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 18px; }
/* Outlined, not filled: Send message is the page's one solid button. */
.ct-ext__btn { min-height: 46px; padding: 10px 18px; font-size: 15px; border-color: var(--border-strong); }
.ct-ext__btn:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ring); }
.ct-ext .prod-link { font-size: 15px; }

/* ── Other ways to reach us ────────────────────────────────────────
   Straight on the page: a small label over each, the number or address
   in ink, one muted line under it. */
.ct-ways__title { font-size: 13px; line-height: 16px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); }
.ct-ways__list { display: grid; row-gap: 24px; margin-top: 20px; }
.ct-way dt { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--card-foreground); }
.ct-way dd { display: grid; row-gap: 2px; margin: 4px 0 0; }
.ct-way__main { justify-self: start; display: inline-flex; align-items: center; min-height: 32px; font-size: 21px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--primary-text); text-decoration: none; text-underline-offset: 4px; }
.ct-way__main:hover { text-decoration: underline; }
.ct-way__mail { font-size: 16.5px; line-height: 24px; font-weight: 600; letter-spacing: 0; overflow-wrap: anywhere; }
.ct-way dd > span { font-size: 14.5px; line-height: 20px; color: var(--muted-foreground); }
.ct-way address { font-style: normal; font-size: 16.5px; line-height: 1.5; color: var(--ink); }
.ct-ways__note { margin-top: 24px; max-width: 30em; font-size: 14.5px; line-height: 1.5; color: var(--muted-foreground); }

/* The footer marks the page you're on. */
.site-footer__links a[aria-current="page"] { color: var(--card-foreground); }
.site-footer__links a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 3px; }

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

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .ct-grid { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 40px; }
  .ct-form { padding: 28px 28px 32px; }
}
/* Tablet and phone: one column. The extension card comes first, so it's
   seen before the form; the ways to reach us close the page. */
@media (max-width: 900px) {
  .ct-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "ext" "form" "ways"; row-gap: 28px; }
  /* The card goes wide: title and line on the left, its two actions on the right. */
  .ct-ext { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title actions" "copy actions"; column-gap: 32px; align-items: center; }
  .ct-ext__title { grid-area: title; }
  .ct-ext__copy { grid-area: copy; }
  .ct-ext__actions { grid-area: actions; margin-top: 0; align-items: flex-end; }
  .ct-ways { margin-top: 20px; }
  .ct-ways__list { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
}
@media (max-width: 768px) {
  .ct-hero { padding-top: 40px; }
  .ct-hero__title { font-size: 46px; }
  .ct-hero__lede { margin-top: 14px; font-size: 17.5px; }
  .ct-main { padding-top: 32px; }
  .ct-ext { display: block; }
  .ct-ext__actions { margin-top: 16px; align-items: flex-start; }
  .ct-ways__list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .ct-form { padding: 22px 18px 24px; border-radius: var(--radius-xl); }
  .ct-form__title { font-size: 21px; line-height: 26px; }
  .ct-row { grid-template-columns: minmax(0, 1fr); }
  .ct-send { flex-direction: column; align-items: stretch; gap: 12px; }
  .ct-send__btn { width: 100%; }
  .ct-send__fine { text-align: center; }
  .ct-ext { padding: 20px 18px 14px; border-radius: var(--radius-xl); }
  .ct-ext__title { font-size: 20px; line-height: 26px; }
  .ct-ext__btn { width: 100%; }
  .ct-ext__actions { align-items: stretch; }
  .ct-ext .prod-link { justify-content: center; }
}
