/* ==========================================================
   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 */
}

/* 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: var(--K15t-font-weight-bold) !important;
    color: var(--retarus-dark-blue) !important;
}

/* ==========================================================
   Typography
   Text size and heading scale of article pages, set from two
   numbers: the text size and the ratio between heading levels.
   Added 2026-12-02. Theme values in theme/typography.md.
   ========================================================== */

/* The two numbers. Change --retarus-type-ratio to re-tune every heading at once.
   Text 15px (theme 16px). Ratio 1.2 from 1024px, 1.15 below, so headings shrink on
   small screens as the theme's do. */
:root {
    --retarus-text-size: 0.9375rem;
    --retarus-type-ratio: 1.15;
    /* The page title's own step above H2, larger than the ratio, so the title stands
       apart when an H2 follows it directly (seen on /fax/october-2026). 35px from 1024px. */
    --retarus-title-ratio: 1.2;
}

@media screen and (min-width: 1024px) {
    :root {
        --retarus-type-ratio: 1.2;
        --retarus-title-ratio: 1.35;
    }
}

/* Heading sizes on article pages, one ratio step per level. The theme already sets
   these tokens per page template (content-source, portal); this does the same for
   article. H5 and H6 are text size, set apart by weight only, never smaller.
   The configurator's headings scale still applies.
   Default: H1 page title 32px, H2 24px, H3 20px, H4 18px, H5 and H6 16px from 1024px,
   H5 and H6 13px below. */
[data-page-template="article"] {
    --_retarus-h: calc(var(--retarus-text-size) * var(--theme-headline-scale, 1));
    --K15t-font-size-headline-2x-small: var(--_retarus-h);
    --K15t-font-size-headline-x-small: calc(var(--_retarus-h) * var(--retarus-type-ratio));
    --K15t-font-size-headline-small: calc(var(--_retarus-h) * var(--retarus-type-ratio) * var(--retarus-type-ratio));
    --K15t-font-size-headline-medium: calc(var(--_retarus-h) * var(--retarus-type-ratio) * var(--retarus-type-ratio) * var(--retarus-type-ratio));
    --K15t-font-size-headline-large: calc(var(--_retarus-h) * var(--retarus-type-ratio) * var(--retarus-type-ratio) * var(--retarus-type-ratio) * var(--retarus-title-ratio));
}

/* Article text at 15px. No token reaches it: paragraphs, lists and tables inherit the
   size of html, which also sizes the navigation. Line height 1.6 (24px) instead of
   the theme's 1.7. Heading spacing stays in rlh, the root line height, unchanged. */
.article-body {
    font-size: var(--retarus-text-size);
    line-height: 1.6;
}

/* Heading spacing in lines of article text (15px x 1.6 = 24px), so it follows the text
   size. Space above steps down with the level, space below stays small, so a heading
   sits about twice as far from the section before it as from its own text.
   Default: in rlh, the root line height (16px x 1.7 = 27.2px): 1.5rlh (41px) above
   H1 to H3, 1.375rlh (37px) above H4 to H6, .5rlh (14px) below, .75rlh (20px) between
   two headings. Seen too wide on /fax/cloud-fax-description. */
.article-body {
    --_retarus-line: calc(var(--retarus-text-size) * 1.6);
}

.article-body :is(h1, h2) {
    margin-block: calc(var(--_retarus-line) * 1.75) calc(var(--_retarus-line) * 0.5);
}

.article-body h3 {
    margin-block: calc(var(--_retarus-line) * 1.5) calc(var(--_retarus-line) * 0.5);
}

.article-body :is(h4, h5, h6) {
    margin-block: calc(var(--_retarus-line) * 1.25) calc(var(--_retarus-line) * 0.5);
}

/* A heading right after a heading, and the first element of the article, keep the
   theme's behavior; the rules above would otherwise override it.
   Default: .75rlh between two headings, 0 above the first element. */
.article-body :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) {
    margin-block-start: calc(var(--_retarus-line) * 0.75);
}

.article-body > :first-child {
    margin-block-start: 0;
}

/* A list right under a heading sits as close to it as a paragraph does (the heading's
   own bottom margin), so the heading belongs to the text below it.
   Default: margin-block: 1rlh on lists, 27px under the heading. */
.article-body :is(h1, h2, h3, h4, h5, h6) + :is(ul, ol) {
    margin-block-start: 0;
}

/* More room between the page title and the first content, so the first H2 does not
   read as a subtitle. Default: .article-page header { margin-block-end: .75rlh },
   20px, the same as between two headings. */
[data-page-template="article"] article > header {
    margin-block-end: 1.25rlh;
}

/* Large headings closer together when they wrap to two lines.
   Default: line-height 1.5 (--K15t-line-height-medium) for H1 and H2. */
[data-page-template="article"] article > header h1,
.article-body :is(h1, h2) {
    line-height: 1.25;
}

/* ==========================================================
   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);
}

/* Tooltips - Square corners, like the search bar and panels. The theme's hover
   labels on icon buttons (table full screen, heading copy link and others) are
   theme-tooltip elements; their dark fill and white text stay the theme's.
   Added 2026-12-02.
   Default: border-radius: var(--K15t-radius-x-small) */
theme-tooltip {
    border-radius: 0;
}

/* 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;
}

/* ==========================================================
   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;
}
