/* ==========================================================================
   Retail Link glossary - page styles
   Shares the page-header and search-field treatment with the deduction codes
   page; the list itself is a definition list, not a table, because each entry
   is a paragraph rather than a row of values.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page header (same band as the codes page)
   -------------------------------------------------------------------------- */

.phead {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  padding-top: clamp(8rem, 14vw, 11rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.phead__photo { position: absolute; inset: 0; z-index: 0; display: block; }

.phead__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  filter: grayscale(0.92) contrast(1.2) brightness(0.26);
}

.phead__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 11, 13, 0.82) 0%, transparent 38%),
    linear-gradient(0deg, rgba(10, 11, 13, 0.94) 0%, rgba(10, 11, 13, 0.35) 48%, transparent 70%);
}

.phead__shell {
  position: relative;
  z-index: 2;
  display: grid;
  /* Anchored low, the way the home hero is. space-between pushed the headline
     to the very top of the band and left a dead middle. */
  align-content: end;
  gap: clamp(2.5rem, 6vw, 5rem);
  width: 100%;
}

.phead__grid { display: grid; gap: var(--s-6); }

@media (min-width: 62rem) {
  .phead__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(2.5rem, 5vw, 5rem);
  }
}

.phead .display--1 { max-width: 16ch; }

.phead__aside {
  display: grid;
  gap: var(--s-5);
  justify-items: start;
}

.phead .lead {
  max-width: 42ch;
  font-size: clamp(1rem, 1.2vw, 1.0625rem);
  line-height: 1.6;
}

.phead__strip { margin-top: clamp(2.25rem, 4vw, 3.5rem); }

/* Shared "pick" card, same as the codes page. */
.pick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-4);
  width: 100%;
  max-width: 24rem;
  padding: var(--s-4);
  border: 1px solid var(--rule-on-dark);
  border-radius: var(--r-md);
  background: rgba(10, 11, 13, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color var(--dur-2) var(--ease-out),
              background-color var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out);
}
.pick:hover {
  border-color: rgba(26, 109, 255, 0.55);
  background: rgba(10, 11, 13, 0.62);
  transform: translateY(-2px);
}
.pick__code {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--nv-blue-bright);
}
.pick__txt { display: grid; gap: 2px; min-width: 0; }
.pick__label {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-on-dark-fnt);
}
.pick__def { font-size: var(--t-sm); font-weight: 500; color: #fff; line-height: 1.35; }
.pick__arrow {
  color: var(--fg-on-dark-mut);
  transition: transform var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.pick:hover .pick__arrow { transform: translateX(3px); color: #fff; }

/* --------------------------------------------------------------------------
   2. Search and area filters
   -------------------------------------------------------------------------- */

.gl-tools {
  display: grid;
  gap: var(--s-4);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.gl-search { max-width: 34rem; }

.gl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.gl-filter {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-pill);
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  cursor: pointer;
  transition: background-color var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out),
              color var(--dur-2) var(--ease-out);
}
.gl-filter:hover { border-color: var(--nv-blue); color: var(--nv-blue); }
.gl-filter.is-on {
  background: var(--nv-blue);
  border-color: var(--nv-blue);
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. The terms
   A card grid, not a two-column definition list. The list version left the
   right half of every row empty and read as a data dump; cards give the 38
   entries density and let the eye jump straight to the word it wants.
   -------------------------------------------------------------------------- */

.term-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 48rem) {
  .term-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 82rem) {
  .term-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.term {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--s-2);
  padding: clamp(1.15rem, 2vw, 1.5rem);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--nv-paper);
  transition: border-color var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out);
}

/* The area label sits top-right, out of the reading path. */
.term__tag {
  position: absolute;
  top: clamp(1.15rem, 2vw, 1.5rem);
  right: clamp(1.15rem, 2vw, 1.5rem);
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  transition: color var(--dur-2) var(--ease-out);
}

.term__name {
  margin: 0;
  padding-right: 6rem;          /* clear of the tag */
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  text-wrap: balance;
}

.term__exp {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.35;
  color: var(--nv-blue);
}

.term__def {
  margin: 0;
  margin-top: var(--s-1);
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--fg-muted);
  text-wrap: pretty;
}

.term mark {
  background: rgba(26, 109, 255, 0.20);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

@media (hover: hover) and (pointer: fine) {
  .term:hover {
    border-color: rgba(26, 109, 255, 0.45);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
  .term:hover .term__tag { color: var(--nv-blue); }
}

@media (prefers-reduced-motion: reduce) {
  .term { transition: border-color var(--dur-2) var(--ease-out); }
  .term:hover { transform: none; }
}
