/* Lean Weekly. A timeline of news cards: each card is a whole item. Text and
   labels use the reader's system UI font (the stack LinkedIn uses), headlines
   Newsreader (Production Type, a typeface made for news), and logic symbols
   JuliaMono. Each topic has its own ink, on the card's avatar and label; the
   green turnstile marks the sources. */

@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-roman.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "JuliaMono"; src: url("fonts/juliamono-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #ffffff;
  --ink: #121212;
  --graphite: #5c5f66;
  --rule: #e6e6e6;
  --proof: #0b6e4f;
  --mark: #fff0a6;
  --wash: rgba(18, 18, 18, 0.045);
  --k-ai: #5b3cc4;
  --k-verification: #1f5fbf;
  --k-lean-core: #b3261e;
  --k-papers: #9a5b00;
  --k: var(--ink);
  --link: rgb(69, 109, 217);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Fira Sans", Ubuntu,
    Oxygen, "Oxygen Sans", Cantarell, "Droid Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Lucida Grande", Helvetica, Arial, sans-serif;
  --mono: "JuliaMono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --col: 720px;
  --search: 260px;
}
/* Night only when the reader picks it with the toggle (data-theme on <html>); day is the default. */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; --paper: #111214; --ink: #e9e9e6; --graphite: #a2a6ad; --rule: #2b2d31;
    --proof: #46c08b; --mark: #5c4d00; --wash: rgba(233, 233, 230, 0.07);
    --k-ai: #a996f2; --k-verification: #7fb0ff; --k-lean-core: #ff8a7a; --k-papers: #e0a34a;
    --link: #8fa9ee; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans);
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
code { font-family: var(--mono); font-size: 0.84em; }
mark { background: var(--mark); color: inherit; padding: 0 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 30; background: var(--paper); padding: 8px 12px; font: 600 14px var(--sans); }
.preview-strip { margin: 0; padding: 7px 16px; text-align: center; background: var(--ink); color: var(--paper);
  font: 500 12.5px/1.4 var(--sans); }
.preview-strip a { text-decoration: underline; }

/* Bar: wordmark, tagline, search; tabs under it */
.bar { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px); }
.bar-row { max-width: calc(var(--col) + 32px); margin: 0 auto; padding: 12px 16px 0;
  display: flex; align-items: center; gap: 16px; }
.brand { flex: 0 0 auto; display: flex; flex-direction: column; gap: 1px; }
/* The Lean logo (the FRO's file without its ™; its canvas has clear space
   around the letters, hence the negative margins), then "Weekly" in the site's face. */
.wordmark { display: inline-flex; align-items: center; gap: 0; width: max-content;
  font: 500 28px/1 var(--serif); font-variation-settings: "opsz" 72; letter-spacing: -0.012em; white-space: nowrap; }
.wordmark img { display: block; height: 34px; width: auto; margin: -2px -2.9px -2px -9px; }
.wordmark span { padding-top: 3px; }
.wordmark:hover { text-decoration: none; }
/* At night the logo's colors are inverted: white letters. */
:root[data-theme="dark"] .wordmark img { filter: invert(1); }
:root[data-theme="dark"] .theme .i-moon { display: none; }
:root[data-theme="dark"] .theme .i-sun { display: block; }

/* Day and night toggle */
.theme { flex: 0 0 auto; width: 38px; height: 38px; margin: 0 -6px 0 auto; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--graphite); cursor: pointer; }
.theme:hover { color: var(--ink); background: var(--wash); }
.theme .i-sun { display: none; }
.tagline { margin: 0; font: 400 13px/1.3 var(--sans); color: var(--graphite);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { max-width: calc(var(--col) + 32px); margin: 0 auto; padding: 0 16px; display: flex; align-items: stretch;
  overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 13px 9px 14px; font: 600 14px/1 var(--sans); color: var(--graphite);
  white-space: nowrap; }
.tabs a:first-child { margin-left: -9px; }
.tabs a:last-child { margin-right: -9px; }
.tabs a:hover { color: var(--ink); background: var(--wash); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 0; height: 4px;
  border-radius: 2px; background: var(--tab, var(--ink)); }
.tabs .t-ai { --tab: var(--k-ai); }
.tabs .t-verification { --tab: var(--k-verification); }
.tabs .t-lean-core { --tab: var(--k-lean-core); }
.tabs .t-papers { --tab: var(--k-papers); }
.tabs-gap { flex: 1; min-width: 12px; }
.tabs .quiet { font-weight: 500; }

/* Search */
.search { position: relative; flex: 1 1 auto; min-width: 0; max-width: var(--search); }
.theme[hidden] + .search { margin-left: auto; }
.search input { width: 100%; appearance: none; font: 400 14px/1.2 var(--sans); color: var(--ink);
  background: var(--wash); border: 1px solid transparent; border-radius: 999px; padding: 10px 40px 10px 16px; }
.search input::placeholder { color: var(--graphite); }
.search input:focus { outline: none; background: var(--paper); border-color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font: 500 11px/1 var(--sans); color: var(--graphite); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 6px;
  background: var(--paper); }
.search input:focus + kbd { display: none; }
.search-results { position: absolute; right: 0; top: calc(100% + 8px); width: min(440px, 92vw); z-index: 20;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16); padding: 4px 0; }
.search-results a { display: block; padding: 10px 16px; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--wash); text-decoration: none; }
.sr-kicker { display: block; font: 600 12px/1.3 var(--sans); color: var(--graphite); }
.sr-head { display: block; margin-top: 2px; font: 600 16px/1.3 var(--serif); }
.sr-all, .sr-none { border-top: 1px solid var(--rule); font: 600 13px/1.3 var(--sans); }
.sr-none { padding: 12px 16px; color: var(--graphite); font-weight: 400; border-top: 0; }

/* Frame: one centered column */
.frame { max-width: calc(var(--col) + 32px); margin: 0 auto; padding: 0 16px 80px; display: grid;
  grid-template-columns: minmax(0, var(--col)); justify-content: center; }
.timeline { border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); min-height: 70vh; }
.page-head { padding: 18px 18px 16px; border-bottom: 1px solid var(--rule); }
.page-title { margin: 0; font: 700 28px/1.15 var(--serif); letter-spacing: -0.016em; }
.page-blurb { margin: 6px 0 0; font: 400 14px/1.5 var(--sans); color: var(--graphite); }
.page-blurb.pad { padding: 0 18px; }

/* Cards */
.card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 12px; padding: 14px 18px 16px;
  border-bottom: 1px solid var(--rule); scroll-margin-top: 112px; }
.c-ai { --k: var(--k-ai); }
.c-verification { --k: var(--k-verification); }
.c-lean-core { --k: var(--k-lean-core); }
.c-papers { --k: var(--k-papers); }
.avatar { width: 40px; height: 40px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center;
  font: 400 20px/1 var(--mono); color: var(--k); background: color-mix(in srgb, var(--k) 11%, var(--paper));
  user-select: none; }
.card-main { min-width: 0; }
.card-head { margin: 0 0 3px; display: flex; align-items: center; min-height: 24px;
  font: 400 14px/1.3 var(--sans); color: var(--graphite); }
.card-head .topic { font-weight: 650; color: var(--k); white-space: nowrap; }
.card-head .sep { margin: 0 6px; }
.card-head .when { white-space: nowrap; }
.copy { margin: -4px -8px -4px auto; width: 32px; height: 32px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--graphite); cursor: pointer; }
.copy:hover { color: var(--k); background: color-mix(in srgb, var(--k) 12%, transparent); }
.copy.done { color: var(--proof); }
.card-title { margin: 0 0 4px; font: 650 20px/1.28 var(--serif); letter-spacing: -0.008em; text-wrap: pretty; }
.card-text { margin: 2px 0 10px; text-wrap: pretty; }
.card-title code, .card-text code { font-size: 0.82em; }
/* Links in the content: one blue (Soonho's pick), underlined on hover. */
.card-text a.inl, .proof a, .prose a, .page-blurb a { color: var(--link); }
.card-text a.inl:hover, .proof a:hover, .prose a:hover { text-decoration: underline; color: var(--link); }
.media { margin: 12px 0 10px; }
.media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border: 1px solid var(--rule); border-radius: 14px; background: var(--wash); }
.media-paper img { object-position: top; }
.credit { margin-top: 4px; font: 400 11px/1.3 var(--sans); color: var(--graphite); text-align: right; }
.proof { margin: 0; font: 400 12px/1.6 var(--mono); color: var(--graphite); overflow-wrap: anywhere; }
.proof .turnstile { color: var(--proof); font-size: 15px; line-height: 1; margin-right: 8px; vertical-align: -1px; }
.proof .dot { margin: 0 7px; }
.card:target { animation: lit 2.6s ease-out; }
@keyframes lit { from { background: color-mix(in srgb, var(--proof) 14%, transparent); } to { background: transparent; } }
.card.fresh { animation: rise 320ms ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.more { display: block; margin: 28px auto 0; width: max-content; padding: 11px 22px; border: 1px solid var(--rule);
  border-radius: 999px; font: 600 14px/1 var(--sans); }
.more:hover { background: var(--wash); text-decoration: none; }

/* By the numbers, on a week page that has them */
.box { margin: 14px 18px; padding: 14px 16px 6px; border-radius: 16px; background: var(--wash); }
.label { margin: 0 0 4px; font: 700 17px/1.2 var(--serif); }
.numbers { list-style: none; margin: 0; padding: 0; }
.numbers li a { display: block; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.numbers li:last-child a { border-bottom: 0; }
.numbers li a:hover { text-decoration: none; }
.numbers li a:hover .n-value { text-decoration: underline; text-decoration-thickness: 1px; }
.n-label { display: block; font: 500 12.5px/1.3 var(--sans); color: var(--graphite); }
.n-value { display: block; margin-top: 2px; font: 600 22px/1.15 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.n-unit { font: 400 12.5px var(--sans); color: var(--graphite); }
.delta { display: block; margin-top: 2px; font: 500 12px var(--sans); color: var(--graphite); }

/* Archive and about */
.weeks { list-style: none; margin: 0; padding: 0; }
.weeks li { display: grid; grid-template-columns: 112px 72px minmax(0, 1fr); gap: 14px; padding: 13px 18px;
  border-bottom: 1px solid var(--rule); align-items: baseline; }
.w-date { font: 600 14px var(--sans); }
.w-count { font: 400 13px var(--sans); color: var(--graphite); }
.w-lead { font: 400 16.5px/1.4 var(--serif); }
.prose { padding-bottom: 24px; }
.prose > :not(.page-head) { margin-left: 18px; margin-right: 18px; }
.prose h2 { margin-top: 26px; margin-bottom: 6px; font: 650 21px/1.25 var(--serif); }
.prose p { margin-top: 8px; margin-bottom: 8px; }
.prose a { text-underline-offset: 0.18em; }

/* Footer */
.foot-in { max-width: calc(var(--col) + 32px); margin: 0 auto; padding: 22px 16px 50px; text-align: center;
  font: 400 13px/1.7 var(--sans); color: var(--graphite); }
.foot-in p { margin: 0; }

/* Narrow screens */
@media (max-width: 760px) {
  .tagline { display: none; }
}
@media (max-width: 640px) {
  .bar { position: static; }
  .bar-row { padding-top: 10px; gap: 12px; }
  .wordmark { font-size: 23px; }
  .wordmark img { height: 29px; margin-left: -8px; }
  .wordmark span { font-size: 23px; }
  .search kbd { display: none; }
  .search input { padding-right: 16px; }
  .frame { padding: 0 0 60px; }
  .timeline { border-left: 0; border-right: 0; }
  .card { grid-template-columns: 36px minmax(0, 1fr); gap: 0 10px; padding: 12px 14px 14px; scroll-margin-top: 8px; }
  .avatar { width: 36px; height: 36px; font-size: 18px; }
  .card-title { font-size: 19px; }
  .media img { border-radius: 12px; }
  .page-head { padding: 16px 14px 14px; }
  .page-title { font-size: 25px; }
  .weeks li { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 14px; }
  .prose > :not(.page-head) { margin-left: 14px; margin-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .card.fresh, .card:target { animation: none; }
}
