/**
 * Oasis accounts — the join flow, the save heart, the header pill's account
 * button, and the portal at /oasis/account/.
 *
 * Loaded after oasis.css and built only from its tokens and components: the
 * slip (raised paper, perforation, prints downward), chips, the segmented
 * pill, the switch, the tactile buttons, the "Received" stamp. Nothing new is
 * introduced that the page does not already speak; the account is the same
 * object as the enquiry slip, just with more on it.
 */

/* ---------- header: the account button in the glass pill ---------- */

.oa-account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    font: 500 .93rem/1 var(--text);
    text-decoration: none;
    color: inherit;
    transition: background-color .25s ease;
}
.oa-account:hover { background: rgba(3, 9, 13, .06); }
.o-header.is-dark .oa-account:hover { background: rgba(249, 233, 208, .12); }
.oa-account__mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--cream);
    font: 500 .62rem/1 var(--label);
    letter-spacing: .12em;
    text-transform: uppercase;
}
.o-header.is-dark .oa-account__mark { background: var(--cream); color: var(--ink); }
.oa-account__mark svg { width: 15px; height: 15px; }
.oa-account[data-state="out"] .oa-account__mark { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px var(--hair); }
.o-header.is-dark .oa-account[data-state="out"] .oa-account__mark { box-shadow: inset 0 0 0 1px var(--cream-hair); }
@media (max-width: 560px) {
    .oa-account { padding-right: 4px; }
    .oa-account__text { display: none; }
}

/* ---------- the save heart ---------- */

.o-film { position: relative; }
.oa-save {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(3, 9, 13, .26);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--cream);
    cursor: pointer;
    transition: background-color .3s ease, transform .2s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.o-film > .oa-save { top: 6px; right: 6px; }
.oa-save:hover { background: rgba(3, 9, 13, .42); }
.oa-save:active { transform: scale(.9); }
.oa-save svg { width: 17px; height: 17px; overflow: visible; }
.oa-save path { fill: transparent; stroke: currentColor; stroke-width: 1.7; transition: fill .3s ease; }
.oa-save[aria-pressed="true"] { background: var(--cream); color: var(--cocoa); }
.oa-save[aria-pressed="true"] path { fill: currentColor; }
.oa-save.is-popping svg { animation: oa-pop .5s var(--ease); }
@keyframes oa-pop { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 100% { transform: scale(1); } }

/* The sheet's save: a ghost pill beside "Ask about it". */
.oa-save--pill {
    position: static;
    width: auto;
    height: auto;
    display: inline-flex;
    gap: .5em;
    padding: 1.02em 1.3em .98em;
    border-radius: 999px;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--hair);
    font: 700 1rem/1 var(--display);
}
.oa-save--pill:hover { background: rgba(3, 9, 13, .04); }
.oa-save--pill[aria-pressed="true"] { background: transparent; color: var(--cocoa); box-shadow: inset 0 0 0 1px var(--cocoa); }

/* ---------- the join flow (a slip with more on it) ---------- */

.oa-gate { position: relative; }
.oa-gate[hidden] { display: none; }

.oa-panel { scroll-margin-top: 20px; }
.oa-panel.is-printing { animation: o-print .9s var(--ease) both; }
.oa-panel.is-leaving { animation: oa-leave .26s ease both; }
@keyframes oa-leave { to { opacity: 0; transform: translateY(-10px); } }
.oa-panel .o-slip__title:focus { outline: none; }

.oa-progress {
    display: flex;
    gap: 5px;
    margin: 0 0 18px;
}
.oa-progress i {
    position: relative;
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: var(--hair-soft);
    overflow: hidden;
}
.oa-progress i::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .9s var(--ease);
}
.oa-progress i.is-done::after { transform: scaleX(1); }
.oa-progress i.is-now::after { transform: scaleX(.5); background: var(--cocoa); animation: oa-fill .9s var(--ease) both; }
@keyframes oa-fill { from { transform: scaleX(0); } }

.oa-context {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 6px;
    font: 700 1.02rem/1.25 var(--display);
    letter-spacing: -.01em;
}
.oa-context .o-label { color: var(--cocoa); flex: none; }

.oa-form { display: block; }

.oa-qs { display: grid; gap: 24px; margin-top: 10px; }
.oa-q { margin: 0; padding: 0; border: 0; min-width: 0; }
.oa-q__label {
    display: block;
    margin: 0 0 10px;
    padding: 0;
    font: 700 1.04rem/1.25 var(--display);
    letter-spacing: -.008em;
}
.oa-q__label em { font: 400 .8em var(--text); font-style: normal; color: rgba(3, 9, 13, .45); margin-left: .35em; }
.oa-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.oa-chip { font-size: .95rem; }
.oa-chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.oa-q.is-invalid .oa-chip { border-color: rgba(155, 44, 31, .55); }
.oa-cond { display: grid; gap: 24px; }
.oa-cond:empty { display: none; }

.oa-hint { margin: 8px 0 0; font-size: .88rem; line-height: 1.4; color: var(--cocoa); }
.oa-q > .oa-hint { margin: -4px 0 10px; }
.oa-fine { margin: 18px 0 0; font-size: .84rem; line-height: 1.4; color: rgba(3, 9, 13, .56); }
.oa-fine a { color: inherit; text-underline-offset: .2em; }
.oa-note { margin: 14px 0 0; color: var(--cocoa); }
.oa-note strong { color: var(--ink); font-weight: 500; }
.oa-promise {
    margin: 24px 0 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(101, 65, 58, .07);
    color: var(--cocoa);
    font: 500 .95rem/1.4 var(--text);
}

/* Show/hide on a password field. */
.o-field--reveal input { padding-right: 56px; }
.oa-reveal {
    position: absolute;
    right: 0;
    top: 20px;
    padding: 6px 2px;
    border: 0;
    background: none;
    font: 500 .8rem/1 var(--label);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--cocoa);
    cursor: pointer;
}

/* The six-digit code: six cells over one real input. */
.oa-code { margin-top: 12px; }
.oa-code__box { position: relative; width: min(100%, 340px); }
.oa-code__cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.oa-code__cell {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    background: var(--paper);
    box-shadow: inset 0 0 0 1px var(--hair-soft), inset 0 -2px 0 rgba(3, 9, 13, .06);
    font: 900 1.7rem/1 var(--display);
    font-variant-numeric: tabular-nums;
    transition: box-shadow .25s ease, transform .25s var(--ease);
}
.oa-code__cell.is-filled { transform: translateY(-1px); }
.oa-code__cell.is-current { box-shadow: inset 0 0 0 1.5px var(--ink); }
.oa-code__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    font-size: 16px;            /* no zoom on iOS */
    letter-spacing: 2.1em;
    outline: none;
}
.oa-code__input:focus-visible + .oa-code__cells,
.oa-code__box:focus-within { outline: none; }

/* The segmented choice and switch take the page's components as they are. */
.oa-seg { display: inline-flex; }
.oa-switch { margin-top: 4px; text-align: left; }
.oa-form > .oa-q:not(:first-child) { margin-top: 24px; }

/* ---------- the enquiry slip, for a signed-in buyer ---------- */

.oa-ask { display: grid; gap: 18px; margin-top: 6px; }
.oa-ask[hidden] { display: none; }
.oa-asker {
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(3, 9, 13, .04);
    font-size: .95rem;
    line-height: 1.45;
    color: var(--cocoa);
}
.oa-asker strong { color: var(--ink); font-weight: 500; }
.oa-asker a { color: var(--ink); text-underline-offset: .2em; }
.o-done__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* ---------- the portal ---------- */

.oa-page { min-height: 100svh; display: flex; flex-direction: column; }
.oa-page main { flex: 1; }

.oa-hero {
    position: relative;
    padding: calc(var(--header-h) + clamp(56px, 10vh, 120px)) var(--gutter) clamp(48px, 8vh, 88px);
    background: var(--sea);
    color: var(--cream);
    overflow: hidden;
}
.oa-hero .o-label { color: rgba(249, 233, 208, .7); }
.oa-hero__title {
    margin: 18px 0 0;
    max-width: 14em;
    font: 900 clamp(2.6rem, 6.6vw, 6.4rem)/.9 var(--display);
    letter-spacing: -.04em;
    text-wrap: balance;
}
.oa-hero__lede {
    max-width: 34rem;
    margin: clamp(16px, 2.4vh, 24px) 0 0;
    font: 500 clamp(1.05rem, 1.3vw, 1.25rem)/1.4 var(--text);
    color: rgba(249, 233, 208, .86);
}
.oa-hero__mark {
    position: absolute;
    right: calc(var(--gutter) * -0.5);
    bottom: -0.16em;
    width: min(54vw, 760px);
    fill: rgba(249, 233, 208, .06);
    pointer-events: none;
}

.oa-nudge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    padding: 22px var(--gutter);
    background: var(--cocoa);
    color: var(--cream);
}
.oa-nudge p { margin: 0; max-width: 40rem; font: 700 1.1rem/1.3 var(--display); }
.oa-nudge p span { display: block; margin-top: 4px; font: 400 .95rem/1.4 var(--text); color: rgba(249, 233, 208, .82); }
.oa-nudge[hidden] { display: none; }

.oa-tabs {
    position: sticky;
    top: calc(var(--header-h) + 12px);
    z-index: 5;
    display: flex;
    justify-content: center;
    margin: clamp(28px, 5vh, 48px) 0 0;
    padding: 0 var(--gutter);
    pointer-events: none;
}
.oa-tabs .o-seg {
    pointer-events: auto;
    background: rgba(248, 242, 229, .78);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 0 0 1px rgba(3, 9, 13, .06);
}
.oa-tabs .o-seg button { padding: .7em 1.2em .64em; }
.oa-tabs .o-seg button span { margin-left: .35em; font-size: .78em; color: var(--cocoa); font-variant-numeric: tabular-nums; }

.oa-section { padding: clamp(32px, 6vh, 64px) var(--gutter) clamp(72px, 12vh, 140px); }
.oa-section[hidden] { display: none; }
.oa-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 14px 32px;
    margin-bottom: clamp(24px, 4vh, 40px);
}
.oa-section__head .o-h2 { font-size: clamp(2.1rem, 4.6vw, 4.2rem); }
.oa-section__head p { margin: 0; max-width: 26rem; color: var(--cocoa); }

/* Saved: the page's own wall. */
.oa-wall { margin-top: 0; }
.oa-film__link { display: block; text-decoration: none; color: inherit; }
.oa-film.is-gone .o-film__media { filter: grayscale(1); opacity: .55; }
.oa-film__gone { margin: 6px 0 0; font-size: .86rem; color: var(--cocoa); }

/* Enquiries: a ledger of slips, each with its stamp. */
.oa-ledger { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.oa-entry {
    position: relative;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px clamp(16px, 2.4vw, 32px);
    padding: 16px clamp(16px, 2vw, 24px) 16px 16px;
    border-radius: 18px;
    background: var(--paper-hi);
    box-shadow: 0 0 0 1px rgba(3, 9, 13, .06), 0 1px 2px rgba(3, 9, 13, .05);
}
.oa-entry__thumb {
    width: 74px;
    aspect-ratio: 9 / 16;
    border-radius: 10px;
    object-fit: cover;
    background: #E4DACA;
}
.oa-entry__body { min-width: 0; }
.oa-entry__body .o-label { color: var(--cocoa); }
.oa-entry__title { margin: 8px 0 0; font: 900 clamp(1.3rem, 2.2vw, 1.8rem)/1 var(--display); letter-spacing: -.03em; }
.oa-entry__meta { margin: 8px 0 0; font-size: .95rem; color: var(--cocoa); }
.oa-entry__note {
    margin: 10px 0 0;
    padding-left: 12px;
    border-left: 2px solid var(--hair-soft);
    font-size: .95rem;
    line-height: 1.4;
}
.oa-entry__actions { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.oa-entry__actions a, .oa-entry__actions button { font-size: .9rem; }
.oa-entry.is-closed { opacity: .66; }

/* The status stamp: the "Received" stamp, small, inked in cocoa. */
.oa-stamp {
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    color: var(--cocoa);
    transform: rotate(-9deg);
}
.oa-stamp svg { width: 100%; height: 100%; overflow: visible; }
.oa-stamp text { fill: currentColor; font: 500 13px var(--label); letter-spacing: .2em; }
.oa-stamp .oa-stamp__word { font: 900 15px var(--display); letter-spacing: -.01em; }
.oa-entry.is-closed .oa-stamp { color: rgba(3, 9, 13, .4); }
.oa-entry.is-new .oa-stamp { animation: o-stamp .7s var(--ease) both; }

@media (max-width: 640px) {
    .oa-entry { grid-template-columns: 58px minmax(0, 1fr); align-items: start; }
    .oa-entry__thumb { width: 58px; }
    .oa-stamp { position: absolute; top: 8px; right: 8px; width: 74px; height: 74px; }
    .oa-entry__body { padding-right: 64px; }
}

/* Profile: definition lists, each section editable in place. */
.oa-profile { display: grid; gap: 18px; max-width: 54rem; }
.oa-card {
    padding: clamp(20px, 2.6vw, 30px);
    border-radius: 18px;
    background: var(--paper-hi);
    box-shadow: 0 0 0 1px rgba(3, 9, 13, .06), 0 1px 2px rgba(3, 9, 13, .05);
}
.oa-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.oa-card__head h3 { margin: 0; font: 900 1.6rem/1 var(--display); letter-spacing: -.03em; }
.oa-dl { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 0 24px; margin: 18px 0 0; }
.oa-dl dt, .oa-dl dd { margin: 0; padding: 11px 0; border-top: 1px solid var(--hair-soft); }
.oa-dl dt { font: 500 .7rem/1.6 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--cocoa); padding-top: 13px; }
.oa-dl dd { font-size: 1rem; }
.oa-dl dd.is-empty { color: rgba(3, 9, 13, .4); }
@media (max-width: 560px) {
    .oa-dl { grid-template-columns: 1fr; }
    .oa-dl dd { border-top: 0; padding-top: 0; }
}
.oa-card .oa-panel { margin-top: 18px; padding: 0; background: none; box-shadow: none; }
.oa-card .oa-panel .o-slip__perf { display: none; }
.oa-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: .38em .7em .34em;
    border-radius: 999px;
    background: rgba(3, 9, 13, .06);
    font: 500 .58rem/1 var(--label);
    letter-spacing: .16em;
    text-transform: uppercase;
    vertical-align: .2em;
}
.oa-badge.is-good { background: rgba(47, 107, 58, .12); color: #2f6b3a; }
.oa-danger { color: #9B2C1F; }
.oa-danger:hover { color: #6e1d14; }

/* Empty states: a line, and the one thing to do next. */
.oa-empty {
    display: grid;
    justify-items: start;
    gap: 18px;
    padding: clamp(36px, 7vh, 72px) clamp(20px, 4vw, 48px);
    border-radius: 22px;
    background: rgba(3, 9, 13, .035);
}
.oa-empty p { margin: 0; max-width: 28rem; font: 700 clamp(1.3rem, 2vw, 1.7rem)/1.2 var(--display); letter-spacing: -.015em; }
.oa-empty span { display: block; margin-top: 8px; font: 400 1rem/1.4 var(--text); color: var(--cocoa); letter-spacing: 0; }

/* Signed out: a still on one side, the slip on the other. */
.oa-door {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100svh;
}
.oa-door__still {
    position: sticky;
    top: 0;
    height: 100svh;
    overflow: hidden;
    background: var(--ink);
    color: var(--cream);
}
.oa-door__still img { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.oa-door__still::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3, 9, 13, .72) 0%, rgba(3, 9, 13, .1) 55%, rgba(3, 9, 13, .25) 100%);
}
.oa-door__caption { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(28px, 6vh, 64px); z-index: 1; }
.oa-door__caption .o-label { color: rgba(249, 233, 208, .78); }
.oa-door__caption p:last-child { margin: 14px 0 0; max-width: 11em; font: 900 clamp(2.2rem, 4.4vw, 4.4rem)/.92 var(--display); letter-spacing: -.04em; }
.oa-door__slip {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--header-h) + 40px) clamp(20px, 5vw, 80px) 48px;
}
.oa-door__slip .oa-gate { width: min(100%, 560px); margin: 0 auto; }
@media (max-width: 860px) {
    .oa-door { grid-template-columns: 1fr; }
    .oa-door__still { position: relative; height: 38svh; }
    .oa-door__slip { padding-top: 28px; }
}

.oa-foot {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 20px 40px;
    padding: 24px var(--gutter) 28px;
    border-top: 1px solid var(--hair);
    font-size: .88rem;
    color: var(--cocoa);
}
@media (max-width: 820px) { .oa-foot { grid-template-columns: 1fr; } }

.oa-loading { padding: 30vh var(--gutter); text-align: center; color: var(--cocoa); }

@media (prefers-reduced-motion: reduce) {
    .oa-panel.is-printing, .oa-panel.is-leaving, .oa-entry.is-new .oa-stamp, .oa-save.is-popping svg { animation: none; }
}
