/* =========================================================================
   mkozak.pl — theme styles
   --------------------------------------------------------------------- */

/* ---------- Tokens ---------- */
:root {
    /* Colors (light) */
    --bg: #FAF8F2;
    --surface: #F2EDE0;
    --text: #1A1815;
    --text-muted: #6B635A;
    --text-faint: #A39B91;
    --border: rgba(26, 24, 21, 0.10);
    --border-strong: rgba(26, 24, 21, 0.20);
    --accent: #BA7517;
    --accent-soft: rgba(186, 117, 23, 0.08);

    /* Type */
    --font-sans: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Layout */
    --wrap: 1080px;
    --read: 720px;
    --gutter: 24px;
    --radius: 6px;
    --radius-lg: 10px;

    /* Motion */
    --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* Dark mode — applied by either user toggle (data-theme="dark") or system pref */
[data-theme="dark"],
html.dark {
    --bg: #0F0D0A;
    --surface: #1A1814;
    --text: #F2EDE0;
    --text-muted: #A8A097;
    --text-faint: #6F665C;
    --border: rgba(242, 237, 224, 0.10);
    --border-strong: rgba(242, 237, 224, 0.20);
    --accent: #E8A040;
    --accent-soft: rgba(232, 160, 64, 0.10);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0F0D0A;
        --surface: #1A1814;
        --text: #F2EDE0;
        --text-muted: #A8A097;
        --text-faint: #6F665C;
        --border: rgba(242, 237, 224, 0.10);
        --border-strong: rgba(242, 237, 224, 0.20);
        --accent: #E8A040;
        --accent-soft: rgba(232, 160, 64, 0.10);
    }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

ul, ol { padding-left: 1.2em; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.viewport {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.site-main { flex: 1 0 auto; }

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

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

/* ---------- Site header ---------- */
.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    gap: 24px;
}
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    letter-spacing: -0.01em;
    font-size: 15px;
}
.site-brand__mark {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
    color: var(--text-muted);
}
.site-nav ul {
    display: flex;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a { transition: color 0.15s var(--ease); }
.site-nav a:hover { color: var(--text); }
.site-nav__cta {
    color: var(--text);
    font-weight: 500;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 6px 12px;
    transition: background 0.15s var(--ease);
}
.site-nav__cta:hover { background: var(--accent-soft); color: var(--text); }

.theme-toggle {
    width: 32px; height: 32px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.theme-toggle__sun, .theme-toggle__moon {
    width: 14px; height: 14px;
    background: currentColor;
    border-radius: 50%;
    position: relative;
}
.theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun,
html.dark .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon,
html.dark .theme-toggle__moon { display: block; }

/* ---------- Site footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 80px;
    padding: 28px 0;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.02em;
}
.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.site-footer__right {
    display: flex;
    gap: 18px;
}
.site-footer__right a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    padding: 11px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: transform 0.1s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero (homepage) ---------- */
.hero {
    padding: 80px 0 60px;
    border-bottom: 1px solid var(--border);
}
.hero__inner { max-width: var(--read); }
.hero__kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 18px;
}
.hero__headline {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw + 8px, 44px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin: 0 0 20px;
    color: var(--text);
}
.hero__sub {
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 28px;
    max-width: 56ch;
}
.hero__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.hero__notice {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    margin-left: 4px;
}

/* ---------- Expertise grid ---------- */
.expertise {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--border);
}
.expertise__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.expertise__card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    background: transparent;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.expertise__card:hover {
    border-color: var(--border-strong);
    background: var(--accent-soft);
}
.expertise__num {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--accent);
    display: block;
    margin-bottom: 10px;
}
.expertise__title {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 500;
    margin: 0 0 6px;
    letter-spacing: -0.005em;
}
.expertise__body {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
}

/* ---------- Post list / rows ---------- */
.post-list { padding: 60px 0 40px; }
.post-list__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.post-list__all {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}
.post-list__all:hover { color: var(--accent); }

.post-rows {
    list-style: none;
    margin: 0;
    padding: 0;
}
.post-row {
    border-top: 1px solid var(--border);
}
.post-row:last-child {
    border-bottom: 1px solid var(--border);
}
.post-row__link {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    padding: 22px 0;
    transition: background 0.15s var(--ease);
}
.post-row__link:hover { background: var(--accent-soft); }
.post-row__link:hover .post-row__title { color: var(--accent); }
.post-row__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-faint);
    text-transform: uppercase;
}
.post-row__tag { color: var(--accent); }
.post-row__title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.25;
    margin: 0 0 8px;
    color: var(--text);
    transition: color 0.15s var(--ease);
    letter-spacing: -0.01em;
}
.post-row__excerpt {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.55;
    max-width: 60ch;
}
.post-row__time {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 32px 0 0;
    margin-top: 16px;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
}
.pagination__link { color: var(--text-muted); }
.pagination__link:hover { color: var(--accent); }
.pagination__link--disabled { color: var(--text-faint); }
.pagination__counter { color: var(--text-faint); }

/* ---------- Post page ---------- */
.post {
    padding: 56px 0 0;
}
.post__header {
    max-width: var(--read);
    margin-bottom: 36px;
}
.post__tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}
.post__tag:hover { text-decoration: underline; text-underline-offset: 4px; }
.post__title {
    font-family: var(--font-serif);
    font-size: clamp(30px, 4vw + 10px, 48px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.018em;
    margin: 0 0 20px;
    color: var(--text);
}
.post__deck {
    font-family: var(--font-serif);
    font-size: 20px;
    line-height: 1.45;
    color: var(--text-muted);
    font-style: italic;
    margin: 0 0 24px;
    max-width: 60ch;
}
.post__meta {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-faint);
    display: flex;
    gap: 12px;
    align-items: center;
}
.post__sep { opacity: 0.5; }

.post__feature {
    margin: 0 0 48px;
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--gutter);
}
.post__feature-img {
    border-radius: var(--radius-lg);
}
.post__feature-caption {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    text-align: center;
    margin-top: 12px;
}

.post__body {
    max-width: var(--read);
}
.post__content {
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.7;
    color: var(--text);
}
.post__content > * + * { margin-top: 1.2em; }
.post__content p { margin: 0 0 1.2em; }
.post__content h2 {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.012em;
    margin: 2em 0 0.6em;
    color: var(--text);
}
.post__content h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 500;
    margin: 1.7em 0 0.5em;
    color: var(--text);
}
.post__content h4 {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 500;
    text-transform: none;
    margin: 1.5em 0 0.4em;
    color: var(--text);
}
.post__content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-thickness 0.15s var(--ease);
}
.post__content a:hover { text-decoration-thickness: 2px; }
.post__content blockquote {
    margin: 1.6em 0;
    padding: 0 0 0 24px;
    border-left: 2px solid var(--accent);
    font-style: italic;
    color: var(--text-muted);
}
.post__content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
}
.post__content pre {
    font-family: var(--font-mono);
    font-size: 14px;
    background: var(--surface);
    padding: 18px 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    line-height: 1.55;
    border: 1px solid var(--border);
}
.post__content pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
}
.post__content ul, .post__content ol {
    padding-left: 1.4em;
    margin: 0 0 1.2em;
}
.post__content li { margin-bottom: 0.4em; }
.post__content img,
.post__content figure {
    margin: 1.8em 0;
    border-radius: var(--radius);
}
.post__content hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 2.4em auto;
    width: 30%;
}

/* Tables */
.post__content table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 15px;
    margin: 1.6em 0;
}
.post__content th, .post__content td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.post__content th {
    font-weight: 500;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ---------- Conversion footer ---------- */
.post__footer {
    margin-top: 60px;
    padding-top: 0;
}
.post__footer .wrap {
    max-width: var(--read);
}

.cta-author {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px;
    align-items: flex-start;
    padding: 28px 0;
    border-top: 1px solid var(--border-strong);
    border-bottom: 1px solid var(--border);
}
.cta-author__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    overflow: hidden;
}
.cta-author__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cta-author__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.cta-author__name {
    font-weight: 500;
    font-size: 16px;
    color: var(--text);
}
.cta-author__role {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.cta-author__copy {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 14px;
    font-family: var(--font-sans);
}
.cta-author__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cta-newsletter {
    margin-top: 28px;
    padding: 22px 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.cta-newsletter__lead {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 4px;
}
.cta-newsletter__sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}
.cta-newsletter__form {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.cta-newsletter__input {
    font-family: var(--font-sans);
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    min-width: 220px;
    transition: border-color 0.15s var(--ease);
}
.cta-newsletter__input:focus {
    outline: none;
    border-color: var(--accent);
}

.related {
    margin-top: 36px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.related__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.related__card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.related__card:hover {
    border-color: var(--border-strong);
    background: var(--accent-soft);
}
.related__meta {
    display: flex;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.related__tag { color: var(--accent); }
.related__date { color: var(--text-faint); }
.related__title {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    color: var(--text);
}

/* ---------- Page (about, setup, etc) ---------- */
.page { padding: 56px 0 0; }
.page__header {
    max-width: var(--read);
    margin-bottom: 36px;
}
.page__title {
    font-family: var(--font-serif);
    font-size: clamp(30px, 4vw + 10px, 48px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.018em;
    margin: 0;
}
.page__body { max-width: var(--read); }
.page__content {
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.7;
}
.page__content p { margin: 0 0 1.2em; }
.page__content h2 {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 500;
    margin: 2em 0 0.6em;
}
.page__content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Consulting custom template ---------- */
.consulting-hero {
    padding: 72px 0 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
}
.consulting-hero__title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 5vw + 8px, 56px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    max-width: 22ch;
}
.consulting-hero__deck {
    font-family: var(--font-serif);
    font-size: 20px;
    line-height: 1.45;
    color: var(--text-muted);
    margin: 0 0 26px;
    max-width: 60ch;
}

.consulting-tail {
    margin-top: 64px;
    padding: 56px 0;
    border-top: 1px solid var(--border-strong);
    background: var(--surface);
}
.consulting-tail__inner {
    max-width: var(--read);
    text-align: center;
}
.consulting-tail__copy {
    font-family: var(--font-serif);
    font-size: 22px;
    line-height: 1.4;
    color: var(--text);
    margin: 0 0 22px;
}

/* ---------- Archive hero ---------- */
.archive-hero {
    padding: 72px 0 32px;
    border-bottom: 1px solid var(--border);
}
.archive-hero__eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 14px;
}
.archive-hero__title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 5vw + 8px, 52px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.018em;
    margin: 0 0 14px;
}
.archive-hero__deck {
    font-size: 17px;
    color: var(--text-muted);
    margin: 0;
    max-width: 60ch;
}

/* ---------- Error ---------- */
.error {
    padding: 120px 0;
    text-align: center;
}
.error__inner { max-width: 480px; margin: 0 auto; }
.error__code {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 14px;
}
.error__title {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 14px;
}
.error__sub {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0 0 28px;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
    body { font-size: 16px; }
    .hero { padding: 56px 0 40px; }
    .hero__sub { font-size: 16px; }

    .expertise { padding: 40px 0 30px; }
    .expertise__grid { grid-template-columns: 1fr; }

    .post-list { padding: 40px 0 30px; }
    .post-row__link { grid-template-columns: 1fr; gap: 8px; }
    .post-row__meta { flex-direction: row; gap: 10px; }

    .post { padding: 40px 0 0; }
    .post__content { font-size: 17px; line-height: 1.65; }
    .post__content h2 { font-size: 24px; }
    .post__content h3 { font-size: 20px; }

    .cta-author {
        grid-template-columns: 48px 1fr;
        gap: 14px;
    }
    .cta-author__avatar { width: 44px; height: 44px; }
    .cta-author__head { flex-direction: column; gap: 2px; }

    .cta-newsletter { flex-direction: column; align-items: stretch; }
    .cta-newsletter__form { width: 100%; }
    .cta-newsletter__input { flex: 1; min-width: 0; }

    .related__grid { grid-template-columns: 1fr; }

    .site-nav { gap: 14px; font-size: 13px; }
    .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------- Selection ---------- */
::selection {
    background: var(--accent);
    color: #fff;
}

/* ---------- Ghost custom fonts (admin-picked) ---------- */
/* Ghost 5+ injects --gh-font-heading and --gh-font-body when the user
   selects custom fonts in admin. We respect those overrides. */
.post__title,
.page__title,
.hero__headline,
.consulting-hero__title,
.archive-hero__title,
.error__title,
.post-row__title,
.related__title,
.post__content h2,
.post__content h3,
.page__content h2 {
    font-family: var(--gh-font-heading, var(--font-serif));
}
.post__content,
.page__content,
.post__deck,
.consulting-hero__deck,
.consulting-tail__copy {
    font-family: var(--gh-font-body, var(--font-serif));
}

/* ---------- Koenig editor cards ---------- */
/* Required by Ghost's editor for image, bookmark, gallery, callout, toggle,
   and button cards to render correctly. */

.kg-width-wide {
    position: relative;
    width: 85vw;
    max-width: 1080px;
    margin-left: 50%;
    transform: translateX(-50%);
}
.kg-width-full {
    position: relative;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}
.kg-width-full img { width: 100%; }

.kg-image-card { margin: 1.8em 0; }
.kg-image-card img { border-radius: var(--radius); }
.kg-image-card figcaption {
    font-family: var(--font-mono);
    font-size: 12px;
    text-align: center;
    color: var(--text-faint);
    margin-top: 10px;
}

.kg-embed-card { margin: 1.8em 0; }

.kg-gallery-card { margin: 1.8em 0; }
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kg-gallery-row {
    display: flex;
    gap: 8px;
}
.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.kg-bookmark-card {
    margin: 1.8em 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.15s var(--ease);
}
.kg-bookmark-card:hover { border-color: var(--border-strong); }
.kg-bookmark-container {
    display: flex;
    color: inherit;
    text-decoration: none;
}
.kg-bookmark-content {
    flex: 1;
    padding: 18px 20px;
    min-width: 0;
}
.kg-bookmark-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text);
}
.kg-bookmark-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kg-bookmark-metadata {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.kg-bookmark-icon { width: 14px; height: 14px; }
.kg-bookmark-thumbnail {
    flex-shrink: 0;
    max-width: 33%;
}
.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-callout-card {
    margin: 1.8em 0;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border-left: 3px solid var(--accent);
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.kg-callout-emoji {
    font-size: 22px;
    line-height: 1.4;
    flex-shrink: 0;
}
.kg-callout-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
}

.kg-toggle-card {
    margin: 1.8em 0;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.kg-toggle-heading {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    cursor: pointer;
}
.kg-toggle-content { padding-top: 12px; color: var(--text-muted); }

.kg-button-card { margin: 1.8em 0; text-align: center; }
.kg-btn {
    display: inline-flex;
    align-items: center;
    padding: 11px 18px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--bg);
    background: var(--text);
    border-radius: var(--radius);
    transition: background 0.15s var(--ease);
}
.kg-btn:hover { background: var(--accent); color: #fff; }
.kg-align-left { text-align: left; }
.kg-align-center { text-align: center; }

.kg-header-card {
    padding: 60px 24px;
    text-align: center;
    margin: 1.8em 0;
}

.kg-product-card,
.kg-file-card,
.kg-audio-card,
.kg-video-card {
    margin: 1.8em 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    background: var(--surface);
}

.kg-nft-card {
    margin: 1.8em 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
