/* v88.1 — Witness Quorum exact implementation pass */

/* -------------------------------------------------
   Home second-fold authority band
--------------------------------------------------*/
.pwp-home-module .meta{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  margin-bottom:.8rem;
}
.pwp-home-module h2{
  max-width: 18ch;
  text-wrap: balance;
}
.pwp-home-module .pwp-home-body{
  max-width: 66ch;
}
.pwp-home-module .pwp-home-support{
  margin:.25rem 0 1rem;
  color:var(--muted, rgba(255,255,255,.74));
  max-width:58ch;
}
.pwp-home-module .pwp-home-card-grid{
  align-items:stretch;
}
.pwp-home-module .pwp-home-card{
  padding:1rem 1rem 1.05rem;
}
.pwp-home-module .pwp-home-card h3{
  max-width: 15ch;
}
:root[data-theme="light"] .pwp-home-module .pwp-home-support{
  color:#5d6d89 !important;
}

/* -------------------------------------------------
   Trust Center authority slab polish
--------------------------------------------------*/
.pwp-trust-grid{
  align-items:stretch;
}
.pwp-status-card .pwp-card-lede{
  max-width:58ch;
}
.pwp-status-card .pwp-kv-grid{
  gap:.8rem;
}
.pwp-status-card .pwp-short-rule{
  margin:.35rem 0 0;
  font-weight:650;
}
.corroboration-aperture{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  padding:.45rem .7rem;
  margin:.7rem 0 .75rem;
  border:1px solid rgba(141,153,193,.16);
  border-radius:999px;
  background:rgba(12,18,33,.42);
}
.corroboration-aperture .aperture-label{
  font-size:.74rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.78;
}
.corroboration-aperture .aperture-state{
  font-weight:800;
  letter-spacing:.04em;
}
.corroboration-aperture[data-status="PENDING"] .aperture-state{color:#e8b86f;}
.corroboration-aperture[data-status="MATCHED"] .aperture-state,
.corroboration-aperture[data-status="QUORUM REACHED"] .aperture-state{color:#86ddae;}
.corroboration-aperture[data-status="MISMATCH"] .aperture-state,
.corroboration-aperture[data-status="FAIL"] .aperture-state{color:#ff8c8c;}
.corroboration-aperture.is-pulse{animation: aperturePulse 1.35s cubic-bezier(.2,.7,.2,1) 1;}
@keyframes aperturePulse {
  0% { box-shadow:0 0 0 0 rgba(124,92,255,0); }
  40% { box-shadow:0 0 0 12px rgba(124,92,255,.08); }
  100% { box-shadow:0 0 0 0 rgba(124,92,255,0); }
}
:root[data-theme="light"] .corroboration-aperture{
  background:#fff !important;
  border-color:rgba(22,41,78,.12) !important;
}
:root[data-theme="light"] .corroboration-aperture .aperture-label{ color:#6a7891; }

/* -------------------------------------------------
   Verify — Local vs Witnessed instrument
--------------------------------------------------*/
.verify-v87-compare-card .verify-v87-compare-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.12fr) minmax(340px, .88fr);
  gap:1rem;
  align-items:start;
}
.verify-v87-compare-kv{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.75rem;
}
.decision-freeze-instrument{
  display:flex;
  flex-direction:column;
  gap:.75rem;
  padding:1rem;
  border:1px solid rgba(141,153,193,.16);
  border-radius:26px;
  background:linear-gradient(180deg, rgba(14,20,37,.92), rgba(9,14,28,.94));
  min-height:100%;
}
.decision-freeze-instrument h3{
  margin:0;
}
.decision-freeze-instrument .dfi-copy{
  margin:0;
  color:rgba(236,241,255,.68);
}
.dfi-display{
  display:grid;
  gap:.55rem;
  padding:.8rem;
  border:1px solid rgba(141,153,193,.14);
  border-radius:20px;
  background:rgba(7,10,18,.55);
}
.dfi-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  padding:.35rem 0;
  border-bottom:1px solid rgba(141,153,193,.10);
}
.dfi-row:last-child{ border-bottom:0; }
.dfi-row span{
  color:rgba(232,238,255,.68);
  font-size:.92rem;
}
.dfi-row strong{
  color:#f6f8ff;
  text-align:right;
  font-size:.94rem;
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break:break-word;
}
.dfi-row-break strong{
  max-width: 17ch;
}
.dfi-replay{
  align-self:flex-start;
}
.dfi-display{
  position:relative;
  overflow:hidden;
}
.dfi-display::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, transparent, rgba(124,92,255,.08), transparent);
  transform:translateX(-120%);
  opacity:0;
  pointer-events:none;
}
.decision-freeze-instrument.is-replay-running .dfi-display::after{
  opacity:1;
  animation: dfiScan 0.9s cubic-bezier(.2,.7,.2,1) 1;
}
.decision-freeze-instrument.is-replay-running .dfi-row{
  animation: dfiRowSettle 0.72s cubic-bezier(.2,.7,.2,1) 1 both;
}
.decision-freeze-instrument.is-replay-running .dfi-row:nth-child(1){ animation-delay:0s; }
.decision-freeze-instrument.is-replay-running .dfi-row:nth-child(2){ animation-delay:.05s; }
.decision-freeze-instrument.is-replay-running .dfi-row:nth-child(3){ animation-delay:.10s; }
.decision-freeze-instrument.is-replay-running .dfi-row:nth-child(4){ animation-delay:.15s; }
.decision-freeze-instrument.is-replay-running .dfi-row:nth-child(5){ animation-delay:.20s; }
@keyframes dfiScan {
  0% { transform:translateX(-120%); }
  100% { transform:translateX(120%); }
}
@keyframes dfiRowSettle {
  0% { transform:translateY(0); opacity:1; }
  35% { transform:translateY(-1px); opacity:1; }
  100% { transform:translateY(0); opacity:1; }
}
:root[data-theme="light"] .decision-freeze-instrument{
  background:linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,250,255,.99)) !important;
  border-color:rgba(22,41,78,.12) !important;
  box-shadow:0 18px 48px rgba(18,28,49,.08) !important;
}
:root[data-theme="light"] .decision-freeze-instrument h3,
:root[data-theme="light"] .dfi-row strong{
  color:#15233c !important;
}
:root[data-theme="light"] .decision-freeze-instrument .dfi-copy,
:root[data-theme="light"] .dfi-row span{
  color:#5b6a84 !important;
}
:root[data-theme="light"] .dfi-display{
  background:#fff !important;
  border-color:rgba(22,41,78,.10) !important;
}

/* -------------------------------------------------
   Witness Quorum — shorter authority annex
--------------------------------------------------*/
.wq-hero-grid{
  align-items:start;
}
.wq-copy .hero-lede{
  margin-bottom:.2rem;
}
.wq-subbody{
  margin:.15rem 0 .8rem;
  color:rgba(235,240,255,.7);
  max-width:56ch;
}
.wq-summary-card .wq-kv-grid,
.wq-panel .wq-kv-grid{
  gap:.7rem;
}
.wq-summary-card .wq-note{
  margin:.5rem 0 0;
  font-weight:650;
}
.wq-panel,
.wq-feed-card,
.wq-delta-card,
.wq-commercial-card,
.wq-summary-card{
  border-radius:28px;
}
.wq-route-list{
  display:grid;
  gap:.55rem;
}
.wq-route-item code{
  display:block;
  margin-top:.15rem;
  overflow-wrap:anywhere;
}
.wq-grid{ align-items:start; }
:root[data-theme="light"] .wq-subbody{ color:#5d6d89 !important; }

/* -------------------------------------------------
   Controls bridge / supporting pages
--------------------------------------------------*/
.pwp-controls-bridge h2{
  max-width: 20ch;
}
.pwp-controls-bridge p{
  max-width: 60ch;
}

/* Mobile */
@media (max-width: 980px){
  .verify-v87-compare-card .verify-v87-compare-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width: 720px){
  .verify-v87-compare-kv{
    grid-template-columns:1fr;
  }
  .pwp-home-module h2,
  .pwp-controls-bridge h2{
    max-width:none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .corroboration-aperture,
  .decision-freeze-instrument,
  .dfi-display{
    animation:none !important;
    transition:none !important;
  }
}

@media (prefers-reduced-motion: reduce){
  .corroboration-aperture.is-pulse{ animation:none !important; }
  .decision-freeze-instrument.is-replay-running .dfi-display::after,
  .decision-freeze-instrument.is-replay-running .dfi-row{ animation:none !important; }
  .decision-freeze-instrument .dfi-display::after{ display:none; }
}
