/* Webman — style "launch": navy header with a lime rule, light content on a 1180 px grid, Archivo / IBM Plex fonts. */
:root,
[data-bs-theme="light"] {
    --wm-head: #0f4c81;
    --wm-head-2: #1479cc;
    --wm-lime: #8cc63f;
    --wm-leaf: #4b7f12;
    --wm-ember: #d24000;
    --wm-paper: #f3f6f9;
    --wm-surface: #ffffff;
    --wm-surface-2: #e9f0f6;
    --wm-ink: #10263a;
    --wm-muted: #556779;
    --wm-line: #d5e0ea;
    --wm-link: #0f66b0;
    --wm-title: #0f4c81;
    --wm-on-head-muted: #b9d3ea;
    --wm-code-bg: #0c1d2c;
    --wm-shadow: 0 1px 2px rgba(16, 38, 58, .06), 0 8px 24px rgba(16, 38, 58, .07);
    --wm-f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
    --wm-f-body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --wm-f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    --wm-wrap: 1180px;
    --wm-r: 10px;
    --bs-body-bg: var(--wm-paper);
    --bs-body-color: var(--wm-ink);
    --bs-secondary-color: var(--wm-muted);
    --bs-tertiary-bg: var(--wm-surface-2);
    --bs-border-color: var(--wm-line);
    --bs-link-color: var(--wm-link);
    --bs-link-color-rgb: 15, 102, 176;
    --bs-link-hover-color: var(--wm-head);
    --bs-link-hover-color-rgb: 15, 76, 129;
    --bs-primary: #0f66b0;
    --bs-primary-rgb: 15, 102, 176;
    --bs-success: #4b7f12;
    --bs-success-rgb: 75, 127, 18;
    --bs-font-sans-serif: var(--wm-f-body);
    --bs-body-font-family: var(--wm-f-body);
    --bs-heading-color: var(--wm-ink);
}

[data-bs-theme="dark"] {
    --wm-head: #0b2f52;
    --wm-head-2: #0f4c81;
    --wm-lime: #a3d65b;
    --wm-leaf: #a3d65b;
    --wm-ember: #ff7a3d;
    --wm-paper: #0b1622;
    --wm-surface: #112131;
    --wm-surface-2: #16293c;
    --wm-ink: #e4edf5;
    --wm-muted: #93a8bb;
    --wm-line: #22384d;
    --wm-link: #6cb6f5;
    --wm-title: #8fc4f2;
    --wm-on-head-muted: #a9c4dc;
    --wm-code-bg: #07111b;
    --wm-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --bs-body-bg: var(--wm-paper);
    --bs-body-color: var(--wm-ink);
    --bs-secondary-color: var(--wm-muted);
    --bs-tertiary-bg: var(--wm-surface-2);
    --bs-secondary-bg: var(--wm-surface-2);
    --bs-border-color: var(--wm-line);
    --bs-link-color: var(--wm-link);
    --bs-link-color-rgb: 108, 182, 245;
    --bs-link-hover-color: #9ccff8;
    --bs-link-hover-color-rgb: 156, 207, 248;
    --bs-primary: #6cb6f5;
    --bs-primary-rgb: 108, 182, 245;
    --bs-heading-color: var(--wm-ink);
    color-scheme: dark;
}

/* Shared tokens for additional modules and shared components (AGENTS.md, section 23); set on body, so they follow the theme. */
.wm-template {
    --cms-accent: var(--wm-link);
    --cms-accent-ink: var(--wm-title);
    --cms-button-bg: var(--wm-link);
    --cms-button-hover-bg: var(--wm-head);
    --cms-button-color: #fff;
}

[data-bs-theme="dark"] .wm-template {
    --cms-button-hover-bg: #9ccff8;
    --cms-button-color: #0b1622;
}

/* base */
body.wm-template { background: var(--wm-paper); color: var(--wm-ink); font-family: var(--wm-f-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.wm-template h1, .wm-template h2, .wm-template h3, .wm-template h4 { font-family: var(--wm-f-display); font-stretch: 108%; line-height: 1.15; text-wrap: balance; }
:where(.wm-template) a { color: var(--wm-link); }
.wm-template a:hover { text-decoration-thickness: 2px; }
.wm-template :focus-visible { outline: 3px solid var(--wm-lime); outline-offset: 2px; border-radius: 4px; }
.wm-wrap { max-width: var(--wm-wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wm-skip { position: absolute; left: -10000px; top: 8px; z-index: 100; background: var(--wm-surface); color: var(--wm-ink); padding: 8px 12px; border-radius: 6px; }
.wm-skip:focus { left: 8px; }
.wm-main { overflow-x: clip; min-height: 40vh; }

/* admin bar */
.wm-adminbar { background: var(--wm-code-bg); color: #d6e6f3; font-size: .8rem; }
.wm-adminbar .wm-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding-block: 6px; }
.wm-adminbar a { color: var(--wm-lime); }
.wm-adminbar.is-maintenance { background: #5a1d00; }

/* header: the header blocks (header_outer) stay on top while scrolling; .wm-header is the fallback without header blocks */
.wm-region--header-outer { position: sticky; top: 0; z-index: 50; }
.wm-region--header-outer > .cms-block, .wm-region--footer .cms-block { margin-bottom: 0 !important; }
.wm-region--strip { background: var(--wm-surface); border-bottom: 1px solid var(--wm-line); }
.wm-region--strip .wm-wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-block: 8px; }
.wm-header { background: var(--wm-head); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 4px solid var(--wm-lime); }
.wm-header__inner { display: flex; align-items: center; gap: 18px; min-height: 64px; position: relative; }
.wm-header__name { color: #fff !important; text-decoration: none; font-family: var(--wm-f-display); font-weight: 800; font-size: 1.4rem; white-space: nowrap; }
.wm-nav { margin-left: auto; }
.wm-nav__list { display: flex; gap: 2px; align-items: center; list-style: none; margin: 0; padding: 0; }
.wm-nav__list > li { position: relative; }
.wm-nav a { display: block; color: var(--wm-on-head-muted); text-decoration: none; font-weight: 500; font-size: .93rem; padding: 8px 11px; border-radius: 6px; white-space: nowrap; }
.wm-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.wm-nav__submenu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 0; padding: 6px; background: var(--wm-head); border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; box-shadow: var(--wm-shadow); }
.wm-nav__list > li:hover > .wm-nav__submenu, .wm-nav__list > li:focus-within > .wm-nav__submenu { display: block; }
.wm-header__tools { display: flex; gap: 8px; align-items: center; }
.wm-header__name + .wm-header__tools { margin-left: auto; }
.wm-region--header-inner { display: flex; gap: 8px; align-items: center; }
.wm-region--header-inner .block-content { display: contents; }
.wm-icon-btn.cms-theme-toggle { width: 38px; padding: 0; border-color: rgba(255, 255, 255, .3); color: #fff; }
.wm-icon-btn.cms-theme-toggle:hover { border-color: #fff; }
.wm-menu-btn { display: none; align-items: center; gap: 6px; background: transparent; border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: 8px; padding: 8px 10px; font-weight: 600; font-size: .85rem; cursor: pointer; }
@media (max-width: 1100px) {
    .wm-menu-btn { display: inline-flex; margin-left: auto; }
    .wm-nav { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); margin: 0; background: var(--wm-head); padding: 8px 16px 16px; }
    .wm-nav.is-open { display: block; }
    .wm-nav__list { flex-direction: column; align-items: stretch; }
    .wm-nav__submenu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 16px; }
}

/* regions and layout */
.wm-region--content { padding-block: 40px 56px; }
.wm-region--top + .wm-region--content { padding-top: 48px; }
.wm-layout--aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
@media (max-width: 980px) { .wm-layout--aside { grid-template-columns: minmax(0, 1fr); } }
.wm-content { min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.wm-region--left { display: flex; flex-direction: column; gap: 32px; }
.wm-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.wm-module > .container, .wm-module > .container-xl, .wm-module > .container-fluid, .wm-module > div > .container { max-width: none; padding-left: 0; padding-right: 0; }
.wm-is-home .wm-region--content { padding-block: 56px; }
.wm-region--left { --cms-section-title-size: clamp(1.4rem, 2.4vw, 1.85rem); }

/* module page heads (shared classes .cms-module-view and .cms-page-head): in the single layout the view starts right under the top region and its head runs edge to edge */
.wm-layout--single .wm-module > .cms-module-view:first-child, .wm-layout--single .wm-module > .cms-page-head:first-child { margin-top: -40px; }
.wm-layout--single .wm-module > .cms-page-head, .wm-layout--single .wm-module > .cms-module-view:first-child > .cms-page-head:first-child { margin-inline: calc(50% - 50vw); padding-inline: max(16px, calc(50vw - 50%)); border-radius: 0; }
.wm-layout--single .wm-module > .cms-page-head { margin-bottom: 48px; }
.wm-region--top .cms-page-head { border-radius: 0; padding-inline: 16px; }
.wm-region--top .cms-page-head + * { margin-top: 0; }
.wm-module > .container.py-4, .wm-module > .py-4 { padding-top: 0 !important; }
.wm-region--bottom > div + div { margin-top: 0; }
.wm-region--bottom .ws-section { padding-block: 56px 0; }
.wm-region--bottom > div:last-child .ws-section { padding-bottom: 56px; }

/* side boxes: blocks in the side column get the card look; the version block keeps its own navy box */
.wm-aside > div { background: var(--wm-surface); border: 1px solid var(--wm-line); border-radius: var(--wm-r); padding: 20px; }
.wm-aside > div:has(.ws-version) { padding: 0; border: 0; background: transparent; }
.wm-aside .block-title { position: relative; display: flex; gap: 8px; align-items: center; color: var(--wm-title); font-family: var(--wm-f-display); font-stretch: 108%; font-weight: 700; font-size: 1.05rem; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--wm-line); }
.wm-aside .block-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 44px; height: 2px; background: var(--wm-lime); }
.wm-aside .block-title-icon { display: none; }
.wm-aside .cms-newsletter-shell { padding: 0 !important; background: none !important; border-radius: 0 !important; }
.wm-aside .cms-newsletter-shell > .d-flex { margin-bottom: 12px !important; }
.wm-aside .cms-newsletter-shell .cms-newsletter-icon { display: none !important; }
.wm-aside .cms-newsletter-shell h2 { font-size: 1.05rem; color: var(--wm-title); }
.wm-aside .cms-newsletter-shell p { font-size: .88rem; }
.wm-aside .cms-newsletter-shell .row > [class*="col-"] { width: 100%; }
.wm-aside .cms-newsletter-shell .btn { background: var(--wm-link); border-color: var(--wm-link); font-weight: 600; }
.cms-forumthreadslast__item { padding: 10px 0; border-bottom: 1px solid var(--wm-line); }
.cms-forumthreadslast__item:last-child { border-bottom: 0; padding-bottom: 0; }
.cms-forumthreadslast__item:first-child { padding-top: 0; }
.cms-forumthreadslast__title { display: block; color: var(--wm-ink) !important; font-weight: 600; text-decoration: none; line-height: 1.35; }
.cms-forumthreadslast__title:hover { color: var(--wm-link) !important; }
.cms-forumthreadslast__meta, .cms-forumthreadslast__stats { font-size: .8rem; color: var(--wm-muted); }

/* system modules and Bootstrap components in the palette */
.wm-template .card { --bs-card-bg: var(--wm-surface); --bs-card-border-color: var(--wm-line); --bs-card-cap-bg: var(--wm-surface-2); border-radius: var(--wm-r); }
.wm-template .card.border-0 { border: 1px solid var(--wm-line) !important; }
.wm-template .shadow-sm { box-shadow: none !important; }
.wm-template .btn-primary { --bs-btn-bg: var(--wm-link); --bs-btn-border-color: var(--wm-link); --bs-btn-hover-bg: var(--wm-head); --bs-btn-hover-border-color: var(--wm-head); font-weight: 600; }
.wm-template .btn-success { --bs-btn-bg: var(--wm-lime); --bs-btn-border-color: var(--wm-lime); --bs-btn-color: #11280a; --bs-btn-hover-bg: #9bd350; --bs-btn-hover-border-color: #9bd350; --bs-btn-hover-color: #11280a; font-weight: 600; }
.wm-template .form-control, .wm-template .form-select { background-color: var(--wm-surface); border-color: var(--wm-line); color: var(--wm-ink); }
.wm-template .table { --bs-table-bg: transparent; --bs-table-color: var(--wm-ink); --bs-table-border-color: var(--wm-line); }
.wm-template .list-group { --bs-list-group-bg: var(--wm-surface); --bs-list-group-border-color: var(--wm-line); --bs-list-group-color: var(--wm-ink); }
.wm-template .pagination { --bs-pagination-bg: var(--wm-surface); --bs-pagination-border-color: var(--wm-line); --bs-pagination-active-bg: var(--wm-head); --bs-pagination-active-border-color: var(--wm-head); }
.wm-template .badge.text-bg-primary { background-color: var(--wm-link) !important; }
.wm-template .cms-content pre { background: var(--wm-code-bg); color: #d6e6f3; padding: 14px 16px; border-radius: 8px; }
.wm-module h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; color: var(--wm-title); }

/* technical tags of the news, help and FAQ pages (kind:, version:, group:) are read by the shop views, not shown */
.cms-searchtags__chip[href*="q=kind%3A"], .cms-searchtags__chip[href*="q=version%3A"], .cms-searchtags__chip[href*="q=group%3A"], .cms-searchtags__chip[href$="q=faq"] { display: none; }

/* forum home: one card per category, threads as rows */
.cms-forumhome { --forum-accent-default: var(--wm-link); display: flex; flex-direction: column; gap: 20px; }
.wm-template:has(.ws-head) .cms-forumhome__intro { display: none; }
.cms-forumhome__intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.cms-forumhome__intro p { color: var(--wm-muted) !important; margin-top: 4px !important; }
.cms-forumhome__categories { display: flex; flex-direction: column; gap: 20px; }
.cms-forumhome__category, .cms-forumhome > .cms-forumhome__category-head { background: var(--wm-surface); border: 1px solid var(--wm-line); border-radius: var(--wm-r); overflow: hidden; }
.cms-forumhome__category-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--wm-line); background: var(--wm-surface-2); }
.cms-forumhome__category-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cms-forumhome__category-icon { --forum-accent: var(--forum-accent-default); flex: 0 0 42px; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 1.1rem; color: #fff; background: var(--forum-accent); }
.cms-forumhome__category-title { margin: 0 0 2px; font-family: var(--wm-f-display); font-size: 1.12rem; font-weight: 750; line-height: 1.25; }
.cms-forumhome__category-title a { color: var(--wm-title); text-decoration: none; }
.cms-forumhome__category-title a:hover { color: var(--wm-link); }
.cms-forumhome__category-description { color: var(--wm-muted); font-size: .88rem; }
.cms-forumhome__category-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cms-forumhome__category-count { font-family: var(--wm-f-mono); font-size: .78rem; color: var(--wm-muted); white-space: nowrap; }
.cms-forumhome__new-thread { font-weight: 600; }
.cms-forumhome__threads { display: flex; flex-direction: column; }
.cms-forumhome__thread { display: grid; grid-template-columns: minmax(0, 1fr) auto 170px; align-items: center; gap: 16px; padding: 14px 18px; color: inherit; text-decoration: none !important; border-bottom: 1px solid var(--wm-line); }
.cms-forumhome__thread:last-child { border-bottom: 0; }
.cms-forumhome__thread:hover { background: var(--wm-surface-2); color: inherit; }
.cms-forumhome__thread-main { min-width: 0; }
.cms-forumhome__thread-title-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.cms-forumhome__thread-title { color: var(--wm-ink); font-weight: 600; line-height: 1.4; }
.cms-forumhome__thread:hover .cms-forumhome__thread-title { color: var(--wm-link); }
.cms-forumhome__flag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; font-family: var(--wm-f-mono); font-size: .66rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.cms-forumhome__flag--pinned { color: #fff; background: var(--wm-head); }
.cms-forumhome__flag--hot { color: #fff; background: var(--wm-ember); }
.cms-forumhome__flag--new { color: #11280a; background: var(--wm-lime); }
.cms-forumhome__flag--closed { color: var(--wm-muted); background: var(--wm-surface-2); }
.cms-forumhome__thread-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--wm-muted); font-size: .8rem; }
.cms-forumhome__author-avatar { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; font-size: .6rem; }
.cms-forumhome__dot { color: var(--wm-line); }
.cms-forumhome__category-badge { --forum-accent: var(--forum-accent-default); padding: 1px 7px; border-radius: 999px; font-size: .72rem; font-weight: 600; color: var(--forum-accent); background: color-mix(in srgb, var(--forum-accent) 12%, transparent); }
.cms-forumhome__thread-counts { display: flex; gap: 8px; }
.cms-forumhome__count { min-width: 56px; padding: 4px 8px; text-align: center; border: 1px solid var(--wm-line); border-radius: 6px; }
.cms-forumhome__count strong { display: block; font-family: var(--wm-f-mono); font-size: .9rem; color: var(--wm-ink); }
.cms-forumhome__count small { font-size: .66rem; color: var(--wm-muted); text-transform: uppercase; letter-spacing: .04em; }
.cms-forumhome__thread-last { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; text-align: right; font-size: .76rem; color: var(--wm-muted); line-height: 1.45; }
.cms-forumhome__thread-last-label { font-family: var(--wm-f-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; }
.cms-forumhome__thread-last strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wm-ink); }
.cms-forumhome__category > .alert { margin: 14px 18px; }
@media (max-width: 860px) {
    .cms-forumhome__category-head { flex-wrap: wrap; }
    .cms-forumhome__category-tools { width: 100%; justify-content: space-between; }
    .cms-forumhome__thread { grid-template-columns: minmax(0, 1fr) auto; }
    .cms-forumhome__thread-last { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
}
@media (max-width: 520px) {
    .cms-forumhome__thread { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; }
    .cms-forumhome__thread-last { grid-column: auto; }
}

/* footer: the footer blocks (footer_inner, footer_outer) draw the footer; .wm-footer is the fallback without footer blocks */
.wm-footer { background: var(--wm-head); color: var(--wm-on-head-muted); font-size: .85rem; }
.wm-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 24px; }
.wm-footer__links { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0; padding: 0; }
.wm-footer a { color: var(--wm-on-head-muted); text-decoration: none; }
.wm-footer a:hover { color: #fff; text-decoration: underline; }

/* back to top */
.wm-back-top { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--wm-head); color: #fff; box-shadow: var(--wm-shadow); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.wm-back-top.is-visible { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) { .wm-back-top { transition: opacity .2s; } }
