/* core.css — every page of every brand: tokens, reset, header, cards, buttons,
   feedback modal, footer and the small shared bits. Loaded first everywhere.
   Brand palettes override the :root tokens (brand-<id>.css on the wizard
   pages, site-<id>.css on the marketing pages). Never hardcode a colour here.
 */

:root {
  --bg-1: #ff9fb5;
  --bg-2: #ff5a87;
  --bg-3: #a45cd6;
  --bg-4: #6b4ba8;

  --ink:        #2a1340;
  --ink-soft:   #4a2e5c;
  --ink-mute:   #8a6f9c;
  --line:       #ecd9f0;

  --card:       #ffffff;
  --card-soft:  #fbf4ff;

  --accent:     #e91e63;
  --accent-2:   #7b1fa2;
  --accent-soft: #ffb4c9;   /* light end of the progress-bar gradient */
  --tint:       #fff0f6;    /* hover / selected background on white */
  --field-bg:   #fbf8ff;    /* textarea background */
  --icon-1:     #fce7f3;    /* feature icon chip gradient */
  --icon-2:     #f3e8ff;
  --bg-top:     #ffe6f0;    /* page background base gradient */
  --bg-bottom:  #f4e4ff;
  --good:       #2e7d32;
  --bad:        #c62828;

  /* Shadow and overlay colors; alpha is applied with color-mix(). */
  --shadow-ink: #2e083c;
  --scrim-ink:  #140528;
  --backdrop:   rgba(26, 17, 34, 0.55);

  --radius:     18px;
  --radius-sm:  12px;
  --shadow-sm:  0 2px 6px color-mix(in srgb, var(--shadow-ink) 8%, transparent);
  --shadow-md:  0 10px 30px color-mix(in srgb, var(--shadow-ink) 15%, transparent);
  --shadow-lg:  0 24px 60px color-mix(in srgb, var(--shadow-ink) 22%, transparent);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 10% -10%, var(--bg-1), transparent 60%),
    radial-gradient(900px 700px at 110% 10%, var(--bg-2), transparent 55%),
    radial-gradient(1200px 900px at 50% 110%, var(--bg-3), transparent 60%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.container-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Respect iOS safe-area insets (notch / Dynamic Island / home indicator)
     while keeping 18/24 as minimums on devices that don't need insets. */
  padding:
    max(18px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    18px
    max(24px, env(safe-area-inset-left));
  max-width: 1120px;
  margin: 0 auto;
}

header.site .brand {
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
header.site .brand .dot { color: var(--accent); }

header.site .age-chip {
  font-size: 12px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* Same shape / weight as .age-chip, but interactive. Used for the
   "Send feedback" entry point that replaces the chip on every public
   page except the active quiz. */
header.site .chip-btn {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 8px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease,
              border-color 120ms ease, box-shadow 160ms ease;
}
header.site .chip-btn:hover,
header.site .chip-btn:focus-visible {
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-color: transparent;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent);
  outline: none;
}
header.site .chip-btn:active { transform: translateY(1px); }

/* Compact icon-only variant — used alongside nameChip on /quiz so both
   fit in the header without crowding. */
header.site .chip-btn.icon-only {
  padding: 8px 11px;
  font-size: 15px;
  line-height: 1;
}

/* Right-side cluster for pages that need multiple header affordances
   (quiz: feedback button + nameChip). */
header.site .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The quiz header also carries the name chip ("Sam · for Alex"). On narrow
   phones the wordmark keeps its line and the chip shrinks and truncates
   with an ellipsis instead of wrapping into two lines against the wordmark. */
@media (max-width: 480px) {
  .page-quiz header.site { gap: 10px; }
  .page-quiz header.site .brand { white-space: nowrap; flex-shrink: 0; }
  .page-quiz header.site .header-right { min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
  .page-quiz header.site .age-chip {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ----- Feedback modal ----- */
.fb-backdrop {
  position: fixed; inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(3px);
  opacity: 0;
  /* Without this, the backdrop stays in place after .open is removed
     and silently eats every click on the page even though it's invisible. */
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 40;
}
.fb-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.fb-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 41;
  pointer-events: none;
  /* Hidden too, so Tab, screen readers and typing can't reach a closed dialog;
     delayed so its card still fades out. */
  visibility: hidden;
  transition: visibility 0s linear 180ms;
}
.fb-modal.open {
  visibility: visible;
  transition-delay: 0s;
}
.fb-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px color-mix(in srgb, var(--scrim-ink) 35%, transparent);
  padding: 24px 26px 20px;
  width: 100%;
  max-width: 460px;
  position: relative;
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 180ms ease;
  /* Card also needs to opt out of hit-testing while closed — it's still
     rendered (faded out) and would otherwise catch clicks in its stale
     position near the center of the viewport. */
  pointer-events: none;
}
.fb-modal.open .fb-card {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.fb-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink-soft);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 140ms ease, color 140ms ease;
}
.fb-close:hover { background: var(--tint); color: var(--accent); }

.fb-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.fb-sub {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0 0 14px;
}
.fb-textarea {
  width: 100%;
  min-height: 120px;
  max-height: 320px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--field-bg);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  box-sizing: border-box;
}
.fb-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.fb-textarea::placeholder { color: var(--ink-mute); }

.fb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.fb-count {
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.fb-count.warn { color: var(--accent); }

.fb-send {
  /* Use .btn inline-style; kept here for completeness in case .btn
     rules move later. */
  min-width: 96px;
}
.fb-send[disabled] { opacity: 0.55; cursor: not-allowed; }

.fb-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}
.fb-status.ok   { background: #e3f6e8; color: #2e7d32; }
.fb-status.err  { background: #ffebee; color: #8e0000; }

@media (max-width: 480px) {
  .fb-card { padding: 20px 18px 16px; }
  .fb-title { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .fb-backdrop, .fb-modal .fb-card { transition: none; }
}

/* ----- Cards ----- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px;
}
.card + .card { margin-top: 20px; }
.card.soft { background: var(--card-soft); box-shadow: var(--shadow-sm); }

.card h1 {
  font-size: 32px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.card h2 {
  font-size: 22px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
/* Use margin-block (top+bottom only) so child paragraphs that set
   `margin: 0 auto ...` for centering don't have their inline (left/right)
   margins clobbered by the shorthand. Previously `margin: 0 0 12px` set
   all four sides, silently defeating `auto` side-margins on descendants. */
.card p { color: var(--ink-soft); line-height: 1.5; margin-block: 0 12px; }
.muted { color: var(--ink-mute); font-size: 14px; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  /* Three-stop "palindromic" gradient (pink → purple → pink) drawn at
     200% size so only half is visible in the button at any given time.
     At rest, we frame the top-left half (pink → purple); on hover we
     slide the frame to the bottom-right half (purple → pink). Because
     we're animating `background-position` — an interpolable CSS value —
     the transition is buttery smooth, unlike swapping the whole gradient
     image which browsers can't tween. */
  background-image: linear-gradient(
    135deg,
    var(--accent)   0%,
    var(--accent-2) 50%,
    var(--accent)   100%
  );
  background-size: 200% 200%;
  background-position: 0% 0%;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease,
              box-shadow 180ms ease,
              background-position 550ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 120ms ease;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);
  /* .btn may be applied to an <a>; suppress the global a:hover underline. */
  text-decoration: none;
}
.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 48%, transparent);
  /* Slide to the far corner — the visible "window" now shows the purple
     → pink half, so the gradient appears to flow across the button. */
  background-position: 100% 100%;
  text-decoration: none;
  outline: none;
}
.btn:active { transform: translateY(0); }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-disabled="true"] { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: opacity 120ms ease; }
}

.btn.secondary {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn.secondary:hover { box-shadow: var(--shadow-md); }
.btn.secondary:focus-visible {
  box-shadow: var(--shadow-md), 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}

.btn.big {
  padding: 16px 28px;
  font-size: 18px;
}
/* The unlock control is an <a> (so hovering previews checkout.stripe.com)
   but must look exactly like the <button>s around it: take the browser's
   own form-control font, which is what a <button> gets, instead of
   inheriting the page font. Browsers without the keyword just inherit. */
#unlockBtn {
  font: -webkit-small-control;
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 1px dashed var(--line);
}

/* ----- Form actions (start form, share page, session hub) ----- */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.form-actions.centered {
  justify-content: center;
}
@media (max-width: 560px) {
  .form-actions {
    justify-content: center;
  }
}

/* ----- Misc ----- */
footer.site {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 28px 20px 40px;
}

/* Rounded translucent card that wraps the footer copy + the "crafted"
   tagline. Inline-block so it naturally sizes to its content and stays
   centered on narrow screens; subtle white-ish fill + backdrop blur sits
   nicely over the lavender page background and keeps the text readable. */
footer.site .footer-card {
  display: inline-block;
  max-width: 100%;
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 14px color-mix(in srgb, var(--scrim-ink) 5%, transparent);
  line-height: 1.55;
}

/* Secondary link row under the main footer sentence (home/start pages).
   Tighter gap above than the crafted line so the visual rhythm reads as
   "main text → its own links → tagline". */
footer.site .footer-links {
  margin-top: 8px;
  font-size: 13px;
}

/* Copyright line. Sits BELOW the rounded footer card as a tiny, muted
   signature — the card is the "page footer", this is the legal stamp. */
footer.site .footer-copyright {
  margin-top: 14px;
  font-size: 11px;
  color: var(--ink-mute);
  opacity: 0.75;
  letter-spacing: 0.02em;
}

/* "Crafted with ❤ in NYC" — tasteful, tiny, gradient on the city,
   heart beats. Shown as a separate block line under each page's contextual
   footer text. */
footer.site .crafted {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-mute);
  opacity: 0.95;
}
footer.site .crafted .heart {
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  transform-origin: center;
  animation: heartbeat 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 45%, transparent));
}
footer.site .crafted .city {
  background: linear-gradient(90deg, var(--accent-2) 0%, var(--accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 700;
  letter-spacing: 0.14em;
}
@keyframes heartbeat {
  0%, 60%, 100% { transform: scale(1);    }
  15%           { transform: scale(1.25); }
  30%           { transform: scale(1);    }
  45%           { transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  footer.site .crafted .heart { animation: none; }
}
.pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.6); opacity: 0.4; }
}

.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fff8e1;
  border: 1px solid #fde8a7;
  color: #6a4f00;
  font-size: 14px;
  margin-bottom: 12px;
}
.notice.error { background: #ffebee; border-color: #ffcdd2; color: #8e0000; }

.topline {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.topline .back { color: var(--ink-soft); font-size: 14px; }
.topline .back:hover { color: var(--accent); }

.checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 14px;
  margin: 10px 0;
}
.checklist .chk { margin-right: 8px; }

/* Utility: elements that only render on paper. Kept outside @media
   print so the off-screen hiding is always in effect. */
.print-only { display: none; }

/* ----- Category sections (results report and the all-questions page) ----- */
/* Each category is a native <details>. We treat the whole section like
   a mini-card: the <summary> is a rounded, tappable header that hints
   at its affordance via background, hover, and a rotating chevron, and
   the body indents under it with a connecting left rail so the
   collapsed/expanded relationship stays visually clear. */
.category-section {
  margin-top: 16px;
  border-radius: var(--radius-sm);
  background: var(--card-soft);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}
.category-section[open] {
  border-color: color-mix(in srgb, var(--accent-2) 22%, transparent);
  box-shadow: 0 6px 20px -14px color-mix(in srgb, var(--accent-2) 35%, transparent);
}

.category-section > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  outline: none;
  /* no border-radius on the summary itself — the parent <details>
     already clips; this means hover fills the whole header edge-to-edge */
}
.category-section > summary::-webkit-details-marker,
.category-section > summary::marker { display: none; }
.category-section > summary:hover {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.category-section > summary:focus-visible {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent-2) 40%, transparent);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 0;
  transition: background 160ms ease;
}
.category-header .emj {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}
.category-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.category-header .count {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.category-header .chev {
  margin-left: auto;
  color: var(--ink-mute);
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--line);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1),
              color 160ms ease,
              border-color 160ms ease,
              background 160ms ease;
  transform: rotate(-90deg);
  flex-shrink: 0;
}
.category-header .chev svg {
  display: block;
}
.category-section[open] .category-header .chev {
  transform: rotate(0deg);
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 35%, transparent);
  background: color-mix(in srgb, var(--accent-2) 6%, transparent);
}
.category-section > summary:hover .chev {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 35%, transparent);
}
.category-body {
  padding: 4px 16px 14px 16px;
}

@media (max-width: 560px) {
  .category-header { padding: 12px 12px; gap: 10px; }
  .category-header h2 { font-size: 16px; }
  .category-header .emj { font-size: 22px; }
  .category-body { padding: 4px 10px 12px 10px; }
}

.match {
  padding: 14px 16px;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.category-body .match:last-child { margin-bottom: 0; }

/* ============================================================
   Print styles — the results page is the primary target here.
   Goal: a calm, document-style printout with everything visible,
   no interactive affordances, and match rows that don't break
   across pages. All of this is scoped to @media print so the
   live site stays rich.
   ============================================================ */
@media print {
  /* Reset the gradient background so we don't burn a wall of pink ink. */
  html, body {
    background: #fff !important;
    color: #111 !important;
  }

  /* Hide chrome / navigation / interactive widgets that don't belong
     on paper. results.js's beforeprint handler also forces every
     <details> open so the category bodies render. */
  header.site,
  footer.site,
  .chip-btn,
  .feedbackBtn,
  .fb-backdrop,
  .fb-card,
  .waiting-check,
  #waiting,
  .btn,
  .not-found-card .not-found-actions {
    display: none !important;
  }

  /* Drop the bottom "Print or save as PDF" CTA card entirely — it's
     redundant inside the printout itself. Also drop the rate-us card
     (interactive only, no print value). */
  #report > #printCard,
  #report > .rate-card { display: none !important; }

  main.container-wide {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  /* Cards become plain sections — no background, no shadow, no border,
     just vertical spacing. */
  .card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 0 18px 0 !important;
  }

  h1, h2, h3 { color: #111 !important; }
  .muted, .sub { color: #444 !important; }

  /* Top score cards: keep them as tidy outlined boxes (printer-safe
     whether or not the browser renders page backgrounds) with real
     breathing room inside. Stacked vertically so each gets full width
     on paper — scanning numbers is easier in one column. */
  .score-cards {
    display: block !important;
  }
  .score-card {
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    padding: 14px 18px !important;
    margin: 0 0 12px 0 !important;
    break-inside: avoid;
  }
  .score-card h3 {
    margin: 0 0 6px 0 !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .big-number { font-size: 32px !important; }
  /* Adventurousness bars become simple rules so the printout doesn't
     need color to be legible. */
  .score-card .bar {
    background: #eee !important;
    height: 6px !important;
  }
  .score-card .bar > div {
    background: #888 !important;
  }

  /* Drop the pink card-soft background and border on print so the
     callout reads as a centered text line, not a nested box. The
     accent-colored count stays as text emphasis. */
  .shared-desires-callout {
    background: transparent !important;
    border: 0 !important;
    padding: 6px 0 !important;
  }
  .shared-desires-callout .count {
    color: #111 !important;
  }

  /* Category sections: strip the "expandable card" visual language
     entirely — on paper it's just a heading followed by matches. */
  .category-section,
  .category-section[open] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 18px 0 0 0 !important;
    break-inside: auto;
  }
  .category-section > summary { padding: 0 !important; }
  .category-header {
    padding: 0 0 6px 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid #ccc !important;
    gap: 8px !important;
  }
  .category-header h2 {
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .category-header .emj { font-size: 18px !important; }
  /* The match-count chip is redundant when every match is printed
     right below — hide the chip to keep the heading quiet. */
  .category-header .count,
  .category-header .chev {
    display: none !important;
  }

  .category-body {
    padding: 6px 0 0 0 !important;
  }

  /* Match rows: simple bordered-less lines, bias toward NOT breaking
     a single match across a page break. */
  .match {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    border-bottom: 1px dotted #ddd !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .category-body .match:last-child {
    border-bottom: none !important;
  }
  .match .q { font-size: 12.5px !important; }
  .match .q .sep { color: #666 !important; }
  .match .answers {
    font-size: 11.5px !important;
    color: #333 !important;
    gap: 14px !important;
  }
  .match .answers .emj { font-size: 13px !important; }

  .empty-cat { color: #666 !important; }

  /* Flip on the print-only helpers. */
  .print-only { display: block !important; }

  /* Branded header at the top of the printout. Sits above the report
     cards so the first thing the reader/printer sees is where this
     paper came from. The accent bar under the brand mirrors the site's
     gradient in a subtle, ink-friendly tint. */
  .print-header {
    margin: 0 0 18px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #111;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
  }
  .print-brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111;
  }
  .print-brand .dot {
    color: var(--accent);
  }
  .print-meta {
    font-size: 11px;
    color: #555;
    letter-spacing: 0.02em;
  }
  .print-meta .sep { margin: 0 6px; color: #999; }

  .print-footer {
    margin-top: 22px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
    text-align: center;
    font-size: 11px;
    color: #555;
  }
  .print-footer strong {
    color: #111;
    font-weight: 700;
  }

  /* Set comfortable margins; browsers will honor these for @page. */
  @page { margin: 0.6in; }
}
