/* Reader account forms share the site's paper, serif headings and forest ending. */
.reader.account-page {
    --r-bg: #f4ecdf;
    --r-panel: #fbf7ee;
    --r-line: #d9d0c0;
    --r-accent: #304d3c;
    --r-muted: #626c5f;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 0;
    color: #293b31;
}
.reader.account-page::before, .reader.account-page::after { content: none; display: none; }
.account-page .site-header, .account-page .dv-page-ending { flex: 0 0 auto; }
.account-page .site-header.navigation-paper-header {
    z-index: 0;
    min-height: 0;
    background: transparent;
}
.account-page .site-header.navigation-paper-header::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0 0 auto;
    height: clamp(310px, 27vw, 390px);
    pointer-events: none;
    background: linear-gradient(to bottom, #102019c9 0%, #10201970 88px, transparent 180px),
                url('/images/home/account-reader-nook-v1.webp') center center / cover no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 66%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 66%, transparent 100%);
}
.account-page .site-header.navigation-paper-header .dv-navigation {
    color: #fff8e9;
    text-shadow: 0 1px 5px #07150c;
}
.account-page .site-header.navigation-paper-header .site-name .site-mark {
    filter: brightness(0) invert(1) drop-shadow(0 0 .35px #fff);
    opacity: 1;
}
.account-page .site-header.navigation-paper-header .site-name .brand-monogram { filter: drop-shadow(0 1px 1px #0b160d); }
.account-page .dv-page-ending { --dv-ending-paper: var(--r-bg); }
.account-main {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    width: min(700px, calc(100% - 48px));
    margin: 0 auto 76px;
}
.account-main-narrow { max-width: 520px; }
.account-main:focus { outline: none; }
.account-intro {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: clamp(195px, 17vw, 235px);
    margin-bottom: 28px;
    padding: 20px 0 35px;
    color: #fff8e9;
    text-align: center;
    text-shadow: 0 2px 5px #0a130f, 0 1px 15px #0a130f;
}
.account-intro::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 38px;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 43%, #0a1912c9, #0a191250 48%, transparent 72%);
}
.account-intro::after {
    content: "";
    display: block;
    width: 110px;
    height: 7px;
    margin: 16px auto 0;
    background: radial-gradient(circle, #e8d4a6 0 2px, transparent 2.5px) center / 7px 7px no-repeat,
                linear-gradient(90deg, transparent, #e8d4a6 25%, #e8d4a6 44%, transparent 44%, transparent 56%, #e8d4a6 56%, #e8d4a6 75%, transparent) center / 100% 1px no-repeat;
}
.account-page h1 { margin: 0 0 13px; font-size: clamp(31px, 3.3vw, 43px); line-height: 1.18; }
.account-intro > h1:last-child { margin-bottom: 0; }
.account-intro > p:last-child { margin: 0 auto; max-width: 54ch; color: #fff8e9; line-height: 1.65; }
.account-intro .account-reader-name { font: 22px/1.4 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.account-card {
    padding: 30px 34px;
    background: #fbf7eee8;
    border: 1px solid var(--r-line);
    border-radius: 5px;
    box-shadow: 0 8px 28px #463b2510;
}
.account-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: -8px 0 18px; }
.account-card h2 { margin: 0; font: 25px/1.3 Georgia, "Times New Roman", serif; }
.account-form { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.account-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.account-field label { font-size: 15px; font-weight: 600; }
.account-field input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 10px 13px;
    border: 1px solid #9aa58e;
    border-radius: 3px;
    background: #fffdf7;
    color: #253b30;
    font-size: 17px;
    line-height: 1.5;
}
.account-field input[readonly] { background: #eee9df; color: #5f685d; border-color: #d3cebf; }
.account-field input.is-invalid, .account-field input[aria-invalid="true"] { border-color: #9b3d32; }
.account-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.account-hint { color: var(--r-muted); font-size: 12px; line-height: 1.55; }
.account-field-error { color: #8c302a; font-size: 13px; line-height: 1.5; }
.account-field-error:empty { display: none; }
.account-page .account-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid #304d3c;
    border-radius: 3px;
    background: #304d3c;
    color: #fff8e9;
    font: 19px/1.4 Georgia, "Times New Roman", serif;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.account-form > .account-primary { width: 100%; margin-top: 4px; }
.account-page .account-text-button {
    min-height: 44px;
    margin: 0;
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #304d3c;
    font-size: 14px;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: .22em;
}
.account-switch { margin: 21px 0 0; color: var(--r-muted); font-size: 14px; text-align: center; }
.account-switch a { display: inline-block; padding-block: 7px; color: #304d3c; }
.account-notice { margin: 0 0 20px; padding: 12px 14px; border-left: 3px solid #a29a7c; background: #eeeadf; color: #4d5549; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.account-notice p { margin: 0; }
.account-notice-success { border-color: #4d7052; background: #edf0e6; color: #304d3c; }
.account-notice-error { border-color: #a34b3c; background: #f3e5da; color: #842e27; }
.account-form > .account-notice { margin: 0; }
.account-email-status { color: var(--r-muted); font-size: 12px; }
.account-confirmation-note p { margin: 0; color: inherit; font-size: 14px; line-height: 1.6; }
.account-confirmation-card { text-align: center; }
.account-confirmation-card > p:first-child { margin: 0 0 24px; line-height: 1.7; }
.account-confirmation-card .account-button-link { width: 100%; }
@media (hover: hover) {
    .account-page .account-primary:hover { background: #243f30; border-color: #243f30; }
    .account-switch a:hover, .account-page .account-text-button:hover { color: #172e20; }
}
@media (max-width: 599.98px) {
    .account-main { width: calc(100% - 40px); margin-block: 0 44px; }
    .account-intro { margin-bottom: 23px; }
    .account-intro > p:last-child { font-size: 14px; }
    .account-card { padding: 22px 20px; }
    .account-form { gap: 18px; }
    .account-field-row { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .account-page .account-primary { font-size: 18px; padding-inline: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
    .account-page .account-primary { transition: background-color .15s, border-color .15s; }
}
