/* ==========================================================================
   Hey Swift — Insights theme for Ghost
   Design tokens mirror the Swift product/marketing stylesheet (src/css) so the
   blog and the app read as one brand: swift blue #3c64ff, the violet/pink mesh
   gradient, ink #1a1a1a, Inter body over a Canela display face.
   ========================================================================== */

/* Drop licensed Canela .woff2 files into assets/fonts/ and this picks them up.
   With the files absent the family fails to load and the stack falls through to
   Playfair Display, so nothing here needs changing either way. */
@font-face {
    font-family: "Canela";
    src: url("../fonts/canela-medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Canela";
    src: url("../fonts/canela-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Brand ramp — identical values to the Tailwind `swift-*` scale */
    --brand-50: #eff2ff;
    --brand-200: #b1c0ff;
    --brand-500: #3c64ff;
    --brand-600: #264ee6;
    --brand-700: #0026bd;
    --brand: var(--brand-500);
    --violet: #9089fc;
    --pink: #ff80b5;

    --ink: #1a1a1a;
    --body: #374151;
    --muted: #6b7280;
    --line: #e5e7eb;
    --line-soft: #f3f4f6;
    --surface: #ffffff;
    --surface-sunken: #f9fafb;
    --footer: #0b1020;

    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Canela", "Playfair Display", Georgia, serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgb(16 24 40 / 6%);
    --shadow-md: 0 12px 28px -18px rgb(16 24 40 / 35%);
    --shadow-lift: 0 26px 50px -28px rgb(60 100 255 / 45%);

    --wrap: 1240px;
    --gutter: 1.5rem;
}

/* Opt in from Ghost Admin → Design when the publication accent colour should
   drive the theme instead of Swift blue. */
body.accent-site {
    --brand: var(--ghost-accent-color, #3c64ff);
    --brand-600: var(--ghost-accent-color, #264ee6);
    --brand-700: var(--ghost-accent-color, #0026bd);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

/* --gh-font-body / --gh-font-heading are set by Ghost when a font is chosen in
   Design → Typography; with nothing chosen they are undefined and the theme's
   own stacks apply. */
body {
    margin: 0;
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 17px;
    line-height: 1.65;
    color: var(--body);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--brand-600);
    text-decoration: none;
}

a:hover {
    color: var(--brand-700);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--gh-font-heading, var(--font-sans));
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

p {
    margin: 0 0 1.25em;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

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

.display {
    font-family: var(--gh-font-heading, var(--font-display));
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: #fff;
    background: var(--brand);
    border-radius: var(--radius-pill);
}

.skip-link:focus {
    top: 1rem;
    color: #fff;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   Buttons, chips, eyebrows
   -------------------------------------------------------------------------- */

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button .icon {
    width: 1rem;
    height: 1rem;
    transition: transform 180ms ease;
}

.button:hover .icon {
    transform: translateX(2px);
}

.button--primary {
    color: #fff;
    background: var(--brand);
}

.button--primary:hover {
    color: #fff;
    background: var(--brand-600);
}

.button--ghost {
    color: var(--ink);
    background: #fff;
    border-color: var(--line);
}

.button--ghost:hover {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.link-button {
    padding: 0;
    font-weight: 600;
    color: var(--brand-600);
    background: none;
    border: 0;
}

.link-button:hover {
    color: var(--brand-700);
    text-decoration: underline;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    transition: border-color 180ms ease, color 180ms ease;
}

.icon-button:hover {
    color: var(--brand);
    border-color: var(--brand-200);
}

.icon {
    width: 1.125rem;
    height: 1.125rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-600);
}

.eyebrow--static {
    color: var(--muted);
}

.chip {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-700);
    background: var(--brand-50);
    border-radius: var(--radius-pill);
}

.chip:hover {
    color: #fff;
    background: var(--brand);
}

/* --------------------------------------------------------------------------
   Logo
   -------------------------------------------------------------------------- */

.logo-wordmark {
    width: auto;
    height: 52px;
    color: var(--ink);
}

.logo-wordmark .logo-ink {
    fill: currentColor;
}

.logo-wordmark .logo-blue {
    fill: var(--brand);
}

.logo-mark {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgb(255 255 255 / 82%);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px) saturate(1.4);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 76px;
}

.site-header__logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.site-header__logo img {
    height: 36px;
    width: auto;
}

.site-nav {
    flex: 1 1 auto;
}

.site-nav__list {
    display: flex;
    gap: 1.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__item a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    padding-block: 0.5rem;
    border-bottom: 2px solid transparent;
    transition: color 160ms ease, border-color 160ms ease;
}

.site-nav__item a:hover,
.site-nav__item.is-current a {
    color: var(--brand-600);
    border-bottom-color: var(--brand);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.site-header__toggle {
    display: none;
}

.mobile-nav {
    border-top: 1px solid var(--line);
    background: #fff;
    padding: 1rem var(--gutter) 1.5rem;
}

.mobile-nav__list {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.mobile-nav__list a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1px solid var(--line-soft);
}

/* --------------------------------------------------------------------------
   Hero — the ambient mesh gradient from the marketing site
   -------------------------------------------------------------------------- */

.page-hero,
.post-hero {
    position: relative;
    isolation: isolate;
    overflow: clip;
    padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3rem, 7vw, 6rem);
    background: linear-gradient(180deg, var(--brand-50) 0%, #fdf7fb 55%, #fff 100%);
}

.mesh {
    position: absolute;
    inset: -25%;
    z-index: -1;
    background:
        radial-gradient(42rem 26rem at 18% 18%, rgb(60 100 255 / 30%), transparent 58%),
        radial-gradient(38rem 26rem at 82% 8%, rgb(144 137 252 / 28%), transparent 58%),
        radial-gradient(46rem 30rem at 60% 96%, rgb(255 128 181 / 22%), transparent 58%);
    filter: blur(48px);
    mask-image: radial-gradient(ellipse 78% 70% at center, #000 32%, transparent 94%);
    animation: mesh-drift 26s ease-in-out infinite alternate;
}

@keyframes mesh-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-3%, 2%) scale(1.05); }
    100% { transform: translate(2%, -3%) scale(0.98); }
}

/* With a hero image set, the photo sits under a brand-tinted wash so white
   type and the blue headline stay legible over any photograph. */
.page-hero--image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
}

.page-hero--image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, rgb(239 242 255 / 94%) 0%, rgb(239 242 255 / 72%) 42%, rgb(255 128 181 / 30%) 100%);
}

.page-hero--compact {
    padding-block: clamp(3rem, 6vw, 5rem);
}

.page-hero__inner {
    max-width: 900px;
}

.page-hero__inner--author {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.author-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: var(--shadow-md);
}

.page-hero__title {
    font-size: clamp(2.75rem, 7vw, 5rem);
    color: var(--brand-700);
}

.page-hero__dek {
    max-width: 46ch;
    margin: 1rem 0 0;
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    color: var(--body);
}

.page-hero__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

/* --------------------------------------------------------------------------
   Feed toolbar
   -------------------------------------------------------------------------- */

.feed-shell {
    padding-block: clamp(2.5rem, 5vw, 3.5rem) clamp(4rem, 8vw, 6rem);
}

.feed-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.feed-toolbar__group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.select {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.select select {
    appearance: none;
    min-width: 190px;
    padding: 0.75rem 2.75rem 0.75rem 1.125rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.select select:hover {
    border-color: var(--brand-200);
}

.select select:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgb(60 100 255 / 15%);
    outline: none;
}

.select .icon {
    position: absolute;
    right: 1rem;
    width: 1rem;
    height: 1rem;
    color: var(--brand);
    pointer-events: none;
}

.feed-toolbar__search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 280px;
    flex: 0 1 380px;
}

.feed-toolbar__search input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1.125rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.feed-toolbar__search input::placeholder {
    color: var(--muted);
}

.feed-toolbar__search input:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgb(60 100 255 / 15%);
    outline: none;
}

.feed-toolbar__search-button {
    position: absolute;
    right: 0.375rem;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--brand);
    background: none;
    border: 0;
    border-radius: var(--radius-pill);
}

.feed-toolbar__search-button:hover {
    background: var(--brand-50);
}

/* --------------------------------------------------------------------------
   Card grid
   -------------------------------------------------------------------------- */

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

.grid[data-columns="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    transition: transform 220ms ease;
}

.card[hidden] {
    display: none;
}

.card__media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--brand-50);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 220ms ease, border-color 220ms ease;
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover .card__media {
    border-color: var(--brand-200);
    box-shadow: var(--shadow-lift);
}

.card:hover .card__media img {
    transform: scale(1.04);
}

/* Fallback art for posts with no feature image: the mesh gradient plus the
   Swift chevron, so an unillustrated post still looks deliberate. */
.card__fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgb(255 255 255 / 90%);
    background:
        radial-gradient(80% 120% at 15% 0%, var(--brand-500), transparent 60%),
        radial-gradient(90% 130% at 100% 100%, var(--violet), transparent 62%),
        linear-gradient(135deg, var(--brand-600), var(--brand-700));
}

.card__fallback .logo-mark {
    width: 46%;
    height: auto;
    opacity: 0.92;
}

.card__badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.5rem 0.875rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-700);
    background: #fff;
    border-bottom-right-radius: var(--radius-sm);
}

.card__body {
    padding: 1rem 0.25rem 0;
}

.card__title {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.005em;
}

.card__title a {
    color: var(--ink);
    background-image: linear-gradient(var(--brand), var(--brand));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1px;
    transition: color 180ms ease, background-size 260ms ease;
}

.card__title a:hover {
    color: var(--brand-600);
    background-size: 100% 1px;
}

.card__meta {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--muted);
}

/* Optional lead card: first tile spans two columns and two rows. */
.grid[data-featured-lead] > .card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.grid[data-featured-lead] > .card:first-child .card__media {
    aspect-ratio: 16 / 9;
    height: auto;
}

.grid[data-featured-lead] > .card:first-child .card__title {
    font-size: clamp(1.375rem, 2.2vw, 1.75rem);
    font-weight: 700;
}

.feed-empty {
    margin: 3rem 0 0;
    text-align: center;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   Pagination / load more
   -------------------------------------------------------------------------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3.5rem;
    font-size: 0.9375rem;
}

.pagination__link {
    padding: 0.625rem 1.375rem;
    font-weight: 600;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    transition: border-color 160ms ease, color 160ms ease;
}

.pagination__link:hover {
    color: var(--brand-600);
    border-color: var(--brand-200);
}

.pagination__page {
    color: var(--muted);
}

.load-more {
    display: flex;
    justify-content: center;
    margin-top: 3.5rem;
}

.load-more[data-loading] .button {
    opacity: 0.6;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Post
   -------------------------------------------------------------------------- */

.post-hero {
    padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(5rem, 10vw, 8rem);
}

.post-hero__inner {
    max-width: 1100px;
}

.post-hero__title {
    font-size: clamp(2.25rem, 5.4vw, 4.25rem);
    color: var(--brand-700);
}

.post-hero__dek {
    max-width: 60ch;
    margin: 1.5rem 0 0;
    font-size: clamp(1.0625rem, 1.7vw, 1.375rem);
    color: var(--body);
}

/* The white panels ride up over the gradient, the way the Catalyst article
   sheet does. */
.post-shell {
    /* The hero above is positioned, so without a paint layer of its own the
       sheet's negative margin would slide *under* the hero background. */
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.75rem;
    align-items: start;
    /* Narrower than the feed so the article column lands near 70 characters —
       any wider and long paragraphs get hard to track back to. */
    max-width: 1120px;
    margin-inline: auto;
    margin-top: clamp(-5rem, -6vw, -3rem);
    padding-bottom: clamp(4rem, 8vw, 6rem);
}

.post-shell--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 900px;
}

/* No hero above it (the editor hid the page title), so the sheet sits in the
   flow instead of riding up over a gradient that is not there. */
.post-shell--flush {
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

.post-body {
    padding: clamp(1.75rem, 4vw, 3.5rem);
}

.post-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.post-byline a {
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: var(--line);
}

.post-byline a:hover {
    color: var(--brand-600);
}

.post-feature {
    margin: 0 0 2.5rem;
}

.post-feature img {
    width: 100%;
    border-radius: var(--radius);
}

.post-feature figcaption {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--muted);
    text-align: center;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Article content — Ghost editor output
   -------------------------------------------------------------------------- */

.content {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--body);
}

.content > * {
    margin-block: 0 1.5em;
}

.content h2 {
    margin-block: 2.25em 0.6em;
    font-size: 1.75rem;
    font-weight: 700;
}

.content h3 {
    margin-block: 2em 0.5em;
    font-size: 1.375rem;
    font-weight: 700;
}

.content h4 {
    margin-block: 1.75em 0.5em;
    font-size: 1.125rem;
    font-weight: 700;
}

.content a {
    color: var(--brand-600);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--brand-200);
}

.content a:hover {
    text-decoration-color: var(--brand-600);
}

.content strong {
    color: var(--ink);
}

.content ul,
.content ol {
    padding-left: 1.5rem;
}

.content li {
    margin-bottom: 0.5em;
}

.content blockquote {
    margin-inline: 0;
    padding: 0.25rem 0 0.25rem 1.5rem;
    font-family: var(--gh-font-heading, var(--font-display));
    font-size: 1.375rem;
    line-height: 1.5;
    color: var(--ink);
    border-left: 3px solid var(--brand);
}

.content hr {
    height: 1px;
    margin-block: 2.5em;
    border: 0;
    background: var(--line);
}

.content img,
.content video,
.content iframe {
    border-radius: var(--radius);
}

.content figcaption {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--muted);
    text-align: center;
}

.content code {
    padding: 0.15em 0.4em;
    font-family: var(--font-mono);
    font-size: 0.875em;
    color: var(--brand-700);
    background: var(--brand-50);
    border-radius: 5px;
}

.content pre {
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: #e5e7eb;
    background: var(--footer);
    border-radius: var(--radius);
}

.content pre code {
    padding: 0;
    color: inherit;
    background: none;
}

.content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.content th,
.content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.content th {
    font-weight: 600;
    color: var(--ink);
}

/* Koenig cards. `card_assets: true` in package.json loads Ghost's own layout
   CSS for these; the rules below only add the brand skin. */
.content .kg-width-wide {
    max-width: calc(100% + 4rem);
    margin-inline: -2rem;
}

.content .kg-width-full {
    max-width: calc(100% + 2 * clamp(1.75rem, 4vw, 3.5rem));
    margin-inline: calc(-1 * clamp(1.75rem, 4vw, 3.5rem));
}

.content .kg-width-full img {
    border-radius: 0;
}

.content .kg-callout-card {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
}

/* Gallery card */
.content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.content .kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
}

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

/* Bookmark card */
.content .kg-bookmark-card a {
    text-decoration: none;
}

.content .kg-bookmark-container {
    display: flex;
    overflow: hidden;
    color: var(--body);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.content .kg-bookmark-container:hover {
    border-color: var(--brand-200);
    box-shadow: var(--shadow-md);
}

.content .kg-bookmark-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.25rem 1.5rem;
}

.content .kg-bookmark-title {
    font-weight: 600;
    color: var(--ink);
}

.content .kg-bookmark-description {
    display: -webkit-box;
    max-height: 3rem;
    margin-top: 0.5rem;
    overflow: hidden;
    font-size: 0.9375rem;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.content .kg-bookmark-metadata {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted);
}

.content .kg-bookmark-icon {
    width: 20px;
    height: 20px;
    margin: 0;
    border-radius: 4px;
}

.content .kg-bookmark-author,
.content .kg-bookmark-publisher {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content .kg-bookmark-publisher::before {
    content: "\2022";
    margin-right: 0.5rem;
}

.content .kg-bookmark-thumbnail {
    flex: 0 0 34%;
    max-height: 200px;
}

.content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

@media (max-width: 620px) {
    .content .kg-bookmark-container {
        flex-direction: column-reverse;
    }

    .content .kg-bookmark-thumbnail {
        flex-basis: auto;
    }
}

.content .kg-button-card .kg-btn {
    border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   Share rail
   -------------------------------------------------------------------------- */

.post-aside {
    padding: clamp(1.5rem, 3vw, 2rem);
}

.post-aside__sticky {
    position: sticky;
    top: 100px;
}

.post-aside__heading {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ink);
}

.share {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0 0 1.5rem;
    list-style: none;
    border-bottom: 1px solid var(--line);
}

.share a,
.share button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--brand-600);
    background: none;
    border: 0;
    border-radius: var(--radius-pill);
    transition: background-color 160ms ease, color 160ms ease;
}

.share a:hover,
.share button:hover {
    color: var(--brand-700);
    background: var(--brand-50);
}

.share .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.post-aside__cta {
    padding-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   Related posts
   -------------------------------------------------------------------------- */

.related {
    padding-bottom: clamp(4rem, 8vw, 6rem);
}

.related__heading {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    color: rgb(255 255 255 / 72%);
    background: var(--footer);
}

.site-footer a {
    color: rgb(255 255 255 / 72%);
}

.site-footer a:hover {
    color: #fff;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    padding-block: clamp(3rem, 6vw, 4.5rem);
}

.site-footer__mark {
    display: block;
    width: 56px;
    height: 56px;
    color: var(--brand-500);
}

.site-footer__title {
    margin: 0.75rem 0 0.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
}

.site-footer__tagline {
    max-width: 34ch;
    margin: 0;
    font-size: 0.9375rem;
}

.site-footer__heading {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
}

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

.site-footer__nav li {
    margin-bottom: 0.625rem;
    font-size: 0.9375rem;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    padding-block: 1.5rem;
    font-size: 0.8125rem;
    border-top: 1px solid rgb(255 255 255 / 12%);
}

.site-footer__legal p {
    margin: 0;
}

.error-details {
    padding: 2rem;
    font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .grid,
    .grid[data-columns="3"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .post-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .post-aside__sticky {
        position: static;
    }

    .share {
        border-bottom: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 860px) {
    .site-nav,
    .site-header__cta {
        display: none;
    }

    .site-header__toggle {
        display: inline-grid;
    }

    .grid[data-featured-lead] > .card:first-child {
        grid-column: span 2;
        grid-row: auto;
    }

    .site-footer__inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 620px) {
    body {
        font-size: 16px;
    }

    .grid,
    .grid[data-columns="3"],
    .grid[data-featured-lead] > .card:first-child {
        grid-template-columns: minmax(0, 1fr);
        grid-column: auto;
    }

    .feed-toolbar__group {
        width: 100%;
    }

    .select,
    .select select,
    .feed-toolbar__search {
        width: 100%;
        min-width: 0;
    }

    .page-hero__inner--author {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .mesh {
        animation: none;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
