/*
  Skunkworks Academy accessibility contrast contract.
  This stylesheet is loaded after page/theme CSS and provides WCAG 2.2 AA-safe
  foreground tokens for light and dark presentation states.
*/

:root {
  --sk-a11y-link-light: #0f62fe;
  --sk-a11y-link-dark: #78a9ff;
  --sk-a11y-signal-orange: #c93400;
  --sk-interactive-text: #0043ce;
  --sk-text-success: #137333;
  --sk-text-warning: #8a4b00;
  --sk-text-danger: #b42318;
  --sk-text-info: #0043ce;
  --signal-orange: var(--sk-a11y-signal-orange);
}

:root[data-theme="dark"],
[data-theme="dark"] {
  --sk-link: var(--sk-a11y-link-dark) !important;
  --sk-focus: var(--sk-a11y-link-dark) !important;
  --sk-interactive-text: var(--sk-a11y-link-dark);
  --sk-text-success: #6fdc8c;
  --sk-text-warning: #f1c21b;
  --sk-text-danger: #ff8389;
  --sk-text-info: #78a9ff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sk-link: var(--sk-a11y-link-dark) !important;
    --sk-focus: var(--sk-a11y-link-dark) !important;
    --sk-interactive-text: var(--sk-a11y-link-dark);
    --sk-text-success: #6fdc8c;
    --sk-text-warning: #f1c21b;
    --sk-text-danger: #ff8389;
    --sk-text-info: #78a9ff;
  }
}

/* Interactive blue is a button/background colour. Small accent text uses the
   dedicated foreground token so tags, metrics and eyebrows remain AA-safe. */
.sk-eyebrow,
.sk-tag,
.tile-kicker,
.level,
.sk-stat__value,
.metric strong,
.stat .number {
  color: var(--sk-interactive-text) !important;
}

/* Inline links must remain identifiable without colour perception alone. */
.article a:not(.btn):not(.sk-button),
.sk-document a:not(.btn):not(.sk-button),
.document a:not(.btn):not(.sk-button),
.sk-card__text a:not(.btn):not(.sk-button),
.card p a:not(.btn):not(.sk-button) {
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .15em;
}

/* Preserve a visible keyboard focus indicator in forced-colour environments. */
@media (forced-colors: active) {
  :focus-visible {
    outline: 3px solid CanvasText !important;
    outline-offset: 3px !important;
  }
}
