/* Generated from src/components/ by build/build.mjs — do not edit. */

/* ---- button.css ---- */
/* hd-button — primary, secondary and danger actions. Semantic HTML supplies
   behaviour (button or a); these classes supply shared presentation. */
.hd-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--hd-space-2);
  min-height: var(--hd-control-height);
  padding: var(--hd-space-2) var(--hd-space-4);
  border: var(--hd-border-width) solid var(--hd-color-accent);
  border-radius: var(--hd-radius-medium);
  background: var(--hd-color-accent);
  color: var(--hd-color-on-accent);
  font-family: var(--hd-font-family);
  font-size: var(--hd-font-size-body);
  font-weight: var(--hd-font-weight-semibold);
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: filter var(--hd-duration-fast) ease;
}

.hd-button:hover:not(:disabled):not([aria-disabled="true"]) {
  filter: brightness(1.04);
}

.hd-button--secondary {
  border-color: var(--hd-color-control-border);
  background: var(--hd-color-surface);
  color: var(--hd-color-text);
}

.hd-button--danger {
  border-color: var(--hd-color-danger-action);
  background: var(--hd-color-danger-action);
  color: var(--hd-color-on-danger-action);
}

.hd-button:disabled,
.hd-button[aria-disabled="true"] {
  border-color: var(--hd-color-disabled);
  background: var(--hd-color-disabled);
  color: var(--hd-color-text-muted);
  cursor: not-allowed;
}

.hd-button:focus-visible {
  outline: var(--hd-focus-width) solid var(--hd-color-focus);
  outline-offset: var(--hd-focus-offset);
}

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

/* ---- panel.css ---- */
/* hd-panel — raised surface. Category modifiers fill the panel and switch it
   to the on-color scope (see tokens/on-color.json) so text, links, controls
   and focus stay readable on the saturated fill in either page theme. */
.hd-panel {
  padding: var(--hd-space-5) var(--hd-space-6);
  border: var(--hd-border);
  border-radius: var(--hd-radius-large);
  background: var(--hd-color-surface);
  color: var(--hd-color-text);
  color-scheme: var(--hd-color-scheme);
}

.hd-panel--lime {
  background: var(--hd-color-lime);
  border-color: transparent;
}

.hd-panel--coral {
  background: var(--hd-color-coral);
  border-color: transparent;
}

.hd-panel--aqua {
  background: var(--hd-color-aqua);
  border-color: transparent;
}

.hd-panel--lilac {
  background: var(--hd-color-lilac);
  border-color: transparent;
}

/* ---- notice.css ---- */
/* hd-notice — inline status message. Variants carry the status role; the text
   carries the meaning (a live region is the consumer's decision). --info is for
   neutral facts such as a data-protection statement: green stays reserved for
   completed states, so nothing informational reads as an all-clear. */
.hd-notice {
  padding: var(--hd-space-3) var(--hd-space-4);
  border: var(--hd-border);
  border-inline-start: var(--hd-space-1) solid var(--hd-color-accent);
  border-radius: var(--hd-radius-medium);
  background: var(--hd-color-surface);
  color: var(--hd-color-text);
}

.hd-notice--success {
  border-color: var(--hd-color-success-border);
  border-inline-start-color: var(--hd-color-success);
  background: var(--hd-color-success-surface);
  color: var(--hd-color-success);
}

.hd-notice--warning {
  border-color: var(--hd-color-warning-border);
  border-inline-start-color: var(--hd-color-warning);
  background: var(--hd-color-warning-surface);
  color: var(--hd-color-warning);
}

.hd-notice--danger {
  border-color: var(--hd-color-danger-border);
  border-inline-start-color: var(--hd-color-danger);
  background: var(--hd-color-danger-surface);
  color: var(--hd-color-danger);
}

.hd-notice--info {
  border-color: var(--hd-color-info-border);
  border-inline-start-color: var(--hd-color-info);
  background: var(--hd-color-info-surface);
  color: var(--hd-color-info);
}

/* ---- field.css ---- */
/* hd-field — label, control and hint for text inputs, selects and textareas.
   Not for checkboxes, radios or range inputs. Native appearance follows the
   local theme through color-scheme. */
.hd-field {
  display: flex;
  flex-direction: column;
  gap: var(--hd-space-2);
  color: var(--hd-color-text);
  font-family: var(--hd-font-family);
}

.hd-field__label {
  font-weight: var(--hd-font-weight-semibold);
}

.hd-field__hint {
  margin: 0;
  color: var(--hd-color-text-muted);
  font-size: var(--hd-font-size-small);
}

.hd-field__control {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: var(--hd-control-height);
  padding: var(--hd-space-2) var(--hd-space-3);
  border: var(--hd-border-width) solid var(--hd-color-control-border);
  border-radius: var(--hd-radius-medium);
  background: var(--hd-color-background);
  color: var(--hd-color-text);
  font: inherit;
  color-scheme: var(--hd-color-scheme);
}

.hd-field__control::placeholder {
  color: var(--hd-color-text-muted);
  opacity: 1;
}

textarea.hd-field__control {
  resize: vertical;
}

.hd-field__control:disabled {
  color: var(--hd-color-text-muted);
  cursor: not-allowed;
}

.hd-field__control[aria-invalid="true"] {
  border-color: var(--hd-color-danger);
}

.hd-field__control:focus-visible {
  outline: var(--hd-focus-width) solid var(--hd-color-focus);
  outline-offset: var(--hd-focus-offset);
}

/* ---- badge.css ---- */
/* hd-badge — short textual label. Not interactive; the fill alone conveys
   nothing, the text does. */
.hd-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--hd-space-1);
  width: fit-content;
  padding: var(--hd-space-1) var(--hd-space-3);
  border: var(--hd-border);
  border-radius: var(--hd-radius-round);
  background: var(--hd-color-surface);
  color: var(--hd-color-text);
  font-family: var(--hd-font-family);
  font-size: var(--hd-font-size-small);
  font-weight: var(--hd-font-weight-semibold);
  line-height: 1.5;
}

.hd-badge--lime,
.hd-badge--coral,
.hd-badge--aqua,
.hd-badge--lilac {
  border-color: transparent;
  color: var(--hd-color-on-color);
}

.hd-badge--lime { background: var(--hd-color-lime); }
.hd-badge--coral { background: var(--hd-color-coral); }
.hd-badge--aqua { background: var(--hd-color-aqua); }
.hd-badge--lilac { background: var(--hd-color-lilac); }

/* ---- pill.css ---- */
/* hd-pill — compact status label (job states, draft markers). The variant
   names are generic; a consumer maps its own states onto them (see
   docs/clinical.md for the job-lifecycle mapping). Text carries the state. */
.hd-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--hd-space-1);
  padding: var(--hd-space-1) var(--hd-space-3);
  border: var(--hd-border-width) solid var(--hd-color-border);
  border-radius: var(--hd-radius-round);
  background: var(--hd-color-surface);
  color: var(--hd-color-text-muted);
  font-family: var(--hd-font-family);
  font-size: var(--hd-font-size-small);
  font-weight: var(--hd-font-weight-semibold);
  line-height: var(--hd-line-height-snug);
  white-space: nowrap;
}

.hd-pill--pending {
  border-color: var(--hd-color-warning-border);
  background: var(--hd-color-warning-surface);
  color: var(--hd-color-warning);
}

.hd-pill--active {
  border-color: var(--hd-color-info-border);
  background: var(--hd-color-info-surface);
  color: var(--hd-color-info);
}

.hd-pill--success {
  border-color: var(--hd-color-success-border);
  background: var(--hd-color-success-surface);
  color: var(--hd-color-success);
}

.hd-pill--danger {
  border-color: var(--hd-color-danger-border);
  background: var(--hd-color-danger-surface);
  color: var(--hd-color-danger);
}

.hd-pill--muted {
  border-color: var(--hd-color-disabled);
  background: var(--hd-color-disabled);
  color: var(--hd-color-text-muted);
}

/* ---- tabs.css ---- */
/* hd-tabs — a tablist of buttons. The consumer manages aria-selected, the
   associated tabpanel and arrow-key behaviour; CSS reflects the state only. */
.hd-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hd-space-2);
}

.hd-tabs__tab {
  min-height: var(--hd-control-height);
  padding: var(--hd-space-2) var(--hd-space-4);
  border: var(--hd-border-width) solid var(--hd-color-control-border);
  border-radius: var(--hd-radius-medium);
  background: var(--hd-color-surface);
  color: var(--hd-color-text);
  font: inherit;
  font-weight: var(--hd-font-weight-semibold);
  cursor: pointer;
  transition: filter var(--hd-duration-fast) ease;
}

.hd-tabs__tab:hover:not([aria-selected="true"]) {
  filter: brightness(1.04);
}

.hd-tabs__tab[aria-selected="true"] {
  border-color: var(--hd-color-accent);
  background: var(--hd-color-accent);
  color: var(--hd-color-on-accent);
}

.hd-tabs__tab:focus-visible {
  outline: var(--hd-focus-width) solid var(--hd-color-focus);
  outline-offset: var(--hd-focus-offset);
}

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

/* Forced colours (gap 57): the browser replaces the selected tab's fill, so it is marked by a
   Highlight border and an underline instead. Not a Highlight fill: the browser draws a
   Canvas-coloured backplate behind text, which hides a label in HighlightText. Not an outline:
   that would replace the focus ring. */
@media (forced-colors: active) {
  .hd-tabs__tab[aria-selected="true"] {
    border-color: Highlight;
    text-decoration: underline;
    text-decoration-thickness: 0.15em;
    text-underline-offset: 0.25em;
  }
}

/* ---- steps.css ---- */
/* hd-steps — numbered progress through a guided flow (an ordered list).
   Numbers come from a CSS counter; mark the current step with
   aria-current="step" and finished or failed ones with the modifiers. */
.hd-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hd-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: hd-step;
}

.hd-steps__step {
  display: flex;
  align-items: center;
  gap: var(--hd-space-2);
  padding: var(--hd-space-2) var(--hd-space-3);
  border: var(--hd-border);
  border-radius: var(--hd-radius-medium);
  background: var(--hd-color-surface);
  color: var(--hd-color-text-muted);
  font-size: var(--hd-font-size-small);
  line-height: var(--hd-line-height-snug);
  counter-increment: hd-step;
}

.hd-steps__step::before {
  content: counter(hd-step);
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--hd-radius-round);
  background: var(--hd-color-border);
  color: var(--hd-color-text);
  font-size: var(--hd-font-size-caption);
  font-weight: var(--hd-font-weight-bold);
}

.hd-steps__step[aria-current="step"] {
  border-color: var(--hd-color-accent);
  color: var(--hd-color-text);
}

.hd-steps__step[aria-current="step"]::before {
  background: var(--hd-color-accent);
  color: var(--hd-color-on-accent);
}

.hd-steps__step--done {
  border-color: var(--hd-color-success-border);
  color: var(--hd-color-success);
}

.hd-steps__step--done::before {
  background: var(--hd-color-success);
  color: var(--hd-color-success-surface);
}

.hd-steps__step--failed {
  border-color: var(--hd-color-danger-border);
  color: var(--hd-color-danger);
}

.hd-steps__step--failed::before {
  background: var(--hd-color-danger);
  color: var(--hd-color-danger-surface);
}

/* Forced colours (gap 57): the browser replaces the step colours, so the current step is marked
   by a doubled Highlight ring (border and outline). Not a Highlight fill behind the number: the
   browser draws a Canvas-coloured backplate behind text, which hides it. Done and failed steps
   say so in words. */
@media (forced-colors: active) {
  .hd-steps__step[aria-current="step"] {
    border-color: Highlight;
    outline: var(--hd-border-width) solid Highlight;
  }
}

/* ---- metric.css ---- */
/* hd-metric — a stat tile: one value, its label, an optional detail line
   (confidence interval, unit, n). hd-metrics lays tiles out in a grid. */
.hd-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: var(--hd-space-3);
}

.hd-metric {
  display: flex;
  flex-direction: column;
  gap: var(--hd-space-1);
  padding: var(--hd-space-3) var(--hd-space-4);
  border: var(--hd-border);
  border-radius: var(--hd-radius-medium);
  background: var(--hd-color-background);
  color: var(--hd-color-text);
  text-align: center;
}

.hd-metric__value {
  font-size: var(--hd-font-size-heading);
  font-weight: var(--hd-font-weight-bold);
  line-height: var(--hd-line-height-display);
  letter-spacing: var(--hd-letter-spacing-tight);
  font-variant-numeric: tabular-nums;
}

.hd-metric__label {
  color: var(--hd-color-text-muted);
  font-size: var(--hd-font-size-small);
  line-height: var(--hd-line-height-snug);
}

.hd-metric__detail {
  color: var(--hd-color-text-muted);
  font-size: var(--hd-font-size-caption);
  line-height: var(--hd-line-height-snug);
}

/* ---- table.css ---- */
/* hd-table — data table. Wrap it in hd-table__wrap when columns may exceed
   the viewport; number cells get hd-table__num for right alignment. */
.hd-table__wrap {
  max-width: 100%;
  overflow-x: auto;
}

.hd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--hd-font-size-small);
  line-height: var(--hd-line-height-snug);
  font-variant-numeric: tabular-nums;
}

.hd-table th,
.hd-table td {
  padding: var(--hd-space-2) var(--hd-space-3);
  border-bottom: var(--hd-border);
  text-align: start;
  vertical-align: top;
}

.hd-table th {
  color: var(--hd-color-text-muted);
  font-weight: var(--hd-font-weight-semibold);
}

.hd-table .hd-table__num {
  text-align: end;
}

.hd-table caption {
  caption-side: bottom;
  padding-top: var(--hd-space-2);
  color: var(--hd-color-text-muted);
  font-size: var(--hd-font-size-caption);
  text-align: start;
}

/* ---- details.css ---- */
/* hd-details — disclosure for secondary information (technical details,
   raw scores). Native details/summary supply the behaviour. */
.hd-details {
  border: var(--hd-border);
  border-radius: var(--hd-radius-medium);
  background: var(--hd-color-surface);
}

.hd-details > summary {
  display: flex;
  align-items: center;
  gap: var(--hd-space-2);
  min-height: var(--hd-control-height-compact);
  padding: var(--hd-space-2) var(--hd-space-3);
  color: var(--hd-color-text-muted);
  font-size: var(--hd-font-size-small);
  font-weight: var(--hd-font-weight-semibold);
  list-style: none;
  cursor: pointer;
}

.hd-details > summary::-webkit-details-marker {
  display: none;
}

.hd-details > summary::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--hd-duration-fast) ease;
}

.hd-details[open] > summary::before {
  transform: rotate(45deg);
}

.hd-details > summary:focus-visible {
  outline: var(--hd-focus-width) solid var(--hd-color-focus);
  outline-offset: var(--hd-focus-offset);
}

.hd-details__body {
  padding: 0 var(--hd-space-3) var(--hd-space-3);
  color: var(--hd-color-text);
  font-size: var(--hd-font-size-small);
}

@media (prefers-reduced-motion: reduce) {
  .hd-details > summary::before {
    transition: none;
  }
}
