/* ================================================================
   DIỄN ĐÀN BA MIỀN — main.css  v1.0.0
   ================================================================ */

/* ── 1. VARIABLES ─────────────────────────────────────────────── */
:root {
  --red:       #d62828;
  --red-dark:  #a4161a;
  --navy:      #14213d;
  --blue:      #1d3557;
  --gold:      #f4b400;
  --bg:        #f5f7fb;
  --card:      #ffffff;
  --text:      #1f2937;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --shadow:    0 18px 45px rgba(20, 33, 61, .08);
  --radius:    22px;
}

/* ── 2. RESET & BASE ──────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ── 3. LAYOUT ────────────────────────────────────────────────── */
.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

/* ── 4. TYPOGRAPHY ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -.4px;
  color: var(--navy);
}

/* ── 5. TOPBAR ────────────────────────────────────────────────── */
.site-topbar {
  background: var(--navy);
  color: rgba(255,255,255,.86);
  font-size: 13px;
}

.topbar-inner {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-ticker {
  display: flex;
  gap: 18px;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
}

.topbar-ticker strong { color: #fff; }
.topbar-note { color: rgba(255,255,255,.6); font-size: 12px; }

/* ── 6. HEADER ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.4px;
  font-size: 20px;
  flex-shrink: 0;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--red), var(--gold));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 12px 24px rgba(214,40,40,.25);
  flex-shrink: 0;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
}

.site-nav a { transition: color .2s; }
.site-nav a:hover,
.site-nav a.current { color: var(--red); }

/* Buttons */
.btn {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: transform .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  box-shadow: 0 12px 28px rgba(214,40,40,.25);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(214,40,40,.35); }
.btn-primary:active { transform: translateY(0); }

.btn-light {
  background: #fff;
  color: var(--red-dark);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.btn-light:hover { transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
  padding: 9px 18px;
}

.btn-outline:hover { background: var(--red); color: #fff; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: background .2s;
}

.menu-toggle:hover { background: rgba(0,0,0,.06); }

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
  width: 100%;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; width: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(20,33,61,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mobile-nav.open { display: block; }

.mobile-nav-inner {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 90vw);
  height: 100%;
  background: #fff;
  padding: 24px 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -8px 0 40px rgba(0,0,0,.15);
}

.mobile-nav.open .mobile-nav-inner { transform: translateX(0); }

.mobile-nav-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.mobile-nav-close button {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
  color: var(--navy);
}

.mobile-nav-links { display: grid; gap: 4px; margin-bottom: 20px; }

.mobile-nav-links a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
  transition: background .2s, color .2s;
}

.mobile-nav-links a:hover { background: rgba(214,40,40,.08); color: var(--red); }

.mobile-nav-cta { padding-top: 12px; border-top: 1px solid var(--border); }

/* ── 7. HERO ──────────────────────────────────────────────────── */
.hero {
  padding: 58px 0 36px;
  background:
    radial-gradient(circle at top left, rgba(244,180,0,.24), transparent 32%),
    radial-gradient(circle at 80% 20%, rgba(214,40,40,.18), transparent 30%),
    linear-gradient(135deg, #fff 0%, #f7f9ff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 36px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(214,40,40,.08);
  color: var(--red-dark);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -1.5px;
  color: var(--navy);
}

.hero-desc {
  font-size: 17px;
  color: var(--muted);
  max-width: 660px;
  margin: 0 0 24px;
  line-height: 1.7;
}

/* Search box */
.search-box {
  background: #fff;
  padding: 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  max-width: 650px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.search-box input[type="search"],
.search-box input[type="text"] {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 18px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: transparent;
  min-width: 0;
}

.search-box input::placeholder { color: #b0b8c9; }

/* Hero right card */
.hero-card {
  background: var(--navy);
  color: #fff;
  border-radius: 30px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(20,33,61,.24);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -80px -80px auto auto;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(244,180,0,.22);
  pointer-events: none;
}

.hero-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #fff;
}

.hero-card p {
  color: rgba(255,255,255,.72);
  font-size: 14px;
  margin: 0 0 4px;
  line-height: 1.6;
}

.number-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 22px 0;
}

.num {
  aspect-ratio: 1;
  border-radius: 18px;
  background: rgba(255,255,255,.1);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  border: 1px solid rgba(255,255,255,.12);
  cursor: pointer;
  transition: background .2s, transform .2s;
  color: #fff;
}

.num:hover {
  background: rgba(255,255,255,.2);
  transform: translateY(-3px);
}

/* ── 8. SECTION BASE ──────────────────────────────────────────── */
.section { padding: 34px 0; }

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.6px;
}

.section-title .sub { color: var(--muted); font-size: 14px; }

/* ── 9. REGION CARDS ──────────────────────────────────────────── */
.region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.region-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.region-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(20,33,61,.12);
}

.region-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -26px;
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: rgba(214,40,40,.08);
  pointer-events: none;
}

.region-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.region-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.mini-link {
  color: var(--red);
  font-weight: 800;
  font-size: 14px;
  transition: color .2s;
}

.mini-link:hover { color: var(--red-dark); }

/* ── 10. MAIN LAYOUT (2-col) ──────────────────────────────────── */
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

/* ── 11. QUESTION CARDS ───────────────────────────────────────── */
.question-list { display: grid; gap: 14px; }

.question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  transition: transform .2s ease, border-color .2s ease;
}

.question-card:hover {
  transform: translateY(-2px);
  border-color: rgba(214,40,40,.32);
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #edf2ff, #fff3cd);
  display: grid;
  place-items: center;
  color: var(--red-dark);
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.q-title {
  display: block;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.4;
  transition: color .2s;
}

.q-title:hover { color: var(--red); }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 13px;
  align-items: center;
}

.tag {
  color: var(--red-dark);
  background: rgba(214,40,40,.08);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  transition: background .2s;
}

.tag:hover { background: rgba(214,40,40,.15); }

/* ── 12. SIDEBAR ──────────────────────────────────────────────── */
.sidebar { display: grid; gap: 16px; }

.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.sidebar-card h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

/* CTA sidebar card */
.cta-card {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  border: 0;
}

.cta-card h3 { color: #fff; }

.cta-card p {
  color: rgba(255,255,255,.8);
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
}

/* Topic list */
.topic-list { display: grid; gap: 10px; }

.topic-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #374151;
  font-weight: 700;
  font-size: 14px;
  transition: background .2s, color .2s;
}

.topic-list a:hover { background: rgba(214,40,40,.08); color: var(--red); }

.topic-list small {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

/* Hot list */
.hot-list { display: grid; gap: 0; }

.hot-list a {
  display: block;
  font-weight: 700;
  color: #374151;
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
  transition: color .2s;
}

.hot-list a:last-child { border-bottom: 0; padding-bottom: 0; }
.hot-list a:first-child { padding-top: 0; }
.hot-list a:hover { color: var(--red); }

/* ── 13. FOOTER ───────────────────────────────────────────────── */
.site-footer {
  margin-top: 28px;
  padding: 34px 0;
  background: var(--navy);
  color: rgba(255,255,255,.74);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-brand strong {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  display: block;
  margin-bottom: 6px;
}

.footer-brand p { font-size: 14px; margin: 0; }

.footer-links {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.footer-links a { transition: color .2s; }
.footer-links a:hover { color: #fff; }

/* ── 14. BREADCRUMB ───────────────────────────────────────────── */
.breadcrumb {
  padding: 12px 0;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.breadcrumb a { color: var(--muted); transition: color .2s; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { margin: 0 6px; }

/* ── 15. SINGLE POST ──────────────────────────────────────────── */
.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
  padding: 28px 0 48px;
}

.single-article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.single-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.single-header .meta { margin-bottom: 14px; }

.single-header h1 {
  font-size: clamp(22px, 3vw, 32px);
  margin: 0 0 16px;
  line-height: 1.3;
}

.single-body {
  padding: 24px 28px;
  line-height: 1.8;
  color: var(--text);
  font-size: 15px;
}

.single-body p { margin-bottom: 1.2em; }
.single-body h2, .single-body h3 { margin: 1.5em 0 .8em; }
.single-body ul, .single-body ol { margin: .8em 0 .8em 1.4em; }
.single-body ul { list-style: disc; }
.single-body ol { list-style: decimal; }
.single-body li { margin-bottom: .4em; }
.single-body blockquote {
  border-left: 4px solid var(--red);
  padding: 12px 18px;
  background: rgba(214,40,40,.04);
  border-radius: 0 10px 10px 0;
  margin: 1em 0;
}
.single-body a { color: var(--red); text-decoration: underline; }

.single-footer { padding: 16px 28px 24px; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* Related questions */
.related-questions {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-top: 20px;
}

.related-questions h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.related-list { display: grid; gap: 12px; }

.related-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg);
  transition: background .2s;
}

.related-item:hover { background: rgba(214,40,40,.06); }

.related-item .avatar { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
.related-item .q-title { font-size: 14px; margin-bottom: 4px; }

/* Comments */
.comments-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-top: 20px;
}

.comments-section h3 { margin: 0 0 20px; font-size: 20px; }

.comment-list { display: grid; gap: 16px; margin-bottom: 24px; }

.comment-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #edf2ff, #fff3cd);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--red-dark);
  font-size: 16px;
  flex-shrink: 0;
}

.comment-bubble {
  background: var(--bg);
  border-radius: 0 14px 14px 14px;
  padding: 12px 14px;
}

.comment-author {
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 4px;
}

.comment-date {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}

.comment-text { font-size: 14px; line-height: 1.6; }

/* Comment form */
.comment-form-wrap h4 { margin: 0 0 14px; font-size: 16px; }

.comment-form { display: grid; gap: 12px; }

.form-field { display: grid; gap: 6px; }

.form-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.form-field input,
.form-field textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color .2s;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--red);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── 16. ARCHIVE ──────────────────────────────────────────────── */
.archive-header {
  padding: 28px 0 20px;
}

.archive-header h1 {
  font-size: clamp(26px, 3.5vw, 38px);
  margin-bottom: 8px;
}

.archive-header p { color: var(--muted); font-size: 15px; }

.archive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
  padding-bottom: 48px;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 24px 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: background .2s, color .2s, border-color .2s;
}

.pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination .current { background: var(--red); color: #fff; border-color: var(--red); }

/* ── 17. SEARCH ───────────────────────────────────────────────── */
.search-header {
  padding: 28px 0 20px;
}

.search-header h1 {
  font-size: clamp(22px, 3vw, 32px);
  margin-bottom: 8px;
}

.search-header p { color: var(--muted); font-size: 14px; }

.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
  padding-bottom: 48px;
}

.no-results {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 32px;
  text-align: center;
}

.no-results h2 { font-size: 22px; margin-bottom: 12px; }
.no-results p { color: var(--muted); margin-bottom: 24px; }

.no-results .search-box {
  max-width: 480px;
  margin: 0 auto;
}

/* ── 18. PAGE ─────────────────────────────────────────────────── */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
  padding: 28px 0 48px;
}

.page-article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(24px, 3vw, 36px);
  margin: 0;
}

.page-body {
  padding: 24px 28px;
  line-height: 1.8;
  font-size: 15px;
  color: var(--text);
}

.page-body p { margin-bottom: 1.2em; }
.page-body h2, .page-body h3 { margin: 1.5em 0 .8em; }

/* ── 19. 404 ──────────────────────────────────────────────────── */
.error-404 {
  padding: 80px 0;
  text-align: center;
}

.error-404 .error-code {
  font-size: clamp(80px, 15vw, 160px);
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 3px var(--red);
  line-height: 1;
  margin-bottom: 16px;
}

.error-404 h2 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 12px; }
.error-404 p { color: var(--muted); font-size: 16px; margin-bottom: 28px; max-width: 480px; margin-left: auto; margin-right: auto; }

.error-404 .search-box {
  max-width: 500px;
  margin: 0 auto 20px;
}

.error-404-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── 20. BACK TO TOP ──────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s;
  box-shadow: 0 8px 24px rgba(20,33,61,.3);
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--red); }

/* ── 21. ADMIN BAR OFFSET ─────────────────────────────────────── */
.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* ── 22. RESPONSIVE ───────────────────────────────────────────── */

/* 1024px */
@media (max-width: 1024px) {
  .container { width: min(1180px, calc(100% - 28px)); }

  .site-nav { gap: 16px; }

  .hero { padding: 44px 0 28px; }

  .single-layout,
  .archive-layout,
  .search-layout,
  .page-layout { grid-template-columns: minmax(0, 1fr) 300px; }

  .main-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* 940px — tablet */
@media (max-width: 940px) {
  .hero-grid,
  .main-layout,
  .single-layout,
  .archive-layout,
  .search-layout,
  .page-layout { grid-template-columns: 1fr; }

  .hero { padding-top: 36px; }

  .region-grid { grid-template-columns: repeat(2, 1fr); }

  .site-nav { display: none; }

  .menu-toggle { display: flex; }

  .sidebar { order: -1; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* 768px */
@media (max-width: 768px) {
  .topbar-inner { flex-direction: column; height: auto; padding: 8px 0; gap: 4px; }
  .topbar-note { display: none; }

  .single-header { padding: 20px 18px 16px; }
  .single-body { padding: 18px; }
  .single-footer { padding: 12px 18px 18px; }
  .comments-section { padding: 18px; }
  .related-questions { padding: 18px; }

  .page-header { padding: 20px 18px 16px; }
  .page-body { padding: 18px; }

  .form-row { grid-template-columns: 1fr; }

  .hero h1 { font-size: 32px; }
  .hero-desc { font-size: 15px; }
}

/* 560px — mobile */
@media (max-width: 560px) {
  .site-topbar { display: none; }

  .header-inner { height: 68px; }

  .site-logo { font-size: 17px; }
  .site-logo .logo-text { display: block; }

  .btn-primary { padding: 10px 14px; font-size: 13px; }

  .hero { padding: 28px 0 22px; }
  .hero-desc { font-size: 14px; }

  .search-box {
    border-radius: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px;
  }

  .search-box input { height: 44px; padding: 0 14px; }
  .search-box .btn { border-radius: 12px; }

  .region-grid { grid-template-columns: 1fr; }

  .question-card { grid-template-columns: 1fr; }
  .question-card .avatar { display: none; }

  .number-row { gap: 8px; }
  .num { font-size: 16px; border-radius: 12px; }

  .section-title { flex-direction: column; align-items: flex-start; gap: 4px; }
  .section-title h2 { font-size: 22px; }

  .footer-links { flex-wrap: wrap; gap: 12px; }

  .back-to-top { bottom: 18px; right: 14px; }

  .error-404 { padding: 48px 0; }
}

/* 390px — small phone */
@media (max-width: 390px) {
  .container { width: calc(100% - 24px); }
  .hero-card { padding: 20px; }
  .hero-card h3 { font-size: 18px; }
}

/* ── 23. UTILITIES ────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--muted); }

/* WordPress default alignment */
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin: 0 auto 1em; }

/* ── 24. ARCHIVE FILTER BAR ────────────────────────────────── */
.archive-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 0;
}

.archive-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
}

.archive-title-block h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 4px;
}

.archive-title-block .archive-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.archive-stats {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.archive-stats strong {
  color: var(--navy);
  font-weight: 700;
}

.filter-bar {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 12px 0;
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-bar label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.filter-select {
  appearance: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 30px 7px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .2s;
}

.filter-select:focus {
  outline: none;
  border-color: var(--red);
}

.filter-btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.filter-btn:hover { background: var(--red-dark); }

.filter-reset {
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

/* ── 25. TAXONOMY ARCHIVE HEADER ──────────────────────────── */
.taxonomy-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
  padding: 48px 0 36px;
  margin-bottom: 32px;
}

.taxonomy-header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tax-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.taxonomy-header h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 6px;
}

.taxonomy-header .tax-desc {
  color: rgba(255,255,255,.75);
  font-size: 15px;
  margin: 0 0 10px;
}

.taxonomy-header .tax-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,.6);
}

.tax-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── 26. SINGLE CAU HOI ────────────────────────────────────── */
.single-qa .post-header {
  margin-bottom: 28px;
}

.post-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(214,40,40,.1);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.single-qa .post-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 16px;
}

.single-qa .post-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.single-qa .post-meta-bar .tax-badge {
  background: rgba(20,33,61,.07);
  color: var(--navy);
  border-radius: 6px;
  padding: 3px 10px;
  font-weight: 600;
  font-size: 12px;
}

.interest-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}

.interest-badge.normal   { background: rgba(107,114,128,.1); color: var(--muted); }
.interest-badge.popular  { background: rgba(244,180,0,.15);  color: #b45309; }
.interest-badge.featured { background: rgba(214,40,40,.12);  color: var(--red); }

/* Short answer highlight box */
.short-answer-box {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
  border: 1px solid #ffe082;
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 0 0 28px;
}

.short-answer-box .sab-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #b45309;
  margin-bottom: 8px;
}

.short-answer-box p {
  font-size: 15px;
  color: var(--text);
  margin: 0;
  line-height: 1.7;
}

/* QA content area */
.qa-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}

.qa-content h2, .qa-content h3 {
  margin: 28px 0 12px;
}

.qa-content p { margin-bottom: 16px; }

.qa-content ul, .qa-content ol {
  list-style: revert;
  padding-left: 24px;
  margin-bottom: 16px;
}

.qa-content blockquote {
  border-left: 4px solid var(--red);
  padding: 12px 20px;
  background: #fef2f2;
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--muted);
}

/* Related questions */
.related-questions { margin-top: 36px; }

.related-questions h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color .2s, box-shadow .2s;
}

.related-item:hover {
  border-color: rgba(214,40,40,.3);
  box-shadow: 0 4px 16px rgba(20,33,61,.06);
}

.related-item .r-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.related-item .r-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  flex: 1;
}

.related-item .r-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* ── 27. TABLE OF CONTENTS ─────────────────────────────────── */
.toc-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 28px;
}

.toc-box .toc-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.toc-box .toc-toggle {
  margin-left: auto;
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-list li a {
  font-size: 14px;
  color: var(--navy);
  line-height: 1.4;
  display: block;
  padding: 4px 0;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: color .15s, border-color .15s;
}

.toc-list li a:hover,
.toc-list li a.toc-active {
  color: var(--red);
  border-left-color: var(--red);
}

.toc-list li.toc-h3 a {
  font-size: 13px;
  padding-left: 22px;
  color: var(--muted);
}

.toc-list li.toc-h3 a:hover { color: var(--red); }

/* ── 28. SUBMIT QUESTION FORM ──────────────────────────────── */
.submit-page {
  padding: 48px 0 64px;
}

.submit-page-header {
  margin-bottom: 36px;
}

.submit-page-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
}

.submit-page-header p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.submit-form-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  max-width: 760px;
}

.form-field {
  margin-bottom: 22px;
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.form-field label .req {
  color: var(--red);
  margin-left: 3px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea,
.form-field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.7;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(214,40,40,.1);
  background: #fff;
}

.form-field .field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.submit-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.submit-actions .btn-submit {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 13px 32px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

.submit-actions .btn-submit:hover  { background: var(--red-dark); }
.submit-actions .btn-submit:active { transform: scale(.98); }

.submit-note {
  font-size: 13px;
  color: var(--muted);
}

/* Form notice messages */
.form-notice {
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-notice.success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.form-notice.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.form-notice-icon { font-size: 18px; flex-shrink: 0; }

/* ── 29. SEARCH RESULTS ────────────────────────────────────── */
.search-results-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.search-results-header h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 4px;
}

.search-results-header .search-count {
  font-size: 14px;
  color: var(--muted);
}

.search-results-header .search-count strong { color: var(--navy); }

.result-item {
  background: var(--card);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  transition: box-shadow .2s, border-color .2s;
}

.result-item:hover {
  box-shadow: var(--shadow);
  border-color: rgba(214,40,40,.2);
}

.result-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 9px;
  border-radius: 5px;
  margin-bottom: 8px;
}

.result-type-badge.type-cau-hoi {
  background: rgba(214,40,40,.1);
  color: var(--red);
}

.result-type-badge.type-post {
  background: rgba(20,33,61,.08);
  color: var(--navy);
}

.result-item h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.4;
}

.result-item h2 a { color: var(--navy); }
.result-item h2 a:hover { color: var(--red); }

.result-item .result-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 10px;
}

.result-item .result-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.no-results-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 48px 36px;
  text-align: center;
}

.no-results-box .no-results-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.no-results-box h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.no-results-box p {
  color: var(--muted);
  margin-bottom: 24px;
}

.no-results-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.suggestion-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--navy);
  font-weight: 600;
  transition: background .2s, border-color .2s;
}

.suggestion-tag:hover {
  background: rgba(214,40,40,.07);
  border-color: var(--red);
  color: var(--red);
}

/* ── 30. COMMENTS SECTION ──────────────────────────────────── */
.comments-section {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.comments-section .comments-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

.comment-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.comment-bubble {
  background: var(--bg);
  border-radius: 0 16px 16px 16px;
  padding: 14px 18px;
  border: 1px solid var(--border);
}

.comment-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.comment-date {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.comment-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

.comment-form-wrap {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.comment-form-wrap h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 18px;
}

.comment-form-wrap .comment-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-form-wrap .comment-form p { margin: 0; }

.comment-form-wrap input,
.comment-form-wrap textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  transition: border-color .2s;
}

.comment-form-wrap input:focus,
.comment-form-wrap textarea:focus {
  outline: none;
  border-color: var(--red);
  background: #fff;
}

.comment-form-wrap textarea { min-height: 100px; resize: vertical; }

.comment-form-wrap .form-submit { margin: 0; }

.comment-form-wrap .submit {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.comment-form-wrap .submit:hover { background: var(--red-dark); }

/* ── 31. BREADCRUMB ────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 13px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--muted);
}

.breadcrumb-nav a { color: var(--muted); }
.breadcrumb-nav a:hover { color: var(--red); }
.breadcrumb-nav .sep { color: var(--border); }
.breadcrumb-nav .current { color: var(--navy); font-weight: 600; }

/* ── 32. SINGLE POST LAYOUT (shared) ───────────────────────── */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 36px 0 64px;
}

.single-layout .post-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.single-layout .post-content h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}

.post-content-body {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}

.post-content-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 14px;
}

.post-content-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 10px;
}

.post-content-body p { margin-bottom: 18px; }

.post-content-body ul,
.post-content-body ol {
  list-style: revert;
  padding-left: 24px;
  margin-bottom: 16px;
}

.post-content-body li { margin-bottom: 6px; }

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ── 33. PAGE LAYOUT ───────────────────────────────────────── */
.page-layout {
  padding: 40px 0 64px;
}

.page-layout .page-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.page-card h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.page-card-content {
  font-size: 15px;
  line-height: 1.8;
}

.page-card-content h2 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.page-card-content h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
.page-card-content p  { margin-bottom: 16px; }
.page-card-content ul,
.page-card-content ol { list-style: revert; padding-left: 22px; margin-bottom: 14px; }

/* ── 35. PAGE HERO ─────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
  padding: 56px 0 44px;
}

.page-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

.page-hero-breadcrumb a { color: rgba(255,255,255,.55); }
.page-hero-breadcrumb a:hover { color: rgba(255,255,255,.85); }
.page-hero-breadcrumb .sep { font-size: 11px; }

.page-hero h1 {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.page-hero .page-hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,.75);
  margin: 0;
  max-width: 600px;
  line-height: 1.65;
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 13px;
  color: rgba(255,255,255,.85);
  width: fit-content;
  margin-bottom: 4px;
}

/* Page layout with sidebar */
.page-main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 40px 0 64px;
  align-items: start;
}

.page-content-area {
  min-width: 0;
}

/* ── 36. ABOUT PAGE ────────────────────────────────────────── */
.about-intro-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.about-intro-section p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 16px;
}

.about-intro-section p:last-child { margin-bottom: 0; }

.about-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0 0;
}

.about-stat-item {
  background: var(--bg);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border);
}

.about-stat-item .stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--red);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.about-stat-item .stat-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.about-section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-features-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.about-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.about-feature-card {
  background: var(--bg);
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  transition: border-color .2s, box-shadow .2s;
}

.about-feature-card:hover {
  border-color: rgba(214,40,40,.25);
  box-shadow: 0 4px 16px rgba(20,33,61,.06);
}

.about-feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.about-feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.about-feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.about-topics-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.about-topics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.about-topic-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  transition: border-color .2s;
}

.about-topic-item:hover { border-color: rgba(214,40,40,.3); }

.about-topic-item .t-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.about-topic-item .t-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
}

.about-topic-item .t-body p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ── 37. CONTACT PAGE ──────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.contact-form-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.contact-form-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 22px;
}

.contact-info-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info-card {
  background: var(--card);
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(20,33,61,.05);
}

.contact-info-card .ci-icon {
  font-size: 26px;
  margin-bottom: 10px;
  display: block;
}

.contact-info-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.contact-info-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.contact-faq-section {
  background: var(--card);
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--border);
}

.contact-faq-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

.faq-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: none; padding-bottom: 0; }

.faq-item .faq-q {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.faq-item .faq-a {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* ── 38. POLICY PAGES ──────────────────────────────────────── */
.policy-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.policy-card .policy-updated {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.policy-body h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg);
}

.policy-body h2:first-child { margin-top: 0; }

.policy-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 22px 0 10px;
}

.policy-body p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 16px;
}

.policy-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.policy-body ul li {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  padding: 6px 0 6px 22px;
  position: relative;
}

.policy-body ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

.policy-highlight-box {
  background: rgba(244,180,0,.08);
  border: 1px solid rgba(244,180,0,.3);
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

/* ── 39. COMMUNITY RULES ───────────────────────────────────── */
.rules-intro-card {
  background: linear-gradient(135deg, #fff5f5 0%, #fff8e1 100%);
  border: 1px solid rgba(214,40,40,.15);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-bottom: 28px;
}

.rules-intro-card p {
  font-size: 16px;
  color: var(--text);
  line-height: 1.8;
  margin: 0;
}

.rules-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.rules-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rules-section-title.rules-do { color: #15803d; }
.rules-section-title.rules-dont { color: var(--red); }

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.rule-card {
  border-radius: 16px;
  padding: 20px;
  border: 1px solid transparent;
  transition: box-shadow .2s;
}

.rule-card:hover { box-shadow: 0 4px 16px rgba(20,33,61,.07); }

.rule-card.rule-do {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.rule-card.rule-dont {
  background: #fef2f2;
  border-color: #fecaca;
}

.rule-card .rule-icon {
  font-size: 26px;
  display: block;
  margin-bottom: 10px;
}

.rule-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.rule-card.rule-do h4 { color: #15803d; }
.rule-card.rule-dont h4 { color: #991b1b; }

.rule-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* ── 40. SUBMIT GUIDE ──────────────────────────────────────── */
.guide-intro-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-bottom: 28px;
}

.guide-intro-card p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin: 0;
}

.guide-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.guide-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 22px;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.guide-step-num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.guide-step-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.guide-step-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.guide-example-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.example-col {
  border-radius: 14px;
  padding: 20px;
}

.example-col.good {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.example-col.bad {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.example-col .ex-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
}

.example-col.good .ex-label { color: #15803d; }
.example-col.bad .ex-label { color: #991b1b; }

.example-col .ex-item {
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
  border: 1px solid rgba(0,0,0,.06);
}

.example-col .ex-item:last-child { margin-bottom: 0; }

.guide-tip-box {
  background: rgba(244,180,0,.08);
  border: 1px solid rgba(244,180,0,.3);
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin-top: 22px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

.guide-tip-box strong { color: #b45309; }

/* ── 41. PAGE CTA SECTION ──────────────────────────────────── */
.page-cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: var(--radius);
  padding: 44px 48px;
  text-align: center;
  margin-top: 12px;
  box-shadow: var(--shadow);
}

.page-cta-section h2 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.page-cta-section p {
  font-size: 15px;
  color: rgba(255,255,255,.75);
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.page-cta-section .cta-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-cta-light {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s;
  display: inline-block;
}

.btn-cta-light:hover { background: rgba(255,255,255,.22); }

.btn-cta-white {
  background: #fff;
  color: var(--red);
  border: none;
  border-radius: 14px;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 700;
  transition: box-shadow .2s;
  display: inline-block;
}

.btn-cta-white:hover { box-shadow: 0 4px 16px rgba(0,0,0,.2); }

/* ── 42. PAGE SIDEBAR ──────────────────────────────────────── */
.page-sidebar {
  position: sticky;
  top: 100px;
}

.page-sidebar .sidebar-card {
  background: var(--card);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(20,33,61,.05);
  border: 1px solid var(--border);
}

.page-sidebar .sidebar-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

.page-sidebar .quick-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-sidebar .quick-links a {
  font-size: 14px;
  color: var(--navy);
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: border-color .2s, color .2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-sidebar .quick-links a:hover {
  border-color: rgba(214,40,40,.3);
  color: var(--red);
}

/* ── 43. UPGRADED page.php LAYOUT ─────────────────────────── */
.default-page-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.default-page-card h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.default-page-body {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}

.default-page-body h2 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.default-page-body h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
.default-page-body p  { margin-bottom: 16px; }
.default-page-body ul,
.default-page-body ol { list-style: revert; padding-left: 22px; margin-bottom: 14px; }

/* ── 44. RESPONSIVE — Phase 2C additions ──────────────────── */
@media (max-width: 1024px) {
  .page-main-layout  { grid-template-columns: 1fr 280px; }
  .contact-layout    { grid-template-columns: 1fr 280px; }
}

@media (max-width: 940px) {
  .page-main-layout  { grid-template-columns: 1fr; }
  .contact-layout    { grid-template-columns: 1fr; }
  .page-sidebar      { position: static; }
  .about-features-grid { grid-template-columns: 1fr; }
  .about-topics-grid   { grid-template-columns: 1fr; }
  .rules-grid          { grid-template-columns: 1fr; }
  .guide-example-box   { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .page-hero h1         { font-size: 24px; }
  .page-hero .page-hero-desc { font-size: 14px; }
  .about-stats-row      { grid-template-columns: 1fr; }
  .about-intro-section,
  .about-features-section,
  .about-topics-section,
  .contact-form-section,
  .rules-section,
  .guide-section,
  .policy-card          { padding: 24px; }
  .page-cta-section     { padding: 32px 24px; }
  .page-cta-section h2  { font-size: 20px; }
  .default-page-card    { padding: 24px; }
}

@media (max-width: 560px) {
  .page-hero { padding: 36px 0 28px; }
  .about-features-grid,
  .about-topics-grid   { grid-template-columns: 1fr; }
  .about-stat-item .stat-num { font-size: 26px; }
  .policy-card         { padding: 18px; }
}

/* ── 34. RESPONSIVE — Phase 2B additions ──────────────────── */
@media (max-width: 1024px) {
  .single-layout { grid-template-columns: 1fr 280px; gap: 24px; }
  .submit-form-card { padding: 28px; }
}

@media (max-width: 940px) {
  .single-layout { grid-template-columns: 1fr; }
  .single-layout .post-content { padding: 26px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .archive-header-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .single-qa .post-title { font-size: 22px; }
  .submit-page-header h1 { font-size: 22px; }
  .submit-form-card { padding: 22px; }
  .taxonomy-header { padding: 32px 0 24px; }
  .taxonomy-header h1 { font-size: 22px; }
  .filter-bar-inner { gap: 8px; }
}

@media (max-width: 560px) {
  .single-layout .post-content { padding: 18px; }
  .submit-form-card { padding: 18px; }
  .filter-bar-inner { flex-direction: column; align-items: flex-start; }
  .taxonomy-header-inner { flex-direction: column; }
  .tax-icon { width: 48px; height: 48px; font-size: 22px; }
  .toc-box { padding: 14px 16px; }
  .result-item { padding: 16px; }
}

/* ══════════════════════════════════════════════════════════════
   35. AUTH — Đăng ký / Đăng nhập / Tài khoản
══════════════════════════════════════════════════════════════ */

/* ── Header user-nav ──────────────────────────────────────── */
.user-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
.user-nav .btn-login {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s, color .2s;
  white-space: nowrap;
}
.user-nav .btn-login:hover { border-color: var(--red); color: var(--red); }

.user-nav .btn-register {
  padding: 6px 14px;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
}
.user-nav .btn-register:hover { background: var(--red-dark); }

.user-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.user-avatar-wrap .user-display-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-avatar-wrap a { text-decoration: none; }
.user-avatar-wrap .btn-logout-sm {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color .2s, border-color .2s;
}
.user-avatar-wrap .btn-logout-sm:hover { color: var(--red); border-color: var(--red); }

/* ── Auth page wrapper ────────────────────────────────────── */
.auth-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 16px 80px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.auth-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 6px;
  text-align: center;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.5;
}
.auth-form { display: grid; gap: 16px; }

/* ── Auth buttons & misc ─────────────────────────────────── */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  background: var(--surface);
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-secondary:hover { background: var(--red); color: #fff; }

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: #fff;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s, border-color .2s;
}
.btn-logout:hover { color: var(--red); border-color: var(--red); }

.link-resend {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--red);
  text-decoration: underline;
  cursor: pointer;
}
.auth-alt-link {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}
.auth-alt-link a { color: var(--red); text-decoration: underline; }

/* ── Math question field ──────────────────────────────────── */
.math-question { background: var(--bg); border-radius: 10px; padding: 14px 16px; }
.math-question label { font-size: 14px; }

/* ── Check label ─────────────────────────────────────────── */
.form-field--check .check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.form-field--check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--red); }

/* ── Auth gate notice (submit page) ──────────────────────── */
.auth-gate-notice { margin-bottom: 24px; }
.auth-gate-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════
   36. DASHBOARD — Trang tài khoản người dùng
══════════════════════════════════════════════════════════════ */
.dashboard-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 16px 80px;
}

/* ── Header info ──────────────────────────────────────────── */
.dashboard-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.dashboard-avatar img.user-avatar {
  border-radius: 50%;
  display: block;
}
.dashboard-info { flex: 1; min-width: 180px; }
.dashboard-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 2px;
}
.dashboard-username { font-size: 13px; color: var(--muted); margin: 0; }
.dashboard-email    { font-size: 13px; color: var(--muted); margin: 0; }
.dashboard-actions  { flex-shrink: 0; }

/* ── Verify notice ────────────────────────────────────────── */
.dashboard-verify-notice { margin-bottom: 24px; }

/* ── Section ──────────────────────────────────────────────── */
.dashboard-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
}
.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.dashboard-section-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--heading);
  margin: 0;
}
.btn-new-question {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}
.btn-new-question:hover { background: var(--red-dark); }

/* ── Empty state ──────────────────────────────────────────── */
.dashboard-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.dashboard-empty p { margin-bottom: 16px; }

/* ── Question list ────────────────────────────────────────── */
.dashboard-questions-list { display: grid; gap: 12px; }
.dashboard-question-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: grid;
  gap: 6px;
  transition: border-color .2s;
}
.dashboard-question-item:hover { border-color: var(--red); }
.dq-meta { display: flex; align-items: center; gap: 10px; }
.dq-date { font-size: 12px; color: var(--muted); }
.dq-title { font-size: 15px; font-weight: 600; color: var(--heading); line-height: 1.4; }
.dq-title a { color: inherit; text-decoration: none; }
.dq-title a:hover { color: var(--red); }
.dq-terms { font-size: 12px; color: var(--muted); }

/* ── Status badges ────────────────────────────────────────── */
.badge-ok      { display:inline-block; padding:2px 8px; border-radius:20px; font-size:11px; font-weight:700; background:rgba(16,185,129,.12); color:#065f46; }
.badge-pending { display:inline-block; padding:2px 8px; border-radius:20px; font-size:11px; font-weight:700; background:rgba(245,158,11,.12); color:#92400e; }
.badge-draft   { display:inline-block; padding:2px 8px; border-radius:20px; font-size:11px; font-weight:700; background:rgba(107,114,128,.1);  color:#4b5563; }

/* ── Comment math field ───────────────────────────────────── */
.comment-form-math {
  display: grid;
  gap: 6px;
}
.comment-form-math label { font-size: 14px; font-weight: 600; color: var(--text); }
.comment-form-math input[type="number"] {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  transition: border-color .2s;
}
.comment-form-math input[type="number"]:focus {
  border-color: var(--red);
  outline: none;
}

/* ── Auth responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  .auth-card { padding: 28px 20px; }
  .auth-title { font-size: 22px; }
  .dashboard-header { padding: 20px; gap: 14px; }
  .dashboard-section { padding: 20px; }
  .auth-gate-actions { flex-direction: column; }
  .auth-gate-actions .btn-submit,
  .auth-gate-actions .btn-secondary { justify-content: center; text-align: center; }
  .user-nav .btn-login,
  .user-nav .btn-register { padding: 5px 10px; font-size: 12px; }
}
