/* Nitr-Navigator institutional interface
   This file deliberately keeps the presentation quiet so the research and data lead. */

:root {
  --site-green: #08684d;
  --site-green-dark: #16483a;
  --site-red: #b92135;
  --site-ink: #263238;
  --site-muted: #5f6c70;
  --site-line: #d8dfdc;
  --site-soft: #f5f7f5;
  --site-white: #ffffff;
  --site-focus: #9b5500;
  --container-max-width: 1180px;
  --border-radius: 2px;
  --border-radius-lg: 2px;
  --border-radius-xl: 2px;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-xl: none;
}

html {
  scroll-padding-top: 82px;
}

body {
  background: var(--site-white);
  color: var(--site-ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

h1, h2 {
  color: var(--site-ink);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

h3, h4, h5, h6 {
  color: var(--site-ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

a {
  color: var(--site-green);
}

main p a,
main li a,
.editorial-footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--site-green-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--site-focus) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 8px;
  z-index: 10000;
  transform: translateY(-150%);
  padding: 9px 12px;
  background: var(--site-ink);
  color: #fff;
  font-weight: 700;
}

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

.text-gradient {
  background: none;
  color: var(--site-ink);
  -webkit-text-fill-color: currentColor;
}

.section__line,
.hero__particles,
.progress-indicator,
.database-card::before {
  display: none;
}

.btn,
.btn-primary,
.btn-secondary,
.pagination-btn,
.alert-btn {
  min-height: 42px;
  border-radius: 2px;
  box-shadow: none;
  font-weight: 650;
  transform: none !important;
}

.btn--primary,
.btn-primary,
.alert-btn.primary {
  border: 1px solid var(--site-green-dark);
  background: var(--site-green-dark);
  color: #fff;
}

.btn--primary:hover,
.btn-primary:hover,
.alert-btn.primary:hover {
  border-color: var(--site-green);
  background: var(--site-green);
  color: #fff;
}

.btn--outline,
.btn-secondary,
.pagination-btn,
.alert-btn.secondary {
  border: 1px solid #8d9b96;
  background: #fff;
  color: var(--site-ink);
}

.btn--outline:hover,
.btn-secondary:hover,
.pagination-btn:hover:not(:disabled),
.alert-btn.secondary:hover {
  border-color: var(--site-green);
  background: var(--site-soft);
  color: var(--site-green-dark);
}

/* Shared header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--site-line);
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px);
}

.nav {
  min-height: 72px;
  gap: 28px;
  padding: 9px 20px;
}

.nav__logo {
  color: var(--site-ink);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav__logo img {
  width: 36px;
  padding-right: 9px;
  border-color: var(--site-line);
}

.nav__list {
  gap: clamp(11px, 1.35vw, 22px);
}

.nav__link {
  position: relative;
  color: #3d4a4f;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 160ms ease;
}

.nav__link:hover,
.nav__link.active {
  color: var(--site-green);
}

.nav__link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  background: var(--site-green);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link.active::after {
  transform: scaleX(1);
}

.nav__link.btn--primary,
.nav__link.btn--primary:hover {
  padding: 8px 12px;
  color: #fff;
}

.nav__link.btn--primary::after {
  display: none;
}

.nav__toggle {
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 1px solid var(--site-line);
  border-radius: 2px;
  background: #fff;
  align-items: center;
  justify-content: center;
}

.nav__toggle span {
  width: 23px;
  height: 2px;
  background: var(--site-ink);
  transition: opacity 160ms ease, transform 180ms ease;
}

/* Shared page layout */
.page-hero {
  padding: 58px 0 50px;
  border-bottom: 1px solid var(--site-line);
  background: linear-gradient(120deg, #eef8f3 0%, #f7fbf8 58%, #edf7f2 100%);
}

.page-hero__content {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.page-hero__title {
  margin-bottom: 12px;
  color: var(--site-green);
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.1;
}

.page-hero__title .text-gradient {
  color: var(--site-green);
  -webkit-text-fill-color: currentColor;
}

.page-hero__description {
  max-width: 760px;
  margin: 0 auto 10px;
  color: var(--site-muted);
  font-size: 1rem;
}

.page-hero__meta {
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
  color: var(--site-muted);
  font-size: 0.8125rem;
}

.meta-item,
.hero-badge,
.trust-badge,
.research-link-box,
.updating-badge {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--site-muted);
}

.hero-badge::before {
  display: none;
}

.section {
  padding: 48px 0;
}

.section__header,
.section-header {
  margin-bottom: 26px;
  text-align: left;
}

.section__title,
.section-title,
.citation-title {
  color: var(--site-ink);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 400;
}

.intro-content,
.intro-text,
.table-notes,
.citation-container {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.text-large {
  font-size: 1rem;
  font-weight: 500;
}

.database-card,
.stat-card,
.team-card,
.table-container,
.input-section,
.summary-section,
.citation-container,
.modal-content,
.alert-box {
  border: 1px solid var(--site-line);
  border-radius: 2px;
  box-shadow: none;
}

.database-card:hover,
.stat-card:hover,
.team-card:hover {
  transform: none;
  border-color: #aab5b1;
  background: #fff;
}

.workflow-step {
  max-width: none !important;
  padding: 18px 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--site-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
  transform: none !important;
}

.workflow::before {
  display: none !important;
}

.step-icon {
  margin-bottom: 5px !important;
  color: var(--site-muted);
  font-size: 0.75rem !important;
  font-weight: 700;
}

.step-title {
  color: var(--site-ink) !important;
  font-size: 0.95rem !important;
}

/* Tables and forms */
.table-container {
  overflow: hidden;
  background: #fff;
}

.table-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--site-line);
}

.table-title {
  color: var(--site-ink);
  font-size: 1.2rem;
  font-weight: 650;
}

.table-description,
.search-stats,
.empty-state {
  color: var(--site-muted);
}

.table-important-note {
  flex: 0 0 100%;
  margin: 14px 0 0;
  padding: 13px 15px;
  border-left: 3px solid var(--site-green);
  background: #f3f7f5;
  color: #33443f;
  font-size: 0.9rem;
  line-height: 1.6;
}

.table-important-note strong {
  color: var(--site-ink);
}

.search-container {
  padding: 18px 24px;
  border-bottom: 1px solid var(--site-line);
  background: var(--site-soft);
}

.search-label,
.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--site-ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.search-input,
.form-input,
.form-select,
input[type="search"],
input[type="text"],
input[type="number"],
select,
textarea {
  border: 1px solid #9eaaa6;
  border-radius: 2px;
  background: #fff;
  color: var(--site-ink);
}

.data-table thead,
.data-table th {
  background: var(--site-green-dark);
  color: #fff;
}

.data-table th,
.data-table td {
  border-color: #e0e5e2;
}

.data-table tbody tr:nth-child(even) {
  background: #f8f9f8;
}

.data-table tbody tr:hover {
  background: #edf4f1;
}

.table-wrapper,
.tableFixHead {
  overflow-x: auto !important;
}

.data-table {
  min-width: 1180px;
  table-layout: auto !important;
}

.data-table th {
  white-space: nowrap;
}

.table-pagination,
.table-notes {
  border-color: var(--site-line);
}

.slide__pause {
  min-height: 40px;
  margin-left: 8px;
  padding: 7px 11px;
  border: 1px solid #8d9b96;
  border-radius: 2px;
  background: #fff;
  color: var(--site-ink);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Calculator */
.calc-grid {
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid var(--site-line);
  border-radius: 2px;
}

.input-section,
.summary-section {
  border: 0;
  background: #fff;
}

.summary-section {
  border-left: 1px solid var(--site-line);
  background: var(--site-soft);
}

.total-summary {
  border-radius: 2px;
  background: var(--site-green-dark) !important;
  box-shadow: none;
}

.close {
  border: 0;
  background: transparent;
  color: var(--site-ink);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Team page */
.team-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 30px !important;
  padding: 24px 0 !important;
}

.team-card {
  overflow: hidden;
  padding: 0 0 22px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 5px 18px rgba(30, 52, 46, 0.09) !important;
  text-align: center;
  transform: none !important;
  transition: box-shadow 160ms ease !important;
}

.team-card:hover {
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(30, 52, 46, 0.13) !important;
  transform: none !important;
}

.team-card > img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
  margin: 0 0 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover;
  object-position: center;
}

.team-card h3 {
  margin: 0 16px 5px;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.13rem;
  font-weight: 600;
}

.team-card .role {
  min-height: 2.4em;
  margin: 0 16px 12px;
  color: var(--site-muted);
  font-size: 0.875rem;
}

.team-card .social-media-links {
  justify-content: center;
}

.team-card .social-media-links a {
  min-width: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
}

/* Institutional content treatment
   Keep the information architecture, but remove decorative dashboard patterns. */
.section__header,
.section-header {
  max-width: none !important;
  text-align: left !important;
}

.section__line,
.section__title > svg {
  display: none !important;
}

.section__subtitle {
  max-width: 760px !important;
  margin: 8px 0 0 !important;
  color: var(--site-muted) !important;
  font-size: 0.92rem !important;
  line-height: 1.65 !important;
}

.legislation-card,
.report-card,
.stat-card,
.method-card,
.history-card,
.visual-card,
.recipe-card,
.summary-box,
.workflow-step,
.catalogue-detail {
  border: 1px solid var(--site-line) !important;
  border-radius: 2px !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: none !important;
  transition: border-color 150ms ease, background-color 150ms ease !important;
}

.legislation-card:hover,
.report-card:hover,
.stat-card:hover,
.method-card:hover,
.history-card:hover,
.visual-card:hover,
.recipe-card:hover,
.workflow-step:hover {
  border-color: #aab5b1 !important;
  background-color: #fafbfa !important;
  box-shadow: none !important;
  transform: none !important;
}

.legislation-card::before,
.report-card::before,
.stat-card::before,
.method-card::before,
.history-card::before,
.visual-card::before {
  display: none !important;
}

.stat-card {
  padding: 20px !important;
  text-align: left !important;
}

.stat-card__icon,
.research-icon {
  display: none !important;
}

.stat-card__number {
  margin-bottom: 3px !important;
  color: var(--site-ink) !important;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif !important;
  font-size: clamp(1.8rem, 3vw, 2.45rem) !important;
  font-weight: 400 !important;
}

.stat-card__label {
  color: var(--site-ink) !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
}

.stat-card__description {
  margin-top: 6px !important;
  color: var(--site-muted) !important;
  font-size: 0.8125rem !important;
  line-height: 1.5 !important;
}

.pub-badge,
.detail-badge,
.updating-badge,
.research-link-box {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.research-link-box {
  color: var(--site-green-dark) !important;
  font-weight: 650 !important;
  text-decoration: underline !important;
  text-underline-offset: 0.18em !important;
}

.copy-popup {
  border: 1px solid var(--site-line) !important;
  border-radius: 2px !important;
  background: var(--site-ink) !important;
  box-shadow: none !important;
  color: #fff !important;
  font-size: 0.875rem !important;
}

.research-grid {
  gap: 0 28px !important;
}

.research-point {
  padding: 20px 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--site-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.research-point:hover {
  box-shadow: none !important;
  transform: none !important;
}

.research-point h4 {
  margin-bottom: 7px !important;
  font-size: 1rem !important;
}

.research-point p {
  margin-bottom: 10px !important;
  font-size: 0.9375rem !important;
}

.question-list {
  display: block !important;
  border-top: 1px solid var(--site-line);
}

.question-list li {
  padding: 16px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--site-line) !important;
  background: transparent !important;
}

.question-list strong {
  display: inline !important;
  margin: 0 9px 0 0 !important;
  color: var(--site-muted) !important;
  font-size: 0.8125rem !important;
  text-transform: uppercase;
}

.share-section {
  display: none !important;
}

#diagramContainer .section {
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.field-item {
  transition: background-color 150ms ease, border-color 150ms ease !important;
}

.field-item:hover {
  border-left-color: var(--site-green) !important;
  background: var(--site-soft) !important;
  transform: none !important;
}

.highlight {
  padding: 1px 2px !important;
  border-radius: 0 !important;
  background: #fff1aa !important;
  color: var(--site-ink) !important;
}

.modal-content .hero-badge {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--site-line) !important;
  color: var(--site-ink) !important;
  font-weight: 700;
}

.legislation-card,
.report-card,
.method-card,
.history-card,
.visual-card {
  animation: none !important;
}

/* Shared footer */
.contact {
  border-top: 1px solid var(--site-line);
  background: var(--site-soft);
  color: var(--site-ink);
}

.contact .section__title,
.contact p {
  color: var(--site-ink);
}

.footer {
  background: #25332f;
  color: #dfe5e2;
}

.footer h4,
.footer__brand h3 {
  color: #fff;
}

.footer a {
  color: #dfe5e2;
}

.footer__bottom p:last-child {
  font-style: normal !important;
  opacity: 0.8;
}

/* Homepage */
.editorial-home {
  margin: 0;
  background: #fff;
  color: var(--site-ink);
}

.editorial-wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.editorial-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--site-line);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.editorial-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.editorial-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--site-ink);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 600;
}

.editorial-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.editorial-nav-links {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 0.875rem;
  font-weight: 600;
}

.editorial-nav-links a {
  position: relative;
  color: #3d4a4f;
  transition: color 160ms ease;
}

.editorial-nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  background: var(--site-green);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.editorial-nav-links a:hover,
.editorial-nav-links a:focus-visible {
  color: var(--site-green);
}

.editorial-nav-links a:hover::after,
.editorial-nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.editorial-nav-action {
  padding: 7px 10px;
  border: 1px solid #9eaaa6;
}

.editorial-nav-action::after {
  display: none;
}

.editorial-menu-button {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 1px solid var(--site-line);
  border-radius: 2px;
  background: #fff;
}

.editorial-menu-button span {
  display: block;
  width: 23px;
  height: 2px;
  background: var(--site-ink);
  transition: opacity 160ms ease, transform 180ms ease;
}

.editorial-menu-button.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.editorial-menu-button.is-open span:nth-child(2) {
  opacity: 0;
}

.editorial-menu-button.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.editorial-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
  gap: clamp(50px, 8vw, 100px);
  align-items: center;
  padding: 82px 0 76px;
  border-bottom: 1px solid var(--site-line);
}

.editorial-kicker {
  margin: 0 0 12px;
  color: var(--site-green);
  font-size: 0.875rem;
  font-weight: 700;
}

.editorial-hero h1 {
  margin: 0 0 20px;
  color: var(--site-ink);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 5.8vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1;
}

.editorial-hero h1 em {
  color: #4f7860;
  font-weight: 400;
}

.editorial-hero-copy {
  max-width: 650px;
  color: var(--site-muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.editorial-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 28px 0 24px;
}

.editorial-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid var(--site-green-dark);
  border-radius: 2px;
  background: var(--site-green-dark);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.editorial-button:hover {
  background: var(--site-green);
  color: #fff;
}

.editorial-text-link {
  color: var(--site-green-dark);
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.editorial-attribution {
  max-width: 550px;
  color: var(--site-muted);
  font-size: 0.8125rem;
}

.editorial-attribution strong {
  color: var(--site-ink);
  font-weight: 600;
}

.home-summary {
  padding: 22px 0;
  border-top: 3px solid var(--site-green);
  border-bottom: 1px solid var(--site-line);
}

.home-summary h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.home-summary dl {
  margin: 0;
}

.home-summary dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0;
  border-top: 1px solid var(--site-line);
}

.home-summary dt {
  color: var(--site-muted);
  font-size: 0.875rem;
}

.home-summary dd {
  margin: 0;
  color: var(--site-ink);
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.home-summary > p {
  margin: 12px 0 0;
  color: var(--site-muted);
  font-size: 0.8125rem;
}

.editorial-section {
  padding: 68px 0;
}

.editorial-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.editorial-section-heading h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  font-weight: 400;
}

.editorial-section-heading > p {
  max-width: 430px;
  margin: 0;
  color: var(--site-muted);
  font-size: 0.9375rem;
}

.database-list {
  border-top: 1px solid var(--site-ink);
}

.database-row {
  display: grid;
  grid-template-columns: 72px 1fr 1.3fr 24px;
  gap: 22px;
  align-items: center;
  padding: 22px 4px;
  border-bottom: 1px solid var(--site-line);
  color: var(--site-ink);
  text-decoration: none;
}

.database-row:hover {
  background: var(--site-soft);
}

.database-row .compound {
  font-size: 1rem;
  font-weight: 700;
}

.database-row h3 {
  margin: 0;
  font-size: 1rem;
}

.database-row p {
  margin: 0;
  color: var(--site-muted);
  font-size: 0.875rem;
}

.database-row .arrow {
  text-align: right;
}

.workflow-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(35px, 7vw, 80px);
  margin-top: 48px;
  padding-top: 35px;
  border-top: 1px solid var(--site-line);
}

.workflow-panel h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.workflow-panel p {
  max-width: 430px;
  color: var(--site-muted);
  font-size: 0.9375rem;
}

.workflow-links a {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 11px 0;
  border-bottom: 1px solid var(--site-line);
  color: var(--site-green-dark);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.workflow-links a:first-child {
  border-top: 1px solid var(--site-line);
}

.context-section {
  border-top: 1px solid var(--site-line);
  border-bottom: 1px solid var(--site-line);
  background: var(--site-soft);
  color: var(--site-ink);
}

.context-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(40px, 7vw, 86px);
}

.context-feature {
  padding-top: 20px;
  border-top: 2px solid var(--site-green);
}

.context-feature h3 {
  margin: 0 0 13px;
  font-size: 1.35rem;
}

.context-feature p {
  max-width: 540px;
  color: var(--site-muted);
  font-size: 0.9375rem;
}

.pathway-mini {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 24px 0;
  color: var(--site-green-dark);
  font-size: 1.35rem;
  font-weight: 650;
}

.pathway-mini span {
  color: #81908b;
  font-size: 0.8rem;
}

.context-resource {
  display: block;
  padding: 17px 0;
  border-top: 1px solid var(--site-line);
  color: var(--site-ink);
  text-decoration: none;
}

.context-resource:last-child {
  border-bottom: 1px solid var(--site-line);
}

.context-resource small {
  color: var(--site-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.context-resource h3 {
  margin: 5px 0;
  font-size: 0.95rem;
}

.context-resource p {
  margin: 0;
  color: var(--site-muted);
  font-size: 0.875rem;
}

.editorial-closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 46px 0;
}

.editorial-closing h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 400;
}

.editorial-closing p {
  margin: 6px 0 0;
  color: var(--site-muted);
  font-size: 0.9375rem;
}

.editorial-footer {
  padding: 24px 0 30px;
  border-top: 1px solid var(--site-line);
  color: var(--site-muted);
  font-size: 0.8125rem;
}

.editorial-footer-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

@media (max-width: 1100px) {
  .nav__menu {
    position: fixed;
    inset: 72px 0 auto;
    width: 100%;
    padding: 14px 20px 18px;
    border-bottom: 1px solid var(--site-line);
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
  }

  .nav__menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav__link {
    display: block;
    padding: 9px 7px;
  }

  .nav__toggle {
    display: flex;
  }
}

@media (max-width: 1100px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .editorial-wrap {
    width: min(100% - 32px, 1180px);
  }

  .editorial-nav {
    min-height: 68px;
  }

  .editorial-menu-button {
    display: flex;
  }

  .editorial-nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 16px;
    border-bottom: 1px solid var(--site-line);
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
  }

  .editorial-nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
  }

  .editorial-nav-links a {
    padding: 9px 7px;
  }

  .editorial-nav-links a::after {
    bottom: 3px;
    transform-origin: left;
  }

  .editorial-nav-action {
    border: 0;
  }

  .editorial-hero {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 54px 0;
  }

  .home-summary {
    max-width: 520px;
  }

  .editorial-section-heading {
    display: block;
  }

  .editorial-section-heading > p {
    margin-top: 10px;
  }

  .database-row {
    grid-template-columns: 56px 1fr 22px;
  }

  .database-row p {
    grid-column: 2;
  }

  .database-row .arrow {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .workflow-panel,
  .context-grid {
    grid-template-columns: 1fr;
  }

  .calc-grid {
    grid-template-columns: 1fr !important;
  }

  .summary-section {
    border-top: 1px solid var(--site-line);
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .container {
    padding-inline: 16px;
  }

  .page-hero {
    padding: 34px 0 30px;
  }

  .page-hero__title {
    font-size: 2rem;
  }

  .page-hero__meta {
    align-items: center;
    flex-direction: column;
    gap: 5px;
  }

  .editorial-hero h1 {
    font-size: 3rem;
  }

  .editorial-actions,
  .editorial-closing,
  .editorial-footer-row {
    align-items: stretch;
    flex-direction: column;
  }

  .editorial-button {
    justify-content: center;
  }

  .editorial-section {
    padding: 50px 0;
  }

  .database-row {
    gap: 11px;
  }

  .table-header,
  .search-container,
  .table-notes {
    padding-inline: 15px;
  }

  .team-grid {
    grid-template-columns: 1fr 1fr !important;
  }

}

@media (max-width: 390px) {
  .team-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Internal pages: modern research publication system
   The homepage has its own approved editorial direction and is intentionally excluded. */
body:not(.editorial-home) {
  --internal-bg: #f3f6f4;
  --internal-surface: #ffffff;
  --internal-surface-muted: #edf3f0;
  --internal-border: #d9e3de;
  --internal-border-strong: #c7d4ce;
  --internal-ink: #1d2e29;
  --internal-muted: #5b6c66;
  --internal-green: #08684d;
  --internal-green-dark: #134c3d;
  --internal-shadow: 0 12px 32px rgba(24, 56, 47, 0.07);
  --internal-shadow-raised: 0 16px 38px rgba(24, 56, 47, 0.11);
  background: var(--internal-bg);
  color: var(--internal-ink);
}

body:not(.editorial-home) .container {
  width: min(1240px, calc(100% - 48px));
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 0;
}

body:not(.editorial-home) .header {
  border-bottom: 1px solid rgba(199, 212, 206, 0.8);
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 8px 28px rgba(25, 55, 47, 0.055) !important;
  backdrop-filter: blur(16px) saturate(150%);
}

body:not(.editorial-home) .nav {
  min-height: 76px;
  padding-block: 10px;
}

body:not(.editorial-home) .nav__logo {
  color: var(--internal-ink);
  font-size: 1.16rem;
}

body:not(.editorial-home) .nav__logo img {
  width: 38px;
}

body:not(.editorial-home) .nav__link {
  color: #40514b;
  font-size: 0.875rem;
  letter-spacing: 0.005em;
}

body:not(.editorial-home) .nav__link.btn--primary {
  padding: 9px 14px;
  border-radius: 9px;
  background: var(--internal-green-dark);
  box-shadow: 0 5px 14px rgba(19, 76, 61, 0.16);
  color: #fff;
}

body:not(.editorial-home) .nav__link.btn--primary:hover,
body:not(.editorial-home) .nav__link.btn--primary:focus-visible {
  color: #fff;
}

body:not(.editorial-home) .nav__toggle {
  border-color: var(--internal-border-strong);
  border-radius: 10px;
  background: #fff;
}

body:not(.editorial-home) .nav__toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body:not(.editorial-home) .nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

body:not(.editorial-home) .nav__toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

body:not(.editorial-home) .page-hero {
  position: relative;
  overflow: hidden;
  padding: 68px 0 62px;
  border-bottom: 1px solid var(--internal-border);
  background:
    linear-gradient(135deg, rgba(232, 247, 240, 0.98) 0%, rgba(246, 250, 248, 0.98) 54%, rgba(230, 243, 237, 0.96) 100%);
}

body:not(.editorial-home) .page-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 8%, rgba(8, 104, 77, 0.42) 50%, transparent 92%);
}

body:not(.editorial-home) .page-hero__content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

body:not(.editorial-home) .page-hero__title {
  margin-bottom: 14px;
  color: var(--internal-green);
  font-size: clamp(2.55rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.045em;
}

body:not(.editorial-home) .page-hero__description {
  max-width: 780px;
  margin-bottom: 0;
  color: #4f625b;
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  line-height: 1.65;
}

body:not(.editorial-home) .page-hero__meta {
  gap: 10px 22px;
  margin-top: 22px;
  color: #53665f;
  font-size: 0.8125rem;
  font-weight: 600;
}

body:not(.editorial-home) .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body:not(.editorial-home) .section {
  padding: 60px 0;
}

body:not(.editorial-home) main > .section + .section {
  border-top: 1px solid rgba(217, 227, 222, 0.76);
}

body:not(.editorial-home) .section__header,
body:not(.editorial-home) .section-header {
  margin-bottom: 30px;
}

body:not(.editorial-home) .section__title,
body:not(.editorial-home) .section-title,
body:not(.editorial-home) .citation-title {
  color: var(--internal-ink);
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

body:not(.editorial-home) .section__subtitle {
  max-width: 820px !important;
  color: var(--internal-muted) !important;
  font-size: 0.96rem !important;
}

body:not(.editorial-home) .intro-content {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--internal-border);
  border-radius: 16px;
  background: var(--internal-surface);
  box-shadow: var(--internal-shadow);
}

body:not(.editorial-home) .intro-content .section__title {
  margin-bottom: 22px;
}

body:not(.editorial-home) .intro-text {
  color: #42534d;
  font-size: 0.98rem;
}

body:not(.editorial-home) .intro-text p {
  max-width: 1060px;
}

body:not(.editorial-home) .intro-text .text-large,
body:not(.editorial-home) .text-large {
  color: #293a35;
  font-size: 1.05rem;
  font-weight: 550;
  line-height: 1.72;
}

body:not(.editorial-home) .btn,
body:not(.editorial-home) .btn-primary,
body:not(.editorial-home) .btn-secondary,
body:not(.editorial-home) .pagination-btn,
body:not(.editorial-home) .alert-btn {
  min-height: 44px;
  border-radius: 9px;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease !important;
}

body:not(.editorial-home) .btn--primary,
body:not(.editorial-home) .btn-primary,
body:not(.editorial-home) .alert-btn.primary {
  border-color: var(--internal-green-dark);
  background: var(--internal-green-dark);
  box-shadow: 0 6px 16px rgba(19, 76, 61, 0.16);
}

body:not(.editorial-home) .btn--outline,
body:not(.editorial-home) .btn-secondary,
body:not(.editorial-home) .pagination-btn,
body:not(.editorial-home) .alert-btn.secondary {
  border-color: var(--internal-border-strong);
  background: #fff;
}

body:not(.editorial-home) .table-container {
  overflow: hidden;
  border: 1px solid var(--internal-border) !important;
  border-radius: 16px !important;
  background: var(--internal-surface);
  box-shadow: var(--internal-shadow) !important;
}

body:not(.editorial-home) .table-header {
  gap: 12px 24px;
  padding: 28px 30px 24px;
  border-bottom-color: var(--internal-border);
  background: #fff;
}

body:not(.editorial-home) .table-title {
  color: var(--internal-ink);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

body:not(.editorial-home) .table-description {
  color: var(--internal-muted);
  font-size: 0.88rem;
}

body:not(.editorial-home) .table-important-note {
  margin-top: 10px;
  padding: 16px 18px;
  border: 1px solid #cfe0d8;
  border-left: 4px solid var(--internal-green);
  border-radius: 10px;
  background: #f0f6f3;
  color: #3d514a;
}

body:not(.editorial-home) .search-container {
  padding: 22px 30px;
  border-bottom-color: var(--internal-border);
  background: var(--internal-surface-muted);
}

body:not(.editorial-home) .search-label,
body:not(.editorial-home) .form-label {
  margin-bottom: 8px;
  color: #2d3f39;
  font-size: 0.875rem;
  letter-spacing: 0.015em;
}

body:not(.editorial-home) .search-input,
body:not(.editorial-home) .form-input,
body:not(.editorial-home) .form-select,
body:not(.editorial-home) input[type="search"],
body:not(.editorial-home) input[type="text"],
body:not(.editorial-home) input[type="number"],
body:not(.editorial-home) select,
body:not(.editorial-home) textarea {
  min-height: 46px;
  border-color: var(--internal-border-strong);
  border-radius: 9px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

body:not(.editorial-home) .search-input:focus,
body:not(.editorial-home) .form-input:focus,
body:not(.editorial-home) .form-select:focus,
body:not(.editorial-home) input:focus,
body:not(.editorial-home) select:focus,
body:not(.editorial-home) textarea:focus {
  border-color: var(--internal-green);
  box-shadow: 0 0 0 3px rgba(8, 104, 77, 0.11);
}

body:not(.editorial-home) .data-table thead,
body:not(.editorial-home) .data-table th {
  background: var(--internal-green-dark);
}

body:not(.editorial-home) .data-table th {
  padding: 14px 16px;
  border-color: rgba(255, 255, 255, 0.13);
  font-size: 0.8125rem;
  letter-spacing: 0.035em;
}

body:not(.editorial-home) .data-table td {
  padding: 13px 16px;
  border-color: #e5ebe8;
  color: #35463f;
  font-size: 0.875rem;
}

body:not(.editorial-home) .data-table tbody tr:nth-child(even) {
  background: #f7f9f8;
}

body:not(.editorial-home) .data-table tbody tr:hover {
  background: #eaf3ef;
}

body:not(.editorial-home) .table-pagination {
  padding: 18px 24px;
  border-top: 1px solid var(--internal-border);
  background: #fff;
}

body:not(.editorial-home) .table-notes {
  margin: 20px 24px 24px;
  padding: 22px 24px;
  border: 1px solid var(--internal-border);
  border-left: 4px solid var(--internal-green);
  border-radius: 11px;
  background: #f7f9f8;
}

body:not(.editorial-home) .table-notes + .table-notes {
  border-left-color: #75988b;
}

body:not(.editorial-home) .table-notes h4 {
  color: var(--internal-ink);
}

body:not(.editorial-home) .table-pagination,
body:not(.editorial-home) .search-stats,
body:not(.editorial-home) .food-link,
body:not(.editorial-home) .pagination-btn,
body:not(.editorial-home) .copy-btn {
  font-size: 0.875rem;
}

body:not(.editorial-home) .processing-cues small,
body:not(.editorial-home) .processing-cues span,
body:not(.editorial-home) .term-code {
  font-size: 0.75rem;
}

body:not(.editorial-home) .tree-toggle {
  font-size: 0.875rem;
}

body:not(.editorial-home) .citation-text pre {
  font-size: 0.875rem !important;
  line-height: 1.65;
}

body:not(.editorial-home) .footer__bottom,
body:not(.editorial-home) .footer__note {
  font-size: 0.8125rem;
}

body:not(.editorial-home) .database-card,
body:not(.editorial-home) .stat-card,
body:not(.editorial-home) .legislation-card,
body:not(.editorial-home) .report-card,
body:not(.editorial-home) .method-card,
body:not(.editorial-home) .history-card,
body:not(.editorial-home) .visual-card,
body:not(.editorial-home) .recipe-card,
body:not(.editorial-home) .summary-box,
body:not(.editorial-home) .workflow-step,
body:not(.editorial-home) .catalogue-detail {
  border: 1px solid var(--internal-border) !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 7px 22px rgba(24, 56, 47, 0.055) !important;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease !important;
}

body:not(.editorial-home) .database-card:hover,
body:not(.editorial-home) .stat-card:hover,
body:not(.editorial-home) .legislation-card:hover,
body:not(.editorial-home) .report-card:hover,
body:not(.editorial-home) .method-card:hover,
body:not(.editorial-home) .history-card:hover,
body:not(.editorial-home) .visual-card:hover,
body:not(.editorial-home) .recipe-card:hover,
body:not(.editorial-home) .workflow-step:hover {
  border-color: #b9cec5 !important;
  background: #fff !important;
  box-shadow: var(--internal-shadow-raised) !important;
  transform: translateY(-2px) !important;
}

body:not(.editorial-home) .stat-card {
  padding: 24px !important;
}

body:not(.editorial-home) .stat-card__number {
  color: var(--internal-green-dark) !important;
  font-weight: 600 !important;
}

body:not(.editorial-home) .research-grid {
  gap: 18px !important;
}

body:not(.editorial-home) .research-point {
  padding: 24px !important;
  border: 1px solid var(--internal-border) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 6px 18px rgba(24, 56, 47, 0.045) !important;
  transition: border-color 160ms ease, box-shadow 160ms ease !important;
}

body:not(.editorial-home) .research-point:hover {
  border-color: #bdd0c7 !important;
  box-shadow: 0 10px 25px rgba(24, 56, 47, 0.075) !important;
}

body:not(.editorial-home) .question-list {
  overflow: hidden;
  border: 1px solid var(--internal-border);
  border-radius: 12px;
  background: #fff;
}

body:not(.editorial-home) .question-list li {
  padding: 18px 22px !important;
  border-bottom-color: var(--internal-border) !important;
}

body:not(.editorial-home) .calc-grid {
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid var(--internal-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--internal-shadow);
}

body:not(.editorial-home) .input-section,
body:not(.editorial-home) .summary-section {
  background: #fff;
}

body:not(.editorial-home) .summary-section {
  border-left-color: var(--internal-border);
  background: var(--internal-surface-muted);
}

body:not(.editorial-home) .total-summary {
  border-radius: 12px;
  background: var(--internal-green-dark) !important;
  box-shadow: 0 10px 25px rgba(19, 76, 61, 0.18);
}

body:not(.editorial-home) .team-grid {
  gap: 28px !important;
}

body:not(.editorial-home) .team-card {
  border: 1px solid var(--internal-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 28px rgba(24, 56, 47, 0.08) !important;
}

body:not(.editorial-home) .team-card:hover {
  border-color: #bdd0c7 !important;
  box-shadow: 0 16px 34px rgba(24, 56, 47, 0.12) !important;
}

body:not(.editorial-home) .team-card > img {
  margin-bottom: 22px !important;
}

body:not(.editorial-home) .citation-section {
  padding: 58px 0;
  background: #eaf1ed;
}

body:not(.editorial-home) .citation-container {
  border: 1px solid var(--internal-border) !important;
  border-radius: 14px !important;
  background: #fff;
  box-shadow: var(--internal-shadow) !important;
}

body:not(.editorial-home) .contact {
  border-top: 1px solid var(--internal-border);
  background: #e7efeb;
}

body:not(.editorial-home) .footer {
  background: #19372f;
}

body:not(.editorial-home) .scroll-to-top {
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 22px rgba(18, 51, 42, 0.24);
}

@media (max-width: 1100px) {
  body:not(.editorial-home) .nav__menu {
    inset: 76px 16px auto;
    width: auto;
    padding: 12px;
    border: 1px solid var(--internal-border);
    border-radius: 0 0 14px 14px;
    box-shadow: var(--internal-shadow-raised);
  }

  body:not(.editorial-home) .nav__link {
    padding: 11px 12px;
    border-radius: 8px;
  }

  body:not(.editorial-home) .nav__link:hover,
  body:not(.editorial-home) .nav__link.active {
    background: var(--internal-surface-muted);
  }

  body:not(.editorial-home) .nav__link::after {
    display: none;
  }
}

@media (max-width: 680px) {
  body:not(.editorial-home) .container {
    width: min(100% - 30px, 1240px);
  }

  body:not(.editorial-home) .page-hero {
    padding: 44px 0 40px;
  }

  body:not(.editorial-home) .page-hero__title {
    font-size: clamp(2.15rem, 11vw, 2.8rem);
  }

  body:not(.editorial-home) .page-hero__meta {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  body:not(.editorial-home) .section {
    padding: 44px 0;
  }

  body:not(.editorial-home) .intro-content {
    padding: 24px 20px;
    border-radius: 13px;
  }

  body:not(.editorial-home) .table-container {
    border-radius: 13px !important;
  }

  body:not(.editorial-home) .table-header,
  body:not(.editorial-home) .search-container {
    padding-inline: 20px;
  }

  body:not(.editorial-home) .table-notes {
    margin-inline: 14px;
    padding: 18px;
  }

  body:not(.editorial-home) .team-card {
    border-radius: 13px !important;
  }
}

@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;
    scroll-behavior: auto !important;
  }
}

@media print {
  .header,
  .editorial-header,
  .scroll-to-top,
  .progress-indicator {
    display: none !important;
  }
}
