.account { --account-padding: 1rem; min-height: 100dvh; padding: var(--account-padding); }
.account-card { width: min(100%, 30rem); padding: clamp(1.25rem, 5vw, 2.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; }
.account-card h1 { margin: 1.5rem 0; font-size: clamp(1.75rem, 5vw, 2.25rem); }
.account-card form, .account-card label { display: grid; gap: .5rem; }
.account-card form { gap: 1rem; }
.account-card input { width: 100%; }
.account-card button { min-height: 2.75rem; }
.account-card small { color: var(--muted); font-weight: 400; }
.account-card p { margin: 1rem 0 0; }
.account-card .account-error { color: var(--danger); margin-bottom: 1rem; }

.account-layout { padding: 0; min-height: calc(100dvh - var(--account-padding) * 2); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 6rem); max-width: 1600px; margin: auto; }
.account-card { justify-self: center; border: 0; background: transparent; }
.account-card h1 { font-weight: 500; letter-spacing: -.045em; }
.account-card input { min-height: 3.25rem; border-radius: .625rem; }
.account-card button { min-height: 3.25rem; border-radius: .625rem; }
.account-visual { display: block; padding: 0; border: 0; align-self: start; position: relative; height: calc(100dvh - var(--account-padding) * 2); min-height: 0; min-width: 0; overflow: hidden; overflow: clip; isolation: isolate; border-radius: 1.5rem; background: #ddd6c8; }
.account-photo-columns { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-inline: 1rem; transform: rotate(-6deg) scale(1.16); }
.account-photo-column { min-width: 0; }
.account-photo-track { animation: account-photo-scroll 44s linear infinite; will-change: transform; }
.account-photo-column:nth-child(2) .account-photo-track { animation-direction: reverse; animation-duration: 51s; }
.account-photo-group { display: grid; gap: 1rem; padding-bottom: 1rem; }
.account-photo-group img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1rem; }
.account-visual::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(28 24 20 / 0) 30%, rgb(28 24 20 / .82) 100%); }
.account-visual-copy { position: absolute; z-index: 1; bottom: clamp(1.5rem, 3vw, 3rem); left: clamp(1.5rem, 3vw, 3rem); right: 1.5rem; color: #fff; }
.account-visual-copy > span { font-size: .8125rem; font-weight: 600; letter-spacing: .09em; }
.account-visual-copy h2 { font-size: clamp(1.75rem, 2.8vw, 2.75rem); line-height: 1.13; letter-spacing: -.045em; font-weight: 500; margin: 1rem 0 0; }
@keyframes account-photo-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (max-width: 760px) {
  .account-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .account-card { padding: 1.5rem .75rem; }
  .account-visual { height: min(25rem, calc(100dvh - var(--account-padding) * 2)); width: 100%; }
  .account-visual-copy h2 { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .account-photo-track { animation: none; will-change: auto; }
}

.account-remember { display: grid; gap: 0; }
.account-card .account-remember-check { position: relative; display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .875rem; font-weight: 400; }
.account-card .account-remember-check input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.remember-check-art { display: grid; place-items: center; width: 1.125rem; height: 1.125rem; flex-shrink: 0; background: var(--surface); border: 1.5px solid #aaa69d; border-radius: .375rem; }
.remember-check-art svg { width: 100%; height: 100%; }
.remember-check-art path { stroke: white; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.account-remember-check input:checked + .remember-check-art { background: var(--primary); border-color: var(--primary); }
.account-remember-check input:checked + .remember-check-art path { stroke-dashoffset: 0; }
.account-remember-check input:focus-visible + .remember-check-art { outline: 3px solid var(--tint-border); outline-offset: 3px; }
.account-card .account-remember-duration { display: grid; grid-template-rows: 1fr; opacity: 1; }
.remember-duration-clip { min-height: 0; overflow: hidden; }
.remember-duration-content { margin: 0; padding: 0 0 .125rem; border: 0; min-width: 0; }
.remember-duration-content legend { float: left; width: 100%; padding: .75rem 0 .375rem; color: var(--muted); font-size: .875rem; }
.remember-options { width: min(100%, 17rem); clear: both; position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 4px; border: 1px solid var(--line); background: var(--paper); border-radius: .625rem; isolation: isolate; }
.remember-selection { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: .375rem; background: var(--surface); box-shadow: 0 1px 3px rgb(31 30 28 / .07), 0 0 0 1px rgb(31 30 28 / .03); transform: translateX(calc(var(--selected-index, 0) * 100%)); display: none; }
.is-enhanced .remember-selection { display: block; }
.account-card .remember-option { position: relative; display: block; cursor: pointer; font-weight: 500; }
.account-card .remember-option input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.remember-option span { display: grid; place-items: center; min-height: 2.125rem; padding-inline: .5rem; border-radius: .375rem; font-size: .875rem; color: var(--muted); }
.remember-option input:checked + span { color: var(--primary); }
.account-remember:not(.is-enhanced) .remember-option input:checked + span { background: var(--surface); }
.remember-option input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
.account-remember > small { display: block; margin-top: .5rem; font-size: .8125rem; line-height: 1.45; }
.is-enhanced:not(.is-open) .account-remember-duration { grid-template-rows: 0fr; opacity: 0; }
.is-enhanced:not(.is-open) .remember-duration-content { transform: translateY(-8px); }
@media (prefers-reduced-motion: no-preference) {
  .is-ready .account-remember-duration { transition: grid-template-rows 420ms cubic-bezier(.22, 1, .36, 1), opacity 240ms ease; }
  .is-ready .remember-duration-content { transition: transform 420ms cubic-bezier(.22, 1, .36, 1); }
  .is-ready .remember-selection { transition: transform 380ms cubic-bezier(.34, 1.35, .4, 1); }
  .is-ready .remember-check-art { transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
  .is-ready .remember-check-art path { transition: stroke-dashoffset 220ms ease 80ms; }
  .is-ready .account-remember-check input:checked + .remember-check-art { animation: remember-check-pop 360ms cubic-bezier(.2, .8, .3, 1); }
  .remember-option span { transition: color 180ms ease, transform 180ms ease; }
  .remember-option:active span { transform: scale(.94); }
  .account-remember-check:hover .remember-check-art { box-shadow: 0 0 0 4px var(--tint); }
}
@keyframes remember-check-pop { 0% { transform: scale(1); } 40% { transform: scale(.85); } 75% { transform: scale(1.12); } 100% { transform: scale(1); } }

.account-card > .wordmark { text-decoration: none; }

/* Contextual help shared by login and registration. */
.account-left { position: relative; align-self: stretch; display: grid; place-items: center; min-width: 0; padding-block: 4.5rem; }
.account-help-trigger { position: absolute; top: 1rem; right: calc(1.5rem - clamp(2rem, 5vw, 6rem)); width: 2.75rem; height: 2.75rem; min-height: 2.75rem; padding: 0; border: 0; border-radius: .4rem; background: #c74230; color: white; font-size: 1.5rem; font-weight: 500; line-height: 1; }
.account-help-trigger:hover { background: #ac3525; }
.account-help-trigger[hidden] { display: none; }
.account-help-trigger:focus-visible, .account-help :focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.account-help { position: fixed; width: min(46rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 0; overflow-y: auto; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 80px rgb(31 30 28 / .2); }
.account-help::backdrop { background: rgb(31 30 28 / .38); backdrop-filter: blur(4px); }
.account-help-close { position: absolute; right: 1rem; top: 1rem; width: 2.75rem; padding: 0; border: 0; background: transparent; font-size: 1.75rem; font-weight: 400; }
.account-help-stage { display: grid; place-items: center; min-height: 160px; background: radial-gradient(ellipse at 50% 48%, #fff8f1, transparent 68%); }
.account-help-render { display: block; width: 160px; height: auto; margin: 16px 0; }
.account-help-content { padding: 0 2.5rem 2.5rem; }
.account-help-header { display: grid; grid-template-columns: 10rem minmax(0, 1fr); align-items: center; gap: 1.5rem; padding: 2.5rem 3.5rem 0 2rem; }
.account-help-introduction { min-width: 0; }
.account-help-close { z-index: 1; border-radius: 50%; }
.account-help h2 { margin: 0 0 1rem; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.04em; font-weight: 500; }
.account-help p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.account-help-questions { display: grid; gap: .75rem; margin: 2rem 0; }
.account-help details { overflow: hidden; padding-inline: 1.25rem; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.account-help summary { position: relative; padding: 1.25rem 2rem 1.25rem 0; cursor: pointer; list-style: none; font-weight: 500; line-height: 1.4; }
.account-help summary::-webkit-details-marker { display: none; }
.account-help summary::before, .account-help summary::after { content: ''; position: absolute; right: .25rem; top: 50%; width: .75rem; height: 1.5px; background: #b73929; border-radius: 2px; transform: translateY(-50%); }
.account-help summary::after { transform: translateY(-50%) rotate(90deg); }
.account-help details[open]:not([data-expanded]) summary::after,
.account-help details[data-expanded="true"] summary::after { transform: translateY(-50%) rotate(0deg); }
.account-help details p { padding-bottom: 1.25rem; }
.account-help-action { width: 100%; min-height: 3.25rem; border-radius: .625rem; }
@media (prefers-reduced-motion: no-preference) {
  .account-help-trigger { transition: background 180ms ease; }
  .account-help-render { width: calc(160px * 504 / 440); }
  .account-help[open] { animation: account-help-enter 220ms ease-out; }
  @keyframes account-help-enter { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
}
@media (max-width: 760px) {
  .account-left { padding-block: 4rem 0; }
  .account-help-trigger { top: .5rem; right: max(.75rem, calc((100% - 30rem) / 2 + .75rem)); }
}

.account-help-list { margin: 0; padding: 0 0 1rem 1.25rem; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.account-help-list li + li { margin-top: .5rem; }

@media (prefers-reduced-motion: no-preference) {
  .account :is(button, .button) { transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease, box-shadow 260ms ease, transform 260ms cubic-bezier(.22, 1, .36, 1); }
  .account :is(button, .button):active { transform: scale(.97); transition-duration: 100ms; }
  .account-help summary { transition: color 200ms ease; }
  .account-help summary::after { transition: transform 300ms cubic-bezier(.22, 1, .36, 1); }
  .account-help details { transition: border-color 220ms ease, background-color 220ms ease; }
  .account-help-answer { opacity: 1; transform: translateY(0); transition: opacity 220ms ease, transform 320ms cubic-bezier(.22, 1, .36, 1); }
  .account-help details[data-expanded="false"] .account-help-answer { opacity: 0; transform: translateY(-5px); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .account :is(button, .button):hover { transform: translateY(-2px); }
  .account :is(button, .button):active { transform: translateY(0) scale(.97); }
  .account .primary:hover { box-shadow: 0 5px 14px rgb(58 79 209 / .18); }
  .account-help-trigger:hover { box-shadow: 0 4px 12px rgb(199 66 48 / .2); }
  .account-help summary:hover { color: var(--primary); }
  .account-help details:hover { border-color: #b9b3a7; }
}

@media (max-width: 600px) {
  .account-help-header { grid-template-columns: 1fr; gap: .5rem; padding: 2rem 1.25rem 0; }
  .account-help-stage { min-height: 120px; }
  .account-help-render { width: 128px; margin: 0; }
  .account-help-content { padding: 0 1.25rem 1.5rem; }
  .account-help-questions { margin-block: 1.5rem; }
  .account-help details { padding-inline: 1rem; }
  .account-help summary { padding-block: 1.125rem; }
}
