/* Account pages (/account/, /account/verify/, /join/): one card in the middle of the page, with
   the logo inside it and no header bar, as on Cornerways' sign-in. Needs brand.css first for the
   --bn-* tokens. */

.ac-page { margin: 0; min-height: 100vh; background: var(--bn-stage); color: var(--bn-text); font-family: var(--bn-body); }

.ac-wrap { min-height: 100vh; box-sizing: border-box; padding: 32px 16px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.ac-card { width: 100%; max-width: 440px; box-sizing: border-box; background: var(--bn-surface); border: 1px solid var(--bn-line);
  border-radius: 12px; padding: 32px 32px 28px; }
@media (max-width: 420px) { .ac-card { padding: 24px 20px; } }
.ac-card p { line-height: 1.55; margin: 0 0 1rem; }
.ac-card a { color: var(--bn-brass); }
.ac-footer { margin: 1.25rem 0 0; color: var(--bn-muted); font-size: .875rem; text-align: center; max-width: 440px; }
.ac-footer a { color: var(--bn-muted); }
.ac-footer + .ac-footer { margin-top: .35rem; }

/* The privacy and settings pages (/privacy/, /account/settings/): the same card, wider. */
.ac-wrap-wide { justify-content: flex-start; }
.ac-wrap-wide .ac-card { max-width: 720px; }
.ac-prose h2 { font: 700 1.4rem/1.15 var(--bn-display); margin: 1.75rem 0 .5rem; }
.ac-prose p, .ac-prose li { line-height: 1.6; color: var(--bn-text); }
.ac-prose ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.ac-prose li { margin: 0 0 .4rem; }
.ac-prose strong { color: var(--bn-text); }

/* The logo at the top of the card (panel_brand.js): the page's only header. The site header's
   (brand.css). */
.ac-card .ac-brand { --bn-logo-ink: var(--bn-text); display: inline-flex; margin: 0 0 1.4rem; color: var(--bn-logo-ink); text-decoration: none; }

.ac-title { font: 700 2.2rem/1.05 var(--bn-display); margin: 0 0 .5rem; }
.ac-heading { font: 700 1.4rem/1.1 var(--bn-display); margin: 0 0 .75rem; }
.ac-intro { color: var(--bn-muted); }
.ac-muted { color: var(--bn-muted); }
.ac-strong { color: var(--bn-text); }
.ac-error { color: var(--bn-warn); margin: 0; }
.ac-optional { color: var(--bn-muted); font-weight: 400; }
.ac-small { font-size: .875rem; margin: 0; }

.ac-form { display: grid; gap: 1rem; margin: 1.25rem 0 0; }
.ac-form-flush { margin-top: 0; }
.ac-form .ac-title, .ac-form .ac-heading, .ac-form p { margin-bottom: 0; }
.ac-field { display: grid; gap: .4rem; font-weight: 600; font-size: .95rem; }
.ac-input { background: var(--bn-surface-2); color: var(--bn-text); border: 1px solid var(--bn-line); border-radius: 8px;
  padding: .75rem .85rem; font: 400 1rem var(--bn-body); width: 100%; box-sizing: border-box; }
.ac-input:focus { border-color: var(--bn-brass); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bn-brass) 25%, transparent); }
.ac-input-code { text-transform: uppercase; letter-spacing: .08em; }
.ac-input-otp { font-size: 1.5rem; letter-spacing: .3em; }
.ac-btn:focus-visible, .ac-link:focus-visible, .ac-brand:focus-visible { outline: 2px solid var(--bn-brass); outline-offset: 2px; }
.ac-turnstile { min-height: 65px; }
.ac-check { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.25rem 0; cursor: pointer; }

/* The signed-in card's parts: a rule between each, a label with a hint under it. */
.ac-section { border-top: 1px solid var(--bn-line); margin: 1.5rem 0 0; padding: 1.5rem 0 0; }
.ac-label { display: block; font-weight: 600; }
.ac-hint { display: block; color: var(--bn-muted); font-size: .9rem; margin: .2rem 0 .6rem; }
.ac-card p.ac-hint { margin: .2rem 0 .6rem; }
.ac-card p.ac-ok { margin: .6rem 0 0; }
.ac-inline { display: flex; gap: .6rem; }
.ac-inline .ac-input { flex: 1; min-width: 0; }
.ac-switch { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; }
.ac-switch input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; accent-color: var(--bn-brass-fill); flex: none; cursor: pointer; }
.ac-switch .ac-hint { margin: .15rem 0 0; }
.ac-btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.ac-btn-row .ac-btn { flex: 1 1 auto; }

.ac-btn { display: inline-block; box-sizing: border-box; background: var(--bn-brass-fill); color: var(--bn-brass-ink); border: 1px solid var(--bn-brass-fill);
  border-radius: 8px; padding: .8rem 1.1rem; font: 600 1rem var(--bn-body); text-align: center; text-decoration: none; cursor: pointer; justify-self: start; }
.ac-card a.ac-btn { color: var(--bn-brass-ink); }
.ac-card a.ac-btn-quiet { color: var(--bn-text); }
.ac-btn-block { display: block; width: 100%; justify-self: stretch; }
.ac-btn:hover:not(:disabled) { background: var(--bn-brass-fill-hover); border-color: var(--bn-brass-fill-hover); }
.ac-btn:disabled { opacity: .6; cursor: default; }
.ac-btn-quiet { background: transparent; color: var(--bn-text); border-color: var(--bn-line); }
.ac-btn-quiet:hover:not(:disabled) { background: var(--bn-surface-2); border-color: var(--bn-line); }
.ac-link { background: none; border: 0; padding: 0; color: var(--bn-brass); font: inherit; text-decoration: underline; cursor: pointer; }

/* Other ways on, under the main button: "Have a beta code? Make your account". */
.ac-alt { margin: 1.25rem 0 0; color: var(--bn-muted); font-size: .95rem; }
.ac-alt p { margin: 0 0 .35rem; }
.ac-card p.ac-alt { margin-bottom: 0; }

/* Deleting an account (account_page.js). */
.ac-danger-link { color: var(--bn-warn); }
.ac-danger-box { border: 1px solid var(--bn-warn); border-radius: 8px; padding: 1rem; display: grid; gap: .6rem; }
.ac-danger-box p { margin: 0; }
.ac-danger-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.ac-btn-danger, .ac-btn-danger:hover:not(:disabled) { background: var(--bn-warn); border-color: var(--bn-warn); color: var(--bn-warn-ink); }

/* The Settings page (settings_page.js): groups of rows, each a name and a line about it on the left
   and its control (a switch, a segmented choice, Listen) on the right. */
.st-card.ac-card { padding-bottom: 32px; }
.st-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.6rem; }
.st-top .ac-brand { margin: 0; }
.ac-card a.st-back { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border: 1px solid var(--bn-line); border-radius: 999px;
  color: var(--bn-text); font: 600 .9rem/1 var(--bn-body); text-decoration: none; white-space: nowrap; }
.ac-card a.st-back:hover { background: var(--bn-surface-2); }
.st-back:focus-visible { outline: 2px solid var(--bn-brass); outline-offset: 2px; }
.st-head { min-height: 2.4rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.st-head .ac-title { margin: 0; }
.ac-card p.st-saved { margin: 0; color: var(--bn-brass); font: 600 .9rem/1 var(--bn-body); }
.ac-card p.st-intro { margin: .45rem 0 0; color: var(--bn-muted); font-size: .95rem; }

.st-group { margin: 1.9rem 0 0; }
.st-group-title { margin: 0 0 .55rem; font: 700 .78rem/1 var(--bn-body); letter-spacing: .09em; text-transform: uppercase; color: var(--bn-muted); }
.st-panel { border: 1px solid var(--bn-line); border-radius: 10px; background: var(--bn-surface-2); }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1.25rem; padding: .85rem 1rem; }
.st-row + .st-row { border-top: 1px solid var(--bn-line); }
.st-text { flex: 1 1 14rem; min-width: 0; }
.st-name { display: block; font-weight: 600; line-height: 1.3; }
.st-hint { display: block; margin-top: .15rem; color: var(--bn-muted); font-size: .88rem; line-height: 1.4; }
label.st-row, .st-pick { cursor: pointer; }

/* A switch: a checkbox, drawn as a track and thumb. */
.st-switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 2.75rem; height: 1.6rem; margin: 0; border-radius: 999px;
  border: 1px solid var(--bn-line); background: color-mix(in srgb, var(--bn-muted) 28%, transparent); cursor: pointer; transition: background .15s; }
.st-switch::before { content: ''; position: absolute; top: 50%; left: .16rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / .35); transform: translateY(-50%); transition: left .15s; }
.st-switch:checked { background: var(--bn-brass-fill); border-color: var(--bn-brass-fill); }
.st-switch:checked::before { left: calc(100% - 1.36rem); }
.st-switch:focus-visible, .st-seg input:focus-visible + span, .st-radio:focus-visible { outline: 2px solid var(--bn-brass); outline-offset: 2px; }

/* A segmented choice: radios, drawn as one control. */
.st-seg { flex: none; display: inline-flex; padding: 3px; border: 1px solid var(--bn-line); border-radius: 9px; background: var(--bn-surface); }
.st-seg label { position: relative; cursor: pointer; }
.st-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.st-seg span { display: block; padding: .45rem .8rem; border-radius: 6px; font: 600 .9rem/1 var(--bn-body); color: var(--bn-muted); white-space: nowrap; }
.st-seg label:hover span { color: var(--bn-text); }
.st-seg input:checked + span { background: var(--bn-brass-fill); color: var(--bn-brass-ink); }

/* A sound pack: its radio and name, and Listen. */
.st-pick { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .8rem; }
.st-radio { flex: none; width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--bn-brass-fill); cursor: pointer; }
.st-listen { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-width: 5.6rem; justify-content: center; padding: .5rem .8rem; border: 1px solid var(--bn-line);
  border-radius: 8px; background: var(--bn-surface); color: var(--bn-text); font: 600 .9rem/1 var(--bn-body); cursor: pointer; }
.st-listen:hover:not(:disabled) { border-color: var(--bn-text); }
.st-listen:disabled { opacity: .6; cursor: default; }
.st-listen svg { width: .7rem; height: .7rem; fill: currentColor; }
.ac-card p.st-error { margin: .6rem 0 0; }
.st-listen:focus-visible { outline: 2px solid var(--bn-brass); outline-offset: 2px; }

@media (max-width: 520px) {
  .st-row { padding: .8rem .85rem; }
  .st-row-seg { flex-wrap: wrap; }
  .st-row-seg .st-seg { display: flex; width: 100%; box-sizing: border-box; }
  .st-row-seg .st-seg label { flex: 1 1 0; text-align: center; }
  .st-seg span { padding: .6rem .5rem; }
  .st-back-word { display: none; }
}
