:root {
  color-scheme: light;
  --ink: #352414;
  --muted: #756654;
  --accent: #7a3a0c;
  --accent-strong: #5b2909;
  --gold: #efad22;
  --gold-soft: #fff1c8;
  --danger: #a32424;
  --line: #eadfc8;
  --paper: #fff;
  --wash: #fffaf0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 85% 10%, #ffe7a3 0, transparent 34%), var(--wash);
  color: var(--ink);
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--accent); }
.back-link { display: flex; width: fit-content; align-items: center; gap: .35rem; margin-bottom: 16px; font-weight: 750; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgb(122 58 12 / 35%); outline-offset: 3px; }

.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  background: rgb(255 255 255 / 90%);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: 20px; font-weight: 800; text-decoration: none; }
.brand-logo { display: block; flex: 0 0 38px; width: 38px; height: 38px; object-fit: contain; }
.site-header nav { display: flex; align-items: center; gap: 18px; }
.site-header nav a, .link-button { color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; }
.site-header nav a:hover, .site-header nav a:focus-visible, .link-button:hover, .link-button:focus-visible { color: var(--accent); text-decoration: underline; }
.account-menu { position: relative; }
.account-menu summary { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary img { display: block; width: 24px; height: 24px; }
.account-menu summary:hover, .account-menu[open] summary { border-color: var(--accent); background: var(--wash); }
.account-popover { position: absolute; z-index: 80; top: calc(100% + 12px); right: 0; display: grid; width: min(310px, calc(100vw - 32px)); padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 22px 60px rgb(53 36 20 / 18%); }
.account-popover-heading { display: grid; padding: 10px 12px 13px; border-bottom: 1px solid var(--line); }
.account-popover-heading span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.site-header nav .account-popover > a { width: 100%; padding: 11px 12px; border-radius: 9px; color: var(--ink); font-weight: 720; text-align: left; text-decoration: none; }
.site-header nav .account-popover > a:hover, .site-header nav .account-popover > a:focus-visible { color: var(--accent); background: var(--wash); text-decoration: none; }
.site-header nav .account-popover > .account-menu-logout { color: var(--danger); }
.link-button { padding: 0; border: 0; background: none; cursor: pointer; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0; }
.hero { max-width: 760px; padding: 70px 0 84px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.hero h1, .login-card h1, .account-card h1 { margin: 10px 0 14px; font-size: clamp(42px, 7vw, 78px); line-height: 1.02; letter-spacing: -.045em; }
.hero p { max-width: 650px; color: var(--muted); font-size: 21px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

.button, button.primary, button.secondary, button.danger { display: inline-flex; justify-content: center; border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; background: #fff; color: var(--ink); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.button.primary, button.primary { border-color: #d18b0f; background: linear-gradient(145deg, #f7c452, var(--gold)); color: #3c2208; box-shadow: 0 8px 24px rgb(168 94 10 / 18%); }
.button.primary:hover, button.primary:hover { border-color: var(--accent); background: linear-gradient(145deg, #ffd46e, #f4b42e); }
.button.secondary:hover, button.secondary:hover { border-color: var(--accent); background: var(--gold-soft); }
.button.danger, button.danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.button.danger:hover, button.danger:hover { border-color: #7f1d1d; background: #7f1d1d; }
.service-card, .login-card, .account-card, .danger-card { border: 1px solid var(--line); border-radius: 20px; background: rgb(255 255 255 / 94%); box-shadow: 0 18px 60px rgb(104 58 12 / 9%); }
.service-card { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 24px; }
.service-card h2, .snapshot h3 { margin: 0; }
.service-card p { margin: 5px 0 0; color: var(--muted); }
.service-card > a { color: var(--accent); font-weight: 800; text-decoration: none; }
.service-card > a:hover, .service-card > a:focus-visible { text-decoration: underline; }
.service-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--gold-soft); color: var(--accent); font-size: 24px; }
.login-card, .account-card { max-width: 560px; margin: 30px auto; padding: 36px; }
.account-card.wide-card { max-width: 760px; }
.login-card h1, .account-card h1 { font-size: 42px; }
.stack { display: grid; gap: 10px; margin-top: 24px; }
.stack label { font-weight: 750; }
.stack input { width: 100%; border: 1px solid #d7c8ac; border-radius: 10px; padding: 12px 13px; font: inherit; }
.stack input:focus { outline: 3px solid rgb(239 173 34 / 28%); border-color: var(--accent); }
.stack button { margin-top: 10px; }
.legal-acceptance { margin-top: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fffaf0; }
.legal-acceptance p { margin: 0 0 8px; font-weight: 700; }
.legal-acceptance ul { margin: 0 0 14px; padding-left: 22px; }
.legal-acceptance .checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-weight: 650; }
.stack .legal-acceptance input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; padding: 0; }
.muted { color: var(--muted); }
.error, .notice { border-radius: 10px; padding: 12px 14px; }
.error { background: #fff0f0; color: #842020; }
.notice { margin-bottom: 20px; background: #eaf7ee; color: #245d35; }
.account-card dl { display: grid; gap: 12px; }
.account-card dl div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.account-card dt { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.account-card dd { margin: 3px 0 0; font-weight: 700; }
.snapshot { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.passkey-list-card h2, .session-list-card h2 { margin: 8px 0 0; }
.passkey-list-card h3 { margin: 34px 0 0; font-size: 18px; }
.session-list { margin: 22px 0 0; padding: 0; list-style: none; }
.session-list li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border-top: 1px solid var(--line); }
.session-list li:first-child { border-top: 0; }
.session-list .link-button { white-space: nowrap; }
.session-list span { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
.session-list p { margin: 8px 0 0; color: var(--accent); font-size: 14px; font-weight: 650; }
.session-list .current-session { margin: 16px 0; border: 1px solid #e0b75e; border-radius: 14px; background: #fff8e5; }
.danger-card { max-width: 760px; margin: 30px auto; padding: 28px; border-color: #efcaca; }
.danger-card h2 { margin-top: 0; }
.site-footer { min-height: 76px; padding: 18px max(24px, calc((100vw - 1120px) / 2)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: 13px; }
.site-footer p { margin: 0; justify-self: end; }
.site-footer p a { color: inherit; text-decoration: none; }
.site-footer p a:hover, .site-footer p a:focus-visible, .footer-legal:hover, .footer-legal:focus-visible { color: var(--accent); text-decoration: underline; }
.footer-language-switcher { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-language-switcher a, .footer-legal { color: var(--muted); text-decoration: none; }
.footer-language-switcher a, .footer-language-switcher span { padding: 5px 9px; border-radius: 999px; }
.footer-language-switcher [aria-current="page"] { color: var(--accent-strong); background: var(--gold-soft); font-weight: 800; }
.footer-legal { justify-self: center; font-weight: 750; }
@media (prefers-reduced-motion: no-preference) {
  .container > * { animation: accounts-section-arrive 400ms cubic-bezier(.2,.75,.25,1) both; }
}
@keyframes accounts-section-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (max-width: 680px) { .site-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }.site-footer p, .footer-legal { justify-self: center; }.footer-language-switcher { justify-content: center; } }

@media (max-width: 640px) {
  .site-header { height: auto; min-height: 66px; padding: 12px 18px; }
  .site-header nav { gap: 10px; font-size: 14px; }
  .container { width: min(calc(100% - 28px), 1120px); padding: 34px 0; }
  .hero { padding: 44px 0 58px; }
  .hero p { font-size: 18px; }
  .service-card { grid-template-columns: auto 1fr; }
  .service-card > a { grid-column: 2; }
  .session-list li { align-items: flex-start; flex-direction: column; }
  .login-card, .account-card { padding: 24px; }
}

/* Native OAuth uses the same credentials and safeguards in a quiet sheet. */
.native-sign-in { min-height: 100svh; display: flex; flex-direction: column; }
.native-sign-in .container { flex: 1; display: grid; align-content: center; width: min(480px, calc(100% - 32px)); padding: 24px 0; }
.native-sign-in .login-card { width: 100%; margin: 0; padding: clamp(24px, 6vw, 36px); }
.native-sign-in .login-card h1 { font-size: clamp(30px, 8vw, 40px); }
.sign-in-logo { display: block; object-fit: contain; margin-bottom: 18px; }
.native-sign-in .eyebrow { font-size: 11px; }
.native-sign-in .login-card > p { font-size: 14px; }
.native-sign-in-footer { min-height: auto; display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; padding: 12px 20px; background: transparent; border-top: 0; }
.native-sign-in-footer > p { display: none; }
.stack .trusted-device { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.stack .trusted-device input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) {
  a, button, .account-menu summary { transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
}

/* Shared account menu: email, organization/account links, left-aligned logout. */
.account-popover { text-align: left; }
.account-popover-heading span { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.account-popover > a { display: block; text-align: left; line-height: 1.4; }
.account-popover > a > small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); }
.account-popover form { display: block; margin: 0; }
.account-popover .account-menu-logout { display: block; width: 100%; justify-content: flex-start; text-align: left; }

/* Cross-service navigation: same layout, each site's own palette. */
.services-menu { position: relative; flex: 0 0 auto; margin: 0; padding: 0; border: 0; }
.services-menu > summary { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 10px; border-radius: 10px; cursor: pointer; list-style: none; font-weight: 650; color: inherit; }
.services-menu > summary::-webkit-details-marker { display: none; }
.services-menu > summary:hover, .services-menu[open] > summary { background: var(--blue-soft, var(--wash, var(--ice, #f7f4fb))); }
.services-popover { position: absolute; z-index: 90; top: calc(100% + 10px); right: 0; width: min(290px, calc(100vw - 32px)); padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px rgb(30 40 65 / 14%); }
.services-popover > a { display: block; padding: 12px; border-radius: 10px; text-align: left; text-decoration: none; color: inherit; }
.services-popover > a:hover { background: var(--blue-soft, var(--wash, var(--ice, #f7f4fb))); }
.services-popover strong { display: block; font-weight: 700; }
.services-popover small { display: block; margin-top: 3px; font-size: 13px; font-weight: 400; color: var(--muted); }
.header-create-account { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px; border: 1px solid transparent; border-radius: 12px; background: var(--blue, var(--accent, var(--teal-dark, #643662))); color: #fff !important; font-weight: 700; text-decoration: none !important; white-space: nowrap; }
.header-create-account:hover { filter: brightness(.94); }
[data-signup][hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .services-menu summary, .services-popover a, .header-create-account { transition: background-color 160ms ease, color 160ms ease, filter 160ms ease; } }

@media (max-width: 640px) { .site-header { height: auto; flex-wrap: wrap; gap: 10px; } .site-header nav { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; } }

/* The visible attribution on protected forms replaces the floating badge. */
.grecaptcha-badge { visibility: hidden !important; }
.login-card .recaptcha-note { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.verification-status { margin: 0; font-size: 14px; }
