/* theme.css — a2z design tokens.
 *
 * The fonts are vendored in assets/fonts/ as two variable woff2 files. Nothing in this
 * stylesheet reaches the network: no @import, no Google Fonts, no CDN.
 */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('assets/fonts/dm-sans-var.woff2') format('woff2');
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('assets/fonts/manrope-var.woff2') format('woff2');
}

:root {
  /* #0078d4 measured 4.33:1 against the page's own #fafafa — under the 4.5:1 a bold 14px
   * link needs, and axe flagged it on 21 nodes. #0064b1 is the same hue, darker, and
   * measures 5.0:1 there and 6.4:1 for white on it. */
  --color-primary: #0064b1;
  --color-primary-contrast: #ffffff;
  --color-bg: #f3f3f3;
  --color-surface: #ffffff;
  --color-text: #1f1f1f;
  --color-muted: #616161;
  --color-border: #d6d6d6;
  --color-soft: #e5f1fb;
  --color-green: #107c10;
  --color-heading-accent: #0078d4;
  --font-heading: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --radius: 4px;
}

/* Shared page chrome that Tailwind's reset does not cover. */
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
}

h1,
h2,
h3,
.display {
  font-family: var(--font-heading);
}

* {
  border-radius: 0;
}

.drop-active {
  border-color: var(--color-primary) !important;
  background: #e5f1fb !important;
  box-shadow: inset 0 0 0 1px var(--color-primary);
}

.tile-action {
  border-radius: 3px;
  box-shadow: none;
}

.tile-action:hover {
  transform: none;
  filter: brightness(.97);
}

.thin-scroll::-webkit-scrollbar {
  width: 6px;
}

.thin-scroll::-webkit-scrollbar-thumb {
  background: #d9dbe6;
  border-radius: 9px;
}

.file-row {
  animation: rise .22s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid #a9a0ff;
  outline-offset: 3px;
}

.hero-glow {
  background: radial-gradient(ellipse at 78% 20%, rgba(20, 180, 151, .16), transparent 36%), radial-gradient(ellipse at 12% 0%, rgba(104, 87, 232, .13), transparent 42%);
}

/* D5 — under 640 px the seven-column block table becomes stacked cards. A scrollbar on a
   phone is a table nobody reads; the same data as cards is a list. */
@media (max-width: 640px) {
  .dr-table thead {
    display: none;
  }

  .dr-table,
  .dr-table tbody,
  .dr-table tr,
  .dr-table td {
    display: block;
    width: 100%;
  }

  .dr-table tr {
    border: 1px solid #ececec;
    margin-bottom: 6px;
    padding: 4px 6px;
    background: #fcfcfc;
  }

  .dr-table td {
    border: 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 0;
    white-space: normal;
  }

  .dr-table td::before {
    content: attr(data-label);
    color: #8a8a8a;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
  }
}

/* The chosen compression level. */
.level-pick[aria-pressed="true"] {
  border-color: var(--color-primary);
  background: var(--color-soft);
  color: #004e8c;
}

/* The ziptastic report. */
.dr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.dr-table th {
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10px;
  color: #616161;
  border-bottom: 1px solid #e3e3e3;
  padding: 4px 6px;
  white-space: nowrap;
}

.dr-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 4px 6px;
  white-space: nowrap;
}

.dr-table td.mono,
.dr-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dr-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  line-height: 1.45;
}

.dr-check:last-child {
  border-bottom: 0;
}

.dr-pass {
  color: #107c10;
}

.dr-fail {
  color: #b3261e;
}

/* The CHCE fleet nav — the same block, with the same markup, in every member's page. */
.fleetnav {
  margin: 34px auto 0;
  padding: 22px 20px 26px;
  max-width: 64rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.55;
}

.fleetnav-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fleetnav-label {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--color-text);
}

.fleetnav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.fleetnav li {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.fleetnav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.fleetnav a:hover {
  border-bottom-color: currentColor;
}

.fleetnav span {
  /* Was `opacity: .6`, which measured 2.5:1 against the page — the descriptions were
   * almost unreadable and axe said so. A solid colour at the same weight reads as
   * secondary without failing the contrast rule. */
  color: #555555;
  font-size: 12px;
}

.fleetnav a[aria-current="page"] {
  color: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
  .file-row {
    animation: none;
  }

  * {
    transition-duration: .01ms !important;
  }
}
