/* Harri Docs — Ghost theme built to the Harri 2025 brand guidelines
   Colours: Harri Blue #0088DD, Teal Green #2EE3A0, Denim Blue #002237
   Type: Gilroy (headlines, buttons) with Poppins as the web fallback; Open Sans (body)
   --------------------------------------------------------------- */

:root {
    --harri-blue: #0088DD;
    --harri-blue-dark: #0072BA;
    --teal-green: #2EE3A0;
    --denim: #002237;

    --bg: #ffffff;
    --bg-soft: #f2f6f9;
    --surface: #f2f6f9;
    --card: #ffffff;
    --ink: #002237;
    --text: #33495a;
    --muted: #5c7080;
    --line: #e1e8ee;
    --line-strong: #c9d6e0;
    --tint-blue: #cce7f8;
    --tint-teal: #d5f9ec;
    --tint-denim: #ccd3d7;
    --accent: var(--harri-blue);

    --font-display: var(--gh-font-heading, "Gilroy", "Poppins", "Open Sans", Arial, sans-serif);
    --font-text: var(--gh-font-body, "Open Sans", Arial, sans-serif);
    --font-ui: var(--gh-font-heading, "Gilroy", "Poppins", "Open Sans", Arial, sans-serif);

    --wrap: 1200px;
    --gutter: clamp(20px, 4vw, 40px);
    --content-width: 720px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

html[data-scheme="dark"] {
    --bg: #002237;
    --bg-soft: #052c45;
    --surface: #0a3350;
    --card: #062b44;
    --ink: #f2f6f9;
    --text: #c9d6e0;
    --muted: #9fb3c2;
    --line: #164262;
    --line-strong: #23557a;
    --tint-blue: #0b4269;
    --tint-teal: #0d4a45;
    --tint-denim: #1a4566;
    color-scheme: dark;
}

/* Base
   --------------------------------------------------------------- */

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-text);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

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

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

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

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    padding: 10px 16px; background: var(--ink); color: var(--bg);
    font-family: var(--font-ui); border-radius: var(--radius-sm);
}
.skip-link:focus { top: 16px; }

/* Buttons
   --------------------------------------------------------------- */

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 22px;
    border: 0; border-radius: var(--radius-sm);
    background: var(--harri-blue); color: #fff;
    font-family: var(--font-ui); font-size: 1rem; font-weight: 700;
    text-decoration: none; cursor: pointer;
    transition: filter 0.15s ease;
}
.button:hover { background: var(--harri-blue-dark); }
.button-small { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }
.button-quiet { background: var(--surface); color: var(--ink); }
.button-quiet:hover { background: var(--line); }
.button-large { min-height: 56px; padding: 0 30px; font-size: 1.1875rem; }

.icon-button {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; padding: 0;
    border: 0; border-radius: 50%;
    background: transparent; color: var(--ink); cursor: pointer;
}
.icon-button:hover { background: var(--surface); }

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

.progress {
    position: fixed; inset: 0 0 auto; z-index: 60; height: 3px;
}
.progress-bar {
    display: block; height: 100%; width: 100%;
    background: var(--accent);
    transform: scaleX(var(--progress, 0)); transform-origin: left;
}

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg-soft) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex; align-items: center; gap: 32px;
    min-height: 80px;
}

.site-brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-logo { height: 40px; width: auto; min-height: 32px; }
.site-title {
    font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
    color: var(--harri-blue);
}

.site-nav { flex: 1; display: flex; justify-content: flex-end; font-family: var(--font-ui); }
.site-nav .nav {
    display: flex; flex-wrap: wrap; gap: 4px 32px;
    margin: 0; padding: 0; list-style: none;
}
.site-nav .nav a {
    font-size: 1rem; font-weight: 500; color: var(--ink); text-decoration: none;
}
.site-nav .nav a:hover, .site-nav .nav-current a { color: var(--harri-blue); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.site-nav + .header-actions { margin-left: 8px; }
.header-link {
    padding: 0 10px; font-family: var(--font-ui); font-size: 0.95rem; font-weight: 500;
    text-decoration: none; color: var(--ink);
}

.theme-toggle .icon-moon { display: none; }
html[data-scheme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-scheme="dark"] .theme-toggle .icon-moon { display: block; }
.theme-toggle span { display: grid; }

.menu-toggle { display: none; }

@media (max-width: 860px) {
    .menu-toggle { display: inline-grid; }
    .header-link { display: none; }
    .header-actions { margin-left: auto; }
    .site-nav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        padding: 20px var(--gutter) 28px;
        background: var(--bg); border-bottom: 1px solid var(--line);
    }
    .site-nav .nav { flex-direction: column; gap: 14px; }
    .site-nav .nav a { font-size: 1.15rem; color: var(--ink); }
    .menu-open .site-nav { display: block; }
}

/* Cards
   --------------------------------------------------------------- */

.card { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card-image {
    display: block; overflow: hidden;
    aspect-ratio: 3 / 2;
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }

.card-body { display: flex; flex-direction: column; gap: 8px; }

.card-kicker {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    font-family: var(--font-ui); font-size: 0.875rem; font-weight: 600;
}
.card-kicker:empty { display: none; }
.card-tag { color: var(--harri-blue-dark); text-decoration: none; }
.card-tag:hover { text-decoration: underline; }
.card-access {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--muted); font-weight: 500;
}

.card-title {
    margin: 0; color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.35rem; font-weight: 700;
    line-height: 1.18; letter-spacing: -0.015em;
    text-wrap: balance;
}
.card-title a { text-decoration: none; }
.card-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    text-decoration-color: var(--accent);
}

.card-excerpt {
    margin: 0; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.card-meta {
    display: flex; flex-wrap: wrap; gap: 4px 14px;
    margin: 4px 0 0;
    font-family: var(--font-ui); font-size: 0.875rem; color: var(--muted);
}
.card-author a { color: var(--ink); text-decoration: none; font-weight: 500; }

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

.feed, .related { padding-bottom: clamp(48px, 7vw, 96px); }

.section-title {
    display: flex; align-items: center; gap: 20px;
    margin: 0 0 32px;
    font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 56px clamp(24px, 3vw, 40px);
}
@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .post-grid { grid-template-columns: 1fr; gap: 44px; } }

.pagination {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-top: 64px;
    font-family: var(--font-ui);
}
.pagination-info { color: var(--muted); font-size: 0.95rem; }

/* Archive headers
   --------------------------------------------------------------- */

.archive-header { padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(36px, 5vw, 64px); }
.archive-kind { margin: 0 0 8px; font-family: var(--font-ui); font-weight: 600; color: var(--harri-blue-dark); }
.archive-title {
    margin: 0; color: var(--ink); max-width: 18ch;
    font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 700; line-height: 1; letter-spacing: -0.02em;
}
.archive-description { max-width: 60ch; margin: 20px 0 0; font-size: 1.2rem; color: var(--muted); }
.archive-count, .archive-links {
    display: flex; flex-wrap: wrap; gap: 6px 18px;
    margin: 20px 0 0; font-family: var(--font-ui); font-size: 0.95rem; color: var(--muted);
}
.archive-links a { color: var(--ink); }
.archive-avatar { width: 96px; height: 96px; margin-bottom: 24px; border-radius: 50%; object-fit: cover; }

/* Article
   --------------------------------------------------------------- */

.article { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(64px, 8vw, 112px); }

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

.article-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0 0 18px; }
.article-trail:not(:has(a)) { display: none; }
.article-trail .article-tag + .article-tag::before { content: "/"; margin: 0 10px; color: var(--muted); font-weight: 400; }
.article-tag {
    display: inline-block;
    font-family: var(--font-ui); font-weight: 600; color: var(--harri-blue-dark); text-decoration: none;
}
.article-title {
    margin: 0; color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.4vw, 3.75rem);
    font-weight: 700; line-height: 1.04; letter-spacing: -0.02em;
    text-wrap: balance;
}
.article-excerpt {
    margin: 22px 0 0;
    font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.45; color: var(--muted);
}

.article-byline { display: flex; align-items: center; gap: 14px; margin-top: 32px; font-family: var(--font-ui); }
.byline-avatars { display: flex; }
.avatar {
    display: grid; place-items: center; overflow: hidden;
    width: 48px; height: 48px; margin-right: -10px;
    border: 3px solid var(--bg); border-radius: 50%;
    background: var(--surface); text-decoration: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { color: var(--muted); }
.byline-avatars + .byline-text { margin-left: 10px; }
.byline-text { display: flex; flex-direction: column; line-height: 1.35; }
.byline-names a { font-weight: 600; text-decoration: none; }
.byline-detail { color: var(--muted); font-size: 0.925rem; }

.article-image { max-width: 1200px; margin: clamp(36px, 5vw, 56px) auto 0; padding-inline: var(--gutter); }
.article-image img { width: 100%; border-radius: var(--radius-lg); }
.article-image figcaption, .gh-content figcaption {
    margin-top: 12px;
    font-family: var(--font-ui); font-size: 0.9rem; color: var(--muted); text-align: center;
}

/* Content canvas (supports Ghost's wide and full-width cards)
   --------------------------------------------------------------- */

.gh-canvas {
    --main: min(var(--content-width), 100% - 2 * var(--gutter));
    --wide: minmax(0, calc((1100px - var(--content-width)) / 2));
    --full: minmax(var(--gutter), 1fr);
    display: grid;
    grid-template-columns:
        [full-start] var(--full)
        [wide-start] var(--wide)
        [main-start] var(--main) [main-end]
        var(--wide) [wide-end]
        var(--full) [full-end];
}
.gh-canvas > * { grid-column: main; }
.kg-width-wide { grid-column: wide; }
.kg-width-full { grid-column: full; }
.kg-width-full img { width: 100%; }

.gh-content { padding-top: clamp(40px, 5vw, 64px); font-size: 1.0625rem; line-height: 1.75; }
.gh-content > * + * { margin-top: 1.5em; margin-bottom: 0; }
.gh-content > :first-child { margin-top: 0; }

.gh-content h2, .gh-content h3, .gh-content h4 {
    color: var(--ink); font-family: var(--font-display); line-height: 1.2; letter-spacing: -0.015em;
}
.gh-content > h2 { margin-top: 2.2em; font-size: 1.85rem; font-weight: 700; }
.gh-content > h3 { margin-top: 1.8em; font-size: 1.45rem; font-weight: 700; }
.gh-content > h4 { margin-top: 1.6em; font-size: 1.2rem; font-weight: 700; }
.gh-content > h2 + *, .gh-content > h3 + *, .gh-content > h4 + * { margin-top: 0.7em; }

.gh-content a {
    color: var(--harri-blue-dark); font-weight: 600;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.gh-content a:hover { color: var(--ink); }

.gh-content ul, .gh-content ol { padding-left: 1.4em; }
.gh-content li + li { margin-top: 0.5em; }

.gh-content blockquote:not([class]) {
    margin-inline: 0; padding-left: 24px;
    border-left: 4px solid var(--teal-green);
    font-style: italic;
}
.gh-content blockquote.kg-blockquote-alt {
    margin-inline: 0; padding: 0;
    font-family: var(--font-display); font-size: 1.75rem; font-style: normal; font-weight: 600;
    line-height: 1.3; letter-spacing: -0.015em; text-align: center;
}

.gh-content hr { width: 100%; height: 2px; border: 0; background: var(--line); margin-block: 3em; }

.gh-content code {
    padding: 0.15em 0.4em; border-radius: 5px;
    background: var(--surface); font-size: 0.85em;
}
.gh-content pre {
    overflow-x: auto; padding: 22px 24px;
    border-radius: var(--radius-sm);
    background: #002237; color: #e6eef4;
    font-size: 0.9rem; line-height: 1.6;
}
.gh-content pre code { padding: 0; background: none; }

.gh-content table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 1rem; }
.gh-content th, .gh-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }

.gh-content .kg-image-card img, .gh-content .kg-gallery-image img { border-radius: var(--radius-sm); }
.gh-content .kg-width-full img { border-radius: 0; }
.gh-content .kg-callout-card, .gh-content .kg-toggle-card, .gh-content .kg-bookmark-card { font-family: var(--font-ui); }

/* Article footer
   --------------------------------------------------------------- */

.article-footer { margin-top: 64px; }
.author-box {
    display: flex; gap: 18px; align-items: flex-start;
    padding: 24px; border-radius: var(--radius-lg); background: var(--surface);
}
.author-box + .author-box { margin-top: 12px; }
.author-box-image { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; text-decoration: none; }
.author-box-bio { margin: 6px 0 0; color: var(--muted); font-size: 1rem; }

.article-comments { margin-top: 64px; }
.related { margin-top: clamp(64px, 9vw, 120px); }

/* Error page
   --------------------------------------------------------------- */

.error { padding-block: clamp(72px, 12vw, 160px); }
.error-code {
    margin: 0; font-family: var(--font-display); font-weight: 800;
    font-size: clamp(5rem, 16vw, 11rem); line-height: 0.9; color: var(--harri-blue);
}
.error-title { margin: 24px 0 0; font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.error-text { margin: 12px 0 32px; color: var(--muted); font-size: 1.15rem; }

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

.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--bg); }
.footer-inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px;
    padding-block: 32px;
}
.footer-copy { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.footer-nav .nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.footer-nav a:hover { color: var(--harri-blue); }

/* Homepage
   --------------------------------------------------------------- */

.hero {
    background: linear-gradient(180deg, var(--bg-soft) 0%, color-mix(in srgb, var(--bg-soft) 60%, var(--bg)) 100%);
    padding-block: clamp(48px, 7vw, 88px) clamp(56px, 7vw, 88px);
}
.hero-grid {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center; gap: clamp(32px, 5vw, 72px);
}
.hero-title {
    max-width: 17ch; margin: 0;
    color: var(--ink);
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(2.25rem, 4.4vw, 3.5rem); line-height: 1.1; letter-spacing: -0.015em;
    text-wrap: balance;
}
.hero-description {
    max-width: 52ch; margin: 24px 0 32px;
    font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); line-height: 1.7; color: var(--text);
}
.hero-art { display: flex; justify-content: center; }
.hero-art img, .hero-illustration { width: 100%; max-width: 480px; height: auto; }

.search-bar {
    display: flex; align-items: center; gap: 14px;
    width: 100%; min-height: 60px; margin-top: clamp(40px, 5vw, 56px); padding: 0 22px;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--card); color: var(--muted);
    font-family: var(--font-text); font-size: 1.0625rem; text-align: left;
    box-shadow: 0 1px 2px rgba(0, 34, 55, 0.04), 0 4px 16px rgba(0, 34, 55, 0.04);
    cursor: text;
}
.search-bar:hover { border-color: var(--line-strong); }
.search-bar svg { flex-shrink: 0; color: var(--muted); }

.docs { padding-block: clamp(56px, 7vw, 88px) clamp(72px, 9vw, 112px); }
.docs-title {
    margin: 0 0 36px; color: var(--ink);
    font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.2;
}
.docs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }

.doc-card {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 32px;
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    background: var(--card);
    transition: border-color 0.15s ease;
}
.doc-card:hover { border-color: var(--harri-blue); }
.doc-card:focus-within { border-color: var(--harri-blue); }

.doc-icon {
    display: grid; place-items: center; overflow: hidden;
    width: 60px; height: 60px; margin-bottom: 24px;
    border-radius: 12px;
    background: var(--tint-blue); color: var(--harri-blue);
}
.doc-icon img { width: 32px; height: 32px; object-fit: contain; }
.doc-card:nth-child(3n+2) .doc-icon { background: var(--tint-teal); color: var(--denim); }
.doc-card:nth-child(3n) .doc-icon { background: var(--tint-denim); color: var(--denim); }
html[data-scheme="dark"] .doc-card:nth-child(3n+2) .doc-icon,
html[data-scheme="dark"] .doc-card:nth-child(3n) .doc-icon { color: var(--teal-green); }

.doc-title {
    margin: 0; color: var(--ink);
    font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; line-height: 1.25;
}
.doc-title a { color: inherit; text-decoration: none; }
.doc-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.doc-title a:focus-visible { outline: none; }
.doc-title a:focus-visible::after { outline: 2px solid var(--harri-blue); outline-offset: 3px; }

.doc-description { margin: 12px 0 28px; color: var(--text); line-height: 1.7; }
.doc-link {
    display: inline-flex; align-items: center; gap: 6px; margin-top: auto;
    font-family: var(--font-ui); font-weight: 700; color: var(--harri-blue-dark);
}
.doc-link svg { transition: transform 0.15s ease; }
.doc-card:hover .doc-link svg { transform: translateX(3px); }

/* Listings on the About page */
.docs-listing { padding-block: clamp(32px, 4vw, 48px); }
.docs-listing + .docs-listing { padding-top: 0; }
.article:has(+ .docs-listing) { padding-bottom: 0; }
.docs-listing:last-of-type { padding-bottom: clamp(72px, 9vw, 112px); }
.docs-listing .doc-link { margin-top: auto; padding-top: 4px; }
.docs-listing .doc-card:nth-child(n) .doc-icon { background: var(--tint-teal); color: var(--denim); }
html[data-scheme="dark"] .docs-listing .doc-card:nth-child(n) .doc-icon { color: var(--teal-green); }

.quick-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.quick-link {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--card);
    font-family: var(--font-ui); font-size: 0.9375rem; font-weight: 600;
    color: var(--harri-blue-dark); text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.quick-link:hover { border-color: var(--harri-blue); background: var(--tint-blue); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.docs-listing .docs-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .docs-listing .docs-grid:has(> :nth-child(4):last-child) { grid-template-columns: 1fr; } }

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { order: -1; }
    .hero-art img, .hero-illustration { max-width: 360px; }
    .docs-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
@media (max-width: 480px) { .header-actions .button-quiet[data-portal="signin"] { padding-left: 10px; padding-right: 10px; } }

/* Sign-up and sign-in buttons */
.button-teal { background: var(--teal-green); color: var(--denim); }
.button-teal:hover { background: #1FCB8C; color: var(--denim); }
.button-outline { background: transparent; color: var(--harri-blue-dark); box-shadow: inset 0 0 0 2px var(--harri-blue); }
.button-outline:hover { background: var(--tint-blue); color: var(--harri-blue-dark); }
html[data-scheme="dark"] .button-outline { color: var(--ink); }
.hero-actions { margin-top: 8px; }
@media (max-width: 480px) { .hero-actions .button { width: 100%; } }
.header-actions .button { white-space: nowrap; }
@media (max-width: 480px) {
    .header-actions { gap: 6px; }
    .header-actions .button-small { min-height: 34px; padding: 0 10px; font-size: 0.8125rem; }
    .site-brand img, .site-logo { max-height: 28px; }
}

/* =================================================================
   1.1 refresh: dark header, dark homepage hero, Standard Integrations
   landing page. Scoped to .site-header, .hero, .si-* so post and page
   content (code, HTML, tables, cards) keeps its existing styles.
   ================================================================= */

:root { --night: #00101c; }

/* Header */
.site-header {
    background: color-mix(in srgb, var(--night) 94%, transparent);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
.site-header .site-logo { filter: brightness(0) invert(1); }
.site-header .site-title { color: #fff; }
.site-header .site-nav .nav a { color: rgba(255, 255, 255, 0.86); }
.site-header .site-nav .nav a:hover,
.site-header .site-nav .nav-current a { color: var(--teal-green); }
.site-header .icon-button { color: #fff; }
.site-header .icon-button:hover { background: rgba(255, 255, 255, 0.1); }
.site-header .header-link { color: #fff; }
.site-header .button { border-radius: 999px; }
.site-header .button-outline { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.site-header .button-outline:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
@media (max-width: 860px) {
    .site-header .site-nav { background: var(--night); border-bottom-color: rgba(255, 255, 255, 0.08); }
    .site-header .site-nav .nav a { color: #fff; }
}

/* Shared dark hero surface */
.hero,
.si-hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(1100px 560px at 88% 0%, rgba(0, 136, 221, 0.34), transparent 60%),
        radial-gradient(760px 460px at 4% 100%, rgba(46, 227, 160, 0.13), transparent 60%),
        var(--night);
}
.hero::before,
.si-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(#000, transparent 88%);
            mask-image: linear-gradient(#000, transparent 88%);
}
.hero > .wrap, .si-hero > .wrap { position: relative; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
    font-family: var(--font-ui); font-weight: 600; font-size: 0.78rem;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal-green);
}
.eyebrow::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--teal-green); box-shadow: 0 0 0 5px rgba(46, 227, 160, 0.18);
}

/* Homepage hero */
.hero { padding-block: clamp(64px, 9vw, 120px) clamp(64px, 8vw, 104px); }
.hero .hero-title { color: #fff; }
.hero .hero-title em, .si-hero h1 em { font-style: italic; color: var(--teal-green); }
.hero .hero-description { color: rgba(255, 255, 255, 0.78); }
.hero .button { border-radius: 999px; }
.hero .button-outline { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.hero .button-outline:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.hero .search-bar,
.si-hero .search-bar {
    background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.7); box-shadow: none;
}
.hero .search-bar:hover, .si-hero .search-bar:hover { border-color: rgba(255, 255, 255, 0.32); }
.hero .search-bar svg, .si-hero .search-bar svg { color: rgba(255, 255, 255, 0.6); }
.hero-text .search-bar { margin-top: 36px; max-width: 560px; }

/* Homepage floating panels */
.hero-panels { position: relative; width: 100%; max-width: 500px; min-height: 440px; }
.hp {
    position: absolute; border-radius: 18px; background: #fff; color: var(--denim);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55); font-family: var(--font-text);
}
.hp-code {
    top: 0; left: 0; width: 88%; overflow: hidden; background: #0a1b2a; color: #d8e4ee;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.hp-bar {
    display: flex; align-items: center; gap: 7px; padding: 13px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font: 500 0.75rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #8ba3b6;
}
.hp-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2b4357; }
.hp-bar span { margin-left: 10px; }
.hp-code pre {
    margin: 0; padding: 16px 20px 20px; background: none; border: 0; white-space: pre;
    font: 0.78rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: inherit;
}
.hp-code .k { color: #7cc4f5; } .hp-code .s { color: #ffd28a; } .hp-code .n { color: #9ae6c8; } .hp-code .c { color: #5f7a8f; }
.hp-event { right: 0; top: 270px; width: 300px; padding: 18px; }
.hp-row { display: flex; align-items: center; gap: 12px; }
.hp-dot {
    display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px;
    background: var(--tint-blue); color: #0069ab;
}
.hp-title { font-family: var(--font-ui); font-weight: 600; font-size: 0.92rem; line-height: 1.3; }
.hp-sub { font-size: 0.78rem; color: #5c7080; }
.hp-flow {
    display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px;
    border-top: 1px solid #e1e8ee; font-size: 0.78rem; color: #5c7080;
}
.hp-ok {
    margin-left: auto; padding: 4px 10px; border-radius: 999px; background: #d5f9ec; color: #05734c;
    font-family: var(--font-ui); font-weight: 600; font-size: 0.72rem; white-space: nowrap;
}
.hp-chip { left: 28px; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.hp-chip .hp-dot { background: var(--tint-teal); color: #05734c; }

/* Homepage docs cards: rounder, with a section label */
.docs .docs-label {
    display: block; margin-bottom: 10px; font-family: var(--font-ui); font-weight: 600;
    font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--harri-blue);
}
.docs .doc-card, .docs .doc-title a::after { border-radius: 20px; }

/* Standard Integrations landing page */
.si-hero { padding-block: clamp(56px, 8vw, 96px) clamp(48px, 6vw, 72px); }
.si-crumbs {
    display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px;
    font-family: var(--font-ui); font-weight: 500; font-size: 0.88rem; color: rgba(255, 255, 255, 0.6);
}
.si-crumbs a { color: inherit; text-decoration: none; } .si-crumbs a:hover { color: #fff; }
.si-crumbs strong { color: #fff; font-weight: 600; }
.si-hero h1 {
    margin: 0 0 16px; max-width: 820px; color: #fff;
    font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
    font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.08;
}
.si-lede { max-width: 640px; margin: 0 0 28px; color: rgba(255, 255, 255, 0.78); font-size: 1.1rem; line-height: 1.65; }
.si-hero .search-bar { max-width: 640px; }
.si-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.si-filters a {
    padding: 8px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap;
    font-family: var(--font-ui); font-weight: 500; font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.85); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.si-filters a:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); color: #fff; }
.si-filters a.is-all { background: var(--teal-green); color: var(--denim); box-shadow: none; font-weight: 600; }

.si-body { padding-block: clamp(48px, 7vw, 80px) clamp(64px, 9vw, 104px); background: var(--bg-soft); }
.si-label {
    display: block; font-family: var(--font-ui); font-weight: 600; font-size: 0.78rem;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--harri-blue);
}
.si-heading {
    margin: 10px 0 32px; color: var(--ink); font-family: var(--font-display); font-weight: 700;
    letter-spacing: -0.015em; font-size: clamp(1.7rem, 3.4vw, 2.2rem);
}
.si-heading em { color: var(--harri-blue); }
.si-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.si-cat {
    position: relative; display: flex; flex-direction: column; min-width: 0;
    padding: 26px 26px 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--card);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.si-cat:hover { border-color: var(--harri-blue); }
.si-cat.is-feature { grid-column: span 2; background: linear-gradient(135deg, var(--card) 55%, var(--tint-blue) 160%); }
.si-cat-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.si-icon {
    display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px;
    background: var(--tint-blue); color: var(--harri-blue-dark);
}
.si-cat:nth-child(3n+2) .si-icon { background: var(--tint-teal); color: #05734c; }
.si-cat:nth-child(3n) .si-icon { background: var(--tint-denim); color: var(--denim); }
html[data-scheme="dark"] .si-cat .si-icon { color: #fff; }
.si-cat h3 { margin: 0; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.3; color: var(--ink); }
.si-cat h3 a { color: inherit; text-decoration: none; }
.si-cat h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.si-cat h3 a:focus-visible { outline: none; }
.si-cat h3 a:focus-visible::after { outline: 2px solid var(--harri-blue); outline-offset: 3px; }
.si-cat p { flex: 1; margin: 0 0 18px; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.si-partners { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.si-partners li {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft);
    font-family: var(--font-ui); font-weight: 500; font-size: 0.78rem; color: var(--ink);
}
.si-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding-top: 16px; border-top: 1px solid var(--line);
    font-family: var(--font-ui); font-weight: 600; color: var(--harri-blue); font-size: 0.95rem;
}
.si-count { font-family: var(--font-text); font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.si-cat.is-all { grid-column: span 2; background: var(--denim); border-color: var(--denim); }
.si-cat.is-all h3 { color: #fff; } .si-cat.is-all p { color: rgba(255, 255, 255, 0.72); }
.si-cat.is-all .si-icon { background: var(--teal-green); color: var(--denim); }
.si-cat.is-all .si-foot { border-color: rgba(255, 255, 255, 0.12); color: var(--teal-green); }
.si-page-content { padding-top: clamp(40px, 6vw, 64px); }

@media (max-width: 860px) {
    .hero-panels { min-height: 400px; margin-inline: auto; }
    .si-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .si-cat.is-feature, .si-cat.is-all { grid-column: span 2; }
}
@media (max-width: 600px) {
    .hero-panels { min-height: 380px; }
    .hp-code { width: 100%; } .hp-code pre { font-size: 0.7rem; }
    .hp-event { width: 86%; top: 250px; } .hp-chip { left: 0; }
    .si-grid { grid-template-columns: 1fr; }
    .si-cat.is-feature, .si-cat.is-all { grid-column: auto; }
    .si-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .si-filters::-webkit-scrollbar { display: none; }
}
/* Keep the main menu on one line */
@media (min-width: 861px) {
    .site-nav .nav { flex-wrap: nowrap; white-space: nowrap; }
}
@media (min-width: 861px) and (max-width: 1180px) {
    .header-inner { gap: 20px; }
    .site-nav .nav { gap: 4px 20px; }
    .site-nav .nav a { font-size: 0.92rem; }
}
/* Small phones: let the brand shrink and move Sign In into the menu */
.nav-auth { display: none; }
.site-brand { min-width: 0; flex-shrink: 1; }
.site-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
    .site-logo { height: 32px; min-height: 0; max-width: 140px; object-fit: contain; object-position: left center; }
}
@media (max-width: 520px) {
    .header-inner { gap: 12px; }
    .header-actions { gap: 4px; flex-shrink: 0; }
    .header-actions .button[data-portal="signin"] { display: none; }
    .nav-auth { display: block; margin-top: 22px; }
    .nav-auth .button { width: 100%; }
    .site-header .icon-button { width: 36px; height: 36px; }
    .site-logo { height: 28px; max-width: 110px; }
    .site-title { font-size: 1.25rem; }
}
/* Phones: wide tables in posts scroll sideways instead of widening the page */
@media (max-width: 600px) {
    .gh-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
/* Phones and small tablets: headline first, panels stacked underneath */
@media (max-width: 860px) {
    .hero .hero-text { order: 1; }
    .hero .hero-art { order: 2; }
}
@media (max-width: 600px) {
    .hero-panels { display: grid; gap: 12px; min-height: 0; }
    .hero-panels .hp { position: relative; inset: auto; width: 100%; }
    .hp-code pre { overflow-x: auto; }
}
.si-grid { grid-auto-flow: dense; }

/* Export Templates page: same hero as Standard Integrations, wide content area */
.et-body .et-content { max-width: none; }
.et-body .et-content > * + * { margin-top: 1.25em; }
.et-body .et-content > p, .et-body .et-content > h2, .et-body .et-content > h3, .et-body .et-content > ul, .et-body .et-content > ol { max-width: 760px; }
.et-body { padding-top: clamp(36px, 5vw, 56px); }
.et-body .et-content > :first-child { margin-top: 0; }
.et-body .et-content { padding-top: 0; }
