/* ==========================================================================
 * consent.css, the consent banner (assets/js/consent.js), Edwin 2026-10-31.
 *
 * The hybrid canon (~/.edwinstrong/design-canon/hybrid-spec-20261005.md):
 * teal card, 1px teal edge, Public Sans, IBM Plex Mono aqua label, white
 * pills. The values are the hybrid block css/offer-stage.css already ships,
 * scoped to the banner so nothing else on the site changes. The card is dark
 * in both schemes, so it reads the same over a light page and a dark one.
 * Accept and Reject are the same pill at the same size: equal prominence.
 * No em or en dashes.
 * ==========================================================================*/
#marrow-consent {
  --mc-card: #1C252C; --mc-edge: #4E5F6C; --mc-ink: #F6F8F9; --mc-muted: #A4B0B7; --mc-aqua: #3EF0CD; --mc-ground: #0E1317;
  box-sizing: border-box;
  background: var(--mc-card);
  color: var(--mc-ink);
  border: 1px solid var(--mc-edge);
  border-radius: 14px;
  padding: 18px 20px 16px;
  font: 400 14px/1.55 "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}
#marrow-consent {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147483000;
  width: calc(100% - 32px);
  max-width: 440px;
}
#marrow-consent .mc-label {
  margin: 0 0 6px;
  font: 500 11px/1.3 "IBM Plex Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mc-aqua);
}
#marrow-consent .mc-body {
  margin: 0 0 14px;
  color: var(--mc-ink);
}
#marrow-consent .mc-body a {
  display: inline-block;
  min-height: 24px;
  line-height: 24px;
  color: var(--mc-aqua);
  text-decoration: underline;
  text-underline-offset: 3px;
}
#marrow-consent .mc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
#marrow-consent .mc-btn {
  flex: 1 1 120px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--mc-edge);
  background: var(--mc-card);
  color: var(--mc-ink);
  font: 600 14px/1 "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}
#marrow-consent .mc-btn:hover { border-color: var(--mc-ink); }
/* Close: a quiet text control in the corner, never a third pill, so it cannot
   read as an answer. It writes no choice. */
#marrow-consent .mc-close {
  position: absolute;
  top: 4px;
  right: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mc-muted);
  font: 500 13px/1 "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
#marrow-consent .mc-close:hover { color: var(--mc-ink); }
#marrow-consent .mc-label { padding-right: 64px; }
#marrow-consent .mc-btn:focus-visible,
#marrow-consent .mc-close:focus-visible,
#marrow-consent .mc-body a:focus-visible {
  outline: 2px solid var(--mc-aqua);
  outline-offset: 2px;
}
.mc-foot { margin: 8px 0 0; }
/* The fallback line on a page with no footer (assets/js/consent.js). */
body > p.mc-foot { margin: 0; padding: 16px 16px 24px; text-align: center; font-size: 13px; }
/* Room under the last line of a page so the fixed card never hides it.
   assets/js/consent.js sets --mc-pad to the card's rendered height plus 32px,
   the same value it gives scroll-padding-bottom, so the two always agree. The
   fixed numbers are only the fallback before the script measures. */
html.mc-open body { padding-bottom: var(--mc-pad, 220px); }
@media (min-width: 600px) { html.mc-open body { padding-bottom: var(--mc-pad, 180px); } }
@media (prefers-reduced-motion: no-preference) {
  #marrow-consent { animation: mc-in 180ms ease-out both; }
  @keyframes mc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
/* A phone: the card sits under the hero's buttons, not on them, until it is answered.
   consent.js measures how far the copy has to rise, offer bar and all. */
@media (max-width: 599px) {
  html.mc-open .pub-hero-copy { position: relative; top: calc(-1 * var(--mc-lift, 0px)); }
  /* The mark sits in the space the copy rises into, and returns with the copy. */
  html.mc-open .pub-mark-hero { visibility: hidden; }
  #marrow-consent { left: 8px; bottom: 8px; width: calc(100% - 16px); padding: 10px 12px; font-size: 12.5px; line-height: 1.35; }
  #marrow-consent .mc-label { display: none; }
  #marrow-consent .mc-body { margin: 0 0 8px; padding-right: 64px; }
  #marrow-consent .mc-actions { flex-wrap: nowrap; gap: 8px; }
  #marrow-consent .mc-btn { flex: 1 1 0; padding: 0 12px; }
}
/* The lift caps at the nav. Where it cannot clear the buttons, assets/js/consent.js marks the
   page: the card takes less height and the eyebrow stands aside with the mark, then the sentence
   if that was not enough. All of it returns on Accept or Reject. */
@media (max-width: 599px) {
  html.mc-tight .pub-hero-copy .pub-eyebrow,
  html.mc-tighter .pub-hero-copy .pub-sub { display: none; }
  html.mc-tight #marrow-consent { padding: 8px 10px; font-size: 12px; line-height: 1.3; }
  html.mc-tight #marrow-consent .mc-body { margin: 0 0 6px; padding-right: 0; }
  html.mc-tight #marrow-consent .mc-body::before { content: ""; float: right; width: 58px; height: 36px; }
  html.mc-tight #marrow-consent .mc-body a { min-height: 0; line-height: inherit; }
  html.mc-tight #marrow-consent .mc-close { top: 0; right: 0; }
}
/* Close never sits on a word: its 44px box is taller than the label above the words. */
@media (min-width: 600px) {
  #marrow-consent .mc-body::before { content: ""; float: right; width: 64px; height: 14px; }
}
@media print { #marrow-consent { display: none; } }
