
/* ============================================================
   TABAYUN - COMPLETE WEBSITE STYLES
   White, Navy and Blue
   English / Arabic / Dark Mode / Responsive
   ============================================================ */

:root {
  --red: #245f8f;
  --red-bright: #3678aa;
  --red-deep: #12324d;
  --red-soft: #edf4f9;
  --red-line: #c8dce9;
  --gold: #557d9d;
  --gold-bright: #85a9c4;
  --gold-soft: #f0f5f9;
  --gold-line: #d5e2ec;
  --gold-ink: #315c7d;
  --green: #2f7a5c;
  --green-ink: #245f48;
  --green-soft: #edf7f2;
  --green-line: #cce6da;
  --amber-ink: #84620d;
  --amber-soft: #faf6e8;
  --amber-line: #eadfb3;
  --violet-ink: #53627d;
  --violet-soft: #f1f3f7;
  --violet-line: #dce2e9;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef3f7;
  --border: #dce4ec;
  --border-strong: #c7d3df;
  --text: #172536;
  --text-dim: #566574;
  --text-faint: #83909c;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(18,50,77,.04),
            0 10px 24px -20px rgba(18,50,77,.28);
  --shadow-brand: 0 10px 20px -16px rgba(36,95,143,.42);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --red: #76b2df;
  --red-bright: #9ac9e8;
  --red-deep: #0b2437;
  --red-soft: #152737;
  --red-line: #29475e;
  --gold: #8fb4cf;
  --gold-bright: #b0ccdf;
  --gold-soft: #172630;
  --gold-line: #314858;
  --gold-ink: #c6deef;
  --green: #70c49a;
  --green-ink: #9ddbb9;
  --green-soft: #142a21;
  --green-line: #315a47;
  --amber-ink: #f0cd72;
  --amber-soft: #2b2618;
  --amber-line: #5b4c25;
  --violet-ink: #c9d1dc;
  --violet-soft: #242a34;
  --violet-line: #3a4452;
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c222b;
  --surface-3: #232b36;
  --border: #30363d;
  --border-strong: #46515f;
  --text: #f0f6fc;
  --text-dim: #c2ccd6;
  --text-faint: #8b98a5;
}

/* GLOBAL */

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system,
               "Inter", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s, color .2s;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.3;
}

a { color: inherit; }

p, a, span, .result-card, .history-item {
  overflow-wrap: anywhere;
}

.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;
}

/* HEADER */

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 13px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(18,50,77,.035);
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  display: block;
  height: 46px;
  width: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-divider {
  width: 1px;
  height: 36px;
  background: var(--border-strong);
}

.brand h1 {
  color: var(--red-deep);
  font-size: 20px;
  font-weight: 700;
}

.brand-sub {
  margin: 1px 0 0;
  color: var(--text-dim);
  font-size: 12.5px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.main-nav a,
.main-nav a:visited {
  padding: 8px 3px;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 600;
}

.main-nav a:hover,
.main-nav .nav-link.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

.language-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: 20px;
}

.language-toggle:hover,
.theme-toggle:hover {
  background: var(--red-soft);
  border-color: var(--red);
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pill--muted {
  color: var(--text-dim);
  background: var(--surface-3);
}

.pill--ok {
  color: var(--green-ink);
  background: var(--green-soft);
  border-color: var(--green-line);
}

.pill--bad {
  color: #a64a51;
  background: #f9eeee;
  border-color: #e5c7ca;
}

/* GENERAL LAYOUT */

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(340px,5fr) minmax(400px,7fr);
  gap: 22px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 28px 40px;
  align-items: start;
}

.panel {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin-bottom: 6px;
  color: var(--red);
  font-size: 16px;
}

.panel--input {
  position: sticky;
  top: 20px;
}

.hint {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 13px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row--between {
  justify-content: space-between;
  margin-top: 8px;
}

/* FORMS */

textarea,
.claim-field,
.field input,
.history-search,
.history-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

textarea {
  line-height: 1.6;
  resize: vertical;
}

textarea:focus,
.claim-field:focus,
.field input:focus,
.history-search:focus,
.history-select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(36,95,143,.15);
}

textarea::placeholder,
input::placeholder {
  color: var(--text-faint);
  opacity: 1;
}

.char-count,
.claim-count {
  color: var(--text-faint);
  font-size: 12px;
}

.char-count.over {
  color: #b3444a;
  font-weight: 700;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.field input { font-weight: 400; }

.field-label {
  display: block;
  margin: 18px 0 6px;
  font-weight: 700;
}

.claim-count {
  margin: 4px 0 0;
  text-align: end;
}

/* BUTTONS */

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s,
              opacity .15s, border-color .15s;
}

.btn:active { transform: translateY(1px); }

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.btn--primary {
  width: 100%;
  margin-top: 16px;
  padding: 13px 18px;
  background: linear-gradient(135deg,#3678aa,#12324d);
  color: #fff;
  font-size: 15px;
  box-shadow: var(--shadow-brand);
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg,#4382b1,#173f60);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text-dim);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  background: var(--red-soft);
  color: var(--red);
  border-color: var(--red);
}

.btn--sm {
  padding: 5px 12px;
  font-size: 12.5px;
}

.btn.is-loading { opacity: .9; cursor: progress; }

.btn.is-loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-inline-end: 9px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

a.btn--primary,
a.btn--primary:visited { color: #fff; }

/* SWITCH */

.toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #cbd5df;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s;
}

.toggle input:checked + .toggle-track {
  background: var(--red);
}

.toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(18px);
}

.toggle-label { font-weight: 600; }

.toggle-label small {
  display: block;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 400;
}

/* SAMPLE CHIPS */

.samples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.samples-title {
  width: 100%;
  color: var(--text-faint);
  font-size: 12px;
}

.chip {
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.chip:hover {
  background: var(--red-soft);
  border-color: var(--red);
}

/* LOADING AND ERRORS */

.empty-state,
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-dim);
  text-align: center;
}

.empty-icon {
  margin-bottom: 10px;
  font-size: 34px;
}

.loading-sub {
  color: var(--text-faint);
  font-size: 12.5px;
}

.spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border: 3px solid rgba(36,95,143,.16);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e7c9cc;
  border-radius: var(--radius-sm);
  background: #faf0f1;
  color: #85353b;
}

.error-box p { margin: 0; }

.error-inline {
  margin: 10px 0 0;
  color: #b42318;
  text-align: center;
}

.loading-bar {
  width: min(260px,80%);
  height: 5px;
  margin: 14px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.loading-bar span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--red);
  animation: slide 1.3s ease-in-out infinite;
}

@keyframes slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(260%); }
}

.loading-elapsed {
  color: var(--text-faint);
  font-size: 12.5px;
}

/* RESULT INTERFACE */

.result { animation: fade-up .28s ease both; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.fc,
.media-result {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.assess {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}

.assess-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.assess-sub {
  margin: 2px 0 12px;
  color: var(--text-dim);
  font-size: 14px;
}

.assess-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.verdict-block {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.verdict-badge {
  display: inline-block;
  padding: 9px 15px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
}

.verdict--real {
  color: var(--green-ink);
  background: var(--green-soft);
  border-color: var(--green-line);
}

.verdict--fake {
  color: #88363a;
  background: #faeeee;
  border-color: #e5c8ca;
}

.verdict--mislead,
.verdict--misleading {
  color: var(--amber-ink);
  background: var(--amber-soft);
  border-color: var(--amber-line);
}

.verdict--satire {
  color: var(--violet-ink);
  background: var(--violet-soft);
  border-color: var(--violet-line);
}

.verdict--unknown {
  color: var(--violet-ink);
  background: var(--violet-soft);
  border-color: var(--violet-line);
}

.confidence-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 12px;
}

.confidence-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-3);
}

.confidence-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg,var(--red),#79a4c3);
  transition: width .5s ease;
}

.result-headline {
  margin-top: 12px;
  color: var(--red);
  font-size: 18px;
}

.result-summary {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.7;
}

.ocr-text {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.meta-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-block;
  padding: 4px 11px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 11.5px;
  font-weight: 600;
}

.tag--muted {
  background: var(--surface-3);
  border-color: var(--border);
  color: var(--text-dim);
}

.tag--warn {
  background: var(--amber-soft);
  color: var(--amber-ink);
  border-color: var(--amber-line);
}

.state-note {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-dim);
}

.warn-note {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid var(--amber-line);
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.none-note {
  margin: 0;
  color: var(--text-faint);
  font-size: 13.5px;
  font-style: italic;
}

.block { margin-top: 18px; }

.block h4 {
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* CLAIMS */

.claims-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.claim {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.claim--supported { border-left-color: var(--green); }
.claim--contradicted { border-left-color: #ad5157; }
.claim--unverified { border-left-color: #b68a22; }
.claim--opinion { border-left-color: #677792; }

.claim-text {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.claim-body {
  margin: 0;
  color: var(--text-dim);
  font-size: 13.5px;
}

.claim-tag {
  display: inline-block;
  margin-bottom: 7px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
}

.claim-tag--supported {
  background: var(--green-soft);
  color: var(--green-ink);
}

.claim-tag--contradicted {
  background: #faeeee;
  color: #88363a;
}

.claim-tag--unverified {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.claim-tag--opinion {
  background: var(--violet-soft);
  color: var(--violet-ink);
}

.bullet-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-inline-start: 20px;
  font-size: 13.5px;
}

.bullet-list li { color: var(--text-dim); }

/* SOURCES */

.sources-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-inline-start: 20px;
  font-size: 13.5px;
}

.source-cards {
  list-style: none;
  padding: 0;
}

.source-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.source-link,
.sources-list a {
  color: var(--red);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.source-link:hover { color: var(--red-bright); }

.source-link::after {
  content: " \2197";
}

.cite-num {
  color: var(--text-dim);
  font-weight: 700;
}

.source-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.disclaimer {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12px;
}

.how-to-read {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--red-soft);
}

/* ============================================================
   DETAILED ANALYSIS - EXPANDABLE PANEL
   ============================================================ */

.details-panel {
  margin-top: 4px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.details-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 16px 20px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
}

.details-toggle::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 23px;
  font-weight: 400;
  color: var(--red);
}

.details-toggle[aria-expanded="true"]::after {
  content: "\2212";
}

.details-toggle:hover {
  background: var(--red-soft);
}

.details-toggle:focus-visible {
  outline: 3px solid var(--red-bright);
  outline-offset: -3px;
}

.details-panel.is-open {
  border-color: var(--red-line);
}

.details-content {
  padding: 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.details-content[hidden] {
  display: none !important;
}

.details-content > .media-result {
  display: grid;
  gap: 16px;
}

.details-content .assess {
  background: var(--surface-2);
}

.details-content .assess-title {
  font-size: 16px;
}

.details-content .ocr-text {
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Native details support */

details.details-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 700;
}

details.details-panel > summary::-webkit-details-marker {
  display: none;
}

details.details-panel > summary::after {
  content: "+";
  color: var(--red);
  font-size: 22px;
}

details.details-panel[open] > summary::after {
  content: "\2212";
}

details.details-panel[open] > :not(summary) {
  padding: 18px;
  border-top: 1px solid var(--border);
}

/* MEDIA TOOLS */

.media-tool-panel {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 42px 35px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.media-tool-panel h2 {
  color: var(--red);
  font-size: 26px;
}

.media-tool-panel > p {
  max-width: 600px;
  margin: 12px auto 28px;
  color: var(--text-dim);
}

.media-tool-icon,
.tool-icon,
.tool-selector-icon,
.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--red-line);
  border-radius: 9px;
  background: var(--red-soft);
}

.media-tool-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  font-size: 28px;
}

.upload-area {
  max-width: 650px;
  margin: 0 auto;
  padding: 45px 30px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.upload-area h3 {
  color: var(--red);
  font-size: 18px;
}

.upload-area p {
  color: var(--text-faint);
  font-size: 13px;
}

.upload-area input[type="file"] { max-width: 100%; }

.media-preview-item {
  display: block;
  max-width: 100%;
  max-height: 360px;
  margin: 16px auto 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.media-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.media-actions .btn {
  min-height: 44px;
  padding-inline: 18px;
}

.media-analyze-btn {
  width: auto;
  margin-top: 25px;
  padding-inline: 28px;
}

.media-results {
  margin-top: 26px;
  text-align: start;
}

.upload-status {
  max-width: 640px;
  margin: 18px auto 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--red);
}

.progress--wait span {
  width: 40%;
  animation: slide 1.3s ease-in-out infinite;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(130px,1fr));
  gap: 10px;
}

.fact {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.fact-label {
  display: block;
  color: var(--text-faint);
  font-size: 12px;
}

.fact-value {
  display: block;
  margin-top: 2px;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* DASHBOARD */

.dashboard,
.tools-page,
.history-page,
.about-page,
.contact-page {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: 60px 28px;
}

.dashboard { max-width: 1200px; }
.tools-page { max-width: 1440px; }
.history-page { max-width: 1000px; }
.about-page { max-width: 1100px; }
.contact-page { max-width: 1000px; }

.dashboard-hero,
.tools-heading,
.history-header,
.about-hero,
.contact-hero {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
}

.dashboard-hero { padding: 48px 35px; }

.dashboard-hero h2,
.tools-heading h2,
.history-header h2,
.about-hero h2,
.contact-hero h2 {
  color: var(--red);
  font-size: 34px;
  letter-spacing: -.03em;
}

.dashboard-hero h2 { font-size: 40px; }

.dashboard-hero p,
.tools-heading p,
.history-header p,
.about-hero p,
.contact-hero p {
  color: var(--text-dim);
  line-height: 1.8;
}

.dashboard-label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  border: 1px solid var(--red-line);
  border-radius: 7px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-button,
.history-button {
  display: inline-block;
  width: auto;
  margin-top: 24px;
  padding: 12px 24px;
  text-decoration: none;
}

.dashboard-tools { margin-top: 40px; }

.dashboard-section-heading {
  margin-bottom: 30px;
  text-align: center;
}

.dashboard-section-heading h2 {
  color: var(--red);
  font-size: 27px;
}

.tool-cards,
.tool-selector,
.about-grid,
.activity-grid {
  display: grid;
  gap: 20px;
}

.tool-cards,
.tool-selector,
.activity-grid {
  grid-template-columns: repeat(3,1fr);
}

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

.tool-card,
.about-card,
.contact-card,
.history-card,
.history-item {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-card {
  display: block;
  position: relative;
  color: var(--text);
  text-decoration: none;
  transition: transform .15s;
}

.tool-card:hover { transform: translateY(-2px); }

.tool-card h3,
.about-card h3,
.contact-card h3,
.history-card h3 {
  margin-bottom: 10px;
  color: var(--red);
  font-size: 19px;
}

.tool-card p,
.about-card p,
.contact-card p {
  color: var(--text-dim);
  font-size: 14px;
}

.tool-card--disabled {
  opacity: .65;
  cursor: default;
}

.tool-selector {
  max-width: 1000px;
  margin: 0 auto 35px;
  gap: 14px;
}

.tool-selector-btn {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.tool-selector-btn.active {
  background: var(--red-soft);
  border-color: var(--red);
}

.tool-selector-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  font-size: 22px;
}

.tool-selector-btn strong {
  display: block;
  color: var(--red);
  font-size: 14px;
}

.tool-selector-btn small {
  display: block;
  color: var(--text-dim);
  font-size: 11.5px;
}

.tools-layout { padding-inline: 0; }

/* HISTORY */

.history-actions,
.history-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto 20px;
}

.history-list {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

.history-item-top,
.history-item-right,
.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.history-type,
.history-verdict,
.history-meta-item {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.history-verdict--likely_real {
  color: var(--green-ink);
  background: var(--green-soft);
}

.history-verdict--likely_fake {
  color: #88363a;
  background: #faeeee;
}

.history-verdict--misleading {
  color: var(--amber-ink);
  background: var(--amber-soft);
}

.history-verdict--satire,
.history-verdict--unverifiable {
  color: var(--violet-ink);
  background: var(--violet-soft);
}

.history-date {
  color: var(--text-faint);
  font-size: 12px;
}

.history-item-title {
  margin: 14px 0 10px;
  color: var(--red);
  font-size: 19px;
}

.history-input-preview {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 13px;
}

.history-summary,
.history-detail-text {
  color: var(--text-dim);
  font-size: 14px;
}

.history-delete-btn,
.history-details-btn {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.history-delete-btn {
  color: #a64a51;
}

.history-details {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.history-detail-block { margin-bottom: 20px; }

.history-detail-block h4 {
  margin-bottom: 8px;
  color: var(--red);
  font-size: 13px;
}

.history-detail-sources {
  display: grid;
  gap: 8px;
  padding-inline-start: 20px;
}

.history-detail-sources a {
  color: var(--red);
  text-decoration: underline;
}

.history-search { flex: 1 1 240px; }
.history-select { flex: 0 1 190px; }

.history-no-match,
.history-gate {
  max-width: 900px;
  margin: 20px auto;
  padding: 18px;
  text-align: center;
  color: var(--text-dim);
}

/* AUTHENTICATION */

.auth-slot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.auth-btn { text-decoration: none; }

.auth-page {
  display: flex;
  justify-content: center;
  padding: 56px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 18px 0 6px;
  color: var(--red);
  font-size: 24px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.auth-tab {
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.auth-card form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.auth-switch {
  text-align: center;
  color: var(--text-dim);
}

.link-btn {
  border: 0;
  background: none;
  color: var(--red);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pw-rules {
  list-style: none;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 13px;
}

.pw-rules li::before {
  content: "\25CB";
  margin-inline-end: 8px;
}

.pw-rules li.ok::before {
  content: "\2713";
  color: var(--green);
}

/* ABOUT AND CONTACT */

.contact-card {
  max-width: 700px;
  margin: 0 auto;
}

.contact-placeholder {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.contact-placeholder span { color: var(--text-dim); }

.privacy-note {
  margin: 10px 0;
  color: var(--text-dim);
  font-size: 13px;
}

.privacy-note a {
  color: var(--red);
  text-decoration: underline;
}

/* FOOTER */

.site-footer {
  margin-top: 70px;
  background: #102a41;
  color: #fff;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.4fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 52px 28px 42px;
}

.footer-column h3,
.footer-column h4 {
  margin-bottom: 16px;
  color: #fff;
}

.footer-column p,
.footer-column a {
  color: #cdd8e2;
  font-size: 14px;
  text-decoration: none;
}

.footer-column a {
  display: block;
  margin-bottom: 10px;
}

.footer-column a:hover { color: #fff; }

.footer-tabayyun-logo,
.footer-main-logo {
  display: block;
  max-width: 100%;
  height: auto;
  margin-bottom: 16px;
  object-fit: contain;
}

.footer-tabayyun-logo { width: 240px; }
.footer-main-logo { width: 320px; }

.footer-bottom {
  padding: 18px 28px;
  border-top: 1px solid rgba(255,255,255,.12);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: #9fb1c1;
  font-size: 13px;
}

/* ICONS */

.icon-img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.icon-img--dark { display: none; }

:root[data-theme="dark"] .icon-img--light {
  display: none;
}

:root[data-theme="dark"] .icon-img--dark {
  display: block;
}

.media-tool-icon .icon-img {
  width: 46px;
  height: 46px;
}

.tool-icon .icon-img {
  width: 34px;
  height: 34px;
}

/* 404 PAGE */

.not-found-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 28px;
}

.not-found-card {
  width: 100%;
  max-width: 720px;
  padding: 55px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.not-found-code {
  color: var(--red);
  font-size: 64px;
  font-weight: 700;
}

.not-found-card h2 { color: var(--red); }

.not-found-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* DARK MODE */

:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .tool-selector-btn,
:root[data-theme="dark"] .language-toggle,
:root[data-theme="dark"] .btn--ghost,
:root[data-theme="dark"] .details-toggle {
  background: var(--surface);
}

:root[data-theme="dark"] .brand h1,
:root[data-theme="dark"] .panel h2,
:root[data-theme="dark"] .tool-card h3,
:root[data-theme="dark"] .tool-selector-btn strong,
:root[data-theme="dark"] .media-tool-panel h2,
:root[data-theme="dark"] .dashboard-hero h2,
:root[data-theme="dark"] .history-item-title,
:root[data-theme="dark"] .auth-card h2 {
  color: var(--text);
}

:root[data-theme="dark"] .details-toggle:hover {
  background: var(--surface-3);
}

:root[data-theme="dark"] .verdict--fake,
:root[data-theme="dark"] .claim-tag--contradicted,
:root[data-theme="dark"] .error-box {
  color: #f2a1a6;
  background: #2f1a1d;
  border-color: #5c2f33;
}

:root[data-theme="dark"] .btn--primary {
  background: linear-gradient(135deg,#2f6fa3,#1a4468);
}

/* ARABIC / RTL */

html[dir="rtl"] body { direction: rtl; }

html[dir="rtl"] .brand {
  flex-direction: row-reverse;
}

html[dir="rtl"] .main-nav {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .panel,
html[dir="rtl"] .tool-card,
html[dir="rtl"] .history-item,
html[dir="rtl"] .contact-card,
html[dir="rtl"] .about-card {
  text-align: right;
}

html[dir="rtl"] .claim {
  border-left: 1px solid var(--border);
  border-right: 3px solid var(--border-strong);
}

html[dir="rtl"] .claim--supported {
  border-right-color: var(--green);
}

html[dir="rtl"] .claim--contradicted {
  border-right-color: #ad5157;
}

html[dir="rtl"] .claim--unverified {
  border-right-color: #b68a22;
}

html[dir="rtl"] .claim--opinion {
  border-right-color: #677792;
}

html[dir="rtl"] .footer-column {
  text-align: right;
}

/* ACCESSIBILITY */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--red-bright);
  outline-offset: 3px;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: .65;
}

/* RESPONSIVE */

@media (max-width: 1280px) {
  .brand-sub { display: none; }
}

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .panel--input { position: static; }

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

@media (max-width: 900px) {
  .topbar { justify-content: center; }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}

@media (max-width: 800px) {
  .tool-cards,
  .tool-selector,
  .activity-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 14px 16px;
  }

  .brand-logo { height: 40px; }
  .brand h1 { font-size: 18px; }

  .main-nav {
    gap: 14px;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .main-nav a { white-space: nowrap; }

  .layout {
    padding: 16px;
  }

  .panel { padding: 18px; }

  .dashboard,
  .tools-page,
  .history-page,
  .about-page,
  .contact-page {
    padding: 40px 16px;
  }

  .dashboard-hero {
    padding: 35px 10px;
  }

  .dashboard-hero h2 {
    font-size: 30px;
  }

  .media-tool-panel {
    padding: 32px 20px;
  }

  .upload-area {
    padding: 35px 18px;
  }

  .tool-selector-btn {
    min-height: 68px;
    padding: 13px 14px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    padding: 42px 20px;
  }

  .contact-placeholder {
    flex-direction: column;
    gap: 5px;
  }

  .details-toggle {
    padding: 14px 16px;
    font-size: 14px;
  }

  .details-content {
    padding: 12px;
  }

  .assess { padding: 14px; }

  .verdict-block {
    grid-template-columns: 1fr;
  }

  .not-found-card {
    padding: 40px 22px;
  }
}

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

/* ================================================================
   RESULT PAGE (verdict banner, two answers, why, sources, details)
   ================================================================ */

:root {
  --rv-navy: #123a5e;
  --rv-danger: #b42318;
  --rv-danger-ink: #8f1d14;
  --rv-danger-soft: #fdf0ef;
  --rv-danger-line: #f4cdc9;
  --rv-caution: #b7791f;
  --rv-caution-ink: #8a5a12;
  --rv-caution-soft: #fdf8ec;
  --rv-caution-line: #efd9a6;
  --rv-safe: #2f7a5c;
  --rv-safe-soft: #edf7f2;
  --rv-safe-line: #cce6da;
  --rv-info: #245f8f;
  --rv-info-soft: #edf4f9;
  --rv-info-line: #c8dce9;
  --rv-neutral: #566574;
  --rv-neutral-soft: #f1f4f7;
  --rv-neutral-line: #dce4ec;
}

:root[data-theme="dark"] {
  --rv-navy: #76b2df;
  --rv-danger: #ff8a7f;
  --rv-danger-ink: #ffb4ab;
  --rv-danger-soft: #2c1715;
  --rv-danger-line: #5c2a26;
  --rv-caution: #f0cd72;
  --rv-caution-ink: #f0cd72;
  --rv-caution-soft: #2b2618;
  --rv-caution-line: #5b4c25;
  --rv-safe: #70c49a;
  --rv-safe-soft: #142a21;
  --rv-safe-line: #315a47;
  --rv-info: #9ac9e8;
  --rv-info-soft: #152737;
  --rv-info-line: #29475e;
  --rv-neutral: #a9b4bf;
  --rv-neutral-soft: #1b222b;
  --rv-neutral-line: #2f3a46;
}

.rv {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.rv-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.rv-back:hover { color: var(--rv-navy); text-decoration: underline; }
[dir="rtl"] .rv-back-arrow { transform: scaleX(-1); }

.rv-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}

.rv-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.rv-card-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.rv-count { color: var(--text-faint); font-size: 13px; }

/* Verdict banner */
.rv-main { padding: 0; overflow: hidden; }

.rv-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rv-neutral-line);
  background: var(--rv-neutral-soft);
}

.rv-banner-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--rv-neutral);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.rv-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rv-neutral);
}

.rv-banner-title {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--text);
}

.rv-banner--danger { background: var(--rv-danger-soft); border-color: var(--rv-danger-line); }
.rv-banner--danger .rv-banner-icon { background: var(--rv-danger); }
.rv-banner--danger .rv-eyebrow,
.rv-banner--danger .rv-banner-title { color: var(--rv-danger-ink); }

.rv-banner--caution { background: var(--rv-caution-soft); border-color: var(--rv-caution-line); }
.rv-banner--caution .rv-banner-icon { background: var(--rv-caution); }
.rv-banner--caution .rv-eyebrow,
.rv-banner--caution .rv-banner-title { color: var(--rv-caution-ink); }

.rv-banner--safe { background: var(--rv-safe-soft); border-color: var(--rv-safe-line); }
.rv-banner--safe .rv-banner-icon { background: var(--rv-safe); }
.rv-banner--safe .rv-eyebrow,
.rv-banner--safe .rv-banner-title { color: var(--rv-safe); }

.rv-banner--info { background: var(--rv-info-soft); border-color: var(--rv-info-line); }
.rv-banner--info .rv-banner-icon { background: var(--rv-info); }
.rv-banner--info .rv-eyebrow,
.rv-banner--info .rv-banner-title { color: var(--rv-info); }

:root[data-theme="dark"] .rv-banner-icon { color: #10151b; }

/* Thumbnail + answers */
.rv-main-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
}

.rv-main-body:has(> .rv-answers:only-child) { grid-template-columns: minmax(0, 1fr); }

.rv-thumb {
  align-self: start;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: #1f2a37;
}

.rv-thumb video,
.rv-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rv-answers { display: grid; gap: 14px; min-width: 0; }

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

.rv-answer-grid--single { grid-template-columns: minmax(0, 1fr); }

.rv-answer {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  min-width: 0;
}

.rv-answer-q {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.rv-answer-text {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
}

.rv-answer-meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-faint);
}

/* Badges */
.rv-badge {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.rv-badge--danger { background: var(--rv-danger); color: #fff; }
.rv-badge--caution { background: var(--rv-caution-soft); border-color: var(--rv-caution); color: var(--rv-caution-ink); }
.rv-badge--safe { background: var(--rv-safe-soft); border-color: var(--rv-safe); color: var(--rv-safe); }
.rv-badge--info { background: var(--rv-info-soft); border-color: var(--rv-info-line); color: var(--rv-info); }
.rv-badge--neutral { background: var(--rv-neutral-soft); border-color: var(--rv-neutral-line); color: var(--rv-neutral); }
:root[data-theme="dark"] .rv-badge--danger { color: #10151b; }

/* AI likelihood meter */
.rv-meter { margin-top: 12px; font-size: 13px; color: var(--text-dim); }

.rv-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.rv-meter-value { font-size: 14px; color: var(--text); }

.rv-meter-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.rv-meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--rv-neutral);
}

.rv-meter--danger .rv-meter-fill { background: var(--rv-danger); }
.rv-meter--danger .rv-meter-value { color: var(--rv-danger); }
.rv-meter--caution .rv-meter-fill { background: var(--rv-caution); }
.rv-meter--safe .rv-meter-fill { background: var(--rv-safe); }
.rv-meter--safe .rv-meter-value { color: var(--rv-safe); }

.rv-meter-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-faint);
}

/* Claim we checked */
.rv-claim {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface-2);
}

.rv-claim-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

.rv-claim-text {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Why we say this */
.rv-why {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rv-dot {
  position: relative;
  padding-inline-start: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  overflow-wrap: anywhere;
}

.rv-dot::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rv-neutral);
}

.rv-dot--danger::before { background: var(--rv-danger); }
.rv-dot--caution::before { background: var(--rv-caution); }
.rv-dot--safe::before { background: var(--rv-safe); }

.rv-cite {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-inline-end: 3px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--rv-info-soft);
  color: var(--rv-info);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  vertical-align: 1px;
}

.rv-cite:hover { background: var(--rv-info-line); }

/* Collapsible sections */
.rv-collapse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.rv-collapse-label { display: grid; gap: 2px; }
.rv-collapse-title { font-weight: 700; font-size: 15px; }
.rv-collapse-sub { font-size: 12px; color: var(--text-faint); }

.rv-chevron {
  flex: none;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .15s ease;
}

.rv-collapse.is-open .rv-chevron { transform: rotate(-135deg) translateY(-2px); }
.rv-collapse-body { padding-top: 14px; }

.rv-collapse--inline { margin-top: 16px; }
.rv-collapse--inline .rv-collapse-head { justify-content: flex-start; gap: 6px; width: auto; color: var(--rv-navy); }
.rv-collapse--inline .rv-collapse-title { font-size: 14px; font-weight: 600; }

.rv-full { display: grid; gap: 10px; }
.rv-full-summary,
.rv-full-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text); }
.rv-full-heading { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--text); }

.rv-claims { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

.rv-claim-row {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.rv-claim-row .rv-badge { font-size: 12px; padding: 2px 10px; }
.rv-claim-row-text { margin: 8px 0 4px; font-weight: 600; font-size: 14px; color: var(--text); }
.rv-claim-row-evidence { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-dim); }

/* Sources */
.rv-sources { margin: 0; padding: 0; list-style: none; }

.rv-source {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}

.rv-source:target { background: var(--rv-info-soft); }

.rv-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
}

.rv-source-body { display: grid; gap: 2px; min-width: 0; }

.rv-source-title {
  color: var(--rv-navy);
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
}

a.rv-source-title:hover { text-decoration: underline; }
.rv-source-domain { font-size: 12px; color: var(--text-faint); }

.rv-ext {
  color: var(--text-faint);
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  padding: 4px;
}

.rv-ext:hover { color: var(--rv-navy); }

/* Technical details */
.rv-collapse--card { padding: 16px 20px; }
.rv-tech { display: grid; gap: 16px; }

/* Actions */
.rv-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rv-btn {
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.rv-btn--primary { border: 1px solid var(--rv-navy); background: var(--rv-navy); color: #fff; }
.rv-btn--primary:hover { filter: brightness(1.1); }
.rv-btn--secondary { border: 1px solid var(--rv-navy); background: var(--surface); color: var(--rv-navy); }
.rv-btn--secondary:hover { background: var(--surface-2); }
:root[data-theme="dark"] .rv-btn--primary { color: #0d1117; }

.rv-back:focus-visible,
.rv-btn:focus-visible,
.rv-collapse-head:focus-visible,
.rv-cite:focus-visible,
.rv-source a:focus-visible {
  outline: 2px solid var(--rv-info);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .rv-card { padding: 16px; }
  .rv-banner { padding: 14px 16px; }
  .rv-main-body { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .rv-thumb { aspect-ratio: 16 / 9; max-height: 220px; }
  .rv-answer-grid { grid-template-columns: minmax(0, 1fr); }
  .rv-actions { grid-template-columns: minmax(0, 1fr); }
}

/* Result headings must not inherit the large panel heading style. */
.rv .rv-card-title,
:root[data-theme="dark"] .rv .rv-card-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--text);
}

.rv .rv-banner-title { font-size: 22px; letter-spacing: normal; }
.rv .rv-banner--neutral .rv-banner-title { color: var(--text); }

@media (max-width: 640px) {
  .rv .rv-banner-title { font-size: 19px; }
}
.rv .rv-answer-q { letter-spacing: normal; }

/* Some checks didn't finish */
.rv-notice {
  padding: 14px 18px;
  border: 1px solid var(--rv-caution-line);
  border-radius: 14px;
  background: var(--rv-caution-soft);
}

.rv .rv-notice-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--rv-caution-ink);
}

.rv-notice .bullet-list { margin: 0 0 8px; }
.rv-notice .hint { margin: 0; }

.rv .rv-banner-title { font-weight: 600; }
.rv .rv-eyebrow { font-weight: 600; }

.media-actions .btn {
  width: auto;
  min-width: 170px;
  min-height: 48px;
  margin-top: 0;
  padding: 12px 28px;
  font-size: 15px;
}
