:root {
  color-scheme: light;
  --ink: #17243b;
  --muted: #71809a;
  --blue: #3977ef;
  --blue-dark: #2863db;
  --line: rgba(128, 153, 190, 0.2);
  --glass: rgba(255, 255, 255, 0.68);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 10% 16%, rgba(126, 192, 255, 0.24), transparent 36%),
    radial-gradient(ellipse at 83% 79%, rgba(166, 146, 255, 0.2), transparent 34%),
    linear-gradient(132deg, #f2f8ff 0%, #f8faff 49%, #f4f4ff 100%);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  display: flex;
  flex-direction: column;
  width: min(1240px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 56px 22px;
}

.topbar,
.brand,
.footer,
.footer-actions,
.feature,
.label-row,
.input-wrap,
.submit-button,
.provider-button {
  display: flex;
  align-items: center;
}

.topbar,
.footer {
  justify-content: space-between;
}

.brand {
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 13px;
  background: linear-gradient(145deg, #4b8af9, #42c1dd);
  box-shadow: 0 7px 18px rgba(52, 121, 229, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: white;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark span {
  transform: translateY(-1px);
}

.brand-name {
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.topbar-link {
  color: #697994;
  font-size: 13px;
  font-weight: 600;
}

.topbar-link span,
.footer a span {
  margin-left: 4px;
  color: var(--blue);
}

.welcome-layout {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 464px);
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
  padding: 54px 4.5% 62px;
}

.welcome-copy {
  max-width: 500px;
  padding: 10px 0;
}

.eyebrow,
.welcome-label {
  color: #637899;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4dbb9c;
  box-shadow: 0 0 0 4px rgba(77, 187, 156, 0.12);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin: 25px 0 18px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 1.12;
}

h1 span {
  color: var(--blue);
}

.intro {
  max-width: 410px;
  margin-bottom: 35px;
  color: #71809a;
  font-size: 16px;
  line-height: 1.8;
}

.feature-stack {
  display: grid;
  gap: 22px;
}

.feature {
  gap: 14px;
}

.feature-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
}

.feature-icon svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.feature-icon-blue {
  color: #4382ee;
  background: rgba(218, 235, 255, 0.8);
}

.feature-icon-violet {
  color: #8972e9;
  background: rgba(235, 229, 255, 0.82);
}

.feature strong,
.feature small {
  display: block;
}

.feature strong {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
}

.feature small {
  color: #8490a5;
  font-size: 12px;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 47px;
  color: #8290a5;
  font-size: 12px;
}

.privacy-icon {
  color: #7d81df;
  font-size: 17px;
}

.auth-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 30px;
  background: var(--glass);
  box-shadow:
    0 24px 70px rgba(63, 91, 139, 0.13),
    0 4px 16px rgba(77, 112, 168, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.card-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.card-orb-one {
  top: -78px;
  right: -54px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(124, 185, 255, 0.2), transparent 72%);
}

.card-orb-two {
  bottom: -110px;
  left: -65px;
  width: 210px;
  height: 210px;
  background: radial-gradient(circle, rgba(168, 151, 255, 0.18), transparent 72%);
}

.form-content {
  position: relative;
  padding: 42px 42px 31px;
}

.mobile-brand {
  display: none;
}

.card-heading {
  margin-bottom: 28px;
}

.welcome-label {
  color: var(--blue);
  font-size: 9px;
}

h2 {
  margin: 10px 0 7px;
  font-family: "Manrope", sans-serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.card-heading p {
  margin: 0;
  color: #8792a6;
  font-size: 13px;
}

.field-group {
  margin-bottom: 18px;
}

.field-group[hidden],
.form-feedback[hidden] {
  display: none;
}

.field-group label {
  display: block;
  margin-bottom: 8px;
  color: #43516a;
  font-size: 11px;
  font-weight: 700;
}

.label-row {
  justify-content: space-between;
}

.text-action,
.switch-mode button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.input-wrap {
  position: relative;
  min-height: 49px;
  border: 1px solid rgba(157, 174, 202, 0.35);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-wrap:focus-within {
  border-color: rgba(57, 119, 239, 0.7);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(57, 119, 239, 0.1);
}

.input-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-left: 14px;
  fill: none;
  stroke: #94a1b4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  height: 47px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.input-wrap input::placeholder {
  color: #a1adbd;
}

.reveal-button {
  display: grid;
  width: 42px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  background: transparent;
  color: #8793a6;
  cursor: pointer;
}

.reveal-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.submit-button {
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 49px;
  margin-top: 7px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(105deg, #3977ef, #4d8df5);
  box-shadow: 0 9px 18px rgba(57, 119, 239, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.27);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(105deg, var(--blue-dark), #397de9);
  box-shadow: 0 12px 22px rgba(57, 119, 239, 0.27);
}

.button-arrow {
  font-size: 17px;
  font-weight: 400;
}

.form-feedback {
  margin: -5px 0 12px;
  color: #536787;
  font-size: 11px;
  line-height: 1.5;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 20px 0;
  color: #a0aabd;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.form-divider::before,
.form-divider::after {
  height: 1px;
  flex: 1;
  background: rgba(148, 163, 184, 0.23);
  content: "";
}

.provider-button {
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 47px;
  border: 1px solid rgba(157, 174, 202, 0.33);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.58);
  color: #526078;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 160ms ease, border-color 160ms ease;
}

.provider-button:hover {
  border-color: rgba(123, 150, 193, 0.48);
  background: rgba(255, 255, 255, 0.9);
}

.provider-button svg {
  width: 17px;
  height: 17px;
}

.switch-mode {
  margin: 21px 0 16px;
  color: #8792a6;
  text-align: center;
  font-size: 11px;
}

.switch-mode button {
  margin-left: 3px;
}

.fine-print {
  margin: 0;
  color: #a0aabd;
  text-align: center;
  font-size: 9px;
  line-height: 1.6;
}

.fine-print a {
  color: #657995;
  text-decoration: underline;
  text-decoration-color: rgba(101, 121, 149, 0.35);
  text-underline-offset: 2px;
}

.footer {
  color: #94a0b2;
  font-size: 10px;
}

.footer-tagline {
  color: #a1acbd;
}

.footer a {
  color: #77869d;
  font-weight: 600;
}

.assistant-widget {
  position: fixed;
  z-index: 10;
  right: 25px;
  bottom: 25px;
}

.assistant-launcher {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 19px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background: linear-gradient(115deg, #3977ef, #567ded 58%, #6b70e7);
  box-shadow: 0 12px 30px rgba(63, 91, 175, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.assistant-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(63, 91, 175, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.assistant-launcher-icon {
  font-size: 19px;
}

.assistant-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(570px, calc(100svh - 115px));
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: rgba(247, 250, 255, 0.82);
  box-shadow: 0 22px 70px rgba(44, 63, 105, 0.23), inset 0 1px 0 white;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  animation: assistant-appear 180ms ease-out;
}

@keyframes assistant-appear {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.assistant-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px;
  border-bottom: 1px solid rgba(130, 153, 190, 0.17);
  background: rgba(255, 255, 255, 0.52);
}

.assistant-modes {
  display: flex;
  gap: 5px;
  margin: 10px 13px 0;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 13px;
  background: rgba(225, 233, 246, 0.38);
}

.assistant-mode {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #73819a;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.assistant-mode.active {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 2px 7px rgba(49, 73, 115, 0.08);
  color: #3c65b1;
}

.assistant-view {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.assistant-view[hidden] {
  display: none;
}

.assistant-image-view {
  overflow-y: auto;
  padding: 15px 13px 0;
}

.image-composer {
  display: grid;
  gap: 9px;
}

.image-composer label {
  color: #43516a;
  font-size: 11px;
  font-weight: 700;
}

.image-composer textarea {
  width: 100%;
  min-height: 82px;
  padding: 12px;
  resize: vertical;
  border: 1px solid rgba(157, 174, 202, 0.35);
  border-radius: 13px;
  outline: 0;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

.image-composer textarea:focus {
  border-color: rgba(57, 119, 239, 0.65);
  box-shadow: 0 0 0 3px rgba(57, 119, 239, 0.09);
}

.image-composer textarea::placeholder {
  color: #9aa6b8;
}

.image-generate-button {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(110deg, #3977ef, #6b70e7);
  box-shadow: 0 7px 16px rgba(57, 119, 239, 0.18);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.image-generate-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.image-feedback {
  margin: 11px 2px 0;
  color: #6c7d99;
  font-size: 11px;
  line-height: 1.5;
}

.image-feedback[hidden] {
  display: none;
}

.image-result {
  display: grid;
  gap: 9px;
  margin-top: 13px;
}

.image-result[hidden] {
  display: none;
}

.image-result img {
  display: block;
  width: 100%;
  max-height: 330px;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 15px;
  background: rgba(226, 234, 248, 0.55);
}

.image-download {
  display: block;
  padding: 10px;
  border: 1px solid rgba(96, 139, 205, 0.24);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.65);
  color: #4e6f9f;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.assistant-avatar {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  background: linear-gradient(145deg, #4b8af9, #42c1dd);
  box-shadow: 0 5px 14px rgba(52, 121, 229, 0.2);
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.assistant-heading {
  display: grid;
  flex: 1;
  gap: 4px;
}

.assistant-heading strong {
  color: var(--ink);
  font-size: 13px;
}

.assistant-heading small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8290a5;
  font-size: 10px;
}

.assistant-provider {
  max-width: 104px;
  padding: 7px 22px 7px 8px;
  border: 1px solid rgba(142, 164, 197, 0.28);
  border-radius: 10px;
  outline: 0;
  background: rgba(255, 255, 255, 0.68);
  color: #536582;
  cursor: pointer;
  font-size: 10px;
}

.assistant-provider:focus-visible {
  border-color: rgba(57, 119, 239, 0.65);
  box-shadow: 0 0 0 3px rgba(57, 119, 239, 0.1);
}

.assistant-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4dbb9c;
}

.assistant-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(225, 233, 246, 0.58);
  color: #66758e;
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}

.assistant-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 18px 14px;
  overscroll-behavior: contain;
}

.assistant-message {
  max-width: 88%;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(52, 76, 119, 0.05);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.assistant-reply {
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  background: rgba(255, 255, 255, 0.76);
  color: #34445f;
}

.assistant-user {
  align-self: flex-end;
  border-color: rgba(255, 255, 255, 0.23);
  border-bottom-right-radius: 5px;
  background: linear-gradient(120deg, #3977ef, #5e7bea);
  color: white;
}

.assistant-pending {
  color: #7d8ba1;
  font-style: italic;
}

.assistant-error {
  align-self: flex-start;
  border-color: rgba(197, 78, 88, 0.16);
  background: rgba(255, 241, 242, 0.9);
  color: #a43c4b;
}

.assistant-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 12px;
  padding: 8px 8px 8px 13px;
  border: 1px solid rgba(157, 174, 202, 0.34);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.assistant-composer:focus-within {
  border-color: rgba(57, 119, 239, 0.58);
  box-shadow: 0 0 0 3px rgba(57, 119, 239, 0.08);
}

.assistant-composer textarea {
  width: 100%;
  max-height: 108px;
  min-height: 38px;
  padding: 9px 0;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

.assistant-composer textarea::placeholder {
  color: #9aa6b8;
}

.assistant-composer button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: var(--blue);
  color: white;
  cursor: pointer;
}

.assistant-composer button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.assistant-composer button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.assistant-disclaimer {
  margin: 8px 12px 12px;
  color: #9aa5b6;
  text-align: center;
  font-size: 9px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.footer-actions {
  gap: 20px;
}

.footer a.app-download {
  padding: 9px 13px;
  border: 1px solid rgba(96, 139, 205, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: #4e6f9f;
}

.app-download span {
  margin-left: 5px;
  color: var(--blue);
}

@media (max-width: 900px) {
  .page-shell {
    padding-right: 34px;
    padding-left: 34px;
  }

  .welcome-layout {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 420px);
    gap: 38px;
    padding-right: 0;
    padding-left: 0;
  }

  .form-content {
    padding-right: 30px;
    padding-left: 30px;
  }
}

@media (max-width: 700px) {
  body {
    background:
      radial-gradient(ellipse at 90% 4%, rgba(126, 192, 255, 0.24), transparent 38%),
      linear-gradient(155deg, #f3f8ff, #f7f7ff);
  }

  .page-shell {
    width: 100%;
    min-height: 100svh;
    padding: 0 22px 18px;
  }

  .topbar {
    display: none;
  }

  .welcome-layout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 20px 0 28px;
  }

  .welcome-copy {
    display: none;
  }

  .auth-card {
    width: min(100%, 440px);
    margin: auto;
    border-radius: 25px;
  }

  .form-content {
    padding: 25px 24px 23px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 30px;
  }

  .mobile-brand .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 16px;
  }

  .mobile-brand .brand-name {
    font-size: 15px;
  }

  .card-heading {
    margin-bottom: 24px;
  }

  h2 {
    font-size: 23px;
  }

  .footer {
    justify-content: center;
    gap: 8px;
    padding-top: 3px;
  }

  .footer-tagline,
  .footer a {
    display: none;
  }

  .footer a.app-download {
    display: inline-flex;
    align-items: center;
  }

  .footer-actions {
    justify-content: center;
  }

  .assistant-widget {
    right: 14px;
    bottom: 14px;
  }

  .assistant-launcher {
    min-height: 48px;
    padding: 0 15px;
    font-size: 12px;
  }

  .assistant-panel {
    right: -2px;
    bottom: 58px;
    width: min(390px, calc(100vw - 24px));
    height: min(600px, calc(100svh - 90px));
    min-height: 340px;
  }
}

@media (max-width: 360px) {
  .page-shell {
    padding-right: 15px;
    padding-left: 15px;
  }

  .form-content {
    padding-right: 19px;
    padding-left: 19px;
  }
}

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

  .assistant-panel {
    animation: none;
  }
}
