/* Rule&Wonder Studio · homepage. Loads after studio-base.css and only uses its tokens.
   Every interactive state in the hero shares one grid cell with its siblings, so nothing moves when it changes. */

/* ── Hero: copy beside an open Mercer edition ─────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(28px, 4.4vw, 64px) clamp(44px, 5vw, 76px);
}
.hero-copy { align-self: center; }
.hero h1 { max-width: none; font-size: clamp(42px, 7.4vw, 68px); line-height: 1.02; }
.hero h1 span { display: inline; }
.hero .lede { margin-top: 20px; max-width: 34ch; }
.studio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 26px; }
.studio-actions > a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; font: 600 var(--fs-small)/1.25 var(--sans); letter-spacing: .01em; text-decoration: none;
}
.studio-actions > a.primary {
  padding: 12px 22px; background: var(--ink); border: 1px solid var(--ink); color: var(--paper);
  transition: background-color .15s ease, border-color .15s ease;
}
.studio-actions > a.primary:hover { background: #2A2F37; border-color: #2A2F37; }
.studio-actions > a:not(.primary) { text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: .3em; }
.studio-actions > a:not(.primary):hover { text-decoration-color: currentColor; }
.trust { margin-top: 22px; max-width: 46ch; padding-top: 16px; border-top: 1px solid var(--rule); font-size: var(--fs-small); color: var(--muted); }

@media (min-width: 1150px) {
  .hero { grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); column-gap: clamp(36px, 3.4vw, 48px); align-items: center; }
  .hero h1 { font-size: min(5.15vw, 76px); }
  .hero h1 span { display: block; white-space: nowrap; }
}
@media (min-width: 700px) and (max-width: 1149px) {
  .hero h1 { font-size: min(6.6vw, 68px); }
  .hero h1 span { white-space: nowrap; }
  .hero-copy { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: var(--gap-lg); align-items: end; }
  .hero-copy h1 { grid-row: span 3; }
  .hero-copy .lede { margin-top: 0; }
}

/* The edition folio */
.edition {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-folio);
  padding: clamp(16px, 2vw, 26px);
}
.edition-head, .edition-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px;
}
.edition-head { padding-bottom: 10px; border-bottom: 1px solid var(--brass); }
.edition-head p { font: 650 var(--fs-label)/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--brass-text); }
.edition-head .edition-flag { letter-spacing: .04em; text-transform: none; font-weight: 500; color: var(--muted); }
.spread { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
.page { padding-block: clamp(16px, 1.8vw, 24px); min-width: 0; }
.page-story { padding-right: clamp(16px, 2vw, 28px); }
.page-margin { /* the fold */
  border-left: 1px solid var(--rule-strong); box-shadow: inset 12px 0 16px -16px rgba(17, 19, 24, .4);
  padding-left: clamp(16px, 2vw, 28px); display: flex; flex-direction: column; gap: 16px; }

.story { font: 400 clamp(17px, 1.3vw, 19px)/1.62 var(--serif); max-width: none; }
.cite {
  position: relative;
  display: inline; margin: 0 2px; padding: 2px 7px 2px 3px;
  background: transparent; color: var(--brass-text);
  border: 1px solid var(--brass); border-radius: 2px;
  font: 600 12.5px/1.5 var(--sans); letter-spacing: .02em; white-space: nowrap; vertical-align: 1px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.cite::after { content: ""; position: absolute; inset: -9px -3px; } /* larger tap area, no layout cost */
.cite-n {
  display: inline-block; min-width: 1.45em; margin-right: 3px; padding: 0 3px;
  background: var(--brass-text); color: var(--paper); text-align: center; border-radius: 1px;
}
.note-src .cite-n { background: var(--ink); }
.cite[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cite[aria-pressed="true"] .cite-n { background: var(--gold); color: var(--ink); }
.cite:disabled { cursor: default; opacity: 1; }
.cite:not(:disabled):hover { border-color: var(--ink); }

.plate { margin-top: 18px; }
.plate-stack { display: grid; border: 1px solid var(--rule-strong); background: var(--stock); }
.plate-face { grid-area: 1 / 1; visibility: hidden; display: grid; place-items: center; padding: 14px; }
.plate-face.is-on { visibility: visible; }
.plate-front img { width: 100%; max-width: 300px; height: auto; mix-blend-mode: multiply; }
.plate-back { align-content: center; justify-items: start; gap: 8px; background: var(--paper); }
.hand { font: italic 400 clamp(19px, 1.6vw, 23px)/1.3 var(--serif); color: var(--ink); transform: rotate(-1.4deg); }
.as-found { font-size: 13px; line-height: 1.45; color: var(--muted); }
.as-found strong { margin-right: 6px; font: 650 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--brass-text); }
.plate figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; font-size: 13px; }
.flip { display: inline-flex; border: 1px solid var(--rule-strong); }
.flip button {
  min-height: 40px; min-width: 64px; padding: 0 12px;
  background: transparent; border: 0; color: var(--ink); font: 600 13px/1 var(--sans);
}
.flip button + button { border-left: 1px solid var(--rule-strong); }
.flip button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.flip button:disabled { cursor: default; }

/* Proof margin */
.margin-label { font: 650 var(--fs-label)/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--brass-text); }
.notes { display: grid; }
.note { grid-area: 1 / 1; visibility: hidden; min-width: 0; }
.note.is-on { visibility: visible; }
.note > * + * { margin-top: 8px; }
.mark-tag { display: flex; align-items: center; gap: 8px; font: 650 12px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.note-src { font: 600 14px/1.4 var(--sans); }
.note-src cite { font-style: italic; }
.clip { margin: 10px 0 0; padding: 12px 14px; background: var(--stock); border-left: 2px solid var(--brass); font-family: var(--newsprint); }
.clip p { font-size: 15.5px; line-height: 1.5; }
.clip .clip-head { margin-bottom: 4px; font: 700 13px/1.3 var(--newsprint); letter-spacing: .06em; text-transform: uppercase; }
.note-body { font: 400 17px/1.5 var(--serif); }
.note-foot { font-size: 13px; line-height: 1.45; color: var(--muted); }

/* Certainty marks: solid = we know, dashed = we think, ? = not found yet */
:is(.mark-tag, .legend, .key) i {
  flex: none; display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--accent-rule); font-style: normal;
}
:is(.mark-tag, .legend, .key) i.think { border-top-style: dashed; }
:is(.mark-tag, .legend, .key) i.open, .annotated b {
  width: 18px; height: 18px; border: 1.5px solid var(--accent-rule); border-radius: 50%;
  display: inline-grid; place-items: center; font: 700 11px/1 var(--sans); color: var(--accent-text);
}
.mark-tag.think i { border-top-style: dashed; }
.mark-tag.open i { width: 18px; height: 18px; border: 1.5px solid var(--brass); border-radius: 50%; display: inline-grid; place-items: center; font: 700 11px/1 var(--sans); color: var(--brass-text); }

/* Family confirmation */
.confirm { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rule); }
.confirm-q { font: 600 15px/1.4 var(--sans); }
.demo-note { display: block; font-weight: 400; color: var(--muted); }
.confirm-buttons { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 10px; }
.confirm-buttons button {
  flex: 1 1 auto; min-height: 44px; padding: 0 clamp(6px, .8vw, 12px);
  background: transparent; color: var(--ink); border: 1px solid var(--ink);
  font: 600 14px/1 var(--sans); white-space: nowrap;
}
.confirm-buttons button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.confirm-buttons button:not(:disabled):not([aria-pressed="true"]):hover { background: var(--stock); }
.confirm-buttons button:disabled { cursor: default; }
.confirm-out { display: grid; margin-top: 10px; }
.out { grid-area: 1 / 1; visibility: hidden; font-size: 14px; line-height: 1.45; color: var(--muted); }
.out.is-on { visibility: visible; }

.edition-foot { padding-top: 10px; border-top: 1px solid var(--brass); }
.edition-foot .text-link { font-size: var(--fs-small); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 500 13px/1.4 var(--sans); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.edition .legend i { border-top-color: var(--brass); }
.edition .legend i.open { border-color: var(--brass); color: var(--brass-text); }

@media (max-width: 699px) {
  .hero { gap: 18px; padding-block: 18px 24px; }
  .hero h1 { font-size: clamp(36px, 10.6vw, 44px); }
  .hero .lede { max-width: none; font-size: 17.5px; line-height: 1.42; margin-top: 14px; }
  .studio-actions { margin-top: 18px; gap: 4px 14px; }
  .studio-actions > a { font-size: 14px; }
  .studio-actions > a.primary { padding-inline: 14px; }
  .trust { margin-top: 12px; padding-top: 0; border-top: 0; font-size: 14px; line-height: 1.45; }
  .edition { padding: 12px 14px 6px; }
  .edition-head { padding-bottom: 8px; }
  .edition-head p { font-size: 11.5px; }
  .spread { grid-template-columns: minmax(0, 1fr); }
  .page-margin { border-left: 0; box-shadow: none; }
  .page { padding-block: 12px 0; }
  .page-story { padding-right: 0; }
  .page-margin { padding-left: 0; padding-bottom: 8px; gap: 8px; }
  .story { font-size: 16px; line-height: 1.6; }
  .plate { display: grid; grid-template-columns: minmax(0, 56%) minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 10px; }
  .plate-face { padding: 6px; }
  .plate figcaption { flex-direction: column; align-items: flex-end; margin-top: 0; gap: 4px; }
  .hand { font-size: 15px; }
  .as-found { font-size: 11.5px; line-height: 1.35; }
  .margin-label, .note-foot { display: none; }
  .mark-tag { float: right; gap: 5px; margin: 1px 0 0 8px; font-size: 10.5px; letter-spacing: .05em; }
  .mark-tag i { width: 14px !important; }
  .mark-tag.open i { width: 16px !important; height: 16px; }
  .note-src { font-size: 13px; }
  .note > .note-src { margin-top: 0; }
  .clip { margin-top: 4px; padding: 8px 10px; }
  .clip p { font-size: 14px; line-height: 1.42; }
  .clip .clip-head { font-size: 12px; margin-bottom: 2px; }
  .note > * + * { margin-top: 5px; }
  .note-body { font-size: 16px; }
  .confirm { padding-top: 10px; }
  .confirm-q { font-size: 14px; line-height: 1.35; }
  .demo-note { font-size: 13px; }
  .confirm-buttons { flex-wrap: nowrap; margin-top: 5px; }
  .confirm-buttons button { padding: 0 6px; font-size: 13.5px; }
  .confirm-out { margin-top: 5px; }
  .out { font-size: 13.5px; line-height: 1.4; }
  .edition-foot { padding-top: 2px; gap: 0 12px; }
  .legend { gap: 2px 12px; font-size: 12px; padding-bottom: 6px; }
}
@media (min-width: 375px) and (max-width: 699px) { .studio-actions { flex-wrap: nowrap; } .studio-actions > a { white-space: nowrap; } }
@media (max-width: 374px) {
  .flip button { min-width: 52px; padding: 0 8px; }
  .confirm-buttons button { font-size: 12.5px; padding: 0 4px; }
}

/* ── Section 2: evidence and exclusion, one obsidian spread ─────────────────── */
.evidence-split { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: var(--gap-lg); align-items: start; }
.specimen {
  margin-top: clamp(22px, 2.6vw, 34px);
  padding: clamp(22px, 2.8vw, 38px);
  background: var(--ink-elev); border: 1px solid var(--rule-dark);
}
.specimen-label { font: 650 var(--fs-label)/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.annotated { margin-top: 14px; max-width: 40ch; font: 400 clamp(20px, 1.9vw, 26px)/1.7 var(--serif); color: var(--paper); }
.annotated span { text-underline-offset: .32em; text-decoration-thickness: 2px; text-decoration-color: var(--gold); text-decoration-skip-ink: none; }
.m-know { text-decoration-line: underline; text-decoration-style: solid; }
.m-think { text-decoration-line: underline; text-decoration-style: dashed; }
.m-open { color: var(--inverse-muted); }
.annotated b { margin-left: 6px; vertical-align: .2em; }
.key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--rule-dark); }
.key dt { display: flex; align-items: center; gap: 8px; font: 650 var(--fs-label)/1.35 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.key dd { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--inverse-muted); }

#checker h2 { font-size: clamp(28px, 2.7vw, 40px); max-width: 16ch; }
.checker-lede { color: var(--inverse-muted); }
.slips { display: grid; gap: 10px; margin-top: clamp(22px, 2.6vw, 34px); padding: 0; list-style: none; }
.slip { padding: 16px 18px; border: 1px solid var(--rule-dark); border-left: 3px solid var(--red-on-dark); background: transparent; }
.slip-name { font: 400 clamp(19px, 1.6vw, 22px)/1.35 var(--newsprint); color: var(--paper); }
.slip-why { margin-top: 4px; font-size: 14px; color: var(--inverse-muted); }
.slip.is-standing { border-color: var(--gold); border-left-color: var(--gold); background: var(--ink-elev); }
.slip.is-standing .slip-why { font: 650 var(--fs-label)/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
#checker .caption { margin-top: 12px; }

/* ── Section 3: one atmospheric pause, deliverables, process ──────────────── */
.interstitial { padding-top: clamp(40px, 5vw, 72px); }
.shelf-band { display: block; border: 1px solid var(--rule-strong); padding: 6px; background: var(--paper); }
.shelf-band img { width: 100%; height: auto; aspect-ratio: 1911 / 424; object-fit: cover; }
.how { padding-top: clamp(40px, 4.6vw, 68px); }
.num { display: block; font: 600 var(--fs-label)/1 var(--sans); letter-spacing: .12em; color: var(--brass-text); font-variant-numeric: tabular-nums; }
.receive { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(22px, 2.6vw, 34px); padding: 0; list-style: none; }
.receive li { padding: clamp(20px, 2.4vw, 32px); background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--brass); }
.receive h3 { margin-top: 14px; }
.receive p { margin-top: 10px; color: var(--muted); }
.rail-title { margin-top: clamp(48px, 6vw, 88px); }
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(22px, 2.6vw, 34px); padding: 0; list-style: none; border-top: 1px solid var(--rule-strong); }
.process li { padding: 18px clamp(14px, 1.8vw, 26px) 0; }
.process li:first-child { padding-left: 0; }
.process li + li { border-left: 1px solid var(--rule); }
.process h3 { margin-top: 10px; font-size: clamp(20px, 1.7vw, 24px); }
.process p { margin-top: 6px; font-size: var(--fs-small); color: var(--muted); }

/* ── Section 4: offers, flagship first ───────────────────────────────────── */
.doorway { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(24px, 3vw, 40px); padding: 0; list-style: none; }
.doorway > li { min-width: 0; }
.door-families { grid-column: 1 / -1; padding: clamp(22px, 3vw, 40px); background: var(--stock); border: 1px solid var(--rule-strong); }
.door-families > h3 { font: 650 var(--fs-label)/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brass-text); padding-bottom: 12px; border-bottom: 1px solid var(--brass); }
.families-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 var(--gap-lg); margin-top: 22px; }
.flagship .offer-name { display: block; font: 540 var(--fs-h3)/1.15 var(--serif); letter-spacing: -.016em; }
.flagship .offer-price { display: block; margin-top: 10px; font: 600 clamp(28px, 2.6vw, 38px)/1.1 var(--serif); letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.flag-scope { margin-top: 16px; font-size: var(--fs-reading); line-height: 1.55; max-width: 44ch; }
.flag-note { margin-top: 10px; font-size: var(--fs-small); color: var(--muted); }
.flagship .btn-primary { margin-top: 22px; }
.door-offers { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--rule); padding-left: var(--gap); }
.door-offers li { padding-block: 16px; }
.door-offers li:first-child { padding-top: 0; }
.door-offers li + li { border-top: 1px solid var(--rule); }
.offer-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; max-width: none; }
.offer-line .offer-name { font: 540 20px/1.25 var(--serif); }
.offer-line .offer-price { font: 600 17px/1.3 var(--sans); font-variant-numeric: lining-nums proportional-nums; }
.offer-note { margin-top: 6px; font-size: var(--fs-small); color: var(--muted); }
.door-terms { grid-column: 1 / -1; margin-top: 26px; border-top: 1px solid var(--rule-strong); }
.door-terms summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none;
  font: 600 var(--fs-small)/1 var(--sans);
}
.door-terms summary::-webkit-details-marker { display: none; }
.door-terms summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--ink); font: 500 15px/1 var(--sans); }
.door-terms[open] summary::before { content: "−"; }
.terms-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); padding-block: 8px 4px; }
.term p { margin-top: 8px; font-size: var(--fs-small); color: var(--muted); }
.term a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-weight: 600; font-size: var(--fs-small); text-decoration-color: var(--brass); }
.door-card { display: flex; flex-direction: column; padding: clamp(20px, 2.4vw, 30px); background: var(--stock); border: 1px solid var(--rule); }
.door-card > h3 { font: 650 var(--fs-label)/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--brass-text); min-height: 2.8em; }
.door-card .door { display: flex; flex-direction: column; flex: 1; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--rule); }
.door-card .offer-line { display: grid; gap: 8px; }
.door-card .offer-name { font: 540 22px/1.2 var(--serif); letter-spacing: -.01em; }
.door-card .offer-price { font-size: var(--fs-small); }
.door-note { margin-top: 12px; font-size: var(--fs-small); color: var(--muted); }
.door-card .text-link { margin-top: auto; padding-top: 14px; font-size: var(--fs-small); }

/* ── Section 5: promises and methods ─────────────────────────────────────── */
.promises .promises-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(22px, 2.6vw, 34px); }
.promises-grid h3 { font: 650 var(--fs-label)/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.promises-grid p { margin-top: 6px; font: 400 clamp(18px, 1.5vw, 21px)/1.45 var(--serif); }
.methods-note { margin-top: clamp(28px, 3vw, 40px); padding-top: 14px; border-top: 1px solid var(--rule); }
.methods-note p { max-width: 96ch; font-size: var(--fs-small); line-height: 1.7; color: var(--muted); }
.methods-note strong { color: var(--ink); }
.methods-note a { padding-block: 10px; color: var(--ink); text-decoration-color: var(--brass); }

/* ── Section 6: close ────────────────────────────────────────────────────── */
.close-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--gap-lg); align-items: center; }
.close-copy p { margin-top: 20px; color: var(--inverse-muted); max-width: 46ch; }
.close-copy p a { color: var(--paper); text-decoration-color: var(--gold); overflow-wrap: anywhere; }
.notebook { border: 1px solid var(--rule-dark); padding: 6px; }
.notebook img { width: 100%; height: auto; }
main:has(> #start:last-child) + .site-footer { border-top: 1px solid var(--rule-dark); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .evidence-split { grid-template-columns: minmax(0, 1fr); }
  .key { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .key div { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 12px; align-items: baseline; }
  .key dd { margin-top: 0; }
  .doorway { grid-template-columns: minmax(0, 1fr); }
  .door-card > h3 { min-height: 0; }
  .terms-grid { grid-template-columns: minmax(0, 1fr); }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .process li:nth-child(n+3) { margin-top: 18px; border-top: 1px solid var(--rule); }
}
@media (max-width: 820px) {
  .receive { grid-template-columns: minmax(0, 1fr); }
  .families-grid { grid-template-columns: minmax(0, 1fr); }
  .door-offers { margin-top: 26px; padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .door-offers li:first-child { padding-top: 16px; }
  .close-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .promises .promises-grid, .process { grid-template-columns: minmax(0, 1fr); }
  .process li { padding-left: 0 !important; border-left: 0 !important; }
  .process li + li { margin-top: 0; border-top: 1px solid var(--rule); }
  .process li:nth-child(n+3) { margin-top: 0; }
  .process li { padding-bottom: 14px; }
  .key div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .shelf-band img { aspect-ratio: 780 / 312; }
}

@media print {
  .edition, .specimen { box-shadow: none; break-inside: avoid; }
  .note, .out, .plate-face { visibility: visible; grid-area: auto; }
  .confirm-buttons, .flip { display: none; }
}
