/* ════════════════════════════════════════════════════════════════════════
   BUZZVOICE GLOSSARY BLOCKS — Frontend Styles
   9 components for glossary blog articles.
   ════════════════════════════════════════════════════════════════════════ */

/* ─── Smooth scroll ─── */
html { scroll-behavior: smooth; }

/* ─── Design tokens ─── */
:root {
  --g-primary: #10b981;
  --g-primary-dark: #059669;
  --g-primary-darker: #064e3b;
  --g-primary-soft: #d1fae5;
  --g-primary-softer: #ecfdf5;
  --g-text: #1a1d23;
  --g-text-mid: #4a5560;
  --g-text-light: #6b7077;
  --g-text-lighter: #9ca3af;
  --g-bg: #ffffff;
  --g-surface: #fafbfc;
  --g-surface-2: #f3f4f6;
  --g-border: #e5e7eb;
  --g-border-soft: #eef1f4;
  --cat-1: #10b981;
  --cat-2: #1f2937;
  --cat-3: #2563eb;
  --cat-4: #f59e0b;
  --cat-5: #db2777;
  --cat-6: #7c3aed;
  --cat-7: #ef4444;
  --cat-8: #0891b2;
}

/* ─── Reset prose overrides on glossary links ─── */
.prose .term-toc a,
.prose .term-card a,
.prose .term-card-content a,
.prose .ref-table a,
.prose .ref-table-term a,
.prose .ref-table-wrap a,
.prose .faq-a a,
.prose .faq-list a,
.prose .quick-jump a,
.prose .compact-card a,
.prose .compact-grid a,
.prose .hero-block a,
.prose .hero-img a,
.prose a.sec-jump {
  text-decoration: none;
  color: inherit;
}

/* ════════════════════════════════════════════════════════════════════════
   01 — .term-toc   Hero TOC with category dots
   ════════════════════════════════════════════════════════════════════════ */
.term-toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 24px 0 40px;
}
.term-toc a {
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: 12px;
  padding: 12px 14px 10px;
  display: block;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.term-toc a::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--g-primary);
  opacity: 0.3;
  transition: opacity 0.3s ease;
}
.term-toc a:hover {
  border-color: var(--g-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.1);
}
.term-toc a:hover::before { opacity: 1; }
.term-toc .toc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.term-toc .toc-num {
  font-size: 11px; font-weight: 800;
  color: var(--g-text-lighter);
  letter-spacing: 0.6px;
}
.term-toc .toc-divider {
  width: 1px; height: 10px;
  background: var(--g-border);
}
.term-toc .toc-cat {
  font-size: 10px; font-weight: 700;
  color: var(--g-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 5px;
}
.term-toc .toc-cat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.term-toc .toc-name {
  font-size: 15px; font-weight: 700;
  color: var(--g-text);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}
.term-toc .toc-cta {
  font-size: 11px; font-weight: 700;
  color: var(--g-primary-dark);
  display: inline-flex; align-items: center; gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.term-toc .toc-cta-arrow {
  transition: transform 0.2s;
  display: inline-block;
}
.term-toc a:hover .toc-cta-arrow { transform: translateY(2px); }

@media (max-width: 480px) {
  .term-toc { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════════════════════════════════════
   02 — .term-card   Magazine layout term card
   ════════════════════════════════════════════════════════════════════════ */
.term-card {
  --c: var(--g-primary);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 18px;
  align-items: start;
  scroll-margin-top: 24px;
}
.term-card-meta {
  border-right: 1px solid var(--g-border-soft);
  padding-right: 28px;
  position: sticky;
  top: 24px;
}
.term-card-num {
  font-size: 56px; font-weight: 900;
  color: var(--c);
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 12px;
  font-feature-settings: "tnum";
}
.term-card-tag {
  display: inline-block;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--c);
  color: white;
  margin-bottom: 12px;
}
.term-card-tag.light { color: white; }
.term-card-stands {
  font-style: italic;
  color: var(--g-text-light);
  font-size: 13px;
  line-height: 1.4;
}
.term-card-name {
  font-size: 22px; font-weight: 800;
  color: var(--g-text);
  letter-spacing: -0.4px;
  margin: 0 0 6px;
  line-height: 1.2;
}
.term-card-def {
  background: color-mix(in srgb, var(--c) 4%, var(--g-surface));
  border: none;
  border-top: 2px dotted color-mix(in srgb, var(--c) 30%, var(--g-border));
  border-bottom: 2px dotted color-mix(in srgb, var(--c) 30%, var(--g-border));
  border-radius: 0;
  padding: 14px 18px;
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--g-text);
  line-height: 1.55;
  font-style: normal;
}
.term-card-def-label {
  font-weight: 800;
  color: var(--c);
}
.term-card-content p {
  margin: 0 0 12px;
  color: var(--g-text-mid);
  font-size: 15px;
  line-height: 1.65;
}
.term-card-example {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--g-border);
  font-size: 14px;
  color: var(--g-text-mid);
  line-height: 1.6;
}
.term-card-example-label {
  font-weight: 800;
  color: var(--c);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.8px;
  display: block;
  margin-bottom: 4px;
}

@media (max-width: 700px) {
  .term-card { grid-template-columns: 1fr; gap: 16px; padding: 22px; }
  .term-card-meta {
    border-right: none;
    border-bottom: 1px solid var(--g-border-soft);
    padding-right: 0;
    padding-bottom: 16px;
    position: static;
  }
  .term-card-num { font-size: 40px; display: inline-block; margin-right: 14px; vertical-align: middle; }
}

/* ════════════════════════════════════════════════════════════════════════
   03 — .ref-table   Color-coded comparison table
   ════════════════════════════════════════════════════════════════════════ */
.ref-table-wrap {
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
}
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ref-table th {
  background: var(--g-surface);
  color: var(--g-text-light);
  font-weight: 700; font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-align: left;
  padding: 14px 20px;
  border-bottom: 2px solid var(--g-border);
}
.ref-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--g-border-soft);
  vertical-align: top;
  color: var(--g-text-mid);
  font-size: 13.5px;
  line-height: 1.55;
}
.ref-table td:first-child {
  font-size: 15px;
  font-weight: 800;
  color: var(--g-text);
  white-space: nowrap;
  vertical-align: middle;
  letter-spacing: -0.3px;
}
.ref-table td:last-child {
  white-space: nowrap;
  vertical-align: middle;
}
.ref-table tbody tr { transition: background 0.15s; }
.ref-table tbody tr:hover { background: var(--g-surface); }
.ref-table tbody tr:last-child td { border-bottom: none; }
.ref-table tbody tr:nth-child(even) { background: var(--g-surface); }
.ref-table tbody tr:nth-child(even):hover { background: var(--g-surface-2); }
.ref-table-term {
  font-weight: 800;
  color: var(--g-text);
  display: flex; align-items: center; gap: 10px;
}
.ref-table-term::before {
  content: '';
  width: 4px; height: 24px;
  border-radius: 2px;
  background: var(--g-primary);
  flex-shrink: 0;
}
.ref-table-term a {
  color: var(--g-text);
  text-decoration: none;
  transition: color 0.2s;
}
.ref-table-term a:hover { color: var(--g-primary); }
.ref-table-cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  color: var(--g-primary-dark);
  background: var(--g-primary-soft);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.ref-table-cat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--g-primary);
}

@media (max-width: 700px) {
  .ref-table thead { display: none; }
  .ref-table, .ref-table tbody, .ref-table tr, .ref-table td { display: block; width: 100%; }
  .ref-table tr { border-bottom: 1px solid var(--g-border); padding: 14px 18px; }
  .ref-table tr:last-child { border-bottom: none; }
  .ref-table td { padding: 4px 0; border: none; white-space: normal; }
  .ref-table td:first-child { margin-bottom: 4px; }
  .ref-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--g-text-lighter);
    margin-bottom: 2px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   04 — .faq-item   Numbered card accordion (<details>/<summary>)
   ════════════════════════════════════════════════════════════════════════ */
.faq-list { margin: 24px 0; }
.faq-item {
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s;
}
.faq-item:hover { border-color: var(--g-text-lighter); }
.faq-item[open] {
  border-color: var(--g-primary);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex; align-items: center; gap: 14px;
  font-weight: 700;
  color: var(--g-text);
  font-size: 16px;
  transition: background 0.15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--g-surface); }
.faq-num {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--g-primary-soft);
  color: var(--g-primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
  transition: all 0.2s;
}
.faq-item[open] .faq-num { background: var(--g-primary); color: white; }
.faq-q { flex: 1; line-height: 1.4; }
.faq-chev {
  color: var(--g-text-lighter);
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.25s ease, color 0.2s;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
}
.faq-item[open] .faq-chev {
  transform: rotate(180deg);
  color: var(--g-primary);
}
.faq-a {
  padding: 0 22px 20px 64px;
  font-size: 15px;
  color: var(--g-text-mid);
  line-height: 1.65;
}
.faq-a a {
  color: var(--g-primary-dark);
  text-decoration: none;
}
.faq-a a:hover { color: var(--g-primary); }

/* ════════════════════════════════════════════════════════════════════════
   05 — .hero-block + .hero-img   Article hero with tile grid
   ════════════════════════════════════════════════════════════════════════ */
.hero-img-inner,
.hero-img > div {
  padding: 40px 44px;
}
.hero-block,
.hero-img {
  background: #000;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(14, 183, 126, 0.12), transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(14, 183, 126, 0.08), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(8, 145, 178, 0.06), transparent 40%),
    radial-gradient(ellipse at 60% 0%, rgba(30, 41, 59, 0.8), transparent 60%);
  border-radius: 14px;
  margin: 24px 0;
  overflow: hidden;
  color: white;
}
.hero-block { padding: 40px 44px; }
.hero-eyebrow {
  display: inline-block;
  background: rgba(14, 183, 126, 0.15);
  color: #0EB77E;
  font-size: 11px; font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero-title {
  font-size: 28px; font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  max-width: 600px;
  color: white;
}
.hero-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  margin-bottom: 22px;
}
.hero-sub b { color: white; font-weight: 700; }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.hero-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 600px) {
  .hero-grid,
  .hero-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

.hero-tile {
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed rgba(100, 116, 139, 0.5);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hero-tile:hover {
  border-color: #0EB77E;
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.hero-tile .icon { font-size: 24px; margin-bottom: 6px; }
.hero-tile .label { font-size: 13px; font-weight: 700; color: white; margin-bottom: 3px; }
.hero-tile .sub-label,
.hero-tile .sub { font-size: 10px; color: #0EB77E; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; }

/* ════════════════════════════════════════════════════════════════════════
   06 — .h2-with-count + .sec-count   Section heading with count pill
   ════════════════════════════════════════════════════════════════════════ */
.h2-with-count {
  font-size: 24px; font-weight: 800;
  color: var(--g-text);
  letter-spacing: -0.4px;
  line-height: 1.25;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--g-primary-softer);
  margin: 32px 0 18px;
  display: flex; align-items: baseline; gap: 10px;
  flex-wrap: wrap;
}
.sec-count {
  font-size: 13px;
  color: var(--g-primary-dark);
  background: var(--g-primary-soft);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

/* ════════════════════════════════════════════════════════════════════════
   07 — .quick-jump   Numbered sticker chip grid
   ════════════════════════════════════════════════════════════════════════ */
.quick-jump {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  padding: 8px 0 16px;
}
.quick-jump p,   .quick-jump br,
.term-toc p,     .term-toc br,
.section-jumps p,.section-jumps br,
.compact-grid p, .compact-grid br,
.hero-img p,     .hero-img br { display: none; }
@media (max-width: 700px) { .quick-jump { grid-template-columns: repeat(5, 1fr); gap: 6px; } }
@media (max-width: 380px) { .quick-jump { grid-template-columns: repeat(4, 1fr); } }
.quick-jump a {
  --c: var(--g-primary);
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: 8px;
  padding: 7px 4px 9px 8px;
  text-align: center;
  font-weight: 800;
  color: var(--g-text);
  line-height: 1;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.15s ease, color 0.15s ease;
  will-change: transform;
  transform-origin: center bottom;
}
.quick-jump a::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--c);
  transition: width 0.2s ease;
}
.qj-num {
  font-size: 9px; font-weight: 700;
  color: var(--g-text-lighter);
  letter-spacing: 0.4px;
  transition: color 0.2s;
  font-variant-numeric: tabular-nums;
}
.qj-abbr { font-size: 12px; font-weight: 800; letter-spacing: 0.3px; }
.quick-jump a:hover {
  border-color: var(--c);
  color: var(--c);
  transform: translateY(-4px) rotate(-2deg);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 10px 20px -2px color-mix(in srgb, var(--c) 30%, transparent), 0 4px 8px -2px rgba(0,0,0,0.06);
  z-index: 2;
}
.quick-jump a:hover::before { width: 5px; }
.quick-jump a:hover .qj-num { color: var(--c); }
.quick-jump a:nth-child(even):hover { transform: translateY(-4px) rotate(2deg); }
.quick-jump a:active {
  transform: translateY(-1px) rotate(0);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 2px 4px color-mix(in srgb, var(--c) 20%, transparent);
  transition-duration: 0.05s;
}

/* ════════════════════════════════════════════════════════════════════════
   08 — .section-jumps + .sec-jump   Thematic pills
   ════════════════════════════════════════════════════════════════════════ */
.section-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 32px;
}
.sec-jump {
  --c: var(--g-primary);
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  color: var(--g-text);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 8px 9px 14px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s;
  text-decoration: none;
}
.sec-jump-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c);
  flex-shrink: 0;
}
.sec-jump-count {
  background: var(--g-surface-2);
  color: var(--g-text-light);
  font-size: 11px; font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  transition: all 0.2s;
}
.sec-jump:hover {
  border-color: var(--c);
  color: var(--c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.sec-jump:hover .sec-jump-count {
  background: var(--c);
  color: white;
}

/* ════════════════════════════════════════════════════════════════════════
   09 — .compact-card   2-col compact term card grid
   ════════════════════════════════════════════════════════════════════════ */
.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.compact-card {
  --c: var(--g-primary);
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: 10px;
  padding: 16px 18px;
  transition: all 0.2s;
  position: relative;
  scroll-margin-top: 24px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
}
.compact-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--c);
  transition: width 0.2s ease;
}
.compact-card:hover {
  border-color: var(--c);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.compact-card:hover::before { width: 6px; }
.compact-top {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.compact-num {
  font-size: 10px; font-weight: 800;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.compact-name {
  font-size: 17px; font-weight: 800;
  color: var(--g-text);
  letter-spacing: -0.3px;
  flex: 1;
}
.compact-tag {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--c);
  color: white;
  flex-shrink: 0;
}
.compact-tag.light { color: white; }
.compact-stands {
  font-style: italic;
  color: var(--g-text-light);
  font-size: 12px;
  margin-bottom: 10px;
  line-height: 1.4;
}
.compact-def {
  background: var(--g-surface);
  border-top: 2px dotted color-mix(in srgb, var(--c) 30%, var(--g-border));
  border-bottom: 2px dotted color-mix(in srgb, var(--c) 30%, var(--g-border));
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: var(--g-text);
  line-height: 1.55;
}
.compact-ex {
  border-top: 1px dashed var(--g-border);
  padding-top: 8px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--g-text-mid);
  font-style: italic;
  line-height: 1.5;
}
.compact-ex-label {
  font-style: normal;
  font-weight: 800;
  color: var(--c);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.7px;
  display: inline-block;
  margin-right: 6px;
}

@media (max-width: 600px) {
  .compact-grid { grid-template-columns: 1fr; }
}
