/* Shared structure. Each site's stylesheet sets the tokens and its own personality. */
:root {
  --bg: #fff; --ink: #111; --muted: #666; --line: #e5e5e5; --card: #fff; --accent: #c00; --accent-ink: #fff;
  --font-display: Georgia, serif; --font-body: system-ui, sans-serif;
  --radius: 0px; --gutter: clamp(16px, 4vw, 48px); --max: 1320px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }
main { display: block; }

/* masthead */
.masthead { padding: 0 var(--gutter); max-width: var(--max); margin: 0 auto; text-align: center; }
.masthead__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.masthead__logo { display: inline-block; font-family: var(--font-display); line-height: .95; margin-top: 22px; }
.masthead__tag { color: var(--muted); margin: 8px 0 18px; }
.nav { display: flex; gap: 6px 26px; justify-content: center; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nav a { padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-color: var(--accent); }
.sources { display: inline-flex; align-items: center; gap: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #1fa45a; box-shadow: 0 0 0 0 rgba(31,164,90,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(31,164,90,0); } 100% { box-shadow: 0 0 0 0 rgba(31,164,90,0); } }

/* sections */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(36px, 6vw, 72px) var(--gutter) 0; }
.section__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 22px; }
.section__head h2 { font-size: clamp(28px, 4vw, 44px); }
.section__head .kicker { flex-basis: 100%; }
.section__more { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.page__head { max-width: 760px; margin-bottom: 28px; }
.page__head h1 { font-size: clamp(40px, 7vw, 76px); margin: 8px 0 12px; }
.page__head p { color: var(--muted); font-size: 18px; }
.page__head .kicker { color: var(--accent); font-size: 12px; }
.empty { padding: 40px 0; color: var(--muted); }
.disclosure { font-size: 14px !important; margin-top: 8px; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--card); transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip__n { font-size: 11px; opacity: .6; }

/* story cards */
.wire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 24px; }
.wire-grid--compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 48px; }
.story[hidden] { display: none; }
.story__link { display: flex; flex-direction: column; height: 100%; }
.story__media { margin: 0 0 14px; aspect-ratio: 3 / 2; overflow: hidden; background: var(--line); border-radius: var(--radius); }
.story__img, .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ph { background: linear-gradient(135deg, var(--accent) 0%, var(--ink) 100%); opacity: .85; }
.story__link:hover .story__img { transform: scale(1.04); }
.story__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
.story__source { font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; }
.story__topic::before, .story__meta time::before { content: "·"; margin-right: 10px; }
.story__title { font-size: 21px; line-height: 1.2; }
.story__link:hover .story__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.story__excerpt { margin-top: 8px; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story--wide { grid-column: span 2; }
.story--wide .story__title { font-size: 28px; }
.story--mini .story__link { flex-direction: row; gap: 14px; align-items: center; }
.story--mini .story__media { flex: none; width: 88px; aspect-ratio: 1; margin: 0; }
.story--mini .story__title { font-size: 17px; }
.no-img .story__media { display: none; }
@media (max-width: 640px) { .story--wide { grid-column: auto; } .story--wide .story__title { font-size: 22px; } }
.more { display: block; margin: 36px auto 0; padding: 14px 28px; border: 1px solid var(--ink); background: transparent; cursor: pointer; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; border-radius: var(--radius); }
.more:hover { background: var(--ink); color: var(--bg); }

/* tabs + partner cards */
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 20px; scrollbar-width: none; }
.tab { flex: none; padding: 8px 16px; border: 1px solid currentColor; border-radius: 999px; background: transparent; cursor: pointer; font-size: 14px; opacity: .65; }
.tab[aria-selected="true"] { opacity: 1; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rail, .carousel { scrollbar-width: thin; scrollbar-color: var(--line) transparent; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.rail[hidden] { display: none; }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 18px; margin-bottom: 44px; }
.group-title { font-size: 26px; margin: 8px 0 18px; }
.partner { display: flex; flex-direction: column; gap: 4px; scroll-snap-align: start; }
.partner__media { margin: 0 0 10px; aspect-ratio: 4 / 5; overflow: hidden; background: #f3f1ee; border-radius: var(--radius); }
.partner__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.partner:hover .partner__img { transform: scale(1.05); }
.partner__name { font-weight: 700; font-size: 15px; }
.partner__blurb { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* lens tiles */
.lens-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lens-tile { display: flex; flex-direction: column; justify-content: space-between; min-height: 130px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); transition: transform .25s, background .25s, color .25s; }
.lens-tile:hover { transform: translateY(-3px); background: var(--ink); color: var(--bg); }
.lens-tile__label { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.lens-tile__n { font-size: 13px; opacity: .65; }

/* archive posts */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 24px; margin-bottom: 40px; }
.post__media { margin: 0 0 14px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.post__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.post a:hover .post__img { transform: scale(1.04); }
.post__cat { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.post__title { font-size: 23px; }
.post__excerpt { color: var(--muted); font-size: 15px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* article */
.article { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 0; }
.article__head { text-align: center; margin-bottom: 32px; }
.article__head h1 { font-size: clamp(36px, 6vw, 64px); margin: 10px 0 14px; }
.article__date { color: var(--muted); font-size: 14px; }
.article__hero { margin: 0 calc(-1 * min(12vw, 160px)) 40px; border-radius: var(--radius); overflow: hidden; }
.article__hero img { width: 100%; max-height: 640px; object-fit: cover; }
.article__hero--small { margin: 0 auto 40px; max-width: 100%; width: fit-content; }
.article__hero--small img { width: auto; max-width: 100%; }
@media (max-width: 900px) { .article__hero { margin: 0 0 32px; } }
.prose { font-size: 19px; line-height: 1.75; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure { margin: 0 0 1.2em; }
.prose h2, .prose h3, .prose h4 { margin: 1.6em 0 .6em; font-size: 1.5em; }
.prose h3, .prose h4 { font-size: 1.25em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius); margin: 0 auto; height: auto; }
.prose figure img { width: 100%; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 1em; font-style: italic; }
.aside { border-top: 1px solid var(--line); margin-top: 64px; }

/* footer */
.footer { max-width: var(--max); margin: clamp(56px, 8vw, 110px) auto 0; padding: 48px var(--gutter) 36px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; }
.footer__logo { font-family: var(--font-display); font-size: 34px; }
.footer__brand p { color: var(--muted); margin-top: 10px; font-size: 15px; max-width: 420px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h4 { font-family: var(--font-body); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer__cols a { display: block; padding: 3px 0; font-size: 15px; }
.footer__cols a:hover { color: var(--accent); }
.footer__fine { grid-column: 1 / -1; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 20px; }
@media (max-width: 800px) { .footer { grid-template-columns: 1fr; } .footer__cols { grid-template-columns: 1fr 1fr; } }

/* reveal on scroll (app.js adds .in) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .nav { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; gap: 22px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .masthead__bar { justify-content: center; }
  .masthead__bar > span:first-child { display: none; }
}
