/* Policy & Contract Library.
 *
 * Migration #11, Phase 1. The monolith's style block from website/policy_library.html, taken at monolith commit
 * cb02cf0. The selectors and values are the source's except:
 *
 *  - the site tokens (`--theme`, `--header`, `--text`, `--text-2`, `--border`, `--bg`) are declared here as `--pl-*`
 *    with the source's palette, because this page runs in the Intelligence shell, not the marketing site;
 *  - the selectors that styled Font Awesome `<i>` glyphs style the inline SVG that replaces them (`.pl-ico`);
 *  - `#9CA3AF` text (2.5:1 on white) is `#5f6d84` (4.7:1): an accessibility correction, recorded in the migration document;
 *  - `.haresign-tool-card` is `.pl-card` (the shell has no such class).
 *
 * The additions are at the end: the Content Security Policy admits no style attribute, so what the source set with
 * `style=""` or `element.style.display` is the `hidden` attribute, and the link-health and coming-soon states are new.
 */
:root { --pl-theme: #0d5bb8; --pl-header: #1a2a3b; --pl-text: #3d4a5c; --pl-text-2: #5a6b7b; --pl-border: #d5dce5; --pl-bg: #f4f7fa; }
.pl-wrap { max-width: none; margin: 0; padding: 0; }
.pl-card { background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; }
.pl-ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: -0.125em; }
.pl-search .pl-ico { width: 14px; height: 14px; }
.pl-hero { display:grid; grid-template-columns:1.35fr 1fr; gap:28px; align-items:center; padding:30px 32px; margin-bottom:22px; }
@media (max-width:900px){ .pl-hero { grid-template-columns:1fr; gap:24px; } }
.pl-eyebrow { display:inline-flex; align-items:center; gap:8px; background:#EAF1FB; color:var(--pl-theme); font-size:12.5px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; padding:6px 14px; border-radius:999px; margin-bottom:16px; }
.pl-intro { color:var(--pl-text); font-size:15px; line-height:1.65; margin-bottom:0; }
.pl-kpis { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.pl-kpi { background:var(--pl-bg); border:1px solid #e8edf2; border-radius:10px; padding:16px 18px; }
.pl-kpi-ico { width:38px; height:38px; border-radius:9px; background:var(--pl-theme); color:#fff; display:flex; align-items:center; justify-content:center; font-size:15px; margin-bottom:12px; }
.pl-kpi-val { font-size:26px; font-weight:800; color:var(--pl-header); line-height:1; }
.pl-kpi-lbl { font-size:12px; color:var(--pl-text-2); font-weight:600; margin-top:4px; }

/* ── Link-health status strip ───────────────────────────────────────── */
.pl-health { display:flex; flex-wrap:wrap; align-items:center; gap:10px 22px; padding:14px 22px; margin-bottom:22px; border-left:4px solid #0e9f6e; }
.pl-health.has-dead { border-left-color:#FF5B61; }
.pl-health .hstat { display:inline-flex; align-items:center; gap:9px; font-size:13px; color:var(--pl-text); }
.pl-health .hstat strong { color:var(--pl-header); }
.pl-health .live-dot { width:9px; height:9px; border-radius:50%; background:#0e9f6e; box-shadow:0 0 0 0 rgba(14,159,110,.5); animation:pl-pulse 2s infinite; flex-shrink:0; }
.pl-health.has-dead .live-dot { background:#FF5B61; box-shadow:0 0 0 0 rgba(255,91,97,.5); }
@keyframes pl-pulse { 0%{box-shadow:0 0 0 0 rgba(14,159,110,.45);} 70%{box-shadow:0 0 0 7px rgba(14,159,110,0);} 100%{box-shadow:0 0 0 0 rgba(14,159,110,0);} }
.pl-health .pl-ico-rotate { color:var(--pl-theme); }
.pl-health .pl-ico-warn { color:#FF5B61; }
.pl-health .sep { color:#cbd5e1; }

/* ── Recently published strip ───────────────────────────────────────── */
.pl-recent-strip { padding:20px 24px 8px; margin-bottom:22px; }
.pl-recent-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:12px; margin-top:14px; }
.pl-recent-card { display:block; border:1px solid #e8edf2; border-radius:10px; padding:14px 16px; text-decoration:none; transition:all .15s; background:#fff; }
.pl-recent-card:hover { border-color:var(--pl-theme); box-shadow:0 6px 20px rgba(13,91,184,.10); transform:translateY(-2px); }
.pl-recent-card .rc-cat { display:inline-block; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--pl-theme); background:#EAF1FB; padding:2px 8px; border-radius:999px; margin-bottom:8px; }
.pl-recent-card .rc-title { color:var(--pl-header); font-size:13px; font-weight:600; line-height:1.4; display:block; }
.pl-recent-card:hover .rc-title { color:var(--pl-theme); }
.pl-recent-card .rc-date { font-size:11px; color:#5f6d84; margin-top:7px; }
.pl-recent-card .rc-date .pl-ico { font-size:9px; opacity:.6; margin-left:3px; }

.pl-panel { padding:22px 24px; margin-bottom:22px; }
.pl-panel-flush { padding:0; overflow:hidden; }
/* These are static content panels — suppress the tool-card hover lift. */
.pl-hero:hover, .pl-health:hover, .pl-recent-strip:hover,
.pl-panel:hover, .pl-panel-flush:hover { transform:none; box-shadow:none; }
.pl-card-head { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--pl-header); margin-bottom:16px; }
.pl-card-head .pl-ico { color:var(--pl-theme); margin-right:7px; }

.pl-toolbar { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-bottom:16px; }
.pl-search { position:relative; flex:1 1 320px; }
.pl-search input { width:100%; border:1px solid var(--pl-border); border-radius:8px; font-size:14px; padding:11px 14px 11px 40px; color:var(--pl-header); }
.pl-search input:focus { outline:none; border-color:var(--pl-theme); box-shadow:0 0 0 3px rgba(13,91,184,.12); }
.pl-search .pl-ico { position:absolute; left:15px; top:50%; transform:translateY(-50%); color:#5f6d84; font-size:14px; }
.pl-count { font-size:13px; color:var(--pl-text-2); white-space:nowrap; }
.pl-count strong { color:var(--pl-header); }

.pl-cats { display:flex; flex-wrap:wrap; gap:7px; }
.pl-cat { border:1px solid var(--pl-border); background:#fff; color:var(--pl-text); border-radius:999px; font-size:12.5px; font-weight:600; padding:6px 14px; cursor:pointer; transition:all .12s; }
.pl-cat:hover { border-color:var(--pl-theme); color:var(--pl-theme); }
.pl-cat.active { background:var(--pl-theme); border-color:var(--pl-theme); color:#fff; box-shadow:0 2px 8px rgba(13,91,184,.25); }
.pl-cat .n { opacity:.7; font-weight:500; margin-left:4px; }

.pl-table-wrap { overflow-x:auto; }
table.pl-table { width:100%; border-collapse:collapse; min-width:760px; }
.pl-table thead th { background:var(--pl-bg); text-align:left; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--pl-text-2); padding:13px 16px; border-bottom:1px solid #e8edf2; white-space:nowrap; }
.pl-table th.pl-sort { cursor:pointer; user-select:none; }
.pl-table th.pl-sort:hover { color:var(--pl-theme); }
.pl-table th.pl-sort .arw { opacity:.35; margin-left:5px; font-size:9px; }
.pl-table th.pl-sort.asc .arw::after { content:'\25B2'; }
.pl-table th.pl-sort.desc .arw::after { content:'\25BC'; }
.pl-table th.pl-sort.asc .arw, .pl-table th.pl-sort.desc .arw { opacity:1; color:var(--pl-theme); }
.pl-table td { padding:14px 16px; border-bottom:1px solid #F1F3F5; vertical-align:top; font-size:13px; color:var(--pl-text); }
.pl-table tbody tr:last-child td { border-bottom:none; }
.pl-table tbody tr:hover { background:#FAFBFD; }
.pl-table tbody tr.is-dead { background:#FFF6F6; }
.pl-table tbody tr.is-dead:hover { background:#FEEFEF; }
.pl-doc a.pl-title { color:var(--pl-theme); font-weight:700; text-decoration:none; line-height:1.4; }
.pl-doc a.pl-title:hover { color:#0a4a9c; text-decoration:underline; }
.pl-doc a.pl-title .pl-ico { font-size:10px; opacity:.55; margin-left:5px; }
.pl-sum { color:var(--pl-text-2); font-size:12px; line-height:1.55; margin-top:4px; max-width:560px; }
.pl-muted { color:#5f6d84; font-size:12.5px; white-space:nowrap; }
.pub-badge { display:inline-block; font-size:11px; font-weight:700; padding:3px 10px; border-radius:999px; background:#EAF1FB; color:var(--pl-theme); white-space:nowrap; }
.dead-badge { display:inline-flex; align-items:center; gap:5px; font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:999px; background:#FDECEC; color:#C0392B; text-transform:uppercase; letter-spacing:.03em; margin-top:6px; }
.pl-tools { display:flex; flex-wrap:wrap; gap:6px; }
.pl-tool { display:inline-flex; align-items:center; gap:5px; border:1px solid #D7E3F5; background:#EAF1FB; color:var(--pl-theme); border-radius:999px; font-size:11.5px; font-weight:700; padding:4px 11px; text-decoration:none; white-space:nowrap; transition:all .12s; }
.pl-tool:hover { background:var(--pl-theme); color:#fff; border-color:var(--pl-theme); }
.pl-tool .pl-ico { font-size:10px; }
.pl-none { text-align:center; color:#5f6d84; padding:52px 20px; font-size:14px; }
.pl-none .pl-ico { font-size:42px; display:block; margin-bottom:14px; color:#D1D5DB; }

.pl-recent { list-style:none; margin:0; padding:0; }
.pl-recent li { padding:10px 0; border-bottom:1px solid #F1F3F5; }
.pl-recent li:last-child { border-bottom:none; padding-bottom:0; }
.pl-recent a { color:var(--pl-header); font-size:13px; font-weight:600; text-decoration:none; line-height:1.45; display:block; }
.pl-recent a:hover { color:var(--pl-theme); }
.pl-recent .meta { font-size:11px; color:#5f6d84; margin-top:3px; }
.pl-disclaimer { font-size:12px; color:var(--pl-text-2); line-height:1.6; margin-bottom:0; }
.pl-disclaimer .pl-ico { color:var(--pl-theme); margin-right:6px; }

/* ── Mobile: collapse the table into stacked, labelled cards ─────────── */
@media (max-width:767px){
  .pl-table-wrap { overflow-x:visible; }
  table.pl-table { min-width:0; }
  .pl-table thead { display:none; }
  .pl-table tbody, .pl-table tr, .pl-table td { display:block; width:100%; }
  .pl-table tr.pl-row { padding:16px 18px; }
  .pl-table tbody tr.pl-row + tr.pl-row { border-top:8px solid var(--pl-bg); }
  .pl-table td { border:none !important; padding:0; white-space:normal; }
  .pl-table td.pl-empty { display:none; }
  .pl-table td.pl-doc { margin-bottom:4px; }
  .pl-table td[data-label] { display:flex; align-items:baseline; justify-content:space-between; gap:14px; padding:8px 0; border-top:1px solid #F1F3F5 !important; }
  .pl-table td[data-label]::before { content:attr(data-label); font-weight:700; color:var(--pl-text-2); text-transform:uppercase; font-size:10px; letter-spacing:.04em; flex-shrink:0; }
  .pl-table td[data-label] { text-align:right; }
  .pl-table td[data-label="Related tools"] { display:block; text-align:left; }
  .pl-table td[data-label="Related tools"]::before { display:block; margin-bottom:8px; }
  .pl-sum { max-width:none; }
  .pl-count { width:100%; }
}

/* ── Additions: what the Content Security Policy and the new states need ─────────────────────────────── */
[hidden] { display: none !important; }
.pl-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pl-table-wrap { position: relative; }
.pl-kpi-ico .pl-ico { width: 18px; height: 18px; }
.pl-sort button { all: unset; cursor: pointer; display: inline; }
.pl-sort button:focus-visible, .pl-cat:focus-visible, .pl-recent-card:focus-visible, .pl-tool:focus-visible, .pl-title:focus-visible { outline: 3px solid var(--pl-theme); outline-offset: 2px; }
.pl-search input:focus-visible { outline: 3px solid var(--pl-theme); outline-offset: 1px; }
.pl-health.has-stale { border-left-color: #b45309; }
.pl-health.has-stale .live-dot { background: #b45309; animation: none; }
.pl-health.has-unknown { border-left-color: #5f6d84; }
.pl-health.has-unknown .live-dot { background: #5f6d84; animation: none; }
.state-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; margin-top: 6px; }
.state-badge.state-stale { background: #fef3c7; color: #92400e; }
.state-badge.state-unknown { background: #eef1f5; color: #475569; }
.state-badge.state-dead { background: #FDECEC; color: #C0392B; }
.pl-table tbody tr.is-stale { background: #fffbeb; }
.pl-tool.soon { background: #f4f7fa; border-color: #d5dce5; color: #475569; cursor: default; font-weight: 600; }
.pl-tool.soon:hover { background: #f4f7fa; color: #475569; border-color: #d5dce5; }
.pl-tool.soon .tag { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; background: #e2e8f0; border-radius: 999px; padding: 1px 7px; }
.pl-health .hstat .pl-ico { width: 14px; height: 14px; }
.pl-none .pl-ico { width: 42px; height: 42px; display: block; margin: 0 auto 14px; }
@media (prefers-reduced-motion: reduce) { .pl-health .live-dot { animation: none; } .pl-recent-card { transition: none; } }
@media (max-width: 767px) { .pl-health .sep { display: none; } .pl-health { gap: 8px 0; flex-direction: column; align-items: flex-start; } }
