/* ============================================================
   E5FP Theme Contract v1 — skinnable form + institutional system
   Contract: every component below styles against --e5fp-* tokens.
   Switch skins with data-e5fp-theme="paper|onyx|campaign".
   Gravitas grammar (Augur/E5): bracketed exhibit labels, stamps,
   ledger strips, seals, corner ticks. Motion budget: near zero.
   ============================================================ */

/* ---------- tokens ---------- */
:root,
[data-e5fp-theme="paper"] {
  --e5fp-paper: #FAF6EE;
  --e5fp-ink: #1C1917;
  --e5fp-muted: #78716C;
  --e5fp-faint: #A8A29E;
  --e5fp-accent: #C2410C;
  --e5fp-accent-soft: rgba(194,65,12,.08);
  --e5fp-rule: #E7E0D2;
  --e5fp-rule-strong: #1C1917;
  --e5fp-card: #FFFFFF;
  --e5fp-err-bg: #FDECEA; --e5fp-err-line: #E8A09A; --e5fp-err-ink: #8C2F26;
  --e5fp-radius: 6px;
  --e5fp-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --e5fp-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --e5fp-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
[data-e5fp-theme="onyx"] {
  --e5fp-paper: #0C0C0E;
  --e5fp-ink: #EEE6CF;
  --e5fp-muted: #B3AA90;
  --e5fp-faint: #6E675A;
  --e5fp-accent: #D4AF37;
  --e5fp-accent-soft: rgba(212,175,55,.10);
  --e5fp-rule: #1E1E24;
  --e5fp-rule-strong: #D4AF37;
  --e5fp-card: #101014;
  --e5fp-err-bg: #2A1210; --e5fp-err-line: #6E2A24; --e5fp-err-ink: #E8A09A;
  --e5fp-radius: 0;
}
[data-e5fp-theme="campaign"] {
  --e5fp-paper: #060410;
  --e5fp-ink: #F0EEFC;
  --e5fp-muted: #9D98C0;
  --e5fp-faint: #5E5878;
  --e5fp-accent: #C9A84C;
  --e5fp-accent-soft: rgba(201,168,76,.10);
  --e5fp-rule: #1B1633;
  --e5fp-rule-strong: #C9A84C;
  --e5fp-card: #0D0A1E;
  --e5fp-err-bg: #2A1016; --e5fp-err-line: #7A2E35; --e5fp-err-ink: #F0A0A8;
  --e5fp-radius: 10px;
}

/* ---------- base ---------- */
.e5fp-scope {
  background: var(--e5fp-paper); color: var(--e5fp-ink);
  font-family: var(--e5fp-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.e5fp-wrap { max-width: 680px; margin: 0 auto; padding: 0 24px; }
.e5fp-wrap--wide { max-width: 920px; }

/* ---------- masthead: seal left, edition right, double rule ---------- */
.e5fp-masthead {
  border-bottom: 3px double var(--e5fp-rule-strong);
  padding: 18px 0 14px; margin-bottom: 48px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.e5fp-brandline { display: flex; align-items: center; gap: 12px; }
.e5fp-brand {
  font-family: var(--e5fp-mono); font-weight: 700; letter-spacing: .06em; font-size: 15px;
}
.e5fp-brand a { color: inherit; text-decoration: none; }
.e5fp-brand span { color: var(--e5fp-accent); }
.e5fp-edition {
  font-family: var(--e5fp-mono); font-size: 12px; color: var(--e5fp-muted); letter-spacing: .08em;
  text-align: right; white-space: nowrap;
}
.e5fp-nav { font-family: var(--e5fp-mono); font-size: 13px; letter-spacing: .06em; }
.e5fp-nav a { color: var(--e5fp-muted); text-decoration: none; margin-left: 18px; }
.e5fp-nav a:hover { color: var(--e5fp-accent); }

/* seal: double-ring monogram */
.e5fp-seal { width: 40px; height: 40px; flex: none; }

/* ---------- exhibit labels: [ FILED EXHIBITS ] ---------- */
.e5fp-exhibit {
  font-family: var(--e5fp-mono); font-size: 13px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--e5fp-muted);
  border-bottom: 1px solid var(--e5fp-rule); padding-bottom: 10px; margin-bottom: 24px;
}
.e5fp-eyebrow {
  font-family: var(--e5fp-mono); font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--e5fp-accent); margin-bottom: 18px;
}

/* ---------- rubber stamps: status, not pills ---------- */
.e5fp-stamp {
  display: inline-block;
  font-family: var(--e5fp-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--e5fp-accent);
  border: 1.5px solid var(--e5fp-accent); border-radius: 3px;
  padding: 4px 10px; transform: rotate(-1.5deg);
  background: var(--e5fp-accent-soft); margin-bottom: 12px;
}
.e5fp-stamp--ink { color: var(--e5fp-ink); border-color: var(--e5fp-ink); background: transparent; }

/* ---------- ledger strip: provenance under content ---------- */
.e5fp-ledger {
  font-family: var(--e5fp-mono); font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--e5fp-faint);
  border-top: 1px solid var(--e5fp-rule); padding-top: 12px; margin-top: 28px;
}

/* ---------- corner registration ticks: one featured panel per page ---------- */
.e5fp-ticks { position: relative; }
.e5fp-ticks::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  background:
    linear-gradient(var(--e5fp-accent), var(--e5fp-accent)) left top / 16px 1.5px,
    linear-gradient(var(--e5fp-accent), var(--e5fp-accent)) left top / 1.5px 16px,
    linear-gradient(var(--e5fp-accent), var(--e5fp-accent)) right top / 16px 1.5px,
    linear-gradient(var(--e5fp-accent), var(--e5fp-accent)) right top / 1.5px 16px,
    linear-gradient(var(--e5fp-accent), var(--e5fp-accent)) left bottom / 16px 1.5px,
    linear-gradient(var(--e5fp-accent), var(--e5fp-accent)) left bottom / 1.5px 16px,
    linear-gradient(var(--e5fp-accent), var(--e5fp-accent)) right bottom / 16px 1.5px,
    linear-gradient(var(--e5fp-accent), var(--e5fp-accent)) right bottom / 1.5px 16px;
  background-repeat: no-repeat; opacity: .8;
}

/* ---------- type ---------- */
.e5fp-h1 {
  font-family: var(--e5fp-display); font-weight: 500;
  font-size: clamp(32px, 6vw, 46px); line-height: 1.12; letter-spacing: .005em;
  margin-bottom: 22px;
}
.e5fp-lede { font-size: 18px; color: var(--e5fp-muted); margin-bottom: 36px; max-width: 56ch; }
.e5fp-lede strong { color: var(--e5fp-ink); }
.e5fp-pull {
  border-left: 3px solid var(--e5fp-accent); padding: 4px 0 4px 22px; margin: 28px 0;
  font-family: var(--e5fp-display); font-style: italic; font-size: 20px; color: var(--e5fp-ink);
  max-width: 56ch;
}

/* ---------- form ---------- */
.e5fp-form {
  background: var(--e5fp-card); border: 1px solid var(--e5fp-rule);
  border-radius: var(--e5fp-radius); padding: 32px; margin-bottom: 16px;
}
.e5fp-field { display: block; margin-bottom: 18px; }
.e5fp-field > span, .e5fp-field > .e5fp-flabel {
  display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px;
}
.e5fp-field input[type="text"], .e5fp-field textarea, .e5fp-field select {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px;
  border: 1.5px solid var(--e5fp-rule); border-radius: var(--e5fp-radius);
  background: var(--e5fp-card); color: var(--e5fp-ink);
}
.e5fp-field input:focus, .e5fp-field textarea:focus, .e5fp-field select:focus {
  outline: none; border-color: var(--e5fp-accent);
  box-shadow: 0 0 0 3px var(--e5fp-accent-soft);
}
.e5fp-hint { display: block; font-size: 13px; color: var(--e5fp-muted); margin-top: 6px; font-weight: 400; }
.e5fp-radio { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 400; margin-bottom: 10px; cursor: pointer; }
.e5fp-radio input { margin-top: 4px; accent-color: var(--e5fp-accent); }
.e5fp-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.e5fp-err {
  display: none; background: var(--e5fp-err-bg); border: 1px solid var(--e5fp-err-line);
  color: var(--e5fp-err-ink); border-radius: var(--e5fp-radius);
  padding: 12px 16px; font-size: 14px; margin-bottom: 16px;
}
.e5fp-ok {
  display: none; background: var(--e5fp-card); border: 1px solid var(--e5fp-rule);
  border-radius: var(--e5fp-radius); padding: 36px; text-align: center;
}
.e5fp-ok h3 { font-family: var(--e5fp-display); font-size: 24px; margin-bottom: 10px; font-weight: 500; }
.e5fp-ok p { font-size: 16px; color: var(--e5fp-muted); }

/* ---------- buttons ---------- */
.e5fp-btn {
  display: inline-block; background: var(--e5fp-ink); color: var(--e5fp-paper);
  font-size: 17px; font-weight: 600; padding: 15px 30px; border: 0;
  border-radius: var(--e5fp-radius); cursor: pointer; text-decoration: none;
  transition: background .15s ease;
}
.e5fp-btn:hover { background: var(--e5fp-accent); }
.e5fp-btn:disabled { opacity: .55; cursor: wait; }
.e5fp-btn--block { width: 100%; }
.e5fp-btn-ghost {
  display: inline-block; background: transparent; color: var(--e5fp-ink);
  font-size: 15px; font-weight: 600; padding: 12px 22px;
  border-radius: var(--e5fp-radius); border: 1.5px solid var(--e5fp-ink); text-decoration: none;
}
.e5fp-btn-ghost:hover { border-color: var(--e5fp-accent); color: var(--e5fp-accent); }

/* ---------- offer cards ---------- */
.e5fp-offers { display: grid; gap: 14px; }
.e5fp-offer {
  background: var(--e5fp-card); border: 1px solid var(--e5fp-rule);
  border-radius: var(--e5fp-radius); padding: 26px;
}
.e5fp-offer h3 { font-family: var(--e5fp-display); font-size: 21px; font-weight: 500; margin-bottom: 6px; }
.e5fp-offer .e5fp-price {
  font-family: var(--e5fp-mono); font-size: 13.5px; color: var(--e5fp-muted); margin-bottom: 10px;
}
.e5fp-offer p { font-size: 15px; color: var(--e5fp-muted); margin-bottom: 16px; }
.e5fp-offer .e5fp-btn-ghost { font-size: 14px; padding: 10px 18px; }

/* ---------- steps / creed lists ---------- */
.e5fp-steps { list-style: none; counter-reset: step; }
.e5fp-steps li {
  counter-increment: step; background: var(--e5fp-card); border: 1px solid var(--e5fp-rule);
  border-radius: var(--e5fp-radius); padding: 20px 20px 20px 64px; margin-bottom: 14px; position: relative;
}
.e5fp-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 20px; top: 20px;
  font-family: var(--e5fp-mono); font-weight: 700; color: var(--e5fp-accent); font-size: 15px;
}
.e5fp-steps li strong { display: block; margin-bottom: 4px; font-size: 16px; }
.e5fp-steps li p { font-size: 15px; color: var(--e5fp-muted); }

/* ---------- story strip / featured panel ---------- */
.e5fp-panel {
  background: var(--e5fp-card); border: 1px solid var(--e5fp-rule);
  border-radius: var(--e5fp-radius); padding: 32px; margin-bottom: 60px;
}
.e5fp-panel p { font-size: 17px; color: var(--e5fp-muted); margin-bottom: 14px; }
.e5fp-panel p strong { color: var(--e5fp-ink); }
.e5fp-panel a { color: var(--e5fp-accent); font-weight: 600; text-decoration: none; }
.e5fp-panel a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.e5fp-footer {
  border-top: 3px double var(--e5fp-rule-strong); margin-top: 72px; padding: 20px 0 40px;
  font-size: 13px; color: var(--e5fp-muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.e5fp-footer a { color: var(--e5fp-muted); text-decoration: none; margin-left: 14px; }
.e5fp-footer a:hover { color: var(--e5fp-accent); }

/* ---------- sections ---------- */
.e5fp-block { margin-bottom: 60px; }
.e5fp-micro { font-size: 13px; color: var(--e5fp-muted); margin-bottom: 56px; }
.e5fp-whofor { font-size: 17px; color: var(--e5fp-muted); }
.e5fp-whofor strong { color: var(--e5fp-ink); }
.e5fp-mission-note {
  font-size: 14px; color: var(--e5fp-muted); margin-top: 20px;
  border-top: 1px solid var(--e5fp-rule); padding-top: 16px;
}

/* ---------- motion budget: the stone never moves ---------- */
.e5fp-live { display: inline-flex; align-items: center; gap: 8px; }
.e5fp-live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--e5fp-accent);
  animation: e5fp-breathe 2.6s ease-in-out infinite;
}
@keyframes e5fp-breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .e5fp-live-dot { animation: none; }
  .e5fp-stamp { transform: none; }
}
