.azp-history {
  --history-ink: var(--ink, #263c42);
  --history-paper: var(--surface, #f7f9f6);
  --history-tint: var(--surface-tint, #ddefef);
  --history-border: var(--border, #85b7a7);
  --history-line: var(--border-strong, #85b7a7);
  --history-accent: var(--primary-deep, #21584c);
  --history-radius: var(--radius, 14px);
  min-width: 0;
  color: var(--history-ink);
}

.azp-history [hidden] { display: none !important; }
.azp-history [data-interactive] { display: grid; gap: 1rem; }
.azp-history .azp-history-inputs,
.azp-history [data-summary] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
  align-items: start;
}

.azp-history .azp-history-card {
  display: grid;
  gap: .8rem;
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--history-border);
  border-radius: var(--history-radius);
  background: var(--history-paper);
  box-shadow: var(--shadow-sm, none);
}

.azp-history :is(h2, h3, p, dl, ul) { margin: 0; }
.azp-history :is(h2, h3, p, dd, bdi, code, summary) { overflow-wrap: anywhere; }
.azp-history h2 { scroll-margin-block-start: 6rem; }

.azp-history .azp-history-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: .7rem;
  align-items: start;
}

.azp-history label {
  display: grid;
  align-content: start;
  gap: .3rem;
  min-width: 0;
  font-weight: 650;
}

.azp-history :is(input, select, button) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: .45rem .7rem;
  border: 1px solid var(--history-line);
  border-radius: .6rem;
  background: var(--history-paper);
  color: var(--history-ink);
  font: inherit;
}

.azp-history :is(input, select) { width: 100%; }
.azp-history input[type="file"] { padding: .3rem; }
.azp-history input[type="file"]::file-selector-button { margin-inline-end: .5rem; font: inherit; }
.azp-history button { font-weight: 700; overflow-wrap: anywhere; cursor: pointer; }
.azp-history button:hover:not(:disabled) { background: var(--history-tint); color: var(--history-ink); }
.azp-history button:disabled { opacity: .62; cursor: default; }
.azp-history button.azp-history-primary { border-color: var(--history-accent); background: var(--history-accent); color: white; }
.azp-history :focus-visible { outline: 3px solid var(--history-accent); outline-offset: 2px; }
.azp-history a { color: var(--history-accent); text-decoration: underline; text-underline-offset: .2em; }

.azp-history :is(.azp-history-actions, [data-pages]) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

.azp-history [data-status]:empty { margin-block: -.5rem; }
.azp-history :is([data-status]:not(:empty), [data-storage], [data-clear]) {
  padding: .7rem .85rem;
  border: 1px solid var(--history-line);
  border-radius: .6rem;
  background: var(--history-tint);
}
.azp-history [data-storage] { background: var(--accent-soft, #f2d9ac); }
.azp-history [data-clear] > p { margin-block-end: .55rem; }

.azp-history .azp-history-group,
.azp-history .azp-history-list > li {
  min-width: 0;
  padding: .8rem;
  border: 1px solid var(--history-border);
  border-radius: .65rem;
  background: var(--history-tint);
}

.azp-history .azp-history-group { display: grid; gap: .5rem; }
.azp-history .azp-history-group dl { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.azp-history .azp-history-group dt { font-size: .93em; }
.azp-history .azp-history-group dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.azp-history summary { min-height: 44px; align-content: center; font-weight: 700; cursor: pointer; }
.azp-history .azp-history-group ul { padding-inline-start: 1.15rem; }
.azp-history .azp-history-list { display: grid; gap: .4rem; padding: 0; list-style: none; }
.azp-history .azp-history-list > li { display: grid; gap: .2rem; }
.azp-history .azp-history-list > li > bdi { font-weight: 700; white-space: pre-line; }
.azp-history .azp-history-list > li p { font-size: .93em; }
.azp-history .azp-history-list select { width: auto; justify-self: start; }

#azp-history-csv { scroll-margin-block-start: calc(var(--mast-h, 64px) + 1rem); }
#azp-history-csv ~ table :is(th, td) { overflow-wrap: anywhere; }
