/* Guild projects page (#303): the current project as a page of the Guild's ledger. The parchment page is copied from home.css's .ledger
   (a candidate for style.css). On parchment the live colour is the dark gear green, used only while a project is running. */
.ev-intro { padding: 1rem 0 0.5rem; }
.ev-intro h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1; margin-bottom: 0.9rem;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), 0 -1px 0 rgba(255, 235, 200, 0.08); }
.ev-intro .lead { margin: 0; }
.ev-status:empty { display: none; }
.ev-status { margin: 1.5rem 0 0; }
.ev-body { padding: 1.25rem 0 0.5rem; }

/* The parchment page */
.ledger { --ink: #2a1f14; --rubric: #7a3a22; --faded: #5c4a33; --live-ink: #0b5a45; --rule: 1.9rem;
  position: relative;
  background:
    repeating-linear-gradient(180deg, transparent 0 var(--rule), rgba(42, 31, 20, 0.1) var(--rule) calc(var(--rule) + 1px)),
    linear-gradient(90deg, transparent 2.6rem, rgba(122, 58, 34, 0.45) 2.6rem calc(2.6rem + 1px), transparent calc(2.6rem + 1px)),
    #d9ccab;
  color: var(--ink); padding: 1.9rem 2rem 1.9rem 3.6rem; line-height: var(--rule);
  box-shadow: 0 1.2rem 2.5rem rgba(0, 0, 0, 0.45);
  clip-path: polygon(0 6px, 3% 0, 30% 4px, 55% 0, 78% 5px, 100% 0, calc(100% - 4px) 40%, 100% 72%, calc(100% - 5px) 100%,
    70% calc(100% - 4px), 41% 100%, 12% calc(100% - 5px), 0 100%, 4px 60%); }
.ledger h2 { font-size: 1.85rem; line-height: 1.15; color: var(--rubric); margin: 0 0 0.75rem; }
.ledger h3 { font-size: 1.3rem; line-height: var(--rule); color: var(--rubric); margin: 1.9rem 0 0.4rem; }
.ledger h4 { font-size: 1.15rem; line-height: 1.4; color: var(--ink); margin: 0; }
.ledger p { margin: 0 0 0.5rem; }
.ledger a { color: var(--rubric); text-decoration-color: rgba(122, 58, 34, 0.6); }
.ledger a:hover { color: var(--ink); }
.ledger :focus-visible { outline-color: var(--rubric); }
.ev-seal { float: right; width: 3.6rem; height: 3.6rem; margin: -0.4rem -0.5rem 0.5rem 1rem; }
.ev-sign { font-style: italic; color: var(--faded); margin-top: 1.2rem !important; }

.ev-sheet { max-width: 46rem; transform: rotate(-0.35deg); }
.ev-notice { max-width: 40rem; margin-top: 0.5rem; }
.ev-notice h2 { margin-bottom: 0.6rem; }

/* The state, stamped in ink above the name */
.ev-stamp { display: inline-block; margin: 0 0 0.6rem !important; padding: 0 0.6rem; border: 2px solid currentColor; border-radius: 2px;
  font-family: var(--font-heading); font-size: 0.95rem; line-height: 1.6; color: var(--faded); transform: rotate(-2deg); }
.ev-running .ev-stamp { color: var(--live-ink); }
.ev-finished .ev-stamp { color: var(--rubric); }
.ev-lore { font-style: italic; max-width: 40rem; }

/* Progress: an inked bar; filled in gear green only while the project runs */
.ev-bar { height: 0.55rem; margin: 0.35rem 0 0.2rem; background: rgba(42, 31, 20, 0.08); border: 1px solid rgba(42, 31, 20, 0.45); border-radius: 1px; overflow: hidden; }
.ev-bar i { display: block; height: 100%; background: var(--faded); }
.ev-running .ev-bar i { background: var(--live-ink); }
.ev-total { margin-top: 1.2rem; padding: 0.9rem 0 0.2rem; border-top: 1px solid rgba(42, 31, 20, 0.3); }
.ev-total > .ev-bar { height: 0.85rem; }

/* Ledger lines: label, dotted leader, figure */
.ev-line { display: flex; align-items: baseline; gap: 0.5rem; margin: 0; }
.ev-what { min-width: 0; }
.ev-dots { flex: 1 1 1.5rem; min-width: 1.5rem; border-bottom: 2px dotted rgba(42, 31, 20, 0.4); transform: translateY(-0.3rem); }
.ev-fig { flex: none; margin: 0; font-weight: 600; white-space: nowrap; }
.ev-facts { margin: 0.5rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.2rem; }
.ev-facts dt { color: var(--faded); }

/* Phases */
.ev-phases { list-style: none; margin: 0; padding: 0; }
.ev-phase { padding: 0.7rem 0 0.9rem; border-top: 1px solid rgba(42, 31, 20, 0.3); }
.ev-phase-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.ev-num { font-family: var(--font-heading); color: var(--rubric); min-width: 2.2rem; }
.ev-phase-head h4 { flex: 1 1 auto; }
.ev-state { font-style: italic; color: var(--faded); }
.ev-phase.ev-active .ev-state { color: var(--ink); font-weight: 600; }
.ev-running .ev-phase.ev-active .ev-state { color: var(--live-ink); }
.ev-phase.ev-waiting h4 { color: var(--faded); font-weight: 400; font-style: italic; }
.ev-phase .ev-lore { margin-left: 2.8rem; }
.ev-reqs { list-style: none; margin: 0.3rem 0 0 2.8rem; padding: 0; }
.ev-reqs li { margin-bottom: 0.45rem; }
.ev-reqs li.ev-met .ev-what { text-decoration: line-through; text-decoration-color: rgba(122, 58, 34, 0.7); text-decoration-thickness: 1px; }

/* The roll of givers: a second, narrower page laid on the first */
.ev-roll { max-width: 30rem; margin: -0.5rem 0 0 auto; transform: rotate(0.5deg); padding-top: 1.6rem; }
.ev-roll h2 { font-size: 1.55rem; margin-bottom: 0.3rem; }
.ev-note { font-style: italic; color: var(--faded); }
.ev-board { list-style: none; counter-reset: ev-rank; margin: 0.3rem 0 0; padding-left: 1.8rem; }
.ev-board > li::before { counter-increment: ev-rank; content: counter(ev-rank) "."; flex: none; width: 1.8rem; margin-left: -1.8rem;
  font-family: var(--font-heading); color: var(--rubric); }
.ev-board > li:nth-child(-n + 3) .ev-what { font-weight: 600; }
.ev-titles { list-style: none; margin: 0; padding: 0; }
.ev-title { font-family: var(--font-heading); color: var(--rubric); }

.ev-updated { margin: 2rem 0 0; font-size: 0.88rem; }

/* Undo the old dark-page .ev-* rules still in style.css (they can go once this page ships) */
.ledger .ev-lore { color: var(--ink); }
.ledger .ev-phase { background: none; border: 0; border-top: 1px solid rgba(42, 31, 20, 0.3); border-radius: 0; margin: 0; padding: 0.7rem 0 0.9rem; opacity: 1; box-shadow: none; }
.ledger .ev-phase-head { justify-content: flex-start; }
.ledger .ev-phase-head h4 { margin: 0; }
.ledger .ev-facts dt { font-size: inherit; }
.ledger .ev-facts dd { font-size: inherit; font-weight: 600; margin: 0; }
.ledger .ev-bar { border-radius: 1px; }
.ledger .ev-bar i { border-radius: 0; }
.ledger .ev-reqs li { margin-bottom: 0.45rem; }
.ledger .ev-board li span:first-child { display: inline; min-width: 0; }

@media (max-width: 720px) {
  .ledger { --rule: 1.8rem; transform: none; padding: 1.5rem 1.1rem 1.5rem 2.4rem;
    background:
      repeating-linear-gradient(180deg, transparent 0 var(--rule), rgba(42, 31, 20, 0.1) var(--rule) calc(var(--rule) + 1px)),
      linear-gradient(90deg, transparent 1.6rem, rgba(122, 58, 34, 0.45) 1.6rem calc(1.6rem + 1px), transparent calc(1.6rem + 1px)), #d9ccab; }
  .ledger h2 { font-size: 1.55rem; }
  .ev-seal { width: 2.8rem; height: 2.8rem; margin: -0.3rem -0.3rem 0.4rem 0.6rem; }
  .ev-facts { grid-template-columns: 1fr; }
  .ev-phase .ev-lore, .ev-reqs { margin-left: 0; }
  .ev-num { min-width: 0; }
  .ev-roll { margin: 1.75rem 0 0; }
}
