* { box-sizing: border-box; }

:root {
  color-scheme: light;
  --abyss: #07222e;
  --abyss-soft: #0c3243;
  --ink: #06222e;
  --muted: #55717a;
  --teal: #21bebd;
  --teal-deep: #1276a6;
  --yellow: #ffd166;
  --yellow-deep: #f3b53a;
  --paper: #f1f8f9;
  --line: rgba(6, 34, 46, .13);
  --display: "Avenir Next", "Trebuchet MS", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--abyss);
  color: var(--ink);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }

.auth-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 26px clamp(22px, 4vw, 64px) 18px;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 209, 102, .18), transparent 25%),
    radial-gradient(circle at 10% 88%, rgba(33, 190, 189, .2), transparent 30%),
    linear-gradient(145deg, var(--abyss) 0%, var(--abyss-soft) 100%);
}

.auth-page::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(180, 226, 240, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 226, 240, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  pointer-events: none;
}

.home-brand,
.auth-layout,
.auth-page footer { position: relative; z-index: 1; }

.home-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, 100%);
  margin: 0 auto;
  color: #fff;
}

.home-brand a,
.account-bar a {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font: 700 19px/1 var(--display);
  text-decoration: none;
}

.home-brand img,
.account-bar img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}

.home-brand > strong {
  border: 1px solid rgba(180, 226, 240, .25);
  border-radius: 999px;
  padding: 6px 12px;
  color: #dff8fb;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 440px);
  align-items: center;
  gap: clamp(50px, 7vw, 100px);
  width: min(1120px, 100%);
  min-height: calc(100vh - 124px);
  margin: 0 auto;
  padding: 56px 0;
}

.home-intro { min-width: 0; color: #eafbff; }

.eyebrow,
.card-kicker {
  margin: 0 0 16px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-intro h1 {
  max-width: 620px;
  margin: 0;
  color: #fff;
  font: 750 clamp(44px, 5.8vw, 76px)/.98 var(--display);
  letter-spacing: -.045em;
}

.intro-copy {
  max-width: 570px;
  margin: 22px 0 32px;
  color: rgba(234, 251, 255, .78);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.home-preview {
  overflow: hidden;
  width: min(610px, 100%);
  border: 1px solid rgba(180, 226, 240, .2);
  border-radius: 20px;
  background: rgba(241, 248, 249, .97);
  box-shadow: 0 34px 80px -34px rgba(0, 0, 0, .78);
  color: var(--ink);
  transform: rotate(-1deg);
}

.preview-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d8e4e7; }
.window-dots i:first-child { background: var(--yellow); }
.preview-avatar { justify-self: end; width: 22px; height: 22px; border: 6px solid var(--abyss); border-radius: 50%; background: var(--teal); }

.preview-greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 22px 24px 18px;
}

.preview-greeting small,
.preview-greeting strong { display: block; }
.preview-greeting small { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.preview-greeting strong { font: 700 clamp(19px, 3vw, 26px)/1.1 var(--display); }
.preview-greeting b { color: var(--teal-deep); font: 700 25px/1 var(--display); }

.preview-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 10px; padding: 0 14px 14px; }
.preview-grid article { border: 1px solid rgba(6, 34, 46, .08); border-radius: 13px; padding: 14px; background: #fff; box-shadow: 0 10px 24px -22px rgba(6, 34, 46, .7); }
.preview-label { display: block; margin-bottom: 10px; color: var(--teal-deep); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.preview-calendar > div { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(6, 34, 46, .07); }
.preview-calendar time { min-width: 32px; color: var(--muted); font-size: 9px; }
.preview-calendar p { margin: 0; }
.preview-calendar strong,
.preview-calendar small { display: block; }
.preview-calendar strong { font-size: 11px; }
.preview-calendar small { color: var(--muted); font-size: 9px; }
.bookmark-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: var(--muted); font-size: 10px; }
.bookmark-row i { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: #e9f6f6; color: var(--teal-deep); font-style: normal; font-weight: 800; }

.account-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 42px);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 36px 90px -36px rgba(0, 0, 0, .75);
}

.card-kicker { margin-bottom: 12px; color: var(--teal-deep); }
h1, h2, h3 { color: var(--ink); font-family: var(--display); }
.account-card h2 { margin: 0; font-size: clamp(29px, 4vw, 38px); line-height: 1.05; letter-spacing: -.035em; }
.account-card h3 { margin: 0 0 7px; font-size: 18px; }
.lead { margin: 12px 0 26px; color: var(--muted); font-size: 17px; }

button.primary,
button.secondary,
.account-bar button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

button.primary { background: var(--yellow); color: #211705; box-shadow: 0 12px 28px -14px rgba(243, 181, 58, .9); }
button.primary:hover { background: var(--yellow-deep); transform: translateY(-1px); }
button.secondary { border: 1px solid var(--line); background: #f6fafb; color: var(--ink); }
button.secondary:hover { border-color: rgba(18, 118, 166, .35); background: #edf7f8; }
button:disabled { cursor: wait; opacity: .58; transform: none !important; }
.passkey-note { margin: 11px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

.message { margin: 0 0 18px; border-radius: 10px; padding: 11px 13px; font-size: 14px; }
.message.error { border: 1px solid #ecc5c1; background: #fff0ef; color: #8d2721; }

.setup-entry { margin-top: 27px; }
.setup-entry > p { margin: 15px 0 12px; color: var(--muted); font-size: 14px; }
.rule { display: flex; align-items: center; gap: 12px; color: #6e838a; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.rule::before,
.rule::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.setup-help { margin-top: 13px; border-radius: 12px; padding: 15px; background: #eaf6f6; color: var(--ink); font-size: 13px; }
.setup-help p { margin: 5px 0 0; color: var(--muted); }
.enrollment { margin-top: 4px; }
.enrollment h2 { font-size: 21px; }
.enrollment p { margin: 9px 0 18px; color: var(--muted); }
.is-enrolling .sign-in-flow,
.is-enrolling .setup-entry { display: none; }

.auth-page footer { width: min(1120px, 100%); margin: 0 auto; color: rgba(234, 251, 255, .5); font-size: 12px; text-align: center; }

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 54px);
  background: var(--abyss);
  color: #fff;
}
.account-bar form { margin: 0; }
.account-bar button { width: auto; border: 1px solid rgba(255, 255, 255, .25); padding: 8px 13px; background: transparent; color: #fff; }
.home-shell { min-height: calc(100vh - 65px); padding: 42px max(24px, calc((100% - 1120px) / 2)); background: var(--paper); }
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.welcome h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.04em; }
.welcome .eyebrow { margin-bottom: 8px; color: var(--teal-deep); }
.entitlement { border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 800; }
.entitlement.active { background: #d7f1e4; color: #17623f; }
.entitlement.pending { background: #fff0c7; color: #795900; }
.home-placeholder { max-width: none; }
.home-placeholder h2 { font-size: 27px; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; gap: 38px; padding: 54px 0; }
  .home-intro { text-align: center; }
  .home-intro h1,
  .intro-copy,
  .home-preview { margin-right: auto; margin-left: auto; }
  .account-card { max-width: 520px; margin: 0 auto; text-align: left; }
}

@media (max-width: 560px) {
  .auth-page { padding: 18px 16px 16px; }
  .auth-layout { min-height: 0; padding: 44px 0; }
  .home-brand span { display: none; }
  .home-intro h1 { font-size: 44px; }
  .intro-copy { font-size: 17px; }
  .home-preview { transform: none; }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-links { display: none; }
  .account-card { border-radius: 20px; padding: 27px 22px; }
  .welcome { align-items: flex-start; flex-direction: column; }
  .account-bar span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  button { transition: none !important; }
}
