/* rickyandrade.com log-in (/login) and free members area (/members/), src/members.js. Sits on top of ra.css and only uses
   its tokens: near-black page, warm white type, hairline rows instead of boxes, one flat gold button per screen. */

.mem-body main { min-height: calc(100vh - var(--header-h) - 220px); }
/* ra.css gives every public section big padding and a top rule; the members pages set their own spacing. */
.mem-body main section { padding: 0; border-top: 0; }
.mem-body [hidden] { display: none !important; }
.mem-h1 { font-family: var(--font-display); font-size: clamp(3rem, 5.2vw, 3.5rem); font-weight: 500; line-height: 1.04; letter-spacing: -0.032em; color: var(--fg); margin: 0 0 var(--s-16); text-wrap: balance; }
.mem-h2 { font-family: var(--font-display); font-size: var(--fs-28); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
.mem-label { display: block; font-size: var(--fs-14); font-weight: 500; color: var(--fg-3); margin: 0 0 var(--s-4); }
.mem-fine { font-size: var(--fs-14); color: var(--fg-3); margin: var(--s-16) 0 0; }
.mem-fine .link { color: var(--fg-2); }
.mem-note { border-left: 2px solid var(--gold); padding: var(--s-4) 0 var(--s-4) var(--s-16); color: var(--fg); margin: 0 0 var(--s-24); }
.mem-err { color: var(--error); font-size: var(--fs-14); margin: 0 0 var(--s-16); }
.mem-ok { color: var(--ok); font-size: var(--fs-14); margin: 0 0 var(--s-24); }
.mem-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mem-wide { width: 100%; }
.mem-actions { display: flex; flex-wrap: wrap; gap: var(--s-8); margin-top: var(--s-24); }
.btn-text { background: none; border: 0; padding: var(--s-8) 0; cursor: pointer; font-size: var(--fs-14); font-weight: 500; color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.btn-text:hover { color: var(--fg); }

/* ---- /login: the form on the left, his photo (in colour) on the right ---- */
.mem-body .mem-auth { padding: var(--s-48) 0 var(--s-96); }
.mem-auth-grid { display: grid; gap: var(--s-48); align-items: center; }
.mem-auth-main { max-width: 460px; }
.mem-auth-main .lead { margin: 0 0 var(--s-32); }
.mem-form .field { margin-bottom: var(--s-16); }
.mem-form .consent-check { margin: var(--s-8) 0 var(--s-24); }
.mem-code { font-variant-numeric: tabular-nums; letter-spacing: 0.3em; font-size: var(--fs-22) !important; }
.mem-or { display: flex; align-items: center; gap: var(--s-16); margin: var(--s-24) 0; color: var(--fg-3); font-size: var(--fs-14); }
.mem-or::before, .mem-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.mem-google { width: 100%; gap: var(--s-12); }
.mem-google .g-logo { flex: none; }
.mem-alt { display: flex; flex-wrap: wrap; gap: var(--s-8) var(--s-24); align-items: center; margin-top: var(--s-16); }
.mem-auth-photo { display: none; margin: 0; }
@media (min-width: 900px) {
    .mem-body .mem-auth { padding: var(--s-64) 0 var(--s-96); }
    .mem-auth-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: var(--s-96); }
    .mem-auth-photo { display: block; justify-self: end; width: 100%; }
    .mem-auth-photo img { width: 100%; height: auto; aspect-ratio: 966 / 1181; object-fit: cover; border-radius: var(--r); }
}

/* ---- /members/ ---- */
.mem-wrap { padding: var(--s-48) 0 var(--s-96); }
.mem-narrow { max-width: 620px; margin-left: max(var(--gutter), (100% - var(--wide)) / 2); }
.mem-portal { display: flex; align-items: center; justify-content: space-between; gap: var(--s-16); padding: var(--s-16) var(--s-24); margin: 0 0 var(--s-48); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--fg); transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease); }
.mem-portal:hover { border-color: var(--fg-3); background: var(--bg-2); }
.mem-portal strong { display: block; font-weight: 500; }
.mem-portal .mem-label { margin: 0; }
.mem-portal:hover .arrow { transform: translateX(3px); }
.mem-portal .arrow { transition: transform var(--t) var(--ease); }
.mem-hello { display: flex; align-items: flex-end; gap: var(--s-24); margin: 0 0 var(--s-64); }
.mem-hello .lead { margin: 0; max-width: 46ch; }
.mem-hello .eyebrow { margin-bottom: var(--s-8); }
.mem-hello-plain { display: block; }
.mem-ava { flex: none; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--bg-3); box-shadow: 0 0 0 1px var(--line-2); display: grid; place-items: center; }
.mem-ava img { width: 100%; height: 100%; object-fit: cover; }
.mem-ava-s { width: 64px; height: 64px; }
.mem-ini { font-family: var(--font-display); font-size: var(--fs-28); font-weight: 500; color: var(--fg-2); letter-spacing: 0.02em; }
.mem-ava-s .mem-ini { font-size: var(--fs-18); }

.mem-section { margin: 0 0 var(--s-64); }
.mem-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-8) var(--s-24); padding-bottom: var(--s-16); border-bottom: 1px solid var(--line-2); }
.mem-head p { margin: 0; }

.mem-offers { list-style: none; margin: 0; padding: 0; }
.mem-offer { display: grid; grid-template-columns: 2.5rem 40px minmax(0, 1fr) auto; gap: var(--s-24); align-items: center; padding: var(--s-24) 0; border-bottom: 1px solid var(--line); }
.mem-idx { color: var(--fg-3); font-size: var(--fs-14); font-weight: 500; }
.mem-mark { width: 40px; height: 40px; border-radius: var(--r-sm); overflow: hidden; display: grid; place-items: center; background: var(--bg-2); box-shadow: 0 0 0 1px var(--line); }
.mem-mark img { width: 100%; height: 100%; object-fit: contain; }
#offer-apply .mem-mark img, #offer-call .mem-mark img { width: 60%; height: 60%; }
.mem-offer-text h3 { font-size: var(--fs-22); margin: 0 0 var(--s-4); }
.mem-offer-text p:last-child { margin: 0; color: var(--fg-2); font-size: var(--fs-16); }
.mem-offer-text .mem-label { margin-bottom: var(--s-4); }
.mem-offer-act { justify-self: end; }
.mem-cta { min-width: 12.5rem; }
.mem-done { display: inline-flex; align-items: center; gap: var(--s-8); margin: 0; font-size: var(--fs-14); font-weight: 500; color: var(--fg); }
.mem-tick { width: 18px; height: 18px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; }
.mem-tick::before { content: ""; width: 8px; height: 4px; border-left: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: translateY(-1px) rotate(-45deg); }

.mem-rows { margin: 0; }
.mem-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: var(--s-8) var(--s-24); padding: var(--s-24) 0; border-bottom: 1px solid var(--line); }
.mem-row dt { font-size: var(--fs-14); font-weight: 500; color: var(--fg-3); padding-top: var(--s-8); }
.mem-row dd { margin: 0; min-width: 0; }
.mem-row dd > p:first-child { margin: var(--s-8) 0 0; color: var(--fg); overflow-wrap: anywhere; }
.mem-row .mem-fine { margin-top: var(--s-4); }
.mem-photo { display: flex; align-items: flex-start; gap: var(--s-24); }
.mem-photo-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-8); }
.mem-photo-form .mem-fine { flex-basis: 100%; margin-top: var(--s-4); }
.mem-photo-form .mem-fine.bad { color: var(--error); }
.mem-photo-form[aria-busy="true"] .mem-pick { opacity: 0.6; pointer-events: none; }
.mem-pick { position: relative; cursor: pointer; }
.mem-pick:focus-within { outline: 2px solid var(--ring); outline-offset: 3px; }
.mem-inline { display: flex; gap: var(--s-8); max-width: 26rem; }
.mem-inline input { flex: 1; min-width: 0; min-height: 44px; padding: var(--s-8) var(--s-12); font: inherit; color: var(--fg); background: var(--bg-3); border: 1px solid var(--line-input); border-radius: var(--r-sm); }
.mem-inline input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.mem-consent .consent-check { margin: var(--s-8) 0 var(--s-12); max-width: 34rem; }
.mem-danger { color: var(--error); font-size: var(--fs-14); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: var(--s-8) 0; }
.mem-danger-btn { color: var(--error); border-color: color-mix(in srgb, var(--error) 55%, transparent); }
.mem-danger-btn:hover { background: color-mix(in srgb, var(--error) 10%, transparent); border-color: var(--error); }

@media (max-width: 720px) {
    .mem-wrap { padding-top: var(--s-32); }
    .mem-hello { flex-direction: column; align-items: flex-start; gap: var(--s-16); margin-bottom: var(--s-32); }
    .mem-ava { width: 72px; height: 72px; }
    .mem-offer { grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-12) var(--s-16); align-items: start; }
    .mem-idx { display: none; }
    .mem-offer-act { grid-column: 1 / -1; justify-self: stretch; }
    .mem-cta { width: 100%; }
    .mem-row { grid-template-columns: 1fr; padding: var(--s-16) 0; }
    .mem-row dt { padding-top: 0; }
    .mem-portal { padding: var(--s-16); margin-bottom: var(--s-32); }
    .mem-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .mem-portal, .mem-portal .arrow { transition: none; } }
