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

/* Font family, text color, size, line-height and font smoothing all come from
   the design system CDN (body/html rules). Only layout lives here. */
/* Page background: DS token (the DS itself leaves the body white). A flat
   near-white keeps the white cards distinguishable. Replaces an old custom
   three-color gradient. */
body {
  background: var(--color-blue-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── U-M Library Design System: Skip Link ──────────────────────────
 * Copied verbatim from the DS CodePen (pen/gOogXeG), linked from
 * https://design-system.lib.umich.edu/reusable-designs/skip-link/
 * Required by the DS Website Header. Hidden until focused with Tab.
 */
.skip-links {
  width: 100%;
  background: var(--color-blue-400);
  padding: var(--space-small);
  margin: 0;
}

.skip-links ul {
  padding-left: 0;
}

.skip-links ul li {
  margin: var(--space-medium) 0;
  text-align: center;
}

.skip-links a,
.skip-links a:visited {
  color: #fff;
  padding: var(--space-x-small);
}

.skip-links:not(:focus-within) {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── End design system skip link ───────────────────────────────── */

/* Header: <m-universal-header> is a DS web component and styles itself. */

/* ── Website Header (local copy of DS m-website-header) ────────────
 * Copied from the component's own stylesheet in @umich-lib/web 1.3.2:
 * dist/collection/components/website-header/website-header.css
 * The component is rebuilt locally only so the logo can be swapped for the
 * Michigan Publishing signature. The :host rules became .website-header, and
 * the dark variant is omitted (we use the white variant). The only addition
 * is .website-header__logo (sizing for the <img>, which replaces <m-logo>).
 */
.website-header {
  font-family: var(--font-base-family);
  line-height: var(--line-height-default);
  font-size: 16px;
  background: white;
}
.website-header__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-medium);
}
@media screen and (min-width: 721px) {
  .website-header__container {
    padding: var(--space-medium) var(--space-xx-large);
  }
}
.website-header__inner-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.website-header__logo-container {
  display: flex;
  flex-direction: column;
}
@media screen and (min-width: 721px) {
  .website-header__logo-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .website-header__logo-container .website-header__lib-link {
    margin-bottom: 0;
  }
}
.website-header__lib-link {
  margin-right: var(--space-medium);
  display: inline-block;
  line-height: 0;
  margin-bottom: var(--space-x-small);
}
.website-header__website-home-link,
.website-header__website-home-link:visited {  /* :visited added: in the DS component the Shadow DOM shields it from the page's a:visited purple */
  display: inline-flex;
  align-items: center;
  color: var(--color-neutral-300);
  text-decoration: none;
  line-height: 0;
}
.website-header__website-home-link:hover .website-header__website-name {
  text-decoration: underline;
}
.website-header__website-name {
  display: block;
  font-size: var(--text-medium);
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: 0.5px;
}
/* Addition: size the logo image (replaces the DS <m-logo> element) */
.website-header__logo {
  height: 2.5rem;
  width: auto;
  border-radius: 0;  /* the DS base CSS rounds all <img>; a logo shouldn't be */
}
/* ── End website header ────────────────────────────────────────── */

/* Upload screen h1: font and color come from the DS h1 rule.
   Divergence: size reduced to 24px (DS h1 is 40 to 48px) so the long sentence
   fits the narrow upload card. */
.upload-page-title {
  font-size: 24px;
  line-height: 1.25;
  margin: 0;
  text-align: center;
}

/* list-style reset for the skip link list (our global reset removes margin/padding only) */
.skip-links ul { list-style: none; }

/* ── Main ── */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-large) var(--viewport-margin);
}

/* ── Upload card ──
   Custom (no DS card component). DS tokens only. Holds the page h1 and the
   Uppy Dashboard (see the "Uppy uploader" block at the end of this file). */
.upload-card {
  padding: var(--space-x-large) var(--space-large);
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-medium);
}


/* ── U-M Library Design System: Buttons ────────────────────────────
 * Copied verbatim from the DS CodePen (pen/PoOXJjM), linked from
 * https://design-system.lib.umich.edu/reusable-designs/buttons/
 * The DS team says the CDN's own .button styles are outdated, so the
 * CodePen CSS is the source of truth. Replace when the modular CSS
 * package ships. Do not edit values here; override in a separate
 * block below if a deliberate divergence is ever needed.
 */
button,
.button {
  border: none;
  outline: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .25rem;
  padding: 0 .75rem;
  font-size: 1rem;
  min-height: 2.5rem;
  line-height: 1.5;
  font-weight: 700;
  font-family: var(--font-base-family);
  border-radius: var(--radius-default);
}

button:focus,
.button:focus {
  outline: 0 !important;
  box-shadow: 0 0 0 2px var(--color-maize-400),
    0 0 0 3px var(--color-neutral-400) !important;
  border-radius: 2px !important;
}

.button--primary {
  background: var(--color-teal-400);
  color: #fff;
}

.button--secondary {
  background: var(--color-neutral-100);
  color: var(--color-neutral-400);
}

.button--critical {
  background: var(--color-pink-500);
  color: #fff;
}

.button--outline,
.button--ghost {
  background: #fff;
  border: solid 1px;
  color: var(--color-neutral-400);
}

.button--search {
  background: var(--color-maize-400);
  color: var(--color-neutral-400);
}

button:disabled,
.button:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

/* Not in the DS CodePen, but required for usability: pointer cursor */
button:not(:disabled) { cursor: pointer; }

/* ── End design system buttons ─────────────────────────────────── */


/* ── U-M Library Design System: Badges ─────────────────────────────
 * Copied verbatim from the DS CodePen (pen/wvbJWOe), linked from
 * https://design-system.lib.umich.edu/reusable-designs/badges/
 * Used for the Pass / Warning / Needs fix / Review status on each check.
 */
.badge {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  color: var(--color-neutral-400);
  background-color: var(--color-neutral-100);
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
}

.badge--success {
  background-color: var(--color-green-200);
}

.badge--warning {
  background-color: var(--color-maize-200);
}

.badge--critical {
  background-color: var(--color-pink-200);
}

/* ── End design system badges ──────────────────────────────────── */




/* ── Upload zone (empty state; files are handed to Uppy) ──
   Custom (no DS component; the DS File Upload component was not used per the
   team's Uppy decision). DS tokens only. */
.upload-zone {
  width: 100%;
  border: 2px dashed var(--color-blue-400);
  border-radius: 8px;
  padding: var(--space-x-large) var(--space-large);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-small);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.upload-icon-wrap {
  width: 52px;
  height: 52px;
  background: var(--color-neutral-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xx-small);
  transition: background 0.2s ease;
}

/* Hover / drag-over highlight */
.upload-zone:hover .upload-icon-wrap,
.upload-zone.dragover .upload-icon-wrap {
  background: var(--color-maize-200);
}
.upload-zone:hover,
.upload-zone.dragover {
  background: var(--color-blue-100);
  border-color: var(--color-maize-400);
}

.upload-primary {
  font-size: var(--text-small);
  font-weight: var(--semibold);
  color: var(--color-blue-400);
}

.upload-secondary {
  font-size: var(--text-xxx-small);
  color: var(--color-neutral-300);
}

.upload-hint {
  color: var(--color-neutral-300);
  font-size: var(--text-xx-small);   /* 16px (was 14px) */
}

/* One compact card with an attached information footer. */
.upload-screen {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 39, 76, 0.10),
              0 1px 4px rgba(0, 39, 76, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.upload-guidance {
  width: 100%;
  padding: var(--space-large);
  border-top: 1px solid var(--color-blue-200);
  background: var(--color-blue-100);
  color: var(--color-neutral-400);
  font-size: var(--text-xx-small);
  line-height: var(--line-height-default);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-medium);
}

.upload-guidance p {
  margin: 0;
}

.upload-guidance strong {
  display: block;
  font-weight: var(--bold);
  margin-bottom: var(--space-xx-small);
}

/* Rejected file message (pink-500 on white: 5.7:1) */
.upload-error {
  color: var(--color-pink-500);
  font-weight: var(--semibold);
}

/* ── Loading ── */
/* Custom (no DS loading component). Tokens only. The DS base CSS already
   disables the animation for users with prefers-reduced-motion. */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-large);
  color: var(--color-blue-400);
  font-weight: var(--semibold);
}

.loading-dots {
  display: flex;
  gap: var(--space-x-small);
  align-items: center;
}

.loading-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-blue-400);
  animation: pulse-dot 1s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse-dot {
  0%, 60%, 100% { transform: translateY(0);    background: var(--color-blue-400); }
  30%            { transform: translateY(-12px); background: var(--color-maize-400); }
}

/* ── U-M Library Design System: Link ──────────────────────────────
 * Copied verbatim from the DS Link CodePen (the "Do not copy" section
 * was left out), linked from
 * https://design-system.lib.umich.edu/reusable-designs/link/
 * Must come BEFORE the footer block: .footer a and a:visited have equal
 * specificity, so the footer's white link color has to be declared later.
 */
a {
  color: var(--color-teal-400);
}

a:visited {
  color: #575294;
}

:focus {
  outline: 0;
  box-shadow: 0 0 0 2px var(--color-maize-400),
    0 0 0 3px var(--color-neutral-400);
  border-radius: 2px !important;
}

/* ── End design system link ────────────────────────────────────── */


/* ── U-M Library Design System: Website Footer ─────────────────────
 * Copied verbatim from the DS Website Footer CodePen, linked from
 * https://design-system.lib.umich.edu/reusable-designs/website-footer/
 */
.footer {
  background: var(--color-blue-400);
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer ul a {
  display: inline-block;
  padding: .25rem 0;
}

.footer ul a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.footer ul a span:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.footer a {
  color: white;
}

.footer a > svg {
  margin-right: 0.5em;
}

.address {
  max-width: 22ch;
}

.footer__content {
  color: var(--color-blue-100);
  padding: 3rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 3rem;
}

.footer__content .first-column ul li a {
  text-decoration: none;
  display: flex;
  align-items: baseline;
}

.footer__content ul li a {
  text-decoration: none;
}

.footer__content h2 {
  color: var(--color-blue-200);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer__policies {
  border-left: solid 1px var(--color-blue-300);
  padding-left: 2em;
}

@media screen and (max-width: 1200px) {
  .footer__policies {
    border-left: none;
    padding-left: 0;
  }
}

.footer__disclaimer {
  background: var(--color-blue-500);
  color: var(--color-blue-200);
  padding: 1rem 0;
}

.footer__disclaimer a {
  color: var(--color-blue-200);
}

.footer__disclaimer p {
  margin: 0;
}

@media screen and (max-width:40rem) {
  .footer__disclaimer p {
    padding-top: 0.5rem;
  }
 }

@media screen and (min-width: 820px) {
  .footer__disclaimer p {
    display: inline-block;
  }
  .footer__disclaimer p + p {
    margin-left: 2rem;
  }
}

/* ── End design system website footer ──────────────────────────── */

/* Divergence: the tool only has two footer sections. Pin the links section
   to the LAST grid column (column 3 on desktop) so the middle stays empty.
   On narrow screens the grid collapses to one column and this is a no-op. */
.footer__content > .footer__links {
  grid-column: -2 / -1;
}

[hidden] {
  display: none !important;
}

/* ── REPORT CARD ── */
/* Width and side padding match the DS .viewport-container (1280px, --viewport-margin) */
#report-card {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-xx-small) var(--viewport-margin) var(--space-xx-large);
  display: flex;
  flex-direction: column;
  gap: var(--space-x-large);
}

/* Download Report button: only needs the chevron gap + nowrap for layout */
.btn-download-report {
  white-space: nowrap;
  gap: var(--space-x-small);
}

.dropdown-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.download-wrap {
  position: relative;
}

/* Dropdown panel: DS tokens only. Menu items are DS ghost buttons
   (the DS button guidance says ghost is for dropdowns); only layout is set here. */
.download-dropdown {
  position: absolute;
  top: calc(100% + var(--space-xx-small));
  left: 0;
  min-width: 100%;
  background: #fff;
  border: 1px solid var(--color-neutral-100);
  border-radius: var(--radius-default);
  box-shadow: var(--z-space-medium);
  padding: var(--space-x-small);
  display: flex;
  flex-direction: column;
  gap: var(--space-x-small);
  z-index: 100;
}

.download-dropdown[hidden] {
  display: none;
}

.download-dropdown .button {
  width: 100%;
  justify-content: flex-start;
  white-space: nowrap;
}

/* ── Summary ring ── */
.ring-legend {
  display: flex;
  gap: var(--space-medium);
  flex-wrap: wrap;
  justify-content: center;
}

.legend-item {
  font-size: var(--text-xxx-small);
  font-weight: var(--semibold);
  display: flex;
  align-items: center;
  gap: var(--space-x-small);
}

.legend-item::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-pass::before { background: var(--color-green-400); }
.legend-warn::before { background: var(--color-orange-400); }
.legend-fail::before { background: var(--color-pink-400); }

/* Legend text uses the -500 shades: the -400 green and orange fail WCAG AA on white */
.legend-pass { color: var(--color-green-500); }
.legend-warn { color: var(--color-orange-500); }
.legend-fail { color: var(--color-pink-500); }

/* ── Report sections ── */
/* Cards: DS radius + shadow tokens */
.report-section {
  background: #fff;
  border-radius: var(--radius-default);
  box-shadow: var(--z-space-small);
  padding: var(--space-large);
  display: flex;
  flex-direction: column;
  gap: var(--space-medium);
}

/* h2 section titles: size, weight, font and color come from the DS h2 rule */
.report-section-title {
  margin: 0;
}

.report-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-medium);
}

/* ── Three-column row ── */
.report-summary-row {
  display: flex;
  gap: var(--space-large);
  align-items: stretch;
}

.report-summary-row .report-section {
  flex: 1;
  gap: 0;
  text-align: center;
}

.summary-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-medium);
}

.report-ring-section,
.report-actions-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-medium);
  background: #fff;
  border-radius: var(--radius-default);
  box-shadow: var(--z-space-small);
  padding: var(--space-large);
  min-width: 200px;
  flex: 1;
  align-self: stretch;
}

/* Persistent limitation notice occupies the upper part of Next Steps. */
.report-limitations {
  flex: 1;
  width: 100%;
  padding-bottom: var(--space-medium);
  border-bottom: 1px solid var(--color-neutral-100);
  color: var(--color-neutral-400);
  font-size: var(--text-xx-small);
  line-height: var(--line-height-default);
  text-align: left;
}

.report-limitations p {
  margin: 0;
  font-weight: var(--bold);
}

/* Actions column: buttons stack vertically, centered */
.report-actions-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-small);
  width: 100%;
  align-items: stretch;
  justify-content: center;
  flex: 1;
}

.report-actions-inner .download-wrap,
.report-actions-inner .button {
  width: 100%;
  justify-content: center;
}

/* ── Document summary dl ── */
.report-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: var(--space-medium);
  row-gap: var(--space-small);
  margin: 0;
}

.report-dl-row {
  display: contents;
}

.report-dl-row dt {
  color: var(--color-neutral-300);
  font-weight: var(--regular);
  text-align: right;
  align-self: start;
  white-space: nowrap;
}

.report-dl-row dd {
  color: var(--color-blue-400);
  font-weight: var(--semibold);
  margin: 0;
  text-align: left;
  align-self: start;
  word-break: break-word;
  min-width: 0;
}


/* ── Check cards (fixable + signals) ── */
.check-card {
  border-left: 4px solid var(--color-neutral-100);
  border-radius: var(--radius-default);
  padding: var(--space-medium);
  background: var(--color-blue-100);
  display: flex;
  flex-direction: column;
  gap: var(--space-x-small);
  margin-bottom: var(--space-small);
}

/* Status tint + left border, DS tokens (was hardcoded rgba) */
.check-card.pass   { border-left-color: var(--color-green-400);  background: var(--color-green-100); }
.check-card.warn   { border-left-color: var(--color-orange-400); background: var(--color-orange-100); }
.check-card.fail   { border-left-color: var(--color-pink-400);   background: var(--color-pink-100); }
.check-card.review { border-left-color: var(--color-indigo-400); background: var(--color-indigo-100); }

.check-card-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--space-small);
}

.check-card-header::after {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  /* Chevron drawn as a mask so its color can come from a DS token */
  background-color: var(--color-blue-400);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s ease;
  opacity: 0.5;
}

details[open] .check-card-header::after {
  transform: rotate(180deg);
  opacity: 1;
}

/* h3 check titles: size, weight, font and color come from the DS h3 rule */
.check-card-title {
  margin: 0;
}

/* Status badges use the DS .badge component (see top of file). */
.check-card-header .badge {
  white-space: nowrap;
}

/* Body text: size, color and line-height come from DS body defaults (16px / neutral-400 / 1.5) */

/* ── Status summary banner ──
   Custom (DS Banners are for site-wide alerts only). Status is shown by the
   tinted background and left border. Text is dark neutral, like the DS badge:
   the colored text shades fail WCAG AA on their own tints (orange-500 on
   orange-100 is 4.2:1, green-500 on green-100 is 4.3:1). */
.status-banner {
  border-radius: var(--radius-default);
  padding: var(--space-medium) var(--space-large);
  font-size: var(--text-small);
  font-weight: var(--semibold);
  color: var(--color-neutral-400);
}

.status-banner.banner-fail {
  background: var(--color-pink-100);
  border-left: 4px solid var(--color-pink-400);
}

.status-banner.banner-warn {
  background: var(--color-orange-100);
  border-left: 4px solid var(--color-orange-400);
}

.status-banner.banner-pass {
  background: var(--color-green-100);
  border-left: 4px solid var(--color-green-400);
}

.status-banner span {
  display: block;
  font-size: var(--text-xx-small);
  font-weight: var(--regular);
  margin-top: var(--space-xx-small);
}

/* h1: font (Crimson Text), color and line-height come from the DS h1 rule.
   Divergence: size reduced to 28px (DS h1 is 40 to 48px) because long file
   names made the title too large. */
.report-page-title {
  font-size: 28px;
  margin: 0;
  text-align: center;
  overflow-wrap: anywhere;  /* long filenames wrap instead of overflowing */
}


details.check-card summary {
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-default);
}

/* Hover: underline the title, following the DS link hover pattern
   (replaces a hardcoded rgba background) */
details.check-card summary:hover .check-card-title {
  text-decoration: underline;
}

details.check-card summary::-webkit-details-marker {
  display: none;
}

.check-card-body-content {
  padding-top: var(--space-small);
  display: flex;
  flex-direction: column;
  gap: var(--space-x-small);
}

.check-fix-row {
  display: flex;
  gap: var(--space-small);
  margin-top: var(--space-xx-small);
}

/* ── Print styles ── */
@media print {
  @page {
    margin: 24mm 16mm;
  }

  body {
    background: white;
    font-size: 12pt;
  }

  m-universal-header, .website-header, .skip-links,
  .footer, .loading, .upload-screen, .upload-card, .api-error,
  .report-actions-section > .report-section-title, .report-actions-inner,
  #fixable-expand-btn, #signals-expand-btn,
  .report-page-title {
    display: none !important;
  }

  main {
    padding: 0;
    display: block;
  }

  #report-card {
    padding: 0;
    gap: 16pt;
    max-width: 100%;
  }

  .report-summary-row {
    gap: 12pt;
  }

  .report-section,
  .report-ring-section {
    box-shadow: none;
    border: 1px solid var(--color-neutral-100);
  }

  .report-ring-section,
  .report-summary-row .report-section {
    break-inside: avoid;
  }

  /* Force all check cards open */
  details.check-card {
    display: block;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 12pt;
  }

  details.check-card summary::marker,
  details.check-card summary::-webkit-details-marker {
    display: none;
  }

  .check-card-body-content {
    display: flex !important;
  }

  .check-card-header::after {
    display: none;
  }

  .check-fix-row {
    flex-direction: column;
    gap: 8pt;
  }

  .fix-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-checks {
    break-inside: auto;
  }

  .status-banner {
    break-after: page;
  }

  #fixable-checks {
    break-after: page;
  }

  .status-banner {
    border-radius: 4pt;
  }

  /* Print header in place of site header */
  #report-card::before {
    content: 'PDF Accessibility Report, University of Michigan';
    display: block;
    font-size: 11pt;
    color: var(--color-blue-400);
    font-weight: 600;
    border-bottom: 2px solid var(--color-maize-400);
    padding-bottom: 8pt;
    margin-bottom: 16pt;
  }
}

/* Fix panels: no DS component exists, so use the DS card pattern
   (white, neutral-100 border, default radius, token spacing). Word and
   Acrobat panels are identical; the h4 label distinguishes them. */
.fix-card {
  flex: 1;
  background: #fff;
  border: 1px solid var(--color-neutral-100);
  border-radius: var(--radius-default);
  padding: var(--space-medium);
  display: flex;
  flex-direction: column;
  gap: var(--space-x-small);
}

/* h4 labels use the DS .subtle-heading class (added in app.js) */
.fix-card-label {
  margin: 0;
}

.fix-steps {
  margin: 0;
  padding-left: var(--space-large);
  display: flex;
  flex-direction: column;
  gap: var(--space-xx-small);
}

/* ── Responsive ── */

/* Tablet and small laptop (≤ 768px) */
@media (max-width: 768px) {
  main {
    padding: var(--space-medium);
  }

  .upload-card {
    padding: var(--space-large);
  }

  .upload-guidance {
    padding: var(--space-large);
  }

  #report-card {
    padding: var(--space-xx-small) 0 var(--space-x-large);
    gap: var(--space-large);
  }

  /* Three-column row stacks vertically */
  .report-summary-row {
    flex-direction: column;
  }

  .report-ring-section {
    min-width: unset;
  }

  /* Fix panels stack vertically */
  .check-fix-row {
    flex-direction: column;
  }
}

/* Mobile (≤ 480px) */
@media (max-width: 480px) {
  main {
    padding: var(--space-small);
  }

  .download-dropdown {
    min-width: 100%;
  }

  .check-card-header {
    gap: var(--space-x-small);
  }

  .report-section {
    padding: var(--space-medium);
  }
}

/* ══════════════════════════════════════════════════════════════════
 * TEAM CUSTOMIZATIONS (approved by the team 2026-09-29)
 * Deliberate divergences from the U-M Library Design System.
 * Kept in one block, after everything else, so the copied DS blocks
 * above stay verbatim and each override is easy to find or revert.
 * ══════════════════════════════════════════════════════════════════ */

/* 1. Page titles (both h1s) in Muli instead of the DS h1 Crimson Text */
.upload-page-title,
.report-page-title {
  font-family: var(--font-base-family);
}

/* 2. Document Summary labels (Pages, Author, ...): bold. Color stays
      the original --color-neutral-300. */
.report-dl-row dt {
  font-weight: var(--bold);
}

/* 3. Ring legend text at 16px (was 14px) */
.legend-item {
  font-size: var(--text-xx-small);
}

/* 4. Status banner second line: semibold instead of regular */
.status-banner span {
  font-weight: var(--semibold);
}

/* 5. Status badges: white background with a 2px status-colored border,
      instead of the DS -200 color fills, and semibold text. White keeps
      them distinct from the tinted check cards they sit on without
      making them loud. Text stays neutral-400 (14.4:1 on white). */
.badge {
  font-weight: var(--semibold);
  background-color: #fff;
  border: 2px solid var(--color-neutral-300);
}
.badge--success  { background-color: #fff; border-color: var(--color-green-400); }
.badge--warning  { background-color: #fff; border-color: var(--color-maize-500); }
.badge--critical { background-color: #fff; border-color: var(--color-pink-400); }

/* 8. Body text in the check cards (the explanation paragraph and the
      numbered fix steps): semibold, to match the status banner's second
      line. The DS regular (400) weight read as too thin. */
.check-card-body,
.fix-steps li {
  font-weight: var(--semibold);
}

/* 6. "Fix in Word" / "Fix in Acrobat" labels: dark text instead of the
      DS .subtle-heading grey. (.subtle-heading is already bold, 700,
      so the grey color, not the weight, was the problem.) */
.fix-card-label.subtle-heading {
  color: var(--color-neutral-400);
}

/* 7. Focus ring only for keyboard navigation. The DS applies its maize
      focus ring on :focus, so it also appears on mouse clicks. Keyboard
      focus (:focus-visible) still shows it, which keeps WCAG 2.4.7
      Focus Visible. */
:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.button:focus:not(:focus-visible) {
  box-shadow: none !important;
}


/* ══════════════════════════════════════════════════════════════════
 * UPPY UPLOADER THEME (Uppy 6.0.4 Dashboard)
 * Uppy ships its own CSS (loaded from the CDN in index.html). These
 * overrides restyle it with DS tokens so it matches the rest of the page.
 * ══════════════════════════════════════════════════════════════════ */

/* The upload card centers its children, which made the Dashboard shrink
   to its content width. Stretch it to the full card width. */
#uppy-dashboard {
  width: 100%;
  align-self: stretch;
}

/* Uppy 6 theme variables: DS font and DS primary (teal) color */
.uppy-Root {
  --uppy-font-family: var(--font-base-family);
  --uppy-color-primary: var(--color-teal-400);
  --uppy-color-primary-hover: var(--color-teal-500);
  font-family: var(--font-base-family);
  width: 100%;
}

/* Undo DS global button styles that leak into Uppy's internal buttons.
   The DS button CSS targets every <button> on the page, so Uppy's small icon
   buttons (remove file, etc.) would otherwise get a 2.5rem minimum height and
   extra gaps. Uppy's own classes set the rest. */
.uppy-Root button {
  min-height: 0;
  gap: 0;
}

/* Drop area: white with a dashed U-M blue border (matches the old drop zone) */
.uppy-Root .uppy-Dashboard-inner {
  background-color: #fff;
  border: 2px dashed var(--color-blue-400);
  border-radius: 8px;
}

/* "Check accessibility" button: DS primary button look.
   Selector matches Uppy's own (.uppy-StatusBar.is-waiting ...) plus .uppy-Root,
   so it wins over Uppy's default green. */
.uppy-Root .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload {
  background-color: var(--color-teal-400);
  color: #fff;
  font-family: var(--font-base-family);
  font-size: 1rem;
  font-weight: var(--bold);
  border-radius: var(--radius-default);
}
.uppy-Root .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover {
  background-color: var(--color-teal-500);
}

/* Progress bar in DS teal */
.uppy-Root .uppy-StatusBar-progress {
  background-color: var(--color-teal-400);
}

/* DS keyboard focus ring (maize + dark) inside Uppy, replacing Uppy's blue ring */
.uppy-Root :focus-visible {
  outline: 0 !important;
  box-shadow: 0 0 0 2px var(--color-maize-400),
    0 0 0 3px var(--color-neutral-400) !important;
}

/* 9. Smaller "Accessible" badge inside the Download HTML menu item.
      The full-size status badge nearly filled the button. */
.download-dropdown .badge {
  font-size: var(--text-xxx-small);   /* 14px */
  padding: 0 var(--space-x-small);
  line-height: 1.5;
  border-width: 1px;
}

/* ══════════════════════════════════════════════════════════════════
   SAVED REPORT STATES (/reports/<id>)
   "Not available yet" and "analysis failed" screens. Same card look as
   the upload card; DS tokens and DS buttons only.
   ══════════════════════════════════════════════════════════════════ */
.status-card {
  background: #fff;
  border-radius: var(--radius-default);
  box-shadow: var(--z-space-small);
  padding: var(--space-xx-large);
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-medium);
  text-align: center;
}

.status-card-title {
  font-size: 28px;                       /* same as the upload and report h1s */
  font-family: var(--font-base-family);  /* Muli, team customization 1 */
  margin: 0;
}

.status-card-title:focus {
  outline: none;   /* focused by script only, so screen readers announce it */
}

/* "Check a PDF" is a link styled as a DS button. The DS link rules
   (a, a:visited) outrank .button--primary, which gave purple text on teal.
   Keep the DS button's white text in every link state, and no underline. */
.status-card a.button {
  text-decoration: none;
}
.status-card a.button--primary,
.status-card a.button--primary:visited,
.status-card a.button--primary:hover {
  color: #fff;
}

.copy-link {
  width: 100%;
  text-align: left;
}

.copy-link label {
  display: block;
  font-weight: var(--bold);
  margin-bottom: var(--space-xx-small);
}

.copy-link-row {
  display: flex;
  gap: var(--space-x-small);
}

.copy-link-row input {
  flex: 1;
  min-width: 0;
  min-height: 2.5rem;
  padding: 0 var(--space-x-small);
  font-family: var(--font-base-family);
  font-size: 1rem;
  color: var(--color-neutral-400);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-default);
}

.copy-link-row input:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px var(--color-maize-400),
    0 0 0 3px var(--color-neutral-400);
}

.copy-link-status {
  min-height: 1.5em;
  margin: var(--space-xx-small) 0 0;
  color: var(--color-neutral-300);
}

@media (max-width: 640px) {
  .status-card { padding: var(--space-x-large) var(--space-large); }
  .copy-link-row { flex-direction: column; }
}

@media print {
  .status-card { display: none !important; }
}

/* On /reports/<id> the upload card never shows (class set in <head>) */
.report-route .upload-screen {
  display: none;
}

/* Compact upload-page spacing; report layouts retain their existing spacing.
   Keep normal scrolling available on small screens and at increased zoom. */
html:not(.report-route) body:has(.upload-screen:not([hidden])) main {
  padding-top: var(--space-large);
  padding-bottom: var(--space-large);
}

html:not(.report-route) body:has(.upload-screen:not([hidden])) .footer__content {
  padding-top: var(--space-large);
  padding-bottom: var(--space-large);
  gap: var(--space-large);
}

/* Content skipped by automated checks is listed in its own warning card. */
.skipped-check-list {
  margin-top: var(--space-small);
  padding-left: var(--space-large);
}

.skipped-check-list li + li {
  margin-top: var(--space-x-small);
}
