:root {
  color-scheme: light;
  --ink: #151515;
  --ink-muted: #55534f;
  --paper: #fdfcf8;
  --surface: #ffffff;
  --soft: #eeeae2;
  --accent: #d93600;
  --accent-hover: #b92e00;
  --line: #b8b4ac;
  --error: #a12600;
  --success: #176b36;
  --focus: #005fcc;
  --shadow: 0 12px 36px rgb(21 21 21 / 14%);
  --max-width: 1240px;
  --reading-width: 760px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section-space: clamp(4rem, 9vw, 7.5rem);
  --font-sans: Arial, Helvetica, sans-serif;
  --transition: 180ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-width: 280px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

textarea {
  resize: vertical;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition);
}

a:hover {
  color: var(--accent);
}

a[aria-current="page"] {
  text-decoration-thickness: 2px;
}

p,
ul,
ol,
dl,
figure,
blockquote {
  margin-top: 0;
}

p {
  margin-bottom: 1.5rem;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2.7rem, 12vw, 7.875rem);
}

h2 {
  font-size: clamp(2.25rem, 8vw, 5.625rem);
}

h3 {
  font-size: clamp(1.75rem, 6vw, 3.5rem);
}

strong {
  font-weight: 800;
}

code {
  padding: 0.15em 0.35em;
  background: var(--soft);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

::selection {
  background: var(--accent);
  color: var(--surface);
}

[hidden] {
  display: none !important;
}

.site-header > *,
.hero-grid > *,
.match-card > *,
.article-layout > *,
.contact-grid > *,
.site-footer > * {
  min-width: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.5rem;
  left: 1rem;
  padding: 0.65rem 1rem;
  border: 2px solid var(--surface);
  background: var(--ink);
  color: var(--surface);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--transition);
}

.skip-link:focus {
  color: var(--surface);
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button,
.button,
.header-cta {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--surface);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

button:hover,
.button:hover,
.header-cta:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--surface);
}

button:active,
.button:active,
.header-cta:active {
  transform: translateY(1px);
}

.button-secondary {
  background: var(--surface);
  color: var(--ink);
}

/* Header and navigation */

.site-header {
  position: relative;
  z-index: 40;
  display: grid;
  min-height: 3.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem var(--gutter);
  border-bottom: 1px solid var(--ink);
  background: rgb(253 252 248 / 96%);
}

.brand {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(0.82rem, 4vw, 1.05rem);
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  color: var(--accent);
}

.desktop-nav,
.header-cta {
  display: none;
}

.menu-button {
  display: flex;
  width: 2.6rem;
  height: 2.6rem;
  flex-direction: column;
  gap: 0.3rem;
  justify-self: end;
  padding: 0.65rem;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  flex: 0 0 auto;
  background: currentColor;
}

.mobile-nav {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  padding: 1.25rem var(--gutter) 1.5rem;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.mobile-nav.is-visible {
  display: grid !important;
  gap: 0.25rem;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  text-decoration: none;
}

.mobile-nav a:last-child {
  border-bottom: 0;
}

/* Shared page widths */

.hero,
.section,
.article-hero,
.article-layout,
.legal-page,
.contact-hero,
.contact-grid {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max-width));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.text-link {
  font-weight: 800;
}

/* Home hero */

.hero {
  padding-block: var(--section-space);
}

.hero-grid {
  display: grid;
  gap: 2rem;
}

.hero h1,
.article-hero h1,
.contact-hero h1,
.legal-page > header h1 {
  margin-bottom: 0;
}

.hero-copy {
  max-width: 31rem;
}

.hero-copy p {
  margin-bottom: 1.5rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.55;
}

.score-strip {
  display: grid;
  margin-top: clamp(2.5rem, 7vw, 4rem);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.score-strip div {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--ink);
}

.score-strip div:last-child {
  border-bottom: 0;
}

.score-strip strong {
  display: block;
  font-size: clamp(2.4rem, 10vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.score-strip span {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Home sections and match cards */

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

.section-heading {
  display: grid;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}

.section-heading h2,
.briefing h2 {
  margin-bottom: 0;
}

.section-heading p:last-child {
  max-width: 34rem;
  margin-bottom: 0;
}

.match-list {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
}

.match-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--ink);
}

.card-stats div {
  min-width: 0;
  padding: 0.9rem 0.65rem;
  border-right: 1px solid var(--ink);
}

.card-stats div:last-child {
  border-right: 0;
}

.card-stats span,
.card-stats strong {
  display: block;
  overflow-wrap: anywhere;
}

.card-stats span {
  margin-bottom: 0.55rem;
  color: var(--ink-muted);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  line-height: 1.25;
  text-transform: uppercase;
}

.card-stats strong {
  font-size: clamp(0.9rem, 3.5vw, 1.25rem);
  line-height: 1.15;
}

.match-image {
  width: 100%;
  height: clamp(14rem, 65vw, 24rem);
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 300ms ease;
}

.match-card:hover .match-image {
  filter: grayscale(35%) contrast(1.05);
}

.card-body {
  align-self: center;
  padding: clamp(1.5rem, 5vw, 2.5rem);
}

.card-body h3 {
  margin-bottom: 1.25rem;
}

.card-body p:not(.eyebrow) {
  margin-bottom: 1.5rem;
}

.briefing {
  display: grid;
  gap: 2rem;
  border-top: 1px solid var(--ink);
}

.briefing > div:last-child {
  max-width: 38rem;
}

/* Article pages */

.article-hero {
  padding-block: var(--section-space);
}

.article-hero h1 {
  max-width: 11ch;
}

.article-deck {
  max-width: 45rem;
  margin: clamp(2rem, 5vw, 3rem) 0;
  font-size: clamp(1.1rem, 3vw, 1.32rem);
  line-height: 1.55;
}

.article-stats {
  display: grid;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.article-stats div {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--ink);
}

.article-stats div:last-child {
  border-bottom: 0;
}

.article-stats span,
.article-stats strong {
  display: block;
}

.article-stats span {
  margin-bottom: 0.55rem;
  color: var(--ink-muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-stats strong {
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.article-layout {
  display: grid;
  gap: 2.5rem;
  padding-bottom: var(--section-space);
}

.article-index {
  display: grid;
  align-self: start;
  gap: 0.65rem;
  padding: 1.35rem;
  border-top: 0.4rem solid var(--accent);
  background: var(--soft);
}

.article-index strong {
  margin-bottom: 0.25rem;
}

.article-index a {
  width: fit-content;
  font-size: 0.9rem;
}

.article-content {
  width: 100%;
  max-width: var(--reading-width);
}

.article-content section {
  padding-bottom: clamp(3.5rem, 8vw, 5rem);
  scroll-margin-top: 5rem;
}

.article-content h2,
.legal-page h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.2rem, 7vw, 3.45rem);
}

.article-content h3 {
  margin: 2.5rem 0 1rem;
  font-size: clamp(1.55rem, 4vw, 1.8rem);
  line-height: 1.05;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.callout {
  margin-top: 2.5rem;
  padding: 1.4rem;
  border: 1px solid var(--ink);
  border-top: 0.5rem solid var(--accent);
  background: var(--surface);
}

.callout p {
  margin: 0.65rem 0 0;
}

.next-guide {
  display: grid;
  gap: 0.65rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
}

.next-guide span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-guide a {
  font-size: clamp(1.25rem, 5vw, 1.65rem);
  font-weight: 800;
  line-height: 1.2;
}

/* Legal pages */

.legal-page {
  max-width: 54rem;
  padding-block: var(--section-space);
}

.legal-page > header {
  padding-bottom: clamp(3.5rem, 8vw, 5rem);
}

.legal-page > header p:last-child {
  max-width: 44rem;
  margin: 2rem 0 0;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
}

.legal-page section {
  padding-block: clamp(2.25rem, 6vw, 3.25rem);
  border-top: 1px solid var(--line);
}

.legal-page section:last-child {
  padding-bottom: 0;
}

.legal-page p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  width: 100%;
  margin: 1.5rem 0;
  overflow-x: auto;
  border: 1px solid var(--ink);
  overscroll-behavior-inline: contain;
}

table {
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  min-width: 8.75rem;
  padding: 1rem;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-align: left;
  vertical-align: top;
}

th:last-child,
td:last-child {
  border-right: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--ink);
  color: var(--surface);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Contact page */

.contact-hero {
  padding-block: var(--section-space);
}

.contact-hero p:last-child {
  max-width: 42rem;
  margin: 2rem 0 0;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
}

.contact-grid {
  display: grid;
  gap: 3rem;
  padding-bottom: var(--section-space);
}

.contact-details h2,
.contact-form h2 {
  margin-bottom: 2rem;
  font-size: clamp(2rem, 6vw, 2.5rem);
  line-height: 1.05;
}

.contact-details dl {
  margin: 0 0 2.5rem;
}

.contact-details dl div {
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

dd {
  margin: 0.6rem 0 0;
  overflow-wrap: anywhere;
}

.static-map {
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--soft);
}

.static-map svg {
  width: 100%;
  height: auto;
}

.contact-form {
  align-self: start;
  padding: clamp(1.4rem, 5vw, 2.5rem);
  border: 1px solid var(--ink);
  background: var(--surface);
}

.field {
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

textarea {
  min-height: 10rem;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--accent);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
}

.checkbox-field {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.checkbox-field input {
  width: 1.25rem;
  min-height: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  accent-color: var(--accent);
}

.field-error {
  display: none;
  margin: 0.5rem 0 0;
  color: var(--error);
  font-size: 0.88rem;
  font-weight: 700;
}

.is-invalid {
  border: 3px solid var(--error);
}

.is-invalid + .field-error {
  display: block;
}

.form-status {
  min-height: 1.5rem;
  margin-bottom: 1rem;
  color: var(--error);
  font-weight: 800;
}

.form-status.is-visible {
  color: var(--success);
}

/* Footer */

.site-footer {
  display: grid;
  gap: 2.5rem;
  padding: var(--section-space) var(--gutter);
  border-top: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.site-footer strong {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.site-footer h2 {
  margin-bottom: 1rem;
  color: var(--surface);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-footer p {
  margin-bottom: 0.5rem;
}

.site-footer a {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0.5rem;
  color: var(--surface);
  overflow-wrap: anywhere;
}

.site-footer a:hover {
  color: #ff9d7d;
}

.footer-company {
  font-size: 0.9rem;
}

/* Cookie notice */

.cookie-banner {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: grid;
  max-width: 68.75rem;
  max-height: calc(100dvh - 2rem);
  gap: 1.25rem;
  margin-inline: auto;
  padding: 1.25rem;
  overflow-y: auto;
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.cookie-banner p {
  margin: 0.25rem 0 0;
}

.cookie-banner.is-dismissed {
  display: none;
}

.cookie-actions {
  display: grid;
  gap: 0.5rem;
}

.cookie-actions button {
  width: 100%;
}

/* Small-screen refinements */

@media (max-width: 399px) {
  body {
    font-size: 0.94rem;
  }

  .brand span {
    max-width: 12rem;
  }

  .card-stats {
    grid-template-columns: 1fr;
  }

  .card-stats div {
    padding: 0.8rem 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .card-stats div:last-child {
    border-bottom: 0;
  }

  .card-stats span {
    margin-bottom: 0.25rem;
  }

  .match-image {
    height: 13rem;
  }
}

/* Tablet */

@media (min-width: 600px) {
  .score-strip,
  .article-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .score-strip div,
  .article-stats div {
    padding: 1.5rem;
    border-right: 1px solid var(--ink);
    border-bottom: 0;
  }

  .score-strip div:last-child,
  .article-stats div:last-child {
    border-right: 0;
  }

  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cookie-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .cookie-actions button {
    width: auto;
  }
}

/* Desktop navigation and layouts */

@media (min-width: 900px) {
  .site-header {
    position: sticky;
    top: 0;
    min-height: 4rem;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1.5rem;
    padding-inline:
      max(var(--gutter), calc((100% - var(--max-width)) / 2));
    backdrop-filter: blur(12px);
  }

  .brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
  }

  .desktop-nav a {
    position: relative;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
  }

  .desktop-nav a::after {
    position: absolute;
    right: 0;
    bottom: -0.35rem;
    left: 0;
    height: 2px;
    background: var(--accent);
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
  }

  .desktop-nav a:hover::after,
  .desktop-nav a[aria-current="page"]::after {
    transform: scaleX(1);
  }

  .header-cta {
    display: inline-flex;
    justify-self: end;
    min-height: 2.35rem;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
  }

  .menu-button,
  .mobile-nav {
    display: none !important;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr);
    align-items: end;
    gap: clamp(3rem, 7vw, 6rem);
  }

  .hero-copy {
    padding-bottom: 0.5rem;
  }

  .section-heading {
    grid-template-columns: minmax(8rem, 1fr) minmax(0, 2fr) minmax(14rem, 1fr);
    align-items: end;
    gap: 2.5rem;
  }

  .match-card {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .card-stats {
    grid-column: 1 / -1;
  }

  .match-image {
    height: 100%;
    min-height: 23rem;
  }

  .briefing {
    grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 1fr);
    gap: clamp(3rem, 7vw, 6rem);
  }

  .article-layout {
    grid-template-columns: 15rem minmax(0, var(--reading-width));
    justify-content: space-between;
    gap: 4rem;
  }

  .article-index {
    position: sticky;
    top: 6rem;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(28rem, 1.2fr);
    gap: clamp(3rem, 7vw, 5rem);
  }

  .site-footer {
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 2.5rem;
    padding-inline:
      max(var(--gutter), calc((100% - var(--max-width)) / 2));
  }

  .cookie-banner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 1.5rem;
  }

  .cookie-actions {
    justify-content: flex-end;
  }
}

/* Wide screens */

@media (min-width: 1280px) {
  .card-body {
    padding: 3.5rem;
  }

  .score-strip div {
    padding: 1.75rem 2rem;
  }
}

/* Accessibility preferences */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #5b5b5b;
  }

  button,
  .button,
  .header-cta,
  input,
  select,
  textarea,
  .match-card,
  .contact-form,
  .cookie-banner {
    border-width: 2px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cookie-banner,
  .skip-link,
  .article-index,
  .button,
  .contact-form {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .hero,
  .section,
  .article-hero,
  .article-layout,
  .legal-page,
  .contact-hero,
  .contact-grid {
    width: 100%;
    max-width: none;
  }

  .article-layout,
  .contact-grid {
    display: block;
  }

  a {
    color: #000;
  }

  .article-content {
    max-width: none;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }

  section,
  .match-card,
  table {
    break-inside: avoid;
  }
}