@font-face {
  font-family: "DIN Pro";
  src: url("../fonts/DINPro.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "DIN Pro";
  src: url("../fonts/DINPro-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "DIN Pro";
  src: url("../fonts/DINPro-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --smns-green: #93bf1f;
  --smns-green-dark: #4f6b00;
  --smns-green-soft: #f1f7df;
  --smns-green-text: #405800;

  --smns-charcoal: #464645;
  --smns-charcoal-dark: #30302f;
  --smns-charcoal-soft: #60605e;

  --color-text: #242423;
  --color-muted: #686865;
  --color-border: #deded9;
  --color-surface: #ffffff;
  --color-background: #f5f6f2;

  --shadow-small:
    0 1px 2px rgb(25 30 20 / 5%),
    0 4px 14px rgb(25 30 20 / 7%);

  --shadow-medium:
    0 10px 30px rgb(25 30 20 / 10%);

  --radius-small: 0.45rem;
  --radius-medium: 0.8rem;
  --radius-large: 1.2rem;

  --page-width: 1240px;
  --transition: 160ms ease;
}

/* Base reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--color-text);
  background: var(--color-background);
  font-family:
    "DIN Pro",
    "DIN 2014",
    "Arial Narrow",
    Arial,
    sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--smns-green-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--smns-charcoal);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}

.hero a:focus-visible,
.site-footer a:focus-visible,
.accessibility-bar a:focus-visible,
.accessibility-bar button:focus-visible,
.institution-card a:focus-visible {
  outline-color: #ffdf00;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--smns-charcoal-dark);
  font-weight: 700;
  line-height: 1.18;
}

h1 {
  max-width: 950px;
  margin-bottom: 1.25rem;
  font-size: clamp(2.1rem, 5vw, 4rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 1.15rem;
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.2rem;
}

.page-shell {
  width: min(calc(100% - 3rem), var(--page-width));
  margin-inline: auto;
}

/* Accessibility */

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--smns-charcoal-dark);
  border-radius: var(--radius-small);
  transform: translateY(-200%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* Header */

.site-header {
  position: relative;
  z-index: 10;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  width: auto;
  height: 70px;
  object-fit: contain;
}

.header-label {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  color: var(--smns-charcoal);
  text-align: right;
}

.header-kicker {
  color: var(--smns-green-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.header-institution {
  font-size: 0.9rem;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(
      circle at 88% 25%,
      rgb(147 191 31 / 16%) 0,
      rgb(147 191 31 / 7%) 18%,
      transparent 42%
    ),
    linear-gradient(
      120deg,
      var(--smns-charcoal-dark) 0%,
      var(--smns-charcoal) 72%,
      #555553 100%
    );
  border-bottom: 6px solid var(--smns-green);
}

.hero::after {
  position: absolute;
  top: 18%;
  right: max(2rem, calc((100vw - var(--page-width)) / 2));
  width: 2px;
  height: 64%;
  content: "";
  background: linear-gradient(
    to bottom,
    transparent,
    rgb(147 191 31 / 75%),
    transparent
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.hero h1 {
  color: #fff;
}

.eyebrow,
.section-kicker {
  margin-bottom: 0.65rem;
  color: var(--smns-green);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
}

.section-kicker {
  color: var(--smns-green-dark);
}

.doi-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.9rem;
  overflow-wrap: anywhere;
  color: #fff;
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 999px;
  text-decoration: none;
  backdrop-filter: blur(5px);
}

.doi-badge:hover {
  color: #fff;
  background: rgb(255 255 255 / 18%);
}

.doi-label {
  padding: 0.1rem 0.45rem;
  color: var(--smns-charcoal-dark);
  background: var(--smns-green);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Main layout */

.page-content {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.8fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.content-version-label {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.3rem 0.65rem;
  color: var(--smns-charcoal-dark);
  background: var(--smns-green-soft);
  border-left: 4px solid var(--smns-green);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
}

main a:not(.button):not(.doi-badge):not(.gallery-link) {
  text-decoration: underline;
}

.main-column {
  min-width: 0;
}

.content-section {
  margin-bottom: 3.5rem;
}

.rich-text {
  font-size: 1.06rem;
}

.rich-text p {
  margin-bottom: 1.2rem;
}

.rich-text > :last-child {
  margin-bottom: 0;
}

.service-section {
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

/* Compact gallery */

.compact-gallery {
  margin-bottom: 2.75rem;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-small);
}

.compact-gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.compact-gallery-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}

.compact-gallery-heading .section-kicker {
  margin-bottom: 0.3rem;
}

.compact-gallery-heading > div {
  min-width: 0;
}

.compact-gallery-hint {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

/*
 * A normal wrapping grid:
 * - no horizontal scrollbar
 * - images remain compact
 * - additional images wrap onto another row
 */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery-figure {
  margin: 0;
}

.gallery-item {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.gallery-item:hover {
  border-color: var(--smns-green);
  box-shadow: 0 5px 16px rgb(25 30 20 / 8%);
  transform: translateY(-2px);
}

.gallery-link {
  display: block;
  overflow: hidden;
  background: #e9ebe5;
}

.gallery-img {
  width: 100%;
  height: 105px;
  object-fit: cover;
  transition: transform 220ms ease;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.025);
}

.gallery-caption {
  display: flex;
  min-height: 52px;
  justify-content: center;
  flex-direction: column;
  padding: 0.55rem 0.65rem;
  line-height: 1.25;
}

.gallery-title {
  display: block;
  overflow: hidden;
  color: var(--smns-charcoal-dark);
  font-size: 0.78rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-author {
  display: block;
  margin-top: 0.15rem;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar and metadata cards */

.sidebar {
  position: sticky;
  top: 1.5rem;
  display: grid;
  gap: 1.25rem;
}

.info-card {
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-small);
}

.info-card h2 {
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
}

.info-card h2::after {
  display: block;
  width: 42px;
  height: 4px;
  margin-top: 0.65rem;
  content: "";
  background: var(--smns-green);
  border-radius: 999px;
}

.metadata-list {
  margin: 0;
}

.metadata-row {
  margin: 0;
  padding-block: 0.9rem;
  border-top: 1px solid var(--color-border);
}

.metadata-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.metadata-row:last-child {
  padding-bottom: 0;
}

.metadata-row dt {
  margin-bottom: 0.3rem;
  color: var(--color-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metadata-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-small);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition:
    color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.button-primary {
  color: var(--smns-charcoal-dark);
  background: var(--smns-green);
}

.button-primary:hover {
  color: #fff;
  background: var(--smns-green-dark);
  transform: translateY(-1px);
}

.resource-list {
  display: grid;
}

.resource-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  color: var(--smns-charcoal);
  border-top: 1px solid var(--color-border);
  font-weight: 500;
  text-decoration: none;
}

.resource-list a:first-child {
  border-top: 0;
}

.resource-list a:hover {
  color: var(--smns-green-dark);
}

.institution-card {
  color: #fff;
  background: var(--smns-charcoal);
  border: 0;
}

.institution-card h2,
.institution-card a {
  color: #fff;
}

.institution-card h2::after {
  background: var(--smns-green);
}

/* Information notice */

.notice {
  display: flex;
  gap: 1rem;
  padding: 1.2rem 1.3rem;
  background: var(--smns-green-soft);
  border-left: 5px solid var(--smns-green);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

.notice p {
  margin: 0;
}

.notice-title {
  margin: 0 0 0.25rem;
  color: var(--smns-charcoal-dark);
  font-size: 1rem;
  font-weight: 700;
}

/* Footer */

.site-footer {
  padding-block: 2.5rem;
  color: #ddd;
  background: var(--smns-charcoal-dark);
  border-top: 6px solid var(--smns-green);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-brand {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-copy {
  margin: 0.4rem 0 0;
  color: #bdbdb8;
  font-size: 0.86rem;
}

.footer-links {
  display: grid;
  gap: 0.35rem;
  text-align: right;
}

.footer-links a {
  color: #e5e5e1;
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--smns-green);
}

/* Accessible text colors */

body {
  color: #242423;
}

/*
 * :where() deliberately contributes no selector specificity.
 * This lets component rules, such as the dark institution card,
 * override the general link color.
 */
main :where(a:not(.button):not(.doi-badge):not(.gallery-link)),
.metadata-row a,
.rich-text a,
.notice a {
  color: #405800;
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.16em;
}

main :where(a:not(.button):not(.doi-badge):not(.gallery-link)):hover,
.metadata-row a:hover,
.rich-text a:hover,
.notice a:hover {
  color: #273700;
}

/* Supplementary labels on light backgrounds */
.section-kicker,
.header-kicker {
  color: #405800;
}

/* Secondary text */
.compact-gallery-hint,
.metadata-row dt,
.gallery-author {
  color: #4f4f4d;
}

/* Explicit colors on dark surfaces */
.hero .eyebrow {
  color: #b8df4d;
}

.hero .doi-badge,
.hero .doi-badge > span:not(.doi-label) {
  color: #fff;
}

.hero .doi-badge {
  background: #3a3a39;
  border: 2px solid #fff;
}

.hero .doi-label {
  color: #202020;
  background: #b8df4d;
}

.institution-card,
.site-footer,
.accessibility-bar {
  color: #fff;
}

.institution-card a,
.site-footer a,
.footer-brand,
.footer-links a,
.accessibility-bar a,
.accessibility-bar button {
  color: #fff;
}

/* Green buttons always use dark text */
.button-primary {
  color: #202020;
  background: #93bf1f;
}

.button-primary:hover {
  color: #fff;
  background: #526f00;
}

/* Tablet */

@media (max-width: 1000px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar .info-card:first-child {
    grid-column: 1 / -1;
  }

  .gallery {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }
}

/* Small tablet */

@media (max-width: 760px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-img {
    height: 120px;
  }
}

/* Mobile */

@media (max-width: 680px) {
  .page-shell {
    width: min(calc(100% - 2rem), var(--page-width));
  }

  .header-inner {
    min-height: 86px;
  }

  .brand-logo {
    height: 55px;
  }

  .header-label {
    display: none;
  }

  .hero::after {
    display: none;
  }

  .hero-content {
    padding-block: 3.5rem;
  }

  .compact-gallery {
    padding: 1rem;
  }

  .compact-gallery-heading {
    display: block;
  }

  .compact-gallery-hint {
    margin-top: 0.4rem;
    text-align: left;
    white-space: normal;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar .info-card:first-child {
    grid-column: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    text-align: left;
  }
}

/* Narrow mobile */

@media (max-width: 420px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .gallery-img {
    height: 95px;
  }

  .gallery-caption {
    padding: 0.45rem 0.5rem;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Accessibility controls */

.accessibility-bar {
  position: sticky;
  z-index: 100;
  top: 0;

  color: #fff;
  background: var(--smns-charcoal-dark);
  border-bottom: 1px solid rgb(255 255 255 / 16%);
  box-shadow: 0 3px 12px rgb(0 0 0 / 14%);
}

.accessibility-bar-inner {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-block: 0.45rem;
}

.accessibility-label {
  margin-right: auto;
  font-size: 0.8rem;
  font-weight: 700;
}

.accessibility-button,
.accessibility-link {
  min-height: 34px;
  padding: 0.4rem 0.7rem;
  color: #fff;
  background: transparent;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: var(--radius-small);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.accessibility-button:hover,
.accessibility-button[aria-pressed="true"],
.accessibility-link:hover {
  color: var(--smns-charcoal-dark);
  background: var(--smns-green);
  border-color: var(--smns-green);
}

.language-version[hidden] {
  display: none !important;
}

.content-version-label {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.65rem;
  color: var(--smns-charcoal-dark);
  background: var(--smns-green-soft);
  border-left: 4px solid var(--smns-green);
  font-size: 0.85rem;
  font-weight: 700;
}

html.high-contrast {
  --smns-green: #ffdf00;
  --smns-green-dark: #005fcc;
  --smns-green-soft: #fff5a8;

  --smns-charcoal: #000;
  --smns-charcoal-dark: #000;
  --smns-charcoal-soft: #222;

  --color-text: #000;
  --color-muted: #222;
  --color-border: #000;
  --color-surface: #fff;
  --color-background: #fff;

  --shadow-small: none;
  --shadow-medium: none;
}

html.high-contrast body {
  color: #000;
  background: #fff;
}

html.high-contrast a {
  color: #004f9e;
  text-decoration: underline;
  text-decoration-thickness: 0.15em;
}

html.high-contrast .hero,
html.high-contrast .site-footer,
html.high-contrast .institution-card,
html.high-contrast .accessibility-bar {
  color: #fff;
  background: #000;
}

html.high-contrast .hero {
  border-bottom-color: #ffdf00;
}

html.high-contrast .hero::after {
  display: none;
}

html.high-contrast .hero h1,
html.high-contrast .institution-card h2 {
  color: #fff;
}

html.high-contrast .notice-title {
  color: #000;
}

html.high-contrast .info-card,
html.high-contrast .compact-gallery,
html.high-contrast .gallery-item {
  border: 2px solid #000;
  box-shadow: none;
}

html.high-contrast :focus-visible {
  outline: 4px solid #ffdf00 !important;
  outline-offset: 3px;
}

html.high-contrast .button-primary {
  color: #000;
  background: #ffdf00;
  border: 2px solid #000;
}

/* Links on dark surfaces in high-contrast mode */

html.high-contrast .hero a,
html.high-contrast .institution-card a,
html.high-contrast .site-footer a,
html.high-contrast .footer-brand,
html.high-contrast .footer-links a {
  color: #fff;
  text-decoration: underline;
}

html.high-contrast .doi-badge,
html.high-contrast .doi-badge span {
  color: #fff;
}

html.high-contrast .doi-badge {
  background: #000;
  border: 2px solid #fff;
}

html.high-contrast .doi-label,
html.high-contrast .doi-badge .doi-label {
  color: #000;
  background: #ffdf00;
}

/* Accessibility-bar link in its normal state */

html.high-contrast .accessibility-link:not(:hover):not(:focus-visible) {
  color: #fff;
  border-color: #fff;
}

/* Hover/focus state must also have sufficient contrast */

html.high-contrast .accessibility-link:hover,
html.high-contrast .accessibility-link:focus-visible,
html.high-contrast .accessibility-button:hover,
html.high-contrast .accessibility-button:focus-visible,
html.high-contrast .accessibility-button[aria-pressed="true"] {
  color: #000;
  background: #ffdf00;
  border-color: #ffdf00;
}

@media (forced-colors: active) {
  * {
    forced-color-adjust: auto;
  }
}

@media (forced-colors: active) {
  a,
  button,
  .button,
  .doi-badge,
  .gallery-item,
  .info-card,
  .compact-gallery {
    forced-color-adjust: auto;
  }

  a {
    text-decoration: underline;
  }

  button,
  .button,
  .doi-badge,
  .gallery-item,
  .info-card,
  .compact-gallery {
    border: 1px solid CanvasText;
  }

  :focus-visible {
    outline: 3px solid Highlight !important;
    outline-offset: 3px;
  }
}

@media (prefers-contrast: more) {
  :root {
    --color-border: #777;
  }

  a {
    text-decoration: underline;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#main-content,
.content-section,
.compact-gallery {
  scroll-margin-top: 4.5rem;
}

@media (max-width: 680px) {
  .accessibility-bar-inner {
    justify-content: flex-start;
    gap: 0.45rem;
  }

  .accessibility-label {
    width: 100%;
    margin-right: 0;
  }

  .accessibility-button,
  .accessibility-link {
    flex: 1 1 auto;
    text-align: center;
  }
}

.glossary {
  margin-block: 2rem;
}

.glossary-list {
  margin: 0;
}

.glossary-list dt {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  color: var(--smns-charcoal-dark);
  border-top: 1px solid var(--color-border);
  font-weight: 700;
}

.glossary-list dt:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.glossary-list dd {
  margin: 0.2rem 1.8rem 0;
}

/* Links on the dark institution card */

.sidebar .institution-card a,
.sidebar .institution-card a:visited {
  color: #fff;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

.sidebar .institution-card a:hover {
  color: #c9ed66;
}

.sidebar .institution-card a:focus-visible {
  color: #fff;
  outline: 3px solid #ffdf00;
  outline-offset: 4px;
}