:root {
  color-scheme: light;
  --ink: #152522;
  --muted: #687772;
  --line: #d9e3df;
  --green: #176b53;
  --green-dark: #0d4e3b;
  --green-soft: #e6f3ee;
  --nav: #102923;
  --danger: #a44635;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: #f8faf9; }
button, input { font: inherit; }
a { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(54, 148, 116, .25); outline-offset: 2px; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(400px, .92fr) minmax(560px, 1.08fr); }
.brand-panel { position: relative; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; padding: clamp(36px, 5.2vw, 74px); color: #f2faf7; background: radial-gradient(circle at 25% 17%, #235f4e 0, #173e34 29%, #102923 68%); isolation: isolate; }
.brand-panel::after { content: ""; position: absolute; inset: auto -20% -30% 5%; z-index: -1; height: 64%; transform: rotate(-8deg); background: linear-gradient(125deg, transparent 0 35%, rgba(78, 176, 142, .08) 35% 37%, transparent 37% 47%, rgba(78, 176, 142, .04) 47% 49%, transparent 49%); }
.brand-panel__glow { position: absolute; width: 520px; height: 520px; right: -240px; top: 16%; border-radius: 50%; background: rgba(72, 171, 136, .12); filter: blur(1px); z-index: -1; }
.contours { position: absolute; right: -155px; top: 50%; width: 520px; height: 520px; transform: translateY(-50%) rotate(-12deg); z-index: -1; opacity: .5; }
.contours span { position: absolute; inset: calc(var(--i, 0) * 34px); border: 1px solid rgba(136, 211, 185, .2); border-radius: 48% 52% 43% 57% / 52% 40% 60% 48%; }
.contours span:nth-child(1) { --i: 0; }
.contours span:nth-child(2) { --i: 1; transform: rotate(10deg); }
.contours span:nth-child(3) { --i: 2; transform: rotate(-8deg); }
.contours span:nth-child(4) { --i: 3; transform: rotate(15deg); }
.contours span:nth-child(5) { --i: 4; transform: rotate(-15deg); }

.brand-lockup, .mobile-brand { display: flex; align-items: center; gap: 16px; color: #fff; text-decoration: none; font-size: 20px; font-weight: 790; letter-spacing: .16em; }
.brand-lockup img, .mobile-brand img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 12px 30px rgba(0,0,0,.23); }
.brand-story { width: min(520px, 100%); margin: auto 0; padding: 80px 0 70px; }
.eyebrow { margin: 0 0 15px; color: #75cfaf; font-size: 11px; font-weight: 780; letter-spacing: .16em; text-transform: uppercase; }
.brand-story h1 { margin: 0; max-width: 500px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(41px, 4vw, 62px); font-weight: 400; letter-spacing: -.035em; line-height: 1.04; }
.brand-story > p:not(.eyebrow) { max-width: 500px; margin: 25px 0 0; color: #bdd0c9; font-size: 16px; line-height: 1.75; }
.trust-points { display: grid; gap: 16px; margin-top: 45px; }
.trust-points > div { display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 13px; }
.trust-points > div > span { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(123, 211, 180, .25); border-radius: 8px; color: #80d6b8; background: rgba(105, 198, 165, .08); font-size: 14px; }
.trust-points p, .trust-points strong, .trust-points small { display: block; margin: 0; }
.trust-points strong { color: #e9f5f1; font-size: 13px; }
.trust-points small { margin-top: 4px; color: #94afa6; font-size: 12px; line-height: 1.5; }
.brand-panel__footer { display: flex; align-items: center; gap: 10px; margin: 0; color: #829e95; font-size: 11px; }
.brand-panel__footer span { width: 7px; height: 7px; border-radius: 50%; background: #62c5a4; box-shadow: 0 0 0 5px rgba(98, 197, 164, .09); }

.auth-panel { min-height: 100vh; display: grid; grid-template-rows: 1fr auto; padding: 42px clamp(44px, 7vw, 105px) 28px; background: linear-gradient(160deg, #fff 0, #fafcfb 56%, #f2f7f5 100%); }
.mobile-brand { display: none; color: var(--nav); }
.auth-card { width: min(480px, 100%); align-self: center; justify-self: center; padding: 30px 0 45px; }
.mode-heading { margin-bottom: 30px; }
.mode-heading .eyebrow { margin-bottom: 10px; color: var(--green); }
.mode-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 3.1vw, 44px); font-weight: 400; letter-spacing: -.025em; }
.mode-heading > p:last-child { margin: 11px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.auth-alert { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 10px; margin: -12px 0 20px; padding: 12px 14px; border: 1px solid #e3bcb5; border-radius: 8px; color: #7d3025; background: #fff5f2; font-size: 12px; line-height: 1.45; }
.auth-alert > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--danger); font-weight: 800; }
.auth-alert p { margin: 0; }
.credential-form { display: grid; gap: 19px; }
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; color: #31423d; font-size: 12px; font-weight: 690; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.field-label-row a { color: var(--green); font-size: 11px; font-weight: 690; text-decoration: none; }
.field-label-row a:hover { text-decoration: underline; }
.field-control { min-height: 50px; display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid #cbd8d3; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(17, 54, 43, .03); transition: border-color .15s ease, box-shadow .15s ease; }
.field-control:focus-within { border-color: #4b9b7f; box-shadow: 0 0 0 4px rgba(54, 148, 116, .1); }
.field-control > svg { width: 19px; height: 19px; fill: none; stroke: #82918c; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.field-control input { min-width: 0; height: 48px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.field-control input::placeholder { color: #9ba7a3; }
.field-control.plain { display: flex; padding: 0 13px; }
.password-toggle { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; color: #74837e; background: transparent; cursor: pointer; }
.password-toggle:hover { color: var(--green); background: var(--green-soft); }
.password-toggle svg { grid-area: 1 / 1; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.check-field { display: flex; align-items: flex-start; gap: 9px; color: #566661; font-size: 11px; line-height: 1.5; cursor: pointer; }
.check-field input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--green); }
.check-field a { color: var(--green); font-weight: 650; }
.terms-field { margin-top: -2px; }
.submit-button { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 20px; border: 1px solid var(--green); border-radius: 8px; color: #fff; background: var(--green); box-shadow: 0 10px 24px rgba(23, 107, 83, .18); cursor: pointer; font-size: 13px; font-weight: 760; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.submit-button:hover { transform: translateY(-1px); background: var(--green-dark); box-shadow: 0 13px 28px rgba(23, 107, 83, .24); }
.submit-button span { font-size: 17px; }

.password-guidance { margin-top: -8px; }
.strength-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.strength-track span { height: 3px; border-radius: 4px; background: #dce5e1; }
.strength-track[data-strength="1"] span:nth-child(-n+1) { background: #b95544; }
.strength-track[data-strength="2"] span:nth-child(-n+2) { background: #d28a2f; }
.strength-track[data-strength="3"] span:nth-child(-n+3) { background: #719a45; }
.strength-track[data-strength="4"] span { background: var(--green); }
.password-guidance p { margin: 7px 0 0; color: #7b8985; font-size: 10px; line-height: 1.45; }

.separator { position: relative; display: grid; place-items: center; margin: 27px 0 20px; color: #879590; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.separator::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.separator span { position: relative; padding: 0 13px; background: #fbfcfb; }
.provider-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.provider { min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 6px 4px; border: 1px solid #d5dfdb; border-radius: 8px; color: #263732; background: #fff; text-decoration: none; box-shadow: 0 1px 2px rgba(17, 54, 43, .03); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.provider:hover { transform: translateY(-1px); border-color: #9eb7ae; box-shadow: 0 7px 17px rgba(21, 55, 45, .08); }
.provider svg { width: 21px; height: 21px; }
.provider span { max-width: 100%; overflow: hidden; font-size: 9px; font-weight: 690; text-overflow: ellipsis; }
.provider--github svg { color: #181717; }
.provider-grid--single { grid-template-columns: 1fr; }
.provider--wide { min-height: 54px; flex-direction: row; gap: 12px; padding: 10px 18px; font-size: 13px; font-weight: 740; }
.provider--wide span { overflow: visible; font-size: 13px; text-overflow: clip; }
.provider-mark { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: #1267b1; font-size: 15px !important; }
.auth-security-note { margin: 20px 0 0; color: #74827e; font-size: 11px; line-height: 1.55; text-align: center; }
.auth-loading, .auth-load-error { color: var(--muted); font-size: 12px; text-align: center; }
.access-layout { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at top left, #17483b, #0d2821 48%, #071b16); }
.access-brand { position: fixed; top: 28px; left: 32px; }
.access-card { width: min(520px, 100%); padding: 40px; border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(0, 0, 0, .25); }
.access-card h1 { margin: 8px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 400; }
.access-card > p:not(.eyebrow, .auth-security-note) { margin: 0; color: var(--muted); line-height: 1.6; }
.signed-in-identity { display: flex; align-items: center; gap: 12px; margin: 24px 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #f7faf9; }
.signed-in-identity > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-weight: 800; }
.signed-in-identity div { display: grid; gap: 3px; min-width: 0; }
.signed-in-identity small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.signed-in-identity strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.access-request-details { display: grid; gap: 13px; margin: 0 0 24px; padding: 16px; border: 1px solid #cbdad4; border-radius: 10px; background: #f7faf9; }
.access-request-details[hidden] { display: none; }
.access-request-details > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.access-request-details dl { display: grid; gap: 9px; margin: 0; }
.access-request-details dl > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.access-request-details dt { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.access-request-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #203730; font-size: 12px; font-weight: 650; }
.access-request-details code { font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.setup-form { display: grid; gap: 18px; margin: 22px 0; }
.access-actions { display: grid; gap: 14px; margin-top: 24px; text-align: center; }
.text-link { color: var(--green); font-size: 12px; font-weight: 700; text-decoration: none; }
.mode-switch { margin: 24px 0 0; color: #65746f; font-size: 12px; text-align: center; }
.mode-switch a { color: var(--green); font-weight: 740; text-decoration: none; }
.mode-switch a:hover { text-decoration: underline; }
.auth-footer { width: min(640px, 100%); justify-self: center; display: flex; align-items: center; justify-content: space-between; gap: 22px; color: #87938f; font-size: 10px; }
.auth-footer nav { display: flex; gap: 20px; }
.auth-footer a { text-decoration: none; }
.auth-footer a:hover { color: var(--green); }

@media (max-width: 1060px) {
  .auth-layout { grid-template-columns: minmax(350px, .78fr) minmax(500px, 1.22fr); }
  .brand-panel { padding: 42px; }
  .brand-story h1 { font-size: 44px; }
  .brand-story > p:not(.eyebrow) { font-size: 14px; }
}

@media (max-width: 820px) {
  .auth-layout { display: block; }
  .brand-panel { display: none; }
  .auth-panel { min-height: 100vh; grid-template-rows: auto 1fr auto; padding: 26px clamp(22px, 7vw, 54px) 24px; }
  .mobile-brand { display: flex; gap: 11px; font-size: 15px; }
  .mobile-brand img { width: 44px; height: 44px; }
  .auth-card { padding: 44px 0; }
  .separator span { background: #fbfcfb; }
}

@media (max-width: 520px) {
  .auth-panel { padding-inline: 20px; }
  .auth-card { padding-top: 36px; }
  .mode-heading h2 { font-size: 34px; }
  .name-row { grid-template-columns: 1fr; }
  .provider-grid { grid-template-columns: repeat(3, 1fr); }
  .provider:nth-child(n+4) { grid-column: span 1; }
  .auth-footer { align-items: flex-start; }
  .auth-footer nav { gap: 12px; }
}

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