/* =====================================================================
   Honesty Layer — styling
   Muted, scholarly level colors (not bright traffic-lights) so tagged
   claims read as careful editorial notes, not alarms.
   ===================================================================== */

:root{
  --hl-consensus:#4b7a52;   /* muted green  */
  --hl-debated:#b07d2a;     /* ochre / amber */
  --hl-minority:#5b6b82;    /* slate        */
  --hl-cite:#b08c2f;        /* gold         */
  --hl-ink:#322d22;
}

/* ---- Tagged claim ---- */
.honesty-claim{
  border-bottom:1.5px solid currentColor;
  padding-bottom:.5px;
}
.honesty-claim.honesty-consensus{ border-color:rgba(75,122,82,.55); }
.honesty-claim.honesty-debated{ border-color:rgba(176,125,42,.6); }
.honesty-claim.honesty-minority{ border-color:rgba(91,107,130,.55); }

/* ---- Confidence badge (superscript label) ---- */
.honesty-badge{
  font-family:"Calibri","Segoe UI",Arial,sans-serif;
  font-size:9.5px;
  font-weight:700;
  letter-spacing:.7px;
  text-transform:uppercase;
  vertical-align:super;
  line-height:0;
  margin-left:3px;
  padding:1.5px 5px;
  border-radius:999px;
  cursor:help;
  white-space:nowrap;
  border:1px solid;
}
.honesty-badge.honesty-consensus{ color:#386040; background:rgba(75,122,82,.12); border-color:rgba(75,122,82,.4); }
.honesty-badge.honesty-debated{ color:#8a601a; background:rgba(176,125,42,.14); border-color:rgba(176,125,42,.42); }
.honesty-badge.honesty-minority{ color:#46556e; background:rgba(91,107,130,.13); border-color:rgba(91,107,130,.4); }
.honesty-badge:focus-visible{ outline:2px solid currentColor; outline-offset:1px; }

/* ---- Citation footnote marker ---- */
.honesty-cite{
  font-family:"Calibri","Segoe UI",Arial,sans-serif;
  font-size:10.5px;
  font-weight:700;
  vertical-align:super;
  line-height:0;
  margin-left:1px;
  color:var(--hl-cite);
  cursor:pointer;
  padding:0 1px;
}
.honesty-cite::before{ content:"["; }
.honesty-cite::after{ content:"]"; }
.honesty-cite:hover,
.honesty-cite:focus{ color:#8a6c1e; text-decoration:none; outline:none; }
.honesty-cite:focus-visible{ outline:2px solid var(--hl-cite); outline-offset:1px; }

/* ---- Shared popover ---- */
.honesty-pop{
  position:absolute;
  z-index:9997;
  width:260px;
  max-width:calc(100vw - 16px);
  background:linear-gradient(160deg,#fbf7ee 0%, #f3ecdb 100%);
  border:1px solid rgba(176,140,47,.45);
  border-left:4px solid var(--hl-cite);
  border-radius:9px;
  box-shadow:0 14px 30px rgba(31,40,56,.2), 0 2px 6px rgba(31,40,56,.12);
  font-family:"Calibri","Segoe UI",Arial,sans-serif;
  color:var(--hl-ink);
  overflow:hidden;
  animation:hl-in .14s ease-out;
}
@keyframes hl-in{ from{ opacity:0; transform:translateY(-3px);} to{ opacity:1; transform:none; } }

.honesty-pop .hp-head{
  display:flex; align-items:center; gap:7px;
  padding:9px 13px 7px;
  font-family:"Cambria",Georgia,serif; font-weight:700; font-size:14px;
}
.honesty-pop .hp-dot{ width:9px; height:9px; border-radius:50%; flex:0 0 auto; }
.honesty-pop .hp-body{ padding:0 13px 11px; font-size:13.5px; line-height:1.45; color:#5b5340; }

.honesty-pop-consensus{ border-left-color:var(--hl-consensus); }
.honesty-pop-consensus .hp-head{ color:#386040; } .honesty-pop-consensus .hp-dot{ background:var(--hl-consensus); }
.honesty-pop-debated{ border-left-color:var(--hl-debated); }
.honesty-pop-debated .hp-head{ color:#8a601a; } .honesty-pop-debated .hp-dot{ background:var(--hl-debated); }
.honesty-pop-minority{ border-left-color:var(--hl-minority); }
.honesty-pop-minority .hp-head{ color:#46556e; } .honesty-pop-minority .hp-dot{ background:var(--hl-minority); }

/* citation popover */
.honesty-pop-cite{ border-left-color:var(--hl-cite); }
.honesty-pop .hp-quote{
  padding:12px 14px 6px;
  font-family:"Cambria","Garamond",Georgia,serif;
  font-size:15px; line-height:1.5; font-style:italic; color:#2b2722;
}
.honesty-pop .hp-attr{
  padding:0 14px 6px; font-size:12.5px; color:#7a715a; font-weight:600;
}
.honesty-pop .hp-link{
  display:inline-block; margin:0 14px 11px; font-size:12px; font-weight:700;
  color:#1f3556; text-decoration:none;
}
.honesty-pop .hp-link:hover{ text-decoration:underline; }

@media (max-width:520px){ .honesty-pop{ width:240px; } }

/* ---- Multi-view panel ---- */
.honesty-panel{
  margin:24px 0;
  border:1px solid rgba(31,53,86,.22);
  border-radius:11px;
  background:linear-gradient(160deg,#fbf7ee,#f2ecdd);
  overflow:hidden;
  font-family:"Calibri","Segoe UI",Arial,sans-serif;
  box-shadow:0 4px 14px rgba(31,40,56,.07);
}
.honesty-panel .hpnl-head{
  display:flex; align-items:center; gap:9px;
  padding:11px 17px;
  background:rgba(31,53,86,.06);
  border-bottom:1px solid rgba(31,53,86,.14);
  font-family:"Cambria",Georgia,serif; font-weight:700; font-size:16.5px; color:#1f3556;
}
.honesty-panel .hpnl-views{ list-style:none; margin:0; padding:4px 17px 6px; }
.honesty-panel .hpnl-views li{
  display:flex; gap:13px; align-items:baseline;
  padding:10px 0; border-bottom:1px solid rgba(176,140,47,.18);
}
.honesty-panel .hpnl-views li:last-child{ border-bottom:none; }
.honesty-panel .hpnl-label{
  flex:0 0 112px; font-weight:700; font-size:12.5px; color:#fff;
  background:#26405f; border-radius:5px; padding:3px 8px; text-align:center; line-height:1.3;
}
.honesty-panel .hpnl-text{ font-family:"Cambria","Garamond",Georgia,serif; font-size:16px; line-height:1.5; color:#33302a; }
.honesty-panel .hpnl-assess{
  display:flex; gap:13px; align-items:baseline;
  padding:12px 17px; background:rgba(176,140,47,.10); border-top:2px solid rgba(176,140,47,.45);
}
.honesty-panel .hpnl-assess-label{
  flex:0 0 112px; font-weight:700; font-size:10.5px; letter-spacing:.6px; text-transform:uppercase;
  color:#8a6c1e; padding-top:3px;
}

/* ---- Changelog / revision history ---- */
.honesty-changelog{
  margin:24px 0; padding:12px 16px;
  border:1px solid rgba(124,114,87,.3); border-left:3px solid #b08c2f;
  border-radius:8px; background:rgba(247,241,225,.55);
  font-family:"Calibri","Segoe UI",Arial,sans-serif;
}
.honesty-changelog .hcl-head{
  display:flex; align-items:center; gap:7px;
  font-weight:700; font-size:11.5px; letter-spacing:.8px; text-transform:uppercase; color:#7a6a3f;
  margin-bottom:8px;
}
.honesty-changelog ul{ list-style:none; margin:0; padding:0; }
.honesty-changelog li{ display:flex; gap:13px; padding:3px 0; font-size:13.5px; line-height:1.45; }
.honesty-changelog .hcl-date{ flex:0 0 98px; color:#8a6c1e; font-weight:700; font-variant-numeric:tabular-nums; }
.honesty-changelog .hcl-desc{ color:#4a4536; }

@media (max-width:560px){
  .honesty-panel .hpnl-views li, .honesty-panel .hpnl-assess{ flex-direction:column; gap:4px; }
  .honesty-panel .hpnl-label, .honesty-panel .hpnl-assess-label{ flex-basis:auto; align-self:flex-start; }
  .honesty-changelog li{ flex-direction:column; gap:1px; }
}
