/* ==========================================================================
   enterprisey — Ghost theme
   Hand-written CSS, no build step.

   1. Tokens
   2. Base & reset
   3. Utilities
   4. Buttons, links, pills, chips, fields
   5. Header & navigation
   6. Footer
   7. Signup forms
   8. Homepage
   9. Deal cards (strip)
   10. Post lists & cards
   11. Article
   12. Content (gh-content) & Koenig cards
   13. Deal at a glance
   14. Deal tracker
   15. Topic / author / page heads
   16. Pagination, error, misc
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */
:root {
    --accent: var(--ghost-accent-color, #4B2FE0);
    --bg: #F4F5F7;
    --surface: #FFFFFF;
    --ink: #0B1B2B;
    --ink-body: #1E2C3A;
    --text-2: #3D4B5A;
    --text-3: #56636F;
    --border: #DDE1E6;
    --border-strong: #C3CAD2;
    --input-border: #A8B1BC;
    --placeholder: #E4E7EB;
    --on-dark-2: #C9D1DA;

    --acq-bg: #ECE9FD;
    --acq-fg: #3A22B8;
    --funding-bg: #E3F1EA;
    --funding-fg: #145C3A;
    --ipo-bg: #FDEEDC;
    --ipo-fg: #8A4B08;

    --font-display: var(--gh-font-heading, 'Bricolage Grotesque'), 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: var(--gh-font-body, 'DM Sans'), 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --pill: 999px;

    --container: 1240px;
    --gutter: 24px;
    --focus: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}

@media (max-width: 640px) {
    :root {
        --gutter: 20px;
    }
}

/* 2. Base & reset
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

img,
video {
    height: auto;
}

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

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

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

[hidden] {
    display: none !important;
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
}

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

/* 3. Utilities
   ========================================================================== */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 12px 18px;
    background: var(--ink);
    color: #FFFFFF;
    font-weight: 700;
    border-radius: var(--pill);
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
    color: #FFFFFF;
}

.accent-text {
    color: var(--accent);
}

.icon {
    flex: none;
    display: block;
}

.eyebrow {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fineprint {
    margin-top: 14px;
    color: var(--text-3);
    font-size: 13px;
}

.empty-note {
    padding: 24px 0;
    color: var(--text-2);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-title--sm {
    margin-bottom: 20px;
    font-size: 28px;
}

.aside-title {
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 640px) {
    .section-title,
    .section-title--sm {
        font-size: 26px;
    }

    .aside-title {
        font-size: 20px;
    }
}

/* 4. Buttons, links, pills, chips, fields
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.btn--pill {
    border-radius: var(--pill);
}

.btn--block {
    display: flex;
    width: 100%;
}

.btn--accent {
    background: var(--accent);
    color: #FFFFFF;
}

.btn--accent:hover {
    color: #FFFFFF;
    filter: brightness(0.92);
}

.btn--dark {
    background: var(--ink);
    color: #FFFFFF;
}

.btn--dark:hover {
    color: #FFFFFF;
    background: #1D3247;
}

.btn--outline {
    border-color: var(--border-strong);
    background: var(--surface);
}

.btn--outline:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.btn--ghost-light {
    border-color: rgba(255, 255, 255, 0.4);
    background: transparent;
    color: #FFFFFF;
}

.btn--ghost-light:hover {
    border-color: #FFFFFF;
    color: #FFFFFF;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.icon-btn--dark {
    border-color: var(--ink);
    background: var(--ink);
    color: #FFFFFF;
}

.icon-btn--dark:hover {
    color: #FFFFFF;
    background: #1D3247;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
}

.text-link:hover {
    color: var(--ink);
}

.text-link__short {
    display: none;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border: 1px solid transparent;
    border-radius: var(--pill);
    background: #E7EAEE;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-transform: uppercase;
}

.pill--outline {
    border-color: var(--border);
    background: var(--surface);
}

.pill:hover {
    color: var(--ink);
    border-color: var(--ink);
}

.pill--acquisition,
.badge.badge--acq {
    background: var(--acq-bg);
    color: var(--acq-fg);
}

.pill--funding,
.badge.badge--funding {
    background: var(--funding-bg);
    color: var(--funding-fg);
}

.pill--ipo,
.badge.badge--ipo {
    background: var(--ipo-bg);
    color: var(--ipo-fg);
}

.pill--acquisition:hover { color: var(--acq-fg); border-color: var(--acq-fg); }
.pill--funding:hover { color: var(--funding-fg); border-color: var(--funding-fg); }
.pill--ipo:hover { color: var(--ipo-fg); border-color: var(--ipo-fg); }

.badge {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: var(--pill);
    background: #E7EAEE;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-transform: uppercase;
    white-space: nowrap;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--pill);
    background: var(--surface);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field__label {
    font-size: 13px;
    font-weight: 700;
}

.field__input {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 16px;
}

.field__input::placeholder {
    color: #6B7681;
    opacity: 1;
}

.field__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.field__input--sm {
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
}

/* 5. Header & navigation
   ========================================================================== */
.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 22px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.site-logo__img {
    display: block;
    width: auto;
    max-height: 40px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    text-transform: lowercase;
    color: var(--ink);
}

.logo-text__dot {
    color: var(--accent);
}

.site-logo:hover .logo-text {
    color: var(--ink);
}

.site-header__tools {
    display: none;
    gap: 8px;
}

.site-menu {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
}

.site-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 15px;
    font-weight: 500;
}

.site-nav .nav-current a {
    color: var(--accent);
    font-weight: 700;
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-actions__signin {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    font-weight: 700;
}

.site-actions .btn {
    min-height: 44px;
    padding: 0 20px;
    font-size: 14px;
}

.site-actions .btn .icon {
    width: 16px;
    height: 16px;
}

.icon-btn .icon-close,
.icon-btn .icon-done {
    display: none;
}

/* Mobile header (matches MobileHome design) */
@media (max-width: 900px) {
    .site-header {
        border-bottom: 1px solid var(--border);
        background: var(--bg);
    }

    .site-header__inner {
        padding-block: 14px;
        gap: 12px;
    }

    .logo-text {
        font-size: 24px;
    }

    .site-header__tools {
        display: flex;
    }

    /* Without JS the menu simply wraps under the logo */
    .site-menu {
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .nav {
        gap: 0 20px;
    }

    .js .site-header__menu {
        display: inline-flex;
    }

    .js .site-menu {
        display: none;
        padding: 8px 0 12px;
    }

    .js .site-header.is-open .site-menu {
        display: flex;
    }

    .js .site-nav .nav {
        flex-direction: column;
        width: 100%;
    }

    .js .site-nav .nav li {
        border-bottom: 1px solid var(--border);
    }

    .js .site-nav .nav a {
        display: flex;
        min-height: 52px;
        font-size: 18px;
    }

    .site-actions {
        justify-content: space-between;
    }

    .site-actions .btn {
        flex: 1 1 auto;
        min-height: 48px;
    }

    .site-header.is-open .icon-open {
        display: none;
    }

    .site-header.is-open .icon-close {
        display: block;
    }
}

html:not(.js) .site-header__menu {
    display: none;
}

/* 6. Footer
   ========================================================================== */
.site-footer {
    margin-top: 72px;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 28px;
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: 14px;
}

.site-footer__logo .logo-text {
    font-size: 18px;
}

.site-footer__logo {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

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

.site-footer__nav .nav {
    justify-content: flex-end;
    gap: 0 20px;
}

.site-footer__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-3);
}

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

.site-footer__copy {
    flex-basis: 100%;
    font-size: 13px;
}

@media (max-width: 640px) {
    .site-footer {
        margin-top: 48px;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer__nav .nav {
        justify-content: flex-start;
        gap: 0 18px;
    }
}

/* 7. Signup forms
   ========================================================================== */
.signup-form {
    max-width: 560px;
}

.signup-form__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.signup-form .field {
    flex: 1 1 260px;
}

.signup-form__btn {
    position: relative;
    height: 54px;
    padding: 0 26px;
    font-size: 16px;
}

.btn__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.signup-form.loading .btn__label {
    opacity: 0.7;
}

.signup-form.loading .btn__spinner {
    display: inline-block;
}

.signup-form.loading .signup-form__btn {
    pointer-events: none;
}

.signup-form__msg {
    display: none;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
}

.signup-form__msg .icon {
    margin-top: 1px;
}

.signup-form.success .signup-form__row {
    display: none;
}

.signup-form.success .signup-form__msg--success {
    display: flex;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--funding-bg);
    color: var(--funding-fg);
    font-size: 15px;
}

.signup-form.error .signup-form__msg--error:not(:empty) {
    display: block;
    color: #A3201B;
}

.signup-form.error .field__input {
    border-color: #A3201B;
}

/* Dark variant (inline CTA, deal sheet) */
.signup-form--dark .field__label {
    color: #FFFFFF;
}

.signup-form--dark .field__input {
    height: 50px;
    padding: 0 16px;
    border-color: transparent;
}

.signup-form--dark .field__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.signup-form--dark .signup-form__btn {
    height: 50px;
    padding: 0 24px;
    font-size: 15px;
}

.signup-form--dark .btn--accent:focus-visible {
    box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px #FFFFFF;
}

.signup-form--dark.error .signup-form__msg--error:not(:empty) {
    color: #FFB4AE;
}

.signup-form--dark.error .field__input {
    border-color: #FFB4AE;
}

.signup-invite {
    color: var(--text-2);
}

.signup-invite a {
    color: var(--accent);
    font-weight: 700;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .signup-form__row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .signup-form .field {
        flex: none;
    }

    .signup-form__btn {
        width: 100%;
        height: 52px;
    }

    .signup-form .field__input {
        height: 52px;
        padding: 0 16px;
    }
}

/* Dark CTA card */
.cta-dark {
    padding: 32px;
    border-radius: var(--radius-lg);
    background: var(--ink);
    color: #FFFFFF;
    font-size: 16px;
    line-height: 1.5;
}

.cta-dark a:not(.btn) {
    color: #FFFFFF;
    text-decoration: underline;
}

.cta-dark__title {
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}

.cta-dark__title--lg {
    font-size: 30px;
}

.cta-dark__text {
    margin-bottom: 20px;
    color: var(--on-dark-2);
}

.cta-dark--split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 56px;
    padding: 36px;
}

.cta-dark--split .cta-dark__text {
    margin-bottom: 0;
}

.cta-dark__intro,
.cta-dark__form {
    flex: 1 1 380px;
    min-width: 0;
}

.cta-dark__form .signup-form {
    max-width: none;
}

@media (max-width: 640px) {
    .cta-dark,
    .cta-dark--split {
        padding: 24px;
    }

    .cta-dark__title--lg {
        font-size: 26px;
    }

    .cta-dark__intro,
    .cta-dark__form {
        flex-basis: 100%;
    }
}

/* 8. Homepage
   ========================================================================== */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--pill);
    background: var(--surface);
    font-size: 13px;
    font-weight: 500;
}

.kicker__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 48px;
    padding: 64px 0 56px;
}

.hero__main {
    flex: 999 1 520px;
    min-width: 0;
}

.hero__title {
    margin-bottom: 20px;
    font-family: var(--font-display);
    font-size: clamp(44px, 4.2vw + 24px, 76px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero__dek {
    max-width: 560px;
    margin-bottom: 32px;
    color: var(--text-2);
    font-size: 20px;
    line-height: 1.5;
}

.hero__member {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 560px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 15px;
}

.hero__member .icon {
    color: var(--funding-fg);
}

.hero__member a {
    color: var(--accent);
    font-weight: 700;
}

.brief-card {
    flex: 1 1 380px;
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.brief-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.brief-card__title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

.brief-card__date {
    color: var(--text-3);
    font-size: 13px;
}

.brief-card__headline {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.brief-card__excerpt {
    color: var(--text-2);
    font-size: 16px;
    line-height: 1.5;
}

.brief-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: brief;
}

.brief-list li {
    display: flex;
    gap: 14px;
    counter-increment: brief;
}

.brief-list li::before {
    content: counter(brief);
    min-width: 22px;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.brief-list a {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.brief-card__more {
    margin-top: 10px;
    font-size: 14px;
}

.home-split {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    margin-top: 56px;
}

.home-latest {
    flex: 999 1 560px;
    min-width: 0;
}

.home-latest .section-title {
    margin-bottom: 8px;
}

.home-latest .btn--block {
    margin-top: 24px;
}

.home-topics {
    flex: 1 1 300px;
    min-width: 0;
}

@media (max-width: 640px) {
    .hero {
        gap: 36px;
        padding: 32px 0 36px;
    }

    .kicker {
        margin-bottom: 18px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .hero__title {
        margin-bottom: 14px;
    }

    .hero__dek {
        margin-bottom: 24px;
        font-size: 17px;
    }

    .fineprint {
        margin-top: 10px;
    }

    .brief-card {
        padding: 22px;
        flex-basis: 100%;
    }

    .brief-card__head {
        margin-bottom: 16px;
    }

    .brief-card__title {
        font-size: 20px;
    }

    .brief-list {
        gap: 14px;
    }

    .brief-list li {
        gap: 12px;
    }

    .brief-list li::before {
        min-width: 18px;
        font-size: 17px;
    }

    .home-split {
        gap: 40px;
        margin-top: 40px;
    }

    .chips {
        gap: 8px;
    }

    .chip {
        padding: 10px 14px;
    }
}

/* 9. Deal cards (strip)
   ========================================================================== */
.deal-strip {
    padding-top: 8px;
}

.deal-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.deal-card {
    display: flex;
    flex: 1 1 260px;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

a.deal-card:hover {
    border-color: var(--accent);
    color: var(--ink);
}

.deal-card__amount {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.deal-card__name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.topic-hero + .deal-strip {
    margin-top: 48px;
}

@media (max-width: 640px) {
    .deal-strip {
        margin-top: 40px;
        padding-top: 0;
    }

    .deal-strip .section-head {
        margin-bottom: 14px;
        flex-wrap: nowrap;
    }

    .text-link__long {
        display: none;
    }

    .text-link__short {
        display: inline;
    }

    .deal-cards {
        flex-wrap: nowrap;
        gap: 12px;
        margin-inline: calc(var(--gutter) * -1);
        padding: 0 var(--gutter) 6px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--gutter);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .deal-card {
        flex: 0 0 220px;
        gap: 8px;
        padding: 18px;
        scroll-snap-align: start;
    }

    .deal-card .badge {
        font-size: 11px;
    }

    .deal-card__amount {
        font-size: 28px;
    }

    .deal-card__name {
        font-size: 14px;
    }
}

/* 10. Post lists & cards
   ========================================================================== */
.post-list {
    display: flex;
    flex-direction: column;
}

.post-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.post-row__time {
    flex: 0 0 92px;
    padding-top: 4px;
    color: var(--text-3);
    font-size: 13px;
}

.post-row__body {
    min-width: 0;
}

.post-row__title {
    margin-bottom: 6px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.post-row__lock {
    display: inline-block;
    vertical-align: -2px;
    color: var(--text-3);
}

.post-row__lock .icon {
    display: inline-block;
    width: 16px;
    height: 16px;
}

.post-row__excerpt {
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .post-row {
        flex-direction: column;
        gap: 6px;
        padding: 18px 0;
    }

    .post-row__time {
        flex: none;
        padding-top: 0;
        font-size: 12px;
    }

    .post-row__title {
        font-size: 18px;
    }
}

.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.post-card {
    position: relative;
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.15s ease;
}

.post-card:hover,
.post-card:focus-within {
    border-color: var(--accent);
}

.post-card__label {
    color: var(--text-3);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.post-card__meta {
    color: var(--text-3);
    font-size: 13px;
}

.post-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

/* Whole card is clickable via the headline link */
.post-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.post-card__link:focus-visible {
    outline: none;
}

.post-card:has(.post-card__link:focus-visible) {
    box-shadow: var(--focus);
}

.post-feature {
    flex: 999 1 560px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.post-feature__media {
    display: block;
    aspect-ratio: 16 / 8;
    background: var(--placeholder);
}

.post-feature__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-feature__body {
    padding: 28px;
}

.post-feature__meta {
    margin-bottom: 8px;
    color: var(--text-3);
    font-size: 13px;
}

.post-feature__title {
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.post-feature__excerpt {
    color: var(--text-2);
    font-size: 17px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .post-feature__body {
        padding: 22px;
    }

    .post-feature__title {
        font-size: 26px;
    }

    .post-feature__excerpt {
        font-size: 16px;
    }
}

/* 11. Article
   ========================================================================== */
.article {
    padding-top: 32px;
}

.article-header {
    max-width: calc(760px + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.article-tags .pill {
    min-height: 32px;
    padding-inline: 12px;
}

.article-title {
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-size: clamp(34px, 3vw + 20px, 54px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
}

.article-dek {
    margin-bottom: 28px;
    color: var(--text-2);
    font-size: 21px;
    line-height: 1.5;
}

.article-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.byline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.byline__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-3);
    object-fit: cover;
}

.byline__name {
    font-size: 15px;
    font-weight: 700;
}

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

.byline__meta {
    color: var(--text-3);
    font-size: 13px;
}

.share {
    display: flex;
    gap: 8px;
}

.share .is-copied .icon-default {
    display: none;
}

.share .is-copied .icon-done {
    display: block;
    color: var(--funding-fg);
}

.article-image {
    max-width: calc(1040px + var(--gutter) * 2);
    margin: 36px auto;
    padding-inline: var(--gutter);
}

.article-image img {
    display: block;
    width: 100%;
    border-radius: var(--radius-lg);
    background: var(--placeholder);
}

.article-image figcaption,
.gh-content figcaption {
    margin-top: 10px;
    color: var(--text-3);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.article-image figcaption a,
.gh-content figcaption a {
    color: inherit;
    text-decoration: underline;
}

.article:not(:has(.article-image)) .gh-content {
    margin-top: 36px;
}

.article--page .article-header + .gh-content {
    margin-top: 36px;
}

.article-after {
    margin-top: 40px;
}

.article-comments {
    margin-top: 48px;
}

.related {
    margin-top: 64px;
}

.related .section-title {
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

@media (min-width: 1088px) {
    .related.container {
        max-width: calc(1040px + var(--gutter) * 2);
    }
}

@media (max-width: 640px) {
    .article {
        padding-top: 24px;
    }

    .article-dek {
        font-size: 18px;
        margin-bottom: 22px;
    }

    .article-image {
        margin: 24px auto;
    }

    .article-image img {
        border-radius: var(--radius);
    }

    .related {
        margin-top: 48px;
    }
}

/* Members-only CTA (partials/content-cta.hbs) */
.access-cta {
    margin-top: 40px;
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    background: var(--ink);
    color: #FFFFFF;
    text-align: center;
}

.access-cta__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.gh-content .access-cta__title,
.access-cta__title {
    margin: 0 0 8px;
    color: #FFFFFF;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.gh-content .access-cta__text,
.access-cta__text {
    margin: 0 auto 22px;
    max-width: 480px;
    color: var(--on-dark-2);
    font-size: 16px;
    line-height: 1.5;
}

.access-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.gh-content .access-cta a.btn {
    text-decoration: none;
    color: #FFFFFF;
}

/* 12. Content (gh-content) & Koenig cards
   ========================================================================== */
.gh-canvas {
    display: grid;
    grid-template-columns:
        [full-start] minmax(var(--gutter), 1fr)
        [wide-start] minmax(0, 160px)
        [main-start] min(720px, calc(100% - var(--gutter) * 2))
        [main-end] minmax(0, 160px)
        [wide-end] minmax(var(--gutter), 1fr)
        [full-end];
}

.gh-canvas > * {
    grid-column: main-start / main-end;
    min-width: 0;
}

.gh-canvas > .kg-width-wide,
.gh-content > .kg-width-wide {
    grid-column: wide-start / wide-end;
}

.gh-canvas > .kg-width-full,
.gh-content > .kg-width-full {
    grid-column: full-start / full-end;
}

.kg-width-full img {
    width: 100%;
}

.gh-content {
    color: var(--ink-body);
    font-size: 19px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.gh-content > * + * {
    margin-top: 24px;
}

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

.gh-content a:hover {
    color: var(--ink);
}

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

.gh-content > h2,
.gh-content > h3,
.gh-content > h4,
.gh-content > h5,
.gh-content > h6 {
    color: var(--ink);
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    scroll-margin-top: 24px;
}

.gh-content > h2 {
    margin-top: 48px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
}

.gh-content > h3 {
    margin-top: 40px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}

.gh-content > h4 {
    margin-top: 32px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.gh-content > h5,
.gh-content > h6 {
    margin-top: 32px;
    font-size: 17px;
    font-weight: 700;
}

.gh-content > h2 + *,
.gh-content > h3 + *,
.gh-content > h4 + * {
    margin-top: 14px;
}

.gh-content ul,
.gh-content ol {
    padding-left: 1.3em;
}

.gh-content li + li {
    margin-top: 8px;
}

.gh-content li::marker {
    color: var(--accent);
}

.gh-content ol > li::marker {
    font-weight: 700;
}

.gh-content > blockquote:not([class]),
.gh-content > blockquote.kg-blockquote-alt {
    margin-block: 32px;
}

.gh-content > blockquote:not([class]) {
    padding: 4px 0 4px 24px;
    border-left: 4px solid var(--accent);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.gh-content > blockquote.kg-blockquote-alt {
    padding: 0 24px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
    font-style: normal;
    line-height: 1.3;
    text-align: center;
    letter-spacing: -0.02em;
}

.gh-content > blockquote p + p {
    margin-top: 12px;
}

.gh-content > hr {
    width: 100%;
    height: 1px;
    margin-block: 48px;
    border: 0;
    background: var(--border);
}

.gh-content code {
    padding: 2px 6px;
    border-radius: 6px;
    background: #E7EAEE;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.85em;
}

.gh-content pre {
    overflow-x: auto;
    padding: 20px 22px;
    border-radius: var(--radius);
    background: var(--ink);
    color: #E6EBF1;
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.6;
}

.gh-content pre code {
    padding: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

.gh-content > table:not(.deal-table) {
    display: block;
    overflow-x: auto;
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.5;
}

.gh-content > table:not(.deal-table) th,
.gh-content > table:not(.deal-table) td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.gh-content > table:not(.deal-table) th {
    color: var(--text-3);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gh-content mark {
    background: color-mix(in srgb, var(--accent) 18%, #FFFFFF);
    color: var(--ink);
}

/* Images & galleries */
.gh-content .kg-image-card,
.gh-content .kg-gallery-card,
.gh-content .kg-embed-card,
.gh-content .kg-video-card {
    margin-block: 36px;
}

.gh-content .kg-image-card img {
    display: block;
    margin-inline: auto;
    border-radius: var(--radius);
}

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

.gh-content .kg-image-card.kg-width-full figcaption {
    padding-inline: var(--gutter);
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.kg-gallery-image {
    flex: 1 1 0;
    min-width: 0;
}

.kg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* Embeds */
.gh-content .kg-embed-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.gh-content .kg-embed-card iframe {
    width: 100%;
    border-radius: var(--radius-sm);
}

.gh-content .kg-embed-card iframe[src*="youtube"],
.gh-content .kg-embed-card iframe[src*="vimeo"] {
    height: auto;
    aspect-ratio: 16 / 9;
}

/* Bookmarks */
.gh-content .kg-bookmark-card {
    margin-block: 32px;
}

.gh-content .kg-bookmark-card a.kg-bookmark-container,
.gh-content .kg-bookmark-container {
    display: flex;
    min-height: 148px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.gh-content .kg-bookmark-container:hover {
    border-color: var(--accent);
    color: var(--ink);
}

.gh-content .kg-bookmark-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    padding: 20px 22px;
}

.gh-content .kg-bookmark-title {
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.gh-content .kg-bookmark-description {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gh-content .kg-bookmark-metadata {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 500;
}

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

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

.gh-content .kg-bookmark-publisher::before {
    content: "\00B7";
    margin-right: 6px;
}

.gh-content .kg-bookmark-thumbnail {
    position: relative;
    flex: 0 0 32%;
    min-width: 120px;
    max-width: 240px;
}

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

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

    .gh-content .kg-bookmark-thumbnail {
        flex-basis: auto;
        max-width: none;
        aspect-ratio: 16 / 9;
    }
}

/* Callouts */
.gh-content .kg-callout-card {
    display: flex;
    gap: 14px;
    padding: 20px 24px;
    border-radius: var(--radius);
    font-size: 17px;
    line-height: 1.6;
}

.gh-content .kg-callout-card-grey { background: #E7EAEE; }
.gh-content .kg-callout-card-white { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.gh-content .kg-callout-card-blue { background: #E4EEFB; }
.gh-content .kg-callout-card-green { background: var(--funding-bg); }
.gh-content .kg-callout-card-yellow { background: #FDF4D8; }
.gh-content .kg-callout-card-red { background: #FCE6E4; }
.gh-content .kg-callout-card-pink { background: #FBE7F1; }
.gh-content .kg-callout-card-purple { background: var(--acq-bg); }
.gh-content .kg-callout-card-accent { background: var(--accent); color: #FFFFFF; }
.gh-content .kg-callout-card-accent a,
.gh-content .kg-callout-card-accent strong { color: #FFFFFF; }

.gh-content .kg-callout-emoji {
    flex: none;
    font-size: 1.2em;
    line-height: 1.4;
}

.gh-content .kg-callout-text {
    min-width: 0;
}

/* Toggles */
.gh-content .kg-toggle-card {
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.gh-content .kg-toggle-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
}

.gh-content .kg-toggle-heading-text {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.gh-content .kg-toggle-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin: -10px -10px -10px 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--ink);
}

.gh-content .kg-toggle-card-icon svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.gh-content .kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content {
    display: none;
}

.gh-content .kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon svg {
    transform: rotate(180deg);
}

.gh-content .kg-toggle-content {
    margin-top: 10px;
    color: var(--text-2);
    font-size: 17px;
    line-height: 1.6;
}

.gh-content .kg-toggle-content > * + * {
    margin-top: 12px;
}

/* Buttons */
.gh-content .kg-button-card {
    display: flex;
    justify-content: center;
}

.gh-content .kg-button-card.kg-align-left {
    justify-content: flex-start;
}

.gh-content .kg-btn,
.gh-content .kg-button-card a.kg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.gh-content .kg-btn-accent {
    background: var(--accent);
    color: #FFFFFF;
}

.gh-content .kg-btn-accent:hover {
    color: #FFFFFF;
    filter: brightness(0.92);
}

/* Files, products, headers and signup cards keep Ghost's card_assets styling,
   with a few tweaks for the design system. */
.gh-content .kg-file-card-container,
.gh-content .kg-product-card-container,
.gh-content .kg-audio-card {
    border-radius: var(--radius);
}

.gh-content .kg-header-card,
.gh-content .kg-signup-card {
    border-radius: var(--radius-lg);
}

.gh-content .kg-header-card.kg-width-full,
.gh-content .kg-signup-card.kg-width-full {
    border-radius: 0;
}

.gh-content .kg-header-card h2,
.gh-content .kg-signup-card h2 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

@media (max-width: 640px) {
    .gh-content {
        font-size: 18px;
    }

    .gh-content > h2 {
        font-size: 26px;
    }

    .gh-content > h3 {
        font-size: 21px;
    }

    .gh-content > blockquote:not([class]) {
        font-size: 22px;
        padding-left: 18px;
    }

    .gh-content > blockquote.kg-blockquote-alt {
        font-size: 24px;
        padding: 0;
    }
}

/* 13. Deal at a glance (optional HTML card with class "deal-glance")
   ========================================================================== */
.gh-content .deal-glance {
    margin-block: 32px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.5;
}

.gh-content .deal-glance > h2,
.gh-content .deal-glance > h3,
.gh-content .deal-glance > p:first-child {
    margin: 0 0 16px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
}

.gh-content .deal-glance dl,
.gh-content dl.deal-glance {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
}

.gh-content .deal-glance dl > div,
.gh-content dl.deal-glance > div {
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

.gh-content .deal-glance dt {
    color: var(--text-3);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gh-content .deal-glance dd {
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 500;
}

.gh-content .deal-glance .is-value dd,
.gh-content .deal-glance dd.is-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
}

.gh-content .deal-glance > a,
.gh-content .deal-glance > p > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 4px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.gh-content .deal-glance > p {
    margin: 0;
}

/* Two-up on tablets when inline */
@media (min-width: 600px) and (max-width: 1099px) {
    .gh-content .deal-glance dl,
    .gh-content dl.deal-glance {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
    }
}

/* Desktop: the card floats as a sidebar beside the body text (Article design) */
@media (min-width: 1100px) {
    .gh-content.gh-canvas:has(> .deal-glance) {
        display: block;
        max-width: calc(1040px + var(--gutter) * 2);
        margin-inline: auto;
        padding-inline: var(--gutter);
    }

    .gh-content.gh-canvas:has(> .deal-glance)::after {
        content: "";
        display: table;
        clear: both;
    }

    .gh-content.gh-canvas:has(> .deal-glance) > * {
        max-width: 692px;
    }

    .gh-content.gh-canvas:has(> .deal-glance) > .deal-glance {
        float: right;
        clear: right;
        width: 300px;
        max-width: 300px;
        margin: 6px 0 32px 48px;
    }

    .gh-content.gh-canvas:has(> .deal-glance) > :first-child:not(.deal-glance),
    .gh-content.gh-canvas:has(> .deal-glance) > .deal-glance:first-child + * {
        margin-top: 0;
    }

    .article:has(.gh-content > .deal-glance) .article-after {
        display: block;
        max-width: calc(1040px + var(--gutter) * 2);
        margin-inline: auto;
        padding-inline: var(--gutter);
    }

    .article:has(.gh-content > .deal-glance) .article-after > * {
        max-width: 692px;
    }
}

/* 14. Deal tracker
   ========================================================================== */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-top: 32px;
    margin-bottom: 28px;
}

.page-head__main {
    flex: 1 1 520px;
    min-width: 0;
}

.page-head__title {
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: clamp(40px, 3vw + 24px, 60px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.page-head__dek {
    max-width: 720px;
    color: var(--text-2);
    font-size: 18px;
    line-height: 1.5;
}

.text-link--lg {
    font-size: 15px;
}

.stat-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.stat {
    flex: 1 1 220px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.stat__label {
    color: var(--text-3);
    font-size: 13px;
    font-weight: 700;
}

.stat__value {
    margin-top: 4px;
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.deal-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--border-strong);
    border-radius: var(--pill);
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.filter-pill:hover {
    border-color: var(--ink);
}

.filter-pill[aria-pressed="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: #FFFFFF;
}

.deal-controls__right {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.field--search .field__input {
    width: 260px;
    max-width: 100%;
}

.segmented {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.segmented button {
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.segmented button + button {
    border-left: 1px solid var(--border-strong);
}

.segmented button[aria-pressed="true"] {
    background: var(--ink);
    color: #FFFFFF;
}

.segmented button:focus-visible,
.filter-pill:focus-visible {
    outline: none;
    box-shadow: var(--focus);
    position: relative;
    z-index: 1;
}

.deals-content.gh-content {
    font-size: 16px;
    line-height: 1.6;
}

.deals-content > p,
.deals-content > ul,
.deals-content > ol,
.deals-content > h2,
.deals-content > h3 {
    max-width: 760px;
}

/* The deal table works with and without JS */
.deal-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.gh-content .deal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.45;
}

.gh-content .deal-table-wrap .deal-table {
    min-width: 900px;
    border: 0;
    border-radius: 0;
}

.gh-content .deal-table th {
    padding: 16px 12px;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.gh-content .deal-table td {
    padding: 16px 12px;
    border-top: 1px solid #E6E9ED;
    vertical-align: middle;
}

.gh-content .deal-table th:first-child,
.gh-content .deal-table td:first-child {
    padding-left: 22px;
}

.gh-content .deal-table th:last-child,
.gh-content .deal-table td:last-child {
    padding-right: 22px;
}

.gh-content .deal-table td:nth-child(1) {
    color: var(--text-3);
    white-space: nowrap;
}

.gh-content .deal-table td:nth-child(2) {
    font-weight: 700;
}

.gh-content .deal-table td:nth-child(2) a {
    color: var(--ink);
    text-decoration: none;
}

.gh-content .deal-table td:nth-child(2) a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.gh-content .deal-table td:nth-child(3) {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.gh-content .deal-table tr[data-kind="acq"] td:nth-child(3) { color: var(--acq-fg); }
.gh-content .deal-table tr[data-kind="funding"] td:nth-child(3) { color: var(--funding-fg); }
.gh-content .deal-table tr[data-kind="ipo"] td:nth-child(3) { color: var(--ipo-fg); }

.gh-content .deal-table td:nth-child(3) .badge {
    font-size: 12px;
}

.gh-content .deal-table th:nth-child(4),
.gh-content .deal-table td:nth-child(4) {
    text-align: right;
}

.gh-content .deal-table td:nth-child(4) {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.gh-content .deal-table td:nth-child(6) {
    color: var(--text-2);
}

.gh-content .deal-table tbody tr:hover td {
    background: #FAFBFC;
}

.deal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 48px 22px;
    color: var(--text-2);
    font-size: 16px;
    text-align: center;
}

.deal-table-wrap .deal-empty {
    border-top: 1px solid #E6E9ED;
}

.deals-note {
    margin-top: 12px;
}

/* Small screens: each deal row becomes a card. Column order is fixed by the table format. */
@media (max-width: 760px) {
    .deal-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: none;
    }

    .gh-content .deal-table,
    .gh-content .deal-table-wrap .deal-table {
        display: block;
        min-width: 0;
        border: 0;
        border-radius: 0;
        background: none;
    }

    .gh-content .deal-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .gh-content .deal-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .gh-content .deal-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "type amount"
            "company company"
            "party party"
            "date sector";
        gap: 6px 12px;
        padding: 18px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--surface);
    }

    .gh-content .deal-table td,
    .gh-content .deal-table th:first-child,
    .gh-content .deal-table td:first-child,
    .gh-content .deal-table td:last-child {
        padding: 0;
        border: 0;
        background: none;
    }

    .gh-content .deal-table tbody tr:hover td {
        background: none;
    }

    .gh-content .deal-table td:nth-child(1) {
        grid-area: date;
        font-size: 13px;
    }

    .gh-content .deal-table td:nth-child(2) {
        grid-area: company;
        font-size: 18px;
        line-height: 1.3;
    }

    .gh-content .deal-table td:nth-child(3) {
        grid-area: type;
        align-self: center;
    }

    .gh-content .deal-table td:nth-child(4) {
        grid-area: amount;
        align-self: center;
        font-size: 22px;
        font-weight: 800;
    }

    .gh-content .deal-table td:nth-child(5) {
        grid-area: party;
        color: var(--text-2);
        font-size: 14px;
    }

    .gh-content .deal-table td:nth-child(5)::before {
        content: "Acquirer / lead: ";
        color: var(--text-3);
    }

    .gh-content .deal-table tr[data-kind="acq"] td:nth-child(5)::before {
        content: "Acquirer: ";
    }

    .gh-content .deal-table tr[data-kind="funding"] td:nth-child(5)::before {
        content: "Lead: ";
    }

    .gh-content .deal-table tr[data-kind="ipo"] td:nth-child(5)::before {
        content: "Venue: ";
    }

    /* Date and sector share the last line */
    .gh-content .deal-table td:nth-child(6) {
        grid-area: sector;
        justify-self: end;
        font-size: 13px;
        text-align: right;
    }

    .deal-table-wrap .deal-empty {
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--surface);
    }

    .stat-tiles {
        gap: 10px;
    }

    .stat {
        flex: 1 1 140px;
        padding: 16px 18px;
    }

    .stat__value {
        font-size: 28px;
    }

    .deal-controls__right,
    .field--search {
        width: 100%;
    }

    .field--search .field__input {
        width: 100%;
    }
}

/* 15. Topic / author / page heads
   ========================================================================== */
.topic-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-top: 32px;
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
}

.topic-hero__main {
    flex: 1 1 520px;
    min-width: 0;
}

.topic-hero__title {
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: clamp(40px, 3.4vw + 22px, 64px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    overflow-wrap: break-word;
}

.topic-hero__dek {
    max-width: 620px;
    color: var(--text-2);
    font-size: 18px;
    line-height: 1.5;
}

.topic-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topic-hero__actions .btn--outline {
    padding: 0 18px;
}

.author-hero {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.author-hero__avatar {
    flex: none;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border);
}

.author-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    color: var(--text-3);
    font-size: 14px;
}

.author-hero__meta a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-block: -12px;
    color: var(--accent);
    font-weight: 700;
}

.topic-stories {
    margin-top: 56px;
}

.topic-lead {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
}

.topic-lead__side {
    display: flex;
    flex: 1 1 340px;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.topic-lead__side:empty {
    display: none;
}

.topic-lead__side .post-card {
    flex: none;
}

.topic-lead__side .post-card__title {
    font-size: 19px;
}

.post-list--after-lead {
    margin-top: 24px;
}

.list-section {
    margin-top: 8px;
}

@media (max-width: 640px) {
    .topic-hero {
        gap: 24px;
        margin-top: 24px;
        padding: 24px;
        border-radius: var(--radius-lg);
    }

    .topic-hero__dek {
        font-size: 17px;
    }

    .topic-hero__actions {
        width: 100%;
    }

    .topic-hero__actions .btn--accent {
        flex: 1 1 auto;
    }

    .author-hero {
        flex-direction: column;
        gap: 16px;
    }

    .author-hero__avatar {
        width: 72px;
        height: 72px;
    }

    .topic-stories {
        margin-top: 40px;
    }
}

/* 16. Pagination, error, misc
   ========================================================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.pagination .btn {
    padding: 0 28px;
}

.pagination__count {
    flex-basis: 100%;
    color: var(--text-3);
    font-size: 13px;
    text-align: center;
}

.error-page {
    max-width: 720px;
    padding: 72px 0 24px;
}

.error-page__title {
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-size: clamp(40px, 3vw + 24px, 60px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.error-page__text {
    margin-bottom: 28px;
    color: var(--text-2);
    font-size: 18px;
}

.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.error-page__details {
    margin: 0 0 24px;
    color: var(--text-2);
    font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .site-header,
    .site-footer,
    .share,
    .cta-dark,
    .related,
    .deal-tools {
        display: none !important;
    }

    body {
        background: #FFFFFF;
    }
}
