/* Crustimate glossary / content-page stylesheet */
:root {
  --bg:       #0d0f14;
  --surface:  #14171f;
  --border:   #252933;
  --text:     #dce1ec;
  --muted:    #7a8499;
  --teal:     #00d9be;
  --teal-dim: rgba(0,217,190,0.10);
  --teal-mid: rgba(0,217,190,0.25);
  --warn:     #f5a623;
  --red:      #e05a5a;
  --max-w:    720px;
  --font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:     'JetBrains Mono', 'Fira Mono', 'Consolas', monospace;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Navigation ── */
.g-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,15,20,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.g-nav-inner {
  max-width: calc(var(--max-w) + 240px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}
.g-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.g-logo svg { flex-shrink: 0; }
.g-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal);
  color: #0d0f14;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.g-nav-cta:hover { opacity: 0.88; }

/* ── Layout ── */
.g-wrap {
  max-width: calc(var(--max-w) + 240px);
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: var(--max-w) 1fr;
  gap: 0 48px;
  align-items: start;
}
@media (max-width: 1020px) {
  .g-wrap { grid-template-columns: 1fr; }
  .g-sidebar { display: none; }
}

/* ── Article ── */
.g-article { min-width: 0; }

.g-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}
.g-article h1 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  line-height: 1.22;
  color: #f0f3fb;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.g-tldr {
  background: var(--teal-dim);
  border-left: 3px solid var(--teal);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-bottom: 36px;
  font-size: 15px;
  line-height: 1.65;
  color: #ccd3e4;
}
.g-tldr strong { color: var(--teal); font-weight: 600; }

/* Body typography */
.g-article h2 {
  font-size: 19px;
  font-weight: 700;
  color: #f0f3fb;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
}
.g-article h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--teal);
  margin: 28px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
}
.g-article p {
  margin-bottom: 16px;
  color: var(--text);
}
.g-article p:last-child { margin-bottom: 0; }
.g-article ul, .g-article ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
.g-article li { margin-bottom: 8px; }
.g-article a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.g-article a:hover { opacity: 0.8; }
.g-article strong { color: #f0f3fb; font-weight: 600; }
.g-article em { color: var(--muted); font-style: italic; }

/* Data callout */
.g-stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 20px 0;
}
.g-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--teal);
  white-space: nowrap;
  line-height: 1;
}
.g-stat-label {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}
.g-stat-label strong { color: var(--text); }

/* Stat grid */
.g-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.g-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.g-stat-card .num {
  font-size: 24px;
  font-weight: 800;
  color: var(--teal);
  line-height: 1.1;
}
.g-stat-card .lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Before / After */
.g-ba {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
@media (max-width: 600px) { .g-ba { grid-template-columns: 1fr; } }
.g-ba-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.g-ba-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.g-ba-box.after .g-ba-label { color: var(--teal); }
.g-ba-box.before { border-color: #3a2020; }
.g-ba-box.after  { border-color: var(--teal-mid); }
.g-ba-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.g-ba-score {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.g-ba-score strong { color: var(--text); }

/* Pattern blocks */
.g-pattern {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 12px 0;
}
.g-pattern-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}
.g-pattern-title {
  font-size: 15px;
  font-weight: 700;
  color: #f0f3fb;
  margin-bottom: 8px;
}
.g-pattern p { font-size: 14px; margin-bottom: 0; }

/* Honesty callout */
.g-honest {
  background: rgba(245,166,35,0.07);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #d9c49a;
}
.g-honest strong { color: var(--warn); }

/* FAQ */
.g-faq { margin-top: 40px; }
.g-faq h2 {
  font-size: 19px;
  font-weight: 700;
  color: #f0f3fb;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.g-faq-item {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.g-faq-item:last-child { border-bottom: 1px solid var(--border); }
.g-faq-q {
  font-size: 15px;
  font-weight: 600;
  color: #f0f3fb;
  margin-bottom: 8px;
  line-height: 1.4;
}
.g-faq-a {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}
.g-faq-a a { color: var(--teal); }

/* Related links sidebar */
.g-sidebar { padding-top: 4px; }
.g-related {
  position: sticky;
  top: 72px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.g-related-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.g-related ul { list-style: none; padding: 0; }
.g-related li { margin-bottom: 10px; }
.g-related a {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  transition: color 0.15s;
}
.g-related a:hover { color: var(--teal); }
.g-related a::before { content: "→ "; color: var(--teal); }

/* CTA block */
.g-cta {
  margin-top: 48px;
  background: var(--teal-dim);
  border: 1px solid var(--teal-mid);
  border-radius: 12px;
  padding: 28px 28px;
  text-align: center;
}
.g-cta h3 {
  font-size: 20px;
  font-weight: 700;
  color: #f0f3fb;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.g-cta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}
.g-cta-btn {
  display: inline-block;
  background: var(--teal);
  color: #0d0f14;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.g-cta-btn:hover { opacity: 0.88; }

/* Footer */
.g-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
}
.g-footer-inner {
  max-width: calc(var(--max-w) + 240px);
  margin: 0 auto;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  align-items: center;
}
.g-footer a {
  color: var(--muted);
  text-decoration: none;
}
.g-footer a:hover { color: var(--teal); }
.g-footer-sep { color: var(--border); }

/* Utility */
.g-tag {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--teal);
  white-space: nowrap;
}
.g-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 6px;
}
.g-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── Hub page callout (used in glossary sidebars) ── */
.g-hub-link {
  display: block;
  background: rgba(0, 217, 190, 0.07);
  border: 1px solid rgba(0, 217, 190, 0.22);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  text-decoration: none;
  color: #f0f3fb;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  transition: background 0.15s;
}
.g-hub-link:hover { background: rgba(0, 217, 190, 0.13); color: #f0f3fb; }
.g-hub-badge {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 5px;
}

/* ── FAQ accordion (details/summary) ── */
.g-faq-item details { }
.g-faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  font-weight: 600;
  color: #f0f3fb;
  line-height: 1.4;
  padding: 0;
  margin: 0;
  user-select: none;
}
.g-faq-item summary::-webkit-details-marker { display: none; }
.g-faq-item summary::marker { display: none; }
.g-faq-item summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 3px;
}
.g-faq-chevron {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--teal);
  margin-top: 2px;
  transition: transform 0.18s ease;
  display: inline-block;
}
.g-faq-item details[open] .g-faq-chevron {
  transform: rotate(180deg);
}
.g-faq-item details .g-faq-a { padding-top: 10px; margin-bottom: 0; }
