/* =============================================================================
   Technology Dictionary (/dictionary.php) — loaded only on dictionary pages.
   Uses the Aventro theme variables from main.css so it follows the site's
   dark palette; nothing here overrides global styles.
   ============================================================================= */

.dictionary-index .dict-intro,
.dictionary-term .dict-prose { font-size: 1.05rem; line-height: 1.7; }

.dict-lead { margin-bottom: 2rem; }
.dict-search .form-control {
  background-color: color-mix(in srgb, var(--background-color), white 6%);
  color: var(--default-color);
  border-color: color-mix(in srgb, var(--default-color), transparent 75%);
}
.dict-search .form-control::placeholder { color: color-mix(in srgb, var(--default-color), transparent 45%); }

/* Landing-page topic cards: the first thing under the intro */
.dict-section-title { font-size: 1.35rem; margin-bottom: 1rem; }
.dict-topic {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  color: var(--default-color);
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.dict-topic:hover,
.dict-topic:focus-visible { border-color: var(--accent-color); transform: translateY(-2px); color: var(--default-color); }
.dict-topic.is-empty { opacity: .6; }
.dict-topic-icon { font-size: 2rem; color: var(--accent-color); line-height: 1; }
.dict-topic-body { display: flex; flex-direction: column; gap: .35rem; }
.dict-topic-name { font-family: var(--heading-font, inherit); font-size: 1.15rem; font-weight: 600; color: var(--heading-color); }
.dict-topic-desc { font-size: .92rem; color: color-mix(in srgb, var(--default-color), transparent 20%); }
.dict-topic-count { font-size: .85rem; font-weight: 600; color: var(--accent-color); }
@media (prefers-reduced-motion: reduce) { .dict-topic { transition: none; } .dict-topic:hover { transform: none; } }

.dict-help { color: color-mix(in srgb, var(--default-color), transparent 30%); }

/* Visible keyboard focus everywhere in the dictionary */
.dictionary-index a:focus-visible,
.dictionary-term a:focus-visible,
.dict-search .form-control:focus-visible,
.dict-search .form-select:focus-visible,
.dict-search .btn:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
  box-shadow: none;
}

.dict-cats ul,
.dict-az ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.dict-cats { margin-bottom: 1rem; }
.dict-cats a {
  display: inline-block;
  padding: .4rem .9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 55%);
  color: var(--default-color);
  text-decoration: none;
}
.dict-cats a:hover,
.dict-cats a.active { background: var(--accent-color); border-color: var(--accent-color); color: var(--contrast-color); }
.dict-count { opacity: .75; font-size: .85em; margin-left: .25rem; }

.dict-types { margin-bottom: 1rem; }
.dict-type-link { margin-right: .75rem; color: var(--default-color); }
.dict-type-link.active { color: var(--accent-color); font-weight: 600; text-decoration: underline; }

.dict-az { margin: 1rem 0 1.5rem; }
.dict-az a,
.dict-az span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 .4rem;
  border-radius: 6px; font-weight: 600; text-decoration: none;
}
.dict-az a { background: var(--surface-color); color: var(--accent-color); }
.dict-az a:hover { background: var(--accent-color); color: var(--contrast-color); }
.dict-az span { color: color-mix(in srgb, var(--default-color), transparent 65%); }

.dict-result-count { color: color-mix(in srgb, var(--default-color), transparent 25%); }

.dict-letter {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  scroll-margin-top: 110px;
}

.dict-card {
  position: relative;
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  transition: border-color .2s;
}
.dict-card:hover,
.dict-card:focus-within { border-color: var(--accent-color); }
.dict-card a { color: var(--heading-color); text-decoration: none; }
.dict-card-expanded { color: var(--accent-color); font-size: .92rem; }
.dict-card-def { font-size: .95rem; color: color-mix(in srgb, var(--default-color), transparent 15%); }
.dict-card-meta { font-size: .8rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.dict-card-cat { color: color-mix(in srgb, var(--default-color), transparent 35%); }

.dict-badge {
  display: inline-block; padding: .1rem .5rem; border-radius: 4px;
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  background: color-mix(in srgb, var(--accent-color), transparent 80%); color: var(--heading-color);
}
.dict-badge-status { background: #8a5a00; color: #fff; }

.dict-empty,
.dict-hub-services,
.dict-bottom-cta {
  background: var(--surface-color);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.dict-bottom-cta { text-align: center; }
.dict-hub-services li { margin-bottom: .5rem; }
.dict-muted { color: color-mix(in srgb, var(--default-color), transparent 35%); }

/* ---- Entry page ---------------------------------------------------------- */

.dict-quick {
  border-left: 4px solid var(--accent-color);
  background: var(--surface-color);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}
.dict-quick-label {
  text-transform: uppercase; font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; color: var(--accent-color); margin-bottom: .35rem;
}

.dict-prose h2 { font-size: 1.5rem; margin: 2.25rem 0 .9rem; scroll-margin-top: 110px; }
.dict-prose h3 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }
.dict-prose ul,
.dict-prose ol { padding-left: 1.4rem; }
.dict-prose li { margin-bottom: .4rem; }
.dict-prose code { color: var(--heading-color); background: color-mix(in srgb, var(--default-color), transparent 90%); padding: .05rem .3rem; border-radius: 4px; }
.dict-prose pre { background: var(--surface-color); padding: 1rem; border-radius: 8px; overflow-x: auto; }
.dict-prose pre code { background: none; padding: 0; }
.dict-prose blockquote { border-left: 3px solid var(--accent-color); padding-left: 1rem; margin-left: 0; }

/* Tables scroll inside themselves on narrow screens, never the page */
.dict-prose table {
  display: block; width: 100%; overflow-x: auto;
  border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem;
}
.dict-prose th,
.dict-prose td {
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 80%);
  padding: .55rem .7rem; vertical-align: top; min-width: 9rem;
}
.dict-prose th { background: var(--surface-color); color: var(--heading-color); }
.dict-prose caption { caption-side: top; color: color-mix(in srgb, var(--default-color), transparent 30%); padding-bottom: .5rem; }

.dict-diagram { margin: 1rem 0 2rem; }
.dict-diagram img {
  display: block; width: 100%; height: auto;
  background: #fff; border-radius: 10px; padding: .75rem;
}
.dict-diagram figcaption { font-size: .95rem; margin-top: .75rem; color: color-mix(in srgb, var(--default-color), transparent 15%); }

.dict-insight {
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 60%);
  border-radius: 10px;
  padding: .25rem 1.25rem 1rem;
  margin: 2.25rem 0;
}
.dict-insight h2 { margin-top: 1rem; }

.dict-sources { font-size: .95rem; }
.dict-sources li { overflow-wrap: anywhere; }

.dict-editorial {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  margin-top: 2.5rem; padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  font-size: .9rem; color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.dict-sidebar { position: sticky; top: 110px; }
.dict-box {
  background: var(--surface-color);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.dict-box-title { text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; color: var(--accent-color); margin-bottom: .75rem; }
.dict-facts dt { font-size: .8rem; font-weight: 600; color: color-mix(in srgb, var(--default-color), transparent 35%); }
.dict-facts dd { margin-bottom: .6rem; }
.dict-related li { margin-bottom: .6rem; }

/* Reviewer-only banner (admin preview) */
.dict-preview-banner {
  background: #fff3cd; color: #3d2e00;
  border: 1px solid #e0b100; border-radius: 8px;
  padding: .75rem 1rem; margin-bottom: 1.5rem;
}
.dict-preview-banner .dict-flag { margin-left: .5rem; font-weight: 600; color: #8a1c00; }

@media (max-width: 991.98px) {
  .dict-sidebar { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .dict-card { transition: none; }
}
