/* =============================================================
   THE ICA STANDARD · institutional document register.
   EB Garamond serif body. Cinzel for top-level headings.
   JetBrains Mono for citations + figure labels.
   Print-styled. Court-grade aesthetic.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800;900&family=EB+Garamond:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg:        #fafaf6;
  --paper:     #ffffff;
  --ink:       #0a0b0d;
  --gold:      #B8962E;
  --gold-soft: #d8b34d;
  --gold-deep: #8b6f1e;
  --bronze:    #CD7F32;
  --crimson:   #A12C2C;
  --rule:      #d8d2c4;
  --muted:     #6e6a60;
  --muted-2:   #8a857c;
  --highlight: #fef9ec;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--crimson); }

::selection { background: var(--gold); color: var(--paper); }

/* ----- Top brand bar ----- */
.wp-bar {
  background: var(--ink);
  color: var(--gold);
  padding: 10px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 3px solid var(--gold);
}
.wp-bar a { color: var(--gold-soft); text-decoration: none; }
.wp-bar a:hover { color: var(--paper); }
.wp-bar nav { display: flex; gap: 24px; }

/* ----- Cover page ----- */
.wp-cover {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--paper);
  padding: 80px 60px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.wp-cover::before {
  content: '';
  position: absolute;
  top: 60px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 1px; background: var(--gold);
}
.wp-cover-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin-bottom: 36px;
}
.wp-cover-badge {
  display: block;
  width: 168px;
  height: auto;
  margin: 0 auto 44px auto;
}
@media (max-width: 720px) {
  .wp-cover-badge { width: 132px; margin-bottom: 32px; }
}
.wp-cover-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 18px 0;
  max-width: 880px;
}
.wp-cover-sub {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--muted);
  margin: 0 0 48px 0;
  max-width: 720px;
  line-height: 1.55;
}
.wp-cover-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 0 40px 0;
}
.wp-cover-byline {
  font-family: 'EB Garamond', serif;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 8px;
}
.wp-cover-byline strong { font-weight: 700; }
.wp-cover-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  text-transform: uppercase;
  margin-top: 32px;
  text-align: center;
  line-height: 1.8;
}
.wp-cover-classification {
  position: absolute;
  bottom: 36px; left: 50%; transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--gold-deep);
  text-transform: uppercase;
  font-weight: 700;
}

/* ----- Page layout ----- */
.wp-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 32px 80px 32px;
}

.wp-section {
  margin-bottom: 56px;
}

/* Section number marker — now visually distinct enough to read as a
   section card identifier, not a label that could be mistaken for body
   eyebrow text. Raj 2026-05-12: title hierarchy must be obvious. */
.wp-section-num {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.36em;
  color: var(--gold-deep);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(184,150,46,0.35);
  display: inline-block;
  padding-right: 18px;
}

h1.wp-section-title {
  font-family: 'Cinzel', serif;
  /* Title bumped from 32px → 40px so it dominates the drop-cap and
     reads unambiguously as the section heading. Raj 2026-05-12. */
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.015em;
  color: var(--ink);
  margin: 0 0 10px 0;
  line-height: 1.15;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 16px;
}
.wp-section-lead {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 32px 0;
  line-height: 1.55;
}

h2 {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-deep);
  margin: 36px 0 14px 0;
  text-transform: uppercase;
}
h3 {
  font-family: 'EB Garamond', serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  margin: 28px 0 10px 0;
}
h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin: 22px 0 8px 0;
}

p { margin: 0 0 16px 0; }
p.wp-lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 22px;
  font-weight: 500;
}

/* Drop cap on the first paragraph of each section.
   Reduced from 56px → 38px (was visually larger than the 32px section
   title and dominated the hierarchy at scan time — Raj 2026-05-12).
   Now subordinate to the 40px title above it. Museum aesthetic
   preserved at a proportion that doesn't compete with the heading. */
.wp-section > p:first-of-type::first-letter,
.wp-section-lead + p::first-letter,
.wp-section h1.wp-section-title + .wp-section-lead + p::first-letter {
  font-family: 'Cinzel', serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--gold-deep);
  float: left;
  line-height: 0.95;
  margin: 4px 8px 0 0;
}

ul, ol { padding-left: 24px; margin: 0 0 18px 0; }
li { margin-bottom: 8px; }
strong { font-weight: 700; }
em { font-style: italic; color: var(--ink); }

blockquote {
  margin: 22px 0;
  padding: 14px 24px;
  border-left: 3px solid var(--gold);
  background: var(--highlight);
  font-style: italic;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.65;
}
blockquote cite {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-style: normal;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 22px 0;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 2px solid var(--gold);
  background: var(--highlight);
}
td code { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--gold-deep); }

/* Figures */
figure {
  margin: 28px 0;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  position: relative;
}
figure::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--gold);
}
figcaption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dotted var(--rule);
}
figcaption strong {
  color: var(--gold-deep);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/* Pull quotes */
.wp-pull {
  margin: 36px -32px;
  padding: 28px 36px;
  background: var(--ink);
  color: var(--paper);
  border-left: 4px solid var(--gold);
  font-family: 'EB Garamond', serif;
  font-size: 22px;
  font-style: italic;
  line-height: 1.5;
}
.wp-pull cite {
  display: block;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 14px;
  font-family: 'Cinzel', serif;
}

/* Footnote-style inline references */
.wp-ref {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78em;
  color: var(--gold-deep);
  vertical-align: super;
  text-decoration: none;
  margin-left: 1px;
}

/* TOC */
.wp-toc {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 24px 28px;
  margin-bottom: 40px;
  position: relative;
}
.wp-toc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--gold);
}
.wp-toc-title {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--gold-deep);
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 14px 0;
}
.wp-toc ol {
  padding-left: 0;
  list-style: none;
  margin: 0;
}
.wp-toc li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 6px 0;
  font-family: 'EB Garamond', serif;
  font-size: 15px;
  border-bottom: 1px dotted var(--rule);
  padding-bottom: 4px;
}
.wp-toc li a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.wp-toc li a:hover { color: var(--gold-deep); }
.wp-toc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-right: 14px;
  letter-spacing: 0.04em;
}
.wp-toc-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-left: 10px;
  flex-shrink: 0;
}
.wp-toc-status.draft { color: var(--bronze); }
.wp-toc-status.complete { color: #2EBE5C; }
.wp-toc-status.outline { color: var(--muted-2); }

/* Footer */
.wp-foot {
  border-top: 2px solid var(--gold);
  margin-top: 80px;
  padding: 30px 32px 60px 32px;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

/* Print-friendly */
@media print {
  body { background: white; font-size: 11pt; line-height: 1.6; }
  .wp-bar, .wp-pull { background: white; color: black; border-color: #000; }
  .wp-cover { min-height: 100vh; page-break-after: always; }
  .wp-section { page-break-inside: avoid; }
  h1.wp-section-title { page-break-after: avoid; }
  a { color: black; text-decoration: none; }
}

/* Mobile */
@media (max-width: 700px) {
  .wp-bar { padding: 10px 18px; flex-direction: column; gap: 8px; }
  .wp-bar nav { gap: 14px; }
  .wp-cover { padding: 60px 24px; }
  .wp-body { padding: 40px 22px 60px 22px; }
  .wp-pull { margin: 28px -22px; padding: 22px 26px; font-size: 18px; }
  body { font-size: 16px; }
}
