/* The endowment memorial page — /chris.

   Loaded by the view via content_for :page_stylesheets, untracked (a tracked page
   sheet makes Turbo full-reload on arrival and eats the redirect's flash).
   Everything resolves through --zw-* tokens.

   The kit ships no memorial comp. This is the event page's shape — a document
   column beside a sticky rail — with the story set as prose. Petrona appears in
   two of its three permitted places: the page title and the section headline.

   The donate card's inner controls (frequency toggle, amounts, continue button)
   are the donate/ partials shared with /donate and keep their own styling. */

/* --- page and layout ----------------------------------------------------------- */

/* A document, so the 64rem inset the event and volunteer detail pages use rather
   than the header's 80rem. */
.zw-chris-page {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 32px 1rem 72px;
  color: var(--zw-ink-warm);
}

@media (min-width: 640px)  { .zw-chris-page { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .zw-chris-page { padding-inline: 2rem; } }

.zw-chris-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

@media (min-width: 900px) {
  .zw-chris-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; }
}

.zw-chris-story { min-width: 0; }

/* --- story ------------------------------------------------------------------------ */

.zw-chris-portrait {
  margin: 0 0 40px;
  aspect-ratio: 1 / 1;
  border-radius: var(--zw-radius-xl);
  overflow: hidden;
}

.zw-chris-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left;
}

.zw-chris-name {
  margin: 0;
  font-size: clamp(40px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--zw-ink-warm);
  text-wrap: balance;
}

.zw-chris-dates {
  margin: 20px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--zw-ink-warm-2);
}

.zw-chris-roles {
  margin: 4px 0 40px;
  font-size: 15px;
  color: var(--zw-muted);
}

.zw-chris-prose p {
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--zw-ink-warm-2);
}

.zw-chris-prose strong { font-weight: 600; color: var(--zw-ink-warm); }

.zw-chris-section-title {
  margin: 56px 0 16px;
  padding-top: 40px;
  border-top: 1px solid var(--zw-border-warm);
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.2;
  color: var(--zw-ink-warm);
}

.zw-chris-legal {
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--zw-border-warm);
  font-size: 14px;
  line-height: 1.6;
  color: var(--zw-muted);
}

.zw-chris-legal a,
.zw-chris-rail__note a {
  font-weight: 600;
  color: var(--zw-blue-700);
}

.zw-chris-legal a:hover,
.zw-chris-rail__note a:hover { color: var(--zw-blue-800); text-decoration: underline; }

/* --- rail ------------------------------------------------------------------------ */

/* Sticky only beside the story; stacked, pinning it would cover the thing being read.
   Not while the calculator is open either: that makes the rail taller than a laptop
   screen, and a pinned rail's bottom cannot be scrolled to. */
@media (min-width: 900px) {
  .zw-chris-rail { position: sticky; top: 16px; }
  .zw-chris-rail:has(.zw-chris-impact[open]) { position: static; }
}

.zw-chris-rail__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--zw-ink-warm);
}

.zw-chris-rail__dek {
  margin: 6px 0 20px;
  font-size: 15px;
  color: var(--zw-muted);
}

.zw-chris-card {
  background: var(--zw-surface);
  border: 1px solid var(--zw-border-warm-2);
  border-radius: var(--zw-radius-xl);
  box-shadow: var(--zw-shadow-hairline);
  overflow: hidden;
}

.zw-chris-rail__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--zw-quiet);
}

.zw-chris-rail__note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--zw-muted);
}

/* --- tribute ---------------------------------------------------------------------- */

.zw-chris-tribute { margin-bottom: 24px; }

.zw-chris-tribute__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--zw-ink-warm);
}

.zw-chris-tribute__optional { font-weight: 400; color: var(--zw-quiet); }

/* The kit's input shell: 14px radius, the one warm border allowed on a control,
   blue focus because focus is an action. */
.zw-chris-tribute__input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  color: var(--zw-ink-warm);
  background: var(--zw-surface);
  border: 1px solid var(--zw-border-warm-strong);
  border-radius: var(--zw-radius-lg);
}

.zw-chris-tribute__input::placeholder { color: var(--zw-quiet); }

.zw-chris-tribute__input:focus {
  outline: 2px solid var(--zw-blue-500);
  outline-offset: 0;
  border-color: var(--zw-blue-500);
}

/* --- impact calculator accordion -------------------------------------------------- */

.zw-chris-impact {
  margin-top: 20px;
  border-top: 1px solid var(--zw-border-warm);
}

.zw-chris-impact__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--zw-blue-700);
  cursor: pointer;
  list-style: none;
}

.zw-chris-impact__summary::-webkit-details-marker { display: none; }
.zw-chris-impact__summary:hover { color: var(--zw-blue-800); }

.zw-chris-impact__summary:focus-visible {
  outline: 2px solid var(--zw-blue-500);
  outline-offset: 4px;
  border-radius: var(--zw-radius-xs);
}

.zw-chris-impact__chevron { transition: transform 200ms var(--zw-ease-out); }
.zw-chris-impact[open] .zw-chris-impact__chevron { transform: rotate(180deg); }

.zw-chris-impact__body { padding-top: 16px; }

.zw-chris-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.zw-chris-stat {
  padding: 12px;
  background: var(--zw-paper-3);
  border: 1px solid var(--zw-border-warm);
  border-radius: var(--zw-radius-md);
}

/* Green measures: the total is the impact figure, so it is the one green tile. */
.zw-chris-stat--impact {
  background: var(--zw-green-50);
  border-color: var(--zw-green-100);
}

.zw-chris-stat__label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--zw-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--zw-quiet);
}

.zw-chris-stat__value {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--zw-ink-warm);
}

.zw-chris-stat--impact .zw-chris-stat__label,
.zw-chris-stat--impact .zw-chris-stat__value { color: var(--zw-green-700); }

.zw-chris-chart {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--zw-border-warm);
  border-radius: var(--zw-radius-lg);
}

.zw-chris-chart__canvas { height: 192px; }

.zw-chris-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--zw-muted);
}

.zw-chris-legend__item { display: flex; align-items: center; gap: 6px; }
.zw-chris-legend__swatch { display: inline-block; width: 16px; height: 2px; border-radius: 1px; }

.zw-chris-insight {
  margin-top: 12px;
  padding: 16px;
  background: var(--zw-surface-warm);
  border-radius: var(--zw-radius-lg);
}

.zw-chris-insight__text {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--zw-ink-warm-2);
}

.zw-chris-insight__text strong { font-weight: 600; color: var(--zw-ink-warm); }

.zw-chris-fineprint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--zw-quiet);
}
