:root {
    --colour-bg: #171717;
    --colour-bg-soft: #0d0d0d;
    --colour-bg-card: #111111;
    --colour-text: #ffffff;
    --colour-text-soft: rgba(255, 255, 255, 0.78);
    --colour-border: rgba(255, 255, 255, 0.1);
    --colour-highlight: #f4d01a;

    --header-height: 78px;
    --header-height-expanded: calc(var(--header-height) + 4rem);

    --site-max-width: 1240px;
    --site-gutter: 2rem;
    --content-width: 760px;
}

/* Base */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    /* Ghost's own font picker (Settings > Design, or Labs on older versions)
       sets --gh-font-body when the site owner picks one - this fallback is
       what renders until/unless they do. */
    font-family: var(--gh-font-body, 'Manrope', Arial, sans-serif);
    line-height: 1.6;
    background: var(--colour-bg);
    color: var(--colour-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--gh-font-heading, 'Manrope', Arial, sans-serif);
    font-weight: 700;
}

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

a {
    color: var(--colour-highlight);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: #fff;
}

.site-header-inner,
.site-footer-inner,
.post-feed-inner,
.article,
.hero-content,
.post-hero-content {
    width: min(var(--site-max-width), calc(100% - 2rem));
    margin: 0 auto;
}

.site-main {
    min-height: 100vh;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: var(--header-height);
    background: #000;
    border-bottom: 1px solid var(--colour-border);
    transition: background-color 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

body.is-home .site-header,
.post-template .site-header,
.page-template .site-header,
.tag-template .site-header,
.author-template .site-header {
    background: transparent;
    border-bottom-color: transparent;
}

body.is-home .site-header.is-scrolled,
.post-template .site-header.is-scrolled,
.page-template .site-header.is-scrolled,
.tag-template .site-header.is-scrolled,
.author-template .site-header.is-scrolled,
.site-header.is-nav-open {
    background: rgba(0, 0, 0, 0.96);
    border-bottom-color: var(--colour-border);
    backdrop-filter: blur(10px);
}

.site-header-inner {
    min-height: var(--header-height-expanded);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 4rem 0 1rem;
    transition: min-height 0.25s ease, padding 0.25s ease;
}

.site-header.is-scrolled .site-header-inner,
.site-header.is-nav-open .site-header-inner {
    min-height: var(--header-height);
    padding: 0.6rem 0;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: #fff;
}

.site-logo img {
    max-height: 44px;
    width: auto;
    transition: transform 0.25s ease;
}

.site-header.is-scrolled .site-logo img,
.site-header.is-nav-open .site-logo img {
    transform: scale(0.75);
}

.site-title-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #fff;
}

/* Main navigation */

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    margin-left: auto;
}

.site-nav .nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav .nav > li {
    margin: 0;
    padding: 0;
}

.site-nav .nav > li > a {
    position: relative;
    display: inline-block;
    padding: 0.35rem 0;
    color: #fff;
    opacity: 0.9;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: opacity 0.2s ease, text-shadow 0.2s ease;
}

.site-nav .nav > li > a:hover {
    color: #fff;
    opacity: 0.65;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.site-nav .nav > li.nav-current > a,
.site-nav .nav > li > a[aria-current="page"] {
    color: #fff;
    opacity: 1;
}

.site-nav .nav > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.site-nav .nav > li > a:hover::after,
.site-nav .nav > li.nav-current > a::after,
.site-nav .nav > li > a[aria-current="page"]::after {
    transform: scaleX(1);
}

/* Nav toggle */

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-toggle-line {
    display: block;
    width: 1.4rem;
    height: 2px;
    margin: 0 auto;
    background: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open .nav-toggle-line:nth-child(1) {
    transform: translateY(0.45rem) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open .nav-toggle-line:nth-child(3) {
    transform: translateY(-0.45rem) rotate(-45deg);
}

/* Shared tags */

.hero-tags,
.post-card-tags,
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hero-tag {
    display: inline-block;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
    color: var(--colour-highlight);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.hero-tag:hover {
    color: #fff;
    border-color: #fff;
}

.hero-tag-secondary {
    color: rgba(255, 255, 255, 0.7);
    opacity: 0.9;
}

.hero-tag-secondary:hover {
    color: #fff;
    opacity: 1;
}

/* Homepage hero */

.hero-carousel {
    position: relative;
    min-height: 100vh;
    margin-top: calc(var(--header-height-expanded) * -1);
    overflow: hidden;
    background: #000;
}

.hero-carousel-track {
    display: flex;
    will-change: transform;
}

.hero-slide {
    position: relative;
    flex: 0 0 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

/* The slide/pan animation itself is driven entirely by the Web Animations
   API in home.js (see there for why) - this is just the static box the
   animated background-image sits in. */
.hero-slide-bg {
    position: absolute;
    z-index: 0;
    top: 0;
    left: -10%;
    width: 120%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    will-change: transform;
}

.hero-overlay {
    position: absolute;
    z-index: 1;
    inset: 0;
    transform: translateZ(0);
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.62) 45%,
            rgba(0, 0, 0, 0.42) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    transform: translateZ(0);
    padding: calc(var(--header-height-expanded) + 3rem) 0 4rem;
    color: #fff;
}

.hero-tags {
    margin-bottom: 1rem;
}

.hero-title {
    margin: 0 0 1rem;
    max-width: 12ch;
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    line-height: 1.02;
}

.hero-title a {
    color: #fff;
}

.hero-title a:hover {
    color: var(--colour-highlight);
}

.hero-excerpt {
    max-width: 44rem;
    margin: 0 0 1rem;
    color: var(--colour-text-soft);
    font-size: 1.05rem;
}

.hero-button {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.9rem 1.25rem;
    border: 1px solid var(--colour-highlight);
    color: var(--colour-highlight);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-button:hover {
    background: var(--colour-highlight);
    color: #000;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 1.75rem;
    z-index: 3;
    display: flex;
    gap: 0.55rem;
    transform: translateX(-50%);
}

.hero-dot {
    appearance: none;
    border: 0;
    cursor: pointer;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    background: var(--colour-highlight);
}

/* Post hero */

.post-hero {
    position: relative;
    overflow: hidden;
    margin-top: calc(var(--header-height-expanded) * -1);
    height: 45vh;
    min-height: 20rem;
    display: flex;
    align-items: flex-end;
    background: var(--colour-bg-soft);
}

.post-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
}

.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            160deg,
            rgba(23, 23, 23, 0.96) 0%,
            rgba(13, 13, 13, 0.9) 40%,
            rgba(244, 208, 26, 0.22) 100%
    );
}

.post-hero.has-image .post-hero-overlay {
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.62) 45%,
            rgba(0, 0, 0, 0.42) 100%
    );
}

.post-hero-inner {
    position: relative;
    z-index: 2;
    width: min(var(--site-max-width), calc(100% - 2rem));
    margin: 0 auto;
    padding: var(--header-height-expanded) 0 3rem;
}

/* Homepage feed */

.post-feed {
    padding: 4rem 0;
    background: var(--colour-bg);
}

.post-feed-inner,
.tag-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.post-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    border: 1px solid var(--colour-border);
    background: var(--colour-bg-card);
}

/* Cards fade in as they're scrolled into view (see home.js). Scoped to
   .has-scroll-reveal so a card is never stuck invisible if JS doesn't run. */
.has-scroll-reveal .post-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.has-scroll-reveal .post-card.is-visible {
    opacity: 1;
    transform: none;
}

/* The card's content (tag, title, excerpt, CTA) settles in just after the
   card itself, each piece slightly behind the last, rather than the whole
   card appearing as one flat block. Works across every card variant since
   it only relies on being a direct child of .post-card-content. */
.has-scroll-reveal .post-card-content > * {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.has-scroll-reveal .post-card.is-visible .post-card-content > * {
    opacity: 1;
    transform: none;
}

.has-scroll-reveal .post-card-content > *:nth-child(1) { transition-delay: 0.35s; }
.has-scroll-reveal .post-card-content > *:nth-child(2) { transition-delay: 0.43s; }
.has-scroll-reveal .post-card-content > *:nth-child(3) { transition-delay: 0.51s; }
.has-scroll-reveal .post-card-content > *:nth-child(4) { transition-delay: 0.59s; }

/* Every card carries the same content now, so size is purely a function of
   position: each group of 4 cards forms two rows, a wide card (spanning 2
   columns) then a narrow one, then flipped - narrow then wide. Structural
   selectors, not a class tied to a specific Handlebars loop, so this applies
   identically wherever .post-card is used and to cards added later by
   "load more"/infinite scroll without any extra markup or JS bookkeeping. */
.post-card:nth-child(4n+1),
.post-card:nth-child(4n+2),
.post-card:nth-child(4n+3),
.post-card:nth-child(4n) {
    min-height: 420px;
}

.post-card:nth-child(4n+1) {
    grid-column: 1 / span 2;
}

.post-card:nth-child(4n) {
    grid-column: 2 / span 2;
}

.post-card-media-link {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    min-height: inherit;
    overflow: hidden;
    color: #fff;
    background-color: #000;
    background-size: cover;
    background-position: center center;
}

.post-card-media-link:hover {
    color: #fff;
}

.post-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.90) 0%,
            rgba(0, 0, 0, 0.66) 45%,
            rgba(0, 0, 0, 0.42) 100%
    );
    transition: background 0.2s ease;
}

.post-card:hover .post-card-overlay,
.post-card-media-link:hover .post-card-overlay {
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.82) 0%,
            rgba(0, 0, 0, 0.56) 45%,
            rgba(0, 0, 0, 0.34) 100%
    );
}

/* Marks a post flagged as featured in Ghost - sits in the top corner, clear
   of the tags/title/excerpt/CTA which all live at the bottom of the card. */
.post-card-featured-badge {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    width: 54px;
    height: 54px;
    background: var(--colour-highlight);
    color: #171717;
    clip-path: polygon(100% 0, 100% 100%, 0 0);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.post-card-featured-badge svg {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 14px;
    height: 14px;
}

.post-card-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 1.5rem;
}

.post-card-tags {
    margin: 0 0 0.7rem;
}

/* Base (narrow, 1-column) sizing - every card shows the same content, but
   type is scaled down a little in the narrow slots so it stays proportional
   to the column width instead of the wide-slot size looking oversized. */
.post-card-title {
    margin: 0 0 0.6rem;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1.15;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.post-card-title a {
    color: #fff;
}

.post-card-title a:hover {
    color: var(--colour-highlight);
}

.post-card-excerpt {
    display: block;
    max-width: 42rem;
    margin: 0 0 1rem;
    font-size: 0.92rem;
    color: var(--colour-text-soft);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.post-card:nth-child(4n+1) .post-card-title,
.post-card:nth-child(4n) .post-card-title {
    margin-bottom: 0.85rem;
    font-size: clamp(1.8rem, 2.4vw, 2.7rem);
}

.post-card:nth-child(4n+1) .post-card-excerpt,
.post-card:nth-child(4n) .post-card-excerpt {
    font-size: 1rem;
}

.post-card-cta {
    display: inline-block;
    margin-top: 0.9rem;
    color: var(--colour-highlight);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.post-card-cta:hover {
    color: #fff;
}

/* Article */

.article {
    width: min(var(--content-width), calc(100% - 2rem));
    padding: var(--header-height) 0 4rem;
}

.post-hero + .article {
    width: min(var(--site-max-width), calc(100% - 2rem));
    padding-top: 4rem;
}

.article-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-date {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.9rem;
    white-space: nowrap;
}

.article-title {
    margin: 0 0 2rem;
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 1.05;
}

.article-content {
    max-width: var(--content-width);
    margin: 0 auto;
    color: var(--colour-text);
}

.article-content a {
    color: var(--colour-highlight);
}

.article-content a:hover {
    color: #fff;
}

.article-content blockquote {
    margin: 2rem 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--colour-highlight);
    color: var(--colour-text-soft);
}

.article-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--colour-border);
}

/* Koenig content */

.article-content .kg-image-card,
.article-content .kg-gallery-card,
.article-content .kg-embed-card,
.article-content .kg-video-card {
    margin: 2rem 0;
}

/* Embeds (YouTube, Vimeo, etc.) come out of Ghost with a fixed, often tiny
   width/height on the iframe itself. Wrap it (see home.js) in a box sized to
   the embed's own aspect ratio so it scales with the article width instead. */
.article-content .kg-embed-responsive {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.article-content .kg-embed-responsive iframe,
.article-content .kg-embed-responsive object,
.article-content .kg-embed-responsive embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.article-content .kg-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.article-content .kg-width-wide {
    width: min(100%, calc(var(--content-width) + 14rem));
    max-width: calc(100vw - 2rem);
    margin-left: 50%;
    transform: translateX(-50%);
}

.article-content .kg-width-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.article-content .kg-width-wide .kg-image,
.article-content .kg-width-full .kg-image {
    width: 100%;
}

.article-content figcaption {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.9rem;
    text-align: center;
}

/* Tables - some are used as plain data tables, others as a layout hack with
   inline widths/borders (which take priority over these base rules). Wrapped
   in .table-scroll by home.js so a wide table scrolls instead of overflowing. */
.article-content .table-scroll {
    margin: 2rem 0;
    overflow-x: auto;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 0.6rem 0.9rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--colour-border);
}

.article-content th {
    color: #fff;
    font-weight: 700;
}

/* Gallery card */

.article-content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.article-content .kg-gallery-row {
    display: flex;
    height: 22rem;
    gap: 0.5rem;
}

.article-content .kg-gallery-image {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
}

.article-content .kg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Button card */

.article-content .kg-button-card {
    display: flex;
    margin: 2rem 0;
}

.article-content .kg-button-card.kg-align-center {
    justify-content: center;
}

.article-content .kg-btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border: 1px solid var(--colour-highlight);
    border-radius: 999px;
    color: var(--colour-highlight);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.article-content .kg-btn:hover {
    background: var(--colour-highlight);
    color: #111;
}

.article-content .kg-btn-accent {
    background: var(--colour-highlight);
    color: #111;
}

.article-content .kg-btn-accent:hover {
    background: #fff;
    border-color: #fff;
}

/* Bookmark card */

.article-content .kg-bookmark-card {
    margin: 2rem 0;
}

.article-content .kg-bookmark-container {
    display: flex;
    min-height: 8.5rem;
    border: 1px solid var(--colour-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--colour-bg-card);
    color: inherit;
}

.article-content .kg-bookmark-container:hover {
    border-color: var(--colour-highlight);
}

.article-content .kg-bookmark-content {
    flex: 1 1 60%;
    min-width: 0;
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-content .kg-bookmark-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}

.article-content .kg-bookmark-description {
    margin-top: 0.4rem;
    color: var(--colour-text-soft);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-content .kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
    color: var(--colour-text-soft);
    font-size: 0.8rem;
}

.article-content .kg-bookmark-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.article-content .kg-bookmark-thumbnail {
    position: relative;
    flex: 0 0 33%;
    min-width: 8rem;
}

.article-content .kg-bookmark-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Audio / video cards - the play/pause, seek and volume controls are wired
   up in home.js since Ghost ships only the markup, not the behaviour. */

.article-content .kg-audio-card,
.article-content .kg-video-card {
    margin: 2rem 0;
    border: 1px solid var(--colour-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--colour-bg-card);
}

.article-content .kg-audio-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
}

.article-content .kg-audio-thumbnail {
    flex: none;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 6px;
    object-fit: cover;
}

.article-content .kg-audio-thumbnail.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
}

.article-content .kg-audio-thumbnail.placeholder svg {
    width: 1.25rem;
    fill: var(--colour-text-soft);
}

.article-content .kg-audio-player-container {
    flex: 1;
    min-width: 0;
}

.article-content .kg-audio-title {
    margin-bottom: 0.35rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.article-content .kg-video-container {
    position: relative;
}

.article-content .kg-video-container video {
    display: block;
    width: 100%;
    height: auto;
}

.article-content .kg-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.article-content .kg-video-large-play-icon {
    width: 4rem;
    height: 4rem;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-content .kg-video-large-play-icon svg {
    width: 1.4rem;
    fill: #fff;
}

.article-content .kg-video-player-container {
    padding: 0.6rem 1rem;
}

.article-content .kg-audio-player,
.article-content .kg-video-player {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.article-content .kg-audio-player button,
.article-content .kg-video-player button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: none;
    color: var(--colour-text);
    cursor: pointer;
}

.article-content .kg-audio-play-icon svg,
.article-content .kg-audio-pause-icon svg,
.article-content .kg-video-play-icon svg,
.article-content .kg-video-pause-icon svg {
    width: 0.85rem;
    fill: #fff;
}

.article-content .kg-audio-unmute-icon svg,
.article-content .kg-audio-mute-icon svg,
.article-content .kg-video-unmute-icon svg,
.article-content .kg-video-mute-icon svg {
    width: 1rem;
    fill: var(--colour-text-soft);
}

.article-content .kg-audio-playback-rate,
.article-content .kg-video-playback-rate {
    padding: 0.15rem 0.4rem !important;
    border: 1px solid var(--colour-border) !important;
    border-radius: 4px;
    color: var(--colour-text-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.article-content .kg-audio-current-time,
.article-content .kg-audio-time,
.article-content .kg-video-current-time,
.article-content .kg-video-time {
    color: var(--colour-text-soft);
    font-size: 0.8rem;
    white-space: nowrap;
}

.article-content .kg-audio-seek-slider,
.article-content .kg-audio-volume-slider,
.article-content .kg-video-seek-slider,
.article-content .kg-video-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--colour-border);
    cursor: pointer;
}

.article-content .kg-audio-seek-slider,
.article-content .kg-video-seek-slider {
    flex: 1 1 8rem;
    min-width: 4rem;
}

.article-content .kg-audio-volume-slider,
.article-content .kg-video-volume-slider {
    width: 4.5rem;
}

.article-content .kg-audio-seek-slider::-webkit-slider-thumb,
.article-content .kg-audio-volume-slider::-webkit-slider-thumb,
.article-content .kg-video-seek-slider::-webkit-slider-thumb,
.article-content .kg-video-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--colour-highlight);
    cursor: pointer;
}

.article-content .kg-audio-seek-slider::-moz-range-thumb,
.article-content .kg-audio-volume-slider::-moz-range-thumb,
.article-content .kg-video-seek-slider::-moz-range-thumb,
.article-content .kg-video-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: var(--colour-highlight);
    cursor: pointer;
}

.article-content .kg-audio-hide,
.article-content .kg-video-hide {
    display: none !important;
}

/* Spec grid — for custom HTML cards grouping several short lists side by side,
   e.g. equipment/spec lists on service pages. Markup:
   <div class="spec-grid">
     <div class="spec-column"><h3>Heading</h3><ul><li>...</li></ul></div>
   </div> */

.article-content .spec-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.article-content .spec-column {
    padding: 1.5rem;
    border: 1px solid var(--colour-border);
    background: var(--colour-bg-card);
}

.article-content .spec-column h3 {
    margin: 0 0 1rem;
    color: var(--colour-highlight);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-content .spec-column ul {
    margin: 0;
    padding-left: 1.1rem;
}

.article-content .spec-column li {
    margin-bottom: 0.5rem;
    color: var(--colour-text-soft);
    font-size: 0.92rem;
}

.article-content .spec-column li:last-child {
    margin-bottom: 0;
}

.has-scroll-reveal .spec-column {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.has-scroll-reveal .spec-column.is-visible {
    opacity: 1;
    transform: none;
}

.has-scroll-reveal .spec-column:nth-child(2) {
    transition-delay: 0.1s;
}

.has-scroll-reveal .spec-column:nth-child(3) {
    transition-delay: 0.2s;
}

/* Related posts */

.related-posts {
    padding: 4rem 0 5rem;
    background: var(--colour-bg);
    border-top: 1px solid var(--colour-border);
}

.related-posts-inner {
    width: min(var(--site-max-width), calc(100% - 2rem));
    margin: 0 auto;
}

.related-posts-title {
    margin: 0 0 2rem;
    color: #fff;
    font-size: 1.6rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.related-posts-grid .post-card,
.related-posts-grid .post-card:nth-child(4n+1),
.related-posts-grid .post-card:nth-child(4n+2),
.related-posts-grid .post-card:nth-child(4n+3),
.related-posts-grid .post-card:nth-child(4n) {
    grid-column: auto;
    min-height: 320px;
}

.related-posts-grid .post-card-title,
.related-posts-grid .post-card:nth-child(4n+1) .post-card-title,
.related-posts-grid .post-card:nth-child(4n) .post-card-title {
    font-size: 1.4rem;
}

.related-posts-grid .post-card-excerpt,
.related-posts-grid .post-card:nth-child(4n+1) .post-card-excerpt,
.related-posts-grid .post-card:nth-child(4n) .post-card-excerpt {
    font-size: 0.92rem;
}

/* Tag page */

.tag-hero {
    position: relative;
    overflow: hidden;
    margin-top: calc(var(--header-height-expanded) * -1);
    height: 45vh;
    min-height: 20rem;
    display: flex;
    align-items: flex-end;
    background: var(--colour-bg-soft);
}

.tag-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
}

.tag-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            160deg,
            rgba(23, 23, 23, 0.96) 0%,
            rgba(13, 13, 13, 0.9) 40%,
            rgba(244, 208, 26, 0.22) 100%
    );
}

.tag-hero.has-image .tag-hero-overlay {
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.62) 45%,
            rgba(0, 0, 0, 0.42) 100%
    );
}

.tag-hero-inner {
    position: relative;
    z-index: 2;
    width: min(var(--site-max-width), calc(100% - 2rem));
    margin: 0 auto;
    padding: var(--header-height-expanded) 0 3rem;
}

.tag-description {
    max-width: 42rem;
    margin: 0;
    color: var(--colour-text-soft);
    font-size: 1.05rem;
}

/* 404 page */

.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.error-content {
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: 4rem;
}

.error-text {
    max-width: 38rem;
    margin: 0 0 2rem;
    color: var(--colour-text-soft);
    font-size: 1.05rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Footer */

.site-footer {
    padding: 1.5rem 0 2rem;
    border-top: 1px solid var(--colour-border);
    background: #000;
    color: var(--colour-text-soft);
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    text-align: left;
}

.site-footer-nav {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-footer-nav .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.75rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-nav .nav > li {
    margin: 0;
    padding: 0;
}

.site-footer-nav .nav > li > a {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-footer-nav .nav > li > a:hover,
.site-footer-nav .nav > li.nav-current > a,
.site-footer-nav .nav > li > a[aria-current="page"] {
    color: #fff;
}

.site-footer-copy {
    margin: 0;
    white-space: nowrap;
}

/* Load more */

.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.load-more-button {
    display: inline-block;
    padding: 0.9rem 1.25rem;
    border: 1px solid var(--colour-highlight);
    background: transparent;
    color: var(--colour-highlight);
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.load-more-button:hover {
    background: var(--colour-highlight);
    color: #000;
}

.load-more-button:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Mobile */

@media (max-width: 900px) {
    .site-header {
        height: auto;
    }

    .site-header-inner {
        min-height: var(--header-height);
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 1rem;
        padding: 0.8rem 0;
    }

    .site-logo {
        grid-column: 1;
    }

    .nav-toggle {
        display: inline-flex;
        grid-column: 2;
        justify-self: end;
    }

    .site-nav {
        display: none;
        width: 100%;
        grid-column: 1 / -1;
        justify-content: flex-start;
        margin-left: 0;
        padding-top: 0.5rem;
    }

    .site-nav.is-open {
        display: flex;
        padding-top: 0.75rem;
    }

    .site-nav .nav {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.9rem;
    }

    .site-nav.is-open .nav {
        padding: 1rem;
        border: 1px solid var(--colour-border);
        background: rgba(0, 0, 0, 0.92);
    }

    .site-nav .nav > li > a {
        font-size: 0.95rem;
    }

    .hero-carousel,
    .hero-slide {
        min-height: 100vh;
    }

    .hero-content {
        padding-top: calc(var(--header-height) + 4rem);
    }

    .hero-title {
        max-width: 100%;
    }

    .post-hero {
        height: 38vh;
        min-height: 16rem;
    }

    .tag-hero {
        height: 38vh;
        min-height: 16rem;
    }

    .post-hero-inner,
    .tag-hero-inner {
        padding-bottom: 0.75rem;
    }

    .post-hero .article-meta-row,
    .tag-hero .article-meta-row {
        gap: 0.6rem;
        margin-bottom: 0.5rem;
    }

    .post-hero .article-title,
    .tag-hero .article-title {
        margin-bottom: 0.4rem;
        font-size: 1.85rem;
    }

    .tag-hero .tag-description {
        font-size: 0.9rem;
    }

    .post-feed-inner,
    .tag-feed,
    .related-posts-grid,
    .article-content .spec-grid {
        grid-template-columns: 1fr;
    }

    .post-card,
    .post-card:nth-child(4n+1),
    .post-card:nth-child(4n) {
        grid-column: auto;
        min-height: 320px;
    }

    .post-card-content {
        padding: 1.25rem;
    }

    .post-card-title,
    .post-card:nth-child(4n+1) .post-card-title,
    .post-card:nth-child(4n) .post-card-title {
        font-size: 1.6rem;
    }

    .post-card-excerpt,
    .post-card:nth-child(4n+1) .post-card-excerpt,
    .post-card:nth-child(4n) .post-card-excerpt {
        font-size: 0.95rem;
    }

    .article-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-content .kg-width-wide,
    .article-content .kg-width-full {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        transform: none;
    }

    .article-content .kg-gallery-row {
        height: 12rem;
    }

    .article-content .kg-bookmark-container {
        flex-direction: column-reverse;
    }

    .article-content .kg-bookmark-thumbnail {
        flex: none;
        min-width: 0;
        height: 9rem;
    }

    .tag-feed {
        grid-template-columns: 1fr;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-footer-nav {
        width: 100%;
        justify-content: center;
    }

    .site-footer-nav .nav {
        justify-content: center;
    }
}