/* ==========================================================================
   argon-compat.css  -  compatibility patch for argon.css (Argon output from the
   rendered DOM of british-coffee.co.uk).  Loaded AFTER style.css, editorial.css,
   first-light.css and argon.css.  argon.css and the legacy sheets are untouched.

   Why it is needed: argon.css was generated against the rendered page, not the
   authoritative source, and it uses low-specificity selectors (.hero, .choices
   button, .product label ...).  The legacy sheets use higher-specificity rules
   (.coffee .hero, .quiz .choices button, .product select ...), some with
   !important, so they keep winning and break the Argon look.  Every rule below
   restores the value argon.css intends, using the same selector plus a
   body.coffee prefix for specificity.  No legacy behaviour (dialogs, [hidden],
   honeypot, consent, receipts) is removed.
   ========================================================================== */

/* ---- 1. Global / typography ------------------------------------------------ */
body.coffee h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}
body.coffee h1 em { font-weight: 400; color: var(--accent); }
body.coffee .quiz h2 { font-size: clamp(1.85rem, 3.5vw, 2.85rem); }
header .brand { text-transform: none; line-height: 1.2; }
body.coffee .small, body.coffee .fine { opacity: 1; color: var(--ink-muted); }
body.coffee .match-card .small { color: var(--ink-on-dark-muted); }

/* ---- 2. Hero ---------------------------------------------------------------- */
/* legacy: .coffee .hero { position:relative; min-height:650px; background:#eee5d8; display:flex } */
body.coffee .hero {
  position: static;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  background: transparent;
  color: var(--ink);
}
body.coffee .hero .copy { position: static; padding: 0; max-width: none; align-self: auto; }
body.coffee .hero .copy > p { max-width: 65ch; margin: 0 0 1.75rem; line-height: 1.6; }
body.coffee .hero > img {
  position: static;
  opacity: 1;
  min-height: 0;
  max-height: none;
  width: 100%;
  max-width: 100%;
  height: clamp(300px, 46vw, 540px);
  object-fit: cover;
  object-position: 68% center;
  order: 0;
}
body.coffee .hero .copy .button { display: inline-flex; width: auto; padding: 0.7rem 1.4rem; font-size: 0.95rem; }
body.coffee .hero .copy .secondary { display: inline-flex; margin: 0 0 0.75rem; font-size: 0.95rem; }
body.coffee .hero .hero-note {
  font-size: 0.85rem !important;
  color: var(--ink-muted);
  max-width: 65ch;
  margin: 0.75rem 0 0;
}
@media (min-width: 1080px) {
  body.coffee .hero { grid-template-columns: 1.05fr 0.95fr; }
}
@media (max-width: 480px) {
  body.coffee .hero .copy .button,
  body.coffee .hero .copy .secondary { width: 100%; margin-right: 0; }
}
/* hero text must stay legible over the photo at every width */
body.coffee .hero .copy { position: relative; z-index: 1; }

/* ---- 3. Principles ribbon --------------------------------------------------- */
body.coffee .principles { font-size: 1rem; letter-spacing: normal; line-height: 1.6; }

/* ---- 4. Quiz ---------------------------------------------------------------- */
/* legacy: .quiz { color:#fff6e9 } made every light-panel paragraph and every
   choice button light-on-light (unreadable). */
body.coffee .section.quiz { color: var(--ink); }
body.coffee .quiz .choices { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin: 0; }
body.coffee .quiz .choices button {
  width: 100%;
  justify-content: space-between;
  text-align: left;
  min-height: 46px;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  border: 2px solid var(--border-strong);
  font-size: 1rem;
  font-weight: 600;
}
body.coffee .quiz .choices button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}
body.coffee .quiz .choices button[aria-pressed="true"] {
  background: var(--bg-espresso);
  color: var(--ink-on-dark);
  border-color: var(--bg-espresso);
}
@media (min-width: 768px) {
  body.coffee .quiz .choices { grid-template-columns: repeat(3, 1fr); }
  body.coffee .quiz .choices button {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    min-height: 96px;
  }
}
body.coffee .quiz-progress {
  text-transform: none;
  letter-spacing: normal;
  justify-content: flex-start;
  margin: 0.5rem 0 1.5rem;
  padding: 0.45rem 0.9rem;
}
body.coffee .quiz-progress #stepLabel { text-transform: uppercase; letter-spacing: 0.06em; }
body.coffee .quiz .back { color: var(--ink); }
body.coffee .quiz .back:hover:not(:disabled) { color: var(--bg-elevated); }
body.coffee .match-card { align-self: stretch; background-color: var(--bg-espresso); }
body.coffee .match-card .secondary { display: inline-flex; margin: 0 0 1.25rem; }
body.coffee .match-card h3 { margin: 0 0 1rem; }
body.coffee .match-card .eyebrow { color: #e58c6e; }
body.coffee .match-card #matchAdd { margin-bottom: 0.75rem; }

/* ---- 5. Product cards ------------------------------------------------------- */
/* legacy: .product>p/h3/button { margin:0 18px }, .product select / label rules,
   .visual{background:...!important}, .pack-photo{mix-blend-mode;object-fit!important} */
body.coffee .product > p,
body.coffee .product > h3,
body.coffee .product > button,
body.coffee .product > label { margin-left: 0; margin-right: 0; }
body.coffee .product > button[data-add],
body.coffee .product > .product-detail-open { width: 100%; }
body.coffee .product .eyebrow { margin-top: 0; }
body.coffee .product > label { margin-top: 0; margin-bottom: 1rem; font-size: 0.875rem; }
body.coffee .product label select {
  width: 100%;
  margin: 0.4rem 0 0;
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  background-color: #ffffff;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 12px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  font-size: 0.95rem;
  font-weight: 400;
}
body.coffee .product button { padding: 0.7rem 1.4rem; font-size: 0.95rem; min-height: 46px; }
body.coffee .product h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.25; letter-spacing: -0.02em; }
body.coffee .product .small { font-size: 0.82rem; color: var(--ink); }
body.coffee .product .visual,
body.coffee .product:nth-child(n) .visual {
  background: radial-gradient(circle at 50% 45%, #fbf8f2 0%, #eadfcd 100%) !important;
  height: auto;
  padding: 0;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}
/* the pouch photograph fills the panel edge to edge (it has its own backdrop) */
body.coffee .product .visual .pack-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0;
  object-fit: cover !important;
  mix-blend-mode: normal;
  filter: none;
}
body.coffee .product .product-detail-open {
  margin-top: 0 !important;
  background: transparent !important;
  color: var(--ink) !important;
  border: 2px solid var(--ink) !important;
}
body.coffee .product .product-detail-open:hover:not(:disabled) {
  background: var(--ink) !important;
  color: var(--bg-elevated) !important;
}
@media (max-width: 420px) {
  body.coffee .products { grid-template-columns: 1fr; }
  body.coffee .product p { font-size: 0.95rem; }
}

/* ---- 6. Story / guides / invite / details ----------------------------------- */
body.coffee .section.story { background: transparent; align-items: center; }
body.coffee .section.story img { height: clamp(280px, 38vw, 460px); }
body.coffee .guides article { border-top: 1px solid var(--border); padding: 1.75rem; }
body.coffee .section.invite { background: var(--bg-espresso); color: var(--ink-on-dark); }
body.coffee .section.invite p { font-size: 1rem; color: var(--ink-on-dark-muted); }
body.coffee details { padding: 0; border-bottom: 1px solid var(--border); }
body.coffee details:not([open]) { border-bottom: 1px solid var(--border); }
body.coffee details > summary { padding: 1.15rem 1.35rem; }
body.coffee details > summary::before { content: none; display: none; }  /* legacy chevron; argon draws its own +/− */

/* ---- 7. Footer -------------------------------------------------------------- */
body.coffee footer { font-size: 1rem; }
body.coffee footer a { margin: 0; }
body.coffee footer details {
  padding: 0.75rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.04);
}
body.coffee footer details > summary { padding: 0.4rem 0; }

/* ---- 8. Dialogs, forms ------------------------------------------------------ */
dialog[open] { max-width: 94vw; }
#productDetail[open] { padding: clamp(1.5rem, 3.5vw, 2.5rem); }
body.coffee dialog .back,
body.coffee dialog button.back { color: var(--ink); }
body.coffee dialog .back:hover:not(:disabled) { color: var(--bg-elevated); }
body.coffee #selectionReview { padding-top: 0; border-top: 0; margin: 0.75rem 0; }
body.coffee .detail-grid > div:first-child { padding: 0; overflow: hidden; }
body.coffee .detail-grid img { max-height: none; margin: 0; filter: none; border-radius: 0; object-fit: cover; }
body.coffee #productDetail .detail-grid button { margin: 0 0 0.65rem; }
/* legacy .honeypot{display:none} and argon's off-screen rule both stay; belt and braces: */
.honeypot { display: none !important; }
body.coffee label.consent { margin: 0; }
body.coffee label.consent input[type="checkbox"] { width: 22px; padding: 0; margin: 0.1rem 0 0; }
body.coffee #leadForm input:not([type="checkbox"]),
body.coffee #removeForm input {
  width: 100%;
  margin: 0.4rem 0 0;
  padding: 0.65rem 1rem;
  background-color: #ffffff;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  min-height: 46px;
  font-weight: 400;
}
/* argon has no rule for the generic form-label spacing inside forms */
body.coffee #leadForm label, body.coffee #removeForm label { margin-bottom: 0; }

/* ---- 9. Shortlist rows ------------------------------------------------------ */
/* argon: dialog#basket button:not(.close){width:100%} was written for the footer
   action buttons but also hit each row's Remove button (full-width, wrapped). */
dialog#basket #basketRows .row { flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
dialog#basket #basketRows .row button {
  width: auto;
  flex-shrink: 0;
  margin: 0;
  min-height: 40px;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
}
