/* The AI visibility report's own styles, shared by the hero modal and
   /audit-report.
   ==========================================================================

   Copied from the tool platform's AI visibility checker: the same score card
   with its conic ring, the same "what AI engines see" list with a tick or a
   cross and a points weight per row, and the same numbered priority fixes.
   The class names are its names too, on purpose, so it is obvious the two are
   the same component rather than two lookalikes.

   SCOPED UNDER .rrav, which the originals are not. Names like .rcard, .chk,
   .fix and .guide are generic enough to collide with this site's own styles,
   and a report that quietly restyles the page around it is worse than one
   that looks slightly different.

   Colours are mapped to this site's tokens. The three score colours are not:
   green, amber and red here mean "this score is good, middling or bad", which
   is a reading of the number rather than a brand decision, so they are the
   platform's own values and match what the PDF prints. */

.rrav {
  color: var(--ink);
  font-family: var(--font-text);
  /* Score bands. Shared with rr-aivis-pdf.js, which prints the same three. */
  --rrav-good: #14b87f;
  --rrav-warn: #f59e0b;
  --rrav-bad: #f56565;
  --rrav-line: var(--line);
  --rrav-hair: #eceaf4;
}

/* ---- the document's own top row, as the audit report has ---- */
.rrav .rrav-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 10px;
}
.rrav .rrav-t {
  margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 700;
  color: var(--ink); letter-spacing: -0.01em; line-height: 1.15;
}
.rrav .rrav-date { font-size: 12.5px; color: #8a8b99; white-space: nowrap; }
.rrav .rrav-intro {
  margin: 0 0 18px; max-width: 70ch; font-size: 14px; line-height: 1.6; color: var(--muted);
}

/* ---- the cards ---- */
.rrav .rcard {
  background: var(--white); border: 1px solid var(--rrav-line); border-radius: var(--r2);
  padding: 22px; margin-bottom: 14px;
}

/* ---- the score head ---- */
.rrav .score-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
/* The ring is a conic sweep, the same picture the PDF draws with 72 short
   lines. --v is the score, set on the element by the renderer; the tier class
   picks which of the three colours sweeps. */
.rrav .score-ring {
  --v: 0; --ring: var(--rrav-bad);
  width: 124px; height: 124px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--ring) calc(var(--v) * 1%), var(--rrav-hair) 0);
}
.rrav .score-ring.good { --ring: var(--rrav-good); }
.rrav .score-ring.warn { --ring: var(--rrav-warn); }
.rrav .score-ring.bad { --ring: var(--rrav-bad); }
.rrav .score-ring::before {
  content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--white);
}
.rrav .score-ring .n {
  position: relative; font-family: var(--font-display); font-weight: 800; font-size: 38px;
  line-height: 1; text-align: center; color: var(--ink);
}
.rrav .score-ring .n small {
  display: block; font-size: 11px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.14em; margin-top: 4px;
}

.rrav .score-meta { flex: 1; min-width: 240px; }
.rrav .score-meta .tier {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px;
  padding: 5px 12px; border-radius: 999px; letter-spacing: 0.06em; text-transform: uppercase;
}
.rrav .tier.good { color: #0b7a53; background: rgb(20 184 127 / 0.12); }
.rrav .tier.warn { color: #8a6116; background: rgb(245 158 11 / 0.14); }
.rrav .tier.bad { color: #b3312f; background: rgb(245 101 101 / 0.12); }
.rrav .score-meta h2 {
  font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 13px 0 6px;
  letter-spacing: -0.02em; color: var(--ink); line-height: 1.2;
}
.rrav .score-meta p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.55; }
.rrav .score-meta .u { font-size: 12.5px; color: #8a8b99; word-break: break-all; margin-top: 8px; }

/* ---- how to read it ---- */
.rrav .guide {
  background: var(--tint); border: 1px solid var(--rrav-hair); border-radius: var(--r1);
  padding: 12px 15px; margin-top: 16px;
  display: flex; gap: 15px; flex-wrap: wrap; align-items: center;
}
.rrav .guide .gl {
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.rrav .guide .band { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.rrav .guide .band b { color: var(--ink); }
.rrav .guide .dotc { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.rrav .guide .dotc.good { background: var(--rrav-good); }
.rrav .guide .dotc.warn { background: var(--rrav-warn); }
.rrav .guide .dotc.bad { background: var(--rrav-bad); }

/* ---- section titles ---- */
.rrav .sec-title {
  font-family: var(--font-display); font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 12px;
}

/* ---- what AI engines see ---- */
.rrav .checks { display: grid; grid-template-columns: 1fr; gap: 2px; margin-top: 6px; }
.rrav .chk {
  display: flex; align-items: flex-start; gap: 13px; padding: 13px 2px;
  border-bottom: 1px solid var(--rrav-hair);
}
.rrav .checks .chk:last-child { border-bottom: 0; }
.rrav .chk .ic {
  width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto;
  display: grid; place-items: center; margin-top: 1px;
}
.rrav .chk .ic.ok { background: rgb(20 184 127 / 0.16); color: #0b7a53; }
.rrav .chk .ic.no { background: rgb(245 101 101 / 0.14); color: #b3312f; }
.rrav .chk .ic svg { width: 13px; height: 13px; }
.rrav .chk .t { flex: 1; min-width: 0; }
.rrav .chk .t .l { display: block; font-weight: 650; font-size: 14px; color: var(--ink); }
.rrav .chk .t .d { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.rrav .chk .w { font-size: 11px; color: #8a8b99; flex: 0 0 auto; padding-top: 3px; white-space: nowrap; }

/* ---- priority fixes ---- */
.rrav .fix { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--rrav-hair); }
.rrav .fix:last-child { border-bottom: 0; }
.rrav .fix .n {
  width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--grad-orange); color: #2b1200;
  font-weight: 800; font-size: 12px; margin-top: 1px;
}
.rrav .fix .b { min-width: 0; }
.rrav .fix .b .l { display: block; font-weight: 650; font-size: 14px; color: var(--ink); }
.rrav .fix .b .d { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

/* ---- the explainer bubbles ---- */
.rrav .tip { position: relative; display: inline-flex; align-items: center; cursor: help; margin-left: 6px; vertical-align: middle; }
.rrav .tip .ti {
  width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted);
  font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1; font-style: normal;
}
.rrav .tip:hover .ti { border-color: var(--purple); color: var(--purple); }
.rrav .tip .tt {
  position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%);
  width: 250px; max-width: 74vw; background: var(--ink); border-radius: var(--r1);
  padding: 11px 13px; font-size: 12.5px; line-height: 1.55; color: var(--on-dark);
  opacity: 0; visibility: hidden; transition: 0.15s; z-index: 20; text-align: left;
  font-weight: 400; text-transform: none; letter-spacing: 0; pointer-events: none;
}
.rrav .tip .tt::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--ink);
}
.rrav .tip:hover .tt { opacity: 1; visibility: visible; }

/* ---- what we could not check, and the closing note ---- */
.rrav .rrav-miss { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.rrav .rrav-unc { margin-top: 18px; }
.rrav .rrav-unc h2 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.rrav .rrav-unc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.rrav .rrav-unc li { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.rrav .rrav-note {
  margin: 18px 0 0; background: var(--tint); border-radius: var(--r1); padding: 14px 16px;
  font-size: 13px; line-height: 1.6; color: var(--ink);
}

@media (max-width: 560px) {
  .rrav .rcard { padding: 18px 15px; }
  .rrav .score-head { gap: 16px; }
  .rrav .score-ring { width: 104px; height: 104px; }
  .rrav .score-ring .n { font-size: 32px; }
  /* The weight sits under the row rather than squeezing the label into two
     words a line. */
  .rrav .chk { flex-wrap: wrap; }
  .rrav .chk .w { padding-left: 35px; padding-top: 0; }
}

/* Printing the shared page should give back something close to the PDF. */
@media print {
  .rrav .rcard { break-inside: avoid; }
  .rrav .chk, .rrav .fix { break-inside: avoid; }
}
