/* =============================================================
   Q&A Pro — Editorial design system
   Direction: Refined editorial, magazine-meets-modern.
   Mobile-first, RTL+LTR. Optimized for Core Web Vitals (LCP/INP/CLS).
   ============================================================= */

/* ---------- Reset & root ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(15px, 0.95vw + 0.5rem, 17px);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tokens ---------- */
:root {
  /* Editorial cream + deep terracotta palette */
  --bg:           #faf7f2;
  --bg-card:      #ffffff;
  --bg-subtle:    #f3eee5;
  --ink:          #1a1612;
  --ink-soft:     #4b443c;
  --ink-mute:     #837a6e;
  --rule:         #e6ddcd;
  --rule-soft:    #f0e9dc;
  --accent:       #b04020;
  --accent-deep:  #7d2c14;
  --accent-soft:  #f6e6d8;
  --success:      #0f7a4d;
  --warning:      #b87a0a;
  --danger:       #b8331c;
  --info:         #2a5d8f;

  /* Type — distinctive choices, not Inter */
  --font-display: "Playfair Display", "Amiri", Georgia, "Times New Roman", serif;
  --font-body:    "Source Sans 3", "Cairo", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Geometry */
  --radius:       6px;
  --radius-lg:    14px;
  --shadow-sm:    0 1px 2px rgba(26,22,18,.04);
  --shadow:       0 6px 24px rgba(26,22,18,.07), 0 1px 2px rgba(26,22,18,.04);

  /* Container */
  --max-w:        1160px;
  --gutter:       clamp(16px, 3vw, 32px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #14110d;
    --bg-card:      #1d1914;
    --bg-subtle:    #221d17;
    --ink:          #ede4d4;
    --ink-soft:     #c5bcab;
    --ink-mute:     #8a8170;
    --rule:         #2d2820;
    --rule-soft:    #1f1b15;
    --accent:       #e87248;
    --accent-deep:  #b04020;
    --accent-soft:  #2a201a;
  }
}

/* ---------- Arabic typography (load via Google Fonts in production) ---------- */
html[lang="ar"] body, .lang-ar { font-family: "Cairo", "Tajawal", "Segoe UI", system-ui, sans-serif; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
.lang-ar h1, .lang-ar h2, .lang-ar h3 {
  font-family: "Amiri", "Cairo", Georgia, serif;
  letter-spacing: 0;
}

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(28px, 4vw, 56px); }
.section--narrow { max-width: 760px; margin-inline: auto; }
.section__head { margin-bottom: clamp(20px, 2.5vw, 32px); }
.section__head--lg { padding-block: clamp(8px, 2vw, 16px); }
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw + 0.5rem, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.section__sub { color: var(--ink-soft); margin-top: 8px; max-width: 60ch; }
.section__meta { color: var(--ink-mute); font-size: 0.9em; margin-top: 6px; }
.section--two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 56px);
}
@media (min-width: 960px) {
  .section--two-col { grid-template-columns: minmax(0, 1fr) 320px; }
}
.center { text-align: center; }
.muted { color: var(--ink-mute); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-mute); background: var(--bg-subtle); border-radius: var(--radius); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,242,.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(20,17,13,.88); }
}
.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding-block: 14px;
}
.site-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.site-logo:hover { text-decoration: none; }
.site-logo__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.site-search { display: flex; max-width: 540px; }
.site-search input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--bg-card); color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
[dir="rtl"] .site-search input { padding-inline-end: 44px; }
[dir="ltr"] .site-search input { padding-inline-end: 44px; }
.site-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.site-search button {
  margin-inline-start: -38px; width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-soft); border-radius: 999px;
}
.site-search button:hover { color: var(--accent); }
.site-nav { display: inline-flex; align-items: center; gap: 12px; }
.lang-switch {
  padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink-soft); font-size: 0.85rem;
}
.lang-switch:hover { color: var(--ink); text-decoration: none; border-color: var(--accent); }
.menu-toggle { display: none; }

@media (max-width: 720px) {
  .site-header__inner { grid-template-columns: auto 1fr auto; }
  .site-search { display: none; }
  .menu-toggle { display: inline-flex; flex-direction: column; gap: 4px; padding: 8px; }
  .menu-toggle span { width: 20px; height: 2px; background: var(--ink); }
  .site-nav .btn { padding: 8px 14px; font-size: 0.85rem; }
  .lang-switch { padding: 6px 10px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 10px 18px; border-radius: var(--radius); font-weight: 600;
  border: 1px solid var(--rule); background: var(--bg-card); color: var(--ink);
  transition: transform .08s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; border-color: var(--ink-mute); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger:hover { background: #8a2616; border-color: #8a2616; color: #fff; }
.btn--block { display: flex; width: 100%; }
.btn--large { padding: 14px 28px; font-size: 1.05rem; }
.btn--small { padding: 5px 10px; font-size: 0.85rem; border-radius: 4px; }
.btn-link { background: transparent; border: 0; color: var(--ink-soft); text-decoration: underline; padding: 4px 8px; }
.btn-icon {
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card); transition: color .15s, border-color .15s;
}
.btn-icon:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 6vw, 96px) 0 clamp(36px, 4vw, 64px);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -20% -20% auto auto; width: 600px; height: 600px;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft) 0%, transparent 60%);
  z-index: 0; pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 720px; }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw + 0.5rem, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  text-wrap: balance;
}
.hero__sub { color: var(--ink-soft); font-size: clamp(1rem, 1.2vw + 0.5rem, 1.2rem); margin-bottom: 32px; max-width: 56ch; }
.hero__search { display: flex; gap: 8px; max-width: 520px; }
.hero__search input {
  flex: 1; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 4px;
  background: var(--bg-card); color: var(--ink); outline: none;
  font-size: 1.05rem;
}
.hero__search input:focus { border-color: var(--accent); }
.hero__search button {
  padding: 14px 24px; background: var(--ink); color: var(--bg);
  border: 0; border-radius: 4px; font-weight: 600;
  transition: background .15s;
}
.hero__search button:hover { background: var(--accent); }
.hero__search--inline { max-width: none; margin-bottom: 32px; }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
@media (min-width: 880px) {
  .feature-grid { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
  .feature-card--lead { grid-row: span 2; }
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--ink-mute); }
.feature-card__link { display: block; padding: clamp(20px, 2vw, 28px); color: var(--ink); height: 100%; }
.feature-card__link:hover { text-decoration: none; }
.feature-card__eyebrow {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.feature-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.4vw + 0.5rem, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feature-card--lead .feature-card__title { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.feature-card__excerpt { color: var(--ink-soft); margin-bottom: 16px; font-size: 0.95rem; }
.feature-card__meta { display: flex; gap: 8px; color: var(--ink-mute); font-size: 0.85rem; }

/* ---------- Question list ---------- */
.q-list { list-style: none; }
.q-list__item {
  padding: clamp(20px, 2vw, 28px) 0;
  border-bottom: 1px solid var(--rule-soft);
}
.q-list__item:first-child { padding-top: 0; }
.q-list__title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.3vw + 0.4rem, 1.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.q-list__title:hover { color: var(--accent); text-decoration: none; }
.q-list__excerpt { color: var(--ink-soft); margin-bottom: 12px; }
.q-list__meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 0.85rem; color: var(--ink-mute);
}

/* ---------- Chips / Pills ---------- */
.chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border: 1px solid var(--rule); border-radius: 999px;
  font-size: 0.8rem; color: var(--ink-soft);
  background: var(--bg-card);
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pill {
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--bg-subtle); color: var(--ink-soft);
}
.pill--pending  { background: #fef3d6; color: #95560f; }
.pill--approved { background: #d6ecdc; color: #0f5a37; }
.pill--rejected { background: #f7d6d1; color: #8c2515; }
.pill--spam     { background: #1a1612; color: #fbf3df; }
.pill--accepted { background: var(--accent-soft); color: var(--accent-deep); }
.pill--warn     { background: #fdecd3; color: #88550e; }
.pill--sent     { background: #d6ecdc; color: #0f5a37; }
.pill--failed   { background: #f7d6d1; color: #8c2515; }
.pill--queued   { background: var(--bg-subtle); color: var(--ink-mute); }

/* ---------- Side blocks ---------- */
.side { display: flex; flex-direction: column; gap: 24px; }
.side-block {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.side-block__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.005em;
  padding-bottom: 10px; border-bottom: 1px solid var(--rule-soft);
}
.side-list, .cat-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.side-list li, .cat-list li { padding: 4px 0; }
.side-list a, .cat-list a { color: var(--ink-soft); font-size: 0.95rem; }
.cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 8px; border-radius: 4px;
}
.cat-list a:hover { background: var(--bg-subtle); color: var(--ink); text-decoration: none; }

/* ---------- Question page ---------- */
.breadcrumbs { padding-top: 20px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; color: var(--ink-mute); }
.breadcrumbs a { color: var(--ink-soft); }
.q-page { padding-block: clamp(20px, 3vw, 40px); max-width: 820px; }
.q-header { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 2px solid var(--ink); }
.q-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw + 0.5rem, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin-bottom: 12px;
}
.q-meta { font-size: 0.9rem; color: var(--ink-mute); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.q-meta__author strong { color: var(--ink-soft); font-weight: 600; }
.q-meta__sep { opacity: .5; }

/* The "short answer" box — designed to look like a Featured Snippet target */
.q-short-answer {
  background: var(--accent-soft);
  border-inline-start: 4px solid var(--accent);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 32px;
}
[dir="rtl"] .q-short-answer { border-radius: var(--radius) 0 0 var(--radius); }
.q-short-answer__label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 8px;
}
.q-short-answer__text {
  font-family: var(--font-display);
  font-size: 1.1rem; line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
}
.q-body {
  font-size: 1.05rem; line-height: 1.75;
  color: var(--ink);
}
.q-body p { margin-bottom: 18px; }
.q-body h2, .q-body h3, .q-body h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 28px 0 10px;
  letter-spacing: -0.005em;
}
.q-body h2 { font-size: 1.5rem; }
.q-body h3 { font-size: 1.25rem; }
.q-body ul, .q-body ol { padding-inline-start: 1.4em; margin-bottom: 18px; }
.q-body li { margin-bottom: 6px; }
.q-body blockquote {
  border-inline-start: 3px solid var(--accent);
  padding: 8px 16px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 20px 0;
}
.q-body code {
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  padding: 2px 6px; border-radius: 4px;
  font-size: 0.92em;
}
.q-body pre {
  background: var(--bg-subtle);
  padding: 16px; border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 18px;
}
.q-body pre code { background: transparent; padding: 0; }
.q-body img { border-radius: var(--radius); margin: 18px 0; }
.q-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.q-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tag {
  background: var(--bg-subtle); color: var(--ink-soft);
  padding: 4px 12px; border-radius: 4px; font-size: 0.85rem;
}
.tag:hover { background: var(--accent-soft); color: var(--accent-deep); text-decoration: none; }

/* ---------- Q actions: vote + share ---------- */
.q-actions {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 16px 0; border-block: 1px solid var(--rule);
  margin: 24px 0;
}
.vote-group { display: inline-flex; gap: 6px; }
.vote {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--bg-card);
  color: var(--ink-soft); font-weight: 600; font-size: 0.9rem;
  transition: all .15s;
}
.vote:hover { border-color: var(--accent); color: var(--accent); }
.vote--up.is-active { background: #e8f4ed; color: var(--success); border-color: var(--success); }
.vote--down.is-active { background: #fae5e2; color: var(--danger); border-color: var(--danger); }
.share-group { display: inline-flex; gap: 6px; }

/* ---------- Answers ---------- */
.answers { margin-top: 40px; }
.answers__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.5vw + 0.5rem, 1.6rem);
  font-weight: 700;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 24px;
}
.answer {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2vw, 28px);
  margin-bottom: 20px;
}
.answer.accepted-answer {
  border: 2px solid var(--success);
  background: linear-gradient(to bottom right, rgba(15,122,77,0.03), transparent);
}
.answer__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--success); color: #fff;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.answer__body { color: var(--ink); font-size: 1rem; line-height: 1.7; }
.answer__body p { margin-bottom: 14px; }
.answer__body p:last-child { margin-bottom: 0; }
.answer__foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.85rem; color: var(--ink-mute);
}
.answer__author strong { color: var(--ink-soft); margin-inline-end: 8px; }
.answer-empty {
  background: var(--bg-subtle); border-radius: var(--radius-lg);
  padding: 28px; text-align: center; color: var(--ink-mute);
  margin-bottom: 24px;
}
.answer-form {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2vw, 28px);
  margin-top: 32px;
}
.answer-form__title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  margin-bottom: 16px;
}

/* ---------- People Also Ask ---------- */
.paa {
  margin-top: 48px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2vw, 28px);
}
.paa__title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.4vw + 0.4rem, 1.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.005em;
}
.paa__list { list-style: none; }
.paa__item { border-bottom: 1px solid var(--rule-soft); }
.paa__item:last-child { border-bottom: 0; }
.paa__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; color: var(--ink); gap: 12px;
  transition: color .15s, padding-inline-start .15s;
}
.paa__link:hover { color: var(--accent); text-decoration: none; padding-inline-start: 6px; }
.paa__q { flex: 1; font-weight: 500; }
[dir="rtl"] .paa__link svg { transform: scaleX(-1); }

/* ---------- Forms (public) ---------- */
.ask-form, .answer-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.field input,
.field select,
.field textarea {
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 580px) { .field-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---------- Thanks card ---------- */
.thanks-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.thanks-card h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; margin-top: 32px; justify-content: center; }
.pagination a {
  padding: 8px 14px; border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--ink-soft); background: var(--bg-card);
  min-width: 40px; text-align: center;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination a.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--rule);
  margin-top: 80px;
}
.site-footer__inner {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  padding: clamp(28px, 4vw, 48px) var(--gutter);
}
@media (min-width: 720px) {
  .site-footer__inner { grid-template-columns: 1.5fr 2fr 1fr; align-items: start; }
}
.site-footer__brand strong {
  font-family: var(--font-display);
  font-size: 1.2rem; display: block; margin-bottom: 4px;
}
.site-footer__brand p { color: var(--ink-mute); font-size: 0.92rem; max-width: 36ch; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer__links a { color: var(--ink-soft); font-size: 0.9rem; }
.site-footer__social { display: flex; gap: 8px; }
.site-footer__social a {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--rule);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-weight: 700;
}
.site-footer__social a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.site-footer__bar {
  border-top: 1px solid var(--rule);
  padding: 14px 0;
  color: var(--ink-mute); font-size: 0.85rem;
}

/* ---------- Cookie consent ---------- */
.cookie-consent {
  position: fixed; bottom: 16px; inset-inline: 16px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px; z-index: 100;
}
.cookie-consent__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; max-width: var(--max-w); margin: 0 auto;
}
.cookie-consent p { color: var(--ink-soft); font-size: 0.92rem; }
@media (max-width: 640px) {
  .cookie-consent__inner { flex-direction: column; }
}

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.alert--success { background: #d6ecdc; color: #0f5a37; border: 1px solid #b1d9c0; }
.alert--error   { background: #fae5e2; color: #8c2515; border: 1px solid #f0bcb3; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .q-actions, .answer-form, .paa, .cookie-consent { display: none !important; }
  body { background: #fff; color: #000; }
  .q-page { max-width: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =============================================================
   Comments
   ============================================================= */
.comments { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--rule); }
.comments__title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.4vw + 0.4rem, 1.5rem);
  font-weight: 700;
  margin-bottom: 20px;
}
.comments__count { color: var(--ink-mute); font-weight: 400; margin-inline-start: 8px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 24px; }
.comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.comment:last-child { border-bottom: 0; }
.comment__head {
  display: flex; gap: 8px; align-items: center;
  font-size: 0.85rem; color: var(--ink-mute);
  margin-bottom: 6px;
}
.comment__author { color: var(--ink-soft); font-weight: 600; }
.comment__body { color: var(--ink); line-height: 1.6; font-size: 0.95rem; }
.comment-form { background: var(--bg-card); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 20px; }
.comment-form__title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: 12px;
}

/* =============================================================
   Trust badges (answers)
   ============================================================= */
.answer__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.answer__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.04em;
}
.answer__badge--accepted { background: var(--success); color: #fff; }
.answer__badge--expert {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}
.answer__badge--verified {
  background: linear-gradient(135deg, #2a5d8f, #1e4368);
  color: #fff;
}
.answer.is-expert { border-color: #f59e0b; box-shadow: 0 0 0 1px #f59e0b inset; }
.answer.is-verified:not(.is-expert) { border-color: #2a5d8f; }

/* =============================================================
   Featured image
   ============================================================= */
.q-featured-image { margin: 24px 0; }
.q-featured-image img { width: 100%; border-radius: var(--radius-lg); display: block; }
.q-featured-image figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--ink-mute);
  text-align: center;
  font-style: italic;
}

/* =============================================================
   Auto-link styling — subtle, doesn't look like normal links
   ============================================================= */
.q-body .auto-link, .answer__body .auto-link {
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  color: inherit;
}
.q-body .auto-link:hover, .answer__body .auto-link:hover {
  color: var(--accent);
  border-bottom-style: solid;
}

/* =============================================================
   Author profile
   ============================================================= */
.author-card { display: flex; gap: 24px; align-items: flex-start; padding: 24px; background: var(--bg-card); border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.author-card__avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-card__avatar--placeholder { background: var(--accent); color: #fff; font-size: 3rem; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); }
.author-card__name { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.author-card__expertise { color: var(--accent-deep); font-weight: 600; margin-bottom: 8px; }
.author-card__bio { color: var(--ink-soft); margin-bottom: 12px; max-width: 56ch; }
.author-card__social { display: flex; gap: 8px; }
.author-card__social a { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-subtle); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.author-card__social a:hover { background: var(--accent-soft); color: var(--accent-deep); text-decoration: none; }
@media (max-width: 600px) {
  .author-card { flex-direction: column; align-items: center; text-align: center; }
}

/* =============================================================
   Static pages
   ============================================================= */
.page-article__head { padding-bottom: 24px; margin-bottom: 32px; border-bottom: 2px solid var(--ink); }
.page-article__body { font-size: 1.05rem; line-height: 1.75; color: var(--ink); }
.page-article__body p { margin-bottom: 18px; }
.page-article__body h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 28px 0 12px; font-weight: 700; }
.page-article__body h3 { font-family: var(--font-display); font-size: 1.2rem; margin: 24px 0 10px; font-weight: 700; }
.page-article__body ul, .page-article__body ol { padding-inline-start: 1.4em; margin-bottom: 18px; }
.page-article__body li { margin-bottom: 6px; }
