:root {
  --ink: #14243c;
  --muted: #51657f;
  --line: #d8e3ef;
  --paper: #eff4fb;
  --card: #ffffff;
  --accent: #1d4ed8;
  --accent-strong: #1e40af;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: min(1120px, calc(100vw - 48px));
  margin: 20px auto 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
}

.site-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px;
}

.trial-shell {
  min-height: 100vh;
  padding: 100px 24px 40px;
  background:
    linear-gradient(140deg, rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.82)),
    url("https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.trial-card {
  width: min(920px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  text-transform: uppercase;
  font-weight: 800;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: 0;
}

.intro {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-panel,
.session-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f8fbff;
}

.auth-panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

.auth-panel p {
  margin: 8px 0 14px;
  color: var(--muted);
}

.auth-actions button,
.actions button,
.magic-link-form button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-actions button,
.actions button {
  min-height: 48px;
  padding: 0 18px;
}

.magic-link-form label {
  display: block;
  margin: 14px 0 8px;
  font-weight: 700;
}

.magic-link-form div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.magic-link-form button {
  padding: 0 14px;
}

.auth-hint {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
}

.session-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.signed-in {
  margin: 0;
}

.ghost {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  min-height: 40px;
  padding: 0 12px;
  cursor: pointer;
}

.trial-form {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label,
legend {
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
}

fieldset {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.check-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.check-grid label,
.consent {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.check-grid input,
.consent input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.actions a {
  color: var(--accent-strong);
  font-weight: 700;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
}

.hidden {
  display: none;
}

@media (max-width: 820px) {
  .site-header {
    width: min(1120px, calc(100vw - 24px));
    margin-top: 14px;
  }

  .site-brand span {
    display: none;
  }

  .grid.two,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }
}
