/* Public pages: landing, privacy, auth (allauth) and the account page.
   Built on the app.css contract; only page composition lives here. */

/* ---- landing: frame ---------------------------------------------------------------------- */

.page--landing { --page-max: 1240px; }
.page--landing > .lp-section { margin-top: clamp(72px, 4rem + 4vw, 128px); }
@media (min-width: 720px) { .page--landing > .page-actions { display: none; } }
/* phones: the docked sign-up slides in once the hero's own button has scrolled away (script in landing.html) */
@media (max-width: 719.98px) {
  .page--landing > .page-actions {
    transform: translateY(calc(100% + 24px)); visibility: hidden;
    transition: transform var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3);
  }
  .page--landing > .page-actions.is-shown {
    transform: none; visibility: visible;
    transition: transform var(--dur-3) var(--ease-out), visibility 0s;
  }
}

.lp-section {
  padding-top: var(--s-7);
  border-top: 3px double var(--line-2);
}
.lp-head { margin-bottom: var(--s-6); max-width: 46rem; }
.lp-head h2, .lp-tuner h2 {
  font-size: clamp(1.625rem, 1.25rem + 1.5vw, 2.375rem);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.lp-head p { margin-top: var(--s-3); color: var(--text-2); font-size: var(--fs-md); max-width: 60ch; }

.lp-lead { color: var(--text-2); font-size: var(--fs-md); line-height: 1.55; max-width: 44ch; }
.lp-caption { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--text-3); }

/* ---- landing: hero ----------------------------------------------------------------------- */

.lp-hero {
  display: grid;
  gap: var(--s-7);
  padding-top: clamp(var(--s-2), 3vw, var(--s-7));
}
.lp-hero h1 {
  font-size: clamp(2.125rem, 1.35rem + 3.1vw, 3.625rem);
  line-height: 1;
  letter-spacing: .01em;
  font-stretch: 88%;
}
.lp-hero .lp-lead { margin-top: var(--s-5); }
.lp-fine { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--text-3); max-width: 52ch; }
.lp-fine a { color: var(--text-2); }

/* «Пилот» / «Инженер»: the two account types, each to the sign-up with its card chosen */
.lp-start { margin-top: var(--s-6); }
.lp-start > .label { margin-bottom: var(--s-3); color: var(--text-2); }
.lp-start-grid { display: grid; gap: var(--s-4); }
.lp-start-item { display: grid; gap: var(--s-2); align-content: start; }
.lp-start-item > .btn { width: 100%; }
.lp-start-item > p { font-size: var(--fs-sm); color: var(--text-2); max-width: 32ch; }
@media (min-width: 480px) { .lp-start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .lp-hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: clamp(var(--s-6), 4vw, var(--s-8));
  }
}

/* the example: a session date, the verdict board, the chart moment */
.lp-demo { margin: 0; display: grid; gap: var(--s-4); min-width: 0; }
.lp-demo-head { display: flex; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; }
.lp-demo-head .numeral { font-size: clamp(2.5rem, 1.9rem + 2.2vw, 3.75rem); }
.lp-demo-meta { display: grid; gap: 4px; padding-bottom: 4px; line-height: 1.3; min-width: 0; }
.lp-demo-meta .cluster { --gap: var(--s-2); }
.lp-demo-meta .muted { font-size: var(--fs-sm); }
.lp-demo .board { gap: var(--s-3); padding: var(--s-4); grid-template-columns: minmax(0, 1fr); }
.lp-demo .board-message { font-size: clamp(1.125rem, 1rem + .55vw, 1.375rem); }
.lp-demo .lp-caption { margin-top: 0; }

/* ---- landing: oscilloscope chart --------------------------------------------------------- */

.lp-scope {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: var(--s-2);
  scroll-margin-top: calc(var(--topbar-h) + var(--s-4));
}
.lp-lane-head {
  grid-column: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-4);
  margin: var(--s-2) 0 6px;
}
.lp-lane-head .label { margin-right: auto; color: var(--text-2); }
.lp-legend { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label);
  color: var(--text-3); }
.lp-key { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--text); }
.lp-key--target { border-top: 2px dashed var(--cyan); }
.lp-lane { display: contents; }
.lp-yaxis {
  position: relative;
  font-family: var(--font-display); font-size: .7rem; font-weight: 600; font-stretch: 80%;
  font-variant-numeric: tabular-nums lining-nums; color: var(--text-3); text-align: right;
}
.lp-yaxis span { position: absolute; right: 0; transform: translateY(-50%); line-height: 1; }
.lp-plot { position: relative; height: clamp(168px, 12rem + 3vw, 232px); overflow: hidden; }
.lp-plot--lane {
  height: 56px;
  background-size: 100% 100%, 100% 100%, 100% 7px, 7px 100%, 10% 100%, 100% 50%;
}
.lp-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-trace { fill: none; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round;
  vector-effect: non-scaling-stroke; }
.lp-trace--actual { stroke: var(--text); }
.lp-trace--target { stroke: var(--cyan); stroke-width: 1.5; stroke-dasharray: 5 4; }
.lp-trace--retard { stroke: var(--orange); stroke-width: 2; }
/* the finding window 937.24-938.12 s and the cursor at 937.48 s, on a 935-940 s axis */
.lp-band {
  position: absolute; top: 0; bottom: 0; left: 44.8%; width: 17.6%;
  background: rgb(var(--orange-rgb) / .1);
  border-inline: 1px solid rgb(var(--orange-rgb) / .4);
}
.lp-cursor { position: absolute; top: 0; bottom: 0; left: 49.6%; border-left: 1px solid var(--orange-core); }
.lp-cursor-tag {
  position: absolute; top: 6px; left: 6px;
  padding: 2px 5px;
  font-family: var(--font-display); font-size: .7rem; font-weight: 700; font-stretch: 80%;
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
  color: var(--on-orange); background: var(--orange-core); border-radius: 2px;
}
.lp-xaxis {
  grid-column: 2;
  position: relative; height: 1.25rem; margin-top: 6px;
  font-family: var(--font-display); font-size: .7rem; font-weight: 600; font-stretch: 80%;
  font-variant-numeric: tabular-nums lining-nums; color: var(--text-3);
}
.lp-xaxis span { position: absolute; top: 0; transform: translateX(-50%); }
.lp-xaxis span:first-child { transform: none; }
.lp-xaxis span:last-child { transform: translateX(-100%); }
@media (max-width: 559.98px) { .lp-xaxis span:nth-child(even) { display: none; } }
.lp-readout {
  grid-column: 2;
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin: var(--s-3) 0 0; padding: var(--s-3) 0 0;
  border-top: 1px solid var(--line);
}
.lp-readout > div { display: grid; gap: 2px; }
.lp-readout dt { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 600;
  font-stretch: 84%; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.lp-readout dd {
  margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 650;
  font-stretch: 84%; font-variant-numeric: tabular-nums lining-nums; line-height: 1.1;
}
.lp-readout > div:last-child dd { color: var(--orange-core); }

/* ---- landing: how it works (a signal chain) ---------------------------------------------- */

.lp-chain { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6); }
.lp-step {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: var(--s-4);
  row-gap: var(--s-2);
  align-content: start;
}
.lp-step > .lamp { grid-row: 1 / span 3; font-size: 1.1rem; }
.lp-step h3 { align-self: center; min-height: 48px; display: flex; align-items: center; }
.lp-step p { color: var(--text-2); max-width: 36ch; }
.lp-step .label { color: var(--text-3); }
.lp-step:not(:last-child)::after {
  content: "";
  position: absolute; left: 22.5px; top: 56px; bottom: calc(-1 * var(--s-6) + 8px);
  border-left: 3px double var(--line-3);
}
@media (min-width: 900px) {
  .lp-chain { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
  .lp-step { grid-template-columns: minmax(0, 1fr); }
  .lp-step > .lamp { grid-row: auto; margin-bottom: var(--s-2); }
  .lp-step h3 { min-height: 0; }
  .lp-step:not(:last-child)::after {
    left: 60px; right: calc(-1 * var(--s-5) + 12px); top: 22.5px; bottom: auto;
    border-left: 0; border-top: 3px double var(--line-3);
  }
}

/* ---- landing: report excerpt ------------------------------------------------------------- */

.lp-report { display: grid; gap: var(--s-4); }
@media (min-width: 900px) {
  .lp-report { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
}
.lp-sheet > * + * { margin-top: var(--s-4); }
.lp-sheet > p { max-width: 68ch; }
.lp-finding-head { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-start;
  justify-content: space-between; }
.lp-finding-head h3 { flex: 1 1 20rem; font-size: var(--fs-lg); }
.lp-sheet h4 { margin-top: var(--s-5); }
.lp-todo { margin: var(--s-2) 0 0; padding-left: 1.4em; display: grid; gap: var(--s-2); }
.lp-todo li::marker { font-family: var(--font-display); font-weight: 700; color: var(--text-3); }
.lp-note { padding-top: var(--s-3); border-top: 1px solid var(--line); color: var(--text-3);
  font-size: var(--fs-sm); }
.lp-good .list-row { grid-template-columns: auto minmax(0, 1fr); min-height: 0; padding-block: 11px; }

/* ---- landing: ECUs, price ---------------------------------------------------------------- */

.lp-ecus .list-row { min-height: 76px; }
.lp-ecus .list-row strong { font-size: var(--fs-md); }
.lp-ecus .list-row .muted { display: block; max-width: 60ch; }
.lp-ecus .lamp--lg { font-size: .95rem; }
@media (max-width: 559.98px) {
  .lp-ecus .list-row { grid-template-columns: auto minmax(0, 1fr); }
  .lp-ecus .list-row > .tag { grid-column: 2; justify-self: start; }
}

/* the engineer's cabinet: what a tuner with many clients gets */
.lp-cabinet { display: grid; gap: var(--s-5); }
.lp-cabinet .lp-head { margin-bottom: 0; }
.lp-cabinet .form-actions { margin-top: var(--s-5); }
.lp-cabinet-facts { margin-top: 0; }
.lp-cabinet-facts > div:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 900px) {
  .lp-cabinet { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); }
  .lp-cabinet-facts > div:first-child { border-top: 1px solid var(--line); padding-top: var(--s-4); }
}

/* the prices: one column per account type, then the packs and how to pay */
.lp-tiers { display: grid; gap: var(--s-4); }
@media (min-width: 760px) { .lp-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lp-tier { display: flex; flex-direction: column; gap: var(--s-3); }
.lp-tier > * + * { margin-top: 0; }
.lp-tier-name {
  font-family: var(--font-display); font-size: 1rem; font-weight: 650; font-stretch: 86%;
  letter-spacing: .09em; text-transform: uppercase; color: var(--text-2);
}
.lp-tier .numeral { font-size: clamp(3rem, 2.2rem + 2.6vw, 4.5rem); white-space: nowrap; }
.lp-tier-what { color: var(--text-2); }
.lp-tier .lp-checks { margin: var(--s-2) 0; }
.lp-tier > .muted { font-size: var(--fs-sm); }
.lp-tier-cta { margin-top: auto; align-self: flex-start; }
@media (max-width: 559.98px) { .lp-tier-cta { align-self: stretch; } }
.lp-packs { margin-top: var(--s-4); }
.lp-packs > h3 { margin-bottom: var(--s-1); }
.lp-packs > .muted { margin-bottom: var(--s-3); }
.lp-packs .list-row .numeral { font-size: 2rem; min-width: 10rem; white-space: nowrap; }
/* the unit keeps the label size (12px), not .3em of the numeral */
.lp-packs .list-row .numeral small { font-size: max(.3em, var(--fs-label)); }
.lp-packs .list-row .muted { display: block; }
/* phones: «токенов» under the number, one fixed column so the prices line up row to row */
@media (max-width: 559.98px) {
  .lp-packs .list-row { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .lp-packs .list-row > .tag { grid-column: 2; justify-self: start; }
  .lp-packs .list-row .numeral { min-width: 0; font-size: 1.625rem; }
  .lp-packs .list-row .numeral small { display: block; margin: .35em 0 0; }
}
.lp-prices { margin-top: var(--s-4); color: var(--text-2); max-width: 80ch; }
.lp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.lp-checks li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.lp-checks li > span { color: var(--text-2); }
.lp-checks .icon { color: var(--green); margin-top: 2px; }
.lp-buy { margin-top: var(--s-4); }
.lp-buy > h3 { margin-bottom: var(--s-4); }
.lp-buy > .muted { margin-bottom: var(--s-4); }
.lp-buy-steps { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-4); }
.lp-buy-steps li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--s-3);
  align-items: baseline; }
.lp-buy-steps .numeral { font-size: 2.25rem; color: var(--text-3); }
@media (min-width: 900px) { .lp-buy-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lp-buy .form-actions { margin-top: var(--s-4); }

/* ---- landing: the tuner, FAQ, close ------------------------------------------------------ */

.lp-tuner { display: grid; gap: var(--s-6); align-items: center; }
.lp-badge { display: block; width: min(100%, 280px); margin-inline: auto;
  filter: drop-shadow(0 18px 32px rgb(0 0 0 / .7)); }
@media (min-width: 900px) {
  .lp-tuner { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s-8); }
  .lp-badge { width: min(100%, 340px); }
}
.lp-tuner .stack { --gap: var(--s-4); }
.lp-tuner .lp-lead { max-width: 60ch; }
.lp-facts { margin: var(--s-2) 0 0; display: grid; }
.lp-facts > div { padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.lp-facts > div:last-child { padding-bottom: 0; }
.lp-facts dt { font-weight: 700; color: var(--text); }
.lp-facts dd { margin: var(--s-1) 0 0; color: var(--text-2); max-width: 62ch; }

/* the questions, one panel per account type */
.lp-faq-groups { display: grid; gap: var(--s-4); }
@media (min-width: 1100px) { .lp-faq-groups { grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); align-items: start; } }
.lp-faq-name {
  padding-top: var(--s-3);
  font-family: var(--font-display); font-size: .9rem; font-weight: 650; font-stretch: 86%;
  letter-spacing: .09em; text-transform: uppercase; color: var(--text-3);
}
.lp-faq { max-width: 52rem; padding-block: var(--s-2); }
.lp-faq > * + * { margin-top: 0; }
.lp-faq details + details { border-top: 1px solid var(--line); }
.lp-faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: 60px; padding: var(--s-3) 0;
  list-style: none; font-weight: 600; font-size: var(--fs-md); line-height: 1.3;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary:hover { color: var(--text); }
.lp-faq summary .icon { color: var(--text-3); transition: transform var(--dur-2) var(--ease-out); }
.lp-faq details[open] summary .icon { transform: rotate(90deg); color: var(--text); }
.lp-faq details > p { max-width: 64ch; color: var(--text-2); padding-bottom: var(--s-4); }
.lp-faq details > p + p { margin-top: calc(-1 * var(--s-2)); }
.lp-faq summary:focus-visible { outline-offset: 2px; }

.lp-close { border-top: 0; padding-top: 0; }
.lp-close .board-message { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); }
.lp-colophon {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-6);
  font-family: var(--font-display); font-size: .8rem; font-weight: 600; font-stretch: 80%;
  letter-spacing: .1em; text-transform: uppercase;
}
.lp-colophon a { color: var(--text-3); text-decoration: none; min-height: 32px;
  display: inline-flex; align-items: center; }
.lp-colophon a:hover { color: var(--text); }

/* ---- privacy ----------------------------------------------------------------------------- */

.page--doc { --page-max: 800px; }
.page--doc .panel > h2 { margin-bottom: var(--s-2); }
.page--doc .lp-facts { margin-top: 0; }
.page--doc .lp-facts > div:first-child { border-top: 0; padding-top: var(--s-2); }

/* the legal documents (core/legal/): long text, one column, readable on a phone */
.legal { max-width: 72ch; overflow-wrap: anywhere; }
.legal > * + * { margin-top: var(--s-3); }
.legal > h2 { margin-top: var(--s-6); font-size: var(--fs-md); }
.legal > h2:first-child { margin-top: 0; }
.legal [id] { scroll-margin-top: calc(var(--topbar-h) + var(--s-4)); }
.legal p, .legal li { color: var(--text-2); }
.legal strong { color: var(--text); }
.legal ul { margin-bottom: 0; padding-left: 1.25em; display: grid; gap: var(--s-2); }
.legal li::marker { color: var(--text-3); }
.legal-req { display: grid; margin: 0; border-top: 1px solid var(--line); }
.legal-req > div { display: grid; gap: 0 var(--s-4); padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 600px) { .legal-req > div { grid-template-columns: 12rem minmax(0, 1fr); } }
.legal-req dt { color: var(--text-3); }
.legal-req dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.legal .legal-prices { list-style: none; padding: 0; gap: 0; border-top: 1px solid var(--line); }
.legal-prices li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-4);
  padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
.legal-prices strong { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- auth pages (inside the allauth layout) ---------------------------------------------- */

.is-auth .auth-badge { width: 136px; height: 136px; }
.is-auth .page > h1 { margin-top: var(--s-4); }
.auth-lead { text-align: center; color: var(--text-2); max-width: 38ch; margin-inline: auto; }
.page > .auth-lead { margin-top: var(--s-3); }
.auth-alt { text-align: center; color: var(--text-3); }
.auth-alt a { color: var(--text); }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.field-aside { font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; margin-bottom: 6px; }
.field-help ul { margin: 4px 0 0; padding-left: 1.1em; display: grid; gap: 2px; }
.field--check label a { color: var(--text); }
.is-auth .page form:not(.segmented) > .notice { margin: 0; }
.is-auth .page > .notice .btn { margin-top: var(--s-3); }
.is-auth .page > .btn--block { margin-top: var(--s-4); }

/* ---- account page ------------------------------------------------------------------------ */

.page--account { --page-max: 720px; }
.page--account .page-head p { overflow-wrap: anywhere; }
.page--account .list-row .icon { color: var(--text-3); }
.page--account .list-row .muted { display: block; }
.page--account .section { margin-top: var(--s-6); }
.page--account .section > h2 { margin-bottom: var(--s-3); }
.acc-emails .list-row {
  cursor: pointer; grid-template-columns: auto minmax(0, 1fr); margin: 0;
  font: 400 var(--fs-base) / 1.4 var(--font-body); letter-spacing: 0; text-transform: none;
  color: var(--text);
}
.acc-emails .list-row:hover { background: var(--panel-2); }
.acc-emails .list-row > .cluster { grid-column: 2; --gap: var(--s-2); }
@media (min-width: 560px) {
  .acc-emails .list-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .acc-emails .list-row > .cluster { grid-column: auto; }
}
.acc-email { overflow-wrap: anywhere; font-weight: 600; }
.acc-logout { margin-top: var(--s-6); }
