/* Shared foundation for every page. Brand values come from /brand/tokens.css. */
@import url('/brand/tokens.css');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  /* Org instructions: HTML uses Avenir with Arial fallback. */
  font-family: 'Avenir', 'Avenir Next', Arial, 'Nimbus Sans', 'Liberation Sans', system-ui, sans-serif;
  font-size: var(--type-body);
  line-height: var(--leading-body);
  color: var(--sih-ink);
  background: #ffffff;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: var(--weight-heading);
  color: var(--sih-blue);
  line-height: 1.2;
}

p {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

.eyebrow {
  font-size: var(--type-eyebrow);
  font-weight: 700;
  letter-spacing: var(--eyebrow-tracking);
  text-transform: uppercase;
  color: var(--sih-salmon);
}

.muted {
  color: var(--sih-ink-3);
  font-size: var(--type-body-sm);
}

/* ---- Focus: always visible. Accessibility is not optional in this sector. ---- */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--dur-hover) var(--ease), transform var(--dur-hover) var(--ease), filter var(--dur-hover) var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active {
  filter: brightness(0.95);
  transform: scale(0.985);
}
.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}
.btn-primary {
  background: var(--sih-blue);
  color: #fff;
}
.btn-primary:hover {
  background: var(--sih-blue-deep);
}
.btn-secondary {
  background: #fff;
  color: var(--sih-blue);
  border-color: var(--sih-line);
}
.btn-secondary:hover {
  background: var(--sih-cloud);
}
.btn-link {
  background: none;
  border: 0;
  padding: 0;
  min-height: 44px;
  font: inherit;
  color: var(--sih-blue);
  text-decoration: underline;
  cursor: pointer;
}
.btn-link:hover {
  color: var(--sih-blue-deep);
}

/* ---- Text input ---- */
.input {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--space-4);
  border: 1px solid var(--sih-line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  /* 16px minimum stops iOS Safari zooming the page when the field is focused. */
  font-size: 17px;
  color: var(--sih-ink);
  box-shadow: var(--shadow-1);
}
.input:focus {
  border-color: var(--sih-blue);
}

/* ---- Selectable option cards (checkboxes) ---- */
.options {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--sih-line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: border-color var(--dur-hover) var(--ease), background-color var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.option:hover {
  box-shadow: var(--shadow-2);
}
.option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.option .check {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 2px solid var(--sih-ink-4);
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  transition: background-color var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease);
}
.option .check svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity var(--dur-hover) var(--ease);
}
.option .label {
  font-size: 17px;
  line-height: 1.35;
}
/* Checked state is styled two ways: :has() for modern browsers, and the
 * .is-checked class the script toggles, for browsers without :has()
 * (iOS < 15.4, Chrome < 105, Samsung Internet < 20). */
.option.is-checked,
.option:has(input:checked) {
  border-color: var(--sih-blue);
  background: var(--sih-blue-wash);
}
.option.is-checked .check,
.option:has(input:checked) .check {
  background: var(--sih-blue);
  border-color: var(--sih-blue);
}
.option.is-checked .check svg,
.option:has(input:checked) .check svg {
  opacity: 1;
}
.option:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}

/* ---- Utilities ---- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
