/* Visitor account page: /account */

.account-page { max-width: 520px; margin: 0 auto; padding: 72px 0 90px; }
.account-heading { margin: 0 0 28px; text-align: center; }
.account-heading .eyebrow { margin-bottom: 12px; }
.account-heading h1 { margin: 0 auto; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -.045em; }

.account-tabs { display: flex; gap: 6px; margin: 0 0 14px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: #faf9ff; }
.account-tabs a { flex: 1; padding: 10px 12px; border-radius: 7px; color: var(--muted); font-size: 14px; font-weight: 700; text-align: center; }
.account-tabs a:hover { color: var(--purple); }
.account-tabs a.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(20, 17, 30, .08); }

.account-card { margin: 0 0 18px; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 4px 18px rgba(20, 17, 30, .035); }
.account-card h2 { margin: 0 0 16px; font-size: 22px; letter-spacing: -.02em; }
.account-card label { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 700; }
.account-card label:first-of-type { margin-top: 0; }
.account-card input[type="text"],
.account-card input[type="email"],
.account-card input[type="password"] { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; outline: none; }
.account-card input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(116, 27, 255, .12); }

.account-hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.account-text { margin: 0; color: var(--muted); line-height: 1.7; }

.account-button { display: inline-flex; align-items: center; justify-content: center; margin-top: 22px; padding: 13px 20px; border: 1px solid var(--purple); border-radius: 7px; background: var(--purple); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.account-button:hover { opacity: .92; }
.account-button.secondary { background: #fff; color: var(--purple); }
form .account-button { width: 100%; }

.account-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.account-switch { margin: 18px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.account-switch a { color: var(--purple); font-weight: 700; }

.account-details { display: grid; gap: 10px; margin: 0; }
.account-details div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #faf9ff; }
.account-details dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.account-details dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.account-message { margin: 0 0 18px; padding: 13px 16px; border-radius: 9px; font-size: 14px; }
.account-message p { margin: 0; }
.account-message p + p { margin-top: 4px; }
.account-message.success { background: #e8f7ef; color: #087443; }
.account-message.error { background: #fff0ef; color: #b42318; }

/* Hidden from people; spam bots fill it in. */
.account-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Account item in the main menu */
.main-navigation > a.nav-account.active { color: var(--purple); border-color: var(--purple); }

@media (max-width: 760px) {
    .account-page { padding: 42px 0 60px; }
    .account-card { padding: 22px 18px; }
    .account-details div { flex-direction: column; gap: 2px; }
    .account-details dd { text-align: left; }
}
.nav-dropdown-toggle.active { color: var(--purple); }

/* Notice: email not confirmed yet */
.account-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #f3d38b; border-radius: 9px; background: #fff8e6; color: #7a4b00; font-size: 14px; line-height: 1.6; }
.account-notice p { flex: 1 1 260px; margin: 0; }
.account-notice a { color: inherit; font-weight: 700; text-decoration: underline; }
.account-link-button { padding: 8px 14px; border: 1px solid #d9a93a; border-radius: 7px; background: #fff; color: #7a4b00; font: inherit; font-weight: 700; cursor: pointer; }
.account-link-button:hover { background: #fff3d1; }
.account-badge { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 99px; background: #fff3d1; color: #7a4b00; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* Edit profile */
.account-section-title { margin-top: 30px !important; padding-top: 24px; background: var(--divider-mark) center top / 16px 13px no-repeat, var(--divider-line) center 6px / 100% 2px no-repeat; }
.account-label-spaced { margin-top: 18px !important; }
.account-card textarea,
.account-card input[inputmode="url"] { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; outline: none; }
.account-card textarea { min-height: 120px; line-height: 1.6; resize: vertical; }
.account-card textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(116, 27, 255, .12); }
.account-card input[type="file"] { max-width: 100%; font-size: 14px; }
.account-card label.account-check { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-weight: 400; }
.profile-photo-field { display: flex; align-items: center; gap: 18px; }
.profile-photo-field > div { min-width: 0; }

/* Profile photo, also used on the public profile */
.profile-avatar { flex: none; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: #f1edff; }
.profile-avatar-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--purple); font-size: 36px; font-weight: 800; }
.profile-avatar-large { width: 140px; height: 140px; font-size: 56px; }

/* Public profile: /u/<username> */
.profile-card { padding: 40px 28px; text-align: center; }
.profile-card .profile-avatar { margin: 0 auto 18px; display: flex; }
.profile-name { margin: 0; font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -.035em; overflow-wrap: anywhere; }
.profile-username { margin: 6px 0 0; color: var(--muted); font-weight: 700; }
.profile-bio { margin: 22px 0 0; line-height: 1.7; text-align: left; overflow-wrap: anywhere; }
.profile-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.profile-links a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: #faf9ff; color: var(--purple); font-size: 14px; font-weight: 700; }
.profile-links a:hover { border-color: var(--purple); }
.profile-since { margin: 24px 0 0; color: var(--muted); font-size: 13px; }
.profile-card .account-button { width: auto; }

@media (max-width: 760px) {
    .profile-photo-field { align-items: flex-start; }
    .profile-avatar { width: 64px; height: 64px; font-size: 28px; }
    .profile-avatar-large { width: 112px; height: 112px; font-size: 46px; }
    .profile-card { padding: 30px 18px; }
}

/* Contact page: /contact */
.contact-intro { max-width: 440px; margin: 16px auto 0; color: var(--muted); line-height: 1.7; }
.account-optional { color: var(--muted); font-weight: 400; }
.contact-thanks { text-align: center; }
.contact-thanks .account-button { width: auto; }

/* Patch check under the contact form (assets/js/patch-check.js) */
.patch-check { margin: 22px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.patch-check legend { float: left; width: 100%; margin: 0 0 4px; padding: 0; font-size: 14px; font-weight: 700; }
.patch-task { display: none; clear: both; margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.patch-chip { display: inline-block; margin-left: 4px; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 4px; color: var(--ink); font-size: 15px; letter-spacing: .08em; }
.patch-stage { display: none; position: relative; max-width: 340px; }
.patch-ready .patch-stage, .patch-ready .patch-task { display: block; }
.patch-stage canvas { display: block; width: 100%; height: auto; border-radius: 6px; touch-action: none; -webkit-tap-highlight-color: transparent; }
.patch-stage canvas.grab { cursor: grab; }
.patch-stage canvas.grabbing { cursor: grabbing; }
.patch-stage .kb { position: absolute; transform: translate(-50%, -50%); padding: 0; border: 0; border-radius: 50%; background: transparent; color: transparent; font-size: 1px; pointer-events: none; }
.patch-stage .kb:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.patch-status { display: flex; align-items: center; gap: 8px; min-height: 22px; margin: 8px 0 0; font-size: 14px; font-weight: 700; }
.patch-status:empty { display: none; }
.patch-status.info { color: var(--muted); font-weight: 400; }
.patch-status.ok { color: #087443; }
.patch-status.bad { color: #b42318; }
.patch-icon { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border: 2px solid currentColor; border-radius: 50%; font-size: 12px; line-height: 1; }
.patch-fallback label { margin-top: 0; font-weight: 400; color: var(--muted); }
.patch-fallback input { max-width: 200px; text-transform: uppercase; }
.patch-alt { margin: 8px 0 0; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.patch-alt:hover { color: var(--purple); }
.patch-ready .patch-fallback { margin-top: 10px; }

/* Delete my account (folded away) */
.account-danger { border-color: #f3c3be; }
.account-danger summary { color: #b42318; font-weight: 700; cursor: pointer; }
.account-danger[open] summary { margin-bottom: 14px; }
.account-button-danger { border-color: #b42318; background: #b42318; }

.account-privacy { margin-top: 16px; }
.account-privacy a,
.account-text a { color: var(--purple); font-weight: 700; }

/* Privacy policy: /privacy */
.legal-page { max-width: 760px; }
.legal-card { line-height: 1.75; }
.legal-card h2 { margin: 30px 0 10px; font-size: 20px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p, .legal-card ul { margin: 0 0 12px; }
.legal-card ul { padding-left: 22px; }
.legal-card li + li { margin-top: 4px; }
.legal-card a { color: var(--purple); font-weight: 700; }
.legal-license { margin: 0 0 12px; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .04); color: var(--muted); font: 12px/1.55 Consolas, 'Courier New', monospace; white-space: pre-wrap; }
.legal-updated { margin-top: 24px !important; color: var(--muted); font-size: 13px; }
.legal-card table { width: 100%; margin: 0 0 12px; border-collapse: collapse; font-size: 14px; }
.legal-card th, .legal-card td { padding: 9px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-card th { background: #faf9ff; }
.legal-table-wrap { overflow-x: auto; }

/* Log in with Google */
.google-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 12px 18px; border: 1px solid #dadce0; border-radius: 7px; background: #fff; color: #1f1f1f; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.google-button:hover { border-color: #b8bcc4; background: #f8f9fa; }
.google-button svg { flex: none; }
.account-google { padding: 20px 28px; text-align: center; }
.account-google .account-hint { margin-top: 10px; }
.account-card form .google-button { margin-top: 6px; }
.account-card form .account-button.secondary { margin-top: 14px; }
.account-text-spaced { margin-bottom: 16px; }
.account-or { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; color: var(--muted); font-size: 13px; }
.account-or::before, .account-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Contact page: logged-in visitors can also message Darc Sector on the site. */
.contact-inbox { text-align: center; }
.contact-inbox .account-button { margin-top: 18px; }
.contact-inbox-or { margin-top: 14px; }
