/* Trade Up Checker: page layout, hero with the checker (text or screenshot), how it works with an
   example result, why check (output prices, fill time, input prices), FAQ, final CTA and footer.
   lp-* rules are copied from finder_guide.css, the same way calculator_guide.css copies them. If you move
   lp-* into a shared stylesheet later, delete them here too. ck-* rules are for this page only. */

/* ===== Page layout: no app panels here, the page just scrolls ===== */
body.checker-page {
  display: block;
  height: auto;
  min-height: 100dvh;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ===== Tokens (same as finder_guide.css) ===== */
:root {
  --lp-page: #212121;
  --lp-panel: #1c1c1c;
  --lp-card: #212121;
  --lp-line: #363636;
  --lp-line-strong: #424242;
  --lp-text-strong: #f2f2f2;
  --lp-text-soft: #c2c2c2;
  --lp-text: #a3a3a3;
  --lp-muted: #8a8a8a;
  --lp-blue: #387fb4;
  --lp-blue-text: #5b9bd0;
  --lp-action: #4676b5;
  --lp-action-hover: #3e6aa6;
  --lp-teal: #52a49a;
  --lp-covert: #d95752;
  --lp-data: #0081b9;
  --lp-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

/* Base */
.lp {
  color: var(--lp-text);
  font-family: var(--lp-font);
  font-size: 17px;
  line-height: 1.6;
}
.lp *, .lp *::before, .lp *::after { box-sizing: border-box; }
.lp :where(h1, h2, h3, p, ol, ul, dl, dd, figure, figcaption) { margin: 0; padding: 0; }
.lp :where(ol, ul) { list-style: none; }
.lp :where(a) { color: inherit; }

.lp-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.lp-wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}
.lp-section { padding-block: clamp(72px, 9vw, 136px); }

#checker,
#how-it-works,
#why-check,
#faq { scroll-margin-top: 80px; }

/* Type */
.lp-h2 {
  max-width: 17em;
  color: var(--lp-text-strong);
  font-size: clamp(1.85rem, 1.2rem + 2.2vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.lp-h3 {
  color: var(--lp-text-strong);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.012em;
}
.lp-lead {
  max-width: 34em;
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  line-height: 1.55;
}
.lp-prose { max-width: 36em; }
.lp-prose > p { margin-top: 1.1em; }

.lp-textlink {
  color: var(--lp-text-strong);
  text-decoration: underline;
  text-decoration-color: #5c5c5c;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.lp-textlink:hover { text-decoration-color: var(--lp-text-strong); }

/* Buttons & focus */
.lp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.lp-btn--primary { background: var(--lp-action); color: #fff; }
.lp-btn--primary:hover { background: var(--lp-action-hover); }
.lp-btn--ghost { border-color: var(--lp-line-strong); background: none; color: var(--lp-text-soft); }
.lp-btn--ghost:hover { border-color: #5e5e5e; color: var(--lp-text-strong); }

.lp a:focus-visible,
.lp button:focus-visible,
.lp summary:focus-visible {
  outline: 2px solid #8fb4e6;
  outline-offset: 3px;
}

.lp-panel {
  background: var(--lp-panel);
  border-radius: 24px;
}
.lp-tag {
  display: inline-block;
  margin-bottom: 24px;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--lp-panel);
  color: var(--lp-text-soft);
  font-size: 15px;
  line-height: 1.2;
}

/* Shared panel parts */
.lp-hw-panel {
  padding: clamp(18px, 2.6vw, 28px);
  font-variant-numeric: tabular-nums;
}
.lp-hw-title {
  color: var(--lp-text-strong);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}
.lp-hw-sub {
  margin-top: 2px;
  color: var(--lp-muted);
  font-size: 14px;
  line-height: 1.4;
}
.lp-hw-foot { margin-top: 18px; color: rgba(163, 163, 163, 0.7); font-size: 12px; line-height: 1.5; }

.lp-split {
  display: grid;
  align-items: center;
  gap: 48px;
}
@media (min-width: 980px) {
  .lp-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 72px; }
}

/* Steps (same as the finder guide) */
.lp-step {
  position: relative;
  padding-left: 58px;
}
.lp-step-num {
  position: absolute;
  top: -3px;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--lp-line-strong);
  border-radius: 50%;
  background: var(--lp-page);
  color: var(--lp-text-soft);
  font-size: 15px;
  font-weight: 700;
}
.lp-step p { max-width: 31em; margin-top: 10px; }

/* ===== Hero with the checker ===== */
.ck-nobr { white-space: nowrap; }
.ck-hero {
  /* 50px for the navbar on top */
  padding-block: calc(50px + clamp(48px, 7vw, 104px)) clamp(32px, 4vw, 56px);
}
.ck-hero-inner {
  display: grid;
  justify-items: center;
  text-align: center;
}
.ck-title {
  color: var(--lp-text-strong);
  font-size: clamp(2.6rem, 1.4rem + 4.2vw, 4.8rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.ck-lead {
  margin-top: 20px;
  max-width: 32em;
  text-wrap: pretty;
}

/* The checker: one box for text or a screenshot, the actions below it */
.ck-card {
  width: 100%;
  max-width: 780px;
  margin-top: clamp(32px, 4vw, 44px);
  padding: 10px;
  border: 1px solid #2a2a2a;
  border-radius: 24px;
  background: var(--lp-panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  text-align: left;
  font-family: Inter, var(--lp-font);
}
.ck-drop {
  position: relative;
  min-height: 210px;
  border: 1px dashed var(--lp-line-strong);
  border-radius: 16px;
  transition: border-color 0.15s, background-color 0.15s;
}
.ck-drop:focus-within { border-color: #5e5e5e; }

.lp .ck-text {
  display: block;
  width: 100%;
  min-height: 208px;
  max-height: 60vh;
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: var(--lp-text-soft);
  font: 15px/1.6 Inter, var(--lp-font);
  resize: vertical;
  outline: none;
}
.ck-text::placeholder { color: rgba(163, 163, 163, 0.55); }
.ck-text[hidden] { display: none; }

/* Screenshot added: thumbnail instead of the text field */
.ck-file {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 208px;
  padding: 18px 20px;
}
.ck-file[hidden] { display: none; }
.ck-file-img {
  display: block;
  flex: none;
  max-width: min(55%, 320px);
  max-height: 170px;
  border: 1px solid var(--lp-line);
  border-radius: 10px;
  object-fit: contain;
  background: var(--lp-page);
}
.ck-file-meta { flex: 1; min-width: 0; }
.ck-file-name {
  overflow: hidden;
  color: var(--lp-text-strong);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ck-file-size { margin-top: 2px; color: var(--lp-muted); font-size: 13px; }
.lp .ck-file-remove {
  display: grid;
  place-items: center;
  flex: none;
  align-self: flex-start;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--lp-line);
  border-radius: 8px;
  background: none;
  color: var(--lp-text);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.lp .ck-file-remove:hover { border-color: #5e5e5e; background: #2b2b2b; color: var(--lp-text-strong); }

/* Dragging a file over the page */
.ck-drop-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  background: rgba(28, 28, 28, 0.92);
  color: #9fd6f0;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.ck-drop.is-dragover {
  border-style: solid;
  border-color: var(--lp-data);
  background: rgba(0, 129, 185, 0.08);
}
.ck-drop.is-dragover .ck-drop-overlay { opacity: 1; }

/* Actions */
.ck-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 4px 4px;
}
.ck-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--lp-line-strong);
  border-radius: 10px;
  color: var(--lp-text-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.ck-upload:hover { border-color: #5e5e5e; color: var(--lp-text-strong); }
.ck-upload:focus-within {
  outline: 2px solid #8fb4e6;
  outline-offset: 3px;
}
.ck-hint {
  margin-right: auto;
  color: var(--lp-muted);
  font-size: 13px;
  line-height: 1.4;
}
.ck-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--lp-line);
  border-radius: 5px;
  background: var(--lp-page);
  color: var(--lp-text-soft);
  font: 12px/1.4 Inter, sans-serif;
}
@media (hover: none) and (pointer: coarse) {
  /* phones and tablets: no keyboard shortcut to paste a screenshot */
  .ck-hint { display: none; }
}
@media (max-width: 560px) {
  .ck-hint { display: none; }
  .ck-upload,
  .lp .ck-submit { flex: 1 1 100%; justify-content: center; }
  .lp .ck-text { min-height: 170px; }
  .ck-drop, .ck-file { min-height: 170px; }
}
.lp .ck-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--lp-action);
  color: #fff;
  font: 700 15px/1.2 Inter, var(--lp-font);
  cursor: pointer;
  transition: background-color 0.15s;
}
.lp .ck-submit:hover { background: var(--lp-action-hover); }
.lp .ck-submit:disabled { cursor: progress; }
.ck-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ck-spin 0.8s linear infinite;
}
@keyframes ck-spin { to { transform: rotate(360deg); } }
.ck-card.is-loading .ck-spinner { display: block; }
.ck-card.is-loading .ck-text,
.ck-card.is-loading .ck-file { opacity: 0.55; }
.ck-card.is-loading .ck-upload,
.ck-card.is-loading .ck-file-remove { pointer-events: none; opacity: 0.5; }

.ck-status {
  padding: 0 8px;
  color: var(--lp-text);
  font-size: 14px;
  line-height: 1.45;
}
.ck-status:not(:empty) { padding-block: 10px 6px; }
.ck-status.is-error { color: #ef8a87; }
.ck-status.is-ok { color: #6cc4b9; }

/* Three short points under the checker */
.ck-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-top: 22px;
  color: var(--lp-muted);
  font-size: 14px;
  line-height: 1.4;
}
.ck-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ck-points li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 6px;
  margin-top: -3px;
  border-bottom: 1.6px solid var(--lp-teal);
  border-left: 1.6px solid var(--lp-teal);
  transform: rotate(-45deg);
}

/* ===== How it works ===== */
.ck-how .lp-lead { margin-top: 24px; }
.ck-how-grid {
  display: grid;
  gap: 48px;
  margin-top: clamp(40px, 5vw, 72px);
}
@media (min-width: 1000px) {
  .ck-how-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
    gap: clamp(48px, 5vw, 88px);
  }
}
.ck-steps { display: grid; gap: 40px; }
@media (min-width: 1000px) {
  /* line between the step numbers, like the finder guide */
  .ck-steps .lp-step::after {
    content: "";
    position: absolute;
    top: 31px;
    bottom: -40px;
    left: 17px;
    width: 1px;
    background: var(--lp-line);
  }
  .ck-steps .lp-step:last-child::after { display: none; }
}

/* Example result: same look as the calculator's result bar */
.ck-result-box {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--lp-page);
  font-family: Inter, var(--lp-font);
  line-height: normal;
}
.ck-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 24px;
}
.ck-result-cell { min-width: 0; }
.ck-result-label { color: rgba(163, 163, 163, 0.7); font-size: 12px; }
.ck-result-value {
  margin-top: 2px !important;
  color: var(--lp-text-strong);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}
.ck-result-cell--fill .ck-result-value { font-size: 26px; }
.ck-result-value.is-neg { color: #ef5350; }
.ck-result-note {
  margin-top: 3px !important;
  overflow: hidden;
  color: var(--lp-text);
  font-size: 12px;
  line-height: 1.4;
}
@media (max-width: 700px) {
  .ck-result-box { padding: 14px; }
  .ck-result-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
  .ck-result-cell--fill { grid-column: 1 / -1; }
  .ck-result-value { font-size: 17px; }
  .ck-result-cell--fill .ck-result-value { font-size: 22px; }
}

/* ===== Why check ===== */
.ck-why .lp-lead { margin-top: 24px; }
.ck-reason { margin-top: clamp(56px, 7vw, 104px); }
.ck-reason .lp-h3 { font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.6rem); }
.ck-reason-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0 0 18px !important;
  border: 1px solid var(--lp-line-strong);
  border-radius: 50%;
  color: var(--lp-text-soft);
  font-size: 15px;
  font-weight: 700;
}
.ck-reason--small .lp-prose { max-width: 44em; }

/* Reason 1: listing vs. buy order */
.ck-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font: 14px/1.3 Inter, var(--lp-font);
  font-variant-numeric: tabular-nums;
}
.ck-table th,
.ck-table td {
  padding: 11px 8px;
  text-align: right;
  white-space: nowrap;
}
.ck-table th:first-child { padding-left: 0; text-align: left; }
.ck-table thead th {
  color: var(--lp-muted);
  font-size: 13px;
  font-weight: 400;
  border-bottom: 1px solid var(--lp-line);
}
.ck-table tbody th { color: var(--lp-text-soft); font-weight: 400; }
.ck-table tbody td { color: var(--lp-text); }
.ck-table tbody tr + tr > * { border-top: 1px solid #2a2a2a; }
.ck-table tfoot > tr > * { border-top: 1px solid var(--lp-line); color: var(--lp-text-soft); }
.ck-table tfoot th { font-weight: 400; color: var(--lp-muted); }
.ck-table-roi > * { font-size: 16px; font-weight: 700; }
.ck-table .is-used { background: rgba(82, 164, 154, 0.08); color: var(--lp-text-strong); }
.ck-table thead .is-used { border-radius: 8px 8px 0 0; color: #8fd3ca; }
.ck-table tfoot tr:last-child .is-used { border-radius: 0 0 8px 8px; }
.ck-table .is-pos { color: #26a69a; }
.ck-table .is-neg { color: #ef5350; }
.ck-dot {
  display: inline-block;
  width: 3px;
  height: 14px;
  margin-right: 10px;
  border-radius: 2px;
  background: var(--c);
  vertical-align: -2px;
}

/* Reason 2: time to buy per input */
.ck-fill { container-type: inline-size; }
.ck-fill-rows { margin-top: 20px; }
.ck-fill-row {
  display: grid;
  grid-template-columns: 96px 52px minmax(0, 1fr) 72px;
  align-items: center;
  column-gap: 12px;
  padding: 7px 0;
  color: var(--lp-text-soft);
  font: 13px/18px Inter, var(--lp-font);
  font-variant-numeric: tabular-nums;
}
.ck-fill-name { white-space: nowrap; }
.ck-fill-float { color: var(--lp-text); }
.ck-fill-days { text-align: right; white-space: nowrap; }
.ck-fill-track {
  position: relative;
  height: 12px;
  border-radius: 3px;
  background: #262626;
}
.ck-fill-bar {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 4px;
  border-radius: 3px;
  background: #707070;
}
.ck-fill-row.is-slowest .ck-fill-bar { background: var(--lp-blue-text); }
.ck-fill-row.is-slowest .ck-fill-days { color: var(--lp-text-strong); font-weight: 700; }
.ck-fill-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px !important;
  padding-top: 14px;
  border-top: 1px solid var(--lp-line);
  color: var(--lp-muted);
  font-size: 14px;
}
.ck-fill-total b { color: var(--lp-text-strong); font-size: 20px; }
@container (max-width: 420px) {
  .ck-fill-row {
    grid-template-columns: minmax(0, 1fr) 52px 72px;
    grid-template-areas: "name float days" "track track track";
    row-gap: 6px;
  }
  .ck-fill-name { grid-area: name; }
  .ck-fill-float { grid-area: float; }
  .ck-fill-days { grid-area: days; }
  .ck-fill-track { grid-area: track; }
}

/* ===== FAQ ===== */
.lp-faq-grid {
  display: grid;
  gap: 32px 72px;
}
@media (min-width: 980px) {
  .lp-faq-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); align-items: start; }
}
.lp-qa { border-top: 1px solid var(--lp-line); }
.lp-qa:last-child { border-bottom: 1px solid var(--lp-line); }
.lp-qa summary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
  color: var(--lp-text-strong);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.lp-qa summary::-webkit-details-marker { display: none; }
.lp-qa-icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 5px;
}
.lp-qa-icon::before,
.lp-qa-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--lp-text);
  transition: transform 0.2s;
}
.lp-qa-icon::after { transform: rotate(90deg); }
.lp-qa[open] .lp-qa-icon::after { transform: rotate(0deg); }
.lp-qa-a {
  max-width: 40em;
  padding: 0 40px 26px 0;
}
@media (max-width: 600px) {
  .lp-qa-a { padding-right: 0; }
}

/* ===== Final CTA ===== */
.lp-final { padding-top: 0; }
.lp-final-panel { padding: clamp(32px, 6vw, 80px); }
.lp-final-panel .lp-lead { margin-top: 18px; }

/* ===== Footer ===== */
.lp-footer {
  border-top: 1px solid var(--lp-line);
  background: var(--lp-panel);
}
.lp-footer-inner {
  display: grid;
  gap: 20px;
  padding-block: 40px 48px;
}
.lp-footer-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}
.lp-footer-links a {
  color: var(--lp-text);
  font-size: 15px;
  text-decoration: none;
}
.lp-footer-links a:hover { color: var(--lp-text-strong); }
.lp-footer-note {
  max-width: 62em;
  color: var(--lp-muted);
  font-size: 14px;
}