/* ==========================================================================
   backtester.app — secondary marketing pages
   How it works and Beta access, in the same visual system as the homepage.
   ========================================================================== */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 0;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -210px;
  left: 50%;
  width: 1000px;
  height: 540px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(63, 191, 174, 0.12), transparent 72%);
}
.page-hero .home-shell { position: relative; z-index: 1; }
.page-hero h1 {
  max-width: 18ch;
  margin: 14px 0 0;
  color: var(--text);
  font-size: clamp(2.25rem, 4.6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.07;
}
.page-hero .lede {
  max-width: 680px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.page-hero .lede strong { color: var(--text-2); font-weight: 500; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

.page-section { padding: 72px 0 0; }
.page-section .section-head {
  max-width: 720px;
  margin: 0 0 28px;
  text-align: left;
}
.page-section .section-head h2 { font-size: clamp(1.5rem, 2.7vw, 2rem); }
.page-section .section-head p { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* Pipeline -------------------------------------------------------------- */

.pipeline {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.pipeline-step {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0;
  padding: 27px 30px;
}
.pipeline-step + .pipeline-step { border-top: 1px solid var(--line); }
.pipeline-num {
  padding-top: 2px;
  color: var(--teal);
  font-family: var(--num);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.pipeline-copy h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.pipeline-copy p { max-width: 800px; margin-top: 7px; color: var(--muted); font-size: 12.5px; line-height: 1.75; }
.pipeline-copy p + p { margin-top: 7px; }
.pipeline-copy .mono { color: var(--text-2); font-size: 10.5px; }

/* Two-column content ---------------------------------------------------- */

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
  align-items: start;
}
.three-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.info-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.info-card h3 {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.info-card > p { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.info-card .hint { margin-top: 12px; color: var(--faint); font-size: 10.5px; line-height: 1.6; }
.info-card .btn-row { margin-top: 16px; }

/* Outcome buckets and rules --------------------------------------------- */

.bucket-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.bucket-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
}
.bucket-list li:nth-child(-n + 2) { border-top: 0; }
.bucket-name { color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.bucket-desc { color: var(--faint); font-size: 10.5px; line-height: 1.5; }

.rule-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.rule-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.rule-list li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: var(--negative);
  font-family: var(--num);
  font-size: 13px;
  line-height: 1.4;
}

.callout {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(210, 165, 76, 0.24);
  border-left: 2px solid var(--warning);
  border-radius: var(--radius-sm);
  background: var(--warning-wash);
  color: #e6cd9c;
  font-size: 12px;
  line-height: 1.7;
}
.callout strong { color: #f0d8a4; }

/* Beta access ----------------------------------------------------------- */

.getting-steps {
  display: grid;
  gap: 15px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.getting-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; }
.step-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(63, 191, 174, 0.3);
  border-radius: 50%;
  background: var(--teal-wash);
  color: var(--teal);
  font-family: var(--num);
  font-size: 9.5px;
  line-height: 1;
}
.getting-steps strong { display: block; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.getting-steps p { margin-top: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }

.limits-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 12px;
}
.limits-table th {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}
.limits-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  vertical-align: top;
}
.limits-table th:last-child { text-align: right; }
.limits-table td:last-child {
  color: var(--text-2);
  font-family: var(--num);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}
.limits-table tr:last-child td { border-bottom: 0; }

/* Responsive ------------------------------------------------------------ */

@media (max-width: 960px) {
  .split-grid,
  .three-grid { grid-template-columns: minmax(0, 1fr); }
  .pipeline-step { grid-template-columns: 56px minmax(0, 1fr); padding: 24px 22px; }
  .info-card { padding: 22px 20px; }
}

@media (max-width: 780px) {
  .page-hero { padding-top: 48px; }
  .page-hero h1 { font-size: clamp(2rem, 8.4vw, 2.8rem); }
  .page-hero .lede { font-size: 14px; }
  .page-actions { flex-direction: column; align-items: stretch; }
  .page-actions .btn { width: 100%; }
  .page-section { padding-top: 56px; }
  .page-section .section-head { margin-bottom: 22px; }
  .pipeline-step { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 22px 18px; }
  .pipeline-num { padding-top: 0; }
  .bucket-list { grid-template-columns: minmax(0, 1fr); }
  .bucket-list li:nth-child(2) { border-top: 1px solid var(--line-soft); }
}

/* ==========================================================================
   Authentication screens (login, register, password)
   ========================================================================== */

.auth-section {
  position: relative;
  overflow: hidden;
  padding: 54px 0 88px;
}
.auth-section::before {
  content: "";
  position: absolute;
  top: -240px;
  right: -120px;
  width: 760px;
  height: 560px;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(63, 191, 174, 0.13), transparent 70%);
}
.auth-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 408px;
  gap: 64px;
  align-items: start;
}
.auth-copy { padding-top: 16px; }
.auth-copy h1 {
  max-width: 15ch;
  margin: 14px 0 0;
  color: var(--text);
  font-size: clamp(2.1rem, 3.9vw, 2.95rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.07;
}
.auth-copy .lede {
  max-width: 470px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.auth-points {
  display: grid;
  gap: 12px;
  max-width: 460px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.auth-points li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.auth-points svg { width: 14px; height: 14px; margin-top: 3px; color: var(--teal); }
.auth-points strong { color: var(--text-2); font-weight: 500; }
.auth-note {
  max-width: 460px;
  margin-top: 26px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.7;
}

.auth-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.3);
}
.auth-card h2 {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.auth-card .auth-intro {
  margin: 6px 0 18px;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.6;
}
.auth-card .notice { margin-bottom: 14px; font-size: 11px; }
.auth-field { margin-bottom: 13px; }
.auth-card label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(9, 12, 15, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-card input[type="text"]:focus,
.auth-card input[type="email"]:focus,
.auth-card input[type="password"]:focus {
  border-color: rgba(63, 191, 174, 0.6);
  box-shadow: 0 0 0 3px rgba(63, 191, 174, 0.12);
  outline: none;
}
.auth-card input::placeholder { color: #5b6672; }
.auth-check {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin: 4px 0 14px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
}
.auth-check input {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  accent-color: var(--teal);
}
.auth-check label {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.auth-check a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.auth-card .form-help {
  margin: -4px 0 12px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}
.auth-card .form-error {
  min-height: 14px;
  margin: 2px 0 10px;
  color: #f0b5b5;
  font-size: 11px;
  line-height: 1.5;
}
.auth-submit { width: 100%; height: 40px; }
.auth-alt {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 11px;
  line-height: 1.7;
}
.auth-alt p + p { margin-top: 6px; }
.auth-alt a { color: var(--text-2); }
.auth-alt a:hover { color: var(--text); }

/* ==========================================================================
   Legal documents
   ========================================================================== */

.page-hero .legal-meta {
  margin-top: 18px;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.legal-body { padding: 46px 0 92px; }
.legal {
  max-width: 760px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.85;
}
.legal > h2 {
  margin: 42px 0 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.legal > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h3 {
  margin: 22px 0 7px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}
.legal p { margin: 0 0 12px; }
.legal ul,
.legal ol { margin: 0 0 14px; padding-left: 18px; }
.legal li { margin-bottom: 6px; }
.legal li::marker { color: var(--faint); }
.legal a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--line-strong);
}
.legal a:hover { color: var(--text); text-decoration-color: var(--teal); }
.legal strong { color: var(--text-2); font-weight: 500; }
.legal code {
  padding: 1px 4px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--text-2);
  font-family: var(--num);
  font-size: 10.5px;
}
.legal .table-scroll { margin: 16px 0 20px; overflow-x: auto; }
.legal .limits-table { min-width: 520px; }
.legal .limits-table th,
.legal .limits-table td { padding-right: 18px; }
.legal .limits-table td { font-size: 11.5px; line-height: 1.6; }
.legal .limits-table td:last-child {
  font-family: inherit;
  font-size: 11.5px;
  text-align: left;
  white-space: normal;
}
.legal .legal-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 11px;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-handle {
  margin-top: 12px;
  color: var(--text);
  font-family: var(--num);
  font-size: 19px;
  letter-spacing: -0.01em;
}
.contact-actions { margin-top: 18px; }
.contact-list {
  display: grid;
  gap: 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.contact-list li { display: grid; gap: 3px; }
.contact-list strong { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.contact-list span { color: var(--muted); font-size: 11.5px; line-height: 1.65; }

@media (max-width: 960px) {
  .auth-grid { gap: 40px; grid-template-columns: minmax(0, 1fr) 380px; }
}

@media (max-width: 900px) {
  .auth-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .auth-copy { padding-top: 0; }
  .auth-copy h1 { max-width: 22ch; }
}

@media (max-width: 780px) {
  .auth-section { padding: 38px 0 64px; }
  .auth-card { padding: 22px 20px; }
  .auth-points { margin-top: 22px; }
  .legal-body { padding: 34px 0 68px; }
  .legal { font-size: 12px; }
  .legal > h2 { margin-top: 34px; padding-top: 20px; }
}
