/* ===== Regional Dialect, Accent & Slang Interactive Quizzes =====
 * Shared stylesheet for:
 *   - /quiz/ (Hub)
 *   - /quiz/us-regional-slang-test/
 *   - /quiz/british-vs-american-accent-quiz/
 *   - /quiz/southern-dialect-map-quiz/
 *
 * Strictly uses semantic CSS custom properties from /styles/main.css (zero raw hex).
 * Supports WCAG AA/AAA contrast, :focus-visible, prefers-reduced-motion,
 * prefers-contrast: more, forced-colors: active, [dir="rtl"], and 390px mobile viewports.
 */

.dq-main {
  padding-top: 84px;
  background: var(--bg);
  color: var(--text-body);
  max-width: 100%;
  overflow-x: clip;
}

.dq-main .breadcrumb {
  padding-top: 8px;
}

.dq-hero {
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.dq-hero-inner,
.dq-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  min-width: 0;
}

.dq-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dq-kicker {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.dq-hub-pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.dq-hub-pill-link:hover {
  border-color: var(--gold-bright);
  color: var(--text);
}

.dq-hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.22;
  color: var(--gold-bright);
  overflow-wrap: anywhere;
}

.dq-lede {
  margin: 0 0 16px;
  font-size: 1.04rem;
  line-height: 1.68;
  color: var(--text-body);
  max-width: 840px;
}

.dq-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dq-trust-pills li {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 600;
}

/* ===== HUB DIRECTORY CARDS ===== */
.dq-hub-section {
  padding: 32px 0 38px;
}

.dq-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.dq-hub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.dq-hub-card:hover {
  border-color: var(--gold-bright);
  transform: translateY(-2px);
}

.dq-hub-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dq-hub-card h2 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 1.22rem;
  line-height: 1.3;
  color: var(--gold-bright);
  overflow-wrap: anywhere;
}

.dq-hub-card p {
  margin: 0 0 14px;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-body);
}

.dq-hub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.dq-hub-meta li {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
}

/* ===== INTERACTIVE 12-QUESTION QUIZ SHELL ===== */
.dq-tool-section {
  padding: 32px 0 36px;
}

.dq-shell {
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  padding: 24px;
  min-width: 0;
  box-sizing: border-box;
}

.dq-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.dq-cue-pill {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--gold-bright);
  font-size: 0.74rem;
}

.dq-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--line);
}

.dq-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.dq-question-title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 1.22rem;
  line-height: 1.38;
  color: var(--text);
  overflow-wrap: anywhere;
}

.dq-question-hint {
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.52;
  color: var(--muted);
}

.dq-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.dq-option-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.dq-option-btn:hover {
  border-color: var(--gold);
  background: var(--bg-alt);
  color: var(--text);
}

.dq-option-key {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.dq-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.dq-back-btn {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.dq-back-btn:hover {
  border-color: var(--gold);
  color: var(--text);
}

/* ===== RESULT PANEL, CONFIDENCE BARS & SHAREABLE CARD ===== */
.dq-result {
  padding-top: 4px;
  min-width: 0;
}

.dq-result-banner {
  padding: 20px;
  background: var(--bg);
  border: 2px solid var(--gold);
  border-radius: 12px;
  text-align: center;
  margin-bottom: 18px;
}

.dq-result-kicker {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.dq-result-title {
  margin: 4px 0 8px;
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  line-height: 1.28;
  color: var(--gold-bright);
  overflow-wrap: anywhere;
}

.dq-result-summary {
  margin: 0 auto;
  max-width: 700px;
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--text-body);
  overflow-wrap: anywhere;
}

.dq-spectrum-box {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  margin-bottom: 18px;
}

.dq-spectrum-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.dq-spectrum-track {
  position: relative;
  height: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.dq-spectrum-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
}

.dq-spectrum-caption {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
}

.dq-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.dq-metric-card {
  padding: 15px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}

.dq-metric-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 5px;
}

.dq-metric-val {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.dq-metric-note {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-body);
  overflow-wrap: anywhere;
}

.dq-bars-box {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 18px;
}

.dq-bars-title {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.dq-bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 38%) minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
}

.dq-bar-row:last-child {
  margin-bottom: 0;
}

.dq-bar-name {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.dq-bar-track {
  height: 9px;
  background: var(--bg-card);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.dq-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
}

.dq-bar-pct {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dq-share-card-box {
  padding: 16px;
  background: var(--bg);
  border: 1px dashed var(--gold-dim);
  border-radius: 10px;
  margin-bottom: 14px;
}

.dq-share-card-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.dq-share-card-preview {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dq-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.dq-copy-status {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-bright);
}

/* ===== DOSSIER / PRO PASS UPGRADE HOOK ===== */
.dq-dossier-cta {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--gold);
  border-radius: 12px;
  margin-top: 16px;
}

.dq-dossier-kicker {
  margin: 0 0 6px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.dq-dossier-title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 1.16rem;
  line-height: 1.35;
  color: var(--gold-bright);
  overflow-wrap: anywhere;
}

.dq-dossier-copy {
  margin: 0 0 16px;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-body);
}

.dq-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dq-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--gold);
  color: var(--bg);
  border: 2px solid var(--gold);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dq-btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--bg);
}

.dq-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  background: var(--bg-card);
  color: var(--gold-bright);
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.dq-btn-secondary:hover {
  border-color: var(--gold-bright);
  color: var(--text);
}

.dq-offer-fineprint {
  margin: 12px 0 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ===== EDITORIAL REFERENCE SECTIONS ===== */
.dq-section {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.dq-section-alt {
  background: var(--bg-alt);
}

.dq-section h2 {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
  line-height: 1.3;
  color: var(--gold-bright);
  overflow-wrap: anywhere;
}

.dq-section p {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.72;
  color: var(--text-body);
}

.dq-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.dq-info-card {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}

.dq-info-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 1.06rem;
  color: var(--gold);
  overflow-wrap: anywhere;
}

.dq-info-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--text-body);
}

.dq-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-card);
}

.dq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.dq-table th,
.dq-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.dq-table th {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: var(--bg);
}

.dq-table td {
  color: var(--text-body);
}

.dq-table tr:last-child td {
  border-bottom: 0;
}

.dq-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.dq-related-card {
  display: block;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  min-width: 0;
  transition: border-color 0.2s ease;
}

.dq-related-card:hover {
  border-color: var(--gold);
}

.dq-related-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--gold-bright);
  overflow-wrap: anywhere;
}

.dq-related-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.52;
  color: var(--muted);
}

.dq-note-box {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-inline-start: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.58;
  color: var(--muted);
}

/* ===== KEYBOARD FOCUS, RTL, REDUCED MOTION & CONTRAST ===== */
.dq-hub-pill-link:focus-visible,
.dq-hub-card a:focus-visible,
.dq-option-btn:focus-visible,
.dq-back-btn:focus-visible,
.dq-btn-primary:focus-visible,
.dq-btn-secondary:focus-visible,
.dq-related-card:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

[dir="rtl"] .dq-option-btn,
[dir="rtl"] .dq-table th,
[dir="rtl"] .dq-table td {
  text-align: right;
}

[dir="rtl"] .dq-bar-pct {
  text-align: left;
}

@media (max-width: 860px) {
  .dq-hub-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .dq-hero-inner,
  .dq-container {
    padding: 0 16px;
  }
  .dq-shell {
    padding: 16px 14px;
  }
  .dq-metrics-grid,
  .dq-cards-grid,
  .dq-related-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dq-bar-row {
    grid-template-columns: minmax(86px, 40%) minmax(0, 1fr) 40px;
    gap: 8px;
  }
  .dq-btn-row,
  .dq-action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .dq-btn-primary,
  .dq-btn-secondary {
    width: 100%;
  }
  .dq-table th,
  .dq-table td {
    padding: 9px 10px;
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dq-hub-card,
  .dq-progress-fill,
  .dq-option-btn,
  .dq-btn-primary,
  .dq-btn-secondary,
  .dq-related-card {
    transition: none;
    transform: none;
  }
}

@media (prefers-contrast: more) {
  .dq-shell,
  .dq-hub-card,
  .dq-option-btn,
  .dq-metric-card,
  .dq-bars-box,
  .dq-info-card,
  .dq-related-card,
  .dq-table-wrap {
    border-color: var(--gold-bright);
  }
  .dq-question-hint,
  .dq-offer-fineprint,
  .dq-related-card p,
  .dq-note-box {
    color: var(--text);
  }
}

@media (forced-colors: active) {
  .dq-progress-fill,
  .dq-bar-fill,
  .dq-spectrum-fill {
    background: Highlight;
  }
  .dq-option-btn:focus-visible,
  .dq-btn-primary:focus-visible,
  .dq-btn-secondary:focus-visible {
    outline: 2px solid ButtonText;
  }
}
