/* Shared opt-in components. Load tokens.css first. No fonts are downloaded by
   this file. These classes do not change existing pages until added to markup.
   Use real HTML elements and labels; CSS alone does not implement interactions. */

.srca-component:focus-visible, .srca-component :focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* Opt-in typography: values are shared, not tied to a fixed color order.
   Add srca-typography to a section, or use the explicit heading classes.
   Sage on cream/white is only for large text: at least 24px at weight 300. */
.srca-typography { color: var(--navy); font-family: var(--font-family); font-size: var(--text-body); font-weight: var(--font-weight-body); line-height: var(--leading-body); }
.srca-typography :is(h1, h2, h3), .srca-heading { color: var(--navy); font-weight: var(--font-weight-heading); line-height: var(--leading-heading); }
.srca-typography h1, .srca-h1 { font-size: var(--text-h1); }
.srca-typography h2, .srca-h2 { font-size: var(--text-h2); }
.srca-typography h3, .srca-h3 { font-size: var(--text-h3); }
.srca-typography .srca-heading--hunter, .srca-heading--hunter { color: var(--hunter); }
.srca-typography .srca-heading--sage-large, .srca-heading--sage-large { color: var(--sage); }
@media (max-width: 40rem) {
  /* H3 is 22px on mobile; use hunter instead of low-contrast sage. */
  .srca-typography h3.srca-heading--sage-large, h3.srca-heading--sage-large, .srca-h3.srca-heading--sage-large { color: var(--hunter); }
}
.srca-small { font-size: var(--text-small); }

/* The current public website uses small rounded corners, green at rest and
   navy on hover. Its home-screen uppercase lettering is page-specific. */
.srca-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--button-height);
  padding: var(--space-3) var(--space-5);
  border: 0;
  border-radius: var(--radius);
  background: var(--hunter);
  color: var(--white);
  font: inherit;
  font-size: var(--text-button);
  font-weight: var(--font-weight-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.srca-button:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--navy); color: var(--white); }
.srca-button:focus-visible, .srca-control:focus-visible, .srca-checkbox:focus-visible {
  outline: var(--focus-ring); outline-offset: var(--focus-offset);
}
.srca-button:disabled, .srca-button[aria-disabled='true'] {
  background: var(--disabled-bg); color: var(--disabled-text); cursor: not-allowed;
}
/* Prevent activation in JavaScript when aria-disabled is used on a link. */
.srca-button--secondary { background: transparent; color: var(--hunter); box-shadow: inset 0 0 0 2px var(--hunter); }
.srca-button--secondary:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--navy); color: var(--white); box-shadow: none; }

.srca-card {
  padding: var(--space-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--white);
  color: var(--navy);
}
.srca-card a { color: var(--hunter); }
.srca-card a:hover { color: var(--navy); }

.srca-field { display: grid; gap: var(--space-2); margin-block-end: var(--space-5); }
.srca-label { color: var(--navy); font-weight: var(--font-weight-body); }
.srca-control {
  box-sizing: border-box;
  inline-size: 100%; min-block-size: var(--control-height);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-control);
  border-radius: var(--radius);
  background: var(--white); color: var(--navy); font: inherit;
}
textarea.srca-control { min-block-size: 8rem; resize: vertical; }
.srca-control::placeholder { color: var(--placeholder-text); opacity: 1; }
.srca-control[aria-invalid='true'] { border-color: var(--error); }
.srca-help, .srca-error { margin: 0; font-size: var(--text-small); }
.srca-help { color: var(--navy); }
.srca-error { color: var(--error); }
/* Checked square intentionally follows the requested solid navy design. */
.srca-checkbox {
  appearance: none; inline-size: 1.125rem; block-size: 1.125rem;
  margin: 0; border: 1px solid var(--navy); border-radius: var(--radius);
  background: var(--white); vertical-align: middle; cursor: pointer;
}
.srca-checkbox:checked { background: var(--navy); }
.srca-checkbox:disabled { cursor: not-allowed; opacity: .55; }
@media (forced-colors: active) { .srca-checkbox { appearance: auto; } }
.srca-radio { accent-color: var(--hunter); inline-size: 1.125rem; block-size: 1.125rem; }

.srca-table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-card); }
.srca-table { width: 100%; min-width: 36rem; border-collapse: collapse; background: var(--white); color: var(--navy); text-align: left; }
.srca-table :is(th, td) { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-subtle); }
.srca-table thead th { background: var(--sage); color: var(--table-heading-text); font-weight: var(--font-weight-body); }
.srca-table tbody tr { background: var(--white); }
.srca-table tbody tr:last-child :is(th, td) { border-bottom: 0; }
.srca-table caption { padding: var(--space-4); color: var(--navy); text-align: left; }
.srca-table .srca-numeric { text-align: right; font-variant-numeric: tabular-nums; }

.srca-badge { display: inline-flex; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-small); }
.srca-badge--started { background: var(--status-started-bg); color: var(--navy); }
.srca-badge--progress { background: var(--status-progress-bg); color: var(--status-progress-text); }
.srca-badge--complete { background: var(--status-complete-bg); color: var(--hunter); }

/* Reusable link and circular chevron treatments. Add an accessible name to
   icon-only buttons; the circle and its chevron use the same currentColor. */
.srca-link { color: var(--hunter); text-underline-offset: .2em; }
.srca-link:hover { color: var(--navy); }
.srca-link:focus-visible, .srca-icon-button:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
.srca-icon-button { display: inline-grid; place-items: center; inline-size: var(--control-height); block-size: var(--control-height); padding: 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--hunter); cursor: pointer; }
.srca-icon-button:hover { color: var(--navy); }
.srca-chevron { display: inline-grid; place-items: center; inline-size: 2rem; block-size: 2rem; border: 1px solid currentColor; border-radius: var(--radius-pill); }
.srca-chevron::before { content: ''; inline-size: .4rem; block-size: .4rem; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translateX(-.05rem) rotate(45deg); }
.srca-chevron--previous::before { transform: translateX(.05rem) rotate(-135deg); }
.srca-image-arch { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 50% 50% 0 0 / 40% 40% 0 0; }
.srca-notice { padding: var(--space-4); border-inline-start: 4px solid var(--hunter); background: var(--success-bg); color: var(--navy); }
.srca-notice--error { border-color: var(--error); background: var(--error-bg); }
.srca-empty { padding: var(--space-6); text-align: center; border: 1px solid var(--border-subtle); border-radius: var(--radius-card); background: var(--white); color: var(--navy); }
/* Optional blue section: navy primary button on pale blue, hunter on hover. */
.srca-surface-blue { background: var(--pale-blue); color: var(--navy); }
.srca-surface-blue .srca-button:not(.srca-button--secondary):not(:disabled):not([aria-disabled="true"]) { background: var(--navy); color: var(--white); }
.srca-surface-blue .srca-button:not(.srca-button--secondary):not(:disabled):not([aria-disabled="true"]):hover { background: var(--hunter); }

/* Navigation and footer are opt-in and do not alter the current site layout. */
.srca-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); }
.srca-nav a { color: var(--hunter); text-decoration: none; text-underline-offset: .35em; text-decoration-color: currentColor; }
.srca-nav a:hover { color: var(--navy); text-decoration: underline; }
.srca-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.srca-nav a:focus-visible, .srca-footer a:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
.srca-footer { padding-block: var(--space-7); border-top: 1px solid var(--border-subtle); background: var(--cream); color: var(--navy); }
.srca-footer a { color: var(--hunter); }
.srca-footer a:hover { color: var(--navy); }
.srca-list { padding-inline-start: var(--space-5); }
.srca-list li + li { margin-block-start: var(--space-2); }
.srca-skeleton { min-height: 1rem; border-radius: var(--radius-field); background: var(--skeleton-bg); }
.srca-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Chart tokens are for a chart library, HTML, or SVG; no outlines on bars.
   Add direct labels or patterns; pale blue has low contrast on white. */
.srca-chart { padding: var(--space-5); border: 1px solid var(--border-subtle); border-radius: var(--radius-panel); background: var(--white); color: var(--navy); }
.srca-chart-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-block-start: var(--space-4); }
.srca-chart-key { display: inline-flex; align-items: center; gap: var(--space-2); }
.srca-chart-swatch { width: .9rem; height: .9rem; flex: none; border: 0; border-radius: var(--radius); }
.srca-chart-swatch--1 { background: var(--chart-1); }
.srca-chart-swatch--2 { background: var(--chart-2); }
.srca-chart-swatch--3 { background: var(--chart-3); }
@media (prefers-reduced-motion: reduce) {
  .srca-component *, .srca-component *::before, .srca-component *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
