/* The account page, and the small bar saved-sync.js shows on a tool's page when the account holds a
   different copy of the visitor's work. Only in a build with accounts. */

/* Two states share the page. Which one shows follows html[data-acct], which is set before first paint. */
.if-in, [data-acct="in"] .if-out { display: none; }
[data-acct="in"] .if-in { display: revert; }

.ac-form { max-width: 640px; margin-top: clamp(20px, 3vw, 34px); }
.ac-flag { margin-bottom: 14px; padding-left: 14px; border-left: 3px solid var(--teal); min-height: 0; }
.ac-flag:empty { display: none; }
.ac-flag:focus, #ac-who:focus { outline: none; }   /* focus is moved here by the script when the page changes state, for screen readers */
.ac-next { margin-top: 12px; color: var(--ink-2); max-width: 34em; }
.ac-with { margin-top: 14px; }                 /* the other ways to sign in, when they are switched on */
.ac-next + .ac-with { margin-top: 26px; }
/* "Continue with Google": Google's own rules for the button (its mark in its own colors, the words in sentence case,
   and these fills, strokes and text colors: dark on the carbon stock, light on paper). Do not restyle it to match
   the site's other buttons. */
.ac-google { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 20px 0 14px; border: 1px solid #8e918f; border-radius: 4px; background: #131314; color: #e3e3e3; font: inherit; font-weight: 600; font-size: 1rem; letter-spacing: 0; text-transform: none; cursor: pointer; }
.ac-google svg { flex: none; }
.ac-google:hover { background: #1f1f20; }
.ac-google:disabled { opacity: .6; cursor: default; }
:root[data-theme="light"] .ac-google { background: #fff; border-color: #747775; color: #1f1f1f; }
:root[data-theme="light"] .ac-google:hover { background: #f5f5f5; }

.ac-what h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.08; margin: .3em 0 .7em; }
.ac-what .plain span { display: block; }
.ac-what .plain .link { display: inline-block; margin-top: 4px; padding: 4px 0; }
.ac-acts { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 28px; }
.ac-acts + .note { margin-top: 14px; }
.ac-fine { margin-top: 6px; color: var(--ink-3); font-size: .86rem; max-width: 38em; }
.ac-back { margin-top: 4px; }
.ac-back button { background: none; border: 0; padding: 4px 0; }   /* a button that reads as a link, like the others on this page */
.ac-end > button { background: none; border-top: 0; border-left: 0; border-right: 0; padding: 0 0 6px; }

.ac-end { margin-top: clamp(40px, 6vw, 72px); padding-top: 20px; border-top: 1px solid var(--line-2); }
.ac-end__box { margin-top: 18px; padding: 20px 22px 22px; border: 2px solid var(--ink); border-radius: 14px; max-width: 40em; }
.ac-end__box h2 { font: 700 1.35rem/1.2 var(--display); margin-bottom: .5em; }
.ac-end__box p + p { margin-top: .7em; }
.ac-end__box:focus { outline: none; }

/* the name question (under the line that says who is signed in) and "Your profile" (the first section) */
.ac-name { max-width: 40em; background: var(--stock); }
.ac-name h2:focus { outline: none; }   /* focus is moved here when the question shows, for screen readers */
.ac-name .ac-acts, .ac-pf .ac-acts { margin-top: 22px; }
.ac-name .ac-fine { margin-top: 12px; }
.ac-name-done:empty { display: none; }
/* "I'm 13 or older" (profile_age_v1): a real checkbox, never ticked for the person, big enough for a thumb */
.ac-age { margin-top: 18px; }
.ac-check { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 700; cursor: pointer; }
.ac-check input { width: 24px; height: 24px; margin: 0; accent-color: var(--teal); flex: none; }
.ac-age .ac-fine { margin-top: 2px; }
.ac-name-done { margin-top: 10px; }
.ac-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
.ac-pair .field-row, .ac-one .field-row { margin-top: 16px; }
.ac-name input, .ac-pf input { min-height: 48px; }
.ac-pf input[type="url"] {
  width: 100%; background: transparent; color: var(--ink); border: 0; border-bottom: 2px solid var(--ink-3); border-radius: 0;
  font: 500 1rem/1.3 var(--sans); padding: .75em .1em;
}
.ac-name input[aria-invalid="true"], .ac-pf input[aria-invalid="true"] { border-bottom-style: dashed; border-color: var(--ink); }
.ac-name .btn, .ac-pf .btn { min-height: 48px; }
.ac-linkbtn { min-height: 48px; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }   /* a button that reads as a link, like the page's others */
.ac-linkbtn:disabled { opacity: .55; cursor: default; }
.ac-pf { padding-bottom: clamp(30px, 4vw, 46px); margin-bottom: clamp(30px, 4vw, 46px); border-bottom: 1px solid var(--line-2); }
.ac-pf h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.08; margin: .3em 0 .5em; }
.ac-pf__lines li { overflow-wrap: anywhere; }
.ac-pf__lines li + li { margin-top: 4px; }
.ac-pf__form { max-width: 40em; }
.ac-pf .note { margin-top: 12px; }
.ac-pf .note:empty { display: none; }
@media (max-width: 640px) { .ac-pair { grid-template-columns: minmax(0, 1fr); } }

/* the bar: a slip at the foot of the window, there until the visitor chooses */
.syncbar {
  position: fixed; z-index: 18; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(640px, calc(100vw - 32px)); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 12px 14px 14px 18px; background: var(--stock); color: var(--ink); border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: 5px 5px 0 var(--btn-shade-2); font-size: .92rem; font-weight: 600; line-height: 1.4;
}
.syncbar p { flex: 1 1 15em; }
.syncbar__acts { display: flex; flex-wrap: wrap; gap: 10px 12px; }
@media print { .syncbar { display: none !important; } }
/* the code from the sign-in email, typed here: signs in this browser wherever the email was opened */
.ac-code { display: grid; gap: 8px; margin-top: 18px; }
/* the check that a person is asking (captcha.js): a full row of the form's grid that takes no room (its row's gap is
   taken back) unless Cloudflare wants a click */
.signup .ir-check { grid-column: 1 / -1; margin-top: -14px; }
.signup .ir-check.is-asking { margin-top: 0; }
/* the two numbered steps of signing in with an email (the same rules are in sign-in.css) */
.ac-form .ir-steps { list-style: none; margin: 4px 0 22px; padding: 0; display: grid; gap: 10px; max-width: 34em; }
.ir-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--ink-3); line-height: 1.45; }
.ir-steps b { color: inherit; }
.ir-steps__n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); font: 800 .82rem/1 var(--sans); }
.ir-steps li.is-now { color: var(--ink); }
.ir-steps li.is-now .ir-steps__n { border-color: var(--teal); color: var(--teal); }
.ir-steps li.is-done .ir-steps__n { border-color: var(--teal); background: var(--teal); color: var(--stock); }
#ac-form + .ac-with { margin-top: 22px; }
.ac-code label { font: 800 .68rem/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.ac-code__row { display: flex; flex-wrap: wrap; gap: 10px; }
.ac-code input { width: 9.5em; min-height: 48px; padding: 0 14px; border: 2px solid var(--line-2); border-radius: 10px; background: var(--stock-2); color: var(--ink); font: 700 1.25rem/1 var(--sans); letter-spacing: .32em; }
.ac-code input:focus-visible { border-color: var(--teal); outline: none; }
.ac-code input[aria-invalid="true"] { border-color: #e0605a; }
.ac-code .btn { min-height: 48px; }
