/* Signup extends the Memory Theatre. See docs/UI-CONTRACT.md. */
.begin-page { --begin-rail: 46%; }
.begin-page .site-head { position: absolute; inset: 0 0 auto; z-index: 2; border: 0; padding: 2.3rem 0; }
.begin-page .site-head .shell { width: 92%; max-width: none; }
.begin-page .wordmark { font-size: 1.9rem; }
.begin-page .wordmark .brand-emblem { width: 2.8rem; height: 2.65rem; }
.begin-home-back { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font: 400 .95rem var(--story); }
.begin-home-back span { margin-left: -.3rem; }
.begin-home-back svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.begin-page main.narrow { width: 100%; max-width: none; overflow: visible; }
.begin-layout { display: grid; grid-template-columns: var(--begin-rail) minmax(0, 1fr); }
.begin-story { position: fixed; inset: 0 auto 0 0; width: var(--begin-rail); isolation: isolate; overflow: hidden; }
.begin-art { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; }
.begin-story::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, transparent 86%, var(--wall)); pointer-events: none; }
.begin-story-copy { padding: clamp(8.7rem, 14.5vh, 11rem) 2rem 0 4vw; max-width: 37rem; }
.begin-story h1 { font-size: clamp(2.8rem, 4.2vw, 4.6rem); font-weight: 300; line-height: 1.12; letter-spacing: -.045em; }
.begin-story h1 em { font-weight: 300; }
.begin-story-copy p { font: 300 clamp(1rem, 1.45vw, 1.35rem)/1.5 var(--story); max-width: 24rem; margin-top: 1.6rem; }
.begin-panel { grid-column: 2; padding: clamp(8.5rem, 14vh, 10rem) 4vw 1.5rem; min-height: calc(100svh - 105px); }
.begin-panel > * { max-width: 43rem; margin-inline: auto; }
.begin-progress { margin-bottom: 3.2rem; }
.begin-progress ol { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0; padding: 0; }
.begin-progress li { position: relative; text-align: center; }
.begin-progress li:not(:last-child)::after { content: ''; position: absolute; left: calc(50% + 14px); right: calc(-50% + 14px); top: 10px; border-top: 1px solid #56604b; }
.begin-progress button { display: flex; flex-direction: column; align-items: center; gap: .2rem; position: relative; padding: 0 .25rem .3rem; width: 100%; border: 0; background: none; font: 300 .95rem/1.5 var(--story); color: var(--ink-soft); cursor: pointer; }
.begin-progress button:disabled { opacity: 1; cursor: default; }
.progress-dot { display: block; width: 20px; height: 20px; border: 1px solid #737965; border-radius: 50%; margin-bottom: .35rem; }
.progress-number { font-size: .85rem; }
.begin-progress [aria-current=step] { color: var(--ink); }
.begin-progress [aria-current=step] .progress-dot { border: 1px solid var(--gold); background: var(--ink); box-shadow: inset 0 0 0 3px var(--wall); }
.begin-progress .is-complete .progress-dot { border-color: var(--gold); background: #7b795d; box-shadow: inset 0 0 0 5px var(--wall); }
.begin-form.form { border: 0; border-radius: 0; padding: 0; box-shadow: none; background: transparent; }
.begin-page [hidden] { display: none !important; }
.begin-step + .begin-step { margin-top: 3rem; }
.begin-form.is-stepped .begin-step { margin-top: 0; }
.begin-step h2 { font-size: clamp(2rem, 3vw, 3.05rem); font-weight: 300; line-height: 1.2; letter-spacing: -.04em; text-wrap: initial; }
.begin-step h2:focus { outline: none; }
.step-intro { font: 300 1.15rem/1.6 var(--story); color: var(--ink); margin: 1rem 0 1.85rem; }
.begin-form fieldset.begin-plans { display: grid; gap: 1rem; margin: 0; }
.begin-form .begin-plan { display: flex; align-items: flex-start; gap: 1.1rem; padding: 1.5rem; margin: 0; border: 1px solid #66715a; border-radius: 4px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.begin-plan:hover { background: #142018; }
.begin-plan:has(input:checked) { border-color: #d4b57b; background: #132018; box-shadow: inset 0 0 0 1px #d4b57b; }
.begin-plan:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; }
.begin-plan input { appearance: none; width: 1.4rem; height: 1.4rem; border: 1px solid #b7b9a8; border-radius: 50%; flex: none; margin: .25rem 0 0; background: transparent; }
.begin-plan input:checked { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 4px #132018; }
.begin-plan .plan-copy { flex: 1; min-width: 0; }
.begin-plan .plan-title { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font: 400 1.3rem/1.3 var(--story); }
.begin-plan strong { font-weight: 400; }
.begin-plan em { color: var(--gold); font-size: 1.55rem; font-style: normal; font-weight: 300; white-space: nowrap; }
.begin-plan .plan-includes { display: block; margin-top: .6rem; font: 400 .96rem/1.5 var(--ui); }
.begin-plan small { display: block; margin-top: .45rem; font: 400 .9rem/1.6 var(--ui); color: var(--ink-soft); }
.payment-note { font: 300 1rem/1.5 var(--story); margin: 1.5rem 0 1.6rem; }
.begin-actions { display: flex; gap: 1.25rem; align-items: center; margin-top: 1.8rem; }
.begin-actions .btn { flex: 1; min-height: 3.7rem; justify-content: center; position: relative; padding-inline: 2.9rem; font: 400 1.05rem var(--story); }
.begin-actions .btn svg { position: absolute; right: 1.3rem; }
.begin-actions svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.begin-back { display: inline-flex; gap: .5rem; align-items: center; background: none; border: 0; padding: .8rem .2rem; color: var(--ink); font: 400 .95rem var(--story); cursor: pointer; }
.begin-back svg { transform: rotate(180deg); width: 1rem; }
.begin-next-note { color: var(--ink-soft); font: 300 .9rem/1.6 var(--story); text-align: center; margin-top: 1rem; }
.begin-terms { text-align: center; margin-top: 1rem; }
.begin-form .begin-fields label { font: 400 1rem/1.5 var(--ui); margin: 1.25rem 0 .5rem; }
.begin-form .begin-fields input, .begin-form .begin-fields select, .begin-form .begin-fields textarea { background: #0d180f; border-color: #65705a; border-radius: 4px; min-height: 3.3rem; font: 400 1.05rem/1.5 var(--ui); padding: .8rem .95rem; }
.begin-form .begin-fields input:focus, .begin-form .begin-fields select:focus, .begin-form .begin-fields textarea:focus { border-color: var(--gold); }
.begin-form .begin-fields textarea { min-height: 6.5rem; }
.begin-form .hint { font-size: .87rem; line-height: 1.6; }
.begin-form .optional { font-size: .8rem; color: var(--ink-soft); font-weight: 400; margin-left: .3rem; }
.begin-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.05rem; border-bottom: 1px solid var(--line); font: 400 1rem var(--story); }
.begin-summary button { border: 0; background: none; color: var(--gold); font: inherit; text-decoration: underline; text-underline-offset: 4px; padding: .3rem 0; cursor: pointer; }
.begin-form details.more { padding: 1rem 0; margin-top: 1.5rem; border-block: 1px solid var(--line); }
.begin-form details.more summary { font: 400 .98rem var(--story); }
.begin-form .agree { margin-block: 1.5rem; gap: .9rem; }
.begin-form .agree .inline { font: 400 .9rem/1.65 var(--ui); }
.begin-form .agree input { margin-top: .25rem; width: 1.25rem; height: 1.25rem; }
.begin-error { margin-bottom: 1.6rem; }
.begin-feedback { margin-top: 1.5rem; }
.begin-page .site-foot { margin: 0 0 0 var(--begin-rail); padding: 1rem 4vw 1.8rem; border: 0; font-size: .8rem; }
.begin-page .site-foot .shell { width: 100%; max-width: 43rem; align-items: center; gap: .5rem; }
.begin-page .site-foot p { max-width: 19rem; margin: 0; }
.begin-page .site-foot nav { gap: 1.4rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1100px) and (min-width: 801px) {
  .begin-page { --begin-rail: 40%; }
  .begin-story-copy { padding-left: 3vw; padding-right: 1.2rem; }
  .begin-story h1 { font-size: 3.5vw; }
  .begin-story-copy p { max-width: 17rem; font-size: 1.05rem; }
  .begin-panel { padding-inline: 3vw; }
  .begin-page .site-head .shell { width: 94%; }
  .begin-page .wordmark { font-size: 1.6rem; }
  .begin-plan .plan-title { font-size: 1.18rem; }
  .begin-form .begin-plan { padding: 1.2rem; }
}
@media (max-width: 800px) {
  .begin-page .site-head { position: relative; padding: 1.15rem 0; }
  .begin-page .site-head .shell { width: calc(100% - 2.75rem); }
  .begin-page .wordmark { font-size: 1.4rem; gap: .45rem; }
  .begin-page .wordmark .brand-emblem { width: 2.2rem; height: 2.05rem; }
  .begin-home-back { font-size: .9rem; }
  .begin-home-back span { display: none; }
  .begin-layout { display: block; }
  .begin-story { position: relative; width: calc(100% - 2.75rem); max-width: 40rem; height: 130px; margin-inline: auto; }
  .begin-art { object-position: center 69%; }
  .begin-story::after { background: linear-gradient(transparent 80%, var(--wall)); }
  .begin-story-copy { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .begin-panel { min-height: 0; padding: 1.65rem 1.375rem 1.5rem; max-width: 44rem; margin-inline: auto; }
  .begin-progress { margin-bottom: 2rem; }
  .begin-progress button { font-size: .8rem; line-height: 1.5; }
  .progress-number { font-size: .72rem; }
  .progress-dot { width: 17px; height: 17px; margin-bottom: .3rem; }
  .begin-progress li:not(:last-child)::after { top: 8px; }
  .begin-step h2 { font-size: clamp(1.8rem, 6.6vw, 2.5rem); line-height: 1.25; }
  .step-intro { font-size: 1rem; margin: .75rem 0 1.5rem; line-height: 1.6; }
  .begin-form .begin-plan { padding: 1.1rem .95rem; gap: .75rem; }
  .begin-plan input { width: 1.1rem; height: 1.1rem; margin-top: .25rem; }
  .begin-plan input:checked { box-shadow: inset 0 0 0 3px #132018; }
  .begin-plan .plan-title { font-size: 1.05rem; gap: .7rem; }
  .begin-plan em { font-size: 1.2rem; }
  .begin-plan .plan-includes { font-size: .84rem; }
  .begin-plan small { font-size: .82rem; }
  .payment-note { font-size: .9rem; margin: 1.2rem 0; }
  .begin-actions { margin-top: 1.4rem; gap: 1rem; }
  .begin-actions .btn { min-height: 3.5rem; font-size: 1rem; padding-inline: 2.3rem; }
  .begin-actions .btn svg { width: 1.1rem; right: 1rem; }
  .begin-next-note { font-size: .8rem; }
  .begin-form .begin-fields label { font-size: .95rem; }
  .begin-summary { font-size: .95rem; }
  .begin-page .site-foot { margin: 0 auto; padding: 1.5rem 1.375rem 2rem; max-width: 44rem; }
  .begin-page .site-foot .shell { gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
}
@media (max-width: 370px) {
  .begin-page .wordmark { font-size: 1.23rem; }
  .begin-page .site-head .shell, .begin-story { width: calc(100% - 2.2rem); }
  .begin-panel { padding-inline: 1.1rem; }
  .begin-plan .plan-title { flex-wrap: wrap; gap: .2rem .75rem; }
  .begin-plan .plan-includes { font-size: .8rem; }
  .begin-story { height: 100px; }
  .begin-actions { gap: .75rem; }
  .begin-actions .begin-submit { font-size: .9rem; padding-left: 1rem; padding-right: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) { .begin-plan { transition: none; } }
/* Keep the back link at the opposite edge, including the shared mobile header. */
.begin-page .site-head .shell { display: flex; justify-content: space-between; }
.begin-story-copy { text-shadow: 0 2px 14px #000b; }
@media (max-width: 800px) {
  .begin-story { height: 100px; }
  .begin-panel { padding-top: 1.2rem; }
  .begin-progress { margin-bottom: 1.4rem; }
  .step-intro { margin-bottom: 1.2rem; }
  .begin-form .begin-plan { padding-block: 1rem; }
  .payment-note { margin-block: 1rem; }
}
@media (max-width: 370px) {
  .begin-progress button { font-size: .7rem; }
  .begin-story { height: 80px; }
}
/* A gift is a deliberate choice, with the same native checkbox and POST field. */
.begin-form .begin-gift { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 0; margin: 1.5rem 0 0; border-block: 1px solid var(--line); font-weight: 400; cursor: pointer; }
.begin-gift input { flex: none; width: 1.35rem; height: 1.35rem; margin: .2rem 0 0; accent-color: var(--gold); }
.begin-gift strong { display: block; font: 350 1.4rem/1.35 var(--story); margin-bottom: .35rem; }
.begin-gift span span, .begin-gift small { display: block; font: 400 .95rem/1.5 var(--ui); }
.begin-gift small { color: var(--ink-soft); margin-top: .2rem; }
.begin-gift:has(input:checked) { border-color: var(--gold); }
.begin-gift:has(input:checked) strong { color: var(--gold); }
.begin-gift:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; }
.begin-form .gift-note { border-top: 1px solid var(--line); margin-top: 1.6rem; padding-top: .4rem; }
/* CSS also exposes the note when a reader selects a gift without JavaScript. */
.begin-form:has(#gift:checked) [data-gift-only] { display: revert !important; }
@media (max-width: 800px) { .begin-gift strong { font-size: 1.2rem; } .begin-form .begin-gift { margin-top: 1.2rem; padding-block: 1.1rem; } }

.begin-form:not(:has(#gift:checked)) [data-gift-only] { display: none !important; }
