/*
 * lacort-web.css: Alberto Lacort brand for websites and interfaces.
 * Source of truth: brand/BRAND_SPEC.md, sections 2.4, 4.3, 4.7 and 8.8.
 * Copy this file together with the fonts/ folder next to it.
 *
 * Link rules use :where() so that their specificity is zero. Link-styled
 * buttons and host themes then override them without !important. They match
 * only real links (:any-link), not anchors without href.
 */

/* Fonts (spec 4.7) ----------------------------------------------------------- */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/Poppins-Bold.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/InterVariable.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/InterVariable-Italic.woff2") format("woff2");
}

/* Tokens --------------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* Single soft shadow (spec 8.8): the medium shadow of the UPV guide. */
  --lacort-shadow: 0 0.25rem 0.375rem 0 rgba(0, 0, 0, 0.1);

  /* Brand colours (spec 1.1 and 1.3) */
  --lacort-oxford-blue: #002147;
  --lacort-oxford-blue-mid: #1F4E8C;
  --lacort-oxford-blue-light: #9DB9D9;
  --lacort-oxford-night: #001124;
  --lacort-indigo: #3F4AA8;
  --lacort-indigo-mid: #5B67C7;
  --lacort-indigo-light: #A9B0E0;
  --lacort-amber: #F5B000;
  --lacort-amber-15: #FEF3D9;
  --lacort-white: #FFFFFF;
  --lacort-gray-light: #F1F1F1;
  --lacort-gray-mid: #CFCFCF;
  --lacort-text-secondary: #5B6770;
  --lacort-text: #3F4444;

  /* Status (spec 2.1) */
  --lacort-success: #2E8B57;
  --lacort-warning: #F5B000;
  --lacort-danger: #AA151B;
  --lacort-info: #1F4E8C;
  --lacort-neutral: #A9AFB4;

  /* Font stacks (spec 4.3) */
  --ui-font-title: Poppins, Arial, sans-serif;
  --ui-font-text: Inter, Arial, sans-serif;
  --font-code: Consolas, Menlo, Inconsolata, monospace;

  /* Type scale (spec 4.7). Headings grow linearly from a 320 px to a 1280 px window. */
  --ui-size-h1: clamp(2.5rem, 2rem + 2.5vw, 4rem);
  --ui-size-h2: clamp(1.875rem, 1.625rem + 1.25vw, 2.625rem);
  --ui-size-h3: clamp(1.5rem, 1.416667rem + 0.416667vw, 1.75rem);
  --ui-size-lead: 1.25rem;
  --ui-size-text: 1rem;
  --ui-size-menu: 0.875rem;
  --ui-size-small: 0.75rem;
  --ui-leading-text: 1.5;
  --ui-leading-title: 1.2;
}

/* Text ----------------------------------------------------------------------- */

body {
  background-color: var(--lacort-white);
  color: var(--lacort-text);
  font-family: var(--ui-font-text);
  font-size: var(--ui-size-text);
  line-height: var(--ui-leading-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--lacort-oxford-blue);
  font-family: var(--ui-font-title);
  font-weight: 700;
  line-height: var(--ui-leading-title);
}

h1 {
  font-size: var(--ui-size-h1);
}

h2 {
  font-size: var(--ui-size-h2);
}

h3 {
  font-size: var(--ui-size-h3);
}

h4,
h5,
h6 {
  font-size: var(--ui-size-text);
}

.lacort-lead {
  font-size: var(--ui-size-lead);
}

.lacort-menu {
  font-size: var(--ui-size-menu);
}

.lacort-small {
  font-size: var(--ui-size-small);
}

code,
kbd,
samp,
pre {
  font-family: var(--font-code);
}

/* Long lines scroll inside the block, not the page (WCAG 1.4.10). */
pre {
  overflow-x: auto;
  background-color: var(--lacort-gray-light);
  color: var(--lacort-text);
}

/* Links (spec 2.4): always underlined ---------------------------------------- */

:where(a:any-link) {
  color: var(--lacort-oxford-blue);
  text-decoration: underline;
}

:where(a:visited) {
  color: var(--lacort-oxford-blue);
}

/* After :visited, so a hovered visited link changes colour too. */
:where(a:any-link:hover) {
  color: var(--lacort-oxford-blue-mid);
}

/* Focus (spec 2.4) ----------------------------------------------------------- */

:focus-visible {
  outline: 2px dashed var(--lacort-oxford-blue);
  outline-offset: 2px;
}

/* Bands and footer (spec 2.4) ------------------------------------------------ */

.lacort-band {
  background-color: var(--lacort-gray-light);
  color: var(--lacort-text);
}

.lacort-band--indigo {
  background-color: var(--lacort-indigo-light);
  color: var(--lacort-oxford-blue);
}

/* Oxford Blue medio gives 3.95:1 on Indigo light. */
.lacort-band--indigo :where(a:any-link:hover) {
  color: var(--lacort-oxford-blue);
}

.lacort-band--amber {
  background-color: var(--lacort-amber-15);
  color: var(--lacort-text);
}

.lacort-footer,
.lacort-band--dark {
  background-color: var(--lacort-oxford-blue);
  color: var(--lacort-white);
}

.lacort-footer h1,
.lacort-footer h2,
.lacort-footer h3,
.lacort-footer h4,
.lacort-footer h5,
.lacort-footer h6,
.lacort-band--dark h1,
.lacort-band--dark h2,
.lacort-band--dark h3,
.lacort-band--dark h4,
.lacort-band--dark h5,
.lacort-band--dark h6 {
  color: var(--lacort-white);
}

.lacort-footer :where(a:any-link),
.lacort-footer :where(a:visited),
.lacort-band--dark :where(a:any-link),
.lacort-band--dark :where(a:visited) {
  color: var(--lacort-oxford-blue-light);
}

.lacort-footer :where(a:any-link:hover),
.lacort-band--dark :where(a:any-link:hover) {
  color: var(--lacort-white);
}

.lacort-footer :focus-visible,
.lacort-band--dark :focus-visible {
  outline-color: var(--lacort-white);
}

/* Buttons (spec 2.4 and 4.7). Declared after the links so they win ties. ----- */
/* On oxford-blue backgrounds, use only the outline button (spec 2.4). */

.lacort-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding-inline: 1.5rem;
  border: 2px solid var(--lacort-oxford-blue-mid);
  border-radius: 0;
  background-color: var(--lacort-oxford-blue-mid);
  color: var(--lacort-white);
  font-family: var(--ui-font-text);
  font-size: var(--ui-size-menu);
  font-weight: 700;
  line-height: var(--ui-leading-text);
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.lacort-button:hover {
  border-color: var(--lacort-oxford-blue);
  background-color: var(--lacort-oxford-blue);
  color: var(--lacort-white);
}

.lacort-button--outline {
  border-color: var(--lacort-oxford-blue-mid);
  background-color: var(--lacort-white);
  color: var(--lacort-oxford-blue-mid);
}

.lacort-button--outline:hover {
  border-color: var(--lacort-oxford-blue-mid);
  background-color: var(--lacort-oxford-blue-mid);
  color: var(--lacort-white);
}

.lacort-button--resource {
  border-color: var(--lacort-text);
  background-color: var(--lacort-text);
  color: var(--lacort-white);
}

.lacort-button--resource:hover {
  border-color: var(--lacort-oxford-blue);
  background-color: var(--lacort-oxford-blue);
  color: var(--lacort-white);
}

.lacort-button:disabled,
.lacort-button:disabled:hover,
.lacort-button[aria-disabled="true"],
.lacort-button[aria-disabled="true"]:hover {
  border-color: var(--lacort-gray-mid);
  background-color: var(--lacort-white);
  color: var(--lacort-text-secondary);
  cursor: not-allowed;
}

/* Form fields (spec 2.4 and 4.7). Text-like inputs only. --------------------- */

input:where(:not([type="submit"], [type="button"], [type="reset"], [type="image"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"])),
select,
textarea {
  box-sizing: border-box;
  min-height: 2.75rem;
  border: 1px solid var(--lacort-text-secondary);
  border-radius: 0;
  background-color: var(--lacort-white);
  color: var(--lacort-text);
  font-family: var(--ui-font-text);
  font-size: var(--ui-size-text);
  line-height: var(--ui-leading-text);
}

/* Page structure (spec 8.8, 8.11) -------------------------------------------- */

.lacort-skip {
  position: absolute;
  transform: translateY(-200%);
}

.lacort-skip:focus {
  transform: none;
  z-index: 1;
  padding: 0.5rem 1rem;
  background-color: var(--lacort-oxford-blue);
  color: var(--lacort-white);
}

.lacort-page {
  box-sizing: border-box;
  max-width: 70ch;
}

.lacort-site {
  margin: 0;
}

/* Sections, cards and motion (spec 8.8 and 8.11) ----------------------------- */

.lacort-header {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 75rem;
  margin-inline: auto;
  padding: 0.75rem 1rem;
}

.lacort-header__tools {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.lacort-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
}

.lacort-wide {
  box-sizing: border-box;
  max-width: 75rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.lacort-hero {
  border-bottom: 0.5rem solid var(--lacort-amber);
}

.lacort-hero__inner {
  box-sizing: border-box;
  display: grid;
  gap: 2rem;
  align-items: center;
  max-width: 75rem;
  margin-inline: auto;
  padding: 2.5rem 1rem;
}

@media (min-width: 48rem) {
  .lacort-hero__inner {
    grid-template-columns: 3fr 2fr;
  }
}

.lacort-hero__kicker {
  margin: 0;
  color: var(--lacort-amber);
  font-family: var(--ui-font-title);
  font-size: var(--ui-size-menu);
  font-weight: 700;
  text-transform: uppercase;
}

.lacort-hero__photo {
  display: block;
  width: 100%;
  height: auto;
  border: 0.25rem solid var(--lacort-white);
}

.lacort-section {
  padding-block: 2.5rem;
}

.lacort-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.lacort-card {
  box-sizing: border-box;
  padding: 1rem;
  border: 2px solid var(--lacort-oxford-blue);
  background-color: var(--lacort-white);
  color: var(--lacort-text);
  box-shadow: var(--lacort-shadow);
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.lacort-card:hover,
.lacort-card:focus-within {
  border-color: var(--lacort-indigo);
  transform: translateY(-0.25rem);
}

.lacort-card h3,
.lacort-card h4 {
  font-size: var(--ui-size-lead);
}

.lacort-stat__value {
  margin: 0;
  font-family: var(--ui-font-title);
  font-size: var(--ui-size-h2);
  font-weight: 700;
  line-height: var(--ui-leading-title);
}

.lacort-card > :first-child {
  margin-top: 0;
}

.lacort-card > :last-child {
  margin-bottom: 0;
}

.lacort-timeline {
  margin: 0;
  padding: 0 0 0 1.5rem;
  border-left: 4px solid var(--lacort-oxford-blue);
  list-style: none;
}

.lacort-timeline > li {
  position: relative;
  padding-bottom: 2rem;
}

.lacort-timeline > li::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: -2.125rem;
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid var(--lacort-oxford-blue);
  background-color: var(--lacort-amber);
}

.lacort-timeline > li > :first-child {
  margin-top: 0;
}

.lacort-breadcrumb {
  font-size: var(--ui-size-menu);
}

.lacort-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0.75rem 0;
  list-style: none;
}

.lacort-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
}

.lacort-titleband {
  border-bottom: 0.25rem solid var(--lacort-amber);
}

.lacort-titleband > .lacort-wide {
  padding-block: 2rem;
}

.lacort-titleband h1 {
  margin: 0;
  font-size: var(--ui-size-h2);
}

.lacort-hero h1 {
  font-size: var(--ui-size-h2);
}

.lacort-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  padding-block: 2rem;
}

.lacort-footer__title {
  margin: 0 0 1rem;
  font-size: var(--ui-size-lead);
}

.lacort-footer__col {
  padding-left: 1rem;
  border-left: 2px solid var(--lacort-oxford-blue-mid);
}

.lacort-footer__col p {
  line-height: 1.9;
}

.lacort-footer__legal {
  background-color: var(--lacort-gray-light);
  color: var(--lacort-text);
}

.lacort-footer__legal > .lacort-wide {
  padding-block: 1rem;
}

.lacort-footer__legal p {
  margin: 0;
}

.lacort-notice {
  background-color: var(--lacort-amber-15);
  color: var(--lacort-text);
}

.lacort-notice > .lacort-wide {
  padding-block: 0.75rem;
}

.lacort-notice p {
  margin: 0;
}

.lacort-footer__col > :first-child {
  margin-top: 0;
}

.lacort-footer__col > :last-child {
  margin-bottom: 0;
}

.lacort-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
}

.lacort-theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.lacort-theme-toggle__sun {
  display: none;
}

.lacort-nav__control {
  position: relative;
  display: none;
}

/* The checkbox covers the button, so the common focus outline surrounds the button. */
.lacort-nav__toggle {
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.lacort-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 47.99rem) {
  .lacort-nav__control {
    display: inline-block;
  }

  .lacort-nav {
    display: none;
    flex-basis: 100%;
    order: 3;
  }

  .lacort-header:has(.lacort-nav__toggle:checked) .lacort-nav {
    display: block;
  }

  .lacort-nav__list {
    display: block;
  }

  .lacort-nav__list a {
    display: block;
    padding-block: 0.625rem;
  }
}

.lacort-pubs {
  display: grid;
  gap: 2rem;
  padding-block: 2rem;
}

@media (min-width: 64rem) {
  .lacort-pubs {
    grid-template-columns: 1fr 16rem;
    align-items: start;
  }

  .lacort-aside {
    position: sticky;
    top: 1rem;
    grid-column: 2;
    grid-row: 1;
  }
}

.lacort-aside h2 {
  margin-top: 0;
  font-size: var(--ui-size-lead);
}

.lacort-aside > ul + div {
  margin-top: 2rem;
}

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

.lacort-aside [aria-current="true"] {
  font-weight: 700;
  text-decoration-thickness: 0.2em;
}

.lacort-pub {
  margin-block: 1rem;
  padding: 0.75rem 0 0 1rem;
  border-left: 4px solid var(--lacort-amber);
}

.lacort-pub .csl-entry {
  margin: 0;
}

.lacort-pub__summary {
  margin: 0.5rem 0;
  color: var(--lacort-text-secondary);
  font-style: italic;
  text-align: right;
}

.lacort-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0.5rem 0;
  padding: 0;
  list-style: none;
}

.lacort-tags li {
  color: var(--lacort-text-secondary);
  font-size: var(--ui-size-small);
  text-transform: uppercase;
}

.lacort-pub__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0.75rem 0 0;
  background-color: var(--lacort-gray-light);
  color: var(--lacort-text);
}

.lacort-pub__primary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.5rem 0 1rem;
  background-color: var(--lacort-oxford-blue-mid);
  color: var(--lacort-white);
}

.lacort-pub__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 0;
  background: transparent;
  color: var(--lacort-oxford-blue);
  font-family: var(--ui-font-text);
  font-size: var(--ui-size-text);
  text-decoration: underline;
  cursor: pointer;
}

.lacort-pub__link:hover {
  color: var(--lacort-oxford-blue-mid);
}

.lacort-icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lacort-pub__abstract[open] {
  flex-basis: 100%;
}

@keyframes lacort-rise {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .lacort-reveal {
      animation: lacort-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .lacort-card {
    transition: none;
  }

  .lacort-card:hover,
  .lacort-card:focus-within {
    transform: none;
  }
}

@media print {
  .lacort-reveal {
    animation: none;
  }
}

[hidden] {
  display: none;
}

.lacort-logo--dark {
  display: none;
}

/* Dark theme (spec 2.5). Last, so it wins the cascade. ------------------------ */

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --lacort-shadow: none;
}

:root[data-theme="dark"] .lacort-theme-toggle__sun {
  display: inline;
}

:root[data-theme="dark"] .lacort-theme-toggle__moon {
  display: none;
}

:root[data-theme="dark"] .lacort-logo--light {
  display: none;
}

:root[data-theme="dark"] .lacort-logo--dark {
  display: inline;
}

:root[data-theme="dark"] body {
  background-color: var(--lacort-oxford-night);
  color: var(--lacort-white);
}

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] h5,
:root[data-theme="dark"] h6 {
  color: var(--lacort-white);
}

:root[data-theme="dark"] :where(a:any-link),
:root[data-theme="dark"] :where(a:visited) {
  color: var(--lacort-oxford-blue-light);
}

:root[data-theme="dark"] :where(a:any-link:hover) {
  color: var(--lacort-white);
}

:root[data-theme="dark"] :focus-visible {
  outline-color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-skip:focus {
  background-color: var(--lacort-white);
  color: var(--lacort-oxford-blue);
}

:root[data-theme="dark"] .lacort-band {
  background-color: var(--lacort-oxford-blue-mid);
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-band--indigo {
  background-color: var(--lacort-indigo);
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-band--amber {
  background-color: var(--lacort-amber);
  color: var(--lacort-oxford-blue);
}

:root[data-theme="dark"] .lacort-band :where(a:any-link),
:root[data-theme="dark"] .lacort-band :where(a:visited),
:root[data-theme="dark"] .lacort-band :where(a:any-link:hover),
:root[data-theme="dark"] .lacort-band--indigo :where(a:any-link),
:root[data-theme="dark"] .lacort-band--indigo :where(a:visited),
:root[data-theme="dark"] .lacort-band--indigo :where(a:any-link:hover) {
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-band--amber :where(a:any-link),
:root[data-theme="dark"] .lacort-band--amber :where(a:visited),
:root[data-theme="dark"] .lacort-band--amber :where(a:any-link:hover) {
  color: var(--lacort-oxford-blue);
}

:root[data-theme="dark"] .lacort-band :where(a:any-link:hover),
:root[data-theme="dark"] .lacort-band--indigo :where(a:any-link:hover),
:root[data-theme="dark"] .lacort-band--amber :where(a:any-link:hover) {
  text-decoration-thickness: 0.2em;
}

:root[data-theme="dark"] .lacort-card {
  border-color: var(--lacort-oxford-blue-light);
  background-color: var(--lacort-oxford-blue);
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-card:hover,
:root[data-theme="dark"] .lacort-card:focus-within {
  border-color: var(--lacort-amber);
}

:root[data-theme="dark"] .lacort-tags li {
  border-color: var(--lacort-oxford-blue-light);
  color: var(--lacort-oxford-blue-light);
}

:root[data-theme="dark"] .lacort-pub__actions {
  background-color: var(--lacort-oxford-blue);
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-pub__primary {
  background-color: var(--lacort-amber);
  color: var(--lacort-oxford-blue);
}

:root[data-theme="dark"] .lacort-pub__link {
  color: var(--lacort-oxford-blue-light);
}

:root[data-theme="dark"] .lacort-pub__link:hover {
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-pub__summary {
  color: var(--lacort-oxford-blue-light);
}

:root[data-theme="dark"] .lacort-timeline {
  border-left-color: var(--lacort-oxford-blue-light);
}

:root[data-theme="dark"] .lacort-timeline > li::before {
  border-color: var(--lacort-oxford-blue-light);
}

:root[data-theme="dark"] pre {
  background-color: var(--lacort-oxford-blue-mid);
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-button {
  border-color: var(--lacort-amber);
  background-color: var(--lacort-amber);
  color: var(--lacort-oxford-blue);
}

:root[data-theme="dark"] .lacort-button--outline {
  border-color: var(--lacort-white);
  background-color: transparent;
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-button--resource {
  border-color: var(--lacort-oxford-blue-light);
  background-color: transparent;
  color: var(--lacort-oxford-blue-light);
}

:root[data-theme="dark"] .lacort-button:hover,
:root[data-theme="dark"] .lacort-button--outline:hover,
:root[data-theme="dark"] .lacort-button--resource:hover {
  border-color: var(--lacort-white);
  background-color: var(--lacort-white);
  color: var(--lacort-oxford-blue);
}

:root[data-theme="dark"] .lacort-button:disabled,
:root[data-theme="dark"] .lacort-button:disabled:hover,
:root[data-theme="dark"] .lacort-button[aria-disabled="true"],
:root[data-theme="dark"] .lacort-button[aria-disabled="true"]:hover {
  border-color: var(--lacort-oxford-blue-mid);
  background-color: transparent;
  color: var(--lacort-oxford-blue-mid);
}

:root[data-theme="dark"] input:where(:not([type="submit"], [type="button"], [type="reset"], [type="image"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"])),
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  border-color: var(--lacort-oxford-blue-light);
  background-color: transparent;
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-footer__legal {
  background-color: var(--lacort-oxford-blue-mid);
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-footer__legal :where(a:any-link),
:root[data-theme="dark"] .lacort-footer__legal :where(a:visited),
:root[data-theme="dark"] .lacort-footer__legal :where(a:any-link:hover) {
  color: var(--lacort-white);
}

:root[data-theme="dark"] .lacort-notice {
  background-color: var(--lacort-amber);
  color: var(--lacort-oxford-blue);
}

:root[data-theme="dark"] .lacort-footer {
  border-top: 0.25rem solid var(--lacort-oxford-blue-mid);
}

/* High contrast mode replaces author colours: keep the inactive state visible. */
@media (forced-colors: active) {
  .lacort-button:disabled,
  .lacort-button:disabled:hover,
  .lacort-button[aria-disabled="true"],
  .lacort-button[aria-disabled="true"]:hover,
  :root[data-theme="dark"] .lacort-button:disabled,
  :root[data-theme="dark"] .lacort-button:disabled:hover,
  :root[data-theme="dark"] .lacort-button[aria-disabled="true"],
  :root[data-theme="dark"] .lacort-button[aria-disabled="true"]:hover {
    border-color: GrayText;
    color: GrayText;
  }
}
