/* spec 044-website-truth-features — truth-ledger and correction
   report components. Loaded only by the blog article template
   and the /corrections/ page (the spec 037 component-sheet
   pattern). Values mirror the approved wireframes (WF-04
   revised, WF-24) on the site's brand tokens: navy #081F32,
   panel #0d2c47, cyan #00DEF6, ink #F7FCFF.
   v3 (2026-11-16, spec 044 Amendment 2): article-like styles
   removed with the likes feature (owner directive).
   v4 (2026-11-19, spec 057, WF-33): page-ledger preview and
   disclosure styles (action row, toggle, collapsed remainder)
   and the full log page's "On:" line.
   v5 (2026-11-19, spec 057 Amendment 1, WF-33 as corrected by
   the owner): the page-ledger panel is collapsed by default —
   a header bar (title, entry count, expand control) over a
   hidden body — and the full log page renders each entry as
   a detailed record with labeled parts. */

/* Truth-ledger panel (wireframe .ledger) */
.truth-ledger {
  border: 1px solid rgba(0, 222, 246, .16);
  border-radius: 14px;
  background: #0d2c47;
  padding: 20px 22px;
  margin: 34px 0 26px;
}
.truth-ledger .tl-title {
  margin: 0 0 12px;
  font-size: 19px;
  color: #F7FCFF;
}
.tl-list { list-style: none; margin: 0; padding: 0; }
.tl-item {
  padding: 10px 0;
  border-top: 1px solid rgba(247, 252, 255, .08);
  color: rgba(247, 252, 255, .72);
  font-size: 15px;
}
.tl-item:first-child { border-top: none; padding-top: 2px; }
.tl-date { color: #F7FCFF; font-weight: 600; }
.tl-src { color: #00DEF6; font-size: 13.5px; white-space: nowrap; }
.tl-empty { color: rgba(247, 252, 255, .72); margin: 0; font-size: 15px; }

/* Page-ledger panel, collapsed by default (WF-33 as
   corrected by the owner, spec 057 Amendment 1): one header
   bar — title, entry count, expand control — over a hidden
   body holding the latest entries and the full-log link. */
.tl-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.tl-head .tl-title { margin: 0; }
.tl-count {
  color: rgba(247, 252, 255, .55);
  font-size: 14px;
  white-space: nowrap;
}
.tl-head .tl-toggle { margin-left: auto; }
.tl-body { margin-top: 16px; }
.tl-body[hidden] { display: none; }
.tl-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.tl-toggle {
  display: inline-block;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  background: none;
  color: #00DEF6;
  border: 1.5px solid #00DEF6;
}
.tl-log-link {
  display: inline-block;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 20px;
  text-decoration: none;
  background: #00DEF6;
  color: #04222e;
  border: 1.5px solid #00DEF6;
}

/* Full log page (WF-33 as corrected, spec 057 Amendment 1):
   each entry is a detailed record — date line with source,
   the full change text under a "What changed" label, the
   full reason text under a "Why it changed" label, and the
   "On:" page line. */
.tl-on { display: block; margin-top: 4px; font-size: 13.5px; }
.tl-on a { color: #00DEF6; }
.tl-entry {
  padding: 20px 0 8px;
  border-top: 1px solid rgba(247, 252, 255, .10);
}
.tl-entry:first-child { border-top: none; padding-top: 2px; }
.tl-entry-meta { margin: 0; }
.tl-entry-meta .tl-date { font-size: 15.5px; }
.tl-d-label {
  margin: 12px 0 3px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #00DEF6;
}
.legal-body .tl-d-text,
.tl-d-text {
  margin: 0;
  color: rgba(247, 252, 255, .78);
  font-size: 15px;
  line-height: 1.65;
}
.tl-entry .tl-on { margin-top: 10px; font-size: 14px; }

/* Engagement row (wireframe .engage) */
.engage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}
.report-toggle {
  display: inline-block;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  background: none;
  color: #00DEF6;
  border: 1.5px solid #00DEF6;
}
.report-toggle[hidden] { display: none; }

/* Report form (wireframe .report-form) */
.report-panel { margin: 0 0 26px; }
.report-panel[hidden] { display: none; }
#correction-form {
  border: 1px solid rgba(0, 222, 246, .16);
  border-radius: 14px;
  background: #0d2c47;
  padding: 22px;
}
#correction-form[hidden] { display: none; }
#correction-form .rf-title { margin: 0 0 14px; font-size: 19px; color: #F7FCFF; }
.rfield { margin: 0 0 16px; }
.rfield label {
  display: block;
  font-weight: 600;
  margin: 0 0 6px;
  font-size: 15px;
  color: #F7FCFF;
}
.rfield .opt { color: rgba(247, 252, 255, .5); font-weight: 400; }
.rfield input[type="text"],
.rfield input[type="email"],
.rfield textarea {
  width: 100%;
  box-sizing: border-box;
  background: #081F32;
  border: 1px solid rgba(0, 222, 246, .16);
  border-radius: 10px;
  color: #F7FCFF;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
}
.rfield textarea { min-height: 84px; resize: vertical; }
.rfield ::placeholder { color: rgba(247, 252, 255, .5); }
.rfield input:focus,
.rfield textarea:focus {
  outline: 2px solid #00DEF6;
  outline-offset: 1px;
}
.truth-form-note {
  color: rgba(247, 252, 255, .72);
  font-size: 14px;
  margin: 0 0 16px;
}
.ts-box { margin: 0 0 16px; }
.hp-wrap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.report-submit {
  display: inline-block;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  background: #00DEF6;
  color: #04222e;
  border: 1.5px solid #00DEF6;
}
.report-submit[disabled] { opacity: .55; cursor: default; }

/* Success / error (wireframe .success-box / .error-box) */
.form-ok {
  border: 1px solid #00DEF6;
  border-radius: 14px;
  background: rgba(0, 222, 246, .07);
  padding: 20px 22px;
  margin: 0 0 26px;
}
.form-ok h3 { margin: 0 0 8px; font-size: 19px; color: #F7FCFF; }
.form-ok p { margin: 0; color: rgba(247, 252, 255, .72); font-size: 15px; }
.form-err {
  border: 1px solid rgba(255, 120, 120, .55);
  border-radius: 14px;
  background: rgba(255, 120, 120, .07);
  padding: 16px 20px;
  margin: 0 0 18px;
  color: #F7FCFF;
  font-size: 15px;
}
.form-err p { margin: 0; }
.form-err a { color: #00DEF6; }

/* /corrections/ what-happens panel (wireframe .what-happens) */
.what-happens {
  border: 1px solid rgba(0, 222, 246, .16);
  border-radius: 14px;
  background: #0d2c47;
  padding: 20px 22px;
  margin: 0 0 26px;
  text-align: left;
}
/* Issue #49 Phase 3 (2026-11-03): the /corrections/ panel heading
   is an h2 now (the page skipped h1 -> h3); same declarations. */
.what-happens h2 { margin: 0 0 10px; font-size: 19px; color: #F7FCFF; }
.what-happens p {
  color: rgba(247, 252, 255, .72);
  margin: 0 0 10px;
  font-size: 15.5px;
}
.what-happens p:last-child { margin-bottom: 0; }
.fallback-line { color: rgba(247, 252, 255, .72); font-size: 15px; margin: 18px 0 0; }
.fallback-line a { color: #00DEF6; }

/* Mobile (wireframe Frame B, 390px) */
@media (max-width: 640px) {
  .engage-row { flex-direction: column; align-items: stretch; }
  .report-toggle { text-align: center; width: 100%; }
  .truth-ledger, #correction-form { padding: 18px; }
  .tl-head .tl-toggle { margin-left: 0; }
  .tl-actions { flex-direction: column; align-items: stretch; }
  .tl-toggle, .tl-log-link { text-align: center; width: 100%; box-sizing: border-box; }
}
