/* TinyTools — account.css
   Loaded only on /account/. Uses the shared design tokens, .panel, .field, .input, .btn and .alert-style
   patterns so the page matches the rest of the site in both themes. */

.auth-main {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(24px, 6vh, 56px) 16px 48px;
}
.auth-wrapper { width: 100%; max-width: 440px; }
.auth-heading { text-align: center; margin: 0 0 22px; }
.auth-heading .eyebrow { margin-bottom: 10px; }
.auth-heading h1 { font-size: clamp(1.65rem, 5.5vw, 2.1rem); line-height: 1.15; margin: 0 0 10px; }
.auth-heading p:last-child { color: var(--text-2); margin: 0; font-size: 0.97rem; }
.auth-card { padding: clamp(18px, 5vw, 26px); }
.auth-main .noscript-box { margin-bottom: 16px; }

/* Tabs */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); }
.auth-tabs.is-single { grid-template-columns: 1fr; }
.auth-tab { min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; transition: background-color 0.18s, color 0.18s; }
.auth-tab:hover { color: var(--text); }
.auth-tab.active, .auth-tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.auth-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Views */
.form-view { display: none; }
.form-view.active { display: block; }
.auth-card [hidden] { display: none !important; }
.form-title { margin: 0 0 6px; font-size: 1.2rem; }
.form-title:focus { outline: none; }
.form-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.form-description { margin: 0 0 18px; color: var(--text-2); font-size: 0.92rem; }

/* Password field with Show / Hide */
.input-wrap { position: relative; }
.password-input { width: 100%; padding-right: 76px; }
.show-password { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); min-width: 64px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--accent-text); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.show-password:hover { background: var(--accent-soft); }
.show-password:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.form-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin: 2px 0 18px; }
.form-options .hint { font-size: 0.82rem; }
.text-link, .back-button { border: 0; padding: 0 4px; min-height: 44px; background: transparent; color: var(--accent-text); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; border-radius: 8px; }
.text-link:hover, .back-button:hover { text-decoration: underline; }
.text-link:focus-visible, .back-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.back-button { display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 8px -4px; }
.back-button .icon-back { width: 18px; height: 18px; transform: rotate(180deg); }
.btn-block { display: flex; width: 100%; }

/* Messages (same colours as the tools' error and success states) */
.alert { display: none; margin: 0 0 16px; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; font-size: 0.92rem; line-height: 1.5; }
.alert.show { display: block; }
.alert.error { color: var(--text); background: var(--error-soft); border-color: var(--error); }
.alert.success { color: var(--text); background: var(--success-soft); border-color: var(--success); }
.alert.info { color: var(--text); background: var(--bg-2); border-color: var(--border-strong); }

.terms { margin: 18px 0 0; color: var(--text-2); font-size: 0.82rem; line-height: 1.6; text-align: center; }

/* Signed-in view */
.account-info { padding: 6px 0 0; text-align: center; }
.avatar { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 14px; border: 1px solid var(--accent-line); border-radius: 50%; background: linear-gradient(135deg, var(--accent-soft), var(--violet-soft)); color: var(--accent-text); font-size: 1.6rem; font-weight: 700; }
.account-info h2 { margin: 0 0 6px; font-size: 1.25rem; overflow-wrap: anywhere; }
.account-info h2:focus { outline: none; }
.account-info h2:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.account-info p { overflow-wrap: anywhere; }
.account-info #account-email { margin: 0 0 20px; color: var(--text-2); }
.account-note { margin-top: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .auth-wrapper { animation: tt-fade 0.45s var(--ease) both; }
}

/* Notes under forms, recovery code, delete account */
.form-note { margin: 0 0 16px; font-size: 0.85rem; line-height: 1.55; }
.code-input { font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.code-input::placeholder { text-transform: none; }

.recovery-box { margin: 4px 0 20px; padding: 16px; text-align: left; border: 1px solid var(--accent-line); border-radius: 14px; background: var(--accent-soft); }
.recovery-box h3 { margin: 0 0 8px; font-size: 1.02rem; }
.recovery-box h3:focus { outline: none; }
.recovery-box h3:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.recovery-box p { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.55; }
.recovery-code { text-align: center; }
.recovery-code code { display: block; padding: 14px 10px; font-size: clamp(0.85rem, 4.3vw, 1.3rem); font-weight: 600; letter-spacing: 0.05em; white-space: nowrap; background: var(--bg); border: 1px dashed var(--accent-line); border-radius: 10px; user-select: all; overflow-wrap: anywhere; }
.recovery-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.recovery-actions .btn { flex: 1 1 140px; }

.btn-danger { color: var(--error); background: var(--error-soft); border-color: var(--error); }
.btn-danger:hover { color: var(--error); background: var(--error-soft); border-color: var(--error); filter: brightness(1.1); }
.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); text-align: center; }
.danger-link { color: var(--error); }
.danger-zone form { margin-top: 10px; padding: 16px; text-align: left; border: 1px solid var(--error); border-radius: 14px; background: var(--error-soft); }
.danger-zone h3 { margin: 0 0 8px; font-size: 1.02rem; }
.danger-zone p { margin: 0 0 14px; font-size: 0.9rem; line-height: 1.55; }
