/* ==========================================================
   AI actions
   Hides K15t's AI actions menu on every article, the user's choice.
   Confirmed still wanted on 2026-11-30 (AUDIT S3).
   ========================================================== */

/* Bare element selector, meant for the whole site. The method K15t documents in
   https://help.k15t.com/scroll-sites/how-is-my-site-made-ai-ready.md */
ai-actions {
    display: none !important;
}

/* ==========================================================
   Foundation
   Retarus colors as custom properties, heading weight and color.
   Captured 2026-11-30, written before that date.
   ========================================================== */

:root {
    /* Brand Colors */
    --retarus-red: #e00;
    --retarus-blue: #08237d;
    --retarus-dark-grey: #7a869a;
    --retarus-light-grey: #f7f7f9;
    --retarus-border-grey: #d8dce1;
    --retarus-breadcrumb-grey: #6E6E73;  /* was #AFAFB4 (2.18:1), darkened for AUDIT A1, 5.07:1 on white */
    /* Neutrals, moved here from literals on 2026-11-30 (AUDIT T1). Values unchanged. */
    --retarus-dark-blue: #000c34;   /* headings, tile titles, news and page links */
    --retarus-black: #000;          /* text, header, footer and divider lines */
    --retarus-white: #fff;          /* backgrounds of panels, code, buttons */
    --retarus-table-line-grey: #ddd; /* table lines between rows and columns */
    --retarus-table-hover-grey: #f1f1f1; /* table row hover */
}

/* Normalize heading font weight and color across browsers */
/* Default: color: var(--theme-headline-color) → var(--K15t-foreground), not #000c34 */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600 !important;
    color: var(--retarus-dark-blue) !important;
}

/* ==========================================================
   Header and footer
   Header and footer links, pipe separators, black border lines.
   Captured 2026-11-30, written before that date.
   ========================================================== */

/* Header content - Position closer to bottom border */
.header-content {
    margin-top: auto !important;
    padding-bottom: 0.5rem !important;
}

/* Article page: header links sit too high above the separator due to the flex centering
   inside .header-content. Negative margin-bottom on .header-links only shifts the links
   down without affecting the search bar (a sibling flex item). */
body:has(.article-page) .header-links {
    margin-bottom: -1.25rem !important;
}

/* Header links - Font styling */
.header-links {
    font-size: 0.95rem;
    font-weight: 400;
}

/* Header links - Flex layout and pipe separators */
.header-links ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.header-links ul li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header-links ul li a {
    margin: 0;
    padding: 0;
}

.header-links ul li:not(:first-child)::before {
    content: "|";
    margin: 0 0.5rem;
}

/* Header border - Black bottom border */
.header,
[data-component="header"] {
    border-block-end: 1px solid var(--retarus-black) !important;
}

/* Footer top border */
footer.footer {
    border-top: 1px solid var(--retarus-black);
    padding-top: 10px !important;
}

/* Footer links - Flex layout and pipe separators */
.footer-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.footer-links li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.footer-links li a {
    margin: 0;
    padding: 0;
}

.footer-links li:not(:first-child)::before {
    content: "|";
    margin: 0 0.5rem;
}

/* ==========================================================
   Navigation
   Breadcrumbs, left navigation tree, right sidebar TOC.
   Captured 2026-11-30, written before that date.
   ========================================================== */

/* Breadcrumbs - Arrow separator */
.breadcrumbs li span[aria-hidden="true"] {
    display: none;
}

/* Breadcrumbs - Display all items on one line, set font size to 14px (+1px over default 13px) */
/* The ol defaults to block layout, causing each li to stack vertically.
   display: flex makes items flow horizontally.
   Default font is var(--K15t-font-body-small) ≈ 0.8125rem (13px). */
.breadcrumbs ol {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

/* Make li a flex row so ::after (the ›) aligns vertically with the link text.
   vertical-align has no effect on block-level list items; flex centering is reliable. */
.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li::after {
    content: "›";
    font-size: 1.2em;
    margin: 0 0.5em;
    color: var(--retarus-breadcrumb-grey);
}

.breadcrumbs li:hover {
    color: var(--retarus-breadcrumb-grey);
}

.breadcrumbs li:last-child::after {
    content: none;
}


/* Right Sidebar TOC - Remove border, default black, active item in Retarus red */
/* Uses the officially supported [data-component="toc"] CSS custom property interface */
[data-component="toc"] {
    --border-color: transparent;
    --foreground-color: var(--retarus-black);
    --foreground-color-selected: var(--retarus-red);
}

/* Left nav tree items - Font size (article page sidebar) */
.navigator .tree-item-header {
    font-size: 15px;
}

/* TOC active item - Red left indicator bar */
/* Default uses background-color: currentColor — overriding to always be Retarus red */
.toc.sticky .toc-list .toc-link[aria-current="true"]::before {
    background-color: var(--retarus-red);
}

/* Navigator toggle button - Black border */
.navigator-toggle,
.navigator-toggle:hover {
    border-color: var(--retarus-black);
}

/* Navigator toggle - Both icons in red (hamburger when closed, chevron when open) */
.navigator-toggle .navigator-icon-opened,
.navigator-toggle .navigator-icon-closed {
    color: var(--retarus-red);
}

/* Navigator - Black divider between left nav and main content area */
/* Default: border-inline-end: 1px solid var(--K15t-border-neutral) (grey) */
.navigator {
    border-inline-end-color: var(--retarus-black);
}

/* ==========================================================
   Links and rules
   Site-wide link style and horizontal rules.
   Captured 2026-11-30, written before that date.
   ========================================================== */

/* Global link styling, meant for the whole site. Also covers a.external-link, which
   had an identical rule of its own until 2026-11-30 (AUDIT D1). */
a {
    color: var(--retarus-blue);
    text-decoration: underline;
}

a:hover {
    color: var(--retarus-red);
}

/* Horizontal rule styling */
hr {
    border-color: var(--retarus-dark-grey);
    margin-top: 25px;
    margin-bottom: 10px;
}

/* ==========================================================
   Link exceptions
   Overrides of the site-wide link style for navigation, header,
   footer, tiles and the article overview page.
   Captured 2026-11-30, written before that date.
   ========================================================== */

/* Left sidebar navigation links - no underline, black text */
.tree-item-header a {
    text-decoration: none;
    color: var(--retarus-black);
}

.tree-item-header a:hover {
    text-decoration: none;
    color: var(--retarus-red);
}

/* Breadcrumbs - grey color, no underline by default, underline on hover */
.breadcrumbs li a {
    text-decoration: none;
    color: var(--retarus-breadcrumb-grey);
}

.breadcrumbs li a:hover {
    text-decoration: underline;
    color: var(--retarus-breadcrumb-grey);
}

/* Table of Contents links - black color, no underline by default, underline + red on hover */
/* Note: color: #000 is set here directly — the --foreground-color token falls back to inherit,
   which picks up the global a { color: var(--retarus-blue) } rule and turns links blue. */
.toc-list .toc-link {
    text-decoration: none;
    color: var(--retarus-black);
}

.toc-list .toc-link:hover {
    text-decoration: underline;
    color: var(--retarus-red);
}

/* Header links - no underline, black color */
.header-links ul li a {
    text-decoration: none;
    color: var(--retarus-black);
}

.header-links ul li a:hover {
    text-decoration: none;
    color: var(--retarus-red);
}

/* Footer links - no underline, black color */
.footer-links li a {
    text-decoration: none;
    color: var(--retarus-black);
}

.footer-links li a:hover {
    text-decoration: underline;
    color: var(--retarus-black);
}

/* Footer content links - default blue, no underline */
.footer-content li a {
    color: var(--retarus-blue);
    text-decoration: none;
}

.footer-content li a:hover {
    color: var(--retarus-black);
    text-decoration: underline;
}

/* HOME PAGE - tile-title links should NOT be underlined */
main.home-page .tile-title a {
    text-decoration: none;
    color: var(--retarus-dark-blue);
}

main.home-page .tile-title a:hover {
    color: var(--retarus-red);
}

/* ARTICLE OVERVIEW PAGE - tile-title links SHOULD be underlined */
main.article-overview-page .tile-title a {
    text-decoration: underline;
    color: var(--retarus-dark-blue);
}

main.article-overview-page .tile-title a:hover {
    color: var(--retarus-red);
}

/* ARTICLE OVERVIEW PAGE - h3 links in items list SHOULD be underlined */
main.article-overview-page .items.list>li>h3>a {
    text-decoration: underline;
    color: var(--retarus-dark-blue);
}

main.article-overview-page .items.list>li>h3>a:hover {
    color: var(--retarus-red);
}

/* ARTICLE OVERVIEW PAGE - nested li links should NOT be underlined */
main.article-overview-page .items.list>li>ul>li>a {
    text-decoration: none;
    color: var(--retarus-dark-blue);
}

main.article-overview-page .items.list>li>ul>li>a:hover {
    color: var(--retarus-red);
}

/* ==========================================================
   Content components
   Panels, blockquotes, images, expands.
   Captured 2026-11-30, written before that date.
   ========================================================== */

/* Panel Macros - Tip and info styling, identical */
.panel-macro--tip,
.panel-macro--info {
    background-color: var(--retarus-light-grey);
    border-left: 3px solid var(--retarus-red);
}

/* Panel Macros - Hide icons */
.panel-macro__icon {
    display: none;
}

/* Blockquote/Note styling — ScrollSites article content is in .article-body */
.article-body blockquote {
    border-left: 3px solid var(--retarus-red);
    margin-top: 1rem;
    margin-bottom: 1rem;
    margin-left: 20px;
}

/* Blockquote - List margins */
.article-body blockquote ol,
.article-body blockquote ul {
    margin-top: 0;
    margin-bottom: 0;
}

/* Embedded images - Top margin */
figure.confluence-embedded-image.confluence-content-image-border {
    margin-top: 12px;
}

/* Inline images - Cap height at 24px */
/* Default: max-block-size: max(32px, 1lh) — the 32px floor makes images appear at 32px+.
   Overriding both max and min to enforce 24px; leaving min at 1lh would let it override
   max-block-size whenever the computed line-height exceeds 24px. */
.inline-image img {
    max-block-size: 24px;
    min-block-size: 0;
}

/* Expand container spacing */
.expand-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Expand - Keep summary grey when open (matches hover state) */
/* Default: .expand[open] .expand-control only resets border-radius, leaving background transparent (white).
   Re-applying the hover token keeps the grey background persistent after click. */
.expand[open] .expand-control {
    background-color: var(--K15t-surface-raised-hovered);
}

/* Panel component - White background, square corners, no icon, red left border */
/* Default: neutral background, rounded corners (--K15t-radius-small), all-around border, ::before icon */
/* padding-left: 0 — removes the default left padding so content sits flush against the red border.
   margin-left: 0 — resets any inherited outer left margin. */
[data-component="panel"] {
    background-color: var(--retarus-white);
    border: none;
    border-left: 3px solid var(--retarus-red);
    border-radius: 0;
    margin-left: 0;
    padding-left: 0;
}

/* Hide the default appearance-specific icon (rendered as ::before mask image) */
[data-component="panel"]::before {
    display: none;
}

/* ==========================================================
   Interactive elements
   Toggles, code blocks, dropdown options.
   Captured 2026-11-30, written before that date.
   ========================================================== */

/* Toggle/Expand buttons - General styling, includes button#toggle-open */
.toggle {
    color: var(--retarus-red);
    border-color: var(--retarus-red);
    background-color: var(--retarus-white);
}

/* Code blocks - Language label */
.code-macro__language {
    background-color: var(--retarus-border-grey);
}

/* Code blocks - Border around pre */
.code-macro pre {
    border: 1px solid var(--retarus-border-grey);
}

/* Code blocks - Pre and code background */
.code-macro code,
.code-macro pre {
    background-color: var(--retarus-white);
}

/* Code blocks - Copy button */
.code-macro .toolbar button.copy-to-clipboard-button {
    color: var(--retarus-red);
}

/* Code blocks - Syntax highlighting tokens */
.code-macro .token.class-name,
.code-macro .token.deleted,
.code-macro .token.function,
.code-macro .token.property,
.code-macro .token.selector,
.code-macro .token.tag {
    color: var(--retarus-red);
}

/* Dropdown options - Indicator (red left border) for every option, so the selected
   and hover states are red as well */
.dropdown__option::before {
    background-color: var(--retarus-red) !important;
}

/* ==========================================================
   Buttons and search bar
   Product page CTA button, search bar corners, focus and hover.
   Captured 2026-11-30, written before that date.
   ========================================================== */

/* Product page CTA button - Default: white bg, black border, red text */
.button.button--primary {
    background-color: var(--retarus-white);
    border: 2px solid var(--retarus-black);
    color: var(--retarus-red);
    text-decoration: none;
    border-radius: 1.5rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* Product page CTA button - Hover: red bg, red border, white text */
.button.button--primary:hover {
    background-color: var(--retarus-red);
    border-color: var(--retarus-red);
    color: var(--retarus-white);
}

/* Search bar - Angular corners for all components */
[data-component="search-bar"] .search-input__input,
[data-component="search-bar"] .search-bar__input-container {
    border-radius: 0 !important;
}

/* Search input - Black border on focus, not blue */
.search-input__input:focus,
.search-input input:focus,
.search-bar input:focus,
input.search-input__input:focus,
[data-component="search-bar"] input:focus,
[data-component="search-input"] input:focus {
    border-color: var(--retarus-black) !important;
    border-width: 1px !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Search bar container - Focus is shown by the border turning black, 1px, instead of
   the theme's outline (Default: outline-style: auto, outline-color: Highlight). A 2px
   ring was tried for AUDIT A3 and judged too bold (2026-11-30). The black border is
   21:1 on white, and the search filter panel opens under the field on focus.
   important beats the theme's focus outline and border color. */
.search-bar__input-container:has(input:focus-visible),
[data-component="search-bar"] .search-bar__input-container:has(input:focus-visible) {
    outline: none !important;
    border-color: var(--retarus-black) !important;
    border-width: 1px !important;
}

/* Search bar container - Keep white background on hover and focus */
.search-bar__input-container:has(input:hover),
.search-bar__input-container:has(input:focus),
.search-bar__input-container:has(input:focus-visible),
[data-component="search-bar"] .search-bar__input-container:has(input:hover),
[data-component="search-bar"] .search-bar__input-container:has(input:focus),
[data-component="search-bar"] .search-bar__input-container:has(input:focus-visible) {
    background-color: var(--retarus-white) !important;
}

/* Search input - Keep white background on hover and focus */
.search-input__input,
.search-input__input:hover,
.search-input__input:focus,
.search-input__input:focus-visible {
    background-color: var(--retarus-white) !important;
}

/* ==========================================================
   Tables
   Article tables: the theme's gray header, thin lines between rows
   and columns, no outer border, row hover.
   Rewritten 2026-11-30 for the Scroll Sites table markup.
   ========================================================== */

/* Scroll Sites renders a Confluence table as plain table, th and td inside
   .article-body [data-component="table"], without the confluenceTable classes of
   the Confluence export. The old rules on those classes matched none of the 584
   tables on the site (2026-11-30). K15t has no table component interface, so these
   are raw selectors. No !important: the theme's table rules sit in cascade layers,
   and this unlayered file beats them at any specificity. The table width, the
   header background and the cell highlights Confluence authors set stay the
   theme's. */

/* Cells - Thin light lines between rows and between columns, so columns with
   long text stay apart
   Default: border: 1px solid var(--K15t-border-neutral-strong) on all sides */
.article-body table :is(th, td) {
    border: 1px solid var(--retarus-table-line-grey);
}

/* Outer edge - No border around the table: the lines on the outer side of the
   first and last row and column are removed. A cell spanning rows from an
   earlier row is not the first child of a later row, so a table with merged
   cells at its edge can keep a short piece of outer line. */
.article-body table tr:first-child > :is(th, td) {
    border-block-start: none;
}

.article-body table tr:last-child > :is(th, td) {
    border-block-end: none;
}

.article-body table tr > :is(th, td):first-child {
    border-inline-start: none;
}

.article-body table tr > :is(th, td):last-child {
    border-inline-end: none;
}

/* Cell padding, the same in header and data cells. In a sortable table the
   theme moves the header padding from the cell to the sort button.
   Default: padding-inline: .5rem, padding-block: .7rem; th:has(button)
   { padding: 0 } with the padding on its button */
.article-body table td,
.article-body table th:not(:has(button)),
.article-body table th:has(button) button {
    padding: 12px 16px;
}

/* Row hover - Light gray on the data cells of the row under the pointer */
.article-body table tr:hover td {
    background-color: var(--retarus-table-hover-grey);
}

/* ==========================================================
   Banner and page layout
   Banner spacing, tile corners and ratio, page padding, site width.
   Captured 2026-11-30, written before that date.
   ========================================================== */

/* Banner - Reduce top and bottom padding by ~50%, tighter outer margins.
   One block since 2026-11-30 (AUDIT D5), was two. */
.banner {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

/* Banner hgroup - No margins. Scoped to the banner on 2026-11-30 (AUDIT D5), was a
   bare hgroup rule for the whole site. */
.banner hgroup {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Tiles - Reduce border-radius from medium (5pt) to small (3pt) */
/* Default: border-radius: var(--K15t-radius-medium) */
.tile {
    border-radius: var(--K15t-radius-small);
}

/* Portal page tiles - Set measured aspect ratio (332 × 231 px) */
main.home-page .tile {
    aspect-ratio: 332 / 231;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Article/content page - Reduce top padding (default is ~72px, too much space below header) */
div#content.content {
    padding-top: 12px !important;
}

/* Portal page - Bottom margin for content */
.portal {
    margin-bottom: 30px;
}

/* Constrain site to 90% viewport width on desktop, centered with equal side margins */
/* Only activates at ≥1280px so mobile and tablet remain full-width */
@media screen and (min-width: 1280px) {
    body {
        max-width: 90%;
        margin-inline: auto;
    }
}

/* ==========================================================
   Product pages
   News section and the pages section on product pages.
   Captured 2026-11-30, written before that date.
   ========================================================== */

/* News tile - Remove border and shadow */
.news .tile {
    border: none;
    box-shadow: none;
}

/* News tile title ("Last Updated") - 20px */
.news .tile-title {
    font-size: 20px;
}

/* News list items - 14px, no heading size */
.news .items.list li h3 {
    font-size: 14px;
}

/* News list links - Retarus dark blue, underlined */
.news .items.list li a {
    color: var(--retarus-dark-blue);
    text-decoration: underline;
}

.news .items.list li a:hover {
    color: var(--retarus-red);
}

/* News - Hide article timestamps */
.news time {
    display: none;
}

/* Product page - Pages section links - Retarus dark blue, not default blue */
section.pages a {
    color: var(--retarus-dark-blue);
}

section.pages a:hover {
    color: var(--retarus-red);
}

/* Product page - Hide empty pages sections (ul has no li children) */
/* Uses :not(:has(li)) at the section level to avoid nested :has() which has limited browser support */
section.pages:not(:has(ul.items.list li)) {
    display: none;
}
