/* THE CHECKOUT SHEET — a white document laid on the black site.
 *
 * Everything here is prefixed cw- and every value on the sheet is declared
 * outright rather than inherited. The site's own stylesheet is a dark-ground
 * sheet: a white surface that leans on it inherits pale text on white the first
 * time a shared token moves. Measured before writing: no selector beginning
 * `.cw-` exists in fullstyle.css or store.css, so nothing here collides and
 * nothing there reaches in.
 *
 * The sheet is a document, so it is centred as a page of paper is centred, and
 * the writing on it is not: the masthead is the only centred block, the body
 * runs left, and the two columns are deliberately unequal.
 */

/* ── the ground the paper sits on ─────────────────────────────────────────── */
.cw-page {
  background: #000000;
  padding: clamp(18px, 3vw, 52px) clamp(12px, 3vw, 40px) clamp(48px, 6vw, 96px);
}

.cw-back {
  display: block;
  max-width: 1080px;
  margin: 0 auto 18px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a7a7a2;
  text-decoration: none;
}
.cw-back:hover, .cw-back:focus-visible { color: #f1f0eb; text-decoration: underline; }

/* ── the sheet ────────────────────────────────────────────────────────────── */
.cw-sheet {
  --cw-paper: #ffffff;
  --cw-ink: #14140f;
  --cw-ink-soft: #55554c;
  --cw-rule: #d9d6cd;
  --cw-gold: #c9a227;
  --cw-field: #fdfdfb;
  --cw-field-line: #b6b2a7;

  max-width: 1080px;
  margin: 0 auto;
  background: var(--cw-paper, #ffffff);
  color: var(--cw-ink, #14140f);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.62;
  padding: clamp(26px, 4vw, 64px) clamp(20px, 4.5vw, 72px) clamp(34px, 4vw, 64px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
}

.cw-sheet p { margin: 0 0 0.9em; }
.cw-sheet a { color: var(--cw-ink, #14140f); }

/* ── masthead: the crest, the name, one rule ──────────────────────────────── */
.cw-mast { text-align: center; padding-bottom: clamp(18px, 2.4vw, 30px); }

.cw-mast__crest {
  display: block;
  width: 66px;
  height: 74px;
  margin: 0 auto 14px;
  border: none;
  background: transparent;
}

.cw-mast__name {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.15rem, 2.1vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-indent: 0.24em;               /* balances the trailing letterspace */
  color: var(--cw-ink, #14140f);
}

.cw-mast__line {
  margin: 12px auto 0;
  width: 100%;
  height: 0;
  border: 0;
  border-top: 1px solid var(--cw-ink, #14140f);
}
.cw-mast__line + .cw-mast__line { margin-top: 3px; border-top-color: var(--cw-gold, #c9a227); }

.cw-mast__meta {
  margin: 14px 0 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cw-ink-soft, #55554c);
}

/* ── document heading ─────────────────────────────────────────────────────── */
.cw-head { margin: clamp(22px, 3vw, 34px) 0 clamp(18px, 2.4vw, 28px); }
.cw-head h1 {
  margin: 0 0 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--cw-ink, #14140f);
}
.cw-head p { margin: 0; max-width: 60ch; color: var(--cw-ink-soft, #55554c); }

/* ── the two columns: form left, order right, deliberately unequal ────────── */
.cw-grid { display: block; }

@media (min-width: 920px) {
  .cw-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(30px, 3.6vw, 58px);
    align-items: start;
  }
  .cw-aside { position: sticky; top: 24px; }
}

/* ── sections ─────────────────────────────────────────────────────────────── */
.cw-sec { margin: 0 0 clamp(26px, 3vw, 38px); }
.cw-sec:last-child { margin-bottom: 0; }

.cw-sec__label {
  display: block;
  margin: 0 0 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cw-ink-soft, #55554c);
}
.cw-sec__title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cw-rule, #d9d6cd);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.22rem;
  font-weight: 400;
  color: var(--cw-ink, #14140f);
}

/* ── fields ───────────────────────────────────────────────────────────────── */
.cw-fields { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 620px) { .cw-fields--pair { grid-template-columns: 1fr 1fr; } }

.cw-field { display: block; min-width: 0; }
.cw-field__label {
  display: block;
  margin-bottom: 5px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--cw-ink, #14140f);
}
.cw-field__note {
  font-weight: 400;
  color: var(--cw-ink-soft, #55554c);
}
.cw-field input,
.cw-field textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--cw-field-line, #b6b2a7);
  border-radius: 2px;
  background: var(--cw-field, #fdfdfb);
  color: var(--cw-ink, #14140f);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
}
.cw-field textarea { min-height: 92px; resize: vertical; }
.cw-field input:focus-visible,
.cw-field textarea:focus-visible {
  outline: 2px solid var(--cw-ink, #14140f);
  outline-offset: 1px;
  border-color: var(--cw-ink, #14140f);
}
.cw-field input[aria-invalid="true"],
.cw-field textarea[aria-invalid="true"] { border-color: #9c2b1f; border-width: 2px; }

.cw-field__error {
  display: none;
  margin: 5px 0 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  color: #9c2b1f;
}
.cw-field__error.is-shown { display: block; }

/* the bot trap: off the page, out of the tab order, never read aloud */
.cw-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── the order summary ────────────────────────────────────────────────────── */
.cw-order {
  border: 1px solid var(--cw-ink, #14140f);
  padding: clamp(16px, 2vw, 24px);
  background: var(--cw-paper, #ffffff);
}

.cw-lines { width: 100%; border-collapse: collapse; }
.cw-lines th, .cw-lines td {
  padding: 10px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--cw-rule, #d9d6cd);
}
.cw-lines thead th {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cw-ink-soft, #55554c);
  padding-top: 0;
}
.cw-lines td.cw-num, .cw-lines th.cw-num { text-align: right; white-space: nowrap; }
.cw-line__name { font-size: 1rem; }
.cw-line__scope {
  display: block;
  margin-top: 2px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--cw-ink-soft, #55554c);
}

.cw-lines caption {
  caption-side: top;
  text-align: left;
  padding-bottom: 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cw-ink-soft, #55554c);
}
.cw-drop {
  display: block;
  margin-top: 7px;
  padding: 6px 2px;               /* the tap floor rides in padding, not in paint */
  border: 0;
  background: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cw-ink-soft, #55554c);
  text-decoration: underline;
  cursor: pointer;
}
.cw-drop:hover, .cw-drop:focus-visible { color: #9c2b1f; }

.cw-totals { margin-top: 14px; }
.cw-totals__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  color: var(--cw-ink-soft, #55554c);
}
.cw-totals__row span:last-child { white-space: nowrap; color: var(--cw-ink, #14140f); }

.cw-due {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 2px solid var(--cw-ink, #14140f);
}
.cw-due__label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* One line. "TOTAL DUE / TODAY" broken across two reads as two labels. */
  white-space: nowrap;
  color: var(--cw-ink, #14140f);
}
.cw-due__value {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.45rem, 2.6vw, 1.8rem);
  white-space: nowrap;
  color: var(--cw-ink, #14140f);
}

.cw-fine {
  margin: 10px 0 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--cw-ink-soft, #55554c);
}

/* ── the agreement line ───────────────────────────────────────────────────── */
.cw-agree {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--cw-rule, #d9d6cd);
  background: #faf9f5;
}
.cw-agree__row { display: flex; align-items: flex-start; gap: 11px; }
.cw-agree__row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin: 3px 0 0;
  accent-color: #14140f;
  cursor: pointer;
}
.cw-agree__row input[type="checkbox"]:disabled { cursor: not-allowed; }
.cw-agree__row label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--cw-ink, #14140f);
  /* the 44px hit floor rides in padding; the painted box stays 19px */
  padding: 12px 0;
  margin: -12px 0;
  cursor: pointer;
}
.cw-agree__row input[type="checkbox"]:disabled + label { color: var(--cw-ink-soft, #55554c); cursor: not-allowed; }
.cw-agree__why {
  margin: 9px 0 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  color: var(--cw-ink-soft, #55554c);
}

/* ── buttons ──────────────────────────────────────────────────────────────── */
/* ONE primary colour across the whole buying flow, and it is not chosen here: it
   is #2E5AA8, the blue already on the BUY NOW button at the foot of all 162
   product and package pages. The button a buyer pressed to arrive is the button
   they finish on. Square, not a pill, for the same reason — the store lane is
   deliberately not the site's rounded primary. */
.cw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid #2E5AA8;
  border-radius: 0;
  background: #2E5AA8;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}
.cw-btn:hover, .cw-btn:focus-visible { background: #3668BE; border-color: #3668BE; }
.cw-btn:focus-visible { outline: 2px solid #14140f; outline-offset: 2px; }
.cw-btn:disabled { background: #d7d4cb; border-color: #bcb8ad; color: #4a463d; cursor: not-allowed; }
.cw-btn--wide { width: 100%; margin-top: 16px; }
.cw-nowrap { white-space: nowrap; }

/* The secondary controls stay ink on paper. Only one action on this sheet is
   filled blue, so the next move is never in doubt. */
.cw-btn--quiet {
  background: transparent;
  border-color: var(--cw-ink, #14140f);
  color: var(--cw-ink, #14140f);
  font-weight: 700;
}
.cw-btn--quiet:hover, .cw-btn--quiet:focus-visible { background: #f0eee7; border-color: var(--cw-ink, #14140f); color: var(--cw-ink, #14140f); }

.cw-btn--link {
  min-height: 44px;
  padding: 11px 0;
  border: 0;
  background: none;
  color: var(--cw-ink, #14140f);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cw-btn--link:hover, .cw-btn--link:focus-visible { color: #6b5410; }

.cw-btnrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ── the note under the button ────────────────────────────────────────────── */
.cw-after {
  margin: 14px 0 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--cw-ink-soft, #55554c);
}

/* ── what happens next: a numbered list, not a row of cards ───────────────── */
.cw-next {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: cwstep;
  max-width: 72ch;
}
.cw-next li {
  position: relative;
  counter-increment: cwstep;
  padding: 0 0 14px 46px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--cw-rule, #d9d6cd);
}
.cw-next li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.cw-next li::before {
  content: counter(cwstep);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  text-align: right;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.3rem;
  color: #9a9484;
}
.cw-next b { font-weight: 700; }

/* ── the foot of the document: who we are, plainly ────────────────────────── */
.cw-foot {
  margin-top: clamp(30px, 4vw, 46px);
  padding-top: 16px;
  border-top: 1px solid var(--cw-rule, #d9d6cd);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--cw-ink-soft, #55554c);
}
.cw-foot dl { display: grid; grid-template-columns: 1fr; gap: 10px 26px; margin: 0; }
@media (min-width: 720px) { .cw-foot dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cw-foot dt {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--cw-ink, #14140f);
}
.cw-foot dd { margin: 2px 0 0; }

/* ── the terms overlay ────────────────────────────────────────────────────── */
.cw-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 40px);
  background: rgba(0, 0, 0, 0.72);
}
.cw-modal[hidden] { display: none; }

.cw-modal__sheet {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(86vh, 900px);
  background: #ffffff;
  color: #14140f;
  border: 1px solid #14140f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.cw-modal__head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px clamp(16px, 3vw, 28px) 14px;
  border-bottom: 1px solid #14140f;
}
.cw-modal__head h2 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
}
.cw-modal__ver {
  margin: 3px 0 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #55554c;
}
.cw-modal__close {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #14140f;
  border-radius: 2px;
  background: #ffffff;
  color: #14140f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.cw-modal__close:hover, .cw-modal__close:focus-visible { background: #f0eee7; }

.cw-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(16px, 3vw, 28px);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.62;
}
.cw-modal__body ol { margin: 0; padding: 0; list-style: none; counter-reset: cwterm; }
.cw-modal__body li {
  margin: 0 0 22px;
  padding: 0 0 0 44px;
  position: relative;
  counter-increment: cwterm;
}
.cw-modal__body li::before {
  content: counter(cwterm);
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  text-align: right;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.05rem;
  color: #8a8578;
}
.cw-modal__body h3 {
  margin: 0 0 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cw-modal__body p { margin: 0; }
.cw-modal__end {
  margin: 6px 0 0;
  padding-top: 14px;
  border-top: 1px solid #d9d6cd;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.84rem;
  color: #55554c;
}

/* The warranty sentence must stand apart from the paragraph it sits in —
   all-capitals inside body copy is not, on its own, conspicuous. */
.cw-loud {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border: 2px solid #14140f;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cw-modal__foot {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px clamp(16px, 3vw, 28px);
  border-top: 1px solid #14140f;
  background: #faf9f5;
}
.cw-modal__state {
  flex: 1 1 220px;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  color: #55554c;
}

/* ── the confirmation ─────────────────────────────────────────────────────── */
.cw-done__ref {
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--cw-ink, #14140f);
  background: #faf9f5;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  line-height: 1.6;
}
.cw-done__ref dt {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--cw-ink-soft, #55554c);
}
.cw-done__ref dd { margin: 2px 0 12px; word-break: break-word; }
.cw-done__ref dd:last-child { margin-bottom: 0; }

.cw-alert {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 2px solid #9c2b1f;
  background: #fdf4f2;
  color: #14140f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.55;
}
.cw-alert b { display: block; margin-bottom: 4px; }
.cw-alert[hidden] { display: none; }

.cw-empty {
  padding: 22px 0 4px;
  font-family: Arial, Helvetica, sans-serif;
}

/* ── motion, and the people who have asked for none ───────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .cw-modal { animation: cw-fade 140ms ease-out; }
  .cw-btn, .cw-modal__close { transition: background-color 120ms ease-out; }
}
@keyframes cw-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── print: the paper, and nothing else ───────────────────────────────────── */
@media print {
  .cw-page { background: #ffffff; padding: 0; }
  .cw-back, .cw-btn, .cw-btnrow, .cw-drop, .cw-qty, .cw-modal__foot, .cw-modal__close { display: none !important; }
  .cw-sheet { box-shadow: none; max-width: none; padding: 0; }
  .cw-aside { position: static; }
  .cw-grid { display: block; }
  .cw-order { break-inside: avoid; }
  .cw-modal { position: static; display: block; padding: 0; background: none; }
  .cw-modal__sheet { max-height: none; border: 0; box-shadow: none; width: auto; }
  .cw-modal__body { overflow: visible; max-height: none; }
  .cw-agree { break-inside: avoid; }
}
