/* ============================================
   DropshipFeed — Dictionary Styles
   Inline highlights + tooltip + index page + term pages
   ============================================ */


/* ============================================
   INLINE TERM (inside .post-body)
   ============================================ */

.post-body .dict-term {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  cursor: pointer;
  font-weight: 500;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  padding: 0 1px;
  border-radius: 2px;
}

.post-body .dict-term:hover,
.post-body .dict-term:focus {
  color: var(--accent-dark);
  border-bottom-color: var(--accent-dark);
  background: var(--accent-soft);
  outline: none;
}

.post-body .dict-term:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.post-body .dict-term.is-tapped {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-bottom-style: solid;
}

/* ============================================
   TOOLTIP
   ============================================ */

.dict-tooltip {
  position: absolute;
  z-index: 9999;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px 18px 14px;
  padding-right: 42px; /* room for close button */
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}

.dict-tooltip.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dict-tooltip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  transition: background .15s ease, color .15s ease;
}

.dict-tooltip-close:hover,
.dict-tooltip-close:focus {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.dict-tooltip-close svg {
  width: 14px;
  height: 14px;
}

.dict-tooltip-term {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.dict-tooltip-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 8px;
}

.dict-tooltip-def {
  color: var(--text);
  margin-bottom: 10px;
}

.dict-tooltip-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dict-tooltip-hint svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Arrow */
.dict-tooltip::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
  left: var(--arrow-x, 50%);
  margin-left: -6px;
}

.dict-tooltip:not(.is-below)::before {
  bottom: -7px;
  transform: rotate(225deg);
}

.dict-tooltip.is-below::before {
  top: -7px;
  transform: rotate(45deg);
}

@media (max-width: 640px) {
  .dict-tooltip {
    width: calc(100vw - 24px);
    font-size: 14.5px;
  }
  .dict-tooltip-term { font-size: 17px; }
}

/* ============================================
   DICTIONARY INDEX PAGE
   ============================================ */

.dict-index {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 32px 120px;
}

.dict-index-hero {
  max-width: 780px;
  margin: 0 auto 64px;
  text-align: center;
}

.dict-index-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 16px;
}

.dict-index-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.dict-index-hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.dict-index-hero p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.dict-index-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.dict-index-stat {
  text-align: center;
}

.dict-index-stat-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}

.dict-index-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Search */
.dict-search-wrap {
  max-width: 640px;
  margin: 0 auto 72px;
  position: relative;
}

.dict-search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.dict-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 79, 46, 0.12);
}

.dict-search-input::placeholder {
  color: var(--text-subtle);
}

.dict-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.dict-search-count {
  text-align: center;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Category nav */
.dict-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 64px;
  padding: 0 16px;
}

.dict-cat-nav-btn {
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
}

.dict-cat-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.dict-cat-nav-btn.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Categories */
.dict-category {
  margin-bottom: 72px;
  scroll-margin-top: 96px;
}

.dict-category-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--text);
}

.dict-category-header h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.dict-category-header-count {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Grid */
.dict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.dict-card {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: all .2s ease;
  position: relative;
}

.dict-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--text);
}

.dict-card-term {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin-bottom: 8px;
}

.dict-card-def {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 14px;
  flex-grow: 1;
}

.dict-card-link {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dict-card-link::after {
  content: '→';
  transition: transform .15s ease;
}

.dict-card:hover .dict-card-link::after {
  transform: translateX(3px);
}

.dict-empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
  font-size: 17px;
}

@media (max-width: 640px) {
  .dict-index { padding: 48px 20px 80px; }
  .dict-grid { grid-template-columns: 1fr; gap: 14px; }
  .dict-card { padding: 18px 20px; }
  .dict-category { margin-bottom: 48px; }
  .dict-category-header h2 { font-size: 26px; }
}


/* ============================================
   INDIVIDUAL TERM PAGE
   ============================================ */

.dict-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 32px 120px;
}

.dict-page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.dict-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
}

.dict-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-card);
}

.dict-back-btn svg {
  width: 14px;
  height: 14px;
  transition: transform .15s ease;
}

.dict-back-btn:hover svg {
  transform: translateX(-3px);
}

.dict-breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.dict-breadcrumb a {
  color: var(--text-muted);
}

.dict-breadcrumb a:hover {
  color: var(--accent);
}

.dict-breadcrumb-sep {
  margin: 0 8px;
  color: var(--text-subtle);
}

.dict-page-category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.dict-page-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.dict-page-short {
  padding: 22px 24px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 40px;
  font-weight: 500;
}

.dict-page-long {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}

.dict-page-long p {
  margin-bottom: 20px;
}

.dict-page-long p:last-child {
  margin-bottom: 0;
}

.dict-page-long ul,
.dict-page-long ol {
  margin: 0 0 22px 0;
  padding-left: 24px;
}

.dict-page-long li {
  margin-bottom: 10px;
  padding-left: 4px;
}

.dict-page-long li::marker {
  color: var(--accent);
}

.dict-page-long strong {
  font-weight: 600;
  color: var(--text);
}

.dict-page-long em {
  font-style: italic;
  color: var(--text-muted);
}

.dict-page-long table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

.dict-page-long table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.dict-page-long table tr:last-child td {
  border-bottom: none;
}

.dict-page-long table td:first-child {
  color: var(--text-muted);
}

.dict-page-long table td:last-child {
  font-family: var(--font-mono);
  text-align: right;
  font-weight: 500;
}

/* Related terms */
.dict-related {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.dict-related-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.dict-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.dict-related-link {
  display: block;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: all .15s ease;
}

.dict-related-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.dict-related-link-term {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 2px;
}

.dict-related-link-def {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CTA after long definition */
.dict-page-cta {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.dict-page-cta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dict-page-cta-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.dict-page-cta-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background .15s ease;
}

.dict-page-cta-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

@media (max-width: 640px) {
  .dict-page { padding: 32px 20px 80px; }
  .dict-page-short { font-size: 16px; padding: 18px 20px; }
  .dict-page-long { font-size: 16.5px; }
  .dict-related-grid { grid-template-columns: 1fr; }
}

/* Active nav link state (reused from main) */
.nav-links a.is-active {
  color: var(--accent);
}


/* ============================================
   HOMEPAGE DICTIONARY TEASER
   ============================================ */

.home-dict-teaser {
  max-width: var(--max-width);
  margin: 24px auto 32px;
  padding: 0 32px;
}

.home-dict-teaser-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0;
  background: var(--text);
  color: var(--bg);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}

.home-dict-teaser-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--bg);
}

.home-dict-teaser-left {
  padding: 36px 40px 38px;
}

.home-dict-teaser-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 14px;
}

.home-dict-teaser-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--bg);
}

.home-dict-teaser-title em {
  font-style: italic;
  color: var(--accent);
}

.home-dict-teaser-desc {
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(245, 240, 232, 0.75);
  margin-bottom: 20px;
  max-width: 520px;
}

.home-dict-teaser-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 500;
}

.home-dict-teaser-cta span {
  display: inline-block;
  transition: transform .15s ease;
}

.home-dict-teaser-card:hover .home-dict-teaser-cta span {
  transform: translateX(4px);
}

.home-dict-teaser-right {
  background: var(--bg-darker);
  padding: 36px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-dict-teaser-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.home-dict-teaser-terms span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--bg);
  padding: 6px 12px;
  background: rgba(245, 240, 232, 0.06);
  border: 1px solid rgba(245, 240, 232, 0.14);
  border-radius: 999px;
  white-space: nowrap;
}

.home-dict-teaser-terms span:nth-child(odd) {
  color: var(--accent);
  border-color: rgba(217, 79, 46, 0.3);
  background: rgba(217, 79, 46, 0.06);
}

@media (max-width: 780px) {
  .home-dict-teaser {
    margin: 16px auto 24px;
    padding: 0 20px;
  }
  .home-dict-teaser-card {
    grid-template-columns: 1fr;
  }
  .home-dict-teaser-left {
    padding: 28px 28px 20px;
  }
  .home-dict-teaser-right {
    padding: 20px 28px 28px;
    order: 2;
  }
}


/* ============================================
   SEARCH DROPDOWN — dictionary result badge
   ============================================ */

.search-result.is-dictionary .search-result-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-result-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 3px;
  vertical-align: middle;
}


/* ============================================
   "ARTICLES MENTIONING THIS TERM" (on term pages)
   ============================================ */

.dict-articles {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.dict-articles-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.dict-articles-label strong {
  color: var(--accent);
  font-weight: 500;
}

.dict-articles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dict-articles-list li a {
  display: block;
  padding: 14px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: all .15s ease;
}

.dict-articles-list li a:hover {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
}

.dict-articles-title {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  line-height: 1.3;
}

.dict-articles-list li a:hover .dict-articles-title {
  color: var(--accent);
}

.dict-articles-desc {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dict-articles-more {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-subtle);
  padding: 10px 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


/* ============================================
   "TERMS IN THIS ARTICLE" (at bottom of blog posts)
   ============================================ */

.article-glossary {
  max-width: var(--content-width);
  margin: 48px auto 0;
  padding: 32px 32px 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-sizing: border-box;
}

.article-glossary-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.article-glossary-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.article-glossary-link {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
}

.article-glossary-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.article-glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
}

.article-glossary-item {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: background .15s ease;
  border: 1px solid transparent;
}

.article-glossary-item:hover {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}

.article-glossary-item-term {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--accent);
  margin-bottom: 2px;
}

.article-glossary-item-cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

@media (max-width: 640px) {
  .article-glossary {
    padding: 24px 20px;
    margin-top: 40px;
  }
  .article-glossary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  /* Strip the dotted underline from inline terms — keeps text readable */
  .post-body .dict-term {
    color: inherit !important;
    border-bottom: none !important;
    background: transparent !important;
    font-weight: inherit !important;
  }

  /* Hide the tooltip and popup entirely */
  .dict-tooltip,
  .df-popup-backdrop,
  .df-popup {
    display: none !important;
  }

  /* Hide the article-level glossary teaser — reference on screen only */
  .article-glossary {
    display: none;
  }

  /* Back button and CTA blocks aren't useful in print */
  .dict-back-btn,
  .dict-page-cta,
  .nav-search,
  .menu-toggle {
    display: none !important;
  }

  /* Clean up link colors for paper */
  a {
    color: #000 !important;
    text-decoration: underline;
  }

  .dict-page {
    padding: 0;
  }

  body {
    background: white !important;
    color: black !important;
  }
}
