:root {
  --bg: #edf2f6;
  --surface: #ffffff;
  --surface-alt: #e6eef4;
  --border: #cbd8e2;
  --text: #102638;
  --muted: #607589;
  --brand: #f47b20;
  --brand-dark: #c95510;
  --blue: #168bc3;
  --error: #a92228;
  --shadow: 0 12px 28px rgba(9, 31, 48, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
}

.auth-panel {
  width: min(100%, 560px);
  padding: 38px 42px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-logo {
  display: block;
  width: min(100%, 440px);
  height: auto;
  margin: 0 auto 30px;
}

.auth-eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 28px;
  color: #0b2a40;
  font-weight: 750;
  letter-spacing: 0.01em;
}

h2 {
  margin: 0;
  font-size: 21px;
  color: #12334a;
  font-weight: 750;
}

.auth-message {
  margin: 8px 0 24px;
  color: var(--muted);
}

.auth-section + .auth-section {
  margin-top: 30px;
}

.trial-offer {
  margin-top: 30px;
  padding: 22px 24px;
  border: 1px solid rgba(244, 123, 32, 0.48);
  border-radius: 6px;
  background: #fff7ef;
  box-shadow: 0 4px 10px rgba(244, 123, 32, 0.08);
}

.trial-offer .auth-eyebrow {
  color: var(--brand);
}

.trial-offer p:not(.auth-eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
}

.trial-price {
  font-weight: 700;
  color: var(--text) !important;
}

.trial-note {
  font-size: 13px;
}

.pricing-link {
  margin: 18px 0 0;
  font-size: 13px;
  text-align: center;
}

.pricing-link a {
  color: var(--blue);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
  font-size: 13px;
}

.legal-links a {
  color: var(--blue);
}

.story-preview {
  margin-top: 30px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f8fafc;
}

.story-preview .auth-eyebrow {
  color: var(--brand);
}

.story-preview h2 {
  line-height: 1.25;
}

.story-preview h3 {
  margin: 8px 0 0;
  color: #12334a;
  font-size: 16px;
  line-height: 1.4;
}

.story-preview p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.story-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  margin-top: 20px;
  text-decoration: none;
}

.story-shell {
  place-items: start center;
}

.story-panel {
  width: min(100%, 820px);
  padding: 42px 52px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.story-panel .auth-logo {
  margin-bottom: 34px;
}

.story-panel .auth-eyebrow {
  font-size: 12px;
  line-height: normal;
}

.story-panel h1 {
  max-width: 680px;
}

.story-panel h2 {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.story-panel p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.story-panel .story-lead {
  margin-top: 10px;
  color: #12334a;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.story-panel .story-closing {
  margin-top: 38px;
  color: #12334a;
  font-size: 18px;
  font-weight: 750;
}

.legal-panel {
  width: min(100%, 900px);
}

.legal-panel .legal-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.legal-panel a:not(.story-link) {
  color: var(--blue);
}

.story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.story-actions .story-link {
  margin-top: 0;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #b9cad7;
  border-radius: 6px;
  color: #17364c;
  background: #ffffff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.ghost-button:hover {
  border-color: #75b5d4;
  background: #edf7fb;
}

.auth-form {
  display: grid;
  gap: 9px;
}

.auth-form + .auth-form {
  margin-top: 18px;
}

label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 38px;
  margin-bottom: 7px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: #fbfdff;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(244, 123, 32, 0.16);
  outline: none;
}

.primary-button {
  min-height: 38px;
  margin-top: 8px;
  padding: 9px 14px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(244, 123, 32, 0.18);
}

.primary-button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.auth-error {
  margin: 24px 0 0;
  padding: 10px 12px;
  border: 1px solid #e5aeb2;
  color: var(--error);
  background: #fff1f2;
}

@media (max-width: 520px) {
  .auth-panel {
    padding: 28px 20px;
  }

  .auth-logo {
    width: min(100%, 360px);
  }

  .story-preview {
    padding: 20px;
  }

  .story-panel {
    padding: 28px 20px;
  }

  .story-panel p {
    font-size: 14px;
  }

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

  .story-actions .story-link {
    width: 100%;
  }
}
