/* Reesight theme · v1.0 · 2026-10-20 19:10 UTC · Co-Authored by Ajay and Claude */

/* Fonts are served from the theme, not Google: no third-party requests for EU visitors. SIL Open Font License. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations"), url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations"), url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2"); }

:root {
    --paper: #F2F4F6;
    --paper-raised: #FFFFFF;
    --ink: #1B2A41;
    --graphite: #5A6472;
    --line: #B9C3CF;
    --ochre: #B8862A;
    --ochre-ink: #8A6315;

    --serif: var(--gh-font-body, "Newsreader", Georgia, "Times New Roman", serif);
    --serif-head: var(--gh-font-heading, var(--serif));
    --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --step--1: 0.8125rem;
    --step-0: 1rem;
    --step-1: 1.1875rem;
    --step-2: 1.5rem;
    --step-3: 2rem;
    --step-4: 2.75rem;
    --step-5: 3.75rem;

    --gutter: clamp(1rem, 4vw, 2.5rem);
    --wrap: 72rem;
    --text: 40rem;
    --wide: 60rem;

    --ghost-accent-color: var(--ochre);
    --cta-bg: var(--ink);
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #111A27;
        --paper-raised: #182334;
        --ink: #E4E9F0;
        --graphite: #9AA5B4;
        --line: #33425A;
        --ochre: #D9A848;
        --ochre-ink: #E8C27A;
        --cta-bg: var(--paper-raised);
    }
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: var(--step-1);
    line-height: 1.6;
    font-optical-sizing: auto;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-color: var(--ochre); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ochre-ink); }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; border-radius: 2px; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-text { max-width: calc(var(--text) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; font-family: var(--sans); }
.skip-link:focus { left: 1rem; }

/* Header */
.site-head { padding: 1.25rem 0; font-family: var(--sans); font-size: var(--step--1); }
.site-head-inner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: var(--step-1); font-weight: 600; letter-spacing: -.005em; }
.mark { color: var(--ink); flex: none; }
.site-nav { margin-left: auto; }
.nav { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--graphite); font-weight: 500; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav .is-current a { color: var(--ink); border-bottom-color: var(--ochre); }
.soon { font-size: .6875rem; font-weight: 600; color: var(--ochre-ink); border: 1px solid currentColor; border-radius: 999px; padding: .05rem .4rem; margin-left: .2rem; vertical-align: 1px; }
.site-account a { color: var(--ink); font-weight: 600; text-decoration: none; }

.site-main { min-height: 60vh; }

/* Hero: the one bold element */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding-top: clamp(2rem, 7vw, 6rem); padding-bottom: clamp(2rem, 6vw, 5rem); }
.hero-title { text-wrap: balance; font-family: var(--serif-head); font-size: clamp(var(--step-4), 6vw, var(--step-5)); line-height: 1.04; font-weight: 500; letter-spacing: -.02em; margin: 0 0 1.5rem; max-width: 13ch; }
.hero-lede { font-size: var(--step-1); color: var(--ink); margin: 0 0 1rem; max-width: 34rem; }
.hero-note { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); margin: 0; }
.hero-figure { margin: 0; color: var(--ink); }
.hero-lines { width: 100%; height: auto; overflow: visible; }
.hero-label { font-family: var(--sans); font-size: 13px; }
.hero-label-strong { fill: var(--ochre-ink); font-weight: 600; }
.line-second { stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
    .line-second { stroke-dashoffset: 1; animation: draw 2.4s .4s cubic-bezier(.45, 0, .2, 1) forwards; }
    .hero-label-strong { opacity: 0; animation: appear .6s 2.6s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* Block titles */
.block-title { font-family: var(--sans); font-size: var(--step--1); font-weight: 600; color: var(--graphite); margin: 0 0 1.25rem; letter-spacing: .01em; }

/* Sections on home */
.sections { padding-top: 1rem; padding-bottom: 3.5rem; }
.section-list { border-top: 1px solid var(--line); }
.section-row { display: grid; grid-template-columns: 4.5rem minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.section-glyph { color: var(--ink); padding-top: .25rem; }
.section-name { font-family: var(--serif-head); font-size: var(--step-3); font-weight: 500; line-height: 1.1; margin: 0 0 .4rem; letter-spacing: -.01em; }
.section-name a { text-decoration: none; }
.section-name a:hover { text-decoration: underline; }
.section-desc { margin: 0; color: var(--graphite); max-width: 32rem; }
.section-latest { font-family: var(--sans); font-size: var(--step--1); padding-top: .6rem; }
.section-latest a { display: block; font-family: var(--serif); font-size: var(--step-1); line-height: 1.35; margin-top: .2rem; }
.latest-label { color: var(--graphite); }

/* Post lists */
.latest { padding-bottom: 4rem; }
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-item { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.post-item-link { text-decoration: none; display: flex; flex-direction: column; gap: .2rem; max-width: 44rem; }
.post-item-title { font-family: var(--serif-head); font-size: var(--step-2); line-height: 1.25; font-weight: 500; }
.post-item-link:hover .post-item-title { text-decoration: underline; text-decoration-color: var(--ochre); }
.post-item-excerpt { color: var(--graphite); font-size: var(--step-0); }
.post-item-meta { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); display: flex; gap: .9rem; flex: none; }
.post-item-section { color: var(--ink); font-weight: 500; }
.post-item-members { color: var(--ochre-ink); font-weight: 600; }
.empty { color: var(--graphite); font-style: italic; }

/* ValueD band */
.valued-band { background: var(--ink); color: var(--paper); padding: 3rem 0; }
.valued-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 2rem; align-items: baseline; }
.valued-band h2 { font-size: var(--step-2); font-weight: 500; margin: 0; }
.valued-band p { margin: 0; color: color-mix(in srgb, var(--paper) 78%, var(--ink)); }
.text-link { font-family: var(--sans); font-size: var(--step--1); font-weight: 600; color: inherit; white-space: nowrap; }
.valued-band .text-link:hover { color: var(--ochre); }

/* Section and topic headers */
.page-head { padding-top: clamp(2rem, 6vw, 4.5rem); padding-bottom: 2rem; }
.page-head-glyph { margin-bottom: .75rem; }
.page-title { font-family: var(--serif-head); font-size: clamp(var(--step-4), 5vw, var(--step-5)); font-weight: 500; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 .75rem; }
.page-lede { font-size: var(--step-2); line-height: 1.4; color: var(--graphite); margin: 0; max-width: 40rem; }
.pagination { font-family: var(--sans); font-size: var(--step--1); display: flex; justify-content: space-between; padding: 1.5rem 0 4rem; color: var(--graphite); }

/* Articles */
.article { padding-bottom: 3rem; }
.article-head { padding-top: clamp(2rem, 6vw, 4.5rem); padding-bottom: 2rem; }
.article-section { font-family: var(--sans); font-size: var(--step--1); font-weight: 600; color: var(--ochre-ink); text-decoration: none; }
.article-title { text-wrap: balance; font-family: var(--serif-head); font-size: clamp(2.25rem, 5.5vw, var(--step-5)); font-weight: 500; line-height: 1.06; letter-spacing: -.02em; margin: .5rem 0 1rem; }
.article-subtitle { font-size: var(--step-2); line-height: 1.4; color: var(--graphite); margin: 0 0 1.25rem; }
.article-meta { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 0; }
.article-image { margin-top: 0; margin-bottom: 2.5rem; }
.article-image figcaption, .gh-content figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); margin-top: .6rem; line-height: 1.5; }
.article-disclaimer { font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); border-left: 3px solid var(--ochre); padding: .25rem 0 .25rem 1rem; margin: 3rem 0 0; }
.more { padding-bottom: 4rem; }

/* Post content: Koenig cards live in a centred text column, wide and full cards break out */
.gh-content { display: grid; grid-template-columns: [full-start] minmax(var(--gutter), 1fr) [wide-start] minmax(0, calc((var(--wide) - var(--text)) / 2)) [main-start] min(var(--text), calc(100% - 2 * var(--gutter))) [main-end] minmax(0, calc((var(--wide) - var(--text)) / 2)) [wide-end] minmax(var(--gutter), 1fr) [full-end]; }
.gh-content > * { grid-column: main-start / main-end; margin-top: 0; margin-bottom: 1.4em; }
.gh-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.gh-content > .kg-width-full { grid-column: full-start / full-end; }
.gh-content > .kg-width-full img { width: 100%; }
.gh-content h2 { font-family: var(--serif-head); font-size: var(--step-3); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin-top: 1.6em; margin-bottom: .5em; }
.gh-content h3 { font-size: var(--step-2); font-weight: 600; line-height: 1.25; margin-top: 1.4em; margin-bottom: .4em; }
.gh-content p, .gh-content li { line-height: 1.68; }
.gh-content blockquote { margin-left: 0; padding-left: 1.25rem; border-left: 3px solid var(--ochre); font-style: italic; color: var(--ink); }
.gh-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.gh-content table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: var(--step--1); }
.gh-content th, .gh-content td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--line); }
.gh-content th { color: var(--graphite); font-weight: 600; }
.gh-content td { font-variant-numeric: tabular-nums; }
.gh-content code { font-size: .9em; background: var(--paper-raised); padding: .1em .3em; border-radius: 3px; }
.gh-content .kg-card { margin-bottom: 2em; }
.gh-content .chart { overflow: hidden; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 6px; padding: 1rem; }

/* Ghost's members call-to-action, recoloured to the site's ink */
.gh-post-upgrade-cta-content { background: var(--cta-bg) !important; border-radius: 6px; }
.gh-post-upgrade-cta .gh-btn { color: var(--ink) !important; background: var(--paper) !important; }
.gh-content .kg-html-card, .gh-content table { max-width: 100%; overflow-x: auto; }

/* Pages */
.valued-page .article-section { color: var(--ochre-ink); }
.error-page { padding: 6rem var(--gutter); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 2rem 0 3rem; font-family: var(--sans); font-size: var(--step--1); color: var(--graphite); }
.site-foot-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.foot-disclaimer { margin: 0; max-width: 36rem; }
.foot-links { margin: 0; display: flex; gap: 1.25rem; }

/* Narrow screens */
@media (max-width: 760px) {
    .site-nav { margin-left: 0; width: 100%; order: 3; }
    .nav { gap: 1.1rem; }
    .hero { grid-template-columns: 1fr; gap: 1.5rem; }
    .hero-figure { max-width: 26rem; }
    .section-row { grid-template-columns: 3.5rem minmax(0, 1fr); }
    .section-latest { grid-column: 2; padding-top: 0; }
    .section-glyph svg { width: 44px; height: 44px; }
    .post-item { flex-direction: column; gap: .4rem; }
    .valued-inner { grid-template-columns: 1fr; gap: .75rem; }
}
