:root {
  color-scheme: light;
  --bg: #e7f0ff;
  --bg-deep: #d6e7ff;
  --ink: #000000;
  --muted: #5d6f8b;
  --muted-strong: #6f7f98;
  --card: rgba(255, 255, 255, 0.84);
  --card-solid: rgba(251, 253, 255, 0.96);
  --line: rgba(114, 145, 190, 0.22);
  --line-strong: rgba(114, 145, 190, 0.32);
  --accent: #2089b0;
  --accent-strong: #246cbe;
  --accent-soft: #7dd6e7;
  --danger: #c96943;
  --success: #38a97e;
  --warning: #d28b29;
  --shadow: 0 24px 60px rgba(82, 116, 168, 0.16);
  --shadow-soft: 0 10px 30px rgba(104, 131, 180, 0.12);
  font-family: "Segoe UI", "Inter", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(130, 190, 255, 0.4), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(174, 198, 255, 0.45), transparent 20%),
    radial-gradient(circle at 78% 74%, rgba(171, 214, 255, 0.24), transparent 24%),
    linear-gradient(180deg, #eef5ff 0%, var(--bg) 46%, #dce8ff 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shell {
  position: relative;
  width: min(1385px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 42px 0 56px;
}

.shell::before,
.shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.shell::before {
  top: 12px;
  right: 10px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  opacity: 0.18;
  background:
    radial-gradient(circle at center, rgba(118, 149, 205, 0.16) 0 34%, transparent 35%),
    radial-gradient(circle at center, transparent 0 53%, rgba(118, 149, 205, 0.2) 54% 60%, transparent 61%),
    linear-gradient(135deg, transparent 0 44%, rgba(118, 149, 205, 0.18) 45% 57%, transparent 58% 100%),
    linear-gradient(45deg, transparent 0 44%, rgba(118, 149, 205, 0.14) 45% 57%, transparent 58% 100%);
  filter: blur(0.2px);
}

.shell::after {
  right: 26px;
  bottom: 24px;
  width: 84px;
  height: 84px;
  opacity: 0.28;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.92) 0 16%, transparent 17%),
    linear-gradient(0deg, transparent 0 41%, rgba(166, 193, 233, 0.85) 42% 58%, transparent 59%),
    linear-gradient(90deg, transparent 0 41%, rgba(166, 193, 233, 0.85) 42% 58%, transparent 59%),
    linear-gradient(45deg, transparent 0 41%, rgba(166, 193, 233, 0.75) 42% 58%, transparent 59%),
    linear-gradient(135deg, transparent 0 41%, rgba(166, 193, 233, 0.75) 42% 58%, transparent 59%);
}

.hero {
  position: relative;
  margin-bottom: 28px;
  padding-right: 180px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(1.45rem, 2.8vw, 2.55rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.subhead,
.muted,
.meta-list,
.inline-link,
.bullet-list,
.evidence-list {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.subhead {
  margin: 12px 0 0;
  max-width: 72ch;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.layout {
  display: grid;
  grid-template-columns: minmax(360px, 450px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.content {
  display: grid;
  gap: 20px;
}

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

.text-overview {
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.7fr);
  align-items: start;
}

.image-overview {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.provenance-card {
  display: grid;
  gap: 20px;
}

.provenance-card-header {
  display: grid;
  gap: 8px;
}

.provenance-card-header h2 {
  margin: 0;
}

.provenance-origin {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 700;
}

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

.provenance-metric {
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 0 0 1px rgba(132, 156, 199, 0.14);
}

.provenance-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.provenance-stat-value {
  margin-bottom: 0;
}

.provenance-card .inline-link {
  width: fit-content;
  color: #24558d;
  font-size: 1.12rem;
  line-height: 1.45;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.22em;
}

.provenance-card .inline-link:hover {
  color: #163c68;
}

[hidden] {
  display: none !important;
}

.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 251, 255, 0.88) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.28));
  opacity: 0.55;
}

.card > * {
  position: relative;
  z-index: 1;
}

.sidebar {
  position: sticky;
  top: 24px;
  height: fit-content;
}

.section-card {
  overflow: hidden;
}

.section-card-header {
  margin: -28px -28px 24px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(132, 156, 199, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.28));
}

.section-card-header h2,
.card h2 {
  position: relative;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(142, 59, 36, 0.16), rgba(28, 26, 23, 0.08));
}

.preview-block {
  display: grid;
  gap: 12px;
}

.preview-frame {
  padding: 10px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(233, 240, 252, 0.72) 100%);
  box-shadow: inset 0 0 0 1px rgba(132, 156, 199, 0.18);
}

.meta-list {
  margin: 12px 0 0;
  display: grid;
  gap: 14px;
}

.token-expander {
  margin-top: -2px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(235, 243, 255, 0.72));
  box-shadow: inset 0 0 0 1px rgba(132, 156, 199, 0.18);
  overflow: hidden;
}

.token-expander summary {
  list-style: none;
}

.token-expander summary::-webkit-details-marker {
  display: none;
}

.token-expander-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
}

.token-expander-copy {
  display: grid;
  gap: 4px;
}

.token-expander-label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.token-expander-value {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
}

.token-expander-toggle {
  flex: none;
  width: 18px;
  height: 18px;
  border-right: 2px solid #5a7ba9;
  border-bottom: 2px solid #5a7ba9;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.token-expander[open] .token-expander-toggle {
  transform: rotate(225deg) translateY(-1px);
}

.token-breakdown {
  margin: 0;
  padding: 0 16px 14px;
  display: grid;
  gap: 12px;
}

.token-breakdown div {
  position: relative;
  display: grid;
  gap: 4px;
  padding-left: 40px;
}

.token-breakdown dt {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
}

.token-breakdown dd {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.billing-panel {
  padding: 14px 16px 16px;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(238, 245, 255, 0.74));
  box-shadow: inset 0 0 0 1px rgba(132, 156, 199, 0.18);
  display: grid;
  gap: 10px;
}

.billing-expander {
  margin-top: 4px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(236, 244, 255, 0.76));
  box-shadow: inset 0 0 0 1px rgba(132, 156, 199, 0.2);
  overflow: hidden;
}

.billing-expander summary {
  list-style: none;
}

.billing-expander summary::-webkit-details-marker {
  display: none;
}

.billing-expander-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
}

.billing-expander-copy {
  display: grid;
  gap: 4px;
}

.billing-expander-label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.billing-expander-value {
  color: var(--ink);
  font-size: 1.14rem;
  font-weight: 800;
  line-height: 1.1;
}

.billing-expander-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #24558d;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

.billing-expander-cta-text {
  text-transform: none;
}

.billing-expander-toggle {
  flex: none;
  width: 16px;
  height: 16px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.billing-expander[open] .billing-expander-toggle {
  transform: rotate(225deg) translateY(-1px);
}

.billing-expander .billing-panel {
  margin-top: 0;
  border-radius: 0 0 24px 24px;
  box-shadow: inset 0 1px 0 rgba(132, 156, 199, 0.18);
}

.billing-expander[data-empty="true"] {
  background: linear-gradient(180deg, rgba(255, 232, 228, 0.98), rgba(255, 214, 205, 0.94));
  box-shadow: inset 0 0 0 1px rgba(196, 98, 72, 0.26);
}

.billing-expander[data-empty="true"] .billing-expander-label,
.billing-expander[data-empty="true"] .billing-status-text {
  color: #8d4632;
}

.billing-expander[data-empty="true"] .billing-expander-value,
.billing-expander[data-empty="true"] .billing-total-credits {
  color: #7f2f1c;
}

.billing-expander[data-empty="true"] .billing-expander-cta {
  color: #ab3f24;
}

.billing-expander[data-empty="true"] .billing-panel {
  background: linear-gradient(180deg, rgba(255, 244, 241, 0.96), rgba(255, 228, 222, 0.94));
  box-shadow: inset 0 1px 0 rgba(214, 131, 107, 0.22);
}

.billing-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.billing-panel-header h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.billing-status-text {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.billing-balance-row {
  display: grid;
  gap: 2px;
}

.billing-total-credits {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.billing-balance-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.billing-breakdown {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.billing-breakdown div {
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(132, 156, 199, 0.16);
}

.billing-expander[data-empty="true"] .billing-breakdown div {
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(214, 131, 107, 0.2);
}

.billing-breakdown dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.billing-breakdown dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.billing-error {
  color: #8a4a2f;
  font-size: 0.92rem;
  line-height: 1.5;
}

.billing-actions {
  display: grid;
  gap: 8px;
}

.billing-button {
  border: 0;
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(33, 137, 176, 0.12);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
  box-shadow: inset 0 0 0 1px rgba(33, 137, 176, 0.16);
}

.billing-button:hover {
  transform: translateY(-1px);
  background: rgba(33, 137, 176, 0.18);
}

.billing-button-strong {
  background: linear-gradient(180deg, #2f9c74 0%, #248d66 100%);
  color: #f8fffb;
  box-shadow: 0 10px 20px rgba(47, 156, 116, 0.18);
}

.billing-button-strong:hover {
  background: linear-gradient(180deg, #35a57b 0%, #26946a 100%);
}

.meta-list div {
  position: relative;
  display: grid;
  gap: 4px;
  padding-left: 44px;
}

.meta-list dt {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.meta-list dd {
  margin: 0;
  word-break: break-word;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
}

.stat-value {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.summary {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.72;
  color: var(--ink);
  font-weight: 400;
}

.markdown p,
.markdown ul,
.markdown ol {
  margin: 0;
}

.markdown p + p,
.markdown p + ul,
.markdown p + ol,
.markdown ul + p,
.markdown ol + p,
.markdown ul + ul,
.markdown ol + ol,
.markdown ul + ol,
.markdown ol + ul {
  margin-top: 0.9em;
}

.markdown ul,
.markdown ol {
  padding-left: 1.3em;
}

.markdown li + li {
  margin-top: 0.45em;
}

.markdown strong {
  font-weight: 700;
  color: var(--ink);
}

.markdown em {
  font-style: italic;
}

.markdown code {
  padding: 0.08em 0.35em;
  border-radius: 0.35em;
  background: rgba(28, 26, 23, 0.08);
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 0.92em;
}

.progress-card {
  display: grid;
  gap: 16px;
  align-self: start;
}

.sources-rail {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 6px 0 4px;
}

.sources-rail-card {
  gap: 14px;
  padding: 22px 22px 18px;
}

.sources-rail-header {
  display: block;
}

.sources-summary {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: left;
}

.source-rail-list {
  margin: 0;
  padding: 2px 2px 10px;
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(84, 119, 170, 0.45) transparent;
}

.sources-rail-card .source-rail-list {
  padding-bottom: 6px;
}

.source-rail-list::-webkit-scrollbar {
  height: 10px;
}

.source-rail-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(84, 119, 170, 0.34);
}

.source-rail-item,
.source-rail-empty {
  flex: 0 0 420px;
  scroll-snap-align: start;
}

.source-rail-empty {
  min-height: 118px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed rgba(114, 145, 190, 0.34);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(243, 248, 255, 0.84));
  color: var(--muted);
  font-size: 0.98rem;
  text-align: center;
}

.source-link-card {
  position: relative;
  height: 220px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px 11px;
  border-radius: 26px;
  border: 1px solid rgba(103, 135, 186, 0.32);
  background:
    radial-gradient(circle at top right, rgba(82, 205, 255, 0.2), transparent 35%),
    linear-gradient(180deg, rgba(92, 116, 154, 0.97), rgba(84, 112, 152, 0.95));
  box-shadow: 0 18px 32px rgba(47, 69, 108, 0.24);
  color: #f6fbff !important;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
  overflow: hidden;
}

.source-link-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(18, 36, 66, 0.16) 46%,
    rgba(43, 77, 128, 0.1) 58%,
    transparent 78%
  );
  transform: translateX(-130%);
  transition: transform 280ms ease;
  pointer-events: none;
}

.source-link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(114, 194, 230, 0.44);
  box-shadow: 0 22px 38px rgba(43, 64, 103, 0.3);
}

.source-link-card:hover::after {
  transform: translateX(0);
}

.source-card-top,
.source-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f6fbff !important;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.source-badge {
  max-width: 70%;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(215, 232, 255, 0.12);
  color: #f3f8ff !important;
  font-size: 0.83rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-card-title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.32;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #f6fbff !important;
}

.source-card-detail {
  margin: 0;
  color: #ebf3ff !important;
  font-size: 0.92rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.source-link-card .markdown,
.source-link-card .markdown p,
.source-link-card .markdown li,
.source-link-card .markdown strong,
.source-link-card .markdown em,
.source-link-card .markdown code {
  color: inherit !important;
}

.source-link-card .markdown strong {
  color: #f6fbff !important;
}

.source-link-card,
.source-link-card * {
  color: #f6fbff !important;
}

.progress-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.progress-header-modern h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.progress-value {
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: #8c5e35;
  font-size: 1rem;
  font-weight: 800;
}

#progressMessage {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.progress-card h3,
.progress-card .muted,
.progress-card li,
.meta-list dt,
.sourcesSummary,
.evidence-list,
.bullet-list,
.summary,
.card p,
.card li,
.card dd,
.card blockquote,
.markdown,
.markdown p,
.markdown li,
.markdown ul,
.markdown ol,
.markdown em,
.markdown strong,
.context-card .summary,
.reasoning-card-modern .summary,
.verdict-card-modern .summary,
.quote-block blockquote {
  color: #000 !important;
}

.sources-rail-card .source-link-card,
.sources-rail-card .source-link-card *,
.sources-rail-card .source-link-card p,
.sources-rail-card .source-link-card h3,
.sources-rail-card .source-link-card span {
  color: #f6fbff !important;
}

.progress-track {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: rgba(114, 145, 190, 0.12);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(27, 57, 91, 0.08);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a7ea4 0%, #36a8d2 58%, #89deed 100%);
  transition: width 220ms ease;
}

.stage-list {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 9px;
  list-style: none;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
}

.stage-list li {
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 32px;
  font-size: 1.02rem;
  min-height: 24px;
}

.stage-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(113, 138, 180, 0.16);
  border: 1px solid rgba(113, 138, 180, 0.24);
  transform: translateY(-50%);
}

.stage-list li.is-active,
.stage-list li.is-complete {
  color: var(--ink);
  font-weight: 600;
}

.stage-list li.is-complete::before {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 6px 14px rgba(56, 169, 126, 0.22);
}

.stage-list li.is-complete::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-55%) rotate(-45deg);
}

.stage-list li.is-active {
  font-weight: 700;
}

.stage-list li.is-active::before {
  background:
    conic-gradient(from 210deg, rgba(32, 137, 176, 0.16) 0deg, rgba(32, 137, 176, 0.16) 215deg, #2aa8ca 300deg, #7dd6e7 360deg);
  border-color: rgba(36, 108, 190, 0.28);
  box-shadow: 0 6px 16px rgba(36, 108, 190, 0.18);
  animation: active-stage-spin 1.05s linear infinite;
}

.stage-list li.is-active::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}

@keyframes active-stage-spin {
  from {
    transform: translateY(-50%) rotate(0deg);
  }

  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.inline-link {
  color: #000;
  text-decoration: none;
  font-weight: 600;
}

.inline-link:hover {
  text-decoration: underline;
}

#evidenceSummary {
  font-size: 1.12rem;
  line-height: 1.6;
  font-weight: 700;
}

.bullet-list,
.evidence-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 12px;
}

.evidence-list li {
  line-height: 1.58;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 400;
}

.error-card {
  border-color: rgba(196, 98, 72, 0.35);
  background: rgba(255, 240, 236, 0.92);
}

.text-sidebar {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.context-card .summary {
  font-size: 1.12rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--ink);
  font-weight: 400;
}

.context-card .markdown,
.context-card .markdown p,
.context-card .markdown li,
.context-card .markdown ul,
.context-card .markdown ol {
  font-size: 1.12rem;
  line-height: 1.75;
  font-weight: 400;
}

.context-card .bullet-list,
.context-card .bullet-list li {
  font-size: 1.12rem;
  line-height: 1.75;
  font-weight: 400;
}

.key-checks-card .bullet-list {
  padding-left: 1.3rem;
  gap: 16px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 400;
  font-family: "Segoe UI", "Inter", "Trebuchet MS", sans-serif;
  letter-spacing: 0;
  margin-top: 10px;
}

.key-checks-card .bullet-list li {
  line-height: 1.7;
  font-weight: 400;
}

.key-checks-card .bullet-list li strong {
  font-weight: 700;
}

.confidence-card {
  display: grid;
  gap: 10px;
  align-content: start;
  height: fit-content;
}

.confidence-card .stat-value {
  font-size: clamp(2.2rem, 3vw, 3.3rem);
  line-height: 1;
}

.quote-block h2,
.verdict-row h2 {
  margin: 0 0 12px;
  font-size: 1.08rem;
  font-weight: 800;
}

.quote-block blockquote {
  margin: 0;
  padding-left: 18px;
  border-left: 4px solid rgba(120, 150, 196, 0.38);
  color: var(--ink);
  font-size: 1.07rem;
  line-height: 1.66;
  font-weight: 400;
}

.verdict-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(28, 26, 23, 0.12);
  color: var(--ink);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  font-size: 1.03rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), var(--shadow-soft);
}

.verdict-pill::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}

.verdict-pill[data-verdict="supported"] {
  background: #2f9c74;
  border-color: #2f9c74;
  color: #f7fff8;
}

.verdict-pill[data-verdict="supported"]::before {
  background-color: rgba(255, 255, 255, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.2l3 3.1L13 4.7' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.verdict-pill[data-verdict="contradicted"],
.verdict-pill[data-verdict="misleading"] {
  background: linear-gradient(180deg, #cf714b 0%, #bf5a31 100%);
  border-color: #bf5a31;
  color: #fff7f5;
}

.verdict-pill[data-verdict="contradicted"]::before {
  background-color: rgba(255, 255, 255, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.verdict-pill[data-verdict="misleading"]::before {
  background-color: rgba(255, 255, 255, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2.2l5.7 10H2.3L8 2.2z' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M8 5.2v3.8' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.6' r='1' fill='%23ffffff'/%3E%3C/svg%3E");
}

.verdict-pill[data-verdict="mixed"],
.verdict-pill[data-verdict="unverified"],
.verdict-pill[data-verdict="pending"] {
  background: linear-gradient(180deg, #d29a34 0%, #c68018 100%);
  border-color: #c68018;
  color: #fffaf0;
}

.verdict-pill[data-verdict="mixed"]::before {
  background-color: rgba(255, 255, 255, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.8 8h10.4' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M8 2.8v10.4' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' opacity='0.7'/%3E%3C/svg%3E");
}

.verdict-pill[data-verdict="unverified"]::before,
.verdict-pill[data-verdict="pending"]::before {
  background-color: rgba(255, 255, 255, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.3 6.1A2.2 2.2 0 0 1 10 7.5c0 1.7-2 1.8-2 3.4' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='8' cy='12.2' r='1' fill='%23ffffff'/%3E%3C/svg%3E");
}

.verdict-pill[data-verdict="no-match"]::before {
  background-color: rgba(255, 255, 255, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.2' fill='none' stroke='%23ffffff' stroke-width='1.8'/%3E%3Cpath d='M10.5 10.5l2.7 2.7' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M5.4 7h3.2' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.modern-quote-block .quote-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.modern-quote-block h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.section-icon,
.corner-icon,
.modern-meta-list div::before {
  flex: none;
  display: inline-block;
  width: 24px;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.quote-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 8c-2.6.2-4.5 1.9-4.5 5V17h5v-5H7.3c.1-1.2 1.1-2.1 2.7-2.2V8Zm8 0c-2.6.2-4.5 1.9-4.5 5V17h5v-5h-3.2c.1-1.2 1.1-2.1 2.7-2.2V8Z'/%3E%3C/svg%3E");
}

.preview-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Ccircle cx='9' cy='10' r='1.6'/%3E%3Cpath d='m21 15-5-4-5.5 5.5-2.5-2.5L3 19'/%3E%3C/svg%3E");
}

.document-search-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7z'/%3E%3Cpath d='M14 2v5h5'/%3E%3Ccircle cx='11.5' cy='14.5' r='2.5'/%3E%3Cpath d='m13.3 16.3 2.2 2.2'/%3E%3C/svg%3E");
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.verdict-row {
  margin-bottom: 18px;
}

.key-checks-card > h2,
.context-card > h2,
#errorCard > h2 {
  margin-bottom: 18px;
}

.quote-title-row {
  margin-bottom: 12px;
}

.modern-meta-list div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  opacity: 0.92;
}

.token-breakdown div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.92;
}

.modern-meta-list div[data-icon="status"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8.6 12.2 2.3 2.3 4.5-5.1'/%3E%3C/svg%3E");
}

.modern-meta-list div[data-icon="link"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M12 3a15.3 15.3 0 0 1 0 18'/%3E%3Cpath d='M12 3a15.3 15.3 0 0 0 0 18'/%3E%3C/svg%3E");
}

.modern-meta-list div[data-icon="model"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4 4 8.5 12 13l8-4.5L12 4Z'/%3E%3Cpath d='M4 12.5 12 17l8-4.5'/%3E%3Cpath d='M4 16.5 12 21l8-4.5'/%3E%3C/svg%3E");
}

.modern-meta-list div[data-icon="publish"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 7v5c0 5 3.4 7.9 8 9 4.6-1.1 8-4 8-9V7l-8-4Z'/%3E%3Cpath d='m9.1 12.3 1.9 1.9 3.9-4.2'/%3E%3C/svg%3E");
}

.modern-meta-list div[data-icon="input"]::before,
.token-breakdown div[data-icon="input"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m7 10 5-5 5 5'/%3E%3Cpath d='M5 19h14'/%3E%3C/svg%3E");
}

.modern-meta-list div[data-icon="image"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='2.5'/%3E%3Ccircle cx='9' cy='10' r='1.4'/%3E%3Cpath d='m20 15-4.3-3.6-4.9 4.9-2.3-2.3L4 18'/%3E%3C/svg%3E");
}

.modern-meta-list div[data-icon="output"]::before,
.token-breakdown div[data-icon="output"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='m17 14-5 5-5-5'/%3E%3Cpath d='M5 5h14'/%3E%3C/svg%3E");
}

.modern-meta-list div[data-icon="total"]::before,
.token-breakdown div[data-icon="total"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7ba9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='7' ry='3'/%3E%3Cpath d='M5 5v6c0 1.7 3.1 3 7 3s7-1.3 7-3V5'/%3E%3Cpath d='M5 11v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6'/%3E%3C/svg%3E");
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .text-overview {
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.85fr);
  }

  .sources-summary {
    font-size: 1.02rem;
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(100vw - 20px, 1310px);
    padding: 24px 0 36px;
  }

  .hero {
    padding-right: 0;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(1.9rem, 10vw, 3rem);
  }

  .layout,
  .grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .provenance-metrics {
    grid-template-columns: 1fr;
  }

  .section-card-header {
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .card {
    padding: 24px;
    border-radius: 24px;
  }

  .source-rail-list {
    gap: 14px;
  }

  .source-rail-item,
  .source-rail-empty {
    flex-basis: min(84vw, 360px);
  }

}
