/*
 * The selling pages: /pricing, /fixes, /fixes/{key}, /full-service and the first step of buying (start, the Full
 * Service check), in look v3 (docs/DESIGN.md): white cards on the paper page, the price said in plain words with
 * when it is owed, and one ink button per screen. A form is one centred column; a product page puts its price and
 * carrier beside the page on a desk (.sell-aside, sticky); the catalogue lays its fixes out as a grid.
 * The shared parts (buttons, notices, the carrier's name, the violation card, questions) come from app.css and
 * site.css; only what they lack is here. Nothing here relies on fixes.css.
 */

.sell main { background: var(--desk); }

/* ---------- The column: the same on a phone and a desk, centred ---------- */
.sell-col { max-width: 44rem; padding-top: var(--s-4); padding-bottom: var(--s-2); }
@media (min-width: 48rem) { .sell-col { padding-top: var(--s-6); } }
.sell-col > .flashes, .sell-head .flashes { margin: 0 0 var(--s-4); }

/* ---------- The top: the name in plain words and one sentence ---------- */
.sell-head { margin: 0 0 var(--s-5); }
.sell-head .back { margin: 0 0 var(--s-2); }
.sell-title { font-size: var(--step-3); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 var(--s-3); }
.sell-lead { font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); margin: 0; max-width: var(--measure); }
.sell-head .alert { margin: var(--s-4) 0 0; }
.terms-note { font-size: 1rem; color: var(--ink-2); margin: var(--s-3) 0 0; }

/* ---------- A section: a heading on the page, its content on a white card ---------- */
.sell-section { margin-top: var(--s-7); }
.sell-section > h2, .sell-h2 { font-size: var(--step-2); line-height: 1.25; margin: 0 0 var(--s-3); }
.sell-section > .sell-intro { color: var(--ink-2); margin: 0 0 var(--s-4); max-width: var(--measure); }
.sell-card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--s-5) var(--s-4);
}
@media (min-width: 30rem) { .sell-card { padding: var(--s-5); } }
.sell-card > :last-child { margin-bottom: 0; }
.sell-card > .more:last-child { border-bottom: 0; padding-bottom: 0; }
.sell-card + .sell-card { margin-top: var(--s-3); }
/* The free section's link to the guide with the steps (critic read of PR #101). */
.sell-card .free-guide { margin-top: var(--s-3); font-weight: 650; }
.sell-card > h3 { font-size: var(--step-1); margin: 0 0 var(--s-2); }
.sell-card > * + h3 { margin-top: var(--s-5); }
.sell-card .fine-print { margin-top: var(--s-4); }
.sell-card > .table-wrap { margin-bottom: 0; }

/* ---------- The offer: the price and when it is owed, then the one button ---------- */
.sell-offer { display: grid; gap: var(--s-3); }
.sell-offer > * { margin: 0; }
.sell-offer > .alert { margin: 0; }
.sell-price { margin: 0; font-size: var(--step-2); line-height: 1.3; color: var(--ink); }
.sell-price strong, .sell-price-then strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.sell-price-then { margin: 0; color: var(--ink); }
.sell-price-small { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.sell-offer .button { width: 100%; justify-content: space-between; text-align: left; }
@media (min-width: 40rem) { .sell-offer .button { width: auto; min-width: 20rem; } }
.sell-offer__go { margin: var(--s-2) 0 0; }
.sell-offer__alt { margin: 0; }
.sell-offer__alt a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; }

/* Who it is for: the carrier's name, under the offer. */
.sell-for { display: grid; gap: var(--s-2); justify-items: start; margin-top: var(--s-3); }
.sell-for > * { margin: 0; }
.sell-for__label { font-size: 1rem; color: var(--ink-2); }
.sell-for .plate__name { font-size: var(--step-1); }
.sell-for__status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); }
.sell-for__link a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; }

/* ---------- Short lists: what you get, what we do not do ---------- */
.sell-ticks { list-style: none; margin: 0; padding: 0; }
.sell-ticks li { position: relative; padding: var(--s-3) 0 var(--s-3) 2rem; border-top: 1px solid var(--rule); }
.sell-ticks li:first-child { border-top: 0; padding-top: 0; }
.sell-ticks li:last-child { padding-bottom: 0; }
.sell-ticks li::before {
  content: ""; position: absolute; left: 0.3rem; top: calc(var(--s-3) + 0.3em); width: 0.55rem; height: 1rem;
  border-right: 3px solid var(--ink-2); border-bottom: 3px solid var(--ink-2); transform: rotate(45deg);
}
.sell-ticks li:first-child::before { top: 0.3em; }
.sell-nots { list-style: none; margin: 0; padding: 0; }
.sell-nots li { padding: var(--s-3) 0; border-top: 1px solid var(--rule); }
.sell-nots li:first-child { border-top: 0; padding-top: 0; }
.sell-nots h3 { font-size: var(--step-0); margin: 0 0 0.2rem; }
.sell-nots p { margin: 0; color: var(--ink-2); }

/* ---------- What you do: numbered steps ---------- */
.sell-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); }
.sell-step { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.sell-step__n {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--paper-2); border: 1.5px solid var(--rule-strong); color: var(--ink); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sell-step p { margin: 0.2rem 0 0; }

/* ---------- When you pay: the moment on the left, the amount on the right ---------- */
.sell-paylist { list-style: none; margin: 0; padding: 0; }
.sell-payrow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem var(--s-4); align-items: baseline;
  padding: var(--s-4) 0; border-top: 1px solid var(--rule);
}
.sell-payrow:first-child { border-top: 0; padding-top: 0; }
.sell-payrow:last-child { padding-bottom: 0; }
.sell-payrow > * { margin: 0; }
.sell-payrow__when { grid-column: 1; font-weight: 700; }
.sell-payrow__amount { grid-column: 2; grid-row: 1; text-align: right; font-size: var(--step-1); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sell-payrow__what { grid-column: 1 / -1; color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
/* A fee that is owed only on a result, or money that comes back: a plain label under the moment, so it never reads
   as a charge today. */
.sell-payrow__note {
  grid-column: 1 / -1; justify-self: start; margin: 0.1rem 0 0.2rem; padding: 0.1rem 0.6rem; border: 1.5px solid var(--ink-2);
  border-radius: 999px; font-size: 1rem; font-weight: 600; line-height: 1.4;
}
.sell-paynotes { margin-top: var(--s-4); }
.sell-paynotes h3 { font-size: var(--step-0); margin: 0 0 0.2rem; }
.sell-paynotes p { margin: 0 0 var(--s-3); color: var(--ink-2); }
.sell-paynotes > :last-child { margin-bottom: 0; }

/* A price table (drivers, trucks, the arithmetic): plain rows, the numbers on the right. */
.sell-table { width: 100%; margin: 0; font-size: 1rem; }
.sell-table th, .sell-table td { padding: 0.7rem 0.8rem; vertical-align: middle; }
.sell-table thead th { white-space: normal; line-height: 1.3; vertical-align: bottom; font-size: 1rem; }
.sell-table tbody th { font-weight: 600; }
.sell-table .sell-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sell-table thead th.sell-num { white-space: normal; }
.sell-table tbody tr:hover td { background: none; }

@media (max-width: 23rem) { .sell-table th, .sell-table td { padding-left: 0.55rem; padding-right: 0.55rem; } }

/* ---------- Questions ---------- */
.sell-card .faq { border-top: 0; max-width: none; }
.sell-card .faq details:last-child { border-bottom: 0; }
.sell-card .faq summary { font-size: var(--step-0); }
.sell-card .faq details:first-child summary { padding-top: 0; }
.faq__a a { font-weight: 600; }

/* ---------- The close: the same button again ---------- */
.sell-close { margin-top: var(--s-7); }
.sell-close .sell-h2 { margin-bottom: var(--s-2); }

/* ---------- The violation picker (a challenge with a carrier) ---------- */
.sell-picks { display: grid; gap: var(--s-3); }
.sell-picks .violation { margin: 0; padding: var(--s-4); background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.sell-picks .violation.is-picked { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.sell-picks .violation__head { display: grid; gap: 0.2rem; }
.sell-picks .violation__head .src { font-family: var(--font-sans); font-size: 1rem; color: var(--ink-2); }
.sell-picks .outlook { margin-top: var(--s-3); }
.sell-picks .outlook ul { font-size: 1rem; }
.sell-picks .outlook > p:not(.outlook__head) { margin: var(--s-2) 0 0; font-size: 1rem; color: var(--ink-2); }
.sell-pick__fee { margin: var(--s-3) 0 var(--s-2); font-weight: 600; }
.sell-pick__go { margin: 0; }
.sell-pick__go .button { width: 100%; }
@media (min-width: 40rem) { .sell-pick__go .button { width: auto; } }
.sell-pick__no { margin: var(--s-3) 0 0; color: var(--ink-2); }

/* ---------- /fixes: one white card per fix, the whole card opens its page ---------- */
.sell-fixes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.sell-fix {
  position: relative; display: grid; gap: var(--s-2); background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s-4);
  transition: border-color 120ms;
}
@media (min-width: 30rem) { .sell-fix { padding: var(--s-5); } }
.sell-fix:hover { border-color: var(--brand); }
.sell-fix:focus-within { border-color: var(--brand); }
.sell-fix > * { margin: 0; }
.sell-fix__name { font-size: var(--step-1); line-height: 1.3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.sell-fix__for { color: var(--ink-2); }
.sell-fix__price { font-size: var(--step-0); }
.sell-fix__price strong { font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.sell-fix__go a { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 48px; font-weight: 600; }
.sell-fix__go a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.sell-fix__go a:focus-visible { outline: none; }
.sell-fix__go a:focus-visible::after { outline: 3px solid var(--action); outline-offset: 2px; }
.sell-fix__go svg { width: 1.1em; height: 1.1em; }
.sell-tag {
  display: inline-flex; align-items: center; padding: 0.15rem 0.65rem; border-radius: 999px; background: var(--paper-2);
  border: 1px solid var(--rule-strong); color: var(--ink); font-size: 1rem; font-weight: 600; line-height: 1.4;
}

.sell-rules { margin: 0; padding-left: 1.2rem; }
.sell-rules li + li { margin-top: var(--s-2); }

/* ---------- The Challenge page's plain guide to a DataQs review (fixes/_dataqs_basics.html) ---------- */
.dataqs-list, .dataqs-codes { list-style: none; margin: 0; padding: 0; }
.dataqs-list li { padding: var(--s-2) 0; border-top: 1px solid var(--rule); }
.dataqs-list li:first-child { border-top: 0; padding-top: 0; }
.dataqs-codes li { padding: var(--s-3) 0; border-top: 1px solid var(--rule); }
.dataqs-codes li:first-child { border-top: 0; padding-top: 0; }
.dataqs-codes li:last-child { padding-bottom: 0; }
.dataqs-codes p { margin: 0; }
.dataqs-codes .dataqs-codes__name { font-weight: 650; }
.dataqs-codes .src { font-family: var(--font-sans); font-size: 1rem; color: var(--ink-2); margin: 0.1rem 0 0.3rem; overflow-wrap: anywhere; }
.dataqs-sources ol { margin: 0; padding-left: 1.4rem; }
.dataqs-sources li + li { margin-top: var(--s-2); }
.dataqs-sources li { overflow-wrap: anywhere; }
.dataqs-sources .src { font-size: 1rem; color: var(--ink-2); white-space: nowrap; }

/* ---------- /full-service ---------- */
.fs-math-note { margin: var(--s-4) 0 0; color: var(--ink-2); }
.fs-math-note + .fs-math-note { margin-top: var(--s-2); }
.fs-join .field { margin-bottom: var(--s-4); }
.fs-join fieldset { margin-bottom: var(--s-2); }
.fs-join .form-go { max-width: none; }
.fs-join .form-go .button { width: 100%; }
@media (min-width: 40rem) { .fs-join .form-go .button { width: auto; min-width: 16rem; } }

/* ---------- The first step of buying: what you buy, what you pay now, what happens next, then the form ---------- */
.buy-summary { margin: 0; }
/* The short label keeps its width; a long value (a fix name in Spanish) wraps on the right instead of covering it. */
.buy-summary > div { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.2rem var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--rule); align-items: baseline; }
.buy-summary > div:first-child { border-top: 0; padding-top: 0; }
.buy-summary > div:last-child { padding-bottom: 0; }
.buy-summary dt { color: var(--ink-2); }
.buy-summary dd { margin: 0; text-align: right; font-weight: 700; }
.buy-summary .buy-summary__big { font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.buy-summary .buy-summary__long { grid-column: 1 / -1; text-align: left; font-weight: 400; }
.buy-next { margin: var(--s-4) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.buy-drivers { margin: var(--s-4) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.buy-terms { margin: var(--s-4) 0 0; padding: var(--s-4) 0 0 1.2rem; border-top: 1px solid var(--rule); }
.buy-terms li + li { margin-top: var(--s-2); }
.buy-form { margin: var(--s-3) 0 0; }
.buy-form > .sell-card + .sell-card { margin-top: var(--s-3); }
.buy-step { margin: 0; }
.buy-step > h2 { font-size: var(--step-1); margin: 0 0 var(--s-3); }
.buy-step > .field:last-child, .buy-step > .field-check:last-child { margin-bottom: 0; }
/* The words he agrees to, at the body size on a quiet slip: short paragraphs, the first one its title. Then the name
   field, the box to tick and the one button end the task. */
.buy-terms-box { margin: 0 0 var(--s-5); padding: var(--s-4); border-radius: var(--radius-small); background: var(--paper-2); }
.buy-terms-box p { margin: 0; white-space: pre-line; }
.buy-terms-box p + p { margin-top: var(--s-3); }
.buy-terms-box p:first-child:not(:only-child) { font-weight: 700; }
.buy-terms-box a { overflow-wrap: anywhere; }
.buy-carrier { display: grid; gap: var(--s-2); justify-items: start; }
.buy-carrier > * { margin: 0; }
.buy-carrier__other a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; }
.buy-go { margin-top: var(--s-5); }
.buy-go > p { margin: 0 0 var(--s-3); }
.buy-go .button { width: 100%; }
@media (min-width: 40rem) { .buy-go .button { width: auto; min-width: 18rem; } }
.buy-go__no { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; }
.sell-col > .fine-print, .buy-form + .fine-print { margin-top: var(--s-5); }
.sell-col > .alert { margin-bottom: var(--s-3); }

/* ---------- Nothing a customer reads here is under 16px ---------- */
.sell .hint, .sell .field-error, .sell-picks .oos-flag, .sell-table tbody th, .sell-table td { font-size: 1rem; }
/* A link at the foot of a card keeps its 48px target without leaving a gap under it. */
.sell-fix__go, .sell-offer__alt:last-child, .sell-for__link:last-child { margin-bottom: calc(var(--s-2) * -1) !important; }

/* ---------- Look v3 on a desk: a real two-column page, not the phone column centred ---------- */
.sell-title { font-size: clamp(2.125rem, 1.4rem + 3vw, 3.5rem); font-weight: 800; font-stretch: 88%; line-height: 1.04; letter-spacing: -0.012em; }
.sell-lead { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem); color: var(--lk-muted, #525960); }
.sell-section > h2, .sell-h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); }
.sell-fix { border-radius: var(--radius); }
.sell-fix:hover, .sell-fix:focus-within { border-color: var(--lk-line-2, #d3d0c8); box-shadow: var(--lk-shadow-lg, var(--shadow)); }
.sell-aside > .sell-card + .sell-card { margin-top: var(--s-3); }
@media (min-width: 66rem) {
  .sell-col:has(> .sell-aside) { max-width: 1240px; display: grid; grid-template-columns: minmax(0, 1fr) 25rem;
    column-gap: 3.5rem; align-items: start; }
  .sell-col:has(> .sell-aside) > * { grid-column: 1; min-width: 0; }
  .sell-col > .sell-aside { grid-column: 2; grid-row: 1 / span 40; position: sticky; top: 6.5rem; }
  .sell-col > .sell-aside .sell-offer .button { width: 100%; min-width: 0; }
  .sell-col:has(> .sell-aside) > .sell-head + .sell-section { margin-top: var(--s-6); }
  /* The closing offer repeats the one beside the page; on a desk the sticky one is always in view. */
  .sell-col:has(> .sell-aside) > .sell-close { display: none; }
}
@media (min-width: 60rem) {
  .sell-col:has(.sell-fixes) { max-width: 1240px; }
  .sell-col:has(.sell-fixes) > :not(.sell-head, .sell-section:has(.sell-fixes)) { max-width: 44rem; }
  .sell-fixes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
  .sell-fixes > .sell-fix { display: flex; flex-direction: column; gap: var(--s-2); }
  .sell-fixes > .sell-fix > .sell-fix__go { margin-top: auto; padding-top: var(--s-2); }
}
@media (min-width: 75rem) { .sell-fixes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Four fixes sit two by two, never three and one alone. */
@media (min-width: 75rem) { .sell-fixes:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* The last card keeps the same room above the footer as every other page (it ended 8px from it). */
.sell-col { padding-bottom: var(--s-8); }
