/* Copyright (C) Rein Ytterberg */

.terms-page {
  --term-ink: #172033;
  --term-muted: #526073;
  --term-line: #dbe2eb;
  --term-link: #164fb7;
  margin: 0;
  background: #f5f7fa;
  color: var(--term-ink);
  font:
    16px/1.6 system-ui,
    sans-serif;
}

.terms-document {
  scroll-padding-top: var(--terms-header-height, 150px);
  scroll-behavior: auto;
}

.terms-page h1 {
  margin: 14px 0 6px;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.terms-page .glossary {
  width: calc(100% - 32px);
  margin: 20px auto 48px;
}
.terms-page .glossary a {
  color: var(--term-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.terms-page :is(button, input, summary, a):focus-visible {
  outline: 3px solid #ef870b;
  outline-offset: 3px;
}
.terms-page button {
  cursor: pointer;
  font: inherit;
}

.term-browser {
  padding: 20px;
  border: 1px solid var(--term-line);
  background: white;
  border-radius: 10px;
}
.term-search {
  display: block;
}
.term-search span,
.filter-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 650;
}
.term-search input {
  box-sizing: border-box;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #8391a4;
  border-radius: 5px;
  font: inherit;
}
.filter-block {
  margin-top: 14px;
}
.filter-label small {
  font-weight: 400;
}
.filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 3px 3px 8px;
}
.filter-row button,
.filter-summary button {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #8b98a9;
  border-radius: 5px;
  background: white;
  color: var(--term-ink);
}
.filter-row button[aria-pressed="true"] {
  background: #173e73;
  border-color: #173e73;
  color: white;
}
.filter-row button[aria-pressed="true"]::before {
  content: "✓ ";
}
.screenshot-filter label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.screenshot-filter input {
  width: 18px;
  height: 18px;
}
.filter-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid var(--term-line);
  margin-top: 14px;
  padding-top: 14px;
}
#result-count {
  margin-right: auto;
}
.category-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 16px 0;
  font-size: 0.9rem;
}
.term-index {
  margin: 16px 0 24px;
  border-block: 1px solid var(--term-line);
}
.term-index summary {
  padding: 12px 0;
  cursor: pointer;
  color: var(--term-link);
  font-weight: 650;
}
.term-section {
  margin-top: 30px;
}
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.terms-page .section-heading h2 {
  font-size: 1.4rem;
  margin: 0;
  letter-spacing: normal;
}
.section-count {
  color: var(--term-muted);
}

.terms-page .card {
  margin-bottom: 14px;
  padding: 22px 26px;
  background: white;
  border: 1px solid var(--term-line);
  border-radius: 8px;
  scroll-margin-top: 16px;
}
.terms-page .card-header {
  background: none;
  padding: 0;
  color: var(--term-ink);
}
.terms-page .term {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: normal;
  line-height: 1.3;
}
.terms-page .meaning {
  font-size: 1.02rem;
  margin: 4px 0 0;
  color: var(--term-muted);
}
.term-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 14px;
}
.domain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.4;
  padding: 4px 8px;
  border-radius: 3px;
}
.domain::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  flex-shrink: 0;
}
/* Retain the original regional and functional colour families. */
.domain.EU {
  background: #0000b8;
  color: #ffff65;
}
.domain.US {
  background: #dedfff;
  color: #a50016;
}
.domain.China {
  background: #cb0000;
  color: #ffff65;
}
.domain.UN {
  background: #5050aa;
  color: #fff;
}
.domain.Global {
  background: #edf1f5;
  color: #475469;
}
.domain.RodexInternal,
.domain.RodexFramework {
  background: #3a1c60;
  color: white;
}
.domain.OfficialRole {
  background: #111;
  color: #eee;
}
.domain.Authority {
  background: #ccc;
  color: #111;
}
.domain.Definition {
  background: #83b7ff;
  color: #112030;
}
.domain.Compliance {
  background: #981229;
  color: #ffc000;
}
.domain.Regulation {
  background: #981229;
  color: #ffc0ff;
}
.domain.License {
  background: #ffff50;
  color: #000078;
}
.domain.Certificate {
  background: #ffff50;
  color: #005500;
}
.domain.Declaration {
  background: #dddd50;
  color: #005500;
}
.domain.StandardSet {
  background: #303030;
  color: #83b7ff;
}
.domain.Document {
  background: #d0d0d0;
  color: #111;
}
.domain.Contract {
  background: #d0d0d0;
  color: #0000a0;
}
.domain.API {
  background: #600000;
  color: #e0e060;
}
.terms-page .card-body {
  padding: 0;
}
.terms-page .field {
  margin: 12px 0;
}
.terms-page .label,
.terms-page .see-also-label {
  font-size: 0.8rem;
  margin: 0 0 5px;
  color: var(--term-muted);
  font-weight: 650;
  letter-spacing: normal;
}
.terms-page .value {
  overflow-wrap: anywhere;
}
.terms-page .value :is(p, ul, ol) {
  margin-block: 8px;
}
.terms-page .value :is(h4, h5) {
  margin: 16px 0 6px;
  font-size: 1rem;
  letter-spacing: normal;
}
.terms-page .card-footer {
  border-top: 1px solid var(--term-line);
  margin-top: 16px;
  padding-top: 12px;
}
.terms-page .see-also {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.terms-page .external-links {
  margin-top: 5px;
}
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.terms-page table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
}
.terms-page th,
.terms-page td {
  padding: 9px 11px;
  border: 1px solid var(--term-line);
  text-align: left;
  vertical-align: top;
}
.terms-page th {
  background: #eef2f7;
  font-weight: 650;
}
.knowledge-matrix {
  min-width: 540px;
}
.knowledge-matrix .domain {
  margin: 2px;
}
.status-unspecified {
  color: var(--term-muted);
}
.sol_fully {
  background: #30ff30;
  color: #153415;
}
.sol_part {
  background: #70ff70;
  color: #153415;
}
.sol_ext {
  background: #ffff30;
  color: #333300;
}
.sol_pos,
.sol_ipr {
  background: #5050c9;
  color: white;
}
.terms-page [hidden] {
  display: none !important;
}
.no-results {
  padding: 20px;
  background: #fff1d8;
  border-left: 4px solid #e5820c;
}

@media (max-width: 600px) {
  .terms-page .glossary {
    width: calc(100% - 24px);
    margin-top: 12px;
  }
  .term-browser {
    padding: 13px;
  }
  .terms-page .card {
    padding: 17px;
  }
  .filter-summary strong {
    flex-basis: 100%;
  }
  .filter-summary button {
    font-size: 0.84rem;
  }
  .terms-page .term {
    font-size: 1.4rem;
  }
}

.terms-page .category-jump {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 8px;
}

.terms-page .category-jump a {
  display: block;
  flex: 0 0 auto;
}

/* Keep reading lines comfortable without constraining the filter controls. */
.terms-page .card-body,
.terms-page .card-footer {
  max-width: 1000px;
}

.type-code {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: default;
}
.type-trade {
  background: #d7eaff;
  color: #103f72;
}
.type-regulations {
  background: #981229;
  color: #ffddf1;
}
.type-documents {
  background: #f8df9c;
  color: #563a00;
}
.type-standards {
  background: #d0eedc;
  color: #124d32;
}
.type-authorities {
  background: #d8dce3;
  color: #303946;
}
.type-rodex {
  background: #3a1c60;
  color: #fff;
}
#type-filters button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#type-filters button .type-code {
  cursor: pointer;
}

.glossary-intro {
  margin-bottom: 18px;
}
.terms-page .glossary-intro h1 {
  margin-top: 0;
}
.terms-page .glossary-intro p {
  margin: 6px 0 0;
  color: var(--term-muted);
}
