/*
 * RBR PDF-parity overrides for the Antora default UI.
 *
 * build_antora.py copies this to <site>/_/css/rbr-overrides.css and the RBR
 * TTFs to <site>/_/font/, then links it just before </head> on every page —
 * after Antora's site.css so these win at equal specificity. Antora scopes
 * content under `.doc` and its UI rules are highly specific, so some resets
 * need !important to beat the bundled stylesheet.
 *
 * Design tokens mirror theme.yml / common.css (single-HTML): Source Sans 3 /
 * Source Code Pro, RBR-red #BB1335 headings, #2156A5 links, F4F5F7 inline-code
 * chip, per-type admonition palette. RBR-red #BB1335 navbar for branding.
 */

@font-face{font-family:'Source Sans 3';font-weight:400;font-style:normal;font-display:swap;src:url("../font/SourceSans3-Regular.ttf") format("truetype")}
@font-face{font-family:'Source Sans 3';font-weight:700;font-style:normal;font-display:swap;src:url("../font/SourceSans3-Bold.ttf") format("truetype")}
@font-face{font-family:'Source Sans 3';font-weight:400;font-style:italic;font-display:swap;src:url("../font/SourceSans3-It.ttf") format("truetype")}
@font-face{font-family:'Source Sans 3';font-weight:700;font-style:italic;font-display:swap;src:url("../font/SourceSans3-BoldIt.ttf") format("truetype")}
@font-face{font-family:'Source Code Pro';font-weight:400;font-style:normal;font-display:swap;src:url("../font/SourceCodePro-Regular.ttf") format("truetype")}
@font-face{font-family:'Source Code Pro';font-weight:700;font-style:normal;font-display:swap;src:url("../font/SourceCodePro-Bold.ttf") format("truetype")}

/* --- Body + headings --- */
body, .doc, .doc p, .doc li, .doc td.tableblock {
  font-family: "Source Sans 3", -apple-system, "Helvetica Neue", Arial, sans-serif;
}
.doc { color: #222222; }
/* Antora's base .doc rule sets `hyphens: auto` site-wide. That is fine for body
 * copy, but table cells are often narrow enough to hyphenate mid-word — a
 * "File number" header rendering as "File num-ber". Cells wrap on word
 * boundaries only. */
.doc th.tableblock, .doc td.tableblock {
  -ms-hyphens: none;
  hyphens: none;
}
.doc h1, .doc h2, .doc h3, .doc h4, .doc h5, .doc h6,
.doc h1.page, .doc .title {
  font-family: "Source Sans 3", -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: #BB1335;
}
/* `===` / `====` section headings (h3/h4) render in body-text black; only the
 * page title and top-level `==` sections stay RBR-red. Targets the tags
 * directly rather than via .sect2/.sect3 wrappers, so [discrete] floating
 * titles — a bare <h3>/<h4> with no wrapper — are covered too. Mirrors the
 * `h3, h4` rule in common.css (which additionally needs the .sect forms, for
 * specificity reasons noted there). Supersedes an earlier opt-in
 * `[.black-heading]` role, so that role is a harmless no-op wherever it
 * survives in a consumer's sources. */
.doc h3, .doc h4 {
  color: #000000;
}
.doc a, .doc a:visited { color: #2156A5; }

/* Figure captions — smaller and italic. OPT-IN: `figure-caption` is a role an
 * author writes (`[.figure-caption]`, often `[.text-center.figure-caption]`),
 * not a class asciidoctor emits — see the fuller note in common.css. Antora's
 * default UI supplies `.doc .text-center` itself, so only the caption styling
 * belongs here. */
.doc .figure-caption { font-size: 0.85em; font-style: italic; }

/* --- Code --- */
.doc code, .doc pre, .doc kbd, .doc tt {
  font-family: "Source Code Pro", "SFMono-Regular", Menlo, Consolas, monospace;
}
/* Background is #F4F5F7, matching the inline-code chip below and theme.yml's
 * codespan, so a block and an inline span read as the same material. It was
 * #ffffff until 2026-08-11. Kept in step with common.css. */
.doc .listingblock pre, .doc .literalblock pre {
  font-size: 0.82em;
  line-height: 1.3;
  border: 1px solid #CCCCCC;
  border-radius: 2px;
  background: #F4F5F7;
  padding: 7px 10px;
}
/* The <code> inside carries Antora's own #fafafa bg + inset shadow, which left
 * a gap between the code and our border. Make it fill transparently. */
.doc .listingblock pre > code,
.doc .listingblock pre.highlight > code,
.doc .literalblock pre > code {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* --- Line numbers (`[convert] code_line_numbers`) ---
 * rouge emits a real two-cell <table class="linenotable"> inside the <pre>
 * (gutter in td.linenos, code in td.code) rather than using CSS counters —
 * which is what keeps the numbers out of a reader's selection. Antora's
 * site.css styles `.doc table` fairly assertively (borders, background,
 * cell padding, and a `display: block` + overflow wrapper on some builds),
 * so these need `!important` where common.css does not: there the only
 * competition is asciidoctor's own stylesheet, which loses on specificity. */
.doc .listingblock table.linenotable {
  width: 100% !important;
  margin: 0 !important;
  border: none !important;
  border-collapse: collapse !important;
  background: none !important;
  display: table !important;
}
.doc .listingblock table.linenotable tbody,
.doc .listingblock table.linenotable tr {
  border: none !important;
  background: none !important;
}
.doc .listingblock table.linenotable td {
  border: none !important;
  background: none !important;
  padding: 0 !important;
  vertical-align: top !important;
}
.doc .listingblock table.linenotable td.linenos {
  width: 1% !important;
  white-space: nowrap;
  padding-right: 10px !important;
  border-right: 1px solid #DFE1E6 !important;
  -webkit-user-select: none;
  user-select: none;
}
.doc .listingblock table.linenotable td.code {
  padding-left: 10px !important;
  width: 99% !important;
}
/* Inner <pre>s add no box of their own — the outer one supplies border,
 * background and padding. */
.doc .listingblock table.linenotable pre {
  border: none !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  font-size: inherit;
  line-height: inherit;
}
.doc .listingblock table.linenotable pre.lineno {
  color: #8993A4;
  text-align: right;
}
/* inline-code chip (theme.yml codespan F4F5F7) */
.doc p code, .doc li code, .doc td.tableblock code, .doc :not(pre) > code {
  background: #F4F5F7;
  border-radius: 3px;
  padding: 0.1em 0.4em;
}

/* Table header cells. `theme.yml -> table.head.background_color` has been
 * 'F0F0F0' since the theme existed, but the HTML half was never written -- so a
 * header row was grey in the PDF and transparent on the site and in onepage,
 * distinguishable from data only by its weight. Same drift class as the
 * admonition palette: one set of styling, several files, no cross-check.
 *
 * `tbody th` is deliberate, not incidental. Confluence uses a full-width <th>
 * row as a sub-heading inside a long table (RBRcervata's Cervello configuration
 * key table has six), which converts to an `h` cell in a body row. Those need
 * the same treatment as the header row -- being a heading is what a <th> means,
 * wherever it sits. asciidoctor-pdf styles only the head row, so a mid-table
 * heading stays bold-without-fill there; matching it would need the extension.
 */
.doc table thead th,
.doc table tbody th {
  background: #F0F0F0;
}

/* --- Admonition callouts: match the PDF (bordered tinted box + centred icon).
 * Antora's default is an absolutely-positioned colour "badge" with a text
 * label; we fully reset that system here. --- */
.doc .admonitionblock {
  border: 1px solid #2156A5;
  border-radius: 3px;
  background: #FCFCFC;
  margin: 1.4rem 0 0;
}
.doc .admonitionblock > table { table-layout: auto; width: 100%; margin: 0; border: none; background: none; position: static; }
.doc .admonitionblock > table td.icon {
  position: static !important;      /* Antora positions this absolutely */
  transform: none !important;
  width: 1%;                        /* shrink icon column to its content */
  padding: 8px 12px;
  vertical-align: middle;
  white-space: nowrap;
  background: none;
  border: none;
}
.doc .admonitionblock > table td.content {
  padding: 8px 12px;
  vertical-align: middle;
  background: none !important;      /* Antora tints this #fafafa */
  border: none;
  color: #222222;
  font-size: inherit;
  width: auto;
}
.doc .admonitionblock > table td.content .paragraph,
.doc .admonitionblock > table td.content p { margin: 0; }
.doc .admonitionblock > table td.content .paragraph + .paragraph { margin-top: 0.5em; }

/* Per-type box colour. Kept in step with common.css, theme.yml and
 * extensions/rbr-pdf-extensions.rb — see the long note above the same block in
 * common.css for why all four files move together, and for the 2026-08-11
 * red/amber swap that brought this half into line with the PDF. */
.doc .admonitionblock.note { border-color: #2156A5; background: #FCFCFC; }
.doc .admonitionblock.tip { border-color: #2E844A; background: #F4FBF6; }
.doc .admonitionblock.warning, .doc .admonitionblock.caution { border-color: #D04437; background: #FFF8F7; }
.doc .admonitionblock.important { border-color: #C77700; background: #FFFDF6; }

/* Reset Antora's icon "badge" (colour fill, rounded box, flex, text label) and
 * replace with our centred inline-SVG. */
.doc .admonitionblock td.icon i,
.doc .admonitionblock td.icon i.icon-note,
.doc .admonitionblock td.icon i.icon-tip,
.doc .admonitionblock td.icon i.icon-warning,
.doc .admonitionblock td.icon i.icon-caution,
.doc .admonitionblock td.icon i.icon-important {
  display: inline-block !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px;
  font-size: 0 !important;
  vertical-align: middle;
  background-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.doc .admonitionblock td.icon i::before,
.doc .admonitionblock td.icon i::after { content: none !important; }

/* Glyph tracks the COLOUR, not the admonition name: blue ⓘ, green ✓, red ✕,
 * amber hazard triangle. See the matching block in common.css. */
.doc .admonitionblock.note td.icon i {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyNCAyNCcgZmlsbD0nIzIxNTZBNSc+PGNpcmNsZSBjeD0nMTInIGN5PScxMicgcj0nMTAnLz48Y2lyY2xlIGN4PScxMicgY3k9JzcuMycgcj0nMS40JyBmaWxsPScjZmZmJy8+PHJlY3QgeD0nMTEnIHk9JzEwLjMnIHdpZHRoPScyJyBoZWlnaHQ9JzcnIHJ4PScwLjYnIGZpbGw9JyNmZmYnLz48L3N2Zz4=") !important;
}
.doc .admonitionblock.tip td.icon i {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyNCAyNCcgZmlsbD0nIzJFODQ0QSc+PGNpcmNsZSBjeD0nMTInIGN5PScxMicgcj0nMTAnLz48cGF0aCBkPSdNNyAxMi41IEwxMC41IDE2IEwxNyA4LjUnIHN0cm9rZT0nI2ZmZicgc3Ryb2tlLXdpZHRoPScyLjInIHN0cm9rZS1saW5lY2FwPSdyb3VuZCcgc3Ryb2tlLWxpbmVqb2luPSdyb3VuZCcgZmlsbD0nbm9uZScvPjwvc3ZnPg==") !important;
}
.doc .admonitionblock.warning td.icon i,
.doc .admonitionblock.caution td.icon i {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyNCAyNCcgZmlsbD0nI0QwNDQzNyc+PGNpcmNsZSBjeD0nMTInIGN5PScxMicgcj0nMTAnLz48cmVjdCB4PScxMScgeT0nNScgd2lkdGg9JzInIGhlaWdodD0nMTQnIHJ4PScwLjYnIGZpbGw9JyNmZmYnIHRyYW5zZm9ybT0ncm90YXRlKDQ1IDEyIDEyKScvPjxyZWN0IHg9JzExJyB5PSc1JyB3aWR0aD0nMicgaGVpZ2h0PScxNCcgcng9JzAuNicgZmlsbD0nI2ZmZicgdHJhbnNmb3JtPSdyb3RhdGUoLTQ1IDEyIDEyKScvPjwvc3ZnPg==") !important;
}
.doc .admonitionblock.important td.icon i {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyNCAyNCcgZmlsbD0nI0M3NzcwMCc+PHBhdGggZD0nTTEyIDIuNSAyMi41IDIxSDEuNVonLz48cmVjdCB4PScxMScgeT0nOScgd2lkdGg9JzInIGhlaWdodD0nNicgcng9JzAuNicgZmlsbD0nI2ZmZicvPjxjaXJjbGUgY3g9JzEyJyBjeT0nMTgnIHI9JzEuMicgZmlsbD0nI2ZmZicvPjwvc3ZnPg==") !important;
}

/* --- Navbar (header) + nav: RBR branding --- */
.navbar { background: #BB1335 !important; }
.navbar, .navbar a, .navbar .navbar-item, .navbar-brand .navbar-item { color: #ffffff; }
/* left nav: RBR-red accent on the current page */
.nav-menu .is-current-page > .nav-link,
.nav-menu a.nav-link:hover { color: #BB1335; }

/* --- Block images: symmetric margins, centred in their column ---
 *
 * Antora and asciidoctor both give .imageblock a top margin and no bottom
 * margin, so a run of step-by-step photographs sits unevenly against the text
 * around it. Setting both makes the space above and below each image equal.
 *
 * Centring matches theme.yml, which has always centred block images in the PDF
 * ("image: align: center"). Before this rule the two outputs disagreed: the PDF
 * centred and the web did not.
 *
 * BLOCK images only. An inline image (image: with one colon) shares its
 * paragraph with text and has no box of its own to centre or space -- which is
 * why convert.py renders an images-only Confluence paragraph as block images.
 */
.doc .imageblock {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  text-align: center;
}
.doc .imageblock > .content { margin: 0; }

/*
 * tools/two-column-lists.py and tools/two-column-figures.py set short bullet lists,
 * step-with-photo procedures and captioned figure runs of 6+ items as a
 * borderless two-cell table (role two-column-list). site.css gives every
 * .doc table borders, a background and cell padding; strip all of it here so
 * the result reads as two columns of bullets, as it does in the PDF.
 */
.doc table.two-column-list, .doc table.step-figure, .doc table.figure-grid,
.doc table.two-column-list tr, .doc table.step-figure tr, .doc table.figure-grid tr,
.doc table.two-column-list td.tableblock, .doc table.step-figure td.tableblock, .doc table.figure-grid td.tableblock {
  border: 0;
  background: none;
  box-shadow: none;
}
.doc table.two-column-list td.tableblock, .doc table.step-figure td.tableblock, .doc table.figure-grid td.tableblock {
  padding: 0 1.5rem 0.75rem 0;
  vertical-align: top;
}
.doc table.two-column-list .ulist, .doc table.step-figure .olist, .doc table.step-figure .imageblock, .doc table.figure-grid .imageblock {
  margin: 0;
}
.doc table.step-figure img, .doc table.figure-grid img {
  max-width: 100%;
}
