:root {
    color-scheme: light;
    --ink: #192231;
    --muted: #5d6877;
    --surface: #ffffff;
    --background: #f3f6f9;
    --line: #d7dee7;
    --primary: #155eef;
    --primary-dark: #0d47b5;
    --danger: #b42318;
    --focus: #f79009;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: var(--primary-dark); }
button, input { font: inherit; }
button, a { min-height: 2.75rem; }
.account-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 4rem); background: var(--surface); border-bottom: 1px solid var(--line); }
.account-header nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { font-weight: 750; color: var(--ink); text-decoration: none; }
.link-button { border: 0; background: none; color: var(--primary-dark); cursor: pointer; padding: .25rem; text-decoration: underline; }
.account-main { width: min(960px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) 0; }
.hero-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 .5rem 1.5rem rgb(25 34 49 / 5%); }
.hero-card { max-width: 720px; margin: 2rem auto; }
.page-heading { margin-bottom: 1.5rem; }
.eyebrow { color: var(--primary-dark); font-size: .8rem; font-weight: 750; letter-spacing: .08em; margin: 0 0 .5rem; text-transform: uppercase; }
h1, h2 { line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 0 0 1rem; }
.action-row, .panel-heading, .add-passkey-form { display: flex; align-items: end; gap: .75rem; flex-wrap: wrap; }
.primary-action, .secondary-action, .danger-action { display: inline-flex; align-items: center; justify-content: center; border-radius: .55rem; padding: .65rem 1rem; text-decoration: none; cursor: pointer; border: 1px solid transparent; font-weight: 700; }
.primary-action { background: var(--primary); color: white; }
.primary-action:hover { background: var(--primary-dark); }
.secondary-action { background: var(--surface); border-color: var(--line); color: var(--ink); }
.danger-action { background: white; border-color: #f3b4af; color: var(--danger); }
.panel { margin-top: 1.25rem; }
.panel-heading { justify-content: space-between; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1rem; }
.add-passkey-form label, .profile-panel label { display: block; font-weight: 650; font-size: .9rem; }
.add-passkey-form input, .profile-panel input { border: 1px solid #aab5c3; border-radius: .45rem; min-height: 2.75rem; padding: .5rem .65rem; }
.passkey-list { list-style: none; padding: 0; margin: 0; }
.passkey-item { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.passkey-item:last-child { border-bottom: 0; }
.passkey-item span, .passkey-item time { display: block; color: var(--muted); font-size: .9rem; }
.status-message { min-height: 1.5rem; margin: .75rem 0; color: var(--muted); }
.status-message.error { color: var(--danger); }
.status-message.success { color: var(--success, #176b42); }
.empty-state, .notice { background: #f7f9fc; border-left: .25rem solid var(--primary); padding: 1rem; }
.profile-grid { display: grid; grid-template-columns: minmax(10rem, .35fr) 1fr; gap: .6rem 1rem; margin: 0; }
.profile-grid dt { color: var(--muted); font-weight: 650; }
.profile-grid dd { margin: 0; overflow-wrap: anywhere; }
.profile-panel form { display: grid; gap: .5rem; max-width: 32rem; margin-bottom: 1.5rem; }
.readonly-fields { padding-top: 1rem; border-top: 1px solid var(--line); }
:focus-visible { outline: .2rem solid var(--focus); outline-offset: .15rem; }
@media (max-width: 640px) {
    .account-header { align-items: flex-start; flex-direction: column; }
    .account-header nav { gap: .75rem; }
    .panel-heading, .passkey-item { align-items: stretch; flex-direction: column; }
    .add-passkey-form { align-items: stretch; flex-direction: column; }
    .profile-grid { grid-template-columns: 1fr; gap: .15rem; }
    .profile-grid dt { margin-top: .65rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
