/* Shared look of the public pages (newsletter, release notes), after wiki.behnke.support (its --wk-* values). */

:root {
    --pw-accent:        var(--behnke-design, #004f8b);
    --pw-accent-hover:  #003b69;
    --pw-accent-soft:   color-mix(in srgb, var(--pw-accent) 8%, #fff);
    --pw-accent-ring:   color-mix(in srgb, var(--pw-accent) 22%, transparent);
    --pw-text:          var(--behnke-black, #303030);
    --pw-text-strong:   #1b2129;
    --pw-text-soft:     #5b6672;
    --pw-border:        #e3e8ee;
    --pw-border-strong: #cdd5df;
    --pw-surface:       #ffffff;
    --pw-surface-soft:  #f5f7fa;
    --pw-info-bg:       #f2f6fb;
    --pw-info-border:   #9db0c8;
    --pw-warn-bg:       #fdf6e3;
    --pw-warn-border:   #e3b341;
    --pw-warn-text:     #8a6100;
    --pw-success:       #166534;
    --pw-warning:       #92400e;
    --pw-danger:        #b91c1c;
    --pw-topbar:        var(--behnke-gradient-connect, linear-gradient(180deg, #145894, #004f8b));

    /* angular on purpose, like the wiki: a technical manual, not a soft card */
    --pw-r-s: 0.125rem;
    --pw-r-m: 0.1875rem;

    /* the bars of the Behnke logo, drawn in the text colour of the element (from the wiki) */
    --pw-stripes: linear-gradient(90deg, currentColor 0% 1.05%, transparent 1.05% 6.62%, currentColor 6.62% 9.06%, transparent 9.06% 13.24%, currentColor 13.24% 16.38%, transparent 16.38% 20.56%, currentColor 20.56% 24.74%, transparent 24.74% 27.53%, currentColor 27.53% 34.15%, transparent 34.15% 36.93%, currentColor 36.93% 45.3%, transparent 45.3% 47.39%, currentColor 47.39% 57.14%, transparent 57.14% 59.23%, currentColor 59.23% 71.78%, transparent 71.78% 74.56%, currentColor 74.56% 100%);
}

/* These pages bring their own top bar instead of the dashboard header. */
body > .header {
    display: none !important;
}

body > .content-container {
    background: transparent !important;
    margin: 0 !important;
    padding: 0;
}

/* The shared pieces size by their border box, whatever the page around them does. */
.pw-topbar,
.pw-topbar *,
.pw-tile,
.pw-btn,
.pw-badge {
    box-sizing: border-box;
}

/* ── Top bar (as in the wiki) ───────────────────────────────────────────── */

.pw-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--pw-topbar);
    color: #fff;
}

.pw-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
}

.pw-topbar-logo {
    width: 1.875rem;
    height: 1.875rem;
    object-fit: contain;
}

.pw-topbar-link {
    padding: 0.375rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--pw-r-m);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.pw-topbar-link:hover,
.pw-topbar-link:focus-visible {
    background: #fff;
    color: var(--pw-accent);
}

/* An action the page wants people to take: filled from the start. */
.pw-topbar-link--primary {
    border-color: #fff;
    background: #fff;
    color: var(--pw-accent);
}

.pw-topbar-link--primary:hover,
.pw-topbar-link--primary:focus-visible {
    background: var(--pw-accent-soft);
}

/* ── Title stamp, tiles, buttons, badges ────────────────────────────────── */

/* The logo bars as a stamp on a hairline, like the wiki's page titles. */
.pw-stamp {
    padding-bottom: 0.75rem;
    background:
        var(--pw-stripes) left bottom / 4.5rem 0.5rem no-repeat,
        linear-gradient(var(--pw-border), var(--pw-border)) left bottom / 100% 1px no-repeat;
}

.pw-tile {
    padding: 1.25rem;
    border: 1px solid var(--pw-border);
    border-top: 4px solid var(--pw-accent);
    border-radius: var(--pw-r-s);
    background: var(--pw-surface);
}

.pw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.625rem;
    padding: 0 1.25rem;
    border: 1px solid var(--pw-accent);
    border-radius: var(--pw-r-m);
    background: var(--pw-accent);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.pw-btn:hover {
    background: var(--pw-accent-hover);
    border-color: var(--pw-accent-hover);
    color: #fff;
}

.pw-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--pw-accent-ring);
}

.pw-btn--secondary {
    background: var(--pw-surface);
    color: var(--pw-accent);
}

.pw-btn--secondary:hover {
    background: var(--pw-accent-soft);
    border-color: var(--pw-accent);
    color: var(--pw-accent);
}

/* Outlined label like the wiki's severity badges. */
.pw-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border: 1px solid var(--pw-border-strong);
    border-radius: var(--pw-r-s);
    background: var(--pw-surface);
    color: var(--pw-text-soft);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.5;
}

.pw-badge--success { border-color: var(--pw-success); color: var(--pw-success); }
.pw-badge--warning { border-color: var(--pw-warn-border); background: var(--pw-warn-bg); color: var(--pw-warn-text); }
.pw-badge--danger  { border-color: var(--pw-danger); color: var(--pw-danger); }
