/* Login, studio and proofs pages. Loaded only by login.html, studio.html and proofs.html. */

.acct { min-height: 100vh; }
.acct-title { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.02; color: var(--text); margin: 18px 0 12px; }
.acct-title em { color: var(--gold-hi); }
.acct-panel { min-width: 0; }
.acct-loading { color: var(--text-muted); font-size: 18px; padding: 40px 0; }
.acct-lede { color: var(--text-dark-muted); margin: -4px 0 22px; }
.acct-lede code, .acct-form code { font-size: .9em; padding: 1px 6px; border-radius: 3px; background: rgba(138,106,42,.14); color: var(--text-dark); }
.acct-muted { color: var(--text-dark-muted); }
.acct-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 10px; }
.acct-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0 6px; }
.acct-actions .btn, .acct-foot .btn { min-height: 46px; padding: 11px 22px; font-size: 13px; }
.acct-switch { margin-top: 10px; }
.acct-more { margin-top: 26px; border-top: 1px dashed rgba(90,64,30,.3); padding-top: 14px; }
.acct-more summary, .book-more summary { cursor: pointer; color: var(--burgundy); font-weight: 500; font-size: 15px; min-height: 32px; display: flex; align-items: center; }
.acct-more[open] summary, .book-more[open] summary { margin-bottom: 14px; }

.form-status.is-ok { color: #2f5d34; }
.studio-status { color: var(--gold-hi); }
.studio-status.is-ok { color: #b9d8b0; }

/* Buttons on paper */
.btn-line { color: var(--burgundy); border: 1px solid rgba(110,31,44,.45); background: rgba(255,255,255,.35); }
.btn-line:hover { background: rgba(110,31,44,.08); border-color: var(--burgundy); }
.btn-danger { color: #8f1d1d; border-color: rgba(143,29,29,.45); }
.btn[disabled] { opacity: .55; cursor: progress; transform: none; }
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14.5px; color: var(--burgundy); text-decoration: underline; text-decoration-color: rgba(110,31,44,.4); text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.link-btn:hover { text-decoration-color: var(--burgundy); }
.link-btn--danger { color: #8f1d1d; }
:where(.btn, .link-btn, .seg-opt span, .studio-close, summary):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Studio and proofs ---------- */
/* styles.css gives .book-card (the catalogue's cards) a two-column grid; the studio's and proofs page's cards are one column. */
.studio-books .book-card { display: block; }
.studio-books .book-card > * + * { margin-top: 12px; }
.studio-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 32px; margin-bottom: 40px; }
.studio-head .acct-actions { margin: 0 0 8px; }
.studio-who { color: var(--text-muted); margin: 0; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.studio-side .paper-card { position: sticky; top: 100px; }
.studio-h { font-size: 30px; line-height: 1.1; color: var(--burgundy); margin: 0 0 8px; }
.studio-h--light { color: var(--text); margin: 56px 0 18px; font-size: 34px; }
.studio-sub { color: var(--text-dark-muted); margin: 0 0 20px; font-size: 15.5px; }
.studio-new .field input[type="file"] { padding: 10px 0; font-size: 15px; border-bottom: 1px dashed rgba(90,64,30,.45); }
.studio-progress { height: 6px; margin: 0 0 14px; border-radius: 3px; overflow: hidden; background: rgba(90,64,30,.18); }
.studio-progress i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--gold-lo), var(--gold)); transition: width .2s; }

.studio-books { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.proof-books { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.studio-empty { color: var(--text-muted); font-style: italic; }
.paper-card .studio-empty { color: var(--text-dark-muted); }
.book-card { padding: 28px 28px 22px; }
.book-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 14px; }
.book-head h3 { font-size: 28px; line-height: 1.1; color: var(--burgundy); margin: 0; overflow-wrap: anywhere; }
.book-meta { margin: 8px 0 0; color: var(--text-dark-muted); font-size: 14.5px; }
.book-note { margin: 14px 0 0; color: var(--text-dark-muted); font-size: 14.5px; font-style: italic; }

.status-tag { flex: none; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; background: #e7dcc4; color: #5f4f37; }
.status-proof { background: #f5e2b0; color: #6b4a10; }
.status-published { background: #dcebd6; color: #2f5d34; }

.book-share { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.book-share legend { padding: 0; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-lo); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border: 1px solid rgba(90,64,30,.35); border-radius: 999px; font-size: 14.5px; color: var(--text-dark); background: rgba(255,255,255,.35); cursor: pointer; transition: background-color .2s, color .2s; }
.seg-opt span:hover { border-color: var(--burgundy); }
.seg-opt input:checked + span { background: var(--burgundy); border-color: var(--burgundy); color: #fbefd2; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.seg-opt input:disabled + span { opacity: .45; cursor: not-allowed; }
.studio-copy { display: flex; gap: 8px; margin-top: 10px; }
.studio-copy input { flex: 1; min-width: 0; padding: 9px 10px; font-size: 13.5px; color: var(--text-dark); border: 1px solid rgba(90,64,30,.3); border-radius: 3px; background: rgba(255,255,255,.55); }
.studio-copy .btn { min-height: 40px; padding: 8px 16px; font-size: 12.5px; }

.book-proofs { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px dashed rgba(90,64,30,.3); display: grid; gap: 8px; font-size: 14.5px; }
.book-proofs li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 14px; }
.book-proof-btns { display: inline-flex; gap: 14px; }
.book-more { margin-top: 16px; border-top: 1px dashed rgba(90,64,30,.3); padding-top: 10px; }
.book-card > .form-status { margin: 10px 0 0; min-height: 0; }

.studio-link { margin: 4px 0 6px; font-size: 14.5px; color: var(--text-dark-muted); }
.studio-link p { margin: 0; }
.studio-authors { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.author-row { display: grid; gap: 6px; padding-top: 12px; border-top: 1px dashed rgba(90,64,30,.3); }
.author-row > div:first-child { display: grid; gap: 2px; }
.author-row span { font-size: 14px; color: var(--text-dark-muted); overflow-wrap: anywhere; }
.author-state { font-style: italic; }
.author-state.is-ok { color: #2f5d34; font-style: normal; }
.author-btns { display: flex; flex-wrap: wrap; gap: 0 16px; }

.proof-steps { list-style: none; margin: -10px 0 44px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; color: var(--text-muted); }
.proof-steps li { padding-top: 14px; border-top: 1px solid var(--line); }
.proof-steps strong { color: var(--gold-hi); font-weight: 600; }

/* Corrections dialog */
.studio-dialog { width: min(680px, calc(100vw - 32px)); max-height: min(82vh, 900px); padding: 0; border: 0; border-radius: 3px; background: linear-gradient(180deg, var(--paper), #efe2c4); color: var(--text-dark); box-shadow: 0 40px 80px -20px #000; }
.studio-dialog::backdrop { background: rgba(10, 7, 5, .72); }
.studio-dialog-inner { position: relative; padding: 34px 32px 26px; }
.studio-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--burgundy); cursor: pointer; }
.corr-who { margin: 0 0 4px; }
.corr-sum { margin: 0 0 16px; color: var(--text-dark-muted); font-size: 14.5px; }
.corr-h { font-size: 22px; color: var(--burgundy); margin: 18px 0 8px; }
.corr-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 15px; }
.corr-list p { margin: 2px 0 0; }
.corr-page { font-weight: 600; }
.corr-kind { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #f5e2b0; color: #6b4a10; }

@media (max-width: 960px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-side .paper-card { position: static; }
}
@media (max-width: 760px) {
  .proof-steps { grid-template-columns: 1fr; gap: 12px; }
  .book-card { padding: 24px 18px 18px; }
  .studio-dialog-inner { padding: 30px 18px 20px; }
  .studio-h--light { margin-top: 44px; }
}

/* =====================================================================
   Log in (login.html) and "Your details" (access.html) on phones and tablets: after Amazon's sign-in.
   Boxed fields 48px tall with 16px text and the label above, a Show button in each password box
   (login.js), one full-width main button, and every link-button a finger tall (44px). On the site's
   phone scale: buttons 44px / 14px / 600, fields 48px / 16px, spacing 4-32. Desktop is unchanged.
   ===================================================================== */
.pw-wrap { position: relative; display: block; }
.pw-toggle { display: none; }
@media (max-width: 1040px) {
  .acct-sign .acct-form .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    height: 48px; min-height: 48px; padding: 0 14px; border: 1px solid rgba(90,64,30,.45); border-radius: 3px;
    background-color: rgba(255,255,255,.72); font-size: 16px;
  }
  .acct-sign .acct-form .field input:focus { border-color: var(--burgundy); background-color: #fff; box-shadow: 0 0 0 3px rgba(110,31,44,.14); }
  .acct-sign .acct-form .field [aria-invalid="true"] { border-color: #b3261e; }
  .acct-sign .pw-wrap input { padding-right: 88px !important; }
  .acct-sign .pw-toggle {
    position: absolute; top: 2px; right: 2px; bottom: 2px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px;
    border: 0; border-radius: 2px; background: none; color: var(--burgundy); font: 600 14px var(--sans); cursor: pointer;
  }
  .acct-sign .pw-toggle svg { width: 20px; height: 20px; flex: none; }
  .acct-sign .pw-toggle .pw-slash { opacity: 0; }
  .acct-sign .pw-toggle[aria-pressed="true"] { background: rgba(110,31,44,.08); }
  .acct-sign .pw-toggle[aria-pressed="true"] .pw-slash { opacity: 1; }
  .acct-sign .pw-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
  .acct-sign .link-btn { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
  .acct-sign .acct-more summary { min-height: 44px; }
}
@media (max-width: 760px) {
  .acct-sign .acct-title { font-size: 28px; line-height: 1.15; margin: 12px 0 8px; }
  .acct-sign .form-shell { gap: 24px; }
  .acct-sign .form-aside p { margin-top: 8px; font-size: 15px; }
  .acct-sign .form-aside ul { margin-top: 12px; font-size: 15px; }
  .acct-sign .form-aside li:nth-child(2) { display: none; } /* "Forgotten your password?": the form's own button says it */
  .acct-sign .acct-form { padding: 24px 16px; }
  .acct-sign .letter-salute { font-size: 28px; margin-bottom: 12px; }
  .acct-sign .acct-lede { margin: 0 0 16px; font-size: 15px; }
  .acct-sign .acct-form .field { margin-bottom: 16px; }
  .acct-sign .acct-loading { font-size: 15px; padding: 24px 0; }
  /* One full-width main button; the other actions under it */
  .acct-sign .acct-foot { display: grid; gap: 8px; margin: 8px 0; }
  .acct-sign .acct-foot .btn, .acct-sign .acct-actions .btn { width: 100%; }
  .acct-sign .acct-actions { display: grid; gap: 8px; margin: 16px 0 4px; }
  .acct-sign .acct-foot .link-btn { justify-content: center; }
  .acct-sign .form-status { margin: 4px 0; font-size: 15px; }
  .acct-sign .form-status:empty { display: none; }
  .acct-sign .small-print { margin: 4px 0 0; }
  /* New readers: "Create a reader account" as a full-width second button, like Amazon's */
  .acct-sign [data-panel="login"] [data-show="register"] {
    width: 100%; justify-content: center; margin-top: 8px; padding: 0 18px; border: 1px solid rgba(110,31,44,.45); border-radius: 3px;
    background: rgba(255,255,255,.35); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  }
  /* access.html: Decline is a whole button too */
  .acct-sign [data-ac-decline] {
    width: 100%; justify-content: center; padding: 0 18px; border: 1px solid rgba(110,31,44,.45); border-radius: 3px;
    background: rgba(255,255,255,.35); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  }
  .acct-sign .ac-reason { margin: 12px 0 16px !important; }
  .acct-sign #ac-code { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
}

/* Show password on desktop as well (it was phones and tablets only): an eye and "Show" at the end of the line */
@media (min-width: 1041px) {
  .pw-wrap input { padding-right: 84px; }
  .pw-toggle { position: absolute; top: 50%; right: 0; translate: 0 -50%; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px;
    border: 0; border-radius: 3px; background: none; color: var(--burgundy); font: 600 13px var(--sans); letter-spacing: .03em; cursor: pointer; }
  .pw-toggle svg { width: 18px; height: 18px; flex: none; }
  .pw-toggle .pw-slash { opacity: 0; }
  .pw-toggle:hover { background: rgba(110,31,44,.06); }
  .pw-toggle[aria-pressed="true"] { background: rgba(110,31,44,.08); }
  .pw-toggle[aria-pressed="true"] .pw-slash { opacity: 1; }
  .pw-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
}
