* {
  letter-spacing: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  font-family: "Inter", system-ui, sans-serif;
}

.font-display,
.legal-copy h1,
.legal-copy h2,
.auth-copy h1 {
  font-family: "Fraunces", Georgia, serif;
}

.bg-gradient-brand,
.fynqora-mark {
  background: var(--gradient-primary) !important;
}

.bg-gradient-soft {
  background: var(--gradient-soft) !important;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--foreground);
  text-decoration: none;
}

.fynqora-mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  border-radius: 0.55rem;
  color: white;
  box-shadow: 0 9px 24px rgba(78, 112, 244, 0.22);
}

.fynqora-mark svg {
  width: 82%;
  height: 82%;
  color: white;
}

.fynqora-word {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 600;
}

.site-footer-inner {
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.footer-links a:hover {
  color: var(--foreground);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(28rem, 1fr);
  background: var(--background);
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 3rem;
  background: #f4efff;
}

.auth-visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.2), rgba(10, 31, 48, 0.08));
}

.auth-visual > *:not(img) {
  position: relative;
  z-index: 1;
}

.auth-copy {
  margin: auto 0;
  max-width: 30rem;
}

.auth-copy h1 {
  font-size: 3rem;
  line-height: 1.05;
  font-weight: 600;
}

.auth-copy p {
  margin-top: 1.35rem;
  max-width: 26rem;
  color: rgba(20, 31, 42, 0.7);
  line-height: 1.65;
}

.auth-copyright {
  color: rgba(20, 31, 42, 0.62);
  font-size: 0.85rem;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 3rem 2rem;
}

.auth-card {
  width: min(100%, 24rem);
}

.auth-card h2 {
  font-size: 1.6rem;
  font-weight: 600;
}

.auth-subtitle {
  margin-top: 0.35rem;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.google-button,
.auth-submit {
  display: inline-flex;
  width: 100%;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

.google-button {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-sm);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.25rem 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--border);
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.82rem;
  font-weight: 500;
}

.field input {
  width: 100%;
  height: 2.55rem;
  padding: 0 0.85rem;
  border: 1px solid var(--input);
  border-radius: 0.5rem;
  background: transparent;
  box-shadow: var(--shadow-sm);
  outline: none;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78, 112, 244, 0.14);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 2.8rem;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  color: var(--muted-foreground);
}

.auth-submit {
  border: 0;
  color: white;
  background: var(--gradient-primary);
  box-shadow: 0 10px 24px rgba(115, 89, 239, 0.22);
}

.auth-switch,
.auth-home,
.auth-consent {
  margin-top: 1.35rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.auth-switch button,
.auth-consent a {
  color: var(--primary);
  font-weight: 500;
}

.auth-home {
  display: block;
  margin-top: 2.25rem;
}

.form-status {
  margin-top: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--foreground);
  background: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(16px);
}

.legal-header-inner {
  display: flex;
  width: min(100% - 2rem, 72rem);
  min-height: 4rem;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.legal-copy {
  width: min(100% - 2.5rem, 48rem);
  margin: 0 auto;
  padding: 5rem 0 7rem;
}

.legal-eyebrow {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.legal-copy h1 {
  margin-top: 0.8rem;
  font-size: clamp(2.5rem, 7vw, 4.4rem);
  line-height: 1.02;
  font-weight: 600;
}

.legal-lead {
  margin-top: 1.2rem;
  color: var(--muted-foreground);
  font-size: 1.06rem;
  line-height: 1.7;
}

.legal-date {
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.legal-copy section {
  margin-top: 2.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--border);
}

.legal-copy h2 {
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 600;
}

.legal-copy p,
.legal-copy li {
  color: color-mix(in srgb, var(--foreground) 80%, transparent);
  line-height: 1.75;
}

.legal-copy p + p {
  margin-top: 0.85rem;
}

.legal-copy a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.legal-note {
  margin-top: 2.75rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid #f04ca9;
  background: #fff3fa;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  line-height: 1.55;
}

.site-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  width: 100%;
  height: 100%;
  padding: 1rem;
  place-items: center;
  border: 0;
  color: var(--foreground);
  background: rgba(20, 31, 42, 0.38);
  backdrop-filter: blur(3px);
}

.dialog-body {
  width: min(100%, 31rem);
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(20, 31, 42, 0.24);
}

.dialog-google {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: white;
}

.dialog-body h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
}

.dialog-body p {
  margin-top: 0.7rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.google-popup-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1.5rem;
  background: #f6f7fb;
  color: var(--foreground);
}

.google-popup-card {
  width: min(100%, 26rem);
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: #fff;
  box-shadow: 0 18px 55px rgba(20, 31, 42, 0.14);
  text-align: center;
}

.google-popup-card .brand-lockup {
  justify-content: center;
  margin-bottom: 1.7rem;
}

.google-popup-mark {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 0.8rem;
}

.google-popup-card h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.25;
}

.google-popup-lead {
  margin: 0.7rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.6;
}

.google-popup-notice {
  margin: 1.35rem 0;
  padding: 0.85rem;
  border: 1px solid #d9e2ff;
  border-radius: 0.5rem;
  background: #f4f7ff;
  color: #4f5f79;
  font-size: 0.8rem;
  line-height: 1.55;
  text-align: left;
}

.google-popup-action {
  display: flex;
  min-height: 3rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border: 1px solid #c9cfdb;
  border-radius: 0.5rem;
  background: #fff;
  color: #202632;
  font-weight: 600;
  text-decoration: none;
}

.google-popup-action:hover {
  border-color: #8c96a8;
  background: #f9fafc;
}

.google-popup-action svg {
  flex: 0 0 auto;
}

.google-popup-close {
  margin-top: 0.9rem;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.google-popup-support {
  margin: 1.35rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1.5;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.dialog-actions button,
.dialog-actions a {
  min-height: 2.4rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  font-size: 0.86rem;
  font-weight: 500;
}

.dialog-actions a {
  color: white;
  background: var(--primary);
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .auth-shell {
    display: block;
  }

  .auth-visual {
    min-height: 15.5rem;
    padding: 1.5rem;
  }

  .auth-copy {
    margin-top: 3rem;
  }

  .auth-copy h1 {
    font-size: 2rem;
  }

  .auth-copy p,
  .auth-copyright {
    display: none;
  }

  .auth-panel {
    padding: 2.5rem 1.5rem 4rem;
  }

  .legal-nav a:not(:last-child) {
    display: none;
  }

  .footer-links {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
