/* ==========================================================================
   Account pages: log in, create an account (email → code → details),
   forgot / reset password, and the account page itself.
   Approved in the design demo of 2026-10-03. Builds on the tokens, buttons
   and topbar in site.css. Class names avoid site.css's .field / .hint /
   .alert, which style the abstract form.

   Since 2026-11-03 dressed as Blog A of the background 01 theme demos: every
   page opens with the artwork band of the section pages (page.css .art-band),
   then sits on their white line ground (site.css .lined).
   Card pages: the account card — the lantern panel (js/sky-lanterns.js,
   lanterns rising over the artwork's cream sky) on the left, the form on the right.
   The details step and the user area: the form, or the sidebar and the page.
   ========================================================================== */

:root {
    --field: #FFFBF6;
    --edge: #EFDFCB;           /* field and divider lines, warm like the artwork's paper */
    --ok: #1F7A4D;
    --ok-bg: #E7F5EC;
    --bad: #B42318;
    --bad-bg: #FDECEA;
}

/* ------------------------------------------------------------- stage --- */

/* below the band (layouts/account-card), on .lined */
.account-stage { padding-block: 48px 72px; }

/* -------------------------------------------------------------- card --- */

.account-card {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    overflow: hidden;
    border: 1px solid #F3E0C6;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 40px 80px -40px rgba(120, 60, 20, .45), 0 2px 8px -2px rgba(120, 60, 20, .12);
}

/* background 01's open left side: cream sky above, the river, hills and the
   first temple roof below, with sky lanterns drawn rising over it */
.lantern-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    min-height: 620px;
    padding: 40px;
    border-right: 1px solid #F3E0C6;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(255, 248, 236, .7) 0%, rgba(255, 248, 236, .35) 55%, rgba(255, 248, 236, 0) 80%),
        url("../images/hero-background-01.webp") 32% 100% / cover no-repeat,
        var(--cream);
}

.lantern-panel canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lantern-panel > :not(canvas) { position: relative; }
.lantern-panel .logo { width: 230px; height: auto; }

/* the words sit on a frosted card so the lanterns pass behind them, not through them */
.lantern-panel .panel-copy {
    padding: 26px 26px 28px;
    border: 1px solid rgba(241, 207, 146, .7);
    border-radius: 22px;
    background: rgba(255, 251, 245, .86);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px -28px rgba(73, 33, 101, .45);
}

.lantern-panel h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; color: var(--primary-deep); }
.lantern-panel h2 em { font-style: normal; color: var(--ember); }
.lantern-panel .intro { max-width: 38ch; margin-top: 12px; color: #5A4760; }

.uses { display: grid; gap: 14px; margin-top: 26px; padding: 0; list-style: none; }
.uses li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }

.uses .ico {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .75);
    box-shadow: inset 0 0 0 1px rgba(241, 207, 146, .8);
    color: var(--ember);
}

.uses .ico svg { width: 18px; height: 18px; }
.uses b { display: block; font-weight: 700; color: var(--primary-deep); }
.uses span { color: var(--muted); font-size: .9rem; }

/* sits over the artwork's hills, so it gets a frosted pill of its own */
.panel-foot {
    align-self: flex-start;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--muted);
    font-size: .85rem;
}

.panel-foot strong { color: var(--primary-deep); font-weight: 600; }

.account-main { min-width: 0; padding: 36px 44px 40px; }

.account-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #FBF0E2;
}

.account-tabs a {
    display: grid;
    place-items: center;
    min-height: 44px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}

.account-tabs a:hover { color: var(--primary-deep); }

.account-tabs a[aria-current="page"] {
    background: var(--paper);
    color: var(--primary-deep);
    box-shadow: 0 2px 8px -3px rgba(73, 33, 101, .35);
}

.account-view { margin-top: 30px; }
.account-view h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.view-sub { margin-top: 6px; color: var(--muted); }
.view-sub b { color: var(--ink); overflow-wrap: anywhere; }

/* ----------------------------------------------------------- stepper --- */

/* the three steps of creating an account, in order */
.stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.stepper li {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
}

.stepper li::before { content: ""; height: 4px; border-radius: 99px; background: var(--edge); }
.stepper li.done { color: var(--primary-ink); }
.stepper li.done::before { background: var(--primary); }
.stepper li[aria-current] { color: var(--primary-deep); }
.stepper li[aria-current]::before { background: linear-gradient(90deg, var(--primary), var(--secondary)); }

/* on the artwork band of the details page */
.details-band .stepper { max-width: 560px; margin: 32px 0 0; }

/* HERO_THEME=dark: the steps over the night band (page.css) */
[data-hero="dark"] .details-band .stepper li { color: var(--on-dark); }
[data-hero="dark"] .details-band .stepper li::before { background: rgba(255, 255, 255, .2); }
[data-hero="dark"] .details-band .stepper li.done { color: var(--gold-soft); }
[data-hero="dark"] .details-band .stepper li.done::before { background: var(--gold-soft); }
[data-hero="dark"] .details-band .stepper li[aria-current] { color: #fff; }

/* ------------------------------------------------------------- forms --- */

.account-form { display: grid; gap: 18px; margin-top: 24px; }

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-row.name-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.title-group { max-width: 280px; }

.form-group { display: grid; gap: 6px; min-width: 0; align-content: start; }
.form-label { font-size: .88rem; font-weight: 700; color: var(--primary-deep); }
.form-label .form-hint { margin-left: 4px; font-weight: 500; }
fieldset.form-group { min-width: 0; margin: 0; padding: 0; border: 0; }
legend.form-label { margin-bottom: 6px; padding: 0; }

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1.5px solid var(--edge);
    border-radius: 12px;
    background: var(--field);
    color: var(--ink);
    font: inherit;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

select.form-control {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23492165' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}

.form-control:hover { border-color: #E3C7A3; }

.form-control:focus {
    outline: 0;
    border-color: var(--primary);
    background-color: var(--paper);
    box-shadow: 0 0 0 4px rgba(165, 77, 194, .16);
}

.form-control[aria-invalid="true"] { border-color: var(--bad); background-color: var(--paper); }
.form-control[readonly] { color: var(--muted); background-color: var(--cream); }
textarea.form-control { min-height: 96px; padding-block: 12px; resize: vertical; }

/* image uploads: the browser's own picker, given a button that matches the form */
.file-control { padding: 7px 8px; cursor: pointer; }
.file-control::file-selector-button {
    min-height: 32px;
    margin-right: 14px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--primary-deep);
    color: #fff;
    font: inherit;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
}
.file-control:hover::file-selector-button { background: var(--primary); }

.kept-file { display: flex; align-items: center; gap: 8px; color: var(--ok); font-size: .88rem; }
.kept-file svg { flex: none; width: 16px; height: 16px; }
.kept-file b { overflow-wrap: anywhere; }

.form-hint { font-size: .82rem; color: var(--muted); }
.form-error { font-size: .84rem; font-weight: 600; color: var(--bad); }

/* a field with a small button inside it (Show / Hide password) */
.with-action { position: relative; }
.with-action .form-control { padding-right: 70px; }

.with-action button {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--primary-ink);
    font: 700 .82rem var(--font-body);
    cursor: pointer;
}

.with-action button:hover { background: var(--cream); }

.with-action .verified-badge {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 99px;
    background: var(--ok-bg);
    color: var(--ok);
    font-size: .75rem;
    font-weight: 700;
}

.verified-badge svg { width: 13px; height: 13px; }
.with-action.has-badge .form-control { padding-right: 104px; }

.phone-group { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }

.form-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    font-size: .9rem;
}

.checkline {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    font-size: .92rem;
    cursor: pointer;
}

.checkline input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); }
.checkline a { color: var(--primary-ink); font-weight: 600; }

.text-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary-ink);
    font-family: var(--font-body);
    font-size: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.text-link:disabled { color: var(--muted); text-decoration: none; cursor: default; }

.or-line { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .85rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--edge); }

.switch-line { text-align: center; color: var(--muted); font-size: .92rem; }

/* radio cards: meal, participant type, visa letter, and the abstract form's
   presentation type and award. A ring on the right becomes a purple check
   once the card is chosen. */
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }

.choice span {
    position: relative;
    display: grid;
    gap: 2px;
    height: 100%;
    padding: 12px 46px 12px 14px;
    border: 1.5px solid var(--edge);
    border-radius: 12px;
    background: var(--field);
    color: var(--muted);
    font-size: .8rem;
    transition: border-color .15s, background-color .15s;
}

.choice span::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    box-sizing: border-box;
    border: 1.5px solid #E3C7A3;
    border-radius: 50%;
    background: var(--paper) no-repeat center / 14px;
    transition: border-color .15s, background-color .15s;
}

.choice b { color: var(--ink); font-size: .95rem; }
.choice:hover span::after { border-color: var(--primary); }
.choice input:checked + span { border-color: var(--primary); background: #F8EEFC; box-shadow: 0 0 0 3px rgba(165, 77, 194, .14); }

.choice input:checked + span::after {
    border-color: var(--primary);
    background-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.choices.invalid .choice span { border-color: var(--bad); }

/* the fields one answer calls for (student ID, visa details), set under it */
.follow-up {
    display: grid;
    gap: 18px;
    padding: 20px 22px;
    border-left: 3px solid var(--primary);
    border-radius: 4px 14px 14px 4px;
    background: var(--cream);
}
.follow-up[hidden] { display: none; }
.follow-up .form-control:not(:focus) { background-color: var(--paper); }

/* participant type and visa letter wrap in this, disabled on account/edit once
   the conference team has approved them: greyed, the chosen answer kept clear */
.locked-part { display: grid; gap: 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
.locked-part:disabled .choice { cursor: not-allowed; }
.locked-part:disabled .choice input:not(:checked) + span { opacity: .5; }
.locked-part:disabled .follow-up { border-left-color: #C9B8CE; background: #F6F3F7; }

.locked-part:disabled .form-control {
    opacity: 1;
    border-color: #E2DCE5;
    background-color: #F1EEF2;
    color: #5F5068;
    -webkit-text-fill-color: #5F5068;
    cursor: not-allowed;
}

/* password rules, ticked off as they are met */
.pw-rules { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: .8rem; color: var(--muted); }
.pw-rules li { display: inline-flex; align-items: center; gap: 5px; }
.pw-rules li::before { content: ""; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; }
.pw-rules li.met { color: var(--ok); font-weight: 600; }
.pw-rules li.met::before { background: currentColor; }

/* one-time code boxes */
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 56px)); gap: 10px; }

.otp input {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 5 / 6;
    padding: 0;
    border: 1.5px solid var(--edge);
    border-radius: 14px;
    background: var(--field);
    color: var(--primary-deep);
    caret-color: var(--primary);
    text-align: center;
    font: 700 1.9rem/1 var(--font-display);
    font-variant-numeric: tabular-nums;
}

.otp input:focus { outline: 0; border-color: var(--primary); background: var(--paper); box-shadow: 0 0 0 4px rgba(165, 77, 194, .16); }
.otp input.filled { border-color: #D3B3E0; background: var(--paper); }
.otp.invalid input { border-color: var(--bad); animation: shake .35s; }

@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.timer { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* messages */
.notice {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: .9rem;
}

.notice svg { width: 20px; height: 20px; margin-top: 1px; }
.notice b { display: block; }
.notice.info { background: var(--cream); color: #6A3A08; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice ul { margin: 4px 0 0; padding-left: 18px; }
.notice .notice-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .86rem; }
.account-form .btn { min-height: 50px; }
.account-form .btn-sm { min-height: 38px; }

.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------ details page --- */

.details-band .inner { padding-bottom: 44px; }
.details-band .lede b { color: var(--primary-deep); }
.details-body { padding-block: 48px 72px; }

.details-form {
    max-width: 980px;
    margin-inline: auto;
    padding: 12px 40px 36px;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 30px 60px -40px rgba(120, 60, 20, .4), 0 2px 8px -2px rgba(120, 60, 20, .1);
}

/* each part of the form: its name and a line of why on the left, fields on the right */
.form-part {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px 40px;
    padding-block: 28px;
    border-bottom: 1px solid var(--edge);
}

.form-part:last-of-type { border-bottom: 0; }
.form-part h2 { font-size: 1.15rem; font-weight: 800; color: var(--primary-deep); }
.form-part > div:first-child p { margin-top: 6px; color: var(--muted); font-size: .9rem; }
.form-part .fields { display: grid; gap: 18px; min-width: 0; }

.details-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 14px 20px;
    padding-top: 24px;
    border-top: 1px solid var(--edge);
}

.details-submit .form-hint { margin-right: auto; }
.details-submit .btn { min-height: 52px; padding-inline: 36px; }

/* -------------------------------------------- account created dialog --- */

/* "account created": a SweetAlert dialog on Create Account that goes on to
   Log In (auth/create-email), or a notice on the page when SweetAlert cannot load */
.notice p + p { margin-top: 8px; }

.swal2-container.swal-site-backdrop.swal2-backdrop-show { background: rgba(34, 16, 58, .5); }

.swal2-popup.swal-site {
    width: min(520px, calc(100% - 32px));
    padding: 30px 32px 28px;
    border: 1px solid #F3E0C6;
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    box-shadow: 0 40px 80px -40px rgba(120, 60, 20, .45);
}

.swal-site .swal2-icon { margin-top: 6px; }
.swal-site .swal2-icon.swal2-success { border-color: var(--ok); color: var(--ok); }
.swal-site .swal2-icon.swal2-success [class^='swal2-success-line'] { background-color: var(--ok); }
.swal-site .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(31, 122, 77, .25); }

.swal-site .swal2-html-container {
    margin: 20px 0 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.65;
    text-align: left;
    color: var(--muted);
}

.swal-site .swal2-html-container p + p { margin-top: 12px; }
.swal-site .swal2-html-container a { font-weight: 600; color: var(--primary-ink); white-space: nowrap; }

.swal-site .swal2-actions { margin-top: 24px; }
.swal-site .swal2-confirm { min-width: 140px; }

/* ------------------------------------------------------ account page --- */

/* The account card (option 1 of the card demo, "quiet list"): labels on the
   left, values on the right, in two groups; a scan sent for review gets a pill
   for where the review stands and a link to open it. */
.details-card {
    padding: 30px 34px 22px;
    border: 1px solid #F3E0C6;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 30px 60px -40px rgba(120, 60, 20, .4);
}

.details-card h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; color: var(--primary-deep); }
.details-card .card-sub { margin-top: 2px; font-size: .9rem; color: var(--muted); }

/* the card's name on the left, its action (Edit details) on the right */
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.card-head .btn { min-height: 42px; padding-inline: 20px; }

/* the details form on the card: its parts under the heading, the buttons at the foot */
.edit-form { margin-top: 8px; }
.edit-form .form-part:first-of-type { margin-top: 6px; border-top: 1px solid var(--edge); }
.edit-form .details-submit .btn-ghost { min-height: 52px; padding-inline: 28px; }

.details-card .group-label {
    margin-top: 26px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--secondary-ink);
}

.detail-list { margin: 6px 0 0; }

.detail-list div {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 16px;
    padding-block: 13px;
    border-bottom: 1px solid var(--edge);
}

.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.detail-more { flex-basis: 100%; font-size: .86rem; font-weight: 500; color: var(--muted); }

/* review pill: waiting (orange), approved (green), not approved (red) */
.review {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 700;
    white-space: nowrap;
}

.review::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.review.is-pending { background: #FFF1E0; color: var(--secondary-ink); }
.review.is-approved { background: var(--ok-bg); color: var(--ok); }
.review.is-rejected { background: var(--bad-bg); color: var(--bad); }

.scan-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-ink);
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}

.scan-link svg { width: 17px; height: 17px; flex: none; }
.scan-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Visa Support Letter: withdrawing the request, a quiet line under its form */
.visa-withdraw {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 16px;
    margin-top: 18px;
    font-size: .92rem;
    color: var(--muted);
}

.visa-withdraw .btn { min-height: 42px; padding-inline: 20px; }

.review-help {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--bad-bg);
    color: var(--bad);
    font-size: .9rem;
}

.account-panel {
    padding: 26px 28px;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 30px 60px -40px rgba(120, 60, 20, .4);
}

.account-panel h2 { font-size: 1.2rem; font-weight: 800; color: var(--primary-deep); }

.summary-list { display: grid; margin: 14px 0 0; }

.summary-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 10px;
    border-bottom: 1px solid var(--edge);
    font-size: .93rem;
}

.summary-list div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

/* ------------------------------------------------------- user area --- */

/* layouts/user: a delegate's pages under /user, each beside the account sidebar */
.user-band .inner { padding-bottom: 40px; }
.user-body { padding-block: 40px 80px; }

.user-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 32px; align-items: start; }
.user-shell.no-side { grid-template-columns: minmax(0, 1fr); }
.user-main { display: grid; gap: 24px; min-width: 0; }

.user-side {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: 20px;
    border: 1px solid #F3E0C6;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 30px 60px -40px rgba(120, 60, 20, .4);
}

.who { display: flex; align-items: center; gap: 12px; padding: 4px 4px 18px; border-bottom: 1px solid var(--edge); }

.who .avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(180deg, #5E2B84 0%, var(--primary-deep) 100%);
    box-shadow: var(--gold-ring);
    color: var(--gold-soft);
    font: 700 1.25rem/1 var(--font-display);
}

.who div { min-width: 0; }
.who b { display: block; font-size: .95rem; line-height: 1.3; color: var(--primary-deep); }
.who span { display: block; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }

.user-nav { display: grid; gap: 4px; margin-top: 14px; }

.user-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: #5A4760;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}

.user-nav svg { width: 20px; height: 20px; flex: none; color: var(--ember); }
.user-nav a:hover { background: var(--cream); color: var(--primary-deep); }

/* the page you are on: flat plum, like the main buttons */
.user-nav a[aria-current="page"] {
    background: var(--primary-deep);
    color: #FFF7EA;
}

.user-nav a[aria-current="page"] svg { color: var(--gold-soft); }

/* reviews still to send, on My Reviews */
.user-nav .nav-count {
    margin-left: auto;
    min-width: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--secondary);
    color: var(--primary-deep);
    font-size: .78rem;
    line-height: 20px;
    text-align: center;
}

.side-logout { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--edge); }

.side-logout button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--muted);
    font: 600 .92rem var(--font-body);
    cursor: pointer;
}

.side-logout svg { width: 20px; height: 20px; flex: none; }
.side-logout button:hover { background: var(--cream); color: var(--bad); }

/* abstract submission: the form (styled in site.css) on a sheet of its own */
.abstract-sheet {
    padding: 32px 36px;
    border: 1px solid #F3E0C6;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 30px 60px -40px rgba(120, 60, 20, .4);
}

/* payment: whether registration is open, beside a calendar leaf for each
   deadline (plum head with the month in gold, the day large) */
.pay-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px 32px;
    padding: 30px 32px;
    border: 1px solid #F3E0C6;
}

.pay-status-text { flex: 1 1 320px; min-width: 0; }
.pay-status h2 { margin-top: 14px; font-size: 1.6rem; letter-spacing: -.01em; }
.pay-status-text > p { max-width: 62ch; margin-top: 10px; color: var(--muted); }
.pay-status.is-open .status-pill { background: #E6F6EC; color: #17703D; }
.pay-status.is-open .status-pill::before { background: #1F9D55; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.date-leaves { display: flex; flex: none; gap: 14px; margin: 0; padding: 0; list-style: none; }

.date-leaf {
    display: grid;
    align-content: start;
    width: 168px;
    overflow: hidden;
    border: 1px solid #F3E0C6;
    border-radius: 16px;
    background: var(--paper);
    box-shadow: 0 18px 34px -26px rgba(120, 60, 20, .55);
    text-align: center;
}

.date-leaf time { display: grid; }

.leaf-month {
    padding: 8px 6px;
    background: linear-gradient(180deg, #5E2B84 0%, var(--primary-deep) 100%);
    color: var(--gold-soft);
    font: 700 1rem/1.3 var(--font-display);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.leaf-day { padding-top: 12px; font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--primary-deep); }
.leaf-label { margin-top: 8px; padding-inline: 12px; font-size: .875rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.leaf-left { padding: 0 12px 14px; font-size: .8125rem; color: var(--muted); }

/* a deadline behind us steps back */
.date-leaf.is-past { box-shadow: none; }
.date-leaf.is-past .leaf-month { background: #8E7B96; color: #FFF7EA; }
.date-leaf.is-past .leaf-day { color: #8E7B96; }
.pay-fees h2 { margin-bottom: 12px; font-size: 1.2rem; font-weight: 800; color: var(--primary-deep); }
.pay-empty { margin-top: 10px; color: var(--muted); }

/* -------------------------------------------------------- responsive --- */

@media (max-width: 980px) {
    .account-card { grid-template-columns: minmax(0, 1fr); }
    .lantern-panel { min-height: 0; gap: 24px; padding: 28px; border-right: 0; border-bottom: 1px solid #F3E0C6; }
    .lantern-panel .uses, .lantern-panel .panel-foot { display: none; }

    /* short panel: the hills come up behind the intro, so the cream holds further down */
    .lantern-panel {
        background:
            linear-gradient(180deg, rgba(255, 248, 236, .82) 0%, rgba(255, 248, 236, .6) 75%, rgba(255, 248, 236, .15) 100%),
            url("../images/hero-background-01.webp") 32% 100% / cover no-repeat,
            var(--cream);
    }
    .lantern-panel .logo { width: 190px; }
    .lantern-panel .panel-copy { padding: 20px; }
    .form-part { grid-template-columns: minmax(0, 1fr); gap: 16px; }

    /* the sidebar becomes a card above the page, its links three equal tiles
       so the current one is always in view */
    .user-shell { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .user-side { position: static; padding: 16px; }
    .user-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }

    .user-nav a {
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        padding: 10px 6px;
        font-size: .8rem;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
    }

    .side-logout { display: none; }
}

@media (max-width: 640px) {
    .account-stage { padding-block: 28px 48px; }
    .account-main { padding: 24px 20px 28px; }
    .form-row, .form-row.name-row, .choices, .choices.two { grid-template-columns: minmax(0, 1fr); }
    .title-group { max-width: none; }
    .follow-up { padding: 16px; }
    .otp { gap: 6px; }
    .otp input { border-radius: 10px; font-size: 1.6rem; }
    .details-body { padding-block: 28px 48px; }
    .details-form { padding: 4px 20px 24px; }
    .details-submit .btn { width: 100%; }
    .account-panel { padding: 22px 20px; }
    .date-leaves { width: 100%; }
    .date-leaf { flex: 1 1 0; width: auto; }
    .abstract-sheet { padding: 22px 18px; }
    .details-card { padding: 22px 20px 16px; }
    .detail-list div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; }
}
