/* rules-lib.css — shared styling for the rules-library module (admin + public).
   Theme-var only: every colour resolves through theme.css so the pages follow the
   site skin. No literal brand/theme hex anywhere in this file. */

.rl-muted { color: var(--muted); }
.rl-req { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bad); }
.rl-opt { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rl-hint { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* ---- disclaimer + staleness notices (the accuracy doctrine, made visible) ---- */
.rl-disclaimer {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-radius: 12px; padding: 14px 16px; font-size: 13px; line-height: 1.6;
  color: var(--muted);
}
.rl-disclaimer strong { color: var(--text); }
.rl-stale {
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--text);
  border-radius: 12px; padding: 14px 16px; font-size: 13.5px; line-height: 1.6; margin-bottom: 1rem;
}
.rl-stale strong { color: var(--warn); }

/* ---- verification stamp ---- */
.rl-verified {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.rl-verified .dot { width: 8px; height: 8px; border-radius: 99px; background: var(--ok); display: inline-block; }
.rl-verified.is-stale .dot { background: var(--warn); }
.rl-verified.is-none .dot { background: var(--muted); }

/* ---- status pills ---- */
.rl-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid transparent; white-space: nowrap;
}
.rl-pill.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.rl-pill.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.rl-pill.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.rl-pill.mut { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); border-color: color-mix(in srgb, var(--muted) 30%, transparent); }

/* ---- citation manager (admin drawer) ---- */
.rl-cites { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 14px; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.rl-cites-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rl-cite { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: var(--bg); }
.rl-cite-grid { display: grid; grid-template-columns: 1fr 170px; gap: 10px; }
@media (max-width: 620px) { .rl-cite-grid { grid-template-columns: 1fr; } }
.rl-cite-del { margin-top: 9px; }

/* ---- citation list (public pages) ---- */
.rl-cite-list { margin: 0; padding-left: 1.2rem; font-size: 14px; line-height: 1.7; }
.rl-cite-list li { margin-bottom: .6rem; }
.rl-cite-list a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.rl-quote {
  margin: .5rem 0 0; padding: .5rem .9rem; font-size: 13px; font-style: italic;
  color: var(--muted); border-left: 2px solid var(--border);
}
.rl-changelog { margin: 0; padding-left: 1.1rem; font-size: 13.5px; line-height: 1.7; color: var(--text); }

/* ---- comparison table (public index) ---- */
.rl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rl-table th, .rl-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rl-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; white-space: nowrap; }
.rl-table tbody tr:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.rl-table a.rl-state { color: var(--text); font-weight: 700; text-decoration: none; }
.rl-table a.rl-state:hover { color: var(--brand); }

/* ---- coverage line (honest partial-coverage statement) ---- */
.rl-coverage {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 99px; padding: 6px 14px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.rl-coverage b { color: var(--text); }

/* ---- generated detail pages ---- */
.rl-answer { font-size: 17px; line-height: 1.7; color: var(--text); }
.rl-sec { margin-top: 2rem; }
.rl-sec-head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); font-weight: 700; margin-bottom: .75rem; }
.rl-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .85rem; }
@media (max-width: 520px) { .rl-facts { grid-template-columns: 1fr; } }
.rl-fact { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; }
.rl-fact .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rl-fact .v { font-weight: 700; font-size: 15px; margin-top: 3px; color: var(--text); }
.rl-list { margin: 0; padding-left: 1.15rem; font-size: 15px; line-height: 1.75; }
.rl-list li { margin-bottom: .3rem; }
/* cross-link lists (e.g. the generated "More guides" block) must READ as links */
.rl-list a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.rl-body h2 { font-size: 22px; font-weight: 700; margin: 1.75rem 0 .6rem; color: var(--text); }
.rl-body h3 { font-size: 17px; font-weight: 700; margin: 1.35rem 0 .45rem; color: var(--text); }
.rl-body p, .rl-body li { font-size: 15.5px; line-height: 1.75; color: var(--text); }
/* Tailwind's preflight sets list-style:none on ul/ol, which silently strips the markers from
   guide bodies. These lists are load-bearing here — an enumerated statutory test rendered
   WITHOUT its numbers stops reading as "the four cumulative conditions". Restore markers. */
.rl-body ul, .rl-body ol { padding-left: 1.35rem; margin: .6rem 0; }
.rl-body ul { list-style: disc; }
.rl-body ol { list-style: decimal; }
.rl-body li { margin: .3rem 0; }
.rl-body li::marker { color: var(--muted); }
.rl-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.rl-body blockquote { border-left: 3px solid var(--border); padding-left: .9rem; margin: .8rem 0; color: var(--muted); }
.rl-cite-list { list-style: decimal; }
.rl-changelog, .rl-list { list-style: disc; }
.rl-correction { font-size: 13px; color: var(--muted); }
.rl-correction a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.rl-sub-head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 1.1rem 0 .5rem; }
