/* Post Inspector — on Beth's site theme (see ../styles/main.css): pink accent,
   BethHand headings, Inclusive Sans body, soft plum ink on a pink→purple wash.
   Verdict colours stay semantic (green = supported, red = disputed, …) so the
   evidence still reads at a glance. Matches gym / tasks / workspace. */

:root {
  /* surface + ink scale, shared with gym / tasks / workspace */
  --ink: #2b2540;
  --ink-soft: #6b6480;
  --ink-faint: #a79fb5;
  --paper: #fceaf4;
  --card: #ffffff;
  --line: #eed4e6;
  --accent: var(--pink); /* #E32D91 from main.css */
  --accent-soft: color-mix(in srgb, var(--pink) 12%, white);

  /* verdict colours — semantic, kept distinct from the brand accent */
  --v-supported: #176b3a;
  --v-disputed: #b42318;
  --v-misleading: #b54708;
  --v-mixed: #7a5b00;
  --v-unverifiable: #6b6480;

  --radius: 12px;
  --maxw: 820px;
  /* Two-font system from the site: Inclusive Sans body, BethHand headings.
     --serif points at the body font so evidence copy stays readable (no
     handwriting for dense text); headings opt into --heading-font explicitly. */
  --sans: var(--body-font, "Inclusive Sans", system-ui, -apple-system, sans-serif);
  --serif: var(--body-font, "Inclusive Sans", system-ui, -apple-system, sans-serif);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #fbe6f2 0%, #ffffff 50%, #ece0f6 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* masthead */
.masthead {
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 28px 0 20px;
}
.logo {
  font-family: var(--heading-font, "BethHand", cursive);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.05;
  margin: 0;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tagline {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-style: italic;
}

main.wrap {
  padding-top: 28px;
  padding-bottom: 40px;
}

.intro p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

/* form */
.check-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.check-form input {
  flex: 1 1 320px;
  padding: 13px 14px;
  font-size: 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
}
.check-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.check-form button {
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.check-form button:hover {
  background: var(--dark-pink);
}
.check-form button:disabled {
  opacity: 0.55;
  cursor: progress;
}

/* password gate (shown until the site password is verified) */
.gate {
  max-width: 460px;
  margin: 24px auto 0;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(120, 60, 120, 0.12);
  text-align: center;
}
.gate h2 {
  font-family: var(--heading-font, "BethHand", cursive);
  font-weight: 400;
  font-size: 1.9rem;
  margin: 0 0 6px;
}
.gate p {
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.gate-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.gate-form input {
  flex: 1 1 200px;
  padding: 13px 14px;
  font-size: 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
}
.gate-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.gate-form button {
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.gate-form button:hover {
  background: var(--dark-pink);
}
.gate-form button:disabled {
  opacity: 0.55;
  cursor: progress;
}
.gate-error {
  margin: 12px 0 0;
  color: #b3261e;
  font-size: 0.92rem;
}
.gate.checking .gate-form {
  opacity: 0.6;
  pointer-events: none;
}

.disclaimer {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 12px 2px 0;
}

/* status / progress */
.status {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.status.error {
  border-left-color: var(--v-disputed);
  background: #fdf3f2;
}
.status-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.status .toggle {
  flex: none;
  width: 26px;
  height: 26px;
  line-height: 1;
  font-size: 1.1rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  border-radius: 6px;
  cursor: pointer;
}
.status .toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.status.collapsed .status-body {
  display: none;
}
.status-body {
  margin-top: 4px;
}
.step-note {
  margin: 4px 0 2px 0;
  font-size: 0.84rem;
  color: var(--accent);
  font-weight: 600;
}

.steps {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.steps li {
  padding: 3px 0 3px 26px;
  position: relative;
  color: var(--ink-soft);
}
.steps li::before {
  content: "○";
  position: absolute;
  left: 4px;
}
.steps li.active {
  color: var(--ink);
  font-weight: 600;
}
.steps li.active::before {
  content: "◐";
}
.steps li.done {
  color: var(--ink-soft);
}
.steps li.done::before {
  content: "●";
  color: var(--accent);
}
.caption-preview {
  margin: 8px 0 6px 26px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.caption-preview .cap-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.caption-preview blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.caption-preview.mock {
  background: #fdf3f2;
  border-color: #f0c4c0;
}
.caption-preview.mock .cap-label {
  color: var(--v-disputed);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
  margin-right: 8px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* report */
.report {
  margin-top: 30px;
}
.report-head {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.summary {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 0 0 16px;
}
.meta-line {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0 0 18px;
}

/* verdict chips */
.verdict {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}
.verdict.supported {
  background: var(--v-supported);
}
.verdict.disputed {
  background: var(--v-disputed);
}
.verdict.misleading {
  background: var(--v-misleading);
}
.verdict.mixed {
  background: var(--v-mixed);
}
.verdict.unverifiable {
  background: var(--v-unverifiable);
}

.overall {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 20px;
  flex-wrap: wrap;
}
.overall .verdict {
  font-size: 0.8rem;
  padding: 5px 12px;
}

.warnings {
  background: #fff8e6;
  border: 1px solid #f0e0a8;
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 0 0 20px;
  font-size: 0.88rem;
}
.warnings ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.transcript {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 0 0 18px;
  font-size: 0.9rem;
}
.transcript summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
}
.transcript p {
  margin: 10px 0 2px;
  white-space: pre-wrap;
  color: var(--ink-soft);
}

h2.section {
  font-family: var(--heading-font, "BethHand", cursive);
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--ink);
  margin: 30px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

/* media check */
.media-check {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.92rem;
}
.media-check .flag {
  color: var(--v-misleading);
  font-weight: 600;
}

/* claims */
.claim {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.claim-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.claim-text {
  font-weight: 600;
  font-size: 1.02rem;
  margin: 0;
}
.claim-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
  font-size: 0.74rem;
  color: var(--ink-soft);
}
.tag {
  background: #f0ede6;
  border-radius: 6px;
  padding: 2px 7px;
}
.tag.confidence-high {
  background: var(--accent-soft);
  color: var(--accent);
}
.reasoning {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.evidence-group {
  margin-top: 12px;
}
.evidence-group h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
  color: var(--ink-soft);
}
.evidence-group.for h4 {
  color: var(--v-supported);
}
.evidence-group.against h4 {
  color: var(--v-disputed);
}
.evidence {
  border-left: 3px solid var(--line);
  padding: 6px 0 6px 12px;
  margin-bottom: 10px;
  font-size: 0.92rem;
}
.evidence-group.for .evidence {
  border-left-color: var(--v-supported);
}
.evidence-group.against .evidence {
  border-left-color: var(--v-disputed);
}
.evidence .point {
  margin: 0 0 4px;
}
.evidence .locator {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.86rem;
}
.evidence .src {
  font-size: 0.82rem;
  margin-top: 4px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.evidence .src a {
  color: var(--accent);
}
.tier {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef2ee;
  color: var(--accent);
  font-weight: 600;
}
.tier.tier-other {
  background: #f2efe8;
  color: var(--ink-soft);
}
.unverified {
  font-size: 0.7rem;
  color: var(--v-disputed);
  font-weight: 600;
  border: 1px solid #f0c4c0;
  background: #fdf3f2;
  border-radius: 5px;
  padding: 1px 6px;
}

/* bias */
.bias {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.bias .type {
  font-weight: 700;
  color: var(--v-misleading);
  text-transform: capitalize;
}
.bias .excerpt {
  font-style: italic;
  margin: 6px 0;
  padding-left: 12px;
  border-left: 3px solid var(--line);
  color: var(--ink-soft);
}

/* history */
.history {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-head h2 {
  font-family: var(--heading-font, "BethHand", cursive);
  font-weight: 400;
  font-size: 1.55rem;
  color: var(--ink);
  margin: 0;
}
.history .toggle {
  width: 28px;
  height: 28px;
  font-size: 1.2rem;
  line-height: 1;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  border-radius: 6px;
  cursor: pointer;
}
.history .toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.history-body {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.hist-item {
  text-align: left;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.hist-item:hover {
  border-color: var(--accent);
}
.hist-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.hist-date {
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.hist-sum {
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.hist-meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  padding-bottom: 40px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}
.footer .version {
  margin-top: 6px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.empty {
  color: var(--ink-soft);
  font-style: italic;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 520px) {
  .claim-head {
    flex-direction: column;
  }
}

/* ============================================================= */
/* Mobile-friendly report redesign (cards, collapsible, colour)  */
/* ============================================================= */

/* Headline verdict banner */
.verdict-banner {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--v-unverifiable);
  border-radius: var(--radius);
  padding: 15px 17px;
  margin: 4px 0 14px;
}
.verdict-banner .vb-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.verdict-banner .vb-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--ink-soft);
}
.verdict-banner .vb-summary {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.45;
}
.verdict-banner.supported { border-left-color: var(--v-supported); }
.verdict-banner.disputed { border-left-color: var(--v-disputed); }
.verdict-banner.misleading { border-left-color: var(--v-misleading); }
.verdict-banner.mixed { border-left-color: var(--v-mixed); }
.verdict-banner.unverifiable { border-left-color: var(--v-unverifiable); }

.hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

/* Generic info card (media) */
.info-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin-bottom: 14px;
}
.info-card .ic-title { font-weight: 700; margin-bottom: 6px; }
.info-card p { margin: 4px 0 0; }
.info-card .ic-sub { color: var(--ink-soft); font-size: 0.9rem; }
.info-card .flag { color: var(--v-misleading); font-weight: 600; }

/* Notes / transcript as compact disclosures */
details.warnings {
  background: #fff8e6;
  border: 1px solid #f0e0a8;
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 0 0 14px;
  font-size: 0.9rem;
}
details.warnings summary { cursor: pointer; }
details.warnings ul { margin: 8px 0 0; padding-left: 18px; }

/* Claim cards (native <details>) */
details.claim {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--v-unverifiable);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
}
details.claim.supported { border-left-color: var(--v-supported); }
details.claim.disputed { border-left-color: var(--v-disputed); }
details.claim.misleading { border-left-color: var(--v-misleading); }
details.claim.mixed { border-left-color: var(--v-mixed); }
details.claim.unverifiable { border-left-color: var(--v-unverifiable); }
details.claim.type { border-left-color: var(--ink-soft); }

.claim-summary {
  display: block;
  list-style: none;
  cursor: pointer;
  padding: 13px 16px;
}
.claim-summary::-webkit-details-marker { display: none; }
.cs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.claim-summary .claim-text {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  margin: 9px 0 6px;
}
.claim-meta {
  font-size: 0.74rem;
  color: var(--ink-soft);
  text-transform: capitalize;
}
.chev {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
details.claim[open] .chev { transform: rotate(225deg); }
details.claim[open] .claim-summary { border-bottom: 1px solid var(--line); }
.claim-detail { padding: 12px 16px 14px; }
.claim-detail .reasoning { margin: 0 0 10px; color: var(--ink); }
.claim-detail .reasoning strong { color: var(--ink); }

/* Neutral chip for non-factual claim types */
.verdict.type {
  background: var(--ink-soft);
  text-transform: capitalize;
}

/* Source tier colours */
.tier.tier-government { background: #e6eef7; color: #1b4e8a; }
.tier.tier-scientific { background: #ece7f7; color: #5b3aa6; }
.tier.tier-news { background: var(--accent-soft); color: var(--accent); }
.tier.tier-factcheck { background: #fdeede; color: #9a5b00; }
.tier.tier-other { background: #f2efe8; color: var(--ink-soft); }

/* Bias cards */
.bias {
  border-left: 5px solid var(--v-misleading);
}
.bias-type {
  font-weight: 700;
  color: var(--v-misleading);
  text-transform: capitalize;
  margin-bottom: 2px;
}
.bias-note { margin: 6px 0 0; }
