/* GatherBee blog theme (2026-10-25), on top of Source 1.7.6's built/screen.css.
 * The look is the approved canvas "GatherBee Blog theme" (claude.ai/artifact/R2C7CKEK4Mb2tc72pwRXNF):
 * the GatherBee Design System's colours, Inter, flat panels edged by 1px borders, gold #FFC000 in both themes.
 * Source's stylesheet stays for Ghost's content cards (images, galleries, embeds…) and its lightbox;
 * everything the pages draw is gbb-*. Light or dark = html[data-theme], set before the page draws (default.hbs). */

/* ---------- Tokens: the design system's, dark and light ---------- */
html[data-theme="dark"] {
    --background: oklch(0.2183 0.0121 270.81);
    --foreground: oklch(1 0 0);
    --muted: oklch(0.2902 0.0154 252.36);
    --muted-foreground: oklch(0.665 0.0242 252.63);
    --accent: oklch(25.146% 0.01222 264.351);
    --border: oklch(0.4 0.018 259.83);
    --overlay: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
}
html[data-theme="light"] {
    --background: oklch(0.9911 0.0032 264.54);
    --foreground: oklch(0.2183 0.0121 270.81);
    --muted: oklch(0.9663 0.0045 264.53);
    --muted-foreground: oklch(0.5106 0.0198 264.36);
    --accent: oklch(0.9503 0.0045 264.53);
    --border: oklch(0.825 0.006 264.53);
    --overlay: rgba(0, 0, 0, 0.35);
    color-scheme: light;
}
html[data-theme] {
    --primary: oklch(0.8422 0.1727 84.58);              /* #FFC000, identical in both themes */
    --primary-hover: oklch(0.8664 0.155 87.04);
    --primary-foreground: oklch(0.2183 0.0121 270.81);  /* text on gold is always dark */
    --border-soft: color-mix(in oklch, var(--border) 50%, transparent);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --font-sans: "Inter", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 14px;
    --gbb-width: 1120px;
    --gbb-read: 720px;

    /* Source's own names, pointed at ours, so Ghost's content cards follow the theme. Higher than ghost_head's
       :root accent, so gold wins over the pink set in Ghost's settings. */
    --background-color: var(--background);
    --color-primary-text: var(--foreground);
    --color-secondary-text: var(--muted-foreground);
    --color-darker-gray: var(--foreground);
    --color-lighter-gray: var(--muted);
    --color-light-gray: var(--border);
    --color-mid-gray: var(--border);
    --color-border: var(--border);
    --color-dark-border: var(--muted-foreground);
    --ghost-accent-color: var(--primary);
    --font-serif: var(--font-sans);
    --gh-font-heading: var(--font-sans);
    --gh-font-body: var(--font-sans);
}

/* Show the logo/icon that suits the current theme. */
html[data-theme="dark"] .gbb-on-light,
html[data-theme="light"] .gbb-on-dark { display: none !important; }

/* ---------- Base ---------- */
html[data-theme] body {
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.gbb-viewport { min-height: 100vh; display: flex; flex-direction: column; }
.gbb-viewport a { color: inherit; text-decoration: none; }
.gbb-viewport a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gbb-icon { width: 20px; height: 20px; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Buttons: gold (the one action), outline (secondary). 40px, radius 10, like the design system's Button. */
.gbb-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px; border-radius: var(--radius-lg); border: 1px solid transparent;
    background: var(--primary); color: var(--primary-foreground);
    font: 600 14px/1 var(--font-sans); white-space: nowrap; cursor: pointer;
    transition: background-color .15s, transform .1s;
}
.gbb-viewport a.gbb-button:hover { text-decoration: none; background: var(--primary-hover); }
.gbb-button:active { transform: scale(0.97); }
.gbb-button .gbb-icon { width: 16px; height: 16px; }
.gbb-button--outline { background: var(--accent); color: var(--foreground); border-color: var(--border); font-weight: 500; }
.gbb-viewport a.gbb-button--outline:hover, .gbb-button--outline:hover { background: var(--muted); }
.gbb-button--sm { height: 36px; padding: 0 14px; }
.gbb-icon-button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-lg);
    background: transparent; color: var(--foreground); cursor: pointer;
}
.gbb-icon-button:hover { background: var(--muted); }
.gbb-icon-button > span { display: flex; }

/* The tag chip (design system Badge, "secondary"). */
.gbb-badge {
    display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
    border-radius: var(--radius-md); background: var(--muted); border: 1px solid var(--border);
    font-size: 12px; font-weight: 500; line-height: 1; color: var(--foreground);
}
.gbb-viewport a.gbb-badge:hover { text-decoration: none; border-color: var(--muted-foreground); }
.gbb-meta { margin: 0; font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

.gbb-wide { display: inline-flex; }
.gbb-narrow { display: none; }

/* ---------- Header ---------- */
/* Source styles .gh-navigation (100px tall, its own font size); ours keeps the name for Source's script only. */
.gbb-header.gh-navigation { height: auto; font-size: 16px; font-weight: 400; color: var(--foreground); }
.gbb-header {
    position: sticky; top: 0; z-index: 10;
    background: color-mix(in oklch, var(--background) 85%, transparent);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.gbb-header-inner {
    max-width: var(--gbb-width); margin: 0 auto; padding: 0 24px; height: 72px;
    display: flex; align-items: center; gap: 36px; box-sizing: border-box;
}
.gbb-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.gbb-logo { display: block; height: 28px; width: auto; }
.gbb-nav { align-self: stretch; display: flex; }
.gbb-nav .nav { display: flex; align-items: stretch; gap: 28px; margin: 0; padding: 0; list-style: none; }
.gbb-nav .nav li { display: flex; margin: 0; padding: 0; }
.gbb-nav .nav a {
    display: flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--muted-foreground);
}
.gbb-nav .nav a:hover { color: var(--foreground); text-decoration: none; }
.gbb-nav .nav-current a { color: var(--foreground); box-shadow: inset 0 -2px 0 var(--primary); }
.gbb-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.gbb-actions .gbb-button { margin-left: 8px; }

/* Phone menu (opened by the menu button; gatherbee.js). */
.gbb-menu {
    position: fixed; top: 73px; right: 0; bottom: 0; left: 0; z-index: 9;
    background: var(--background); padding: 24px 20px; box-sizing: border-box;
    flex-direction: column; gap: 4px; overflow-y: auto;
}
.gbb-menu:not([hidden]) { display: flex; }
.gbb-menu-nav .nav { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.gbb-menu-nav .nav li { margin: 0; }
.gbb-menu-nav .nav a {
    display: block; padding: 12px 0; font-size: 22px; font-weight: 600; color: var(--muted-foreground);
    border-bottom: 1px solid var(--border-soft);
}
.gbb-menu-nav .nav-current a { color: var(--foreground); }
.gbb-menu-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 24px; }
.gbb-menu-label { font-size: 12px; color: var(--muted-foreground); }
.gbb-menu-bottom .gbb-button { width: 100%; height: 44px; }
.gbb-theme-toggle--labelled > span { display: inline-flex; align-items: center; gap: 8px; }
.gbb-theme-toggle--labelled .gbb-icon { width: 18px; height: 18px; }
.gbb-menu-toggle .gbb-when-open, html.gbb-menu-open .gbb-menu-toggle .gbb-when-closed { display: none; }
html.gbb-menu-open .gbb-menu-toggle .gbb-when-open { display: flex; }
html.gbb-menu-open { overflow: hidden; }

/* ---------- Page body ---------- */
.gbb-main {
    flex: 1; width: 100%; max-width: var(--gbb-width); margin: 0 auto; box-sizing: border-box;
    padding: 64px 24px 112px; display: flex; flex-direction: column; gap: 64px;
}
.gbb-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: var(--gbb-read); }
.gbb-hero-title {
    margin: 0; font-size: 52px; line-height: 1.05; font-weight: 700; letter-spacing: -0.035em;
    text-wrap: balance; color: var(--foreground);
}
.gbb-hero--small .gbb-hero-title { font-size: 40px; }
.gbb-hero-description { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted-foreground); }

/* The newest post, big. */
.gbb-feature {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px; align-items: center;
    padding: 20px; background: var(--accent); border-radius: var(--radius-xl);
}
.gbb-feature-image {
    grid-column: span 7; display: block; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border); aspect-ratio: 1200 / 630; background: var(--muted);
}
.gbb-feature-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gbb-feature-text { grid-column: span 5; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-right: 16px; }
.gbb-feature-kicker { display: flex; align-items: center; gap: 10px; }
.gbb-feature-label { font-size: 12px; color: var(--muted-foreground); }
.gbb-feature-title {
    margin: 0; font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em;
    text-wrap: balance; color: var(--foreground);
}
.gbb-feature-excerpt { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted-foreground); }

/* A section with a title row, then a grid of posts. */
.gbb-section { display: flex; flex-direction: column; gap: 24px; }
.gbb-section-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.gbb-section-title { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; color: var(--foreground); }
.gbb-section-note { font-size: 13px; color: var(--muted-foreground); }
.gbb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.gbb-card-link { display: flex; flex-direction: column; gap: 12px; }
.gbb-viewport a.gbb-card-link:hover { text-decoration: none; }
.gbb-card-link:hover .gbb-card-title { text-decoration: underline; text-underline-offset: 3px; }
.gbb-card-image {
    margin: 0; aspect-ratio: 1200 / 630; border-radius: var(--radius-lg); overflow: hidden;
    background: var(--accent); border: 1px solid var(--border);
}
.gbb-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gbb-card-tag { font-size: 12px; color: var(--muted-foreground); }
.gbb-card-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; color: var(--foreground); }
.gbb-card-excerpt {
    margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted-foreground);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gbb-card .gbb-meta { font-size: 12px; }
.gbb-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.gbb-more .gbb-icon { width: 16px; height: 16px; }

/* ---------- A post ---------- */
.gbb-main--article { padding-top: 48px; gap: 0; }
.gbb-article { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.gbb-article-header { width: 100%; max-width: var(--gbb-read); display: flex; flex-direction: column; gap: 20px; }
.gbb-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }
.gbb-viewport a.gbb-back:hover { color: var(--foreground); }
.gbb-back .gbb-icon { width: 16px; height: 16px; }
.gbb-article-title {
    margin: 0; font-size: 50px; line-height: 1.06; font-weight: 700; letter-spacing: -0.035em;
    text-wrap: balance; color: var(--foreground);
}
.gbb-article-excerpt { margin: 0; font-size: 20px; line-height: 1.55; color: var(--muted-foreground); text-wrap: pretty; }
.gbb-byline { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; }
.gbb-byline-who { display: flex; align-items: center; gap: 12px; }
.gbb-avatar {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 9999px; overflow: hidden;
    background: var(--accent); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
}
.gbb-avatar img { width: 26px; height: 26px; display: block; }
.gbb-avatar img[src*="/content/images/"] { width: 100%; height: 100%; object-fit: cover; }
.gbb-byline-text { display: flex; flex-direction: column; line-height: 1.35; }
.gbb-byline-name { font-size: 14px; font-weight: 600; }
.gbb-byline-name a { color: inherit; }
.gbb-article-image { margin: 0; width: 100%; max-width: 1040px; }
.gbb-article-image img {
    display: block; width: 100%; height: auto; border-radius: var(--radius-xl); border: 1px solid var(--border);
}
.gbb-article-image figcaption { margin-top: 10px; font-size: 13px; color: var(--muted-foreground); text-align: center; }

/* The text of a post. gh-content keeps Ghost's cards working; these win over Source's sizes. */
.gbb-content.gh-content {
    width: 100%; max-width: var(--gbb-read); display: flex; flex-direction: column; gap: 24px;
    font-size: 18px; line-height: 1.75; color: var(--foreground); font-family: var(--font-sans);
}
.gbb-content.gh-content > * { margin: 0 !important; }
.gbb-content.gh-content > h2 {
    margin-top: 24px !important; font-size: 27px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em;
}
.gbb-content.gh-content > h3 { margin-top: 12px !important; font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.gbb-content.gh-content > h4 { font-size: 18px; font-weight: 600; }
.gbb-content.gh-content a { color: var(--foreground); text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.gbb-content.gh-content ul,
.gbb-content.gh-content ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 10px; }
.gbb-content.gh-content li { margin: 0; padding-left: 4px; }
.gbb-content.gh-content li::marker { color: var(--primary); font-weight: 700; }
.gbb-content.gh-content :not(pre) > code {
    font-family: var(--font-mono); font-size: .85em; padding: 2px 6px; border-radius: 6px;
    background: var(--muted); border: 1px solid var(--border); color: var(--foreground);
}
.gbb-content.gh-content pre { border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--accent); color: var(--foreground); }
.gbb-content.gh-content hr { border: 0; border-top: 1px solid var(--border); }
/* A quote: a panel with the gold quote mark (no coloured edge rail). The mark is drawn by CSS so the
   writer just uses Ghost's quote block. */
.gbb-content.gh-content blockquote:not([class]) ,
.gbb-content.gh-content blockquote.kg-blockquote-alt {
    margin: 16px 0 !important; padding: 28px 32px; border: 0; border-radius: var(--radius-xl);
    background: var(--accent); font-size: 23px; line-height: 1.45; font-weight: 600; font-style: normal;
    letter-spacing: -0.01em; text-align: left; color: var(--foreground);
}
.gbb-content.gh-content blockquote:not([class])::before,
.gbb-content.gh-content blockquote.kg-blockquote-alt::before {
    content: ""; display: block; width: 28px; height: 28px; margin-bottom: 12px; background: var(--primary);
    -webkit-mask: url("../images/quote.svg") center / contain no-repeat;
    mask: url("../images/quote.svg") center / contain no-repeat;
}
.gbb-content.gh-content blockquote p { margin: 0; }
.gbb-content.gh-content figcaption { font-size: 13px; color: var(--muted-foreground); }
.gbb-content.gh-content .kg-card img { border-radius: var(--radius-lg); }

.gbb-article-footer {
    width: 100%; max-width: var(--gbb-read); display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid var(--border);
}
.gbb-filed { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gbb-article-footer .gbb-back { color: var(--foreground); }
.gbb-comments { width: 100%; max-width: var(--gbb-read); margin: 48px auto 0; }

/* ---------- Footer ---------- */
.gbb-footer.gh-footer { margin-top: 0; font-size: 16px; border-top: 1px solid var(--border); background: var(--background); color: var(--foreground); padding: 0; }
.gbb-footer-inner {
    max-width: var(--gbb-width); margin: 0 auto; padding: 40px 24px 32px; box-sizing: border-box;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.gbb-footer-brand { display: flex; flex-direction: column; gap: 10px; }
.gbb-footer-logo { display: block; height: 30px; width: auto; }
.gbb-footer-description { font-size: 14px; color: var(--muted-foreground); }
.gbb-footer-nav { display: flex; gap: 24px; }
.gbb-footer-nav .nav { display: flex; flex-wrap: wrap; gap: 24px; margin: 0; padding: 0; list-style: none; }
.gbb-footer-nav .nav li { margin: 0; }
.gbb-footer-nav .nav a { font-size: 14px; color: var(--muted-foreground); }
.gbb-footer-nav .nav a:hover { color: var(--foreground); }
.gbb-footer-bottom {
    width: 100%; padding-top: 20px; border-top: 1px solid var(--border-soft);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
}
.gbb-footer-copyright { margin: 0; font-size: 12px; color: var(--muted-foreground); }
.gbb-footer-legal .nav { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; list-style: none; }
.gbb-footer-legal .nav li { margin: 0; }
.gbb-footer-legal .nav a { font-size: 12px; color: var(--muted-foreground); }
.gbb-footer-legal .nav a:hover { color: var(--foreground); }

/* ---------- Phone ---------- */
@media (max-width: 720px) {
    .gbb-wide { display: none !important; }
    .gbb-narrow { display: inline-flex; }
    .gbb-nav { display: none; }
    .gbb-header-inner { gap: 12px; padding: 0 16px 0 20px; }
    .gbb-logo { height: 24px; }
    .gbb-main { padding: 32px 20px 64px; gap: 40px; }
    .gbb-main--article { padding-top: 28px; }
    .gbb-hero-title { font-size: 34px; }
    .gbb-hero--small .gbb-hero-title { font-size: 30px; }
    .gbb-feature { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 16px; }
    .gbb-feature > * { grid-column: auto; }
    .gbb-feature-text { padding: 0 4px 8px; }
    .gbb-feature-title { font-size: 26px; }
    .gbb-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .gbb-article { gap: 28px; }
    .gbb-article-title { font-size: 34px; }
    .gbb-article-excerpt { font-size: 18px; }
    .gbb-content.gh-content { font-size: 17px; }
    .gbb-content.gh-content > h2 { font-size: 23px; }
    .gbb-content.gh-content blockquote:not([class]),
    .gbb-content.gh-content blockquote.kg-blockquote-alt { padding: 22px; font-size: 20px; }
}
@media (min-width: 721px) and (max-width: 1000px) {
    .gbb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gbb-feature-image { grid-column: span 12; }
    .gbb-feature-text { grid-column: span 12; padding: 0 8px 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .gbb-button { transition: none; }
    .gbb-button:active { transform: none; }
}
