/* Dhimi Studio — Phase 5: Finance / Lab / Futures authority layer */
/* Atmosphere only; same brand tokens as foundation/phase3/phase4 */

:root {
  --p5-ink: #1a2422;
  --p5-muted: #4a5552;
  --p5-line: rgba(18, 46, 43, 0.12);
  --p5-paper: #faf7f1;
  --p5-gold: var(--dhimi-gold, #c9a227);
  --p5-blue: var(--dhimi-deep-blue, #1b3a5f);
}

/* Authority page shell */
.authority-page {
  background: var(--p5-paper, #faf7f1);
  color: var(--p5-ink);
}
.authority-page .p5-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.authority-page .p5-wrap-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.authority-hero {
  padding: 2.5rem 0 1.75rem;
  border-bottom: 1px solid var(--p5-line);
}
.authority-finance .authority-hero {
  background: linear-gradient(180deg, rgba(27, 58, 95, 0.07), transparent);
}
.authority-lab .authority-hero {
  background: linear-gradient(180deg, rgba(27, 58, 95, 0.11), transparent);
}
.authority-futures .authority-hero {
  background: linear-gradient(180deg, rgba(90, 84, 78, 0.08), transparent);
}

.authority-hero h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  margin: 0.55rem 0 0.65rem;
  color: var(--p5-ink);
  line-height: 1.15;
}
.authority-hero .p3-lede,
.authority-hero .p5-lede {
  font-size: 1.08rem;
  color: var(--p5-muted);
  max-width: 42rem;
  line-height: 1.55;
  margin: 0;
}
.authority-hero .badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.authority-body {
  padding: 2rem 0 3.5rem;
}
.authority-section {
  margin: 0 0 2.4rem;
}
.authority-section > h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.45rem;
  margin: 0 0 0.75rem;
  color: var(--p5-ink);
}
.authority-finance .authority-section > h2 { color: var(--p5-blue); }
.authority-lab .authority-section > h2 { color: var(--p5-blue); }
.authority-futures .authority-section > h2 { color: #3d3935; }

.authority-section p,
.authority-section li {
  color: var(--p5-muted);
  line-height: 1.6;
}
.authority-section ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}
.authority-section li { margin: 0.35rem 0; }

/* Status chips (extra Phase 5 statuses) */
.status-prototype {
  background: rgba(27, 58, 95, 0.1);
  color: #1b3a5f;
  border-color: rgba(27, 58, 95, 0.35);
}
.status-not-yet {
  background: rgba(120, 90, 90, 0.12);
  color: #5a3535;
  border-color: rgba(120, 90, 90, 0.4);
}
.status-intelligence {
  background: rgba(27, 58, 95, 0.08);
  color: #1b3a5f;
  border-color: rgba(27, 58, 95, 0.3);
}
.status-tool {
  background: rgba(107, 143, 113, 0.12);
  color: #2f5a3a;
  border-color: rgba(107, 143, 113, 0.4);
}
.status-service {
  background: rgba(201, 162, 39, 0.12);
  color: #6b5310;
  border-color: rgba(201, 162, 39, 0.45);
}
.status-verify {
  background: rgba(180, 100, 40, 0.12);
  color: #7a3e12;
  border-color: rgba(180, 100, 40, 0.4);
}

/* Type / kind labels (RESEARCH | INTELLIGENCE | TOOL | SERVICE) */
.kind-chip {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  background: rgba(18, 46, 43, 0.06);
  color: #3a4643;
  border: 1px solid var(--p5-line);
}

/* Authority cards grid */
.p5-card-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
@media (min-width: 640px) {
  .p5-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .p5-card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.p5-card {
  background: #fff;
  border: 1px solid var(--p5-line);
  border-radius: 1rem;
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 0 6px 18px rgba(18, 46, 43, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.p5-card h3 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.12rem;
  margin: 0.15rem 0 0;
  color: var(--p5-ink);
}
.p5-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--p5-muted);
  flex: 1;
}
.p5-card .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.p5-card .card-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Evidence / meta fields rail */
.p5-meta-rail {
  display: grid;
  gap: 0.55rem 1.25rem;
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  background: rgba(27, 58, 95, 0.04);
  border: 1px solid var(--p5-line);
  border-radius: 0.85rem;
}
@media (min-width: 560px) {
  .p5-meta-rail { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 800px) {
  .p5-meta-rail.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.p5-meta-rail dt {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6a736f;
  margin: 0;
}
.p5-meta-rail dd {
  margin: 0.15rem 0 0;
  color: var(--p5-ink);
  font-size: 0.95rem;
}

/* Methodology rail: QUESTION → … → NEXT */
.p5-method-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px dashed rgba(27, 58, 95, 0.28);
  border-radius: 0.85rem;
}
.p5-method-rail .step {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(27, 58, 95, 0.08);
  color: var(--p5-blue);
}
.p5-method-rail .arrow {
  color: #9aa3a0;
  font-size: 0.85rem;
}

/* Experiment scorecard / comparison table */
.p5-scorecard {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
  background: #fff;
  border: 1px solid var(--p5-line);
  border-radius: 0.75rem;
  overflow: hidden;
}
.p5-scorecard th,
.p5-scorecard td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--p5-line);
  vertical-align: top;
}
.p5-scorecard th {
  background: rgba(27, 58, 95, 0.06);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3a4643;
}
.p5-scorecard tr:last-child td { border-bottom: none; }
.p5-scorecard .num { font-variant-numeric: tabular-nums; text-align: right; }
.p5-scorecard .highlight {
  font-weight: 700;
  color: var(--p5-blue);
}

/* Limitation / disclaimer callouts */
.p5-limit {
  margin: 1.1rem 0;
  padding: 1rem 1.15rem;
  border-radius: 0.85rem;
  border-left: 4px solid #8a4a3a;
  background: rgba(138, 74, 58, 0.08);
  color: #3d2a26;
}
.p5-limit strong { display: block; margin-bottom: 0.35rem; color: #5a3535; }
.p5-limit ul { margin: 0.35rem 0 0; padding-left: 1.15rem; }
.p5-limit li { color: #4a3530; }

.p5-note {
  margin: 1rem 0;
  padding: 0.9rem 1.05rem;
  border-radius: 0.75rem;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: #5a4a20;
  font-size: 0.95rem;
}

.p5-verify {
  margin: 1rem 0;
  padding: 0.9rem 1.05rem;
  border-radius: 0.75rem;
  background: rgba(180, 100, 40, 0.08);
  border: 1px solid rgba(180, 100, 40, 0.3);
  color: #5a3518;
  font-size: 0.95rem;
}

/* Enquiry / CTA strip */
.p5-cta-strip {
  margin: 2rem 0 0;
  padding: 1.5rem 1.35rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(27, 58, 95, 0.08), rgba(201, 162, 39, 0.1));
  border: 1px solid var(--p5-line);
  text-align: left;
}
.p5-cta-strip h2 {
  font-family: Fraunces, Georgia, serif;
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}
.p5-cta-strip p { margin: 0 0 1rem; color: var(--p5-muted); }
.p5-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* TOC / skip links inside authority pages */
.p5-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
}
.p5-toc a {
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--p5-line);
  background: #fff;
  color: var(--p5-muted);
}
.p5-toc a:hover { color: var(--p5-ink); border-color: rgba(18,46,43,0.25); }

/* Related chips reuse */
.authority-page .chip-row { margin-top: 0.75rem; }

/* Experiments upgrade alignment */
.experiments-authority .p5-limit { max-width: 720px; }

/* DNPP authority */
.dnpp-authority .teaser-box { text-align: left; max-width: 820px; margin: 0 auto; }
.dnpp-authority .disclaimer.p5-limit { text-align: left; }

/* Bilingual note spacing */
.authority-page .locale-mirror-note,
.authority-page .bilingual-note {
  font-size: 0.88rem;
  color: var(--p5-muted);
  margin: 0 0 0.75rem;
}
