/* Reset and base typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keep anchored and focused content clear of the sticky header (WCAG 2.4.11). */
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--text-base);
  line-height: var(--leading);
  color: var(--ink);
  background: var(--ground);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 0.94;
}

h2 {
  font-size: var(--text-h2);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-top: var(--space-7);
}

h3 {
  font-size: var(--text-h3);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-top: var(--space-6);
}

h4 {
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-top: var(--space-5);
}

h1:first-child,
h2:first-child,
h3:first-child {
  margin-top: 0;
}

p,
ul,
ol,
dl,
table,
figure,
blockquote {
  margin: 0 0 var(--space-4);
}

p,
li,
dd {
  max-width: var(--measure);
}

ul,
ol {
  padding-left: 1.25em;
}

li + li {
  margin-top: var(--space-1);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--motion);
}

a:hover {
  color: var(--action);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.on-dark a:focus-visible,
.on-dark button:focus-visible,
.on-dark input:focus-visible {
  outline-color: var(--on-dark);
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin-left: 0;
  margin-right: 0;
}

figcaption {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin-top: var(--space-2);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--space-6) 0;
}

strong {
  font-weight: 600;
}

small,
.small {
  font-size: var(--text-sm);
}

code {
  font-family: var(--f-mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 0 0.25em;
}

/* Consignment-note text: labels and data */
.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 var(--space-3);
}

.data {
  font-family: var(--f-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--text-sm);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 600;
}

thead th {
  background: var(--surface);
  font-family: var(--f-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink-soft);
}

td.num,
th.num {
  text-align: right;
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}

caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: var(--space-2);
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-4);
}

dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
}

dl.facts dt {
  font-family: var(--f-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.3em;
}

dl.facts dd {
  margin: 0;
}

address {
  font-style: normal;
}

details {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0;
  margin-bottom: var(--space-3);
}

details + details {
  border-top: 0;
}

summary {
  cursor: pointer;
  font-family: var(--f-display);
  font-weight: 600;
  padding: var(--space-3) 0;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  color: var(--accent);
}

details[open] summary {
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-3);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--on-dark);
  padding: var(--space-3) var(--space-4);
  font-family: var(--f-display);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
  outline-color: var(--action);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Windows High Contrast and other forced-colour modes: keep edges and states visible. */
@media (forced-colors: active) {
  .button,
  .button--secondary,
  .badge,
  .tile,
  .card,
  .panel,
  .notice,
  .filters a,
  .page-nav a,
  .field input,
  .field select,
  .field textarea {
    border: 1px solid CanvasText;
  }
  .button {
    border: 2px solid ButtonText;
  }
  .site-nav a[aria-current='page'],
  .site-nav a[aria-current='true'],
  .subnav a[aria-current='page'],
  .filters a[aria-current='true'] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    border-bottom: 2px solid Highlight;
  }
  .skip-link:focus,
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  summary:focus-visible {
    outline: 3px solid Highlight;
  }
  .legend-swatch {
    border-top-color: CanvasText;
  }
  .hero__image img {
    opacity: 0.6;
  }
}

@media print {
  header nav,
  footer,
  .no-print {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
