/* Private account folio. Color roles use Ink.Paper.Story light tokens. */
.account-shell {
  --account-paper: #FBF7EF;
  --account-ground: #F5EEE1;
  --account-ink: #14100E;
  --account-muted: #3A302A;
  --account-accent: #A81E17;
  --account-accent-hover: #8A1610;
  --account-rule: #D8C7AD;
  --account-white: #FFFFFF;
  --account-border: #4E423B;
  width: min(490px, calc(100% - 48px));
  max-height: calc(100svh - 80px);
  inset: 40px 3vw auto auto;
  padding: 36px 36px 32px;
  border: 1px solid var(--account-rule);
  border-radius: 0;
  background: var(--account-paper);
  color: var(--account-ink);
  box-shadow: 3px 3px 0 var(--account-rule), 6px 6px 0 var(--account-ground);
  scrollbar-gutter: stable;
}
.account-shell[data-screen="profile"] { width: min(720px, calc(100% - 48px)); }
.account-shell::backdrop { background: #14100E6E; }
.account-shell .leaf-close {
  position: absolute;
  inset: 10px 10px auto auto;
  margin: 0;
  float: none;
  width: 44px;
  height: 44px;
  border-radius: 2px;
  background: var(--account-paper);
  color: var(--account-ink);
}
.account-shell .leaf-close:hover { background: var(--account-ground); }
.account-shell .leaf-close svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.5; }
.account-heading { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 18px; align-items: start; padding-right: 20px; }
.account-prism { width: 32px; height: 48px; object-fit: contain; margin-top: 4px; }
.account-shell .leaf-kicker { color: var(--account-muted); font: 600 11px/1.6 var(--sans); letter-spacing: .13em; margin: 0 0 10px; }
.account-shell .leaf-title { color: var(--account-ink); font-size: 40px; line-height: 1.1; padding: 0; margin-bottom: 22px; overflow-wrap: anywhere; }
.account-shell .leaf-copy { color: var(--account-muted); font: 15px/1.65 var(--sans); }
.account-shell .tab-row { justify-content: space-between; gap: 16px; border-color: var(--account-rule); margin: 12px 0 24px; }
.account-shell .tab-row .text-button { border: 0; margin-bottom: -1px; padding: 10px 0 13px; color: var(--account-muted); font-size: 14px; }
.account-shell .tab-row .text-button[aria-current="true"] { box-shadow: 0 2px 0 var(--account-accent); color: var(--account-accent); font-weight: 600; }
.account-shell .field-label { font: 600 14px/1.5 var(--sans); color: var(--account-ink); margin: 20px 0 8px; }
.account-shell .field-input { background: var(--account-white); color: var(--account-ink); border: 1px solid var(--account-border); border-radius: 2px; min-height: 50px; line-height: 1.5; }
.account-shell .primary { font: 600 15px/1.5 var(--sans); min-height: 50px; border-radius: 2px; color: var(--account-white); border: 1px solid var(--account-accent); background: var(--account-accent); }
.account-shell .primary:hover { background: var(--account-accent-hover); border-color: var(--account-accent-hover); }
.account-shell .text-button { color: var(--account-muted); border-color: var(--account-rule); font: 14px/1.5 var(--sans); min-height: 44px; padding-block: 10px; }
.account-shell .text-button:hover { color: var(--account-accent); }
.account-shell .password-toggle { font: 13px/1.5 var(--sans); color: var(--account-muted); }
.account-shell :is(button,input):focus-visible { outline: 2px solid var(--account-accent); outline-offset: 3px; }
.account-shell button:disabled { cursor: wait; }
.account-shell .primary:disabled { opacity: 1; background: var(--account-muted); border-color: var(--account-muted); }
.account-shell .text-button:disabled { color: var(--account-muted); }
.account-hint { font: 13px/1.6 var(--sans); color: var(--account-muted); margin: 10px 0; }
.account-error { font: 14px/1.6 var(--sans); color: var(--account-accent-hover); background: var(--account-ground); border-left: 3px solid var(--account-accent); padding: 12px 15px; margin: 4px 0 22px; }
.account-shell .status { color: var(--account-muted); font: 14px/1.65 var(--sans); padding: 12px 0; margin: 0 0 16px; border-block: 1px solid var(--account-rule); }
.account-progress { color: var(--account-muted); font: 14px/1.6 var(--sans); padding: 12px 0; margin: 0 0 18px; border-block: 1px solid var(--account-rule); }
.profile-intro { color: var(--account-muted); font: 15px/1.6 var(--sans); margin: -4px 0 26px 50px; }
.profile-spread { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); border-block: 1px solid var(--account-rule); }
.identity-record { min-width: 0; display: flex; flex-direction: column; padding: 24px; background: var(--account-ink); color: var(--account-paper); margin: 0; border: 0; }
.profile-context { font: 600 11px/1.6 var(--sans); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 25px; }
.profile-context span { padding-inline: 8px; color: var(--account-rule); }
.identity-record h3 { font: 400 22px/1.25 var(--serif); margin: 0 0 13px; max-width: 160px; }
.identity-record strong { font: 14px/1.75 Consolas, 'Courier New', monospace; font-weight: 400; overflow-wrap: anywhere; color: var(--account-paper); letter-spacing: .015em; }
.identity-note { font: 12px/1.65 var(--sans); color: var(--account-rule); margin: 26px 0 0; padding-top: 17px; border-top: 1px solid var(--account-muted); }
.profile-editor { min-width: 0; padding: 26px 0 24px 28px; }
.profile-editor .field-label { font: 400 24px/1.3 var(--serif); margin: 0 0 12px; }
.profile-editor .account-hint { margin: 12px 0 22px; }
.profile-editor .leaf-actions { gap: 7px; margin-top: 0; }
.profile-editor .leaf-actions .text-button { align-self: flex-start; }
.profile-departure { background: var(--account-ground); border-left: 3px solid var(--account-accent); padding: 20px 22px; margin: 20px 0 4px; }
.profile-departure[hidden] { display: none; }
.profile-departure h3 { font: 400 25px/1.25 var(--serif); margin: 0 0 10px; }
.profile-departure h3:focus { outline: none; } /* Announcement heading; action controls retain their visible focus. */
.profile-departure p { font: 14px/1.6 var(--sans); color: var(--account-muted); margin: 0 0 14px; }
.profile-departure-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.profile-departure-actions .primary { width: auto; padding: 12px 20px; }
.profile-reader { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; padding: 16px 0; border-bottom: 1px solid var(--account-rule); }
.profile-reader .account-hint { margin: 0; }
.profile-reader .text-button { display: inline-flex; align-items: center; gap: 22px; border: 0; }
.profile-session { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 23px; }
.profile-session h3 { font: 600 14px/1.5 var(--sans); margin: 0; }
.profile-session .account-hint { margin: 3px 0 0; }
.profile-session .text-button { color: var(--account-accent); flex-shrink: 0; }
@media (max-width: 760px) {
  .account-shell, .account-shell[data-screen="profile"] { inset: 16px 12px auto; width: calc(100% - 24px); max-height: calc(100svh - 32px); padding: 30px 24px 26px; }
  .account-heading { column-gap: 14px; }
  .account-shell .leaf-title { font-size: 35px; }
  .profile-intro { margin-left: 46px; }
}
@media (max-width: 580px) {
  .profile-spread { grid-template-columns: minmax(0, 1fr); }
  .identity-record { display: grid; grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .profile-context { margin-bottom: 13px; }
  .identity-record h3 { font-size: 20px; max-width: none; margin-bottom: 8px; }
  .identity-record strong { font-size: 14px; }
  .identity-note { margin-top: 13px; padding-top: 12px; }
  .profile-editor { padding: 23px 0; }
  .profile-editor .field-label { font-size: 23px; }
  .profile-session { align-items: flex-start; }
}
@media (max-width: 370px) {
  .account-shell, .account-shell[data-screen="profile"] { padding-inline: 19px; }
  .account-heading { grid-template-columns: 25px minmax(0, 1fr); column-gap: 11px; }
  .account-prism { width: 25px; height: 40px; }
  .account-shell .leaf-title { font-size: 30px; }
  .account-shell .leaf-kicker { letter-spacing: .07em; font-size: 11px; }
  .profile-intro { margin-left: 0; font-size: 14px; }
  .profile-reader { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) { .account-shell, .account-shell * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
