/* ---------- Credits in one column (7 Nov 2026, design D revised) ----------
   The balance on the results page's tinted band, the packs stacked so the eye runs down one set of
   numbers, "Why credits?" as a dark panel in the piles' colours, then the latest changes in a table
   with the same dashed lines between its columns as Where you stand. */

.credits { max-width: 760px; gap: 20px; }

/* The balance and the packs: one white sheet. */
.credits-sheet { overflow: hidden; border-radius: 24px; background: var(--white); }
.credits-sheet__band {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 28px 24px; text-align: center;
  border-bottom: 1px solid var(--line); background: linear-gradient(var(--tint), var(--white));
}
.credits-eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange); }
.credits-balance { margin-top: 2px; font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; color: var(--ink); }
.credits-balance__note { font-size: 18px; color: var(--body); }
.credits-sheet__body { display: flex; flex-direction: column; gap: 18px; padding: 24px 28px 28px; }
.credits-sheet__head { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.credits-sheet__head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.credits-sheet__small { font-size: 13px; line-height: 1.5; color: var(--body); text-align: center; }
.credits-muted { color: var(--body); }

/* The packs: a row each, the same fields in the same place. */
.packs { display: flex; flex-direction: column; gap: 18px; }
/* What you get, then the price with its cost a job under it, then Buy Now (7 Nov 2026, design A). */
.pack {
  position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: 18px;
  padding: 18px 20px; border: 2px solid var(--line); border-radius: 18px; background: var(--white);
}
.pack--featured, .pack--lowest { padding-top: 22px; }
.pack--featured { border-color: var(--cta); background: linear-gradient(180deg, #fff8ef 0%, #ffe9d4 100%); box-shadow: 0 10px 24px -14px rgba(154, 74, 22, 0.45); }
.pack--lowest { border-color: #b9dcc8; }
/* Stickers set at an angle on the card's corners, as on a shop shelf (7 Nov 2026). Drawn only: the
   words are read after the price ([data-pack-stickers-said]). A still tilt, so nothing to stop under
   reduced motion. */
.pack__sticker {
  position: absolute; top: -13px; left: -6px; z-index: 1; padding: 4px 10px; border-radius: 4px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; line-height: 1.3; text-transform: uppercase; white-space: nowrap;
  background: #ffd84d; color: var(--ink); transform: rotate(-4deg);
  box-shadow: 0 2px 0 rgba(25, 25, 28, 0.18);
}
.pack__sticker--right { left: auto; right: -6px; background: #d62b4b; color: var(--white); transform: rotate(4deg); }
.pack--lowest .pack__sticker { background: var(--green-text); color: var(--white); }
.pack__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--tint); color: var(--accent); }
.pack--featured .pack__icon { background: var(--cta); color: var(--brand); }
.pack__icon svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pack__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pack__jobs { font-size: 19px; font-weight: 800; color: var(--ink); }
.pack__what { font-size: 13.5px; line-height: 1.5; color: var(--body); }
.pack__credits { font-weight: 700; color: var(--ink); }
.pack__cost { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.pack__price { font-size: 22px; font-weight: 800; color: var(--orange); white-space: nowrap; }
.pack__each { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pack--lowest .pack__each { color: var(--green-text); font-weight: 700; }
.pack__buy { flex: none; gap: 0; min-height: 44px; padding: 0 22px; font-weight: 800; }
.pack__buy[disabled] { opacity: .6; cursor: progress; }
/* "Buy" beside the row; the pack's name stays in the button for a screen reader. */
.pack__buy-what { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Why credits: the piles' dark ground and colours. */
.credits-why { display: flex; flex-direction: column; gap: 22px; padding: 28px; border-radius: 24px; background: var(--brand); color: var(--white); }
.credits-why h2 { font-size: 22px; font-weight: 800; text-align: center; color: var(--white); }
.credits-why ul { display: flex; flex-direction: column; gap: 22px; margin: 0; padding: 0; list-style: none; }
.credits-why__item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
.credits-why__icon { grid-row: span 3; display: grid; place-items: center; width: 40px; height: 40px; box-sizing: border-box; border-radius: 12px; }
.credits-why__icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.credits-why__item strong { font-size: 16px; }
.credits-why__item em { font-size: 15px; font-style: normal; font-weight: 700; }
.credits-why__item > span:last-child { font-size: 15px; line-height: 1.55; color: #d9d4cb; }
.credits-why__item--job .credits-why__icon { background: var(--cta); color: var(--brand); }
.credits-why__item--job em { color: var(--cta); }
.credits-why__item--recheck .credits-why__icon { border: 1.5px dashed var(--brand-muted); color: #b8a6f5; }
.credits-why__item--recheck em { color: #b8a6f5; }
.credits-why__item--cv .credits-why__icon { background: var(--brand-line); color: #d4c6ff; }
.credits-why__item--cv em { color: #d4c6ff; }
.credits-why__item--safe .credits-why__icon { background: var(--green); color: var(--white); }
.credits-why__item--safe em { color: #bfe6cf; }

/* Where the credits went. */
.credits-history { display: flex; flex-direction: column; gap: 14px; padding: 24px 28px; border-radius: 24px; background: var(--white); }
.credits-history__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.credits-history__head h2 { font-size: 22px; font-weight: 800; }
.credits-history .table-scroll { border-radius: 16px; }
.credits-history .credits-table { min-width: 520px; font-size: 14.5px; }
.credits-history .credits-table thead th { background: var(--soft); color: var(--body); }
.credits-history .credits-table :is(th, td) + :is(th, td) { border-left: 1.5px dashed var(--input-line); }
.credits-history .credits-table td:first-child { color: var(--body); }
.credits-history__more { align-self: flex-start; min-height: 44px; }
.credits-home { align-self: center; min-height: 44px; }

@media (max-width: 639px) {
  /* A phone (12 Nov 2026): all four packs on the first screen of the smallest phone (375 × 667), as on a
     shop's price list. The balance is a short band (the header says it too), and the small print about
     prices goes under the packs. */
  .credits { padding: 12px 12px 48px; }
  .credits-sheet { border-radius: 20px; }
  /* The balance band goes from sight (13 Nov 2026): the header's pill says the balance. It stays for a
     screen reader, as the page's heading. */
  .credits-sheet__band { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .credits-sheet__body { gap: 12px; padding: 12px 10px 18px; }
  .credits-sheet__head { display: contents; }
  .credits-sheet__head h2 { font-size: 18px; text-align: center; }
  .credits-sheet__head p { order: 1; font-size: 13px; line-height: 1.5; text-align: left; }
  .credits-sheet__small { order: 1; text-align: left; }
  /* A pack: what you get and its price at the left, Buy Now beside them, and who it's for across the card. */
  .packs { gap: 10px; }
  .pack {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "jobs buy" "cost buy" "what what";
    align-items: center; gap: 2px 12px; padding: 12px 12px 12px 14px; border-radius: 14px;
  }
  .pack--featured, .pack--lowest { padding-top: 18px; }
  .pack__sticker { top: -11px; padding: 3px 8px; font-size: 10.5px; }
  .pack__icon { display: none; }
  .pack__body { display: contents; }
  .pack__jobs { grid-area: jobs; font-size: 16px; line-height: 1.3; }
  .pack__cost { grid-area: cost; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 8px; text-align: left; }
  .pack__what { grid-area: what; margin-top: 4px; font-size: 12.5px; line-height: 1.4; }
  .pack__price { font-size: 17px; }
  .pack__each { font-size: 12.5px; }
  .pack__buy { grid-area: buy; min-height: 44px; padding: 0 13px; font-size: 15px; white-space: nowrap; }
  .credits-why { padding: 22px 16px; }
  .credits-history { padding: 20px 16px; }
  .credits-home { align-self: stretch; }
  /* The history as two lines a change: what and how much, then when and what was left. */
  .credits-history .table-scroll { overflow: visible; }
  .credits-history .credits-table { min-width: 0; }
  .credits-history .credits-table, .credits-history .credits-table tbody { display: block; }
  .credits-history .credits-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .credits-history .credits-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what n" "when left"; gap: 2px 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
  .credits-history .credits-table tr:first-child { border-top: 0; }
  .credits-history .credits-table tr[hidden] { display: none; }
  .credits-history .credits-table td { display: block; padding: 0; border: 0; }
  .credits-history .credits-table :is(th, td) + :is(th, td) { border-left: 0; }
  .credits-history .credits-table td:nth-child(1) { grid-area: when; font-size: 12.5px; white-space: normal; }
  .credits-history .credits-table td:nth-child(2) { grid-area: what; font-size: 14px; line-height: 1.35; }
  .credits-history .credits-table td:nth-child(3) { grid-area: n; font-size: 16px; font-weight: 800; }
  .credits-history .credits-table td:nth-child(4) { grid-area: left; font-size: 12.5px; color: var(--body); }
  .credits-history .credits-table td:nth-child(4)::after { content: " left"; }
}

/* Narrower than an iPhone SE (small Android phones, 360px): a little smaller, so each pack's title stays on one line. */
@media (max-width: 374px) {
  .credits { padding-inline: 10px; }
  .pack { gap: 2px 8px; padding-inline: 12px 10px; }
  .pack__jobs { font-size: 15px; }
  .pack__buy { padding: 0 11px; font-size: 14px; }
  .pack__what { font-size: 12px; }
}

/* A purchase's reference in the history (credits.ts), to quote to support. */
.ledger-ref { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
