/* Corporate gifts: /corporate-gifts/ and /corporate-gifts/order/ (src/shop/corporate-page.mjs).
   Loaded with fresh.css and fresh-shop.css, whose colours, buttons, facts and questions it uses.
   The one loud thing is at the top of the first page: a gift box with name tags tied to it, one for
   each door it's going to. Everything after it is quiet: white cards on cream and sand. */

/* ============================== /corporate-gifts/ ============================== */

/* ---------- the top: the box and its tags ---------- */
.cg-hero { overflow: hidden; }
.cg-hero-in { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: clamp(1.5rem, 5vw, 4.5rem); }
.cg-hero h1 { max-width: 9.2em; }
.cg-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(1.4rem, 3vw, 2.2rem); }
.cg-hero-note { margin: 1.3rem 0 0; font-weight: 800; font-size: 1rem; color: var(--field-ink); }
.cg-hero-art { position: relative; justify-self: center; width: min(100%, 440px); margin-block: 26px; }
.cg-hero-pic { overflow: hidden; border-radius: var(--r-xl); background: var(--soft); transform: rotate(2.5deg); box-shadow: 0 34px 60px -30px rgba(var(--shade-deep), 0.6), 0 0 0 10px rgba(255, 255, 255, 0.55); }
.cg-hero-pic img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

.cg-tags { list-style: none; margin: 0; padding: 0; }
.cg-tag { --r: 0deg; position: absolute; z-index: 1; display: grid; gap: 0; padding: 9px 18px 10px 34px; white-space: nowrap; transform: rotate(var(--r)); transform-origin: 12px 50%; filter: drop-shadow(0 10px 12px rgba(var(--shade-deep), 0.28)); }
/* the tag's paper, with its pointed end, and the hole the string goes through */
.cg-tag::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #fff; border-radius: 0 10px 10px 0; clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 50%); }
.cg-tag::after { content: ''; position: absolute; left: 14px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--field); box-shadow: inset 0 0 0 2px var(--sand-3); }
.cg-tag-name { font: 700 1.55rem/1 'Dancing Script', 'Segoe Script', cursive; color: var(--text); }
.cg-tag-city { font-weight: 800; font-size: 0.78rem; line-height: 1.2; color: var(--muted); }
.cg-tag-1 { --r: -8deg; left: -9%; top: 5%; }
.cg-tag-2 { --r: 6deg; right: -8%; top: 17%; }
.cg-tag-3 { --r: 5deg; left: -13%; bottom: 25%; }
.cg-tag-4 { --r: -6deg; right: -5%; bottom: 13%; }
.cg-tag-5 { --r: 3deg; left: 27%; bottom: -5%; }
/* The page's one entrance: the tags are tied on, one after another. */
.js .cg-tag { animation: cg-tag-in 0.65s var(--ease-out) both; animation-delay: calc(0.3s + var(--i, 0) * 0.12s); }
@keyframes cg-tag-in { from { opacity: 0; transform: translateY(-16px) rotate(calc(var(--r) - 12deg)); } }
@media (prefers-reduced-motion: reduce) { .js .cg-tag { animation: none; } }
@media (max-width: 860px) {
  .cg-hero-in { grid-template-columns: minmax(0, 1fr); }
  .cg-hero-art { width: min(74%, 340px); margin-block: 18px 30px; }
  .cg-tag { padding: 7px 13px 8px 28px; }
  .cg-tag-name { font-size: 1.25rem; }
  .cg-tag-city { font-size: 0.72rem; }
  .cg-tag-1 { left: -15%; }
  .cg-tag-2 { right: -14%; }
  .cg-tag-3 { left: -17%; }
  .cg-tag-4 { right: -12%; }
}

/* ---------- the promises ---------- */
.cg-facts { padding-block: clamp(4.5rem, 8vw, 6rem) clamp(1rem, 3vw, 2rem); }

/* ---------- how it works ---------- */
.cg-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); counter-reset: none; }
.cg-steps > li { padding: 22px 22px 24px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.cg-step-n { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 50%; background: var(--soft-2); color: var(--heading); font: 400 1.6rem/1 var(--font-display); }
.cg-steps h3 { margin: 0 0 6px; font-size: 1.22rem; }
.cg-steps p { margin: 0; font-weight: 600; line-height: 1.5; }
.cg-how-go { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: clamp(1.4rem, 3vw, 2.2rem) 0 0; }
.cg-how-go span { font-weight: 700; color: var(--muted); }
@media (max-width: 1020px) { .cg-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cg-steps { grid-template-columns: minmax(0, 1fr); } .cg-steps > li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; padding: 18px; } .cg-step-n { grid-row: 1 / span 2; margin: 0; } }

/* ---------- the gifts ---------- */
.cg-gift-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.cg-gift { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 12px 12px 16px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 10px 30px -22px rgba(var(--shade), 0.5); }
.cg-gift > :not(.cg-gift-pic) { margin: 0 4px; }
.cg-gift-pic { display: block; overflow: hidden; aspect-ratio: 1; margin-bottom: 4px; border-radius: var(--r-md); background: var(--soft); }
.cg-gift-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.cg-gift h3 { font-size: 1.1rem; line-height: 1.2; }
.chrome-new .cg-gift h3 a { color: var(--text); text-decoration: none; }
.cg-gift-sum { font-size: 0.93rem; font-weight: 600; line-height: 1.4; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cg-gift-packs { list-style: none; padding: 0; display: grid; gap: 4px; }
.cg-gift-packs li { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 0.96rem; color: var(--text-soft); }
.cg-gift-packs strong { color: var(--accent-deep); font-weight: 900; }
.cg-gift-flag { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--soft-2); font-weight: 800; font-size: 0.8rem; color: var(--text); }
/* the button sits at the foot of the card, however much is above it */
.cg-gift > .f-btn { align-self: flex-start; margin-top: auto; }
.cg-gift > :nth-last-child(2) { margin-bottom: 6px; }
@media (hover: hover) and (pointer: fine) { .cg-gift:hover .cg-gift-pic img { transform: scale(1.05); } .chrome-new .cg-gift h3 a:hover { text-decoration: underline; text-decoration-color: var(--mark); text-underline-offset: 3px; } }
@media (prefers-reduced-motion: reduce) { .cg-gift-pic img { transition: none; } }
@media (max-width: 1020px) { .cg-gift-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cg-gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cg-gift { padding: 8px 8px 14px; } .cg-gift-sum { display: none; } .cg-gift h3 { font-size: 1rem; } }

/* ---------- what it costs ---------- */
.cg-cost-in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(1.5rem, 5vw, 4.5rem); }
.cg-cost-copy h2 { margin: 0 0 1rem; }
.cg-cost-copy p { max-width: 46ch; font-size: 1.08rem; font-weight: 600; line-height: 1.55; }
.cg-cost-copy p:last-child { margin: 1.6rem 0 0; }
.cg-cost-card { padding: clamp(18px, 3vw, 32px); border-radius: var(--r-xl); background: #fff; box-shadow: var(--lift); }
.cg-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cg-table caption { caption-side: top; padding-bottom: 14px; text-align: left; font: 400 clamp(1.25rem, 2.2vw, 1.6rem)/1.1 var(--font-display); color: var(--heading); }
.cg-table th, .cg-table td { padding: 14px 8px; text-align: right; border-bottom: 2px solid var(--soft-2); font-weight: 700; color: var(--text-soft); }
.cg-table thead th { padding-top: 0; font-size: 0.88rem; font-weight: 800; color: var(--muted); }
.cg-table th:first-child { padding-left: 0; text-align: left; color: var(--text); font-weight: 900; }
.cg-table td:last-child, .cg-table thead th:last-child { padding-right: 0; }
.cg-table td strong { font-size: 1.12rem; font-weight: 900; color: var(--accent-deep); }
.cg-table tbody tr:last-child th, .cg-table tbody tr:last-child td { border-bottom: 0; }
.cg-table-note { margin: 14px 0 0; font-weight: 800; color: var(--text); }
@media (max-width: 860px) { .cg-cost-in { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .cg-table th, .cg-table td { padding-inline: 4px; font-size: 0.92rem; } .cg-table td strong { font-size: 1rem; } }

/* ---------- when businesses send cookies ---------- */
.cg-occasions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); }
.cg-occasions li { padding: 20px 22px 22px; border-radius: var(--r-md); background: #fff; }
.cg-occasions h3 { margin: 0 0 6px; font-size: 1.12rem; }
.cg-occasions p { margin: 0; font-weight: 600; line-height: 1.45; }
@media (max-width: 860px) { .cg-occasions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cg-occasions { grid-template-columns: minmax(0, 1fr); } .cg-occasions li { padding: 16px 18px; } }

/* ---------- your logo ---------- */
.cg-logo { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4.5rem); border-radius: var(--r-xl); background: var(--panel); color: var(--text); overflow: hidden; }
.chrome-new .cg-logo h2 { margin: 0; color: var(--text); font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 13ch; }
.cg-logo p { margin: 1rem 0 0; max-width: 40ch; font-size: 1.1rem; font-weight: 700; line-height: 1.5; }
.cg-logo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 1.7rem; }
.chrome-new .cg-logo .f-link { color: var(--text); border-color: rgba(91, 65, 43, 0.3); }
.cg-logo-art { justify-self: end; width: min(100%, 360px); }
.cg-logo-art img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.6); transform: rotate(-5deg); }
.cg-logo-art .f-ico { width: 100%; height: auto; color: var(--text); --i2: #fff; }
@media (max-width: 760px) { .cg-logo { grid-template-columns: minmax(0, 1fr); } .cg-logo-art { justify-self: center; width: min(66%, 260px); order: -1; } }

/* ---------- who is baking ---------- */
.cg-trust { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(2rem, 6vw, 5.5rem); }
.cg-trust-pic { position: relative; justify-self: center; width: min(100%, 360px); }
.cg-trust-pic > img { display: block; width: 100%; height: auto; border-radius: var(--r-xl); transform: rotate(-2.5deg); box-shadow: var(--lift); }
.cg-trust-stamp { position: absolute; right: -28px; bottom: -28px; width: clamp(104px, 11vw, 138px); --stamp-bg: var(--soft-2); }
.cg-trust-copy h2 { margin: 0 0 1.1rem; max-width: 11ch; }
.cg-trust-copy > p { max-width: 54ch; font-size: 1.08rem; font-weight: 600; line-height: 1.55; }
.cg-ticks { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 10px; max-width: 56ch; }
.cg-ticks li { position: relative; padding-left: 38px; font-weight: 700; line-height: 1.45; color: var(--text); }
.cg-ticks li::before { content: ''; position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.5l4.2 4.2L18.5 8' fill='none' stroke='%23fff9f3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.cg-trust-links { display: flex; flex-wrap: wrap; gap: 12px 26px; margin: 1.6rem 0 0; }
@media (max-width: 860px) { .cg-trust { grid-template-columns: minmax(0, 1fr); } .cg-trust-pic { width: min(70%, 300px); } .cg-trust-stamp { right: -20px; bottom: -22px; } }

/* ---------- the questions ---------- */
.cg-faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; gap: clamp(1.5rem, 5vw, 4.5rem); }
.cg-faq-head { position: sticky; top: calc(var(--head-h) + 24px); }
.cg-faq-head h2 { margin: 0 0 1rem; max-width: 9ch; }
.cg-faq-head p { max-width: 36ch; font-weight: 700; line-height: 1.5; }
@media (max-width: 860px) { .cg-faq { grid-template-columns: minmax(0, 1fr); } .cg-faq-head { position: static; } .cg-faq-head h2 { max-width: none; } }

/* ---------- the last word: the list, ready ---------- */
/* Out in the open on the page, not in a panel of its own: the brown panel that closes every page of the
   site comes straight after it, and two in a row read as the same thing said twice. What it shows is
   the thing its heading is about: a list of people, every address checked. */
/* (Nothing is cut off above or below, so the sheet's shadow falls where it likes; a sheet wider than a
   narrow screen is trimmed at the sides.) */
.cg-close-sec { padding-block: clamp(3rem, 7vw, 6rem) clamp(0.5rem, 2vw, 1.5rem); overflow-x: clip; }
.cg-close { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: clamp(2.25rem, 6vw, 5.5rem); }
.chrome-new .cg-close h2 { margin: 0; max-width: 8.2em; font-size: clamp(2.6rem, 1.9rem + 3.6vw, 4.6rem); line-height: 0.98; }
.cg-close-copy > p { margin: 1.15rem 0 0; max-width: 38ch; font-size: 1.16rem; font-weight: 700; line-height: 1.5; color: var(--text-soft); }
.cg-close-actions { display: flex; flex-wrap: wrap; gap: 18px 14px; margin-top: 2rem; }
.cg-close-copy > .cg-close-note { margin-top: 1.5rem; font-size: 0.98rem; color: var(--muted); }

/* The list: a sheet of paper, with the next sheet showing under it (it's a long list). */
.cg-list-wrap { position: relative; justify-self: center; width: min(100%, 410px); margin-block: 14px; }
.cg-list-wrap::before { content: ''; position: absolute; inset: 0; border-radius: 28px; background: var(--soft-2); transform: rotate(5deg) translate(16px, 8px); }
.cg-list { position: relative; padding: 24px 26px 22px; border-radius: 28px; background: #fff; transform: rotate(-2.5deg); box-shadow: 0 34px 60px -30px rgba(var(--shade-deep), 0.55), 0 2px 10px rgba(91, 65, 43, 0.06); }
.cg-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding-bottom: 16px; border-bottom: 2px dashed var(--soft-2); }
.cg-list-head strong { font: 400 1.4rem/1 var(--font-display); color: var(--heading); }
.cg-list-head span { padding: 7px 12px; border-radius: 999px; background: var(--soft); font-weight: 800; font-size: 0.8rem; line-height: 1; color: var(--text); white-space: nowrap; }
.cg-list-rows { list-style: none; margin: 0; padding: 8px 0; }
.cg-list-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 9px 0; }
.cg-list-rows li + li { border-top: 2px solid var(--soft); }
/* Ticked with a biscuit, a bite out of it. */
.cg-list-tick { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent); -webkit-mask: radial-gradient(circle at 88% 12%, transparent 5.5px, #000 6px); mask: radial-gradient(circle at 88% 12%, transparent 5.5px, #000 6px); }
.cg-list-tick svg { display: block; width: 15px; height: 15px; }
.cg-list-name { font: 700 1.65rem/1 'Dancing Script', 'Segoe Script', cursive; color: var(--text); }
.cg-list-city { font-weight: 800; font-size: 0.86rem; color: var(--muted); }
.cg-list-more { margin: 0; padding-top: 16px; border-top: 2px dashed var(--soft-2); font-weight: 800; font-size: 0.92rem; line-height: 1.3; color: var(--text-soft); text-wrap: balance; }
/* As the sheet comes into view, the ticks go down the list one after another. */
.js .cg-list-wrap .cg-list-tick { opacity: 0; transform: scale(0.55); }
.js .cg-list-wrap.is-in .cg-list-tick { opacity: 1; transform: none; transition: opacity 0.2s ease, transform 0.4s var(--ease-out); transition-delay: calc(0.5s + var(--i, 0) * 0.14s); }
@media (prefers-reduced-motion: reduce) { .js .cg-list-wrap .cg-list-tick { opacity: 1; transform: none; transition: none; } }
@media (max-width: 860px) {
  .cg-close { grid-template-columns: minmax(0, 1fr); }
  .cg-list-wrap { width: min(86%, 370px); margin-block: 6px 18px; }
  .cg-list-wrap::before { transform: rotate(4deg) translate(8px, 8px); }
}
@media (max-width: 520px) { .cg-close-actions .f-btn { flex: 1 1 100%; } }
@media (max-width: 420px) { .cg-list { padding: 20px 20px 18px; } .cg-list-name { font-size: 1.45rem; } .cg-list-head span { font-size: 0.74rem; padding-inline: 10px; } }

/* ============================== /corporate-gifts/order/ ============================== */
.cg-order-hero h1 { max-width: 10em; }
.cg-order-sec { padding-top: clamp(5rem, 9vw, 7rem); }
.cg-order { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 384px); gap: clamp(20px, 3.2vw, 44px); align-items: start; }
.cg-form { display: grid; gap: 14px; min-width: 0; }
.cg-order :where(p, ul, ol, dl, dd, h3, fieldset) { margin: 0; }
.cg-order :where(ul, ol) { padding: 0; list-style: none; }
.cg-order .opt { margin-left: 6px; font-weight: 700; font-size: 0.84rem; color: var(--muted); }

/* ---------- a step ---------- */
.cg-card { min-width: 0; padding: clamp(18px, 2.6vw, 28px); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); scroll-margin-top: calc(var(--head-h) + 14px); }
.cg-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 16px; }
.cg-n { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 400 1.4rem/1 var(--font-display); }
.cg-card-head h2 { margin: 0; padding-top: 7px; font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.1; }
.cg-card-head p { margin-top: 6px; max-width: 58ch; font-weight: 600; line-height: 1.45; color: var(--text-soft); }
.cg-card-body { display: grid; gap: 16px; margin-top: 20px; }
/* On a phone the words under a step's heading run the full width, under its number too. */
@media (max-width: 520px) { .cg-card-head > div { display: contents; } .cg-card-head h2 { align-self: center; padding-top: 0; } .cg-card-head p { grid-column: 1 / -1; margin-top: 12px; } }

/* ---------- 1. the gifts ---------- */
.cg-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cg-cat { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--soft); color: var(--text); font: 800 0.98rem/1 var(--font-body); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; }
.cg-cat[aria-pressed='true'] { background: var(--text); color: var(--on-dark); }
.cg-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 16px 12px; }
.cg-picks > li[hidden], .cg-picks.is-short > li[data-more] { display: none; }
.cg-more[hidden] { display: none; }
.cg-pick { display: grid; gap: 6px; width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cg-pick-pic { position: relative; display: block; overflow: hidden; aspect-ratio: 1; border-radius: var(--r-md); background: var(--soft); box-shadow: inset 0 0 0 0 var(--mark); transition: transform 0.2s var(--ease-out); }
.cg-pick-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cg-pick-pic::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 var(--mark); transition: box-shadow 0.15s ease; }
.cg-pick[aria-pressed='true'] .cg-pick-pic::after { box-shadow: inset 0 0 0 4px var(--mark); }
.cg-pick-on { position: absolute; right: 8px; top: 8px; z-index: 1; width: 30px; height: 30px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.5l4.2 4.2L18.5 8' fill='none' stroke='%23fff9f3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; opacity: 0; transform: scale(0.6); transition: opacity 0.15s ease, transform 0.2s var(--ease-out); }
.cg-pick[aria-pressed='true'] .cg-pick-on { opacity: 1; transform: none; }
.cg-pick-name { font-weight: 900; font-size: 0.98rem; line-height: 1.2; }
.cg-pick-from { font-weight: 800; font-size: 0.92rem; color: var(--accent-ink); }
.cg-pick:active .cg-pick-pic { transform: scale(0.97); }
.cg-pick:focus-visible, .cg-cat:focus-visible, .cg-stepper button:focus-visible, .cg-quick button:focus-visible, .cg-x:focus-visible, .cg-size:has(input:focus-visible) { outline: 3px solid var(--mark); outline-offset: 3px; border-radius: 12px; }
@media (hover: hover) and (pointer: fine) { .cg-pick:hover .cg-pick-pic { transform: translateY(-3px); } .cg-cat:hover { background: var(--sand-3); } .cg-cat[aria-pressed='true']:hover { background: var(--text); } }
@media (prefers-reduced-motion: reduce) { .cg-pick-pic, .cg-pick-on, .cg-pick-pic::after { transition: none; } }

/* what's been chosen, each with how many people get it */
.cg-lines:empty { display: none; }
.cg-lines, .cg-lines > ul { display: grid; gap: 10px; }
.cg-lines-h { font-weight: 900; font-size: 1.02rem; color: var(--text); }
.cg-lines-note { font-weight: 700; line-height: 1.45; color: var(--text-soft); }
.cg-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: 'pic what x' 'pic size size' 'count count total'; gap: 10px 14px; align-items: center; padding: 14px; border-radius: var(--r-md); background: var(--soft); }
.cg-line.is-new { animation: cg-line-in 0.25s var(--ease-out); }
@keyframes cg-line-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .cg-line.is-new { animation: none; } }
.cg-line-pic { grid-area: pic; align-self: start; width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; background: #fff; }
.cg-line-what { grid-area: what; min-width: 0; }
.cg-line-what strong { display: block; font-weight: 900; font-size: 1.04rem; line-height: 1.2; color: var(--text); }
.cg-line-what small { display: block; margin-top: 2px; font-weight: 700; font-size: 0.88rem; color: var(--muted); }
.cg-x { grid-area: x; align-self: start; display: grid; place-items: center; width: 40px; height: 40px; margin: -6px -6px 0 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.cg-x svg { width: 18px; height: 18px; }
.cg-sizes { grid-area: size; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cg-size { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-weight: 800; font-size: 0.95rem; color: var(--text); cursor: pointer; }
.cg-size input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cg-size:has(input:checked) { box-shadow: inset 0 0 0 3px var(--mark); }
.cg-size em { font-style: normal; color: var(--accent-deep); }
.cg-count { grid-area: count; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-width: 0; }
.cg-count > label { font-weight: 800; font-size: 0.95rem; color: var(--text); }
.cg-stepper { display: inline-flex; align-items: center; height: 48px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px var(--field-line); }
.cg-stepper button { display: grid; place-items: center; width: 46px; height: 48px; border: 0; background: none; color: var(--text); font: 900 1.3rem/1 var(--font-body); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cg-stepper input { width: 3.4em; height: 44px; padding: 0; border: 0; background: none; color: var(--text); font: 900 1.1rem/1 var(--font-body); text-align: center; -moz-appearance: textfield; appearance: textfield; }
.cg-stepper input::-webkit-outer-spin-button, .cg-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.chrome-new .cg-stepper input:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; border-radius: 10px; }
.cg-quick { display: inline-flex; gap: 6px; }
.cg-quick button { min-width: 44px; height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: #fff; color: var(--accent-deep); font: 800 0.88rem/1 var(--font-body); cursor: pointer; }
.cg-line-total { grid-area: total; justify-self: end; font-weight: 900; font-size: 1.12rem; color: var(--text); font-variant-numeric: tabular-nums; }
.cg-aside { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--soft); font-weight: 700; line-height: 1.45; --accent-ink: var(--accent-deep); }
.cg-aside .f-ico { flex: none; width: 34px; height: 34px; }
@media (max-width: 520px) { .cg-line { grid-template-areas: 'pic what x' 'size size size' 'count count count' 'total total total'; } .cg-line-total { justify-self: start; } .cg-quick { flex-wrap: wrap; } }

/* ---------- fields ---------- */
.cg-field { display: grid; gap: 6px; min-width: 0; }
.cg-field > label { font-weight: 900; font-size: 1rem; color: var(--text); }
.cg-field input, .cg-field textarea { width: 100%; min-width: 0; margin: 0; padding: 0 16px; height: 54px; border: 2px solid var(--field-line); border-radius: 16px; background: #fff; color: var(--text); font: 700 1.02rem/1.3 var(--font-body); -webkit-appearance: none; appearance: none; }
.cg-field textarea { height: auto; min-height: 96px; padding: 14px 16px; line-height: 1.45; resize: vertical; }
.cg-field input::placeholder, .cg-field textarea::placeholder { color: var(--muted); opacity: 0.75; font-weight: 600; }
.chrome-new .cg-field input:focus-visible, .chrome-new .cg-field textarea:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; border-radius: 16px; }
.cg-field.is-bad input, .cg-field.is-bad textarea { border-color: #b4432f; }
.cg-field--date { max-width: 260px; }
.cg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.cg-field--wide { grid-column: 1 / -1; }
@media (max-width: 520px) { .cg-grid { grid-template-columns: minmax(0, 1fr); } }
.cg-say { font-weight: 700; line-height: 1.45; color: var(--text-soft); }
.cg-say:empty { display: none; }
.cg-say strong { color: var(--text); }
.cg-say.is-warn { color: #8a2c1c; }
.cg-left { justify-self: end; font-weight: 700; font-size: 0.86rem; color: var(--muted); }
.cg-left.is-low { color: #8a2c1c; }

/* ---------- 3. the note ---------- */
.cg-choices { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.cg-choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-md); box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; transition: box-shadow 0.15s ease, background-color 0.15s ease; }
.cg-choice input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.cg-choice strong { display: block; font-weight: 900; color: var(--text); line-height: 1.25; }
.cg-choice small { display: block; margin-top: 2px; font-weight: 600; font-size: 0.92rem; color: var(--text-soft); line-height: 1.35; }
.cg-choice:has(input:checked) { background: var(--soft); box-shadow: inset 0 0 0 3px var(--mark); }
.cg-choice:has(input:focus-visible) { outline: 3px solid var(--mark); outline-offset: 3px; }

/* ---------- 5. your details ---------- */
/* The news question, which is also how the order is saved: two buttons, and neither is chosen for anyone. */
.cg-news { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px 18px; padding: clamp(18px, 2.4vw, 24px) clamp(18px, 2.4vw, 26px) clamp(24px, 2.8vw, 30px); border-radius: var(--r-md); background: var(--soft); }
.cg-news-mark { width: 62px; height: auto; transform: rotate(-8deg); }
.cg-news-q { font: 400 clamp(1.4rem, 1.15rem + 1vw, 1.75rem)/1.08 var(--font-display); color: var(--heading); text-wrap: balance; }
.cg-news-q:focus { outline: none; }
.chrome-new .cg-news-q:focus-visible { outline: 3px solid var(--mark); outline-offset: 3px; border-radius: 8px; }
.cg-news-what { margin-top: 8px; max-width: 62ch; font-weight: 600; font-size: 0.97rem; line-height: 1.45; color: var(--text-soft); }
.cg-news-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 18px 14px; }
/* Side by side where each fits on a line, one above the other where they don't. */
.cg-news-btns .f-btn { flex: 1 1 19rem; min-width: 0; padding-inline: 1.1em; font-size: 1.1rem; line-height: 1.15; text-align: center; text-wrap: balance; }
@media (max-width: 480px) { .cg-news-btns .f-btn { padding-inline: 0.7em; font-size: 1rem; } }
@media (max-width: 420px) { .cg-news { grid-template-columns: minmax(0, 1fr); } .cg-news-mark { width: 52px; } }
.cg-errors { padding: 14px 18px; border-radius: 16px; background: #fff; border: 2px solid #b4432f; color: #8a2c1c; font-weight: 800; line-height: 1.45; }
.cg-errors:focus { outline: none; }
.cg-errors ul { margin: 6px 0 0; padding-left: 1.2em; list-style: disc; }
.cg-errors li + li { margin-top: 4px; }
.cg-small { font-size: 0.9rem; font-weight: 600; line-height: 1.5; color: var(--muted); }
.cg-noscript { grid-column: 1 / -1; padding: 16px 18px; border-radius: var(--r-md); background: #fff; font-weight: 700; }

/* ---------- the slip: what it comes to ---------- */
.cg-slip-wrap { position: sticky; top: calc(var(--head-h) + 14px); min-width: 0; }
.cg-slip { padding: 22px 22px 24px; border-radius: var(--r-lg); background: var(--soft-2); color: var(--text); }
.cg-slip-kind { font: 400 1.5rem/1 var(--font-display); color: var(--heading); }
.cg-slip-empty { margin-top: 12px; font-weight: 700; line-height: 1.45; color: var(--text-soft); }
.cg-slip-lines { display: grid; gap: 10px; margin-top: 16px; }
.cg-slip-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; font-weight: 800; line-height: 1.3; }
.cg-slip-lines small { grid-column: 1; font-weight: 700; font-size: 0.88rem; color: var(--muted); }
.cg-slip-lines span:nth-child(2) { font-variant-numeric: tabular-nums; }
.cg-slip-sums { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 2px dashed var(--sand-3); }
.cg-slip-sums > div { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.cg-slip-sums dt small { display: block; font-weight: 600; font-size: 0.86rem; color: var(--muted); line-height: 1.3; }
.cg-slip-sums dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cg-slip-total { margin-top: 6px; padding-top: 12px; border-top: 2px solid var(--sand-3); align-items: baseline; }
.cg-slip-total dt { font-weight: 900; font-size: 1.05rem; }
.cg-slip-total dd { font: 400 2rem/1 var(--font-display); color: var(--heading); }
.cg-slip-gst { font-weight: 600; font-size: 0.88rem; color: var(--muted); text-align: right; }
.cg-slip-when { display: grid; gap: 8px; margin-top: 16px; padding: 14px 16px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.7); font-weight: 700; line-height: 1.4; }
.cg-slip-when strong { color: var(--text); }
.cg-slip-next { margin-top: 14px; font-weight: 600; font-size: 0.92rem; line-height: 1.45; color: var(--text-soft); }
.cg-slip.is-stale .cg-slip-sums, .cg-slip.is-stale .cg-slip-when { opacity: 0.55; }

/* On a phone the slip sits under the steps, with the price on a bar until the slip itself is in view. */
.cg-bar { display: none; }
@media (max-width: 900px) {
  .cg-order { grid-template-columns: minmax(0, 1fr); }
  .cg-slip-wrap { position: static; }
  .cg-bar:not([hidden]) { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 20px; border-radius: 999px; background: #fff; box-shadow: 0 14px 34px -10px rgba(var(--shade-deep), 0.5), 0 0 0 2px var(--line); transition: transform 0.25s var(--ease-out), opacity 0.2s ease; }
  .cg-bar.is-away { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .cg-bar small { display: block; font-weight: 700; font-size: 0.82rem; color: var(--muted); line-height: 1.2; }
  .cg-bar strong { display: block; font-weight: 900; font-size: 1.2rem; color: var(--text); line-height: 1.2; font-variant-numeric: tabular-nums; }
  .cg-order-sec { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) { .cg-bar { transition: none; } }
