/* ============================================================
   HallucinationNerd — design system
   "Research instrument" aesthetic: warm paper, ink type,
   mono data, signal-red accent.
   ============================================================ */

:root {
  --paper:      #F5F1E8;
  --paper-soft: #FBF8F1;
  --card:       #FFFFFF;
  --ink:        #1B1712;
  --ink-soft:   #4E4739;
  --ink-mute:   #8A8271;
  --line:       #E3DCCB;
  --line-soft:  #EDE7D8;

  --accent:       #C2402A;
  --accent-deep:  #9E3220;
  --accent-tint:  #F7E4DE;

  --ok:       #207A46;  --ok-bg:   #E4F3E9;  --ok-rail:   #2E9E5E;
  --warn:     #9A7108;  --warn-bg: #FBF3D9;  --warn-rail: #D8A514;
  --bad:      #B33524;  --bad-bg:  #FBE7E2;  --bad-rail:  #D0503C;
  --contra:   #7E1B14;  --contra-bg:#F6DBD5; --contra-rail:#A02A20;
  --teal:     #0E6E5C;  --teal-bg: #DFF1EC;  --teal-rail: #1C8A74;
  --orange:   #A34E0B;  --orange-bg:#FBEEDD; --orange-rail:#C96A1B;
  --violet:   #5E5496;  --violet-bg:#EAE7F4; --violet-rail:#7A6FB0;
  --gray:     #5E594C;  --gray-bg: #EFEBDF;  --gray-rail: #A39A83;

  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --rail-w: 408px;
  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(27,23,18,.05), 0 4px 16px rgba(27,23,18,.06);
  --motion-quick: 160ms;
  --motion-ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

::selection { background: var(--accent-tint); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ Layout ============ */

.shell { display: flex; min-height: 100vh; }

/* ============ Left rail ============ */

.rail {
  width: var(--rail-w);
  flex: 0 0 var(--rail-w);
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand { margin-bottom: 28px; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark svg { flex: 0 0 auto; transition: transform var(--motion-quick) var(--motion-ease); }
.brand-mark:hover svg, .brand-mark:focus-visible svg { transform: rotate(-5deg); }

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.01em;
}

.brand-word em {
  font-style: italic;
  color: var(--accent);
}

.tagline {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 32ch;
}

.tagline strong { color: var(--ink); font-weight: 600; }

/* Form sections */

.form-section { margin-bottom: 26px; }

.section-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.section-label .num {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
  font-size: 11px;
}

.section-hint {
  font-size: 12.5px;
  color: var(--ink-mute);
  margin: -4px 0 10px;
}

/* Select */

.select-wrap { position: relative; }

.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 36px 11px 13px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

select:hover { border-color: var(--ink-mute); }
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

/* Checkboxes */

.check-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.check input { position: absolute; opacity: 0; width: 0; height: 0; }

.check .box {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  border: 1.5px solid var(--ink-mute);
  border-radius: 5px;
  background: var(--card);
  display: grid;
  place-items: center;
  transition: background .15s, border-color .15s;
}

.check .box svg { opacity: 0; transform: scale(.6); transition: opacity .12s, transform .12s; }

.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check:hover .box { border-color: var(--ink-soft); }

/* Text input */

input[type="text"] {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  font: inherit;
  font-size: 13.5px;
  font-family: var(--font-mono);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

input[type="text"]::placeholder { color: var(--ink-mute); font-family: var(--font-ui); }
input[type="text"]:hover { border-color: var(--ink-mute); }
input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

/* Dropzone */

.dropzone {
  border: 1.5px dashed var(--ink-mute);
  border-radius: var(--radius);
  background: var(--paper-soft);
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--motion-quick), background var(--motion-quick), box-shadow var(--motion-quick);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--accent-tint);
}

.dropzone:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dropzone svg { display: block; margin: 0 auto 8px; transition: transform var(--motion-quick) var(--motion-ease); }
.dropzone:hover svg, .dropzone.dragover svg, .dropzone:focus-visible svg { transform: translateY(-3px); }

.dropzone p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.dropzone .kinds {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

/* Submit button */

.submit-btn {
  width: 100%;
  border: none;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper-soft);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(27,23,18,.2);
}

.submit-btn:hover:not(:disabled) { background: var(--accent-deep); box-shadow: 0 4px 12px rgba(27,23,18,.17); }
.submit-btn .arrow { display: inline-block; transition: transform var(--motion-quick) var(--motion-ease); }
.submit-btn:hover:not(:disabled) .arrow, .submit-btn:focus-visible .arrow { transform: translateX(3px); }
.submit-btn:active:not(:disabled) { transform: translateY(1px); }
.submit-btn:disabled { opacity: .55; cursor: not-allowed; }

.submit-btn .arrow { font-family: var(--font-mono); }

/* Rail footer */

.rail-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-mute);
}

.rail-footer p { margin: 0 0 6px; }

.rail-footer a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.rail-footer a:hover { color: var(--accent); }

/* ============ Results panel ============ */

.stage {
  flex: 1;
  min-width: 0;
  background: var(--paper-soft);
  padding: 40px 48px 64px;
  overflow-y: auto;
}

.stage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

.stage-head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.stage-head .legend {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-mute);
  white-space: nowrap;
}

/* Empty state */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
}

.empty-state .motif {
  font-family: var(--font-mono);
  font-size: 44px;
  color: var(--line);
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  user-select: none;
}

.empty-state .motif b { color: var(--accent); font-weight: 500; }

.empty-state .title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

.empty-state .sub { margin: 0; font-size: 13.5px; color: var(--ink-mute); max-width: 40ch; }

/* Loading state */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
}

.loader {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
  margin-bottom: 20px;
}

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

.loading-state .title { font-weight: 600; margin: 0 0 4px; }
.loading-state .title::after {
  content: "";
  display: inline-block;
  width: 1.5em;
  text-align: left;
  animation: working-dots 1.8s steps(4, end) infinite;
}
@keyframes working-dots {
  0% { content: ""; } 25% { content: "."; }
  50% { content: ".."; } 75%, 100% { content: "..."; }
}
.loading-state .stage-msg { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-deep); margin: 0 0 12px; }
.loading-state .hint { font-size: 12px; color: var(--ink-mute); margin: 0; }


/* ============ Summary ============ */

.summary { margin-bottom: 36px; }

.summary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}

.summary-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.summary-source {
  font-size: 13.5px;
  color: var(--ink-soft);
}

.summary-source b { color: var(--ink); font-weight: 600; }
.summary-source .fname { font-family: var(--font-mono); font-size: 12.5px; background: var(--gray-bg); border: 1px solid var(--line-soft); padding: 2px 7px; border-radius: 5px; }

.reliability-num {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.reliability-num small { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-left: 8px; color: var(--ink-mute); }

.tone-good { color: var(--ok); }
.tone-mid  { color: var(--warn); }
.tone-bad  { color: var(--bad); }

.meter {
  height: 8px;
  background: var(--gray-bg);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 20px;
}

.meter-fill {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width .6s cubic-bezier(.22,.8,.3,1);
}

.meter-fill.tone-good { background: var(--ok-rail); }
.meter-fill.tone-mid  { background: var(--warn-rail); }
.meter-fill.tone-bad  { background: var(--bad-rail); }

/* Stat grid — real numbers, no blank bars */

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

.stat {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--paper-soft);
  padding: 12px 14px 10px;
  border-top: 3px solid var(--gray-rail);
}

.stat.stat-total   { border-top-color: var(--ink); }
.stat.stat-ok      { border-top-color: var(--ok-rail); }
.stat.stat-warn    { border-top-color: var(--warn-rail); }
.stat.stat-bad     { border-top-color: var(--bad-rail); }
.stat.stat-uncited { border-top-color: var(--violet-rail); }

.stat .n {
  display: block;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
}

.stat .l {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 3px;
}

/* Category report */

.cat-report { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }

.cat-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--gray-rail);
  background: var(--paper-soft);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

.cat-row .cat-name { font-weight: 600; color: var(--ink); white-space: nowrap; }
.cat-row .cat-vals { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere; }

.cat-row.c-blue   { border-left-color: #5B7FB0; }
.cat-row.c-green  { border-left-color: var(--ok-rail); }
.cat-row.c-yellow { border-left-color: var(--warn-rail); }
.cat-row.c-red    { border-left-color: var(--bad-rail); }
.cat-row.c-orange { border-left-color: var(--orange-rail); }
.cat-row.c-teal   { border-left-color: var(--teal-rail); }
.cat-row.c-purple { border-left-color: var(--violet-rail); }
.cat-row.c-gray   { border-left-color: var(--gray-rail); }

/* ============ Claim cards ============ */

.details-head {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 34px 0 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.claims-list { display: flex; flex-direction: column; gap: 0; }

.claim-card {
  background: transparent;
  border: none;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 18px 4px 20px;
  transition: background var(--motion-quick), padding-left var(--motion-quick);
}
.claim-card:hover { background: rgba(227,220,203,.18); padding-left: 8px; }

/* verdict color lives on the wordmark (text + dot), not a rail */

.claim-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.claim-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  flex: 0 0 auto;
}

.claim-top .verdict-wordmark { flex: 1; }

/* pills removed - verdicts render as wordmarks (see .verdict-wordmark) */

.conf {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  white-space: nowrap;
}

.conf .conf-track {
  width: 56px; height: 3px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.conf .conf-fill { display: block; height: 100%; background: var(--ink-soft); border-radius: 99px; transform-origin: left; }
.claim-card.fade-in .conf-fill { animation: meter-reveal .5s var(--motion-ease) both; animation-delay: inherit; }
@keyframes meter-reveal { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.claim-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

.claim-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
}

.ref-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 7px;
  background: var(--paper-soft);
}

.claim-card details { margin-top: 6px; }

.claim-card summary {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.claim-card summary::-webkit-details-marker { display: none; }

.claim-card summary:hover { text-decoration: underline; text-underline-offset: 2px; }

.claim-card details.secondary summary { color: var(--ink-mute); }

.claim-card blockquote {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--line);
  background: var(--paper-soft);
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  font-style: italic;
  color: var(--ink-soft);
}

.claim-card .reasoning {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* Error */

.error-box {
  background: var(--bad-bg);
  border: 1px solid var(--bad-rail);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--contra);
  font-weight: 500;
  font-size: 14px;
}

/* Fade in */

.fade-in { animation: fadeIn .38s var(--motion-ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.verdict-wordmark .vw-dot { transform-origin: center; }
.claim-card.fade-in .vw-dot { animation: verdict-reveal .38s var(--motion-ease) both; animation-delay: inherit; }
@keyframes verdict-reveal { from { opacity: .2; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }

/* ============ Mobile ============ */

@media (max-width: 880px) {
  .shell { flex-direction: column; }
  .rail {
    width: 100%;
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 28px 20px 24px;
  }
  .brand-word { font-size: 23px; }
  .tagline { max-width: none; }
  .stage { padding: 24px 20px 48px; }
  .stage-head h2 { font-size: 23px; }
  .stage-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .summary-top { flex-direction: column; gap: 6px; }
  .empty-state .motif { font-size: 34px; }
  .claim-top { flex-wrap: wrap; }
}

@media (max-width: 880px) {
  .cat-row { flex-direction: column; gap: 2px; }
  .cat-row .cat-name { white-space: normal; }
}


/* ===== Professor-requested + a11y additions ===== */
.done-flag {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid var(--ok-rail);
  padding: 3px 11px;
  border-radius: 99px;
  white-space: nowrap;
}

.reliability-caption {
  margin: -8px 0 18px;
  font-size: 12px;
  color: var(--ink-mute);
  max-width: 74ch;
}

.legend-box {
  margin-top: 16px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}
.legend-box > summary {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-deep);
  cursor: pointer;
  user-select: none;
}
.legend-box > summary:hover { text-decoration: underline; text-underline-offset: 2px; }
.legend-box ul { margin: 10px 0 2px; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.legend-box li { font-size: 12.5px; color: var(--ink-soft); }
.legend-box li b { color: var(--ink); font-weight: 600; }

/* ===== About page (shared theme) ===== */
.about-page { background: var(--paper); }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { max-width: 880px; margin: 0 auto; padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-nav { display: flex; gap: 22px; font-size: 14px; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.site-nav a.active { color: var(--ink); font-weight: 600; }
.about-main { max-width: 880px; margin: 0 auto; padding: 44px 28px 64px; }
.about-main h1 { font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 18px; }
.about-main h2 { font-family: var(--font-display); font-size: 23px; font-weight: 600; margin: 40px 0 14px; }
.about-main p.lead { color: var(--ink-soft); font-size: 15px; line-height: 1.65; max-width: 70ch; margin: 0 0 8px; }
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 10px 0 40px; }
.team-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px; display: flex; gap: 16px; align-items: flex-start; }
.team-card .avatar { flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.team-card .avatar-ph { flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-deep); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 24px; }
.team-card h3 { font-family: var(--font-ui); font-size: 17px; font-weight: 600; margin: 0; color: var(--ink); }
.team-card h3 a { color: var(--ink); text-decoration: none; }
.team-card h3 a:hover { color: var(--accent); }
.team-card .role { font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 0; }
.team-card .aff { font-size: 13px; color: var(--ink-mute); margin: 4px 0 0; }
.team-card .li { font-size: 13px; margin: 9px 0 0; }
.team-card .li a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.try-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--paper-soft); text-decoration: none; font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: var(--radius); box-shadow: 0 1px 2px rgba(27,23,18,.2); transition: background .15s; }
.try-btn:hover { background: var(--accent-deep); }
.try-btn .arrow { font-family: var(--font-mono); }
.site-footer { max-width: 880px; margin: 0 auto; padding: 22px 28px 40px; border-top: 1px solid var(--line); color: var(--ink-mute); font-size: 12.5px; }
.site-footer a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.site-footer a:hover { color: var(--accent); }
@media (max-width: 720px) { .team-grid { grid-template-columns: 1fr; } .about-main h1 { font-size: 28px; } }


/* ===== Paper's canonical 6-category palette (design_implementation.tex) ===== */
:root {
  --hn-supported: #1B7F3B;
  --hn-partial:   #A6E0B3;
  --hn-notsupp:   #F2D64B;
  --hn-contra:    #E0392B;
  --hn-noexist:   #000000;
  --hn-noaccess:  #595959;
}
.verdict-summary { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.vrow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--paper-soft); }
.vrow .sw { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.15); }
.vrow .vlabel { flex: 1; font-size: 13.5px; color: var(--ink); }
.vrow .vcount { font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--ink); min-width: 2ch; text-align: right; }
.legend-box .lsw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: middle; border: 1px solid rgba(0,0,0,.15); }
/* Verdict wordmarks: small color square + uppercase letterspaced label.
   Same six verdict colors as the summary panel, applied as text + dot. */
.verdict-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.verdict-wordmark .vw-dot { width: 9px; height: 9px; border-radius: 2px; background: currentColor; flex: 0 0 auto; }

.badge-hn-supported, .badge-supported     { color: var(--ok); }
.badge-hn-partial, .badge-partial         { color: var(--warn); }
.badge-hn-notsupp, .badge-not-supported   { color: var(--bad); }
.badge-hn-contra, .badge-contradicted     { color: var(--contra); }
.badge-hn-noexist                         { color: var(--violet); }
.badge-hn-noaccess, .badge-unverifiable   { color: var(--gray); }
.badge-backup-found                       { color: var(--teal); }
.badge-no-backup                          { color: var(--orange); }
.badge-no-citation                        { color: var(--violet); }


/* ===== Clickable category filtering ===== */
.filter-hint { margin: 8px 2px 0; font-size: 12px; color: var(--ink-mute); }
.vrow { cursor: pointer; transition: border-color var(--motion-quick), box-shadow var(--motion-quick), background var(--motion-quick); }
.vrow .sw { transition: transform var(--motion-quick) var(--motion-ease); }
.vrow:not(.disabled):hover .sw { transform: scale(1.12); }
.vrow:hover { border-color: var(--ink-mute); }
.vrow.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-tint); background: var(--card); }
.vrow.disabled { cursor: default; opacity: .5; }
.vrow.disabled:hover { border-color: var(--line-soft); }

/* Home/About navigation */
.corner-nav { position: fixed; top: 18px; right: 24px; z-index: 20; display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(251,248,241,.94); box-shadow: var(--shadow-card); backdrop-filter: blur(8px); }
.corner-nav a { color: var(--ink-soft); text-decoration: none; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; transition: color var(--motion-quick), background var(--motion-quick); }
.corner-nav a:hover, .corner-nav a.active { color: var(--ink); background: var(--accent-tint); }
@media (max-width: 720px) {
  .corner-nav { top: 10px; right: 10px; }
  .rail { padding-top: 84px; } /* Leave room for the fixed navigation on phones. */
}

/* Small responses on the secondary navigation and disclosure controls. */
.site-nav a, .rail-footer a, .site-footer a, .team-card a {
  transition: color var(--motion-quick);
}
.claim-card summary, .legend-box > summary { transition: color var(--motion-quick); }
.claim-card details[open] > :not(summary), .legend-box[open] > :not(summary) {
  animation: detail-reveal .22s var(--motion-ease) both;
}
@keyframes detail-reveal { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.done-flag:not(.hidden) { animation: fadeIn .38s var(--motion-ease) both; }
.error-box:not(.hidden) { animation: fadeIn .25s var(--motion-ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .loading-state .title::after { content: ""; }
}

/* Result review tools */
.review-tools{margin:16px 0 20px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.review-actions{display:flex;flex-wrap:wrap;gap:8px}
.review-btn{border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--ink);padding:9px 12px;font:600 12px Inter,sans-serif;cursor:pointer}
.review-btn:hover,.review-btn:focus-visible{border-color:var(--accent);outline:2px solid transparent;background:var(--accent-tint)}
.review-btn[aria-pressed=true]{border-color:var(--ink-soft);background:var(--paper-soft);color:var(--ink);box-shadow:inset 0 -2px 0 var(--ink-soft)}
.review-hint{color:var(--ink-mute);font:12px/1.5 Inter,sans-serif;margin:9px 0 0}
.sample-notice{margin:12px 0;padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:var(--paper-soft);font:600 12px/1.5 Inter,sans-serif;color:var(--ink-soft)}
.demo-btn{margin-top:10px}
.source-map-panel{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
.source-map-panel summary{cursor:pointer;font-weight:700;font-size:13px;color:var(--ink)}
.source-map-group{padding:11px 0;border-bottom:1px solid var(--line-soft)}
.source-map-group h4{font:600 12px/1.5 Inter,sans-serif;margin:0 0 4px;overflow-wrap:anywhere}
.source-map-group ul{padding-left:20px;margin:5px 0 0}.source-map-group li{margin:4px 0;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.source-map-group a{color:var(--accent);text-decoration:underline}
