/* ==========================================================================
   НВП «ВЕЛ» — wel.net.ua
   Plain, modern, 2D. No gradients, no glass, no 3D.
   Type is Inter throughout: it is the only face on hand with full Cyrillic
   coverage, so hierarchy is carried by weight, size and tracking instead.
   ========================================================================== */

@font-face {
    font-family: "Inter";
    src: url("fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---- tokens : light is the base -------------------------------------- */
:root {
    /* Company colours. The brand mark is a deep violet (#453065); the whole
       palette is built from pastel tints of it rather than neutral greys. */
    --brand: #453065;
    --ground: #f3f1f9;
    --surface: #ffffff;
    --sunken: #eae5f4;
    --ink: #1d1730;
    --ink-soft: #3d3556;
    --muted: #635a7d;
    --faint: #776f90;
    --rule: #ddd6ec;
    --rule-soft: #ebe6f5;
    --accent: #453065;
    --accent-hover: #5a3f83;
    --accent-soft: #e8e1f5;
    --accent-ink: #ffffff;
    --doc: #1f6357;
    --doc-soft: #e4f1ee;
    --ok: #2a6a4e;
    --pastel-sky: #eceaf7;
    --pastel-lilac: #f1ecfa;
    --pastel-mint: #e8f2ef;
    --header-bg: #453065;
    --header-ink: #ffffff;
    --header-line: rgba(0, 0, 0, .14);
    --header-hover: rgba(255, 255, 255, .14);
    --header-active: rgba(255, 255, 255, .22);
    --header-border: rgba(255, 255, 255, .45);
    --img-plate: #ffffff;
    --shadow: 0 1px 2px rgba(29, 23, 48, .06), 0 6px 20px -10px rgba(29, 23, 48, .2);
    --radius: 4px;
    --measure: 70ch;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --brand: #b7a4e2;
        --ground: #131022;
        --surface: #1b1631;
        --sunken: #241d3f;
        --ink: #e9e5f5;
        --ink-soft: #c8c1de;
        --muted: #9d94b8;
        --faint: #8e86ab;
        --rule: #2f2750;
        --rule-soft: #241d3f;
        --accent: #b7a4e2;
        --accent-hover: #cfc0f2;
        --accent-soft: #251e42;
        --accent-ink: #171128;
        --doc: #7cc7b7;
        --doc-soft: #12241f;
        --ok: #6cbd93;
        --pastel-sky: #1e1938;
        --pastel-lilac: #221b3d;
        --pastel-mint: #14241f;
        --header-bg: #221a3c;
        --header-ink: #ece8f7;
        --header-line: rgba(0, 0, 0, .5);
        --header-hover: rgba(255, 255, 255, .1);
        --header-active: rgba(255, 255, 255, .17);
        --header-border: rgba(255, 255, 255, .3);
        --img-plate: #e9e6f0;
        --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 20px -10px rgba(0, 0, 0, .75);
    }
}

:root[data-theme="dark"] {
    --brand: #b7a4e2;
    --ground: #131022;
    --surface: #1b1631;
    --sunken: #241d3f;
    --ink: #e9e5f5;
    --ink-soft: #c8c1de;
    --muted: #9d94b8;
    --faint: #8e86ab;
    --rule: #2f2750;
    --rule-soft: #241d3f;
    --accent: #b7a4e2;
    --accent-hover: #cfc0f2;
    --accent-soft: #251e42;
    --accent-ink: #171128;
    --doc: #7cc7b7;
    --doc-soft: #12241f;
    --ok: #6cbd93;
    --pastel-sky: #1e1938;
    --pastel-lilac: #221b3d;
    --pastel-mint: #14241f;
    --header-bg: #221a3c;
    --header-ink: #ece8f7;
    --header-line: rgba(0, 0, 0, .5);
    --header-hover: rgba(255, 255, 255, .1);
    --header-active: rgba(255, 255, 255, .17);
    --header-border: rgba(255, 255, 255, .3);
    --img-plate: #e9e6f0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 20px -10px rgba(0, 0, 0, .75);
}

/* ---- base ------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--accent-hover);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

h1,
h2,
h3,
h4 {
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.015em;
    text-wrap: balance;
    margin: 0;
    color: var(--ink);
}

h1 {
    font-size: clamp(1.75rem, 3.6vw, 2.6rem);
    letter-spacing: -.025em;
}

h2 {
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
}

h3 {
    font-size: clamp(1.1rem, 1.9vw, 1.3rem);
}

h4 {
    font-size: 1.02rem;
}

.mono,
.spec {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    background: var(--accent);
    color: var(--accent-ink);
    padding: .6rem 1rem;
}

.skip-link:focus {
    left: 0;
}

/* ---- header / nav ----------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--header-bg);
    color: var(--header-ink);
    border-bottom: 1px solid var(--header-line);
}

.site-header a {
    color: var(--header-ink);
}

.header-inner {
    max-width: 76rem;
    margin: 0 auto;
    padding: 0 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 60px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: .55rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand b {
    font-size: 1.22rem;
    font-weight: 750;
    letter-spacing: -.02em;
}

.brand span {
    font-size: .74rem;
    opacity: .82;
    letter-spacing: .04em;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--header-border);
    border-radius: var(--radius);
    color: var(--header-ink);
    padding: .42rem .6rem;
    cursor: pointer;
    font: inherit;
    font-size: .85rem;
    align-items: center;
    gap: .45rem;
}

.nav-toggle .bars {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--header-ink);
    position: relative;
}

.nav-toggle .bars::before,
.nav-toggle .bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background: var(--header-ink);
}

.nav-toggle .bars::before {
    top: -5px;
}

.nav-toggle .bars::after {
    top: 5px;
}

.site-nav {
    margin-left: auto;
    display: flex;
    gap: .15rem;
    flex-wrap: wrap;
}

.site-nav a {
    padding: .45rem .7rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: .93rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: .93;
}

.site-nav a:hover {
    background: var(--header-hover);
    opacity: 1;
}

.site-nav a[aria-current="page"] {
    background: var(--header-active);
    opacity: 1;
    font-weight: 600;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding-bottom: .6rem;
    }

    .site-nav.open {
        display: flex;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .site-nav a {
        padding: .6rem .4rem;
        border-radius: 0;
        border-top: 1px solid var(--header-border);
    }
}

/* ---- layout ----------------------------------------------------------- */
.wrap {
    max-width: 76rem;
    margin: 0 auto;
    padding: 0 1.1rem;
}

main {
    display: block;
    padding: 1.5rem 0 4rem;
}

.crumbs {
    font-size: .84rem;
    color: var(--muted);
    padding: .9rem 0 .2rem;
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .45rem;
    align-items: center;
}

.crumbs a {
    color: var(--muted);
    text-decoration: none;
}

.crumbs a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.crumbs .sep {
    color: var(--faint);
}

.page-head {
    padding: .4rem 0 1.4rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 1.6rem;
}

.page-head p.lede {
    color: var(--muted);
    margin: .55rem 0 0;
    max-width: var(--measure);
}

.layout {
    display: grid;
    grid-template-columns: 16.5rem minmax(0, 1fr);
    gap: 2.4rem;
    align-items: start;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.4rem;
    }
}

.content {
    min-width: 0;
    /* grid children default to min-width:auto, which lets wide tables and long
       part numbers push the whole layout sideways */
}

/* ---- sidebar tree ----------------------------------------------------- */
.sidebar {
    position: sticky;
    top: 76px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: .9rem 1rem;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
}

@media (max-width: 900px) {
    .sidebar {
        position: static;
        max-height: none;
    }
}

.sidebar {
    background: var(--surface);
}

.sidebar h2 {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--faint);
    font-weight: 600;
    margin: 0 0 .6rem;
}

.tree,
.tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tree ul {
    margin-left: .7rem;
    padding-left: .55rem;
    border-left: 1px solid var(--rule-soft);
}

.tree li {
    margin: .06rem 0;
}

.tree a {
    display: block;
    padding: .26rem .4rem;
    font-size: .89rem;
    color: var(--ink-soft);
    text-decoration: none;
    border-radius: 3px;
    line-height: 1.35;
}

.tree a:hover {
    background: var(--sunken);
    color: var(--accent);
}

.tree a.current {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.tree a.ancestor {
    font-weight: 600;
    color: var(--ink);
}

/* ---- article body ----------------------------------------------------- */
.prose {
    max-width: var(--measure);
    color: var(--ink-soft);
}

.prose>*+* {
    margin-top: 1rem;
}

.prose h2,
.prose h3,
.prose h4 {
    color: var(--ink);
    margin-top: 2rem;
}

.prose h2+*,
.prose h3+*,
.prose h4+* {
    margin-top: .6rem;
}

.prose p {
    margin: 0;
}

.prose ul,
.prose ol {
    margin: 0;
    padding-left: 1.3rem;
}

.prose li+li {
    margin-top: .3rem;
}

.prose img {
    display: block;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--img-plate);
    margin: 1.4rem 0;
}

.prose a.doc-link {
    color: var(--doc);
    font-weight: 500;
}

.prose hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 1.8rem 0;
}

.prose blockquote {
    margin: 0;
    padding-left: 1rem;
    border-left: 3px solid var(--rule);
    color: var(--muted);
}

/* spec tables */
.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}

.prose table {
    border-collapse: collapse;
    width: 100%;
    font-size: .9rem;
    min-width: 30rem;
}

.prose th,
.prose td {
    text-align: left;
    padding: .55rem .8rem;
    border-bottom: 1px solid var(--rule-soft);
    vertical-align: top;
}

.prose thead th,
.prose tr:first-child th {
    background: var(--pastel-sky);
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.prose tbody tr:last-child td {
    border-bottom: none;
}

.prose tr:hover td {
    background: var(--rule-soft);
}

/* ---- cards / grids ---------------------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.card {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.card p {
    margin: 0;
    font-size: .87rem;
    color: var(--muted);
}

.card .count {
    margin-top: auto;
    padding-top: .5rem;
    font-size: .78rem;
    color: var(--faint);
}

/* section index list */
.index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.index-list li+li {
    border-top: 1px solid var(--rule-soft);
}

.index-list a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    padding: .72rem 1rem;
    text-decoration: none;
    color: var(--ink);
    font-size: .95rem;
}

.index-list a:hover {
    background: var(--pastel-sky);
    color: var(--accent);
}

.index-list .kids {
    color: var(--faint);
    font-size: .78rem;
    white-space: nowrap;
}

/* ---- news ------------------------------------------------------------- */
.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
}

.news-list li {
    background: var(--surface);
}

.news-list a {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 1rem;
    padding: .85rem 1.1rem;
    text-decoration: none;
    color: var(--ink);
}

.news-list a:hover {
    background: var(--pastel-sky);
}

.news-list time {
    color: var(--faint);
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
    padding-top: .12rem;
}

.news-list strong {
    font-weight: 550;
    font-size: .97rem;
    line-height: 1.4;
}

@media (max-width: 560px) {
    .news-list a {
        grid-template-columns: minmax(0, 1fr);
        gap: .18rem;
    }
}

.article-meta {
    color: var(--faint);
    font-size: .85rem;
    margin-top: .5rem;
}

/* ---- home ------------------------------------------------------------- */
/* The hero carries the illustration; it stays dark in both themes, so its
   own text colours are fixed rather than taken from the theme tokens. */
.hero {
    position: relative;
    background: #191234 url("../img/hero/lightning-city.jpg") center 62% / cover no-repeat;
    border-bottom: 1px solid var(--rule);
    isolation: isolate;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    /* tinted with the brand violet, and lighter than a flat scrim so the
       photograph still reads; the bolt sits right, the text sits left */
    background: linear-gradient(90deg, rgba(25, 18, 52, .84) 0%, rgba(25, 18, 52, .56) 46%, rgba(25, 18, 52, .14) 100%);
}

.hero-inner {
    position: relative;
    max-width: 76rem;
    margin: 0 auto;
    padding: clamp(3rem, 8vw, 5.5rem) 1.1rem clamp(2.6rem, 6vw, 4rem);
}

.hero h1 {
    max-width: 22ch;
    color: #fff;
}

.hero p {
    max-width: 58ch;
    color: #ddd6ee;
    font-size: clamp(1rem, 1.6vw, 1.12rem);
    margin: .9rem 0 0;
}

.hero .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .55);
}

.hero .btn-ghost:hover {
    background: rgba(255, 255, 255, .14);
    border-color: #fff;
    color: #fff;
}

@media (max-width: 640px) {
    .hero::after {
        background: rgba(25, 18, 52, .74);
    }
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.5rem;
}

.btn {
    display: inline-block;
    padding: .6rem 1.1rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: .93rem;
    font-weight: 550;
    border: 1px solid var(--accent);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--accent-ink);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
}

.btn-ghost:hover {
    background: var(--accent-soft);
}

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1px;
    background: var(--rule);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.fact {
    background: var(--pastel-sky);
    padding: 1.1rem 1.2rem;
}

.fact b {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.fact span {
    display: block;
    font-size: .82rem;
    color: var(--muted);
    margin-top: .1rem;
}

.home-section {
    padding: 2.6rem 0 .4rem;
}

.home-section h2 {
    margin-bottom: 1.1rem;
}

.section-more {
    margin-top: 1rem;
    font-size: .9rem;
}

.notice {
    background: var(--pastel-lilac);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: .9rem 1.1rem;
    font-size: .93rem;
    color: var(--ink-soft);
    margin-bottom: 1.6rem;
}

.notice a {
    font-weight: 550;
}

/* ---- footer ----------------------------------------------------------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--rule);
    margin-top: 3rem;
    padding: 2.2rem 0 2.6rem;
    font-size: .9rem;
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1.6rem;
}

.site-footer h3 {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--faint);
    font-weight: 600;
    margin-bottom: .55rem;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li {
    margin: .22rem 0;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 1.8rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--rule-soft);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.2rem;
    justify-content: space-between;
    font-size: .84rem;
    color: var(--faint);
}

/* ---- search ----------------------------------------------------------- */
.search-box {
    position: relative;
    margin-bottom: 1.4rem;
}

.search-box input {
    width: 100%;
    padding: .62rem .85rem;
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.search-box input::placeholder {
    color: var(--faint);
}

.search-box input:focus {
    border-color: var(--accent);
    outline: none;
}

#search-results {
    margin-top: .8rem;
}

.no-results {
    color: var(--muted);
    font-size: .92rem;
}

@media print {

    .site-header,
    .sidebar,
    .site-footer,
    .crumbs,
    .search-box {
        display: none;
    }

    body {
        background: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   Header controls: search panel, language switcher, theme toggle
   ========================================================================== */

.header-tools {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-shrink: 0;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--header-ink);
    padding: .38rem .5rem;
    cursor: pointer;
    font: inherit;
    font-size: .86rem;
    line-height: 1;
}

.tool-btn:hover {
    background: var(--header-hover);
}

.tool-btn[aria-expanded="true"] {
    background: var(--header-active);
}

.tool-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.tool-btn .flag {
    width: 18px;
    height: 12px;
    border-radius: 1px;
    display: block;
}

/* ---- language switcher ---- */
.lang-wrap {
    position: relative;
}

.lang-menu {
    position: absolute;
    top: calc(100% + .4rem);
    right: 0;
    min-width: 9rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .25rem;
    display: none;
    z-index: 320;
}

.lang-menu.open {
    display: block;
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .55rem;
    border-radius: 3px;
    text-decoration: none;
    color: var(--ink);
    font-size: .9rem;
}

.lang-menu a:hover {
    background: var(--sunken);
}

.lang-menu a[aria-current="true"] {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.lang-menu img {
    width: 18px;
    height: 12px;
    border-radius: 1px;
}

/* ---- search panel sliding out of the header ---- */
.search-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow);
    z-index: 310;
    overflow: hidden;
    max-height: 0;
    transition: max-height .22s ease;
}

.search-panel.open {
    max-height: min(70vh, 32rem);
}

.search-panel-inner {
    max-width: 76rem;
    margin: 0 auto;
    padding: 1rem 1.1rem 1.2rem;
    max-height: min(70vh, 32rem);
    overflow-y: auto;
}

.search-panel input {
    width: 100%;
    padding: .68rem .9rem;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: var(--ground);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.search-panel input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
}

.search-hint {
    margin: .5rem 0 0;
    font-size: .82rem;
    color: var(--faint);
}

.search-results {
    margin-top: .8rem;
}

.search-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
}

.search-results li + li {
    border-top: 1px solid var(--rule-soft);
}

.search-results a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    padding: .6rem .85rem;
    text-decoration: none;
    color: var(--ink);
    font-size: .92rem;
}

.search-results a:hover,
.search-results a:focus {
    background: var(--sunken);
    color: var(--accent);
    outline: none;
}

.search-results .sec {
    color: var(--faint);
    font-size: .76rem;
    white-space: nowrap;
}

.search-results mark {
    background: var(--accent-soft);
    color: inherit;
    padding: 0 .1em;
    border-radius: 2px;
}

/* header must anchor the absolutely-positioned panel */
.site-header {
    position: sticky;
}

.header-inner {
    position: static;
}

@media (max-width: 900px) {
    .header-tools {
        margin-left: auto;
        order: 2;
    }

    .nav-toggle {
        margin-left: 0;
        order: 3;
    }

    .site-nav {
        order: 4;
    }
}

/* ==========================================================================
   Site notice banner (the split into two specialist sites)
   ========================================================================== */

/* Hidden before first paint when the visitor has already dismissed it — the
   inline script in <head> sets this class, so the banner never flashes. */
.banner-hidden .site-banner {
    display: none;
}

.site-banner {
    background: var(--pastel-lilac);
    border-bottom: 1px solid var(--rule);
    color: var(--ink-soft);
    font-size: .92rem;
}

.site-banner-inner {
    max-width: 76rem;
    margin: 0 auto;
    padding: .7rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .9rem;
}

.site-banner p {
    margin: 0;
    flex: 1 1 auto;
    line-height: 1.5;
}

.site-banner a {
    font-weight: 550;
    white-space: nowrap;
}

.banner-actions {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-shrink: 0;
}

.banner-never {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--muted);
    font: inherit;
    font-size: .82rem;
    line-height: 1;
    padding: .42rem .85rem;
    cursor: pointer;
    white-space: nowrap;
}

.banner-never:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.banner-close {
    background: none;
    border: 1px solid transparent;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    flex-shrink: 0;
}

.banner-close:hover {
    background: var(--sunken);
    color: var(--ink);
}

.banner-close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    fill: none;
}

@media (max-width: 700px) {
    .site-banner-inner {
        flex-wrap: wrap;
        gap: .55rem;
    }

    .site-banner p {
        flex: 1 1 100%;
        order: 1;
    }

    .banner-actions {
        order: 2;
        margin-left: auto;
    }
}
