/* Ages Below, the sign-in pages: a form at the gate. The materials are ages.css's, and every size that can play is a size these pages read at. No inline style anywhere: these pages' policy allows none. */

.account-gate { align-items: center; }

/* a slab of the gate's own dark, so the words stand on something at any crop of the art */
.account-card {
    width: min(27rem, calc(100vw - 32px));
    margin-block: 24px;
    padding: 26px 28px 24px;
    background: rgba(12, 11, 16, .9);
    border: 1px solid var(--rule);
}

.gate-copy.account-card h1 { margin: 0; font-size: clamp(2rem, 3.2vw, 2.6rem); }
.gate-copy.account-card p.account-lede { margin: 10px 0 18px; font-size: 1.1rem; line-height: 1.45; }
.account-address { font-weight: 500; color: var(--gold); overflow-wrap: anywhere; }

.account-form { display: grid; gap: 16px; margin-top: 18px; }
.account-lede + .account-form { margin-top: 0; }

.account-field { display: grid; gap: 6px; }
.account-field label { font: 400 1.05rem/1.2 var(--display); color: var(--bone); }
.account-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-label-row .account-link { font-size: 1.02rem; }

/* 17 px: under 16 a phone zooms the page when a field takes focus */
.account-field input {
    width: 100%; height: 48px; padding: 0 12px; border: 1px solid rgba(236, 229, 213, .34); border-radius: 0;
    background: #08080c; color: var(--bone); font: 400 1.0625rem/1.2 var(--text);
    -webkit-appearance: none; appearance: none;
}
/* a keyboard takes half a phone: a field that takes focus comes up clear of its edge */
.account-field input { scroll-margin-block: 24px; }
.account-field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.account-field input[aria-invalid="true"] { border-color: var(--ember); }

.account-password { position: relative; }
.account-password input { padding-right: 72px; }
.account-show {
    position: absolute; top: 2px; right: 2px; min-width: 62px; height: 44px; padding: 0 10px; border: 0; background: none;
    color: var(--gold); font: 400 1rem/1 var(--text); cursor: pointer;
}
.account-show:hover { text-decoration: underline; text-underline-offset: 3px; }

.account-hint { font-size: 1rem; line-height: 1.35; color: var(--ash); }
.gate-copy.account-card p.account-hint { margin: 0; }

/* the ember, lifted so it reads on the slab at 4.5:1 and more */
.gate-copy.account-card p.account-error { margin: 0; color: #ffb37a; font-size: 1.02rem; line-height: 1.35; }

/* the longest words here are the wallet's, and on the narrowest phone they must stay on the stone */
.account-wide { display: block; width: 100%; padding-inline: .5em; text-align: center; white-space: normal; }

/* Google's dark button, to its own rules: its mark in its own colours, its own words, its fill, line and text, and a system face, since a page with a password box loads no font from anywhere */
.account-google {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; margin-top: 18px; padding: 8px 12px;
    background: #131314; border: 1px solid #8e918f; border-radius: 4px; color: #e3e3e3;
    font: 500 1rem/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; text-align: center; text-decoration: none;
}
.account-lede + .account-google, .account-said + .account-google { margin-top: 0; }
.account-google:hover { background: #202124; color: #e3e3e3; }
.account-google:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.account-google-mark { flex: none; }

/* leaving the site takes a moment, and the button says so while it does */
.account-google[aria-busy="true"] { cursor: progress; opacity: .85; }
.account-google[aria-busy="true"]::after {
    content: ""; flex: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: account-turn .8s linear infinite;
}
@keyframes account-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .account-google[aria-busy="true"]::after { animation: none; }
}

.gate-copy.account-card p.account-terms { margin: 8px 0 0; font-size: 1rem; line-height: 1.35; color: var(--ash); }

/* what the road has to say on arrival: read before anything else on the card */
.gate-copy.account-card p.account-said { margin: 14px 0 16px; padding: 10px 12px; border-left: 3px solid var(--gold); background: rgba(255, 211, 77, .07); color: var(--bone); font-size: 1.05rem; line-height: 1.4; }

/* a number the player has to match later, so a plain face: the display face's old-style 1 reads as an I */
.gate-copy.account-card p.account-number {
    margin: 0 0 16px; color: var(--gold); letter-spacing: .08em;
    font: 600 2.4rem/1.1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-variant-numeric: lining-nums tabular-nums;
}

.account-or { display: flex; align-items: center; gap: 12px; color: var(--ash); font-size: 1rem; }
.gate-copy.account-card p.account-or { margin: 16px 0; }
.account-or::before, .account-or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.gate-copy.account-card p.account-then { margin: 16px 0 0; font-size: 1.05rem; color: var(--ash); }
.account-link { color: var(--bone); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.account-link:hover { color: var(--gold); }
/* the button carries the count for the eye. This line is for a screen reader, which hears it at the start and at the end and is not read every second */
.gate-copy.account-card p.account-wait { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* for a password manager only: out of sight and out of the tab order */
.account-for-managers { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

.enter[disabled] { cursor: default; }

/* a code is read off a phone a digit at a time, so each digit has room, and a plain face: the display face's old-style 1 reads as an I */
.account-field input.account-code {
    letter-spacing: .3em; text-align: center; font: 600 1.45rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-variant-numeric: lining-nums tabular-nums;
}
.account-field input.account-code-wide { letter-spacing: .08em; font-size: 1.15rem; }

.account-check { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--bone); font-size: 1.05rem; line-height: 1.3; cursor: pointer; }
.account-check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--gold); }

/* the sheet interrupts a page and hands it back, so it arrives as something laid over it, and only in answer to what was pressed */
.account-sheet { border-top: 3px solid var(--gold); animation: account-rise .22s ease-out both; }
@keyframes account-rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
    .account-sheet { animation: none; }
}

/* setup and recovery codes hold more than a form does */
.account-card-wide { width: min(33rem, calc(100vw - 32px)); }

.account-steps { display: grid; gap: 20px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: account-step; }
.account-steps > li { position: relative; padding-left: 38px; counter-increment: account-step; }
.account-steps > li::before {
    content: counter(account-step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--gold); border-radius: 50%;
    color: var(--gold); font: 600 .95rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.gate-copy.account-card .account-steps h2 { margin: 0 0 6px; font: 400 1.2rem/1.25 var(--display); color: var(--bone); }
.account-steps .account-form { margin-top: 8px; }

/* white on every theme: a scanner reads a dark code on a light field, and the picture carries its own quiet zone */
.account-qr { width: min(208px, 100%); margin: 10px 0 8px; background: #fff; }
.account-qr svg { display: block; width: 100%; height: auto; }

.account-manual summary { min-height: 44px; display: flex; align-items: center; color: var(--bone); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.gate-copy.account-card p.account-key {
    margin: 8px 0; padding: 10px 12px; background: #08080c; border: 1px solid var(--rule); color: var(--gold); overflow-wrap: anywhere; user-select: all;
    font: 500 1.02rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.account-small {
    min-height: 44px; padding: 0 14px; border: 1px solid rgba(236, 229, 213, .34); background: none; color: var(--bone); font: 400 1rem/1 var(--text); cursor: pointer;
}
.account-small:hover { border-color: var(--gold); color: var(--gold); }
.account-small:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.account-quiet-form { margin-top: 14px; }
.account-hint + .enter { margin-top: 14px; }
.account-actions { display: grid; gap: 10px; }
.account-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* the codes, in the order they were made, in a face where 0 and O cannot be confused. Two columns when they fit, and never a line broken inside a code */
.account-codes {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5em, 1fr)); gap: 6px 18px; margin: 14px 0 0; padding: 12px 14px; list-style: none; background: #08080c; border: 1px solid var(--rule);
    color: var(--gold); font: 500 1.06rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; user-select: all;
}

.account-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0 14px; font-size: 1.05rem; line-height: 1.35; }
.account-facts dt { color: var(--ash); }
.account-facts dd { margin: 0; color: var(--bone); overflow-wrap: anywhere; }

.gate-copy.account-card .account-list { display: grid; gap: 6px; margin: 0 0 16px; padding-left: 1.2em; list-style: disc; color: var(--bone); font-size: 1.05rem; line-height: 1.35; }
.gate-copy.account-card .account-list li::marker { color: var(--gold); }

/* 44 px to press, on a phone, and every link here is one */
@media (max-width: 760px), (pointer: coarse) {
    .account-link { display: inline-flex; align-items: center; min-height: 44px; }
    .gate-copy.account-card p.account-then { margin-top: 8px; }
    /* still 44 px to press, but a sentence's lines stay a sentence's lines: the margin takes the extra height back out of the line */
    .gate-copy.account-card p.account-terms .account-link { margin-block: -12px; }
}

@media (max-width: 760px) {
    /* the phone's gate stands its copy at the foot, so a form rises with the keyboard and stays on the screen */
    .account-gate { align-items: flex-end; }
    .account-card { width: 100%; margin: 0; padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); border-width: 1px 0 0; }
}

/* a phone on its side: no room to waste, and the keyboard takes half of it. Lane K6: at 844x390 the password field, the code field and the new address's field ended 13, 9 and
   13 px under a keyboard-sized viewport; these few pixels off the top bring each clear of it (a field stays 44 px), and scroll-margin stays for the browser's own scroll to the focused field */
@media (max-height: 560px) {
    .account-gate { align-items: flex-start; }
    .account-steps { gap: 12px; margin-top: 10px; }
    .account-qr { width: 168px; }
    .account-card { margin-block: 4px 12px; padding: 6px 18px 12px; }
    .gate-copy.account-card h1 { font-size: 1.55rem; }
    .gate-copy.account-card p.account-lede { margin: 4px 0 6px; font-size: 1.02rem; line-height: 1.35; }
    .account-form { gap: 8px; margin-top: 8px; }
    .account-field { gap: 4px; }
    .account-field input { height: 44px; }
    .account-show { top: 0; }
    .gate-copy.account-card p.account-or { margin: 8px 0; }
    .gate-copy.account-card p.account-said { margin: 8px 0 10px; padding: 6px 10px; }
    .account-google { margin-top: 10px; }
}

/* the wallet page: more to read than a form, so a little wider, and the key is the one long word on it */
.account-wallet { width: min(32rem, calc(100vw - 32px)); }
.gate-copy.account-card h2.account-subhead { margin: 10px 0 0; font: 400 1.25rem/1.2 var(--display); color: var(--bone); }
.account-list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--bone); font-size: 1.05rem; line-height: 1.4; }
.account-key { margin: 0; padding: 10px 12px; border: 1px solid var(--rule); background: #08080c; color: var(--gold); font: 400 .95rem/1.4 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.account-open { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.account-open li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; color: var(--bone); }
.account-open-cancel, .account-plain { min-height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer; font: inherit; }
.account-form button[disabled] { opacity: .55; cursor: default; }

/* lane K5: the account page's own sheets */
.gate-copy.account-card h2.account-sub { margin: 20px 0 8px; font: 400 1.25rem/1.25 var(--display); color: var(--bone); }
.account-activity { display: grid; gap: 0; margin: 0 0 16px; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.account-activity > li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.gate-copy.account-card .account-activity p { margin: 0; line-height: 1.35; }
.gate-copy.account-card .account-activity p.account-activity-what { color: var(--bone); font-size: 1.05rem; }
.gate-copy.account-card .account-activity p.account-activity-when { color: var(--ash); font-size: .98rem; overflow-wrap: anywhere; }
.enter.account-danger { background: #ffb37a; border-color: #ffb37a; color: #1a1007; }
a.account-small { display: inline-flex; align-items: center; text-decoration: none; }
