/* ==================================================================
   NeighCheck Glossary UI
   Used by /glossary/index.php and every /glossary/[term].php page.
   ================================================================== */

.gloss-hero {
  padding: 56px 0 32px;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(52, 211, 153, 0.08), transparent 60%),
    radial-gradient(ellipse at 90% 5%, rgba(5, 150, 105, 0.06), transparent 50%);
  border-bottom: 1px solid var(--rule);
}
.gloss-hero .eyebrow { margin-bottom: 14px; }
.gloss-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  margin-bottom: 14px;
}
.gloss-hero .lede {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: 0;
}

/* A-Z navigation */
.gloss-az {
  background: #fff;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 60px;
  z-index: 5;
  padding: 14px 0;
}
.gloss-az-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.gloss-az-row a {
  display: inline-block;
  min-width: 32px;
  text-align: center;
  padding: 6px 8px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--bg-2);
  transition: all .15s ease;
}
.gloss-az-row a:hover {
  background: var(--nc-green-tint);
  color: var(--nc-green-deep);
}
.gloss-az-row a.empty {
  opacity: 0.3;
  pointer-events: none;
}

/* Category filter */
.gloss-cats {
  padding: 20px 0;
  text-align: center;
}
.gloss-cats .filter-btn {
  display: inline-block;
  padding: 6px 14px;
  margin: 0 4px 4px 0;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--rule-strong);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s ease;
}
.gloss-cats .filter-btn:hover {
  border-color: var(--nc-green-deep);
  color: var(--nc-green-deep);
}
.gloss-cats .filter-btn[aria-pressed="true"] {
  background: var(--nc-green-deep);
  color: #fff;
  border-color: var(--nc-green-deep);
}

/* Letter sections */
.gloss-letter {
  padding: 32px 0 24px;
  border-top: 1px solid var(--rule);
}
.gloss-letter:first-of-type { border-top: 0; }
.gloss-letter h2 {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--nc-green-deep);
  margin: 0 0 16px;
  letter-spacing: -0.04em;
  line-height: 1;
}

.gloss-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.gloss-item {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 18px;
  transition: all .15s ease;
}
.gloss-item:hover {
  border-color: var(--nc-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(15,23,42,.08);
}
.gloss-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.gloss-item .term {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 4px;
}
.gloss-item .def {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0;
}
.gloss-item .badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: 2px 7px;
  margin-left: 6px;
  border-radius: 4px;
  vertical-align: middle;
  color: var(--ink-soft);
  background: var(--bg-2);
}
.gloss-item .badge.tax       { background: #fef3c7; color: #92400e; }
.gloss-item .badge.tipping   { background: var(--nc-green-tint); color: var(--nc-green-dark); }
.gloss-item .badge.gig       { background: #dbeafe; color: #1e40af; }
.gloss-item .badge.restaurant{ background: #fce7f3; color: #9d174d; }
.gloss-item .badge.legal     { background: #ede9fe; color: #5b21b6; }

/* Single term page */
.term-hero {
  padding: 48px 0 28px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(52,211,153,0.08), transparent 55%);
  border-bottom: 1px solid var(--rule);
}
.term-hero .eyebrow { margin-bottom: 12px; }
.term-hero .breadcrumbs {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.term-hero .breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.term-hero .breadcrumbs a:hover { color: var(--nc-green-deep); }
.term-hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  margin: 0 0 14px;
}
.term-hero .aliases {
  font-size: 0.9rem;
  color: var(--ink-faint);
  font-style: italic;
  margin: 0;
}
.term-hero .short {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 18px 0 0;
}

.term-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  padding: 40px 0 64px;
  align-items: start;
}
@media (max-width: 880px) {
  .term-body { grid-template-columns: 1fr; gap: 32px; }
}

.term-main p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 16px;
}
.term-main ul, .term-main ol {
  color: var(--ink);
  padding-left: 22px;
  margin: 0 0 18px;
  list-style: disc;
}
.term-main ol { list-style: decimal; }
.term-main li { margin: 0 0 6px; line-height: 1.55; }
.term-main a {
  color: var(--nc-green-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.term-main a:hover { background: var(--nc-green-tint); }

.term-example {
  background: #fef3c7;
  border-left: 3px solid var(--nc-gold);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.98rem;
  color: var(--ink);
}
.term-example strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #92400e;
}

.term-aside {
  position: sticky;
  top: 132px;
}
@media (max-width: 880px) { .term-aside { position: static; } }
.term-aside-block {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px;
  margin: 0 0 18px;
}
.term-aside-block h3 {
  font-size: 0.78rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin: 0 0 14px;
  font-weight: 700;
}
.term-aside-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.term-aside-block li { margin: 0 0 8px; }
.term-aside-block a {
  display: block;
  padding: 6px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  border-bottom: 1px solid var(--rule);
}
.term-aside-block a:hover { color: var(--nc-green-deep); }
.term-aside-block li:last-child a { border-bottom: 0; }
.term-aside-block.app-promo {
  background: var(--nc-green-dark);
  border: 0;
  color: #ecfdf5;
}
.term-aside-block.app-promo h3 { color: var(--nc-green); }
.term-aside-block.app-promo p { font-size: 0.92rem; line-height: 1.5; margin: 0 0 14px; color: rgba(236,253,245,0.85); }
.term-aside-block.app-promo a {
  background: #fff;
  color: var(--nc-green-dark);
  border: 0;
  padding: 9px 14px;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 0.86rem;
  margin: 0 0 6px;
}
.term-aside-block.app-promo a:hover { background: var(--nc-green-tint); }
