/* ==========================================================================
   layout.css  -  STRUCTURE only
   How things are arranged and sized: display, position, flex/grid, gap, width/height,
   margin, padding, overflow, alignment. Nothing decorative lives here.
   Each part keeps the order  1 base -> 2 components -> 3 utilities  so a utility can
   override a component and a component can override base.
   Pairs with style.css (prettiness). Spacing scale: 1 = 4px, 2 = 8px ... 10 = 40px (m-* goes up to 13 = 52px).
   ========================================================================== */

/*  1. Base (tags)  */

/* base styles */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

svg,
img {
    vertical-align: middle;
}

label:has(+ input[required])::after,
label:has(+ select[required])::after,
label:has(+ textarea[required])::after {
    content: " *";
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h3,
.h4,
.h5,
.h6 {
    margin: 0 0 16px 0;
}

p {
    margin: 0 0 24px 0;
}

ul,
ol {
    padding: 0;
}

li {
    margin-bottom: 1rem;
}

li:last-child {
    margin-bottom: 0;
}

/*  Content lists (inside main) get a drawn marker. .list-check has its own marker and .list-plain has none (rows of buttons/icons); both are left alone.  */

main :where(ul:not(.list-check, .list-plain)) > li {
    position: relative;
    padding-left: 1.75rem;
}

main :where(ul:not(.list-check, .list-plain)) > li::before {
    content: "";
    position: absolute;
    left: 0;
}

main :where(ul:not(.list-check, .list-plain)) > li::before {
    top: 0.3em;
    width: 1em;
    height: 1em;
}

main ol {
    padding-left: 1.5rem;
}

/*  2. Components  */

/* Card: one base, small modifiers. A modifier only adds what the base does not already define. */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.card-footer {
    padding: 1rem 1.25rem;
}

/* Thumbnail shared by every card that shows an image (service cards and blog cards) */

.img-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.img-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modifier: centred content */

.card--center > .card-body {
    align-items: center;
    text-align: center;
}

.card--corner::after {
    content: "";
    position: absolute;
    height: 30px;
    width: 30px;
    right: 0;
    bottom: 0;
}

.card--corner:hover::after {
    height: 40px;
    width: 40px;
}

.card--inset > .card-body {
    position: relative;
    z-index: 1;
    margin: 8px 8px 0;
}

/* Modifier: full-bleed image with a dark scrim (blog cards) */

.card--cover {
    isolation: isolate;
    min-height: 22rem;
}

.card--cover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
}

.card--cover > .img-thumbnail {
    position: absolute;
    inset: 0;
    z-index: -2;
    aspect-ratio: auto;
}

.card-badge {
    align-self: flex-start;
    padding: 0.4rem 0.85rem;
}

/* Stretch the title link over the whole card */

.card-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card-arrow {
    width: 2.5rem;
    height: 2.5rem;
}

/* Modifier: banner with a soft glow overlay (call-to-action) */

.card--banner {
    isolation: isolate;
}

.card--banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Hero: the section only owns its padding; the look comes from utilities (bg-pattern, text-white ...) */

.hero {
    padding-top: clamp(2.6rem, 6vw, 4rem);
    padding-bottom: clamp(2.2rem, 5vw, 3.2rem);
}

/* Add to a section that contains .glow shapes: keeps its content above them */

.has-glow > :not(.glow) {
    position: relative;
    z-index: 1;
}

/* Sections that carry a background get breathing room */

.section--filled {
    padding-block: 3rem;
}

/* Check list used inside cards */

.list-check li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.list-check li:last-child {
    margin-bottom: 0;
}

.list-check li::before {
    content: "";
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
}

.btn {
    padding: 8px 20px;
    position: relative;
    z-index: 1;
    width: fit-content;
    overflow: hidden;
}

.btn svg {
    margin-left: 8px;
}

.btn:after {
    content: "";
    position: absolute;
    z-index: -1;
    left: -20%;
    right: -20%;
    top: 0;
    bottom: 0;
}

.btn-sm {
    padding: 12px 16px;
}

.icon-md {
    width: 48px;
    height: 48px;
}

.icon-md svg {
    display: block;
}

.icon-lg {
    width: 54px;
    height: 54px;
}

.icon-lg svg {
    display: block;
}

/* Form: field wrapper, label, control (layout uses .row and .col-*). Labels never go below 14px. */

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-control {
    padding: 0.62rem 0.75rem;
}

.form-textarea {
    min-height: 120px;
}

header .header-inner nav ul {
    align-items: center;
}

header nav ul {
    display: flex;
    gap: 20px 30px;
    padding: 0;
}

.bwe-service-logo img {
    width: 200px;
}

@media (max-width: 600px) {
    .bwe-service-logo img {
        width: 150px;
    }
}

.nav .nav-menu .menu-item-has-children {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.35rem;
    row-gap: 0.15rem;
}

.nav .nav-menu .menu-item-has-children > svg {
    flex-shrink: 0;
    display: block;
    pointer-events: none;
}

.footer-links svg {
    flex-shrink: 0;
}

.nav .nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 1.25rem);
    left: 0;
    min-width: 240px;
    padding: 0.45rem;
    display: grid;
    gap: 0.2rem;
    z-index: 40;
}

.nav .nav-menu .sub-menu .menu-item {
    margin: 0;
}

.nav .nav-menu .sub-menu a {
    display: block;
    padding: 0.45rem 0.6rem;
}

.nav .nav-menu .menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 899px) {
    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 110;
        display: block;
        pointer-events: none;
    }

    html.is-nav-open {
        overflow: hidden;
    }

    html.is-nav-open .nav-backdrop {
        pointer-events: auto;
    }

    .nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: 0 !important;
        z-index: 120;
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        width: min(20rem, 86vw);
        max-width: 100%;
        height: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 1rem 1.25rem 1.5rem;
        gap: 0.75rem;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .nav-sidebar-top {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        align-self: stretch;
        width: 100%;
        flex-shrink: 0;
        margin: -0.25rem -0.35rem 0.35rem 0;
    }

    .nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
    }

    .nav .nav-menu {
        width: 100%;
        flex: 1 1 auto;
        padding: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-block: 0;
    }

    .nav .nav-menu .sub-menu {
        top: calc(100% + 0.05rem) !important;
    }

    .nav .nav-menu > .menu-item > a {
        display: inline-block;
        padding: 0.75rem 0;
    }

    .nav .nav-menu .menu-item-has-children > a {
        padding-right: 1.5rem;
    }

    .nav .nav-menu .menu-item-has-children > svg {
        position: absolute;
        right: 0;
        top: 1.05rem;
    }

    .nav .nav-menu .sub-menu {
        position: static;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0 0 0 0.75rem;
        gap: 0.08rem;
    }

    .nav .nav-menu .sub-menu a {
        padding: 0.4rem 0;
    }

    .nav .nav-menu .menu-item-has-children.showMenu > .sub-menu {
        max-height: 18rem;
        padding-bottom: 0.55rem;
    }
}

/* Social links */

ul.social-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

ul.social-wrap li a {
    display: block;
}

ul.social-wrap li a svg {
    display: block;
}

@media (max-width: 1024px) {
    .table-container {
        overflow: auto !important;
        white-space: nowrap;
    }
}

.testimonial-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.testimonial-stars svg {
    display: block;
}

.testimonial-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.testimonial-card.is-expanded .testimonial-text {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.testimonial-read-more {
    margin-top: 0.15rem;
}

.testimonial-client {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.testimonial-card .testimonial-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
}

.testimonial-client-meta .h6 {
    margin-bottom: 0.2rem;
}

.table-container {
    overflow: hidden;
}

.table-container table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

/* Top bar: two lines take turns in the same spot. The next line slides in during the same
   0.64s window the current one slides out, so the bar is never empty. */

.announcement-line {
    grid-area: 1 / 1;
}

/* Header — sticky by itself so announcement can scroll off without height jitter.
   Blur lives on ::before so backdrop-filter does not create a containing block
   that clips position:fixed mobile nav descendants. */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    min-height: 72px;
}

.nav {
    display: none;
}

.nav a:not(.btn) {
    position: relative;
    padding-block: 0.25rem;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    gap: 5px;
    height: 40px;
    width: 40px;
}

@media (min-width: 900px) {
    .nav {
        display: contents;
    }

    .nav .nav-menu {
        justify-content: center;
    }

    .nav-toggle {
        display: none;
    }

    .nav-sidebar-top,
    .nav-close,
    .nav-backdrop {
        display: none !important;
    }
}

/* Glow shapes: decorative blurred circles (.glow-1 top right, .glow-2 bottom left).
   Put both inside any positioned section (hero, banner, footer). */

.glow {
    position: absolute;
    width: 420px;
    height: 420px;
    z-index: 0;
    pointer-events: none;
}

.glow-1 {
    left: 70%;
    top: 10%;
}

.glow-2 {
    left: -120px;
    bottom: -100px;
}

/* Eyebrow: soft tinted chip led by the logo's ascending stat bars */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.9rem 0.45rem 0.75rem;
}

.eyebrow::before {
    content: "";
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

/* Data safety: image column + ruled list */

.safety-img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

@media (min-width: 992px) {
    .safety-img {
        aspect-ratio: auto;
    }
}

/* Data protected: accordions (closed = locked, open = unlocked) + side image */

.safety-acc {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .safety-acc {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.safety-acc-item .faq-summary,
.safety-acc-item .faq-answer {
    position: relative;
}

.safety-acc-item .faq-summary {
    padding: 1rem 1.25rem !important;
}

.icon-sm {
    width: 40px;
    height: 40px;
}

.icon-sm svg {
    display: block;
}

.hero-stats {
    align-items: stretch;
    gap: 28px;
    z-index: 1;
}

.hero-stat-icon {
    width: 60px;
    height: 60px;
}

.hero-stat-icon svg {
    display: block;
}

@media (min-width: 641px) {
    .hero-stats {
        gap: 40px;
    }
}

.hero-actions {
    gap: 0.75rem 1rem;
}

.featured-track {
    align-items: stretch;
    gap: 1rem;
    width: max-content;
    padding: 0.5rem 0.5rem;
}

@media (min-width: 768px) {
    .featured-track {
        gap: 1.25rem;
        padding: 0.5rem 0.625rem;
    }
}

/* Sections */

.section {
    margin-bottom: 5rem;
}

/* Text button with a round arrow */

.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
}

.btn-more svg {
    flex-shrink: 0;
    padding: 9px;
}

/* Services */

.services-grid .swiper-wrapper {
    align-items: stretch;
}

.services-grid .swiper-slide {
    height: auto;
}

.services-swiper-pagination {
    width: auto !important;
    position: static;
}

/* Round dots; the current one stretches into a pill */

.services-swiper-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 !important;
}

.services-swiper-pagination .swiper-pagination-bullet-active,
.services-swiper-pagination .swiper-pagination-bullet-active:hover {
    width: 28px;
}

.stat-icon {
    width: 56px;
    height: 56px;
}

.stat-icon--sm {
    width: 40px;
    height: 40px;
}

.stat-icon svg {
    display: block;
    flex-shrink: 0;
}

/* Why choose us: cut-out portrait standing on the section's bottom edge */

/* Read more: any element with data-lines is clamped to that many lines (see script.js) */

[data-lines] {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--lines, 3);
    line-clamp: var(--lines, 3);
    overflow: hidden;
}

[data-lines] + .testimonial-read-more {
    align-self: flex-start;
}

[data-lines].is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

/* Tools & Technologies — tabs (mobile first) */

.tools-tab-scroller {
    position: relative;
}

.tools-tablist {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tools-tablist::-webkit-scrollbar {
    display: none;
}

.tools-tablist .btn {
    flex-shrink: 0;
    white-space: nowrap;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    padding-left: 10px;
}

.tools-tab-scroller::before,
.tools-tab-scroller::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 56px;
    z-index: 1;
    pointer-events: none;
}

.tools-tab-scroller::before {
    left: 0;
}

.tools-tab-scroller::after {
    right: 0;
}

.tools-tab-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.tools-tab-nav[hidden] {
    display: none;
}

.tools-tab-nav-prev {
    left: -10px;
}

.tools-tab-nav-next {
    right: -10px;
}

.tools-panel[hidden] {
    display: none;
}

@media (min-width: 992px) {
    .tools-tab-scroller {
        height: 100%;
    }

    .tools-panels {
        height: 100%;
    }

    .tools-tablist {
        flex-direction: column;
        overflow: visible;
        padding: 0;
    }

    .tools-tablist .btn {
        width: 100%;
    }

    .tools-tab-nav,
    .tools-tab-scroller::before,
    .tools-tab-scroller::after {
        display: none;
    }
}

.tools-tool-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .tools-tool-icon {
        width: 88px;
        height: 88px;
    }
}

/* How We Work: numbered circular steps joined by curved arrows */

.step-media {
    width: 168px;
}

.step-badge {
    position: absolute;
    top: 2px;
    left: 8px;
    width: 40px;
    height: 40px;
}

.step-text {
    max-width: 34ch;
}

/* the dashed ring is its own layer so it can spin without turning the photo */

.step-media::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    pointer-events: none;
}

/* the downloaded arrow is used as a mask so it can take the theme colour;
   it is layered 3 times because the source stroke is semi-transparent */

.step-arrow {
    display: none;
    position: absolute;
    top: 73px;
    right: -42px;
    width: 84px;
    height: 31px;
}

@media (min-width: 768px) {
    .step-arrow {
        display: block;
    }
}

/* Testimonials */

.testimonial-section {
    object-fit: cover;
}

.testimonials-grid .swiper-wrapper {
    align-items: stretch;
}

.testimonials-grid .swiper-slide {
    height: auto;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary::after {
    content: "";
    flex-shrink: 0;
    margin-left: auto;
    width: 2rem;
    height: 2rem;
}

.faq-answer {
    margin-inline: 1.25rem;
}

/* Footer */

footer {
    isolation: isolate;
    padding-top: 3rem;
}

footer > .container {
    position: relative;
    z-index: 1;
}

.footer-col-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.25rem;
    height: 3px;
}

/* Hover: link slides right a few pixels and turns white */

.footer-links a {
    display: inline-block;
}

.footer-legal {
    padding-block: 1.25rem;
}

.industry-icon {
    width: 56px;
    height: 56px;
}

.industry-icon svg {
    display: block;
}

.table-container :is(th, td) {
    padding: 12px 20px;
}

/* Scroll-to-top button: fixed in the corner, shown by script.js (.is-visible) once the page is scrolled */
.scroll-top {
    position: fixed;
    right: 40px;
    bottom: 40px;
    z-index: 90;
    width: 44px;
    height: 44px;
    pointer-events: none;
}

.scroll-top.is-visible {
    pointer-events: auto;
}

/* Lists that are spaced by their own flex/grid gap opt out of the base li margin */
.nav-menu li,
.sub-menu li,
.social-wrap li {
    margin-bottom: 0;
}

/* Glassy frame around an image on a dark background */
.img-frame {
    padding: 12px;
}

/* Breadcrumb: Yoast SEO markup (class names come from the WordPress plugin, so they are not kebab-case) */
.yoast-breadcrumbs {
    margin-bottom: 1rem;
}

/* Stat chips: normal flow below lg, overlapping the image corners from lg up */
@media (min-width: 992px) {
    .stat-chip {
        position: absolute;
        z-index: 2;
    }

    .stat-chip--top {
        top: -1.5rem;
        left: -1rem;
    }

    .stat-chip--bottom {
        right: -1.5rem;
        bottom: -1.5rem;
    }
}

/* Author panel photo: the link is the positioning box for the ring, which sits 7px outside the round photo */
.author-photo {
    position: relative;
    align-self: flex-start;
}

.author-photo::before {
    content: "";
    position: absolute;
    inset: -7px;
}

/* Author panel: the details column takes the remaining width, and drops below the photo when it would get narrower than 18rem */
.author-body {
    flex: 1 1 18rem;
    min-width: 0;
}

/* Copy-link button (share bar): shows the link icon, and the green check icon for a moment after copying (.is-copied is set by script.js) */
.copy-link svg {
    display: block;
}

.copy-link .copy-link-done,
.copy-link.is-copied .copy-link-icon {
    display: none;
}

.copy-link.is-copied .copy-link-done {
    display: block;
}

/* Post meta (article header): written by, reviewed by and date in one row; from md up each item after the
   first gets room for a vertical divider (below md the items wrap, so no divider) */
@media (min-width: 768px) {
    .post-meta > * + * {
        position: relative;
        padding-left: 1rem;
    }

    /* The divider is a short line centred on the item (20% free above and below), not the full row height */
    .post-meta > * + *::before {
        content: "";
        position: absolute;
        left: 0;
        top: 20%;
        bottom: 20%;
        width: 1px;
    }
}

/* Author portrait (author page hero): keeps the square photo from growing huge on tablets; the stat chips overlap its corners from lg up */
.author-portrait {
    max-width: 24rem;
}

/* Post pagination (WordPress markup): centred row of round page links */
.post-pagination {
    margin-top: 3rem;
}

.post-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.post-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 2.75rem;
    padding-inline: 0.75rem;
}

/* Blog content: the article body uses plain elements only (no classes, ids or attributes), so every rule
   below is a descendant of .blog-content. Allowed: figure > img, table, ul, ol, li, strong, headings,
   details/summary (FAQ), blockquote, plus p and a for text. */

.blog-content figure {
    margin: 0 0 2rem;
}

/* Headings jumped to from the table of contents stay clear of the sticky site header */
.blog-content :is(h2, h3) {
    scroll-margin-top: 6rem;
}

.blog-content :is(ul, ol) {
    margin: 0 0 1.5rem;
}

.blog-content table {
    width: 100%;
    margin-bottom: 2rem;
    border-collapse: separate;
    border-spacing: 0;
}

.blog-content :is(th, td) {
    padding: 12px 20px;
    text-align: left;
}

@media (max-width: 575px) {
    .blog-content :is(th, td) {
        padding: 10px 8px;
    }
}

/* Blockquote: one note box for everything inside it (no rules tied to a heading, paragraph or link inside) */
.blog-content blockquote {
    position: relative;
    margin: 0 0 1.5rem;
    padding: 1.25rem 4.5rem 1.25rem 1.5rem;
}

/* Corner icon: sits in the space reserved by the right padding, never blocks clicks on the text or links */
.blog-content blockquote::after {
    content: "";
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 3rem;
    height: 3rem;
    pointer-events: none;
}

@media (max-width: 575px) {
    .blog-content blockquote {
        padding-right: 3.5rem;
    }

    .blog-content blockquote::after {
        right: 0.75rem;
        bottom: 0.75rem;
        width: 2rem;
        height: 2rem;
    }
}

.blog-content blockquote > :last-child {
    margin-bottom: 0;
}

/* FAQ accordion: native details/summary */
.blog-content details {
    margin-bottom: 1rem;
}

.blog-content summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.blog-content summary::-webkit-details-marker {
    display: none;
}

.blog-content summary::after {
    content: "";
    flex-shrink: 0;
    margin-left: auto;
    width: 2rem;
    height: 2rem;
}

.blog-content summary + * {
    margin-top: 0;
    padding-top: 1rem;
}

.blog-content details > :not(summary) {
    margin-inline: 1.25rem;
}

.blog-content details > :last-child {
    margin-bottom: 1.25rem;
}

/* Table of contents: a details panel. The summary holds an icon badge, the title and a chevron; the list below is a
   timeline (a rail made by each link's left border, with a dot on it). A nested list is indented through its links. */
.toc-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.toc-summary::-webkit-details-marker {
    display: none;
}

.toc-summary::before {
    content: "";
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
}

.toc-summary::after {
    content: "";
    flex-shrink: 0;
    margin-left: auto;
    width: 1.25rem;
    height: 1.25rem;
}

.toc-nav {
    padding: 1rem 1.25rem 1.25rem 1.5rem;
}

/* The column is sticky from lg up (6rem below the top). The list is capped at 26rem, and on short screens at 100vh minus
   the sticky offset (6rem), a bottom gap (2rem), the summary (4.25rem) with its borders, and the share card under the
   panel (about 8.5rem), so panel + share card always fit in the viewport. */
@media (min-width: 992px) {
    .toc-nav {
        max-height: min(26rem, calc(100vh - 21rem));
        overflow-y: auto;
    }
}

.toc,
.toc-sub {
    margin: 0;
}

.toc li {
    margin-bottom: 0;
}

.toc-link {
    position: relative;
    display: block;
    padding: 0.4rem 0 0.4rem 1.25rem;
}

.toc-link::before {
    content: "";
    position: absolute;
    top: calc(50% - 5px);
    left: -6px;
    width: 10px;
    height: 10px;
}

.toc-sub .toc-link {
    padding-left: 2.25rem;
}

.toc-sub .toc-link::before {
    top: calc(50% - 3px);
    left: -4px;
    width: 6px;
    height: 6px;
}

/*  3. Utilities  */

/* --------------------------------------------------------------------------
   Grid: container, row, columns, gutters
   -------------------------------------------------------------------------- */

.container {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    width: 100%;
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-right: auto;
    margin-left: auto;
}

.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--bs-gutter-y));
    margin-right: calc(-0.5 * var(--bs-gutter-x));
    margin-left: calc(-0.5 * var(--bs-gutter-x));
}

.row > * {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

.g-2 {
    --bs-gutter-y: 16px;
}

.g-4 {
    --bs-gutter-y: 20px;
}

.g-8 {
    --bs-gutter-y: 32px;
}

@media (min-width: 992px) {
    .gx-lg-8 {
        --bs-gutter-x: 32px;
    }
}

.gx-0 {
    --bs-gutter-x: 0px;
}

.col-6 {
    width: 50%;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }

    .col-md-4 {
        width: 33.333333%;
    }

    .col-md-6 {
        width: 50%;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }

    .col-lg-2 {
        width: 16.66666667%;
    }

    .col-lg-3 {
        width: 25%;
    }

    .col-lg-4 {
        width: 33.33333333%;
    }

    .col-lg-5 {
        width: 41.66666667%;
    }

    .col-lg-6 {
        width: 50%;
    }

    .col-lg-7 {
        width: 58.33333333%;
    }

    .col-lg-8 {
        width: 66.66666667%;
    }

    .col-lg-9 {
        width: 75%;
    }

    .col-lg-12 {
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .col-xl-3 {
        width: 25%;
    }

    .col-xl-4 {
        width: 33.33333333%;
    }

    .col-xl-6 {
        width: 50%;
    }

    .col-xl-9 {
        width: 75%;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* --------------------------------------------------------------------------
   Display, position, overflow
   -------------------------------------------------------------------------- */

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

.d-grid {
    display: grid !important;
}

.position-relative {
    position: relative !important;
}

/* Sticks below the sticky site header while the page scrolls (from lg up). The row needs align-items-start. */
@media (min-width: 992px) {
    .sticky-lg-top {
        position: sticky !important;
        top: 6rem !important;
    }
}

.overflow-hidden {
    overflow: hidden !important;
}

@media (min-width: 768px) {
    .d-md-block {
        display: block !important;
    }

    .d-md-none {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }

    .d-lg-block {
        display: block !important;
    }

    .d-lg-flex {
        display: flex !important;
    }
}

/* --------------------------------------------------------------------------
   Flex alignment
   -------------------------------------------------------------------------- */

.flex-column {
    flex-direction: column !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.flex-shrink-0 {
    flex-shrink: 0 !important;
}

.justify-content-start {
    justify-content: start !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-start {
    align-items: start !important;
}

.align-items-center {
    align-items: center !important;
}

.align-items-end {
    align-items: end !important;
}

.order-1 {
    order: 1 !important;
}

.order-2 {
    order: 2 !important;
}

@media (min-width: 992px) {
    .order-lg-1 {
        order: 1 !important;
    }

    .order-lg-2 {
        order: 2 !important;
    }
}

@media (min-width: 992px) {
    .justify-content-lg-end {
        justify-content: end !important;
    }
}

/* --------------------------------------------------------------------------
   Sizing and media
   -------------------------------------------------------------------------- */

.w-100 {
    width: 100% !important;
}

.h-100 {
    height: 100% !important;
}

.ratio-1x1 {
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
}

/* --------------------------------------------------------------------------
   Spacing
   -------------------------------------------------------------------------- */

/* All-sides margin, m-0 to m-13 (4px per step). Defined before mx-auto, mt-* and mb-* so those override it. */

.m-0 {
    margin: 0 !important;
}

.m-1 {
    margin: 4px !important;
}

.m-2 {
    margin: 8px !important;
}

.m-3 {
    margin: 12px !important;
}

.m-4 {
    margin: 16px !important;
}

.m-5 {
    margin: 20px !important;
}

.m-6 {
    margin: 24px !important;
}

.m-7 {
    margin: 28px !important;
}

.m-8 {
    margin: 32px !important;
}

.m-9 {
    margin: 36px !important;
}

.m-10 {
    margin: 40px !important;
}

.m-11 {
    margin: 44px !important;
}

.m-12 {
    margin: 48px !important;
}

.m-13 {
    margin: 52px !important;
}

.mx-auto {
    margin-inline: auto !important;
}

.mt-auto {
    margin-top: auto !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 4px !important;
}

.mt-3 {
    margin-top: 12px !important;
}

.mt-6 {
    margin-top: 24px !important;
}

.mt-8 {
    margin-top: 32px !important;
}

.mt-10 {
    margin-top: 40px !important;
}

.mt-11 {
    margin-top: 44px !important;
}

.mt-12 {
    margin-top: 48px !important;
}

.mt-13 {
    margin-top: 52px !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 4px !important;
}

.mb-2 {
    margin-bottom: 8px !important;
}

.mb-3 {
    margin-bottom: 12px !important;
}

.mb-4 {
    margin-bottom: 16px !important;
}

.mb-5 {
    margin-bottom: 20px !important;
}

.mb-6 {
    margin-bottom: 24px !important;
}

.mb-8 {
    margin-bottom: 32px !important;
}

.mb-10 {
    margin-bottom: 40px !important;
}

.mb-11 {
    margin-bottom: 44px !important;
}

.mb-12 {
    margin-bottom: 48px !important;
}

.mb-13 {
    margin-bottom: 52px !important;
}

.p-0 {
    padding: 0 !important;
}

.p-2 {
    padding: 8px !important;
}

.p-3 {
    padding: 12px !important;
}

.p-4 {
    padding: 16px !important;
}

.p-5 {
    padding: 20px !important;
}

.p-6 {
    padding: 24px !important;
}

.p-8 {
    padding: 32px !important;
}

.px-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.pt-0 {
    padding-top: 0 !important;
}

.pt-4 {
    padding-top: 16px !important;
}

.pt-5 {
    padding-top: 20px !important;
}

.pb-0 {
    padding-bottom: 0 !important;
}

.pb-3 {
    padding-bottom: 12px !important;
}

.pb-5 {
    padding-bottom: 20px !important;
}

.pb-10 {
    padding-bottom: 40px !important;
}

.gap-1 {
    gap: 4px !important;
}

.gap-2 {
    gap: 8px !important;
}

.gap-3 {
    gap: 12px !important;
}

.gap-4 {
    gap: 16px !important;
}

.gap-5 {
    gap: 20px !important;
}

@media (min-width: 768px) {
    .p-md-8 {
        padding: 32px !important;
    }
}

@media (min-width: 992px) {
    .mb-lg-0 {
        margin-bottom: 0 !important;
    }
}

.text-start {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.line-clamp-2 {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    overflow: hidden !important;
}

.line-clamp-3 {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    overflow: hidden !important;
}


/* Author page: two-column bio + profile card */
.author-page .author-follow {
    display: flex;
    flex-direction: column;
}

.author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 992px) {
    .author-card {
        margin-right: 0;
    }
}

.author-card-photo {
    display: flex;
    justify-content: center;
    width: 100%;
}

.author-card-photo img,
.author-card-avatar {
    display: block;
    width: 10rem;
    height: 10rem;
    max-width: 100%;
    object-fit: cover;
}

.author-bio p + p {
    margin-top: 1rem;
}

.special-page-image {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

.special-page-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 16rem;
}
