/* Course request form. --cr-* tokens mapped to the jocapps tokens (--ins-* from
   insights/insights.css where present; fallbacks for pages without it).
   Accent = the AA-safe dark brand orange; borders >= 3:1 against the background. */
.cr-form {
  --cr-accent: var(--ins-accent-text, #b83d12);
  --cr-accent-contrast: #fff;
  --cr-text: var(--ins-text, #2b2b2e);
  --cr-muted: var(--ins-muted, #5f5f66);
  --cr-border: #8c8c94;
  --cr-bg: var(--ins-card, #fff);
  --cr-surface: var(--ins-surface, #f7f6f4);
  --cr-ok: #15803d;
  --cr-error: #b91c1c;
  --cr-radius: 12px;
  color: var(--cr-text);
  background: var(--cr-bg);
  border: 1px solid var(--cr-border);
  border-radius: calc(var(--cr-radius) + 4px);
  padding: clamp(18px, 4vw, 32px);
  display: grid;
  gap: 18px;
  max-width: 820px;
}
.cr-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cr-form legend, .cr-form .cr-label { font-weight: 600; margin-bottom: 8px; display: block; padding: 0; }
.cr-form .cr-hint { color: var(--cr-muted); font-size: .92em; margin: -2px 0 10px; }
.cr-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cr-field { display: grid; gap: 6px; min-width: 0; }
.cr-field label { font-weight: 600; font-size: .95em; }
.cr-form input[type="text"], .cr-form input[type="email"], .cr-form input[type="tel"],
.cr-form select, .cr-form textarea {
  width: 100%; box-sizing: border-box; font: inherit; color: var(--cr-text); background: var(--cr-bg);
  border: 1px solid var(--cr-border); border-radius: var(--cr-radius); padding: 11px 13px; min-height: 46px;
}
.cr-form textarea { min-height: 110px; resize: vertical; }
.cr-form input:focus-visible, .cr-form select:focus-visible, .cr-form textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cr-accent) 35%, transparent); outline-offset: 1px; border-color: var(--cr-accent);
}
.cr-dates { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cr-date { position: relative; }
.cr-date input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cr-date label {
  display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 48px; box-sizing: border-box;
  padding: 10px 14px; border: 1px solid var(--cr-border); border-radius: var(--cr-radius); background: var(--cr-surface);
  font-weight: 500; line-height: 1.3; transition: border-color .15s, background .15s;
}
.cr-date label::before {
  content: ""; flex: 0 0 18px; height: 18px; border: 2px solid var(--cr-border); border-radius: 5px; background: var(--cr-bg);
  box-sizing: border-box;
}
.cr-date input:checked + label { border-color: var(--cr-accent); background: color-mix(in srgb, var(--cr-accent) 9%, var(--cr-bg)); }
.cr-date input:checked + label::before {
  border-color: var(--cr-accent); background: var(--cr-accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.4' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center/12px no-repeat;
}
.cr-date input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--cr-accent) 35%, transparent); outline-offset: 1px; }
.cr-check { display: flex; gap: 10px; align-items: flex-start; font-size: .95em; }
.cr-check input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--cr-accent); }
.cr-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.cr-submit {
  justify-self: start; font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: var(--cr-radius);
  padding: 14px 26px; min-height: 50px; background: var(--cr-accent); color: var(--cr-accent-contrast);
}
.cr-submit:hover { filter: brightness(1.07); }
.cr-submit:disabled { opacity: .6; cursor: progress; }
.cr-status { min-height: 1.4em; font-weight: 600; outline: none; }
.cr-status--ok { color: var(--cr-ok); }
.cr-status--error { color: var(--cr-error); }
.cr-form--sent .cr-status--ok { padding: 12px 14px; border-radius: var(--cr-radius); background: color-mix(in srgb, var(--cr-ok) 10%, var(--cr-bg)); }
@media (max-width: 520px) {
  .cr-submit { width: 100%; justify-self: stretch; }
  .cr-dates { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .cr-date label { transition: none; } }

/* --- jocapps: dark mode, section, button in the site's pill style ---------- */
html.dark-mode .cr-form {
  --cr-accent: var(--ins-accent-text, #ff8a5c);
  --cr-accent-contrast: #141414;
  --cr-text: var(--ins-text, #e6e6e6);
  --cr-muted: var(--ins-muted, #b4b4ba);
  --cr-border: #7a7a82;
  --cr-bg: var(--ins-card, #1f1f22);
  --cr-surface: var(--ins-surface, #222225);
  --cr-ok: #4ade80;
  --cr-error: #fca5a5;
}
.cr-section { margin: 0 0 56px; scroll-margin-top: 110px; color: var(--cr-text, inherit); }
/* The site's jQuery anchor scroll uses offset().top and ignores scroll-margin: shift the box top above the
   fixed header with padding + equal negative margin (layout unchanged, transparent, no background). */
.cr-section { padding-top: 136px; margin-top: -136px; scroll-margin-top: 0; }
@media (max-width: 991px) { .cr-section { padding-top: 110px; margin-top: -110px; } }
.cr-section > h2 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; line-height: 1.3; margin: 0 0 10px; }
.cr-section > p { font-size: 16.5px; line-height: 1.65; margin: 0 0 18px; max-width: 760px; }
.cr-form legend { font-size: 1rem; width: auto; float: none; color: var(--cr-text); }
.cr-form legend .cr-hint { display: inline; font-weight: 400; margin: 0; }
.cr-form label { margin-bottom: 0; }
.cr-form .cr-check a { color: var(--cr-accent); text-decoration: underline; text-underline-offset: 2px; }
.cr-form input::placeholder, .cr-form textarea::placeholder { color: var(--cr-muted); opacity: 1; }
.cr-submit { border-radius: 999px; background: #1d1d1f; color: #fff; }
.cr-submit:hover { filter: none; background: #000; }
html.dark-mode .cr-submit { background: #f2f2f2; color: #141414; }
html.dark-mode .cr-submit:hover { background: #fff; }
.cr-submit:focus-visible { outline: 3px solid var(--cr-accent); outline-offset: 3px; }
.cr-hub-link { margin: 14px 0 0; font-size: 15px; font-weight: 600; }
.cr-hub-link a { color: var(--ins-accent-text, #b83d12); text-decoration: none; }
.cr-hub-link a:hover, .cr-hub-link a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.ins-side-cta .sol-request { margin-top: 10px; }
/* the site-wide dark-mode input rules (css/style.css) use a #3a3a3a border; keep form fields consistent and >= 3:1 */
html.dark-mode .cr-form input[type="text"], html.dark-mode .cr-form input[type="email"],
html.dark-mode .cr-form input[type="tel"], html.dark-mode .cr-form textarea {
  background-color: var(--cr-bg); border-color: var(--cr-border); color: var(--cr-text);
}
html.dark-mode .cr-form select { background-color: var(--cr-bg) !important; border-color: var(--cr-border) !important; color: var(--cr-text) !important; }
.cr-form .cr-micro { margin: 0; font-size: .92em; color: var(--cr-muted); }
