/* The PureSourceCode look (css/psc-tokens.css, as on tools.puresourcecode.com and
   the WordPress theme) on top of Bootstrap: the first block points Bootstrap's own
   variables at the tokens, so its tables, forms, cards and buttons follow the palette
   and the light/dark switch. Colours come from tokens, not hex, except where noted. */

/* ---- Bootstrap mapped onto the tokens --------------------------------- */

/* :root[data-bs-theme] (0,2,0) beats Bootstrap's own [data-bs-theme=dark] (0,1,0). */
:root, :root[data-bs-theme] {
    --bs-body-font-family: var(--psc-font-sans);
    --bs-font-monospace: var(--psc-font-mono);
    --bs-body-color: var(--psc-text);
    --bs-body-bg: var(--psc-surface-sunken);
    --bs-emphasis-color: var(--psc-text);
    --bs-secondary-color: var(--psc-text-muted);
    --bs-tertiary-color: var(--psc-text-faint);
    --bs-secondary-bg: var(--psc-surface-sunken);
    --bs-tertiary-bg: var(--psc-surface-sunken);
    --bs-border-color: var(--psc-border);
    --bs-border-radius: var(--psc-radius-md);
    --bs-border-radius-lg: var(--psc-radius-lg);
    --bs-link-color: var(--psc-link);
    --bs-link-hover-color: var(--psc-link-hover);
    --bs-link-color-rgb: 81, 43, 212;
    --bs-link-hover-color-rgb: 61, 31, 168;
    --bs-primary: var(--psc-primary);
    --bs-primary-rgb: 81, 43, 212;
    --bs-primary-text-emphasis: var(--psc-primary-dark);
    --bs-primary-bg-subtle: var(--psc-primary-soft);
    --bs-primary-border-subtle: var(--psc-primary);
    --bs-focus-ring-color: rgba(81, 43, 212, 0.25);
    --bs-code-color: var(--psc-code-inline-fg);
}

:root[data-theme="dark"] {
    --bs-link-color-rgb: 164, 139, 244;
    --bs-link-hover-color-rgb: 196, 179, 248;
    --bs-primary-rgb: 139, 108, 240;
    --bs-focus-ring-color: rgba(139, 108, 240, 0.35);
}

body {
    font-size: var(--psc-text-base);
    line-height: var(--psc-leading-base);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 {
    font-family: var(--psc-font-display);
    line-height: var(--psc-leading-tight);
    color: var(--psc-text);
    font-weight: 700;
}

a { text-decoration: none; transition: color var(--psc-transition); }
a:hover { text-decoration: underline; }

/* FocusOnNavigate focuses the h1 on every route change (for screen readers): no ring. */
h1:focus { outline: none; }

code {
    background: var(--psc-code-inline-bg);
    color: var(--psc-code-inline-fg);
    padding: 0.1em 0.35em;
    border-radius: var(--psc-radius-sm);
}

.btn-primary {
    --bs-btn-color: var(--psc-on-primary);
    --bs-btn-bg: var(--psc-primary);
    --bs-btn-border-color: var(--psc-primary);
    --bs-btn-hover-color: var(--psc-on-primary);
    --bs-btn-hover-bg: var(--psc-primary-dark);
    --bs-btn-hover-border-color: var(--psc-primary-dark);
    --bs-btn-active-color: var(--psc-on-primary);
    --bs-btn-active-bg: var(--psc-primary-dark);
    --bs-btn-active-border-color: var(--psc-primary-dark);
    --bs-btn-disabled-color: var(--psc-on-primary);
    --bs-btn-disabled-bg: var(--psc-primary);
    --bs-btn-disabled-border-color: var(--psc-primary);
    font-weight: 600;
}

.btn-outline-primary {
    --bs-btn-color: var(--psc-primary);
    --bs-btn-border-color: var(--psc-primary);
    --bs-btn-hover-color: var(--psc-on-primary);
    --bs-btn-hover-bg: var(--psc-primary);
    --bs-btn-hover-border-color: var(--psc-primary);
    --bs-btn-active-color: var(--psc-on-primary);
    --bs-btn-active-bg: var(--psc-primary-dark);
    --bs-btn-active-border-color: var(--psc-primary-dark);
}

.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--psc-primary);
    box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color);
}

.form-check-input:checked { background-color: var(--psc-primary); border-color: var(--psc-primary); }

.form-control, .form-select { background-color: var(--psc-surface-raised); }

/* Cards and list groups sit raised on the sunken page, like .psc-card. */
.card, .list-group {
    --bs-card-bg: var(--psc-surface-raised);
    --bs-list-group-bg: var(--psc-surface-raised);
    --bs-card-border-color: var(--psc-border);
    --bs-list-group-border-color: var(--psc-border);
    --bs-card-border-radius: var(--psc-radius-lg);
    --bs-list-group-border-radius: var(--psc-radius-lg);
    box-shadow: var(--psc-shadow-sm);
}

.list-group-item-action:hover { --bs-list-group-action-hover-bg: var(--psc-primary-soft); }

/* Tables keep the page's background rather than painting their own. */
.table { --bs-table-bg: transparent; --bs-table-border-color: var(--psc-border); }

/* ---- Layout ----------------------------------------------------------- */

.psc-container {
    width: 100%;
    max-width: var(--psc-container);
    margin-inline: auto;
    padding-inline: var(--psc-gutter);
}

.psc-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.psc-main {
    flex: 1;
    padding-block: var(--psc-space-8);
}

/* ---- Top bar ---------------------------------------------------------- */

.psc-topbar {
    background: var(--psc-topbar-bg);
    color: var(--psc-topbar-text);
    font-size: var(--psc-text-xs);
}

.psc-topbar .psc-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--psc-space-4);
    min-height: 34px;
}

/* The bar is dark in both themes, so hover is plain white (the one fixed colour). */
.psc-topbar a, .psc-topbar__form button { color: var(--psc-topbar-text); }
.psc-topbar a:hover, .psc-topbar__form button:hover { color: #FFFFFF; }

.psc-topbar__end {
    display: flex;
    align-items: center;
    gap: var(--psc-space-4);
}

.psc-topbar__form { display: inline; margin: 0; }

.psc-topbar__form button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

/* The projects menu button lives in a shadow root; ::part() is the only way in. */
.psc-topbar__projects {
    display: flex;
    min-width: 28px;
    min-height: 26px;
}
.psc-topbar__projects psc-projects-menu {
    --pscp-accent: var(--psc-primary);
    --pscp-on-accent: var(--psc-on-primary);
}
.psc-topbar__projects psc-projects-menu::part(button) {
    height: 26px;
    padding: 0 var(--psc-space-2);
    gap: 6px;
    font-size: inherit;
}
.psc-topbar__projects psc-projects-menu::part(button):hover { color: #FFFFFF; }

@media (max-width: 640px) {
    .psc-topbar .psc-container > span { display: none; }
    .psc-topbar .psc-container { justify-content: flex-end; }
    .psc-topbar__projects psc-projects-menu::part(label) { display: none; }
}

/* ---- Header ----------------------------------------------------------- */

.psc-header {
    background: var(--psc-header-bg);
    border-bottom: 1px solid var(--psc-border);
    position: sticky;
    top: 0;
    z-index: var(--psc-z-nav);
}

.psc-header .psc-container {
    display: flex;
    align-items: center;
    gap: var(--psc-space-6);
    min-height: var(--psc-header-sticky-height);
}

.psc-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--psc-space-2);
    font-size: var(--psc-text-lg);
    font-weight: 700;
    color: var(--psc-text);
    letter-spacing: -0.01em;
}

.psc-brand:hover { color: var(--psc-text); text-decoration: none; }
.psc-brand em { font-style: normal; color: var(--psc-primary); }

/* The mark is a fixed dark navy, so it gets a white tile to stay legible in the dark theme. */
.psc-brand img, .psc-footer img {
    padding: 3px;
    background: #FFFFFF;
    border-radius: var(--psc-radius-sm);
}
.psc-brand img { width: 30px; height: 30px; }
/* The security mark brings its own purple tile: no white backing. */
.psc-brand img.psc-brand__mark { width: 34px; height: 34px; padding: 0; background: none; border-radius: 0; }

.psc-brand small {
    font-size: var(--psc-text-xs);
    font-weight: 400;
    color: var(--psc-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.psc-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--psc-space-1);
    margin-left: auto;
}

.psc-nav a, .psc-adminbar a {
    display: inline-block;
    padding: var(--psc-space-2);
    color: var(--psc-nav-text);
    font-size: var(--psc-text-sm);
    font-weight: 600;
    border-radius: var(--psc-radius-sm);
    border-bottom: 2px solid transparent;
}

.psc-nav a:hover, .psc-adminbar a:hover {
    color: var(--psc-primary);
    background: var(--psc-primary-soft);
    text-decoration: none;
}

/* Blazor adds .active to the NavLink matching the current route. */
.psc-nav a.active, .psc-adminbar a.active {
    color: var(--psc-primary);
    border-bottom-color: var(--psc-primary);
    border-radius: 0;
}

.psc-nav a.psc-nav__cta {
    margin-left: var(--psc-space-2);
    padding-inline: var(--psc-space-4);
    color: var(--psc-on-primary);
    background: var(--psc-primary);
    border-radius: var(--psc-radius-pill);
}
.psc-nav a.psc-nav__cta:hover { color: var(--psc-on-primary); background: var(--psc-primary-dark); }

.psc-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: var(--psc-text-base);
    line-height: 1;
    color: var(--psc-text-muted);
    background: transparent;
    border: 1px solid var(--psc-border);
    border-radius: var(--psc-radius-sm);
    cursor: pointer;
    transition: border-color var(--psc-transition), color var(--psc-transition);
}

.psc-theme-toggle:hover { color: var(--psc-primary); border-color: var(--psc-primary); }

/* ---- Admin bar (admins only) ------------------------------------------- */

.psc-adminbar {
    background: var(--psc-primary-soft);
    border-bottom: 1px solid var(--psc-border);
}

.psc-adminbar .psc-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--psc-space-1);
}

.psc-adminbar a { padding-block: var(--psc-space-1); }

.psc-adminbar__label {
    margin-right: var(--psc-space-2);
    font-size: var(--psc-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--psc-primary);
}

@media (max-width: 640px) {
    .psc-header .psc-container { flex-wrap: wrap; padding-block: var(--psc-space-3); }
    .psc-nav { margin-left: 0; width: 100%; }
    .psc-theme-toggle { position: absolute; top: var(--psc-space-3); right: var(--psc-gutter); }
}

/* ---- Footer ----------------------------------------------------------- */

.psc-footer {
    background: var(--psc-footer-bg);
    color: var(--psc-footer-text);
    font-size: var(--psc-text-sm);
    padding-block: var(--psc-space-6);
}

.psc-footer img {
    width: 22px;
    height: 22px;
    padding: 2px;
    vertical-align: middle;
    margin-right: var(--psc-space-2);
}

.psc-footer a { color: var(--psc-footer-text); text-decoration: underline; }
.psc-footer a:hover { color: #FFFFFF; }

/* ---- Blazor and forms (template) --------------------------------------- */

#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--psc-z-modal);
    display: none;
    padding: var(--psc-space-3) var(--psc-space-6);
    color: #1B1F23;
    background: var(--psc-accent-yellow);
    box-shadow: var(--psc-shadow-lg);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: var(--psc-space-2);
    right: var(--psc-space-4);
    cursor: pointer;
}

.valid.modified:not([type=checkbox]) { outline: 1px solid var(--psc-accent-green); }
.invalid { outline: 1px solid var(--bs-danger); }
.validation-message { color: var(--bs-danger); }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input { border-color: var(--psc-border-strong); }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---- Security mailing --------------------------------------------------- */

.hero h1 { font-size: var(--psc-text-3xl); }
.hero .lead { max-width: 70ch; color: var(--psc-text-muted); font-size: var(--psc-text-lg); }
@media (max-width: 640px) { .hero h1 { font-size: var(--psc-text-2xl); } }

/* Stat tiles: raised cards with the Microsoft accents cycling on top, as the tools' cards. */
.stat {
    height: 100%;
    padding: var(--psc-space-3) var(--psc-space-4);
    background: var(--psc-surface-raised);
    border: 1px solid var(--psc-border);
    border-top: 3px solid var(--psc-cat-1);
    border-radius: var(--psc-radius-lg);
    box-shadow: var(--psc-shadow-sm);
}
.row > :nth-child(4n+2) > .stat { border-top-color: var(--psc-cat-2); }
.row > :nth-child(4n+3) > .stat { border-top-color: var(--psc-cat-3); }
.row > :nth-child(4n+4) > .stat { border-top-color: var(--psc-cat-4); }
.stat-label { font-size: var(--psc-text-xs); color: var(--psc-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.stat-small { font-size: 1rem; }

/* Severity colours are fixed on purpose: they mean the same in both themes and in the emails. */
.sev { display: inline-block; padding: .1rem .5rem; border-radius: var(--psc-radius-pill); font-size: .8rem; font-weight: 600; background: var(--psc-surface-sunken); color: var(--psc-text-muted); border: 1px solid var(--psc-border); }
.sev-critical { background: #7f1d1d; color: #fff; border-color: #7f1d1d; }
.sev-high { background: #c62828; color: #fff; border-color: #c62828; }
.sev-medium { background: #f9a825; color: #222; border-color: #f9a825; }
.sev-low { background: #2e7d32; color: #fff; border-color: #2e7d32; }

/* Newsletter form and pages (psc-nl-* classes from PSC.Blazor.Components.Newsletter) */
.psc-nl-fields { display: grid; gap: .75rem; }
.psc-nl-field { display: grid; gap: .25rem; }
.psc-nl-field input { padding: .4rem .6rem; border: 1px solid var(--psc-border); border-radius: var(--psc-radius-md); background: var(--psc-surface-raised); color: var(--psc-text); }
.psc-nl-field input:focus { outline: none; border-color: var(--psc-primary); box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color); }
.psc-nl-lists, .psc-nl-frequency { border: 0; padding: 0; margin: 0; display: grid; gap: .4rem; }
.psc-nl-lists legend, .psc-nl-frequency legend { font-size: 1rem; font-weight: 600; margin-bottom: .25rem; }
.psc-nl-list { display: grid; grid-template-columns: auto 1fr; column-gap: .5rem; align-items: baseline; }
.psc-nl-list input { grid-row: span 2; accent-color: var(--psc-primary); }
.psc-nl-frequency input { accent-color: var(--psc-primary); }
.psc-nl-list-name { font-weight: 500; }
.psc-nl-list-description { color: var(--psc-text-muted); }
.psc-nl-consent { font-size: .8rem; color: var(--psc-text-muted); margin: 0; }
.psc-nl-message { padding: .6rem .8rem; border-radius: var(--psc-radius-md); margin-bottom: .75rem; }
.psc-nl-success { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.psc-nl-error { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.psc-nl-page { max-width: 38rem; }
.psc-nl-page .psc-nl-submit { margin-top: .5rem; }
.psc-nl-submit:not(.btn) { padding: .45rem 1rem; border: 0; border-radius: var(--psc-radius-md); background: var(--psc-primary); color: var(--psc-on-primary); font-weight: 600; }
.psc-nl-submit:not(.btn):hover { background: var(--psc-primary-dark); }
.psc-nl-link-button { background: none; border: 0; padding: 0; color: var(--psc-link); text-decoration: underline; }
.psc-nl-alt { margin-top: 1rem; }

/* Vulnerability detail */
.vuln-text { white-space: pre-line; max-width: 60rem; }

/* An advisory's description, rendered from Markdown (AdvisoryMarkdown). */
.vuln-md { max-width: 60rem; margin-bottom: var(--psc-space-4); overflow-wrap: anywhere; }
.vuln-md > :last-child { margin-bottom: 0; }
.vuln-md h3, .vuln-md h4, .vuln-md h5, .vuln-md h6 { font-size: var(--psc-text-lg); margin: var(--psc-space-5) 0 var(--psc-space-2); }
.vuln-md p, .vuln-md ul, .vuln-md ol { margin-bottom: var(--psc-space-3); }
.vuln-md pre {
    padding: var(--psc-space-3) var(--psc-space-4);
    background: var(--psc-code-bg);
    color: var(--psc-code-text);
    border: 1px solid var(--psc-code-border);
    border-radius: var(--psc-radius-md);
    font-size: var(--psc-text-sm);
    overflow-x: auto;
    overflow-wrap: normal;
}
.vuln-md pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.vuln-md table { width: auto; margin-bottom: var(--psc-space-3); font-size: var(--psc-text-sm); }
.vuln-md th, .vuln-md td { padding: var(--psc-space-1) var(--psc-space-2); border: 1px solid var(--psc-border); }
.vuln-md blockquote { padding-left: var(--psc-space-3); border-left: 3px solid var(--psc-border-strong); color: var(--psc-text-muted); }
.vuln-refs { overflow-wrap: anywhere; max-width: 60rem; }

/* Home page search box. */
.home-search { display: flex; gap: var(--psc-space-2); max-width: 46rem; margin-top: var(--psc-space-5); }
.home-search .form-control { flex: 1; min-width: 0; }
@media (max-width: 480px) { .home-search { flex-direction: column; } }

/* Home page: latest vulnerabilities, one card each. */
.vuln-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--psc-space-2); }
.vuln-feed__item {
    display: block;
    padding: var(--psc-space-3) var(--psc-space-4);
    color: inherit;
    background: var(--psc-surface-raised);
    border: 1px solid var(--psc-border);
    border-left: 4px solid var(--psc-border-strong);
    border-radius: var(--psc-radius-md);
    box-shadow: var(--psc-shadow-sm);
    transition: box-shadow var(--psc-transition), transform var(--psc-transition), border-color var(--psc-transition);
}
.vuln-feed__item:hover { color: inherit; text-decoration: none; box-shadow: var(--psc-shadow-md); transform: translateY(-1px); }
.vuln-feed__item:hover .vuln-feed__id { color: var(--psc-link-hover); text-decoration: underline; }
/* Same colours as the .sev badges. */
.vuln-feed--critical { border-left-color: #7f1d1d; }
.vuln-feed--high { border-left-color: #c62828; }
.vuln-feed--medium { border-left-color: #f9a825; }
.vuln-feed--low { border-left-color: #2e7d32; }
.vuln-feed__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--psc-space-2); }
.vuln-feed__id { font-family: var(--psc-font-mono); font-size: var(--psc-text-sm); font-weight: 600; color: var(--psc-link); }
.vuln-feed__time { margin-left: auto; font-size: var(--psc-text-xs); color: var(--psc-text-muted); white-space: nowrap; }
.vuln-feed__title {
    margin: var(--psc-space-1) 0 0;
    font-size: var(--psc-text-sm);
    line-height: var(--psc-leading-snug);
    /* Two lines, cut by the browser rather than mid-word on the server. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vuln-feed__meta { display: flex; flex-wrap: wrap; gap: var(--psc-space-3); margin-top: var(--psc-space-1); font-size: var(--psc-text-xs); color: var(--psc-text-faint); }
.vuln-feed__meta:empty { display: none; }

/* Cookie banner (CookieBanner.razor): fixed to the bottom until answered. */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: var(--psc-z-modal);
    padding-block: var(--psc-space-4);
    background: var(--psc-surface-raised);
    border-top: 3px solid var(--psc-primary);
    box-shadow: var(--psc-shadow-lg);
}
.cookie-banner__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--psc-space-4); }
.cookie-banner__title { font-size: var(--psc-text-base); margin: 0 0 var(--psc-space-1); }
.cookie-banner__text { margin: 0; max-width: 70ch; font-size: var(--psc-text-sm); color: var(--psc-text-muted); }
.cookie-banner__actions { display: flex; gap: var(--psc-space-2); }

/* AdSense units (AdSlot.razor). */
.psc-ad { margin-block: var(--psc-space-6); padding: var(--psc-space-2) 0; border-top: 1px solid var(--psc-border); border-bottom: 1px solid var(--psc-border); min-height: 120px; }
.psc-ad__label { display: block; margin-bottom: var(--psc-space-1); font-size: var(--psc-text-xs); color: var(--psc-text-faint); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- List pages (/cves, /vulns): header, filter panel, count, pager ---- */

.psc-list-head { margin-bottom: var(--psc-space-4); }
.psc-list-head__sub { margin: 0; color: var(--psc-text-muted); font-size: var(--psc-text-sm); }

/* Filters as one raised panel; fields wrap on small screens. */
.psc-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--psc-space-3) var(--psc-space-4);
    margin-bottom: var(--psc-space-4);
    padding: var(--psc-space-4);
    background: var(--psc-surface-raised);
    border: 1px solid var(--psc-border);
    border-radius: var(--psc-radius-lg);
    box-shadow: var(--psc-shadow-sm);
}
.psc-filters .form-label { margin-bottom: var(--psc-space-1); font-size: var(--psc-text-xs); font-weight: 600; color: var(--psc-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.psc-filters__field { flex: 1 1 11rem; min-width: 0; }
.psc-filters__field--wide { flex: 2 1 16rem; }
.psc-filters__field--narrow { flex: 1 1 8.5rem; }
.psc-filters__actions { display: flex; align-items: center; gap: var(--psc-space-4); margin-left: auto; }
.psc-filters__actions .form-check { margin: 0; font-size: var(--psc-text-sm); white-space: nowrap; }
.psc-filters__actions .btn { padding-inline: var(--psc-space-5); }

.psc-count { margin: 0 0 var(--psc-space-3); font-size: var(--psc-text-sm); color: var(--psc-text-muted); }
.psc-count strong { color: var(--psc-text); }

.psc-empty {
    padding: var(--psc-space-8) var(--psc-space-4);
    text-align: center;
    color: var(--psc-text-muted);
    background: var(--psc-surface-raised);
    border: 1px dashed var(--psc-border-strong);
    border-radius: var(--psc-radius-lg);
}

.psc-pager { display: flex; align-items: center; justify-content: center; gap: var(--psc-space-3); margin-top: var(--psc-space-5); }
.psc-pager__status { font-size: var(--psc-text-sm); color: var(--psc-text-muted); }

/* ---- My watch (/watch) ---- */
.watch-form {
    display: grid;
    gap: var(--psc-space-4);
    padding: var(--psc-space-5);
    background: var(--psc-surface-raised);
    border: 1px solid var(--psc-border);
    border-radius: var(--psc-radius-lg);
    box-shadow: var(--psc-shadow-sm);
}
.watch-form__group { border: 0; margin: 0; padding: 0; min-width: 0; flex: 1 1 18rem; }
.watch-form__group--narrow { flex: 0 1 12rem; }
.watch-form legend, .watch-form .form-label { margin-bottom: var(--psc-space-1); font-size: var(--psc-text-xs); font-weight: 600; color: var(--psc-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.watch-form__hint { margin: var(--psc-space-1) 0 0; font-size: var(--psc-text-xs); color: var(--psc-text-faint); }
.watch-form__ecosystems { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--psc-space-1) var(--psc-space-4); margin-top: var(--psc-space-2); }
.watch-form__ecosystems .form-check { margin: 0; font-size: var(--psc-text-sm); }
.watch-form__row { display: flex; flex-wrap: wrap; gap: var(--psc-space-4); }
.watch-form__row--end { align-items: flex-end; }
.watch-form__kev { margin: 0 0 var(--psc-space-1); font-size: var(--psc-text-sm); }
.psc-nl-list-settings { grid-column: 2; font-size: var(--psc-text-sm); }

/* ---- RSS feeds and data (/feeds) ---- */
.feeds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: var(--psc-space-4); align-items: start; }
.feeds-card {
    padding: var(--psc-space-5);
    background: var(--psc-surface-raised);
    border: 1px solid var(--psc-border);
    border-top: 3px solid var(--psc-cat-1);
    border-radius: var(--psc-radius-lg);
    box-shadow: var(--psc-shadow-sm);
    font-size: var(--psc-text-sm);
}
.feeds-grid > :nth-child(2) { border-top-color: var(--psc-cat-2); }
.feeds-grid > :nth-child(3) { border-top-color: var(--psc-cat-3); }
.feeds-list, .feeds-plain { list-style: none; margin: 0 0 var(--psc-space-3); padding: 0; display: grid; gap: var(--psc-space-2); }
.feeds-list a { font-weight: 600; }
.feeds-list small { display: block; color: var(--psc-text-muted); }
.feeds-list__icon { margin-right: var(--psc-space-2); color: var(--psc-accent-orange); }

/* "My watch" explained on home and /vulns. */
.watch-promo {
    margin-top: var(--psc-space-4);
    padding: var(--psc-space-5);
    background: var(--psc-primary-soft);
    border: 1px solid var(--psc-border);
    border-left: 4px solid var(--psc-primary);
    border-radius: var(--psc-radius-lg);
    font-size: var(--psc-text-sm);
}
.watch-promo h2 { margin: 0 0 var(--psc-space-2); }

/* Home, above the fold: the My watch invitation under the search, the subscribe form beside it. */
.watch-cta {
    display: flex;
    align-items: center;
    gap: var(--psc-space-5);
    margin-top: var(--psc-space-5);
    padding: var(--psc-space-5);
    background: var(--psc-primary-soft);
    border: 1px solid var(--psc-border);
    border-left: 4px solid var(--psc-primary);
    border-radius: var(--psc-radius-lg);
    font-size: var(--psc-text-sm);
}
.watch-cta h2 { margin: var(--psc-space-2) 0; }
.watch-cta__button { flex: none; white-space: nowrap; }
.watch-cta__note { margin: var(--psc-space-2) 0 0; font-weight: 600; color: var(--psc-primary); }

/* A list that needs a PureSourceCode account, for a visitor who isn't signed in: shown, not usable. */
.psc-nl-list--locked { cursor: default; }
.psc-nl-list--locked .psc-nl-list-name,
.psc-nl-list--locked .psc-nl-list-description { opacity: 0.6; }
.psc-nl-list-signin { grid-column: 2; font-size: var(--psc-text-sm); }
.psc-nl-list-signin a { font-weight: 600; }
@media (max-width: 640px) {
    .watch-cta { flex-direction: column; align-items: stretch; }
}
.subscribe-card { border-top: 3px solid var(--psc-primary); box-shadow: var(--psc-shadow-md); }
@media (min-width: 992px) {
    .subscribe-card { position: sticky; top: var(--psc-space-4); }
}
.watch-promo ol { padding-left: var(--psc-space-5); margin-bottom: var(--psc-space-3); }
.watch-promo li { margin-bottom: var(--psc-space-1); }
.psc-eyebrow {
    display: inline-block;
    padding: 2px var(--psc-space-2);
    font-size: var(--psc-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--psc-primary);
    background: var(--psc-surface-raised);
    border-radius: var(--psc-radius-pill);
}
.watch-tip { margin-top: var(--psc-space-5); padding: var(--psc-space-3) var(--psc-space-4); font-size: var(--psc-text-sm); background: var(--psc-primary-soft); border-radius: var(--psc-radius-md); }
