/*
 * Rahmanieh / Shahr-e Ghanoon — Design System
 * ------------------------------------------------------------
 * Single source of truth for the WordPress theme (assets/css/main.css)
 * and the live preview application. Pure CSS custom properties, RTL-first,
 * light & dark themes, zero framework dependency.
 * ------------------------------------------------------------
 */

/* ========== 1. Tokens ========== */
:root {
  /* Brand palette — all overridable from Theme Settings */
  --rh-primary: #0f1319;
  --rh-secondary: #1b222c;
  --rh-accent: #c8a45c;
  --rh-accent-soft: #e3caa0;
  --rh-bg: #f5f4f0;
  --rh-surface: #ffffff;
  --rh-surface-2: #faf9f6;
  --rh-text: #262b33;
  --rh-muted: #6d7580;
  --rh-heading: #12161c;
  --rh-link: #8a6d2f;
  --rh-border: #e4e1d9;
  --rh-dark-bg: #0f1319;
  --rh-dark-surface: #161c25;
  --rh-dark-text: #dfe3e8;
  --rh-dark-muted: #9aa3ae;

  /* Typography */
  --rh-font-fa: "Vazirmatn", "IRANSans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rh-font-en: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rh-fs-base: 16px;
  --rh-fs-h1: 2.65rem;
  --rh-fs-h2: 1.6rem;
  --rh-fs-h3: 1.25rem;
  --rh-fs-h4: 1.05rem;
  --rh-lh: 1.9;
  --rh-ls: 0;
  --rh-fw-heading: 800;

  /* Layout */
  --rh-container: 1240px;
  --rh-radius: 14px;
  --rh-radius-sm: 9px;
  --rh-radius-pill: 999px;
  --rh-space: 1rem;
  --rh-section-y: 3.5rem;
  --rh-header-h: 72px;

  /* Elevation */
  --rh-shadow-sm: 0 1px 2px rgba(18, 22, 28, 0.05);
  --rh-shadow: 0 6px 24px -14px rgba(18, 22, 28, 0.35);
  --rh-shadow-lg: 0 24px 60px -28px rgba(18, 22, 28, 0.45);
  --rh-ring: 0 0 0 3px rgba(200, 164, 92, 0.45);
  --rh-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --rh-bg: #0b0e13;
  --rh-surface: #141a22;
  --rh-surface-2: #10151c;
  --rh-text: #dce1e7;
  --rh-muted: #939daa;
  --rh-heading: #f3f5f7;
  --rh-link: #d9b878;
  --rh-border: #232b36;
  --rh-primary: #f3f5f7;
  --rh-shadow: 0 6px 24px -14px rgba(0, 0, 0, 0.8);
  --rh-shadow-lg: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
}

/* ========== 2. Reset & base ========== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body.rh-body {
  margin: 0;
  background: var(--rh-bg);
  color: var(--rh-text);
  font-family: var(--rh-font-fa);
  font-size: var(--rh-fs-base);
  line-height: var(--rh-lh);
  letter-spacing: var(--rh-ls);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  color: var(--rh-heading);
  font-weight: var(--rh-fw-heading);
  line-height: 1.45;
}
h1 { font-size: var(--rh-fs-h1); }
h2 { font-size: var(--rh-fs-h2); }
h3 { font-size: var(--rh-fs-h3); }
h4 { font-size: var(--rh-fs-h4); }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-inline-start: 1.4em; }

:focus-visible {
  outline: 2px solid var(--rh-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.rh-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.rh-skip-link {
  position: absolute; inset-inline-start: 1rem; top: -60px;
  z-index: 999; background: var(--rh-accent); color: #10141a;
  padding: 0.6rem 1rem; border-radius: var(--rh-radius-sm); font-weight: 700;
  transition: top 0.2s var(--rh-ease);
}
.rh-skip-link:focus { top: 1rem; }

.rh-container {
  width: min(100% - 2rem, var(--rh-container));
  margin-inline: auto;
}

/* ========== 3. Buttons, badges, chips ========== */
.rh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.68rem 1.2rem;
  border-radius: var(--rh-radius-sm);
  border: 1px solid transparent;
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  transition: transform 0.18s var(--rh-ease), background-color 0.18s var(--rh-ease),
    color 0.18s var(--rh-ease), border-color 0.18s var(--rh-ease), box-shadow 0.18s var(--rh-ease);
  white-space: nowrap;
}
.rh-btn:hover { transform: translateY(-1px); }
.rh-btn:active { transform: translateY(0); }
.rh-btn--gold { background: var(--rh-accent); color: #14181e; }
.rh-btn--gold:hover { background: var(--rh-accent-soft); }
.rh-btn--dark { background: #121821; color: #f2f4f6; }
.rh-btn--dark:hover { background: #1d2733; }
.rh-btn--outline { border-color: var(--rh-border); background: var(--rh-surface); color: var(--rh-text); }
.rh-btn--outline:hover { border-color: var(--rh-accent); color: var(--rh-link); }
.rh-btn--ghost { border-color: rgba(255, 255, 255, 0.35); color: #fff; background: transparent; }
.rh-btn--ghost:hover { border-color: var(--rh-accent); color: var(--rh-accent); }
.rh-btn--gold-outline { border-color: var(--rh-accent); color: var(--rh-accent); background: transparent; }
.rh-btn--gold-outline:hover { background: var(--rh-accent); color: #14181e; }
.rh-btn--sm { padding: 0.45rem 0.85rem; font-size: 0.8rem; }
.rh-btn--block { width: 100%; }

.rh-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.62rem; border-radius: var(--rh-radius-sm);
  background: var(--rh-accent-soft); color: #4a3a17;
  font-size: 0.72rem; font-weight: 700;
}
.rh-badge--soft { background: rgba(200, 164, 92, 0.16); color: var(--rh-link); }
.rh-badge--dark { background: rgba(255, 255, 255, 0.1); color: #f0e6d2; }
.rh-badge--premium { background: linear-gradient(135deg, #c8a45c, #a5813c); color: #241a06; display: inline-flex; align-items: center; gap: 0.25rem; }
.rh-badge--free { background: rgba(31, 125, 77, 0.15); color: #1f7d4d; }
[data-theme="dark"] .rh-badge--free { background: rgba(46, 169, 106, 0.2); color: #7fe0ab; }
.rh-card__tags { position: absolute; inset-block-end: 0.6rem; inset-inline-start: 0.6rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.rh-card__tags .rh-badge { position: static; }
.rh-buybox__price { font-size: 1.4rem; font-weight: 800; color: var(--rh-heading); }

.rh-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.28rem 0.7rem; border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius-pill); font-size: 0.76rem; color: var(--rh-muted);
  background: var(--rh-surface);
}

/* ========== 4. Header ========== */
.rh-header {
  background: var(--rh-dark-bg);
  color: #eef1f4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.rh-header--sticky { position: sticky; top: 0; z-index: 90; }
.rh-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--rh-header-h);
}
.rh-brand { display: flex; align-items: center; gap: 0.7rem; }
.rh-brand__mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.25), rgba(200, 164, 92, 0.08));
  border: 1px solid rgba(200, 164, 92, 0.45);
  color: var(--rh-accent);
}
.rh-brand__mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.rh-brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.rh-brand__name { font-size: 1.12rem; font-weight: 800; color: #fff; }
.rh-brand__tag { font-size: 0.68rem; color: var(--rh-accent-soft); opacity: 0.85; }

.rh-nav { display: none; }
@media (min-width: 1100px) { .rh-nav { display: block; } }
.rh-menu { display: flex; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.rh-menu li { position: relative; }
.rh-menu a {
  display: block; padding: 0.5rem 0.68rem; border-radius: var(--rh-radius-sm);
  font-size: 0.85rem; font-weight: 600; color: #d7dce2;
  transition: color 0.16s var(--rh-ease), background-color 0.16s var(--rh-ease);
}
.rh-menu a:hover, .rh-menu .current-menu-item > a, .rh-menu .is-active > a {
  color: var(--rh-accent); background: rgba(255, 255, 255, 0.05);
}
.rh-menu .sub-menu {
  position: absolute; inset-inline-start: 0; top: calc(100% + 8px);
  min-width: 210px; padding: 0.4rem; margin: 0; list-style: none;
  background: var(--rh-dark-surface); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--rh-radius); box-shadow: var(--rh-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all 0.18s var(--rh-ease); z-index: 30;
}
.rh-menu li:hover > .sub-menu,
.rh-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.rh-actions { display: flex; align-items: center; gap: 0.5rem; }
.rh-icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04); color: #e7eaee; cursor: pointer;
  transition: all 0.16s var(--rh-ease);
}
.rh-icon-btn:hover { border-color: var(--rh-accent); color: var(--rh-accent); }

.rh-switch {
  position: relative; width: 58px; height: 30px; flex: none;
  border-radius: var(--rh-radius-pill); cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.08);
  display: inline-flex; align-items: center; padding: 3px;
}
.rh-switch__dot {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  transition: transform 0.22s var(--rh-ease);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .rh-switch__dot { transform: translateX(-26px); }
[dir="ltr"][data-theme="dark"] .rh-switch__dot,
[dir="ltr"] [data-theme="dark"] .rh-switch__dot { transform: translateX(26px); }
[data-theme="dark"] .rh-switch { background: rgba(200, 164, 92, 0.25); border-color: rgba(200, 164, 92, 0.5); }

.rh-burger { display: grid; }
@media (min-width: 1100px) { .rh-burger { display: none; } }

/* Mobile drawer */
.rh-drawer {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(8, 11, 15, 0.65); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity 0.2s var(--rh-ease);
}
.rh-drawer.is-open { opacity: 1; visibility: visible; }
.rh-drawer__panel {
  position: absolute; inset-block: 0; inset-inline-end: 0;
  width: min(86vw, 340px); background: var(--rh-dark-bg); color: #e9edf1;
  padding: 1.2rem; overflow-y: auto;
  transform: translateX(100%); transition: transform 0.25s var(--rh-ease);
  border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
}
[dir="ltr"] .rh-drawer__panel { transform: translateX(-100%); }
.rh-drawer.is-open .rh-drawer__panel { transform: translateX(0); }
.rh-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.rh-drawer__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.rh-drawer__menu a {
  display: block; padding: 0.7rem 0.6rem; border-radius: var(--rh-radius-sm);
  font-weight: 600; font-size: 0.95rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.rh-drawer__menu a:hover { background: rgba(255, 255, 255, 0.06); color: var(--rh-accent); }
.rh-drawer__menu .sub-menu { list-style: none; padding-inline-start: 0.8rem; margin: 0; }

/* Search overlay */
.rh-search-modal {
  position: fixed; inset: 0; z-index: 130; display: grid; align-items: start;
  justify-items: center; padding-top: 12vh;
  background: rgba(8, 11, 15, 0.7); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity 0.2s var(--rh-ease);
}
.rh-search-modal.is-open { opacity: 1; visibility: visible; }
.rh-search-modal__box {
  width: min(92vw, 680px); background: var(--rh-surface); color: var(--rh-text);
  border-radius: var(--rh-radius); box-shadow: var(--rh-shadow-lg); padding: 1.1rem;
  border: 1px solid var(--rh-border);
}
.rh-search-results { margin-top: 0.8rem; max-height: 52vh; overflow-y: auto; display: grid; gap: 0.35rem; }
.rh-search-results a {
  display: flex; justify-content: space-between; gap: 0.6rem; align-items: center;
  padding: 0.6rem 0.7rem; border-radius: var(--rh-radius-sm); border: 1px solid transparent;
}
.rh-search-results a:hover { background: var(--rh-surface-2); border-color: var(--rh-border); }
.rh-search-results .rh-res__type { font-size: 0.7rem; color: var(--rh-muted); flex: none; }

/* ========== 5. Forms ========== */
.rh-field {
  width: 100%; padding: 0.72rem 0.9rem;
  border: 1px solid var(--rh-border); border-radius: var(--rh-radius-sm);
  background: var(--rh-surface); color: var(--rh-text); font: inherit; font-size: 0.9rem;
  transition: border-color 0.16s var(--rh-ease), box-shadow 0.16s var(--rh-ease);
}
.rh-field:focus { outline: none; border-color: var(--rh-accent); box-shadow: var(--rh-ring); }
.rh-field::placeholder { color: var(--rh-muted); }
textarea.rh-field { min-height: 150px; resize: vertical; line-height: 1.8; }
.rh-label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 0.35rem; color: var(--rh-heading); }
.rh-form-row { margin-bottom: 0.9rem; }
.rh-form-note { font-size: 0.78rem; color: var(--rh-muted); }
.rh-alert {
  padding: 0.7rem 0.9rem; border-radius: var(--rh-radius-sm); font-size: 0.85rem;
  border: 1px solid var(--rh-border); background: var(--rh-surface-2);
}
.rh-alert--ok { border-color: #bcd9c2; background: #eef7f0; color: #205c33; }
.rh-alert--err { border-color: #e6c4c4; background: #fbeeee; color: #8c2f2f; }

/* ========== 6. Sections ========== */
.rh-section { padding-block: var(--rh-section-y); }
.rh-section--tight { padding-block: calc(var(--rh-section-y) * 0.65); }
.rh-section--surface { background: var(--rh-surface); }
.rh-section--dark {
  background: var(--rh-dark-bg);
  --rh-text: var(--rh-dark-text);
  --rh-heading: #ffffff;
  --rh-muted: var(--rh-dark-muted);
  --rh-surface: #161c25;
  --rh-surface-2: #12171f;
  --rh-border: rgba(255, 255, 255, 0.1);
  color: var(--rh-dark-text);
}
.rh-section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap;
}
.rh-section__title { margin: 0 0 0.2rem; font-size: var(--rh-fs-h2); }
.rh-section__sub { margin: 0; color: var(--rh-muted); font-size: 0.85rem; }
.rh-section__link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 700; color: var(--rh-text);
  border: 1px solid var(--rh-border); background: var(--rh-surface);
  padding: 0.45rem 0.85rem; border-radius: var(--rh-radius-sm);
  transition: all 0.16s var(--rh-ease);
}
.rh-section__link:hover { border-color: var(--rh-accent); color: var(--rh-link); }

/* ========== 7. Hero ========== */
.rh-hero { position: relative; isolation: isolate; overflow: hidden; }
.rh-hero__media { position: absolute; inset: 0; z-index: -2; }
.rh-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.rh-hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(270deg, rgba(10, 13, 18, 0.95) 8%, rgba(10, 13, 18, 0.78) 45%, rgba(10, 13, 18, 0.35) 100%);
}
[dir="ltr"] .rh-hero__overlay {
  background: linear-gradient(90deg, rgba(10, 13, 18, 0.95) 8%, rgba(10, 13, 18, 0.78) 45%, rgba(10, 13, 18, 0.35) 100%);
}
.rh-hero__inner {
  min-height: var(--rh-hero-h, 520px);
  display: flex; align-items: center;
  padding-block: 3.2rem;
}
.rh-hero__content { max-width: 620px; color: #f4f6f8; }
.rh-hero--center .rh-hero__inner { justify-content: center; text-align: center; }
.rh-hero--center .rh-hero__content { margin-inline: auto; }
.rh-hero--center .rh-hero__subtitle { border: 0; padding-inline: 0; }
.rh-hero--center .rh-hero__actions,
.rh-hero--center .rh-social { justify-content: center; }
.rh-hero__eyebrow {
  display: inline-block; margin-bottom: 0.5rem;
  font-size: 0.85rem; color: var(--rh-accent-soft); font-weight: 600;
}
.rh-hero__title {
  margin: 0 0 0.6rem; font-size: clamp(2.2rem, 5.6vw, 3.6rem);
  color: #fff; letter-spacing: -0.01em; line-height: 1.2;
}
.rh-hero__subtitle {
  margin: 0 0 1rem; font-size: clamp(0.98rem, 2.1vw, 1.15rem);
  font-weight: 700; color: var(--rh-accent-soft);
  border-inline-start: 3px solid var(--rh-accent);
  padding-inline-start: 0.8rem;
}
.rh-hero__desc {
  margin: 0 0 1.6rem; max-width: 46ch;
  color: #c9d0d8; font-size: 0.96rem; line-height: 2.1;
}
.rh-hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.6rem; }
.rh-social { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.rh-social__link {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22); color: #e8ebef;
  background: rgba(255, 255, 255, 0.05); transition: all 0.18s var(--rh-ease);
}
.rh-social__link:hover { background: var(--rh-accent); color: #14181e; border-color: var(--rh-accent); transform: translateY(-2px); }

/* ========== 8. Category cards ========== */
.rh-cats {
  display: grid; gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .rh-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .rh-cats { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.rh-cat-card {
  display: grid; gap: 0.5rem; justify-items: center; text-align: center;
  padding: 1.1rem 0.6rem; background: var(--rh-surface);
  border: 1px solid var(--rh-border); border-radius: var(--rh-radius);
  transition: all 0.2s var(--rh-ease);
}
.rh-cat-card:hover { border-color: var(--rh-accent); transform: translateY(-3px); box-shadow: var(--rh-shadow); }
.rh-cat-card__icon { color: var(--rh-accent); }
.rh-cat-card__title { font-size: 0.82rem; font-weight: 700; color: var(--rh-heading); }
.rh-cat-card__count { font-size: 0.7rem; color: var(--rh-muted); }

/* ========== 9. Cards & grids ========== */
.rh-grid { display: grid; gap: 1rem; }
.rh-grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.rh-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.rh-grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.rh-split { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .rh-split { grid-template-columns: minmax(0, 1fr) 360px; } }

.rh-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); transition: all 0.2s var(--rh-ease);
  height: 100%;
}
.rh-card:hover { transform: translateY(-3px); box-shadow: var(--rh-shadow); border-color: rgba(200, 164, 92, 0.6); }
.rh-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--rh-surface-2); }
.rh-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--rh-ease); }
.rh-card:hover .rh-card__media img { transform: scale(1.04); }
.rh-card__media .rh-badge { position: absolute; inset-block-end: 0.6rem; inset-inline-start: 0.6rem; }
.rh-card__body { padding: 0.95rem 1rem 1.05rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.rh-card__title { margin: 0; font-size: 0.98rem; line-height: 1.7; font-weight: 700; color: var(--rh-heading); }
.rh-card__title a:hover { color: var(--rh-link); }
.rh-card__excerpt { margin: 0; font-size: 0.82rem; color: var(--rh-muted); line-height: 1.95; }
.rh-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.72rem; color: var(--rh-muted); margin-top: auto; }
.rh-meta span { display: inline-flex; align-items: center; gap: 0.28rem; }

/* Lecture card */
.rh-lecture-card .rh-card__body { gap: 0.4rem; }
.rh-lecture-card .rh-lines { display: grid; gap: 0.18rem; font-size: 0.76rem; color: var(--rh-muted); }
.rh-specs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  padding-block: 0.55rem; margin-block: 0.15rem;
  border-block: 1px dashed var(--rh-border); font-size: 0.7rem; color: var(--rh-muted);
}
.rh-specs span { display: inline-flex; align-items: center; gap: 0.25rem; }
.rh-card__actions { display: flex; gap: 0.5rem; margin-top: 0.3rem; }
.rh-card__actions .rh-btn { flex: 1; }

/* Mini list (featured articles / resources) */
.rh-list-card {
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); padding: 0.9rem;
}
.rh-mini { display: flex; gap: 0.7rem; align-items: center; padding: 0.55rem; border-radius: var(--rh-radius-sm); transition: background 0.16s var(--rh-ease); }
.rh-mini:hover { background: var(--rh-surface-2); }
.rh-mini + .rh-mini { border-top: 1px solid var(--rh-border); }
.rh-mini__thumb {
  width: 64px; height: 56px; flex: none; border-radius: var(--rh-radius-sm);
  overflow: hidden; background: var(--rh-surface-2);
}
.rh-mini__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rh-mini__body { min-width: 0; display: grid; gap: 0.25rem; }
.rh-mini__title {
  font-size: 0.86rem; font-weight: 700; color: var(--rh-heading); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rh-mini__meta { font-size: 0.7rem; color: var(--rh-muted); display: flex; gap: 0.6rem; }

/* Resource rows */
.rh-res-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.62rem 0.35rem; border-bottom: 1px dashed var(--rh-border); font-size: 0.85rem;
}
.rh-res-row:last-child { border-bottom: 0; }
.rh-res-row__label { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.rh-res-row__label svg { color: var(--rh-accent); flex: none; }
.rh-res-row__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-res-row:hover .rh-res-row__text { color: var(--rh-link); }

/* ========== 10. About band ========== */
.rh-about { display: grid; gap: 1.6rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .rh-about { grid-template-columns: 300px minmax(0, 1fr) 1fr; } }
.rh-about__facts { display: grid; gap: 0.9rem; align-content: start; }
.rh-fact { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.85rem; }
.rh-fact svg { color: var(--rh-accent); flex: none; margin-top: 0.25rem; }
.rh-fact__label { color: var(--rh-muted); font-size: 0.78rem; }
.rh-fact__value { color: var(--rh-heading); font-weight: 600; }
.rh-about__media img { border-radius: var(--rh-radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.rh-about__text p { color: var(--rh-text); font-size: 0.9rem; line-height: 2.1; }

/* ========== 11. Quote / newsletter / stats ========== */
.rh-quote {
  background: var(--rh-dark-bg); color: #eef1f4; border-radius: var(--rh-radius);
  padding: 2rem 1.4rem; text-align: center; display: grid; gap: 0.6rem; place-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08); height: 100%;
}
.rh-quote__mark { color: var(--rh-accent); font-size: 1.6rem; line-height: 1; }
.rh-quote__text { font-size: 1.02rem; font-weight: 700; color: #fff; margin: 0; }
.rh-quote__by { font-size: 0.78rem; color: var(--rh-accent-soft); }

.rh-newsletter {
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); padding: 1.3rem; height: 100%;
}
.rh-newsletter h3 { margin-bottom: 0.4rem; }
.rh-newsletter p { font-size: 0.82rem; color: var(--rh-muted); }
.rh-newsletter form { display: grid; gap: 0.6rem; }

.rh-stats { display: grid; gap: 0.9rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .rh-stats { grid-template-columns: repeat(4, 1fr); } }
.rh-stat {
  text-align: center; padding: 1.15rem 0.7rem; border-radius: var(--rh-radius);
  background: var(--rh-surface); border: 1px solid var(--rh-border);
}
.rh-stat__num { font-size: 1.7rem; font-weight: 800; color: var(--rh-accent); line-height: 1.2; }
.rh-stat__label { font-size: 0.78rem; color: var(--rh-muted); }

.rh-disclaimer {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.85rem 1rem; border-radius: var(--rh-radius);
  background: rgba(200, 164, 92, 0.1); border: 1px solid rgba(200, 164, 92, 0.35);
  font-size: 0.8rem; color: var(--rh-text); line-height: 1.95;
}
.rh-disclaimer svg { color: var(--rh-accent); flex: none; margin-top: 0.2rem; }

/* ========== 12. Footer ========== */
.rh-footer { background: var(--rh-dark-bg); color: var(--rh-dark-text); padding-top: 2.6rem; }
.rh-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.9rem; }
.rh-footer__grid {
  display: grid; gap: 1.6rem; grid-template-columns: 1fr;
  padding-bottom: 2rem;
}
@media (min-width: 700px) { .rh-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .rh-footer__grid { grid-template-columns: 1.2fr 1fr 1fr 1.4fr; } }
.rh-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.83rem; }
.rh-footer__links a { color: var(--rh-dark-muted); transition: color 0.16s var(--rh-ease); }
.rh-footer__links a:hover { color: var(--rh-accent); }
.rh-footer__about p { font-size: 0.8rem; color: var(--rh-dark-muted); line-height: 2; }
.rh-footer__contact { display: grid; gap: 0.7rem; font-size: 0.83rem; color: var(--rh-dark-muted); }
.rh-footer__contact span { display: flex; gap: 0.5rem; align-items: center; }
.rh-footer__contact svg { color: var(--rh-accent); flex: none; }
.rh-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 1rem; display: flex; flex-wrap: wrap; gap: 0.7rem;
  align-items: center; justify-content: space-between;
  font-size: 0.75rem; color: var(--rh-dark-muted);
}
.rh-footer__bottom a:hover { color: var(--rh-accent); }
.rh-footer__legal { display: flex; gap: 1rem; }

/* ========== 13. Breadcrumbs, pagination, archive ========== */
.rh-breadcrumbs {
  font-size: 0.76rem; color: var(--rh-muted); padding-block: 0.9rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
}
.rh-breadcrumbs a:hover { color: var(--rh-link); }
.rh-breadcrumbs .sep { opacity: 0.5; }

.rh-page-hero {
  background: var(--rh-dark-bg); color: #fff; padding-block: 2.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.rh-page-hero h1 { color: #fff; margin-bottom: 0.4rem; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.rh-page-hero p { color: var(--rh-dark-muted); margin: 0; font-size: 0.88rem; }

.rh-filters {
  display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding: 0.9rem; background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); margin-bottom: 1.4rem;
}
.rh-filters select.rh-field { appearance: none; background-image: none; }

.rh-pagination { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }
.rh-pagination .page-numbers {
  min-width: 38px; height: 38px; display: inline-grid; place-items: center; padding-inline: 0.5rem;
  border: 1px solid var(--rh-border); border-radius: var(--rh-radius-sm);
  background: var(--rh-surface); font-size: 0.83rem; font-weight: 700;
}
.rh-pagination .page-numbers.current,
.rh-pagination .page-numbers:hover { background: var(--rh-accent); color: #14181e; border-color: var(--rh-accent); }

/* ========== 14. Single post ========== */
.rh-single { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .rh-single--sidebar { grid-template-columns: minmax(0, 1fr) 320px; } }
.rh-entry__header { margin-bottom: 1.2rem; }
.rh-entry__title { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 0.7rem; }
.rh-entry__meta { display: flex; flex-wrap: wrap; gap: 0.9rem; font-size: 0.78rem; color: var(--rh-muted); }
.rh-entry__thumb img { width: 100%; border-radius: var(--rh-radius); margin-bottom: 1.3rem; }
.rh-prose { font-size: 1rem; line-height: 2.15; color: var(--rh-text); }
.rh-prose > * { max-width: 72ch; }
.rh-prose h2 { margin-top: 2rem; font-size: 1.35rem; }
.rh-prose h3 { margin-top: 1.6rem; font-size: 1.12rem; }
.rh-prose a { color: var(--rh-link); text-decoration: underline; text-underline-offset: 3px; }
.rh-prose img, .rh-prose figure { max-width: 100%; border-radius: var(--rh-radius); }
.rh-prose blockquote {
  margin: 1.6rem 0; padding: 0.9rem 1.1rem; border-inline-start: 3px solid var(--rh-accent);
  background: var(--rh-surface-2); border-radius: var(--rh-radius-sm); color: var(--rh-heading);
}
.rh-prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rh-prose th, .rh-prose td { border: 1px solid var(--rh-border); padding: 0.55rem 0.7rem; }
.rh-prose code { background: var(--rh-surface-2); padding: 0.1em 0.4em; border-radius: 5px; font-size: 0.9em; }

.rh-toc {
  background: var(--rh-surface-2); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); padding: 1rem 1.1rem; margin-bottom: 1.6rem;
}
.rh-toc__title { font-size: 0.9rem; font-weight: 800; margin-bottom: 0.5rem; }
.rh-toc ol { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: 0.35rem; font-size: 0.85rem; }
.rh-toc a:hover { color: var(--rh-link); }

.rh-author-box {
  display: flex; gap: 1rem; align-items: flex-start; margin-top: 2rem; padding: 1.1rem;
  background: var(--rh-surface); border: 1px solid var(--rh-border); border-radius: var(--rh-radius);
}
.rh-author-box img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; flex: none; }
.rh-author-box p { font-size: 0.84rem; color: var(--rh-muted); margin: 0.3rem 0 0; }

.rh-share { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.4rem; }
.rh-share__label { font-size: 0.8rem; font-weight: 700; }
.rh-share a {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--rh-border); color: var(--rh-muted); transition: all 0.16s var(--rh-ease);
}
.rh-share a:hover { background: var(--rh-accent); color: #14181e; border-color: var(--rh-accent); }

.rh-postnav { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1.6rem; }
.rh-postnav a {
  display: grid; gap: 0.25rem; padding: 0.9rem 1rem; border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); background: var(--rh-surface); font-size: 0.86rem; font-weight: 700;
}
.rh-postnav a:hover { border-color: var(--rh-accent); }
.rh-postnav small { color: var(--rh-muted); font-weight: 500; font-size: 0.72rem; }

.rh-updated { font-size: 0.75rem; color: var(--rh-muted); margin-top: 1rem; }

/* File / download box */
.rh-filebox {
  display: grid; gap: 0.8rem; padding: 1.1rem; border-radius: var(--rh-radius);
  border: 1px solid var(--rh-border); background: var(--rh-surface);
}
.rh-filebox__grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); font-size: 0.8rem; }
.rh-filebox__item { display: grid; gap: 0.15rem; }
.rh-filebox__item span { color: var(--rh-muted); font-size: 0.72rem; }
.rh-filebox__item strong { color: var(--rh-heading); font-weight: 700; }
.rh-pdf-preview { width: 100%; height: 620px; border: 1px solid var(--rh-border); border-radius: var(--rh-radius); }

/* Sidebar / widgets */
.rh-sidebar { display: grid; gap: 1rem; align-content: start; }
.rh-widget {
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); padding: 1rem 1.1rem;
}
.rh-widget__title { font-size: 0.92rem; margin-bottom: 0.7rem; }
.rh-widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; font-size: 0.85rem; }
.rh-widget a:hover { color: var(--rh-link); }

/* FAQ accordion */
.rh-faq { display: grid; gap: 0.6rem; }
.rh-faq__item { border: 1px solid var(--rh-border); border-radius: var(--rh-radius); background: var(--rh-surface); overflow: hidden; }
.rh-faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.95rem 1.1rem; background: none; border: 0; cursor: pointer;
  font-weight: 700; font-size: 0.92rem; text-align: start; color: var(--rh-heading);
}
.rh-faq__q .rh-faq__ico { transition: transform 0.2s var(--rh-ease); color: var(--rh-accent); }
.rh-faq__item.is-open .rh-faq__ico { transform: rotate(45deg); }
.rh-faq__a { padding: 0 1.1rem 1.05rem; font-size: 0.86rem; color: var(--rh-muted); line-height: 2.05; }

/* 404 / empty */
.rh-empty { text-align: center; padding: 3.4rem 1rem; display: grid; gap: 0.7rem; place-items: center; }
.rh-empty__code { font-size: clamp(3.4rem, 12vw, 6rem); font-weight: 800; color: var(--rh-accent); line-height: 1; }

/* Comments */
.rh-comments { margin-top: 2.2rem; }
.rh-comments .comment-list { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 1rem; }
.rh-comments .comment-body {
  padding: 1rem; border: 1px solid var(--rh-border); border-radius: var(--rh-radius); background: var(--rh-surface);
}
.rh-comments .children { list-style: none; padding-inline-start: 1.2rem; margin-top: 1rem; display: grid; gap: 1rem; }

/* WP core alignment helpers */
.alignleft { float: left; margin: 0 1.2rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.2rem; }
.aligncenter { margin-inline: auto; display: block; }
.wp-caption-text, .screen-reader-text { font-size: 0.78rem; color: var(--rh-muted); }
.sticky .rh-card { border-color: var(--rh-accent); }

/* Cookie notice */
.rh-cookie {
  position: fixed; inset-inline: 1rem; inset-block-end: 1rem; z-index: 140;
  max-width: 520px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.8rem 1rem; border-radius: var(--rh-radius);
  background: var(--rh-dark-bg); color: #e9edf1; box-shadow: var(--rh-shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.rh-cookie p { margin: 0; font-size: 0.8rem; }

.rh-drawer__search { margin-bottom: 0.9rem; }
.rh-social--footer { margin-top: 1rem; }
.rh-footer__about .rh-brand { margin-bottom: 0.8rem; }
.rh-aside .rh-section__head { margin-bottom: 0.8rem; }

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

/* Print */
@media print {
  .rh-header, .rh-footer, .rh-share, .rh-drawer, .rh-search-modal { display: none !important; }
  body.rh-body { background: #fff; color: #000; }
}

/* ============================================================
 * Feature styles (preview app): auth modal, OTP, tabs, lawyers.
 * ============================================================ */

/* User menu in the header */
.rh-usermenu { position: relative; }
.rh-usermenu__toggle { gap: 0.4rem; }
.rh-usermenu__pop {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  min-width: 200px; display: grid; gap: 0.15rem; z-index: 60;
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); box-shadow: var(--rh-shadow-lg); padding: 0.5rem;
}
.rh-usermenu__pop a, .rh-usermenu__pop button {
  text-align: start; padding: 0.55rem 0.6rem; border-radius: var(--rh-radius-sm);
  font-size: 0.85rem; color: var(--rh-text); background: none; border: 0; cursor: pointer; width: 100%;
}
.rh-usermenu__pop a:hover, .rh-usermenu__pop button:hover { background: var(--rh-surface-2); color: var(--rh-link); }
.rh-usermenu__phone { display: block; font-size: 0.75rem; color: var(--rh-muted); padding: 0.3rem 0.6rem 0.5rem; border-bottom: 1px solid var(--rh-border); margin-bottom: 0.2rem; direction: ltr; }

/* Auth modal */
.rh-auth {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center;
  padding: 1rem; background: rgba(8, 11, 15, 0.72); backdrop-filter: blur(6px);
  animation: rh-fade 0.2s var(--rh-ease);
}
.rh-auth__box {
  width: min(94vw, 440px); background: var(--rh-surface); color: var(--rh-text);
  border: 1px solid var(--rh-border); border-radius: calc(var(--rh-radius) + 4px);
  box-shadow: var(--rh-shadow-lg); padding: 1.6rem; position: relative;
  animation: rh-pop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.rh-auth__close {
  position: absolute; inset-inline-start: 1rem; top: 1rem;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--rh-border); border-radius: 9px; background: var(--rh-surface-2);
  color: var(--rh-muted); cursor: pointer;
}
.rh-auth__close:hover { color: var(--rh-link); border-color: var(--rh-accent); }
.rh-auth__brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.2rem; }
.rh-auth__brand strong { display: block; font-size: 1.05rem; color: var(--rh-heading); }
.rh-auth__brand span { font-size: 0.76rem; color: var(--rh-muted); }
.rh-auth__lead { font-size: 0.86rem; color: var(--rh-muted); line-height: 2; margin-bottom: 1rem; }
.rh-auth__step { animation: rh-slide 0.28s var(--rh-ease); }
.rh-auth__resend { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 1rem; }
.rh-linkbtn { background: none; border: 0; color: var(--rh-link); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.rh-linkbtn:hover { text-decoration: underline; }
.rh-linkbtn:disabled { color: var(--rh-muted); cursor: default; text-decoration: none; }

/* OTP boxes */
.rh-otp { display: flex; gap: 0.6rem; justify-content: center; margin: 0.4rem 0 0.2rem; }
.rh-otp__box {
  width: 54px; height: 64px; text-align: center; font-size: 1.6rem; font-weight: 800;
  color: var(--rh-heading); background: var(--rh-surface-2);
  border: 2px solid var(--rh-border); border-radius: 14px; caret-color: var(--rh-accent);
  transition: border-color 0.18s var(--rh-ease), box-shadow 0.18s var(--rh-ease), transform 0.18s var(--rh-ease), background-color 0.18s var(--rh-ease);
}
.rh-otp__box:focus {
  outline: none; border-color: var(--rh-accent);
  box-shadow: 0 0 0 4px rgba(200, 164, 92, 0.22); transform: translateY(-2px);
}
.rh-otp__box.is-filled {
  border-color: var(--rh-accent); background: rgba(200, 164, 92, 0.12);
  animation: rh-otp-pop 0.22s var(--rh-ease);
}
.rh-otp--shake { animation: rh-shake 0.45s var(--rh-ease); }

.rh-auth__done { text-align: center; padding: 1rem 0 0.4rem; }
.rh-auth__check {
  display: inline-grid; place-items: center; width: 84px; height: 84px; margin-bottom: 0.6rem;
  color: #fff; border-radius: 50%; background: linear-gradient(145deg, #2fa96a, #1f7d4d);
  box-shadow: 0 12px 30px -12px rgba(31, 125, 77, 0.7); animation: rh-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rh-pop { from { opacity: 0; transform: scale(0.9) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes rh-slide { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes rh-otp-pop { 0% { transform: scale(0.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes rh-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }

/* Content tabs / filters bar */
.rh-tabs-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.rh-tab {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: var(--rh-radius-pill);
  border: 1px solid var(--rh-border); background: var(--rh-surface);
  font-size: 0.83rem; font-weight: 700; color: var(--rh-text); cursor: pointer;
  transition: all 0.16s var(--rh-ease);
}
.rh-tab:hover { border-color: var(--rh-accent); color: var(--rh-link); }
.rh-tab.is-active { background: var(--rh-accent); color: #14181e; border-color: var(--rh-accent); }
.rh-toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.rh-toolbar__search { flex: 1; min-width: 220px; }

/* Lawyer directory */
.rh-lawyer-card {
  display: grid; gap: 0.8rem; padding: 1.2rem; text-align: center;
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); transition: all 0.2s var(--rh-ease); height: 100%;
}
.rh-lawyer-card:hover { transform: translateY(-4px); box-shadow: var(--rh-shadow); border-color: rgba(200, 164, 92, 0.6); }
.rh-lawyer-card__avatar {
  width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--rh-accent); position: relative;
}
.rh-lawyer-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.rh-lawyer-card__name { font-size: 1.05rem; font-weight: 800; color: var(--rh-heading); margin: 0; }
.rh-lawyer-card__title { font-size: 0.8rem; color: var(--rh-muted); }
.rh-verified { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.72rem; color: #1f7d4d; font-weight: 700; }
.rh-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; }
.rh-lawyer-stats { display: flex; justify-content: center; gap: 1.2rem; font-size: 0.78rem; color: var(--rh-muted); border-block: 1px dashed var(--rh-border); padding-block: 0.6rem; }
.rh-lawyer-stats strong { display: block; color: var(--rh-heading); font-size: 1rem; }
.rh-stars { color: var(--rh-accent); letter-spacing: 2px; font-size: 0.9rem; }

/* Lawyer profile */
.rh-profile-head {
  display: grid; gap: 1.2rem; align-items: center; grid-template-columns: 1fr;
  background: var(--rh-dark-bg); color: #fff; padding: 2rem; border-radius: var(--rh-radius);
}
@media (min-width: 760px) { .rh-profile-head { grid-template-columns: 150px 1fr; } }
.rh-profile-head__avatar { width: 150px; height: 150px; border-radius: 20px; overflow: hidden; border: 3px solid var(--rh-accent); }
.rh-profile-head__avatar img { width: 100%; height: 100%; object-fit: cover; }
.rh-profile-head h1 { color: #fff; margin-bottom: 0.3rem; }
.rh-profile-head p { color: var(--rh-dark-muted); margin: 0.2rem 0; }

/* Q&A accordion cards */
.rh-qa-item {
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); padding: 1.1rem 1.2rem; margin-bottom: 0.8rem;
}
.rh-qa-item__q { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 800; color: var(--rh-heading); }
.rh-qa-item__badge {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px;
  background: rgba(200, 164, 92, 0.18); color: var(--rh-link); font-weight: 800; font-size: 0.8rem;
}
.rh-qa-item__a { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px dashed var(--rh-border); color: var(--rh-muted); font-size: 0.88rem; line-height: 2; }
.rh-qa-item__a .rh-qa-item__badge { background: #1f7d4d; color: #fff; }
.rh-qa-item__meta { display: flex; gap: 0.9rem; font-size: 0.72rem; color: var(--rh-muted); margin-top: 0.7rem; }

.rh-pending { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; color: #b5892f; font-weight: 700; }

/* Inner page layout helper */
.rh-inner { padding-block: var(--rh-section-y); }
.rh-two-col { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .rh-two-col { grid-template-columns: minmax(0, 1fr) 340px; } }

/* ============================================================
 * Modern library, cards, rows, buy-box, locked content.
 * ============================================================ */

/* Library hero */
.rh-libhero {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(circle at 85% 15%, rgba(200,164,92,0.18), transparent 45%), var(--rh-dark-bg);
  color: #fff; padding-block: 3rem 2.4rem; text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.rh-libhero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.5rem; }
.rh-libhero p { color: var(--rh-dark-muted); max-width: 60ch; margin: 0 auto 1.6rem; }
.rh-libhero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.9rem;
  padding: 0.35rem 0.9rem; border-radius: var(--rh-radius-pill);
  background: rgba(200,164,92,0.14); border: 1px solid rgba(200,164,92,0.4);
  color: var(--rh-accent-soft); font-size: 0.78rem; font-weight: 700;
}
.rh-libhero__stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
.rh-libhero__stat {
  display: grid; justify-items: center; gap: 0.15rem; min-width: 110px;
  padding: 0.9rem 1.1rem; border-radius: var(--rh-radius);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--rh-accent);
}
.rh-libhero__stat strong { font-size: 1.4rem; color: #fff; }
.rh-libhero__stat span { font-size: 0.75rem; color: var(--rh-dark-muted); }

/* Library toolbar */
.rh-libbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rh-tab__count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: var(--rh-radius-pill); background: rgba(0,0,0,0.08); font-size: 0.68rem; font-weight: 800;
}
.rh-tab.is-active .rh-tab__count { background: rgba(0,0,0,0.18); }
.rh-viewtoggle { display: inline-flex; gap: 0.25rem; padding: 0.2rem; border: 1px solid var(--rh-border); border-radius: var(--rh-radius-sm); background: var(--rh-surface); }
.rh-viewtoggle button { width: 34px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--rh-muted); cursor: pointer; }
.rh-viewtoggle button.is-active { background: var(--rh-accent); color: #14181e; }
.rh-toolbar--card { padding: 0.9rem; background: var(--rh-surface); border: 1px solid var(--rh-border); border-radius: var(--rh-radius); }
.rh-toolbar__search { position: relative; display: flex; align-items: center; }
.rh-toolbar__search svg { position: absolute; inset-inline-start: 0.7rem; color: var(--rh-muted); pointer-events: none; }
.rh-toolbar__search .rh-field { padding-inline-start: 2.2rem; }
.rh-toolbar--card .rh-field { max-width: 220px; }
.rh-toolbar--card .rh-toolbar__search { flex: 1; min-width: 220px; max-width: none; }
.rh-toolbar--card .rh-toolbar__search .rh-field { max-width: none; }
.rh-libcount { font-size: 0.8rem; color: var(--rh-muted); margin: 0 0 1rem; }

/* Premium / free price badges */
.rh-badge--premium { background: linear-gradient(135deg, #c8a45c, #a5813c); color: #241a06; display: inline-flex; align-items: center; gap: 0.25rem; }
.rh-badge--free { background: rgba(31,125,77,0.15); color: #1f7d4d; }
[data-theme="dark"] .rh-badge--free { background: rgba(46,169,106,0.2); color: #7fe0ab; }

/* Modern content card */
.rh-card--modern .rh-card__media { aspect-ratio: 16 / 9; }
.rh-card__tags { position: absolute; inset-block-end: 0.6rem; inset-inline-start: 0.6rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.rh-card__tags .rh-badge { position: static; }
.rh-card__kind {
  position: absolute; inset-block-start: 0.6rem; inset-inline-end: 0.6rem;
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.22rem 0.55rem; border-radius: var(--rh-radius-pill);
  background: rgba(10,13,18,0.72); color: #fff; font-size: 0.68rem; font-weight: 700; backdrop-filter: blur(4px);
}
.rh-card__cta { margin-top: auto; justify-content: center; }

/* List (row) view */
.rh-rows { display: grid; gap: 0.7rem; }
.rh-row {
  display: flex; gap: 1rem; align-items: center; padding: 0.7rem;
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); transition: all 0.18s var(--rh-ease);
}
.rh-row:hover { border-color: rgba(200,164,92,0.6); transform: translateX(-3px); box-shadow: var(--rh-shadow); }
.rh-row__thumb { width: 110px; height: 74px; flex: none; border-radius: var(--rh-radius-sm); overflow: hidden; background: var(--rh-surface-2); }
.rh-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rh-row__body { flex: 1; min-width: 0; display: grid; gap: 0.3rem; }
.rh-row__top { display: flex; align-items: center; gap: 0.5rem; }
.rh-row__kind { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; color: var(--rh-muted); }
.rh-row__title { font-weight: 700; color: var(--rh-heading); font-size: 0.95rem; }
.rh-row__meta { font-size: 0.78rem; color: var(--rh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; flex: none; }
.rh-row__go { color: var(--rh-accent); }
@media (max-width: 560px) { .rh-row__thumb { display: none; } }

/* Buy box (WooCommerce-style) */
.rh-buybox {
  display: grid; gap: 0.7rem; padding: 1.2rem; border-radius: var(--rh-radius);
  border: 1px solid var(--rh-border); background: var(--rh-surface); position: relative; overflow: hidden;
}
.rh-buybox--premium { border-color: rgba(200,164,92,0.5); background: linear-gradient(180deg, rgba(200,164,92,0.08), var(--rh-surface) 60%); }
.rh-buybox__ribbon {
  display: inline-flex; align-items: center; gap: 0.3rem; align-self: flex-start;
  padding: 0.25rem 0.7rem; border-radius: var(--rh-radius-pill);
  background: linear-gradient(135deg, #c8a45c, #a5813c); color: #241a06; font-size: 0.72rem; font-weight: 800;
}
.rh-buybox__price { font-size: 1.5rem; font-weight: 800; color: var(--rh-heading); display: flex; align-items: center; gap: 0.4rem; }
.rh-buybox--free .rh-buybox__price { color: #1f7d4d; }
.rh-buybox__perks { list-style: none; margin: 0.2rem 0 0; padding: 0; display: grid; gap: 0.45rem; font-size: 0.8rem; color: var(--rh-muted); }
.rh-buybox__perks li { display: flex; align-items: center; gap: 0.45rem; }
.rh-buybox__perks svg { color: var(--rh-accent); flex: none; }

/* Locked (premium) content */
.rh-locked { position: relative; margin-top: -3rem; padding-top: 3rem; }
.rh-locked__fade { position: absolute; inset-block-start: 0; inset-inline: 0; height: 3rem; background: linear-gradient(to bottom, transparent, var(--rh-bg)); }
.rh-locked__panel {
  text-align: center; padding: 2rem 1.4rem; border-radius: var(--rh-radius);
  border: 1px dashed rgba(200,164,92,0.5); background: rgba(200,164,92,0.08);
}
.rh-locked__icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: rgba(200,164,92,0.18); color: var(--rh-accent); margin-bottom: 0.6rem; }
.rh-locked__panel h3 { margin: 0 0 0.3rem; }
.rh-locked__panel p { margin: 0; color: var(--rh-muted); font-size: 0.85rem; }

.rh-entry__tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ============================================================
 * Code slots
 * ============================================================ */
.rh-code-slot { margin-block: 0.5rem; }
.rh-code-slot:empty { display: none; }

/* ============================================================
 * Lawyer profile (modern résumé & contact)
 * ============================================================ */
.rh-lawyer-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; gap: 1.4rem; align-items: center; grid-template-columns: 1fr;
  padding: 1.8rem; border-radius: calc(var(--rh-radius) + 6px);
  background: var(--rh-dark-bg); color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
}
@media (min-width: 720px) { .rh-lawyer-hero { grid-template-columns: 190px 1fr; padding: 2.2rem; } }
.rh-lawyer-hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 90% 0%, rgba(200,164,92,0.22), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(200,164,92,0.1), transparent 40%);
}
.rh-lawyer-hero__avatar {
  position: relative; width: 150px; height: 150px; margin: 0 auto; border-radius: 24px;
  overflow: hidden; border: 3px solid var(--rh-accent); box-shadow: 0 18px 40px -18px rgba(0,0,0,0.8);
}
@media (min-width: 720px) { .rh-lawyer-hero__avatar { width: 168px; height: 168px; margin: 0; } }
.rh-lawyer-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.rh-lawyer-hero__verified {
  position: absolute; inset-block-end: 8px; inset-inline-end: 8px;
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  background: #1f7d4d; color: #fff; border: 2px solid var(--rh-dark-bg);
}
.rh-lawyer-hero__body { text-align: center; }
@media (min-width: 720px) { .rh-lawyer-hero__body { text-align: start; } }
.rh-lawyer-hero__body h1 { color: #fff; margin: 0 0 0.3rem; font-size: clamp(1.5rem, 4vw, 2.1rem); }
.rh-lawyer-hero__title { color: var(--rh-accent-soft); margin: 0 0 0.6rem; font-weight: 700; }
.rh-lawyer-hero__badges { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
@media (min-width: 720px) { .rh-lawyer-hero__badges { justify-content: flex-start; } }
.rh-verified--light { color: #7fe0ab; }
.rh-lawyer-hero__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; justify-content: center; }
@media (min-width: 720px) { .rh-lawyer-hero__actions { justify-content: flex-start; } }

.rh-lawyer-metrics {
  display: grid; gap: 0.8rem; margin-top: 1.1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .rh-lawyer-metrics { grid-template-columns: repeat(4, 1fr); } }
.rh-lawyer-metric {
  display: grid; justify-items: center; gap: 0.1rem; text-align: center;
  padding: 1rem 0.6rem; border-radius: var(--rh-radius);
  background: var(--rh-surface); border: 1px solid var(--rh-border);
}
.rh-lawyer-metric__icon { color: var(--rh-accent); margin-bottom: 0.2rem; }
.rh-lawyer-metric strong { font-size: 1.3rem; color: var(--rh-heading); }
.rh-lawyer-metric span:last-child { font-size: 0.75rem; color: var(--rh-muted); }

.rh-panel {
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); padding: 1.3rem 1.4rem; margin-bottom: 1.1rem;
}
.rh-panel__title { display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; margin-bottom: 0.8rem; }
.rh-panel__title svg { color: var(--rh-accent); }
.rh-panel__text { color: var(--rh-text); line-height: 2.1; margin: 0; font-size: 0.92rem; }

.rh-speclist { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.rh-speclist__item {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.9rem;
  border-radius: var(--rh-radius-sm); background: var(--rh-surface-2);
  border: 1px solid var(--rh-border); font-size: 0.86rem; font-weight: 600; color: var(--rh-heading);
}
.rh-speclist__item svg { color: var(--rh-accent); flex: none; }

.rh-timeline { display: grid; gap: 0.2rem; }
.rh-timeline__item { display: flex; gap: 0.8rem; padding: 0.6rem 0; position: relative; }
.rh-timeline__item:not(:last-child)::before {
  content: ""; position: absolute; inset-inline-start: 15px; top: 34px; bottom: -6px;
  width: 2px; background: var(--rh-border);
}
.rh-timeline__dot {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(200,164,92,0.16); color: var(--rh-link); z-index: 1;
}
.rh-timeline__label { display: block; font-size: 0.74rem; color: var(--rh-muted); }
.rh-timeline__value { color: var(--rh-heading); font-size: 0.9rem; }

.rh-lawyer-side { position: sticky; top: calc(var(--rh-header-h) + 12px); }
@media (max-width: 899px) { .rh-lawyer-side { position: static; } }
.rh-contact-row {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0;
  border-top: 1px dashed var(--rh-border);
}
.rh-contact-row:first-of-type { border-top: 0; }
.rh-contact-row__ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--rh-surface-2); color: var(--rh-accent); border: 1px solid var(--rh-border); }
.rh-contact-row small { display: block; font-size: 0.72rem; color: var(--rh-muted); }
.rh-contact-row strong { color: var(--rh-heading); font-size: 0.86rem; }
.rh-contact-row:hover strong { color: var(--rh-link); }

/* ============================================================
 * Responsive refinements (mobile-first, all sizes)
 * ============================================================ */

/* Fluid type scale on small screens */
@media (max-width: 600px) {
  :root { --rh-fs-h2: 1.35rem; --rh-section-y: 2.4rem; }
  .rh-container { width: min(100% - 1.5rem, var(--rh-container)); }
  .rh-section__head { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .rh-section__link { align-self: flex-start; }
  .rh-hero__actions { width: 100%; }
  .rh-hero__actions .rh-btn { flex: 1; justify-content: center; }
  .rh-btn { padding: 0.62rem 1rem; }
  .rh-libbar { flex-direction: column; align-items: stretch; }
  .rh-tabs-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.3rem; -webkit-overflow-scrolling: touch; }
  .rh-tab { white-space: nowrap; }
  .rh-viewtoggle { align-self: flex-end; }
  .rh-toolbar--card { flex-direction: column; align-items: stretch; }
  .rh-toolbar--card .rh-field { max-width: none; }
  .rh-otp__box { width: 46px; height: 56px; font-size: 1.35rem; }
  .rh-auth__box { padding: 1.2rem; }
  .rh-usermenu__toggle span { display: none; }
  .rh-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Tablet: keep two-column layouts readable */
@media (max-width: 899px) {
  .rh-two-col { grid-template-columns: 1fr; }
  .rh-lawyer-side { order: -1; }
  .rh-pdf-preview { height: 420px; }
}

/* Grids collapse gracefully */
@media (max-width: 720px) {
  .rh-grid--3, .rh-grid--4 { grid-template-columns: 1fr; }
  .rh-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rh-stats { grid-template-columns: repeat(2, 1fr); }
  .rh-lawyer-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 721px) and (max-width: 1023px) {
  .rh-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* Ensure the mobile menu button is always available under 1100px */
@media (max-width: 1099px) {
  .rh-nav { display: none !important; }
  .rh-burger { display: grid !important; }
  .rh-header__cta { display: none; }
}

/* Very small phones */
@media (max-width: 380px) {
  .rh-brand__tag { display: none; }
  .rh-actions { gap: 0.35rem; }
  .rh-icon-btn { width: 34px; height: 34px; }
}

/* Large screens: a touch more breathing room */
@media (min-width: 1600px) {
  :root { --rh-container: 1360px; }
}

/* ============================================================
 * Cart & checkout (WooCommerce-style)
 * ============================================================ */

/* Header cart icon + badge */
.rh-cart-btn { position: relative; }
.rh-cart-badge {
  position: absolute; inset-block-start: -6px; inset-inline-start: -6px;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  display: grid; place-items: center; font-size: 0.64rem; font-weight: 800;
  background: var(--rh-accent); color: #14181e; border: 2px solid var(--rh-dark-bg);
  line-height: 1;
}
.rh-cart-btn.is-bump { animation: rh-cart-bump 0.45s var(--rh-ease); }
@keyframes rh-cart-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); }
  70% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* Cart layout */
.rh-cart { display: grid; gap: 1.4rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .rh-cart { grid-template-columns: minmax(0, 1fr) 340px; } }
.rh-cart__list { display: grid; gap: 0.8rem; }
.rh-cart__head { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; color: var(--rh-muted); margin-bottom: 0.2rem; }

.rh-cart-item {
  display: grid; grid-template-columns: 90px 1fr; gap: 0.9rem; align-items: center;
  padding: 0.8rem; background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
}
@media (min-width: 620px) { .rh-cart-item { grid-template-columns: 110px 1fr auto; } }
.rh-cart-item__thumb { width: 90px; height: 68px; border-radius: var(--rh-radius-sm); overflow: hidden; background: var(--rh-surface-2); }
@media (min-width: 620px) { .rh-cart-item__thumb { width: 110px; height: 80px; } }
.rh-cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rh-cart-item__body { min-width: 0; display: grid; gap: 0.25rem; }
.rh-cart-item__kind { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; color: var(--rh-muted); }
.rh-cart-item__title { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--rh-heading); }
.rh-cart-item__unit { font-size: 0.78rem; color: var(--rh-muted); }
.rh-cart-item__side { display: flex; align-items: center; gap: 0.7rem; grid-column: 1 / -1; justify-content: space-between; }
@media (min-width: 620px) { .rh-cart-item__side { grid-column: auto; flex-direction: column; align-items: flex-end; gap: 0.5rem; } }
.rh-cart-item__total { color: var(--rh-heading); font-size: 0.95rem; }
.rh-cart-item__remove {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--rh-border); background: var(--rh-surface-2); color: var(--rh-muted); cursor: pointer;
  transition: all 0.16s var(--rh-ease);
}
.rh-cart-item__remove:hover { color: #b3261e; border-color: #e6c4c4; background: #fbeeee; }

.rh-qty { display: inline-flex; align-items: center; border: 1px solid var(--rh-border); border-radius: var(--rh-radius-sm); overflow: hidden; background: var(--rh-surface); }
.rh-qty button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: var(--rh-surface-2); color: var(--rh-text); cursor: pointer; }
.rh-qty button:hover { background: var(--rh-accent); color: #14181e; }
.rh-qty span { min-width: 34px; text-align: center; font-weight: 700; font-size: 0.85rem; }

.rh-cart-empty-ico { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgba(200,164,92,0.14); color: var(--rh-accent); }

/* Order summary card (cart + checkout) */
.rh-cart__summary, .rh-checkout__summary { align-self: start; }
@media (min-width: 960px) { .rh-cart__summary, .rh-checkout__summary { position: sticky; top: calc(var(--rh-header-h) + 12px); } }
.rh-summary { background: var(--rh-surface); border: 1px solid var(--rh-border); border-radius: var(--rh-radius); padding: 1.2rem; }
.rh-summary__title { font-size: 1.05rem; margin-bottom: 0.9rem; }
.rh-summary__row { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; font-size: 0.86rem; color: var(--rh-muted); border-top: 1px dashed var(--rh-border); }
.rh-summary__row:first-of-type { border-top: 0; }
.rh-summary__row--total { border-top: 1px solid var(--rh-border); margin-top: 0.3rem; padding-top: 0.8rem; color: var(--rh-heading); font-size: 1rem; }
.rh-summary__row--total strong { color: var(--rh-accent); font-size: 1.15rem; }
.rh-summary .rh-btn { margin-top: 0.9rem; }
.rh-summary__items { display: grid; gap: 0.4rem; margin-bottom: 0.6rem; }
.rh-summary__item { display: grid; grid-template-columns: 1fr auto auto; gap: 0.5rem; font-size: 0.8rem; color: var(--rh-text); }
.rh-summary__item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-summary__item-qty { color: var(--rh-muted); }

/* Checkout */
.rh-checkout { display: grid; gap: 1.4rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .rh-checkout { grid-template-columns: minmax(0, 1fr) 360px; } }
.rh-checkout__main { display: grid; gap: 1.1rem; }
.rh-form-grid { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .rh-form-grid { grid-template-columns: 1fr 1fr; } }
.rh-form-grid .rh-form-row { margin: 0; }

.rh-paymethods { display: grid; gap: 0.7rem; grid-template-columns: 1fr; }
@media (min-width: 480px) { .rh-paymethods { grid-template-columns: 1fr 1fr; } }
.rh-paymethod {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1rem; cursor: pointer;
  border: 1px solid var(--rh-border); border-radius: var(--rh-radius); background: var(--rh-surface);
  transition: all 0.16s var(--rh-ease); color: var(--rh-text);
}
.rh-paymethod:hover { border-color: var(--rh-accent); }
.rh-paymethod.is-active { border-color: var(--rh-accent); background: rgba(200,164,92,0.08); box-shadow: var(--rh-ring); }
.rh-paymethod input { accent-color: var(--rh-accent); }
.rh-paymethod svg { color: var(--rh-accent); flex: none; }
.rh-paymethod span { display: grid; }
.rh-paymethod small { color: var(--rh-muted); font-size: 0.72rem; }

.rh-checkout-done { text-align: center; padding: 2.4rem 1rem; display: grid; gap: 0.6rem; place-items: center; }

/* ============================================================
 * WooCommerce cart & checkout (WordPress theme) — modern, responsive.
 * These rules only apply when WooCommerce renders its pages.
 * ============================================================ */
.woocommerce-cart .rh-section,
.woocommerce-checkout .rh-section { padding-block: var(--rh-section-y); }

.woocommerce table.shop_table {
  border: 1px solid var(--rh-border); border-radius: var(--rh-radius);
  border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--rh-surface);
}
.woocommerce table.shop_table th { background: var(--rh-surface-2); color: var(--rh-heading); font-weight: 800; }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-top: 1px solid var(--rh-border); padding: 0.9rem; }
.woocommerce .cart_item img { width: 64px; height: auto; border-radius: var(--rh-radius-sm); }

.woocommerce .quantity input.qty {
  width: 64px; padding: 0.5rem; border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius-sm); background: var(--rh-surface); color: var(--rh-text);
}

.woocommerce .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review,
.woocommerce-checkout .woocommerce-checkout-review-order {
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); padding: 1.2rem;
}

.woocommerce #payment, .woocommerce-checkout #payment { background: transparent; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  width: 100%; padding: 0.72rem 0.9rem; border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius-sm); background: var(--rh-surface); color: var(--rh-text); font: inherit;
}
.woocommerce #respond input#submit,
.woocommerce a.button, .woocommerce button.button,
.woocommerce input.button, .woocommerce .checkout-button {
  background: var(--rh-accent); color: #14181e; border: 0; border-radius: var(--rh-radius-sm);
  padding: 0.7rem 1.3rem; font-weight: 800; cursor: pointer; transition: background-color 0.16s ease;
}
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce input.button:hover, .woocommerce #respond input#submit:hover,
.woocommerce .checkout-button:hover { background: var(--rh-accent-soft); }
.woocommerce .button.alt, .woocommerce #place_order { width: 100%; text-align: center; }

.woocommerce-checkout .col2-set, .woocommerce .col2-set { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .woocommerce-checkout form.checkout { display: grid; gap: 1.4rem; grid-template-columns: minmax(0,1fr) 360px; align-items: start; }
  .woocommerce-checkout #customer_details { grid-column: 1; }
  .woocommerce-checkout #order_review, .woocommerce-checkout #order_review_heading { grid-column: 2; }
}
@media (max-width: 640px) {
  .woocommerce table.shop_table, .woocommerce table.shop_table tbody,
  .woocommerce table.shop_table tr, .woocommerce table.shop_table td { display: block; width: 100%; }
  .woocommerce table.shop_table thead { display: none; }
  .woocommerce table.shop_table td { border-top: 0; border-bottom: 1px solid var(--rh-border); text-align: start; }
}

/* ============================================================
 * User dashboard, wallet, tickets, admin
 * ============================================================ */
.rh-dash { display: grid; gap: 1.2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .rh-dash { grid-template-columns: 260px minmax(0, 1fr); } }

.rh-dash__side {
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); padding: 1rem; align-self: start;
}
@media (min-width: 900px) { .rh-dash__side { position: sticky; top: calc(var(--rh-header-h) + 12px); } }
.rh-dash__user { display: flex; align-items: center; gap: 0.7rem; padding-bottom: 0.9rem; margin-bottom: 0.6rem; border-bottom: 1px solid var(--rh-border); }
.rh-dash__avatar { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(200,164,92,0.16); color: var(--rh-link); }
.rh-dash__user strong { display: block; font-size: 0.92rem; color: var(--rh-heading); }
.rh-dash__user span { font-size: 0.76rem; color: var(--rh-muted); }
.rh-dash__nav { display: grid; gap: 0.2rem; }
.rh-dash__nav a { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.7rem; border-radius: var(--rh-radius-sm); font-size: 0.88rem; font-weight: 600; color: var(--rh-text); transition: all 0.16s var(--rh-ease); }
.rh-dash__nav a:hover { background: var(--rh-surface-2); color: var(--rh-link); }
.rh-dash__nav a.is-active { background: var(--rh-accent); color: #14181e; }
.rh-dash__nav a.is-active svg { color: #14181e; }
.rh-dash__nav svg { color: var(--rh-accent); flex: none; }
.rh-dash__nav a.is-active svg { color: #14181e; }
.rh-dash__home { margin-top: 0.4rem; border-top: 1px solid var(--rh-border); padding-top: 0.7rem !important; color: var(--rh-muted) !important; }

.rh-dash__main { min-width: 0; }
.rh-dash__bar { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.rh-dash__title { margin: 0; font-size: 1.3rem; flex: 1; }
.rh-dash__toggle { display: none; }
@media (max-width: 899px) { .rh-dash__toggle { display: inline-flex; } .rh-dash__side { display: none; } .rh-dash__side.is-open { display: block; } }
.rh-dash__wallet { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.8rem; border-radius: var(--rh-radius-pill); background: rgba(200,164,92,0.14); border: 1px solid rgba(200,164,92,0.4); color: var(--rh-link); font-size: 0.8rem; font-weight: 800; }
.rh-dash-loading { display: flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 3rem; color: var(--rh-muted); }
.rh-spinner { width: 22px; height: 22px; border: 3px solid var(--rh-border); border-top-color: var(--rh-accent); border-radius: 50%; animation: rh-spin 0.8s linear infinite; }
@keyframes rh-spin { to { transform: rotate(360deg); } }

.rh-dash-stats { display: grid; gap: 0.8rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .rh-dash-stats { grid-template-columns: repeat(4, 1fr); } }
.rh-dash-stat { display: grid; justify-items: center; gap: 0.1rem; text-align: center; padding: 1.1rem 0.6rem; border-radius: var(--rh-radius); background: var(--rh-surface); border: 1px solid var(--rh-border); transition: all 0.18s var(--rh-ease); }
.rh-dash-stat:hover { border-color: var(--rh-accent); transform: translateY(-3px); box-shadow: var(--rh-shadow); }
.rh-dash-stat__icon { color: var(--rh-accent); margin-bottom: 0.2rem; }
.rh-dash-stat strong { font-size: 1.1rem; color: var(--rh-heading); }
.rh-dash-stat span:last-child { font-size: 0.74rem; color: var(--rh-muted); }

.rh-dash-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.62rem 0; border-top: 1px dashed var(--rh-border); font-size: 0.85rem; }
.rh-dash-row:first-child { border-top: 0; }
.rh-dash-row > span:first-child { flex: 1; color: var(--rh-heading); overflow: hidden; text-overflow: ellipsis; }

/* Wallet */
.rh-wallet-card {
  display: grid; gap: 0.3rem; padding: 1.6rem; border-radius: var(--rh-radius);
  background: linear-gradient(135deg, #1b222c, #0f1319); color: #fff;
  border: 1px solid rgba(200,164,92,0.3); position: relative; overflow: hidden;
}
.rh-wallet-card::after { content: ""; position: absolute; inset-block-start: -40px; inset-inline-end: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(200,164,92,0.35), transparent 70%); }
.rh-wallet-card__label { font-size: 0.8rem; color: var(--rh-accent-soft); }
.rh-wallet-card__balance { font-size: 2rem; color: #fff; }
.rh-wallet-card__hint { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; color: var(--rh-dark-muted); }
.rh-chip.is-active { background: var(--rh-accent); color: #14181e; border-color: var(--rh-accent); }

/* Orders */
.rh-order { border: 1px solid var(--rh-border); border-radius: var(--rh-radius); padding: 1rem; margin-bottom: 0.8rem; background: var(--rh-surface-2); }
.rh-order__head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.rh-order__head strong { color: var(--rh-heading); }
.rh-order__items { display: grid; gap: 0.2rem; }
.rh-order__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--rh-border); font-size: 0.85rem; }
.rh-order__foot strong { color: var(--rh-accent); }

/* Tickets */
.rh-ticket-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.4rem; border-top: 1px solid var(--rh-border); }
.rh-ticket-row:first-child { border-top: 0; }
.rh-ticket-row:hover { background: var(--rh-surface-2); }
.rh-ticket-row__ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(200,164,92,0.14); color: var(--rh-link); }
.rh-ticket-row__body { flex: 1; min-width: 0; display: grid; }
.rh-ticket-row__body strong { color: var(--rh-heading); font-size: 0.9rem; }
.rh-ticket-row__body small { color: var(--rh-muted); font-size: 0.74rem; }

.rh-ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding-bottom: 0.9rem; margin-bottom: 0.9rem; border-bottom: 1px solid var(--rh-border); flex-wrap: wrap; }
.rh-thread { display: grid; gap: 0.8rem; margin-bottom: 1rem; }
.rh-msg { padding: 0.9rem 1rem; border-radius: var(--rh-radius); border: 1px solid var(--rh-border); }
.rh-msg--user { background: var(--rh-surface-2); }
.rh-msg--staff { background: rgba(200,164,92,0.08); border-color: rgba(200,164,92,0.35); }
.rh-msg__meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.74rem; color: var(--rh-muted); margin-bottom: 0.4rem; }
.rh-msg__meta strong { color: var(--rh-heading); }
.rh-msg p { margin: 0; font-size: 0.9rem; line-height: 2; }
.rh-reply { display: grid; gap: 0.6rem; }
.rh-reply textarea { min-height: 100px; }

/* Admin */
.rh-admin-item { padding: 1rem 0; border-top: 1px solid var(--rh-border); }
.rh-admin-item:first-child { border-top: 0; }
.rh-admin-answer { display: grid; gap: 0.5rem; margin-top: 0.6rem; }
.rh-admin-answer textarea { min-height: 80px; }
.rh-chip[type="button"], button.rh-chip { cursor: pointer; }

/* ============================================================
 * Q&A page (matches demo), author badges & blue verified tick
 * ============================================================ */
.rh-qa { display: grid; gap: 1.4rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .rh-qa { grid-template-columns: minmax(0, 1fr) 360px; } }
.rh-qa__aside { display: grid; gap: 1rem; align-content: start; }
@media (min-width: 960px) { .rh-qa__aside { position: sticky; top: calc(var(--rh-header-h) + 12px); } }
.rh-qa-form .rh-widget__title, .rh-qa-help .rh-widget__title { display: flex; align-items: center; gap: 0.4rem; }
.rh-qa-form .rh-widget__title svg, .rh-qa-help .rh-widget__title svg { color: var(--rh-accent); }

.rh-qa-item {
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius); padding: 1.1rem 1.2rem; margin-bottom: 0.9rem;
  transition: border-color 0.16s var(--rh-ease), box-shadow 0.16s var(--rh-ease);
}
.rh-qa-item:hover { border-color: rgba(200, 164, 92, 0.5); box-shadow: var(--rh-shadow); }
.rh-qa-item--pending { background: var(--rh-surface-2); }
.rh-qa-item__q { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 800; color: var(--rh-heading); font-size: 0.98rem; }
.rh-qa-item__badge {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px;
  background: rgba(200, 164, 92, 0.16); color: var(--rh-link); font-weight: 800; font-size: 0.85rem;
}
.rh-qa-item__badge--a { background: #1f7d4d; color: #fff; }
.rh-qa-item__a { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px dashed var(--rh-border); color: var(--rh-text); font-size: 0.9rem; line-height: 2.05; }
.rh-qa-item__meta { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; font-size: 0.74rem; color: var(--rh-muted); margin-top: 0.75rem; }
.rh-qa-item__meta svg { vertical-align: -2px; }

/* Author badge + blue verified tick (Instagram-style) */
.rh-author-badge { display: inline-flex; align-items: center; gap: 0.3rem; }
.rh-author-badge__name { font-weight: 700; color: var(--rh-heading); }
.rh-tick {
  width: 17px; height: 17px; flex: none; border-radius: 50%;
  background: #1d9bf0; color: #fff; display: inline-grid; place-items: center;
  box-shadow: 0 1px 3px rgba(29, 155, 240, 0.5);
}
.rh-tick svg { width: 11px; height: 11px; stroke-width: 3; }
.rh-role-badge {
  font-size: 0.66rem; font-weight: 800; padding: 0.12rem 0.5rem; border-radius: var(--rh-radius-pill);
  background: rgba(29, 155, 240, 0.12); color: #1478b8;
}
[data-theme="dark"] .rh-role-badge { background: rgba(29, 155, 240, 0.2); color: #7cc4f0; }

/* ============================================================
 * Dashboard — more modern / premium
 * ============================================================ */
.rh-dash__side {
  background: var(--rh-surface); border: 1px solid var(--rh-border);
  border-radius: calc(var(--rh-radius) + 4px); padding: 1.1rem; box-shadow: var(--rh-shadow-sm);
}
.rh-dash__user {
  background: linear-gradient(135deg, #1b222c, #0f1319); color: #fff; margin: -1.1rem -1.1rem 0.9rem;
  padding: 1.2rem 1.1rem; border-radius: calc(var(--rh-radius) + 4px) calc(var(--rh-radius) + 4px) 0 0;
  border-bottom: 0;
}
.rh-dash__user strong { color: #fff; }
.rh-dash__user span { color: var(--rh-accent-soft); }
.rh-dash__avatar { background: rgba(200, 164, 92, 0.2); color: var(--rh-accent); border: 1px solid rgba(200, 164, 92, 0.4); }
.rh-dash__welcome {
  background: linear-gradient(135deg, #1b222c, #0f1319);
  color: #fff; border-radius: var(--rh-radius); padding: 1.6rem 1.5rem; margin-bottom: 1.1rem;
  position: relative; overflow: hidden; border: 1px solid rgba(200, 164, 92, 0.25);
}
.rh-dash__welcome::after { content: ""; position: absolute; inset-block-start: -50px; inset-inline-end: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(200, 164, 92, 0.3), transparent 70%); }
.rh-dash__welcome h2 { color: #fff; margin: 0 0 0.3rem; }
.rh-dash__welcome p { color: var(--rh-dark-muted); margin: 0; font-size: 0.88rem; }
.rh-dash-stat { box-shadow: var(--rh-shadow-sm); }
.rh-dash-stat__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(200, 164, 92, 0.14); }

/* ============================================================
 * Dashboard: answer questions (verified users)
 * ============================================================ */
.rh-answer-intro { display: flex; gap: 0.8rem; align-items: flex-start; }
.rh-answer-intro__ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(200, 164, 92, 0.16); color: var(--rh-accent); }
.rh-answer-intro strong { color: var(--rh-heading); }
.rh-answer-intro p { margin: 0.2rem 0 0; }
.rh-answer-item { padding: 1rem 0; border-top: 1px solid var(--rh-border); }
.rh-answer-item:first-child { border-top: 0; }
.rh-answer-form { margin-top: 0.7rem; display: grid; gap: 0.5rem; }
.rh-answer-form textarea { min-height: 90px; }
.rh-answer-edit { margin-top: 0.6rem; }
.rh-answer-edit summary { cursor: pointer; font-size: 0.8rem; color: var(--rh-link); font-weight: 700; }
.rh-answer-badge {
  display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 800;
  color: #1478b8; background: rgba(29, 155, 240, 0.12); padding: 0.15rem 0.6rem; border-radius: var(--rh-radius-pill);
}
