/* Report page styles, loaded after the site's CSS in static/site/.
   Served as a file: the page runs under CSP style-src 'self', so no
   style lives in the HTML. Only what the site has no rule for lives
   here; fonts are declared in fonts.css. Sharp corners, 1px --line,
   no fills, no shadows: the look of the site's c-report-card. */

:root { --poor: #B42318;
  /* Severity colours, copied from the site's writing pages
     (c.markets.css, c.brief.css): border, fill and text per tier.
     Kritiska shares Augsta's. The info text is the darker --muted,
     since the site's #8A9099 fails 4.5:1 on white. */
  --sev-high-line: #E7B8C0; --sev-high-bg: #FBECEE;
  --sev-high-ink: #7A1A29;
  --sev-medium-line: #E8D6B8; --sev-medium-bg: #FBF4E8;
  --sev-medium-ink: #7A4A06;
  --sev-low-line: #CFDAE9; --sev-low-bg: #F1F5FA;
  --sev-low-ink: #2B5C9B;
  --sev-info-line: var(--line); --sev-info-bg: var(--paper);
  --sev-info-ink: #626974; }

/* The site's pages set this in an inline <style>, which the CSP
   forbids here. */
html, body { margin: 0; padding: 0; background: #FCFCFD; }

.r-body { padding: 28px var(--pad-x); }
.r-body * { box-sizing: border-box; }
.r-body code { font-family: "IBM Plex Mono", monospace; font-size: 12px;
  color: var(--muted); overflow-wrap: anywhere; }

/* Mono caps: tags, small labels, counts. */
.r-tag, .r-k, .r-pick, .r-foot {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.r-k { color: var(--muted); display: block; font-size: 11px; }
.r-tag { display: inline-block; border: 1px solid var(--muted);
  color: var(--muted); padding: 2px 8px; white-space: nowrap;
  line-height: 1.4; background: none; }
.r-sev.sev-critical, .r-sev.sev-high {
  border-color: var(--sev-high-line);
  background: var(--sev-high-bg);
  color: var(--sev-high-ink); }
.r-sev.sev-medium {
  border-color: var(--sev-medium-line);
  background: var(--sev-medium-bg);
  color: var(--sev-medium-ink); }
.r-sev.sev-low {
  border-color: var(--sev-low-line);
  background: var(--sev-low-bg);
  color: var(--sev-low-ink); }
.r-sev.sev-info {
  border-color: var(--sev-info-line);
  background: var(--sev-info-bg);
  color: var(--sev-info-ink); }

/* The site's section head leaves its text block as wide as the text
   (WeasyPrint wrapped it word by word), so let it fill the row. */
.c-sec-head > div { flex: 1 1 auto; min-width: 0; }

/* Page head: platform and date tags, PDF link */
.r-head-tags { display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 22px; }
/* The PDF download is the site's red button, sized like the tick-all
   buttons rather than stretched across the head. */
.r-pdf { padding-top: 14px; font-size: 15px; }
.r-pdf .o-btn { display: inline-flex; width: auto; height: 44px;
  padding: 0 48px 0 24px; }

/* Score panel: a ruled grid like the site's c-report-scores */
.r-scores { display: flex; flex-wrap: wrap;
  border: 1px solid var(--line); background: var(--paper); }
.r-score { display: flex; align-items: flex-start; gap: 20px;
  padding: 20px; flex: 1 1 320px; min-width: 0; }
.r-score + .r-score { border-left: 1px solid var(--line); }
.r-ring { flex: none; }
.r-score-body { min-width: 0; flex: 1 1 auto; }
.r-score-body > * + * { padding-top: 8px; }
.r-val { font-size: 24px; }
.r-val .r-tag { margin-left: 10px; vertical-align: 3px; }
.r-after, .r-hidden { color: var(--muted); font-size: 14px; }
/* Plain inline flow: WeasyPrint overlapped wrapped flex tags here. */
.r-counts .r-tag { margin: 0 6px 6px 0; }
.r-counts .r-k { display: inline-block; margin-right: 8px; }
.r-lead { border: 1px solid var(--line); border-left: 3px solid var(--blue);
  background: var(--paper); padding: 14px 18px; margin-top: 20px;
  font-size: 15px; line-height: 1.55; }

/* Section groups and finding cards */
.r-group + .r-group { margin-top: 20px; }
.c-root .r-sub { font-family: "IBM Plex Mono", monospace; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  font-weight: 500; padding-bottom: 10px;
  border-bottom: 1px solid var(--ink); }
.r-none { color: var(--muted); font-size: 14px; padding-top: 12px; }
.r-item { display: grid; grid-template-columns: 1fr; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.r-item:last-child { border-bottom: 0; }
.r-main { min-width: 0; }
/* Severity tag, metric tag and title share one line; on a phone the
   title wraps below the tags. */
.r-head { display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 12px; }
.r-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.r-title { flex: 1 1 220px; min-width: 0; margin: 0;
  font-family: "Space Grotesk", sans-serif; font-size: 17px;
  font-weight: 600; line-height: 1.3; color: var(--ink); }
.r-meaning, .r-evidence { padding-top: 6px; font-size: 15px;
  line-height: 1.5; color: var(--ink-2); max-width: 78ch; }
/* The evidence is one line, cut with an ellipsis; the full text is in
   the code element's title. print.css lets it wrap on paper. */
.r-evidence { white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.r-evidence code { overflow-wrap: normal; }
.r-private { font-style: italic; color: var(--muted); }
.r-dim .r-title, .r-dim .r-meaning { color: var(--muted); }
/* A finding's documented real case: smaller, under the meaning. */
.r-case { padding-top: 6px; font-size: 13px; line-height: 1.45;
  color: var(--muted); max-width: 78ch; }
.r-case-k { font-weight: 600; color: var(--ink-2); }

/* Side of a card: a fixed, right-aligned column, so the service
   label, its name, the price and the checkbox line up down the page.
   The price stays in the PDF. */
.r-side { display: flex; flex-direction: column; gap: 8px;
  width: 220px; align-items: flex-end; text-align: right; }
.r-price { display: flex; flex-direction: column; gap: 2px;
  align-items: flex-end; font-size: 13px; line-height: 1.4;
  color: var(--ink-2); }
.r-price-eur { font-family: "Space Grotesk", sans-serif; font-size: 20px;
  font-weight: 600; color: var(--ink); }
.r-pick { display: flex; align-items: center; gap: 8px; cursor: pointer;
  color: var(--blue); border: 1px solid var(--blue); padding: 6px 10px; }

/* Passes, method note, footer */
.r-pass { margin: 12px 0 0 20px; padding: 0; font-size: 15px;
  line-height: 1.55; }
.r-pass li { margin: 3px 0; break-inside: avoid; }
.r-about { font-size: 14px; color: var(--ink-2); max-width: 78ch; }
.r-foot { margin-top: 20px; color: var(--muted); display: flex;
  justify-content: space-between; gap: 8px; flex-wrap: wrap;
  font-size: 11px; }

/* Error text and the back button on the app pages */
.c-page-intro.oa-error { color: var(--blue-d); }
.oa-back { width: auto; }
.oa-error { border-left-color: var(--poor); }
.oa-form { display: grid; gap: 10px; max-width: 520px;
  margin-top: 16px; }
.oa-input { font: inherit; font-size: 15px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 0;
  background: #fff; color: var(--ink); }
.oa-send { width: auto; justify-self: start; }
.oa-link { color: var(--blue); }

/* Order block: the live total and the thanks page's price */
.r-total { max-width: 520px; margin-top: 16px; padding: 14px 18px;
  border-left: 3px solid var(--blue); background: var(--paper);
  font-size: 15px; line-height: 1.55; }
.r-total-body p + p { margin-top: 4px; }
.r-total-body .r-total-sum { font-family: "Space Grotesk", sans-serif;
  font-size: 20px; font-weight: 600; color: var(--ink); }
/* The two tick-all buttons above .r-terms: a row that wraps on phones.
   The buttons are the site's o-btn-2 made compact like .r-bar-btn; the
   note wears the muted mono small style of .r-bar-min. */
.r-pick-all { display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px; margin-bottom: 18px; }
.r-pick-all .o-btn-2 { width: auto; height: 44px;
  padding: 0 48px 0 24px; flex: none; }
.r-pick-note { flex: 1 1 220px; margin: 0; font-size: 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--muted); }
/* Full width of the section: the owner wants the justified terms to
   run edge to edge like the body text of the site. */
.r-terms { border: 1px solid var(--line); background: var(--paper);
  padding: 12px 16px; margin-bottom: 18px; font-size: 14px;
  line-height: 1.55; color: var(--ink-2); }
.r-quote { margin: 12px 0 0 20px; padding: 0; font-size: 15px;
  line-height: 1.55; }
.r-quote-title { font-size: 18px; }
.r-quote-total { margin-top: 12px; font-family: "Space Grotesk",
  sans-serif; font-size: 20px; font-weight: 600; }

.r-order-lead { max-width: 640px; font-size: 15px; line-height: 1.55; }
textarea.oa-input { resize: vertical; min-height: 96px; }
/* The honeypot field: never shown, so people leave it empty. */
.oa-trap { display: none; }

/* Sticky order bar: fixed at the bottom like the pension calculator's.
   o-header.css gives .o-bar its z-index and hides it while the drawer
   is open. order.js un-hides it from the first tick and adds
   body.r-bar-on, which pads the page so the footer stays clear. */
.r-bar { position: fixed; bottom: 0; left: 0; width: 100%;
  background: #fff; border-top: 1px solid var(--line); }
.r-bar[hidden] { display: none; }
body.r-bar-on { padding-bottom: 76px; }
.r-bar-in { display: flex; align-items: center; gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 10px var(--pad-x); }
.r-bar-info { flex: 1 1 auto; min-width: 0; font-size: 14px;
  color: var(--ink-2); }
.r-bar-min { display: block; font-size: 12px; color: var(--muted); }
.r-bar-total { font-family: "Space Grotesk", sans-serif; font-size: 20px;
  font-weight: 600; color: var(--ink); white-space: nowrap; }
/* .o-btn is full width by design; the bar keeps a compact button. */
.r-bar-btn { width: auto; height: 44px; padding: 0 48px 0 24px;
  flex: none; }

@media (min-width: 641px) {
  .r-item { grid-template-columns: 1fr 220px; gap: 24px; }
}
@media (min-width: 900px) {
  .r-pass { column-count: 2; column-gap: 32px; }
}
@media (max-width: 640px) {
  .r-bar-btn { letter-spacing: .04em; padding: 0 44px 0 16px; }
  .r-bar-info { display: none; }
  .r-bar-in { justify-content: space-between; }
  .r-side { width: auto; align-items: flex-start; text-align: left; }
  .r-price { align-items: flex-start; }
}
@media (max-width: 560px) {
  .r-score { flex-direction: column; }
  .r-score + .r-score { border-left: 0; border-top: 1px solid var(--line); }
}

/* The owner's rule for every page: running text is justified. Headings,
   tags, labels and lists stay left-aligned. print.css inherits this,
   since report.css loads for every medium. */
.r-lead, .r-meaning, .r-evidence, .r-about, .r-terms p, .r-order-lead {
  text-align: justify; hyphens: auto; }
