/* Receipt visual language from Figma "Visibility report" › ai-report-receipt (79:393).
   Shared by the printed receipt (/receipt/<slug>) and the web report (/r/<slug>). */
:root {
  /* Printed receipt (Figma 79:393) */
  --r-paper: #d1ebf6; --r-ink: #000; --r-cell-off: rgba(0, 0, 0, .1);
  --r-muted: var(--r-ink); --r-rule: var(--r-ink); --r-rule-thin: rgba(0, 0, 0, .2);
  --r-bar-bg: var(--r-ink); --r-bar-fg: var(--r-paper); --r-accent: var(--r-ink); --r-mid: rgba(0, 0, 0, .4);
  --r-chip-bg: rgba(0, 0, 0, .12); --r-chip-fg: var(--r-ink); --r-chip-good-bg: var(--r-ink); --r-chip-good-fg: var(--r-paper);
  --r-inter: 'Inter', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Newsreader', Georgia, serif;
}
/* On-screen palette from the big-screen frames (83:649, 71:6, 84:214) */
body.screen {
  --r-paper: #242220; --r-ink: #f1e8c7; --r-cell-off: rgba(241, 232, 199, .1);
  --r-muted: rgba(241, 232, 199, .4); --r-rule: rgba(241, 232, 199, .4); --r-rule-thin: rgba(241, 232, 199, .1);
  --r-bar-bg: #f1e8c7; --r-bar-fg: #242220; --r-accent: #d8fc3b; --r-mid: #93886f;
  --r-chip-bg: #93886f; --r-chip-fg: #242220; --r-chip-good-bg: #d8fc3b; --r-chip-good-fg: #242220;
}
html, html body { background: var(--r-paper); }
html:has(body.screen) { background: #242220; }
html body { line-height: 1.2; color: var(--r-ink); font-family: var(--r-inter); font-weight: 500; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

.receipt { display: flex; flex-direction: column; gap: 26px; width: 100%; max-width: 480px; margin: 0 auto; padding: 48px 32px; }
.receipt.web { max-width: 640px; }
@media (max-width: 480px) { .receipt { padding: 32px 16px; } }

/* Type */
.eyebrow, .cap { font-family: var(--mono); font-weight: 500; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.eyebrow { font-size: 16px; }
.cap { font-size: 12px; }
.cap.md { font-size: 14px; }
.cap.lg { font-size: 15px; }
.strong { font-size: 14px; font-weight: 700; }
.body { font-size: 14px; }
.small { font-size: 12px; }
.serif { font-family: var(--serif); font-weight: 500; line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.mega { font-weight: 700; line-height: 1; letter-spacing: -.06em; }

/* Rules: Figma line assets, tiled so dash spacing holds at any width */
.rule { height: 1.5px; background: var(--r-rule); -webkit-mask: url(/static/receipt/solid-line.svg) left / 100% 1.5px no-repeat; mask: url(/static/receipt/solid-line.svg) left / 100% 1.5px no-repeat; }
.rule.dashed { height: 1px; -webkit-mask: url(/static/receipt/dashed-line.png) left / 416px 1px repeat-x; mask: url(/static/receipt/dashed-line.png) left / 416px 1px repeat-x; }
.rule.thin { height: 1px; background: var(--r-rule-thin); -webkit-mask: url(/static/receipt/line.png) left / 416px 1px repeat-x; mask: url(/static/receipt/line.png) left / 416px 1px repeat-x; }

/* Header */
.header { display: flex; flex-direction: column; gap: 24px; }
.logos { position: relative; width: 100%; max-width: 416px; aspect-ratio: 416 / 41.054; }
.logos img { position: absolute; display: block; max-width: none; }
.logos .sitecore { left: 0; top: 0; width: 53.623%; height: 100%; }
.logos .scrunch { left: 58.224%; top: 8.745%; width: 40.124%; height: 75.121%; }
.logos .scrunch-dot { left: 99.044%; top: 59.896%; width: .955%; height: 9.711%; }

/* Persona */
.persona { display: flex; flex-direction: column; gap: 20px; }
.persona-art { position: relative; width: 100%; aspect-ratio: 416 / 312; overflow: hidden; }
.persona-art::before {
  content: ""; position: absolute; left: -109.756%; top: -67.581%; width: 319.512%; height: 235.162%;
  background: var(--r-ink);
  -webkit-mask: url(/static/receipt/persona-mask.png) 0 0 / 100% 100% no-repeat;
  mask: url(/static/receipt/persona-mask.png) 0 0 / 100% 100% no-repeat;
}
.persona h1 { font-size: clamp(56px, 20vw, 96px); }
.persona-tier { font-size: 16px; line-height: normal; }
.persona-tier b { display: block; font-weight: 700; }

.prepared { display: flex; flex-direction: column; gap: 4px; line-height: normal; }
.prepared .cap { font-size: 14px; height: 19px; }
.prepared h2 { font-size: 32px; font-weight: 700; line-height: 1.2; }
.prepared p { font-size: 18px; }

/* Score */
.score .figure { display: flex; align-items: baseline; }
.score .figure b { font-size: clamp(112px, 36vw, 168px); }
.slash { font-size: 32px; line-height: normal; }
.score-metrics { display: flex; justify-content: space-between; align-items: flex-start; border-top: 1px solid var(--r-rule); padding-top: 12px; }
.score-metrics > div:last-child { text-align: right; }
.score-metrics .cap { height: 25px; }
.score-metrics .serif { font-size: 40px; }
.score-metrics > div:last-child .serif { font-size: 30px; }

/* Section bar */
.bar { background: var(--r-bar-bg); color: var(--r-bar-fg); padding: 10px 0; text-align: center; font-family: var(--mono); font-weight: 700; font-size: 15px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }

/* Stat with meter */
.stat .cap { display: block; margin-bottom: 16px; }
.stat .figure { display: flex; align-items: baseline; gap: 3px; height: 64px; }
.stat .figure b { font-size: clamp(48px, 15vw, 64px); }
.meter { display: flex; gap: 4px; margin-top: 9.5px; }
.meter i { flex: 1; height: 16px; background: var(--r-cell-off); }
.meter i.on { background: var(--r-ink); }
.meter.sm { margin: 0; }
.meter.sm i { flex: none; width: 12px; }

.narrative { font-size: 14px; font-weight: 700; line-height: normal; }

/* Platform rows */
.platforms { display: flex; flex-direction: column; gap: 16px; }
.platform { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; gap: 12px; }
.pf-name { display: flex; align-items: center; gap: 10px; }
.pf-name svg { width: 20px; height: 20px; flex: none; }
.pf-more:not([hidden]) { display: contents; }
.more-btn { width: 100%; padding: 12px; margin-top: -10px; cursor: pointer; background: none; color: var(--r-ink);
            border: 1px solid var(--r-rule-thin); font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }
.more-btn:hover, .more-btn:focus-visible { border-color: var(--r-rule); outline: none; }
.platform .meter { justify-self: center; }
.platform .name { font-size: 14px; font-weight: 700; line-height: normal; }
.platform .vol { font-size: 12px; line-height: normal; margin-top: 2px; }
.platform .serif { font-size: 32px; min-width: 61px; text-align: right; }
@media (max-width: 400px) { .platform { grid-template-columns: 1fr auto; } .platform .meter { display: none; } }

/* Ranked list + quotes */
.block { display: flex; flex-direction: column; gap: 16px; }
.list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: normal; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.row > span:nth-child(2) { justify-self: center; }
.row .who { display: flex; gap: 8px; font-weight: 700; min-width: 0; }
.row .who span:first-child { min-width: 19px; flex: none; }
.row .who span:last-child { overflow-wrap: anywhere; }
.row .val { justify-self: end; white-space: nowrap; }
.row.you .who, .row.you .val { text-decoration: underline; text-underline-offset: 3px; }
.quotes { display: flex; flex-direction: column; gap: 21px; line-height: normal; }
.quote .small { margin-bottom: 2px; }
.quote q { font-size: 14px; font-weight: 700; }

/* QR + footer */
.qr { display: flex; gap: 16px; align-items: center; }
.qr svg { width: 144px; height: 144px; flex: none; display: block; }
.qr-meta { display: flex; flex-direction: column; gap: 16px; line-height: normal; }
.qr-meta .cap { font-weight: 600; font-size: 14px; display: block; margin-bottom: 4px; }
.qr-meta a { color: inherit; text-decoration: none; font-size: 12px; overflow-wrap: anywhere; }
.notch { height: 24px; }
.notch div { border-top: 1px dashed var(--r-rule); }
.footer { border-top: 1px solid var(--r-rule); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; text-align: center; font-family: var(--mono); font-weight: 600; font-size: 14px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.note { font-size: 12px; line-height: 1.4; }

@media print { .receipt { padding: 24px 32px; } .bar, .meter i, .footer { break-inside: avoid; } }

/* Web report deep-dive additions */
.prepared .meta { font-size: 12px; height: auto; margin-top: 8px; }
.explain { font-size: 14px; margin-top: 10px; }
.row.meter-row { grid-template-columns: minmax(0, 1fr) auto 104px; }
.rec { display: flex; flex-direction: column; gap: 10px; }
.rec .score-metrics > div .serif { font-size: 32px; }
.block > .cap { margin-top: 8px; }
/* Sub-section labels inside a block: chip so they read as headings, not captions */
.chip { align-self: flex-start; margin-top: 8px; padding: 6px 10px; font-family: var(--mono); font-weight: 700; font-size: 12px;
        line-height: 1; letter-spacing: .02em; text-transform: uppercase; background: var(--r-chip-bg); color: var(--r-chip-fg); }
.chip.good { background: var(--r-chip-good-bg); color: var(--r-chip-good-fg); }
.delta { display: inline-block; padding: 4px 8px; font-family: var(--mono); font-weight: 700; font-size: 12px; line-height: 1;
         background: var(--r-chip-bg); color: var(--r-chip-fg); }
body.screen .row .who.plain span:first-child { color: inherit; min-width: 0; }
.delta.up { background: var(--r-chip-good-bg); color: var(--r-chip-good-fg); }
@media (max-width: 400px) { .row.meter-row { grid-template-columns: minmax(0, 1fr) minmax(56px, auto); } .row.meter-row .meter { display: none; } }
.gap { text-align: center; line-height: 1; }
.mix { display: flex; gap: 4px; height: 16px; }
.mix i, .legend i { display: block; }
.mix .pos, .legend .pos { background: var(--r-ink); }
.mix .mid, .legend .mid { background: var(--r-mid); }
.mix .neg, .legend .neg { background: repeating-linear-gradient(135deg, var(--r-ink) 0 2px, transparent 2px 5px); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; }

/* Screen theme accents: lime marks "you" and the headline score, muted cream for supporting text */
body.screen .score .figure b, body.screen .row.you { color: var(--r-accent); }
.hl { color: var(--r-accent); }
body:not(.screen) .hl { text-decoration: underline; text-underline-offset: 2px; }
body.screen .row.you .meter i.on { background: var(--r-accent); }
body.screen .row.you .who, body.screen .row.you .val { text-decoration: none; }
body.screen .slash, body.screen .small, body.screen .vol, body.screen .explain, body.screen .note, body.screen .cap, body.screen .eyebrow, body.screen .row .who span:first-child { color: var(--r-muted); }
body.screen .tag-competitor { color: var(--r-muted); }
