/* Generated from the headline theme (assets/css/screen.css): fonts, tokens, base, header, buttons, footer, mobile menu. */
/* Headline — original black-and-white news theme for Ghost (big headlines, big images). MIT.
   Layout patterns inspired by modern newsroom indexes; all CSS written from scratch. */

/* Inter (OFL), self-hosted. Unicode-range excludes CJK punctuation so Chinese text keeps full-width marks from the CJK font. */
@font-face { font-family: "Headline Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-2013, U+2015-2017, U+201A, U+201E-2025, U+2027-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Headline Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+A720-A7FF; }

:root {
    --bg: #ffffff;
    --ink: #000000;
    --ink-2: #5e5e5e;
    --ink-3: #8a8a8a;
    --line: #e5e5e5;
    --soft: #f3f3f3;
    --soft-2: #ebebeb;
    --media: #eeeeee;
    --code: #111111;
    --accent: #000000;

    --sans: "Headline Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    --font-heading: var(--gh-font-heading, var(--sans));
    --font-body: var(--gh-font-body, var(--sans));
    --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, "Noto Sans Mono CJK SC", monospace;

    --w-container: 1376px;
    --w-text: 780px;
    --w-media: 1200px;
    --gutter: clamp(24px, 2.25vw, 32px);
    --radius: 6px;
    --header-h: 64px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --card-ratio: 1 / 1;
}
.ratio-43 { --card-ratio: 4 / 3; }
.ratio-169 { --card-ratio: 16 / 9; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: var(--sans); font-size: 16px; line-height: 1.6; letter-spacing: -0.005em;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
    font-kerning: normal;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: rgba(0, 0, 0, .14); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.container { width: 100%; max-width: calc(var(--w-container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 40px; font-size: 13px; font-weight: 500; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 40px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; min-width: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; line-height: 1; }
.wordmark-logo { display: block; flex: none; width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.wordmark-logo--full { width: auto; height: 28px; max-width: 180px; border-radius: 0; }
.wordmark-text { overflow: hidden; text-overflow: ellipsis; }
.site-nav { display: flex; align-items: center; min-width: 0; }
.nav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 7px 12px; border-radius: 40px; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; transition: background-color .15s, color .15s; }
.nav a:hover { background: var(--soft); }
.nav .is-current a { background: var(--soft); }
.nav-cta { display: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: rgba(0, 0, 0, .72); transition: background-color .15s, color .15s; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 40px; font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0; white-space: nowrap; transition: background-color .15s, color .15s, opacity .15s; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: #2b2b2b; }
.btn-soft, .btn-outline { background: var(--soft); color: var(--ink); }
.btn-soft:hover, .btn-outline:hover { background: var(--soft-2); }
.btn-block { width: 100%; height: 48px; font-size: 15px; }
.menu-toggle { display: none; position: relative; }
.menu-toggle span { position: absolute; left: 11px; top: 50%; width: 18px; height: 1.5px; margin-top: -0.75px; background: currentColor; transition: transform .2s var(--ease); }
.menu-toggle span:first-child { transform: translateY(-4px); }
.menu-toggle span:last-child { transform: translateY(4px); }

/* ---------- Footer (light) ---------- */
.site-footer { margin-top: clamp(96px, 11vw, 160px); background: var(--bg); border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; padding: 56px 0 64px; }
.footer-title { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.footer-desc { margin: 10px 0 0; max-width: 360px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-col h3 { margin: 0 0 16px; font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-col ul + ul { margin-top: 12px; }
.footer-col .nav { flex-direction: column; gap: 12px; }
.footer-col .nav a, .footer-col a { display: inline; padding: 0; border-radius: 0; background: none; font-size: 14px; font-weight: 500; color: var(--ink); transition: color .15s; }
.footer-col a:hover, .footer-col .nav a:hover { color: var(--ink-2); background: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.footer-bottom a { color: var(--ink-2); }
.footer-bottom a:hover { color: var(--ink); }

/* ---------- Responsive (header + footer only) ---------- */
@media (max-width: 960px) {
    :root { --header-h: 56px; }
    .header-cta { display: none; }
    /* backdrop-filter would make the header the containing block of the fixed menu overlay */
    .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
    .menu-toggle { display: inline-block; }
    .header-actions { gap: 0; margin-right: -8px; }
    .site-nav {
        position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; margin: 0; padding: 20px var(--gutter) 40px;
        flex-direction: column; align-items: stretch; background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
        opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .18s var(--ease), visibility .18s;
    }
    .nav-open { overflow: hidden; }
    .nav-open .site-header { border-bottom-color: transparent; background: var(--bg); }
    .nav-open .site-nav { opacity: 1; pointer-events: auto; visibility: visible; }
    .site-nav .nav { flex-direction: column; gap: 0; }
    .site-nav .nav a { display: block; padding: 10px 0; border-radius: 0; background: none; font-size: 30px; font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; }
    .site-nav .nav .is-current a { background: none; color: var(--ink); }
    .site-nav .nav a:hover { background: none; color: var(--ink-2); }
    .nav-cta { display: block; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
    .nav-open .menu-toggle span:first-child { transform: rotate(45deg); }
    .nav-open .menu-toggle span:last-child { transform: rotate(-45deg); }
    .footer-top { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
    .wordmark { font-size: 16px; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
    .footer-bottom { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } html { scroll-behavior: auto !important; } }
