/* The shared website owns the palette, typefaces and wordmark. */
/* Clerk uses --accent internally; resolve our action color before that scope. */
:root { --portal-action: var(--accent); }
body { font-size: 1.0625rem; transition: background-color 150ms ease-out, color 150ms ease-out; }
.personal-actions button, #retry { font: inherit; color: var(--accent); background: transparent; border: 1px solid var(--rule); border-radius: 5px; padding: .6rem 1rem; min-height: 44px; cursor: pointer; }
.personal-actions button:focus-visible, #retry:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.portal-header { max-width: 1200px; margin: auto; padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.personal-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.js:not([data-app-ready]) .personal-actions { visibility: hidden; }
.personal-actions .theme-toggle { justify-content: center; border: 0; border-radius: 8px; padding: 0; width: 44px; height: 44px; background: transparent; color: var(--ink-2); }
.personal-actions .theme-toggle:hover { background: var(--paper-2); color: var(--ink); }
.theme-toggle svg { width: 20px; height: 20px; }
.account { position: relative; }
.personal-actions .account-trigger { display: flex; align-items: center; gap: .35rem; padding: 2px; border: 0; border-radius: 24px; color: var(--ink-2); }
.account-trigger > svg { width: 14px; height: 14px; }
.account-avatar { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper-2); color: var(--ink); font-size: .8rem; font-weight: 600; letter-spacing: .025em; }
.account-trigger:hover .account-avatar, .account-trigger[aria-expanded="true"] .account-avatar { border-color: var(--portal-action); background: var(--sheet); }
.account-menu { position: absolute; z-index: 10; right: 0; top: calc(100% + .65rem); width: min(290px, calc(100vw - 2rem)); background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 2px 5px rgb(var(--shadow) / .08), 0 12px 32px -8px rgb(var(--shadow) / .24); }
.account-identity { padding: 1rem 1.15rem; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.account-identity strong, .account-identity span { display: block; }
.account-identity strong { font-size: 1rem; font-weight: 600; color: var(--ink); }
.account-identity span { font-size: .875rem; color: var(--ink-2); margin-top: .15rem; }
.account-options { padding: .4rem; }
.personal-actions .account-options button { display: flex; align-items: center; gap: .75rem; width: 100%; border: 0; border-radius: 7px; padding: .65rem .75rem; text-align: left; color: var(--ink); font-size: .95rem; }
.account-options button svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ink-2); }
.personal-actions .account-options button:hover { background: var(--paper-2); }
.personal-actions .account-options button:focus-visible { outline-offset: -2px; }
.personal-actions .account-options button:disabled { opacity: .6; cursor: wait; }
#account-error { padding: 0 1.15rem 1rem; margin: 0; color: var(--error); font-size: .875rem; }
main { max-width: 600px; margin: 3rem auto; padding: 0 1.5rem; min-height: 55vh; }
h1 { font-weight: 500; font-size: clamp(2rem, 5vw, 2.6rem); margin: .5rem 0 1rem; }
h2 { font-weight: 500; font-size: 1.7rem; margin: .5rem 0 1rem; }
.eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 0; }
.lede { color: var(--ink-2); font-size: 1.125rem; margin-bottom: 2rem; }
.card { background: var(--sheet); padding: clamp(1.5rem, 5vw, 2rem); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 2px 4px rgb(var(--shadow) / .08), 0 8px 24px -8px rgb(var(--shadow) / .18); margin: 1.5rem 0; }
.card p { max-width: 58ch; }
/* Reserve the initial sign-in footprint; never show the half-mounted provider UI. */
.js #access-card { position: relative; min-height: 30rem; }
.js #access-card[aria-busy="true"] #access-intro { position: absolute; inset: clamp(1.5rem, 5vw, 2rem); }
.js #access-card[aria-busy="true"] #sign-in { visibility: hidden; }
#sign-in:empty { display: none; }
#sign-in { min-width: 0; }
#sign-in .cl-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: .5rem; box-shadow: none; }
.cl-userProfile-root .cl-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: none; }
#access-intro p:last-child { margin-bottom: 0; }
#projects { padding-left: 1.25rem; }
#projects li { padding: .5rem 0; }
.help, .portal-footer { color: var(--ink-3); font-size: .95rem; }
.help { margin-top: 2rem; }
.portal-footer { max-width: 1152px; margin: auto; padding: 1.5rem; border-top: 1px solid var(--rule); }
@media (max-width: 600px) {
  .portal-header { padding: 1rem; gap: .75rem; }
  .personal-actions { flex-wrap: wrap; }
  main { margin: 2rem auto; padding: 0 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { body { transition: none; } }
