:root {
    color-scheme: light;
    --ink: #173451;
    --muted: #50627a;
    --line: #ccd7e4;
    --blue: #1455cc;
    --blue-hover: #0e46b1;
    --surface: #fff;
    --page: #f4f7fb;
    --error: #a61b1b;
}

* { box-sizing: border-box; }

body {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: clamp(20px, 5vw, 48px);
    place-items: center;
    background: var(--page);
    color: var(--ink);
    font: 16px/1.55 Arial, Helvetica, sans-serif;
}

.access-card {
    width: min(100%, 480px);
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid #dce5f3;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 18px 48px rgb(23 52 81 / 8%);
}

.brand { display: inline-block; margin-bottom: 30px; border-radius: 4px; }
.brand img { display: block; width: 112px; height: 52px; object-fit: contain; object-position: left center; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
h1 { margin: 0 0 8px; font-size: clamp(28px, 6vw, 36px); line-height: 1.2; letter-spacing: -.025em; }
.intro { margin: 0 0 24px; color: var(--muted); }
.intro strong, .workspace-email { overflow-wrap: anywhere; }

.session-status { min-height: 24px; margin: 0 0 18px; color: var(--muted); }
.login-form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 700; }
.field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #aebed0;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
.field select {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid #aebed0;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
.field input:hover { border-color: #7189a5; }
.field input:focus-visible, .field select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 3px solid #1455cc;
    outline-offset: 3px;
}
.field small { color: var(--muted); }

.password-control { display: flex; gap: 8px; }
.password-control input { flex: 1; min-width: 0; }
.password-toggle {
    min-width: 82px;
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f9fbfd;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.primary-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 1px solid var(--blue);
    border-radius: 9px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.primary-button:hover:not(:disabled) { background: var(--blue-hover); box-shadow: 0 6px 16px rgb(20 85 204 / 20%); }
.primary-button:disabled { border-color: #52677f; background: #52677f; cursor: not-allowed; }
.secondary-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 11px 15px;
    border: 1px solid #aebed0;
    border-radius: 9px;
    background: #f7f9fc;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.secondary-button:hover:not(:disabled) { background: #eef4ff; border-color: #8da5c1; }
.secondary-button:disabled { opacity: .55; cursor: not-allowed; }

.form-message { min-height: 0; margin: 0; color: var(--error); font-weight: 600; overflow-wrap: anywhere; }
.form-message:empty { display: none; }
.form-message[data-state="success"] { color: #17643f; }
.retry-button { margin-top: 12px; }
.text-button, .back-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--blue); font: inherit; text-underline-offset: 4px; }
.text-button { padding: 4px 0; border: 0; background: none; text-decoration: underline; cursor: pointer; }
.text-button:hover, .back-link:hover { color: var(--blue-hover); }
.back-link { margin-top: 26px; }

.login-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--muted); font-size: 13px; }
.login-divider::before, .login-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.provider-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.provider-button {
    display: flex;
    min-width: 0;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7f9fc;
    color: #43566d;
    border-color: #bccada;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.provider-button:hover { border-color: #7897bb; background: #eef4ff; box-shadow: 0 4px 12px rgb(23 52 81 / 8%); }
.provider-button:active { background: #e6efff; }
.provider-mark { display: inline-grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; font-family: Arial, sans-serif; font-size: 17px; font-weight: 800; }
.provider-mark--google { color: #4285f4; }
.provider-mark--facebook { border-radius: 50%; background: #1877f2; color: #fff; font-size: 16px; }
.provider-mark--microsoft { grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 2px; }
.provider-mark--microsoft i { width: 8px; height: 8px; background: #f35325; }
.provider-mark--microsoft i:nth-child(2) { background: #81bc06; }
.provider-mark--microsoft i:nth-child(3) { background: #05a6f0; }
.provider-mark--microsoft i:nth-child(4) { background: #ffba08; }
.provider-status { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.registration-cta { display: grid; justify-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.registration-cta p { margin: 0; }
.registration-cta__link { min-width: 180px; text-decoration: none; }
.registration-cta--existing { margin-top: 18px; }
.register-verify-form { display: grid; gap: 14px; margin-top: 18px; }
.register-verify-form[hidden] { display: none; }
.recovery-panel { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.recovery-panel > summary { min-height: 44px; padding: 10px 0; color: var(--blue); font-weight: 700; cursor: pointer; text-underline-offset: 3px; }
.recovery-intro { margin: 4px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.recovery-form { display: grid; gap: 14px; margin: 16px 0; }
.recovery-form[hidden] { display: none; }
.recovery-panel[open] { padding-bottom: 2px; }
.workspace-date { margin: -12px 0 20px; color: var(--muted); text-transform: capitalize; }
.workspace-summary { margin: 0 0 22px; padding: 16px; border: 1px solid #dce5f3; border-left: 4px solid var(--blue); border-radius: 10px; background: #f5f8fd; }
.workspace-summary p { display: grid; gap: 4px; margin: 0; }
.workspace-summary span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.workspace-prompt { margin: 0 0 12px; font-size: 20px; }

.workspace-options { border-top: 1px solid var(--line); }
.workspace-option {
    display: flex;
    min-height: 88px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 8px;
    border-bottom: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.workspace-option[href]:hover { background: #f1f6fd; }
.option-copy { min-width: 0; }
.option-copy strong { display: block; font-size: 20px; }
.option-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }
.option-arrow { flex: 0 0 auto; color: var(--blue); font-size: 23px; }
.workspace-option--disabled { color: #3d5067; background: #f7f9fc; }
.option-badge { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #b9c8d9; border-radius: 999px; color: #43566d; font-size: 12px; font-weight: 700; }
.workspace-note { margin: 14px 0 8px; color: var(--muted); font-size: 14px; }
.logout-button { margin-top: 8px; }
.access-view--blocked .primary-button { margin-top: 4px; }

.captcha-wrap { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #f9fbfd; }
.captcha-wrap > p:first-child { margin: 0 0 10px; font-weight: 700; }
.captcha-message { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.noscript-note { position: fixed; right: 12px; bottom: 12px; left: 12px; padding: 12px; border: 1px solid #d3a439; border-radius: 8px; background: #fff8df; color: #513c00; text-align: center; }

[hidden] { display: none !important; }
::selection { background: #c9dafa; color: var(--ink); }

@media (max-width: 420px) {
    body { padding: 16px; }
    .access-card { padding: 24px 20px; border-radius: 14px; }
    .brand { margin-bottom: 24px; }
    .workspace-option { min-height: 80px; padding-inline: 4px; }
    .option-badge { max-width: 100px; text-align: center; }
    .provider-buttons { grid-template-columns: 1fr; }
    .provider-button { min-height: 46px; justify-content: flex-start; padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
