/* The Little Headlines.
   Layout idea: a warm off-white page with bold, flat colour cards (one colour per
   topic), friendly shape characters, pill buttons and floating stickers.
   Cards show only a picture and a headline so the page stays clean. */
:root {
  --page: #f6f1ee;
  --surface: #ffffff;
  --text: #161616;
  --muted: #6e6762;
  --line: rgba(22, 22, 22, .12);
  --ink: #161616;
  --yellow: #ffbd14;
  --pink: #ff8cc6;
  --display: 'Bricolage Grotesque', 'Arial Black', 'Helvetica Neue', sans-serif;
  --body: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r-xl: 36px;
  --r-lg: 28px;
  --r-md: 22px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 17px/1.55 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
main { overflow-x: clip; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 12px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 28px; } }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; }
.muted { color: var(--muted); }
.ico { display: block; flex: 0 0 auto; }
.char { display: block; overflow: visible; }

/* Scroll progress */
.progress { position: fixed; inset: 0 0 auto; height: 4px; z-index: 40; background: linear-gradient(90deg, #ff8cc6, #ffbd14, #12904a, #1f5fe6, #9c6ad6); transform-origin: 0 50%; transform: scaleX(0); }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: rgba(246, 241, 238, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px 6px; transition: padding .4s var(--ease); }
.scrolled .header-row { padding-block: 8px 2px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.35rem/1 var(--display); letter-spacing: -.04em; }
.logo .mark { transition: transform .8s var(--ease); }
.logo:hover .mark { transform: rotate(90deg) scale(1.08); }

/* Pills and round buttons */
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 8px 6px 20px; border-radius: 999px; border: 1.5px solid transparent; font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer; background: none; transition: transform .35s var(--ease), background .25s, color .25s; white-space: nowrap; }
.pill:not(:has(.round)) { padding-right: 20px; }
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: scale(.97); }
.pill-solid { background: var(--ink); color: #fff; }
.pill-line { border-color: currentColor; }
.pill-ghost { border-color: var(--line); background: var(--surface); padding-right: 18px; }
.pill-on-card { border-color: currentColor; }
.pill-warn { background: #ff6324; color: var(--ink); min-height: 36px; }
.round { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--ink); transition: transform .5s var(--ease); }
.pill:hover .round { transform: rotate(45deg); }
.pill-on-card .round { background: var(--fg); color: var(--bg); }

/* Topic nav */
.cats-row { display: flex; gap: 8px; overflow-x: auto; padding-block: 8px 14px; scrollbar-width: none; }
.cats-row::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 5px 16px 5px 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .95rem; transition: background .3s, color .3s, border-color .3s, transform .35s var(--ease); }
.cat:hover { border-color: var(--bg); transform: translateY(-2px); }
.cat.on { background: var(--bg); color: var(--fg); border-color: var(--bg); }
.dot { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--fg); }
.cat.on .dot { background: var(--fg); color: var(--bg); }

/* Intro */
.intro { position: relative; overflow: hidden; }
.intro-inner { position: relative; padding-block: clamp(48px, 10vh, 110px) clamp(48px, 9vh, 96px); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.mega { font: 800 clamp(3.1rem, 11vw, 9.6rem)/.9 var(--display); letter-spacing: -.055em; }
.intro-title .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.intro-title .ln > span { display: inline-block; animation: rise 1.1s var(--ease) both; }
.intro-title .ln:nth-child(2) > span { animation-delay: .09s; }
.intro-title .ln:nth-child(3) > span { animation-delay: .18s; }
@keyframes rise { from { transform: translateY(105%); } }
.intro-title em { font-style: normal; display: inline-block; background: var(--pink); color: var(--ink); border-radius: 999px; padding: 0 .28em .04em; transform: rotate(-3deg); }
.intro-sub { max-width: 34ch; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); margin-top: 26px; animation: fade 1.2s .35s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } }

.floaters { position: absolute; inset: 0; pointer-events: none; }
.fl { position: absolute; will-change: transform; }
.fl-1 { right: 4%; top: 10%; width: clamp(110px, 13vw, 160px); }
.fl-2 { right: 24%; top: 6%; }
.fl-3 { right: 6%; bottom: 14%; }
.fl-4 { right: 30%; bottom: 8%; }
.fl-5 { right: 17%; top: 40%; }
.fl-6 { right: 3%; top: 50%; }
.fl > * { animation: bob 6s ease-in-out infinite; }
.fl-2 > * { animation-delay: -2s; }
.fl-3 > * { animation-delay: -4s; }
.fl-4 > * { animation-delay: -1s; }
.fl-5 > * { animation-delay: -3s; }
.fl-6 > * { animation-delay: -5s; }
@keyframes bob { 50% { transform: translateY(-12px) rotate(4deg); } }

.burst { position: relative; display: inline-grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 100%; color: var(--fg); }
.burst svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--bg); }
.burst.spin svg { animation: spin 22s linear infinite; }
.burst b { position: relative; font: 800 clamp(.8rem, 1.3vw, 1.05rem)/1 var(--display); text-align: center; text-transform: uppercase; letter-spacing: -.01em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ticker */
.ticker-wrap { overflow: hidden; padding-block: 18px 70px; }
.ticker { overflow: hidden; background: var(--ink); color: #fff; transform: rotate(-2deg); margin-inline: -20px; padding-block: 14px; }
.ticker-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.ticker-track > span { display: inline-flex; align-items: center; gap: 20px; padding-right: 20px; font: 800 clamp(1.4rem, 3vw, 2.2rem)/1 var(--display); letter-spacing: -.03em; white-space: nowrap; }
.ticker-track .ico { color: var(--yellow); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Category header */
.cat-head { background: var(--bg); color: var(--fg); border-radius: 0 0 var(--r-xl) var(--r-xl); margin-bottom: 40px; overflow: hidden; }
.cat-head-row { position: relative; display: grid; gap: 14px; padding-block: clamp(48px, 9vh, 96px); }
.cat-head-char { position: absolute; right: 28px; bottom: 18px; will-change: transform; }
.cat-head-char .char g:first-child { opacity: .95; }
.cat-head p { font-weight: 600; opacity: .85; }

/* Shared card bits */
.tag { position: relative; z-index: 2; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; border: 1.5px solid currentColor; text-decoration: none; font-weight: 600; font-size: .85rem; }
.tag .dot { width: 24px; height: 24px; background: var(--fg); color: var(--bg); }
.when { font-size: .85rem; font-weight: 500; opacity: .75; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.img { position: relative; overflow: hidden; border-radius: var(--r-md); aspect-ratio: 4 / 3; max-width: 100%; background: color-mix(in srgb, var(--bg) 22%, #fff); isolation: isolate; }
.img-inner { position: absolute; left: 0; right: 0; top: -12%; bottom: -12%; will-change: transform; }
.img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 22%, #fff); }
.ph .char { width: 46%; height: auto; max-width: 180px; transition: transform .7s var(--ease); }
.card:hover .ph .char, .hero:hover .ph .char { transform: rotate(-8deg) scale(1.06); }

/* Hero */
.hero { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; padding: 12px; background: var(--bg); color: var(--fg); border-radius: var(--r-xl); margin-bottom: 20px; }
.hero-img .img { height: 100%; min-height: 380px; aspect-ratio: auto; border-radius: calc(var(--r-xl) - 10px); }
.hero-text { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(14px, 3vw, 34px); min-width: 0; }
.hero-text h2 { font: 800 clamp(2.1rem, 4.4vw, 3.8rem)/.96 var(--display); letter-spacing: -.045em; }
.hero-text h2 a { text-decoration: none; }
.hero .pill-solid { background: var(--fg); color: var(--bg); }
.hero .pill-solid .round { background: var(--bg); color: var(--fg); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-sticker { position: absolute; width: 132px; top: -38px; right: -10px; will-change: transform; }

/* Grid of story cards: picture + headline only */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 80px 0 22px; }
.h-big { font: 800 clamp(2.2rem, 5.5vw, 4rem)/.95 var(--display); letter-spacing: -.045em; }
.count { color: var(--muted); font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; align-items: stretch; }
.card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--bg); color: var(--fg); border-radius: var(--r-lg); transition: transform .6s var(--ease); }
.card:hover { transform: translateY(-6px) rotate(-.7deg); }
.card-body { display: flex; flex-direction: column; gap: 12px; padding: 10px 8px 6px; flex: 1; }
.card h3 { font: 700 1.55rem/1.04 var(--display); letter-spacing: -.035em; }
.card h3 a { text-decoration: none; }
.stretch::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card .img { transition: border-radius .6s var(--ease); }
.card:hover .img { border-radius: 44px; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.card-foot .src { flex: 1; font-size: .82rem; font-weight: 600; opacity: .8; }
.card-foot .round { width: 40px; height: 40px; border: 1.5px solid currentColor; background: transparent; color: inherit; }
.card-foot .speak { position: relative; z-index: 2; cursor: pointer; }
.card-foot .go { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.card:hover .go { transform: rotate(45deg); }
.speak.talking { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.1); } }

/* Story page */
.story { color: var(--fg); }
.story-card { max-width: 1000px; margin: 28px auto 0; padding: clamp(14px, 3vw, 28px); background: var(--bg); border-radius: var(--r-xl); display: grid; gap: 22px; }
.story-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.story-title { font: 800 clamp(2.3rem, 6.4vw, 5rem)/.94 var(--display); letter-spacing: -.05em; padding-inline: 6px; }
.story-img { aspect-ratio: 16 / 9; border-radius: var(--r-lg); }
.story-body { display: grid; gap: 20px; padding: 0 6px 6px; }
.lead { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; max-width: 60ch; }
.note { font-size: .9rem; padding: 12px 16px; border-radius: 18px; background: color-mix(in srgb, var(--fg) 10%, transparent); max-width: 60ch; }
.story .pill-solid { background: var(--fg); color: var(--bg); }
.story .pill-solid .round { background: var(--bg); color: var(--fg); }

/* Text pages */
.prose { max-width: 780px; margin: 36px auto 0; padding: clamp(22px, 4vw, 44px); background: var(--surface); color: var(--ink); border-radius: var(--r-xl); }
.prose h1 { font: 800 clamp(2.2rem, 5vw, 3.4rem)/.95 var(--display); letter-spacing: -.045em; margin-bottom: 18px; }
.prose h2 { font-size: 1.5rem; margin: 30px 0 10px; }
.prose li { margin-bottom: 6px; }
.prose p + p { margin-top: 12px; }
.sources { columns: 2; }

.empty { text-align: center; padding-block: 70px; display: grid; justify-items: center; gap: 16px; }
.empty .burst { width: 130px; }
.empty p { color: var(--muted); max-width: 40ch; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 40px; flex-wrap: wrap; font-weight: 600; }

/* Footer */
.site-footer { margin-top: 120px; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding-block: 64px 28px; overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.foot-cta { font: 800 clamp(2.6rem, 6vw, 4.8rem)/.92 var(--display); letter-spacing: -.05em; margin-bottom: 18px; }
.foot-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
.foot-links h3 { font: 600 .8rem/1 var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.foot-links a { display: block; text-decoration: none; font-size: 1.1rem; padding-block: 4px; }
.foot-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.foot-dots { display: flex; flex-wrap: wrap; gap: 6px; margin: 56px 0 30px; }
.foot-dots span { display: block; width: clamp(56px, 9vw, 96px); transition: transform .5s var(--ease); }
.foot-dots span .char { width: 100%; height: auto; }
.foot-dots span:nth-child(odd) { transform: translateY(8px); }
.foot-dots span:hover { transform: translateY(-10px) rotate(-8deg); }
.wordmark { display: flex; align-items: center; gap: .12em; font: 800 clamp(2.2rem, 8.4vw, 8rem)/.9 var(--display); letter-spacing: -.06em; white-space: nowrap; overflow: hidden; }
.fine { margin-top: 24px; font-size: .85rem; color: var(--muted); }

/* Admin */
.admin { background: var(--surface); color: var(--ink); padding: clamp(18px, 3vw, 32px); border-radius: var(--r-xl); margin-top: 28px; display: grid; gap: 16px; }
.admin h1 { font: 800 2.2rem/1 var(--display); letter-spacing: -.04em; }
.admin h2 { font-size: 1.5rem; margin-top: 12px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; }
.admin-login { display: grid; gap: 16px; max-width: 420px; }
.admin-login label { display: grid; gap: 6px; font-weight: 600; }
.admin-login input { font: inherit; padding: 12px 16px; border-radius: 16px; border: 1.5px solid #d8d0ca; background: #fff; color: var(--ink); }
.admin-login .pill-solid { justify-self: start; }
.notice { background: #d9f5e3; color: var(--ink); padding: 10px 14px; border-radius: 14px; font-weight: 600; }
.notice.bad { background: #ffd9d3; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid #ebe4df; }
.tbl small { color: var(--muted); word-break: break-all; }
.tbl form { margin: 0; }
.is-hidden { opacity: .45; }

/* Header actions */
.header-actions { display: flex; gap: 8px; align-items: center; }
.pill-today { background: var(--yellow); color: var(--ink); padding-left: 14px; padding-right: 18px; gap: 8px; }
.pill-today.on { background: var(--ink); color: #fff; }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* Promise strip */
.promise { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; animation: fade 1.2s .5s var(--ease) both; position: relative; z-index: 2; }
.promise li { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px 8px 12px; font-weight: 600; font-size: .92rem; }
.promise .ico { color: #ff6324; }

/* Today's 3 banner (home) */
.t3-banner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: center; background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: clamp(22px, 4vw, 44px); margin-bottom: 56px; overflow: hidden; }
.t3-banner .eyebrow { color: var(--yellow); margin-bottom: 10px; }
.t3-banner-text { display: grid; gap: 14px; justify-items: start; }
.t3-banner-text > p:not(.eyebrow) { font-size: 1.15rem; opacity: .85; }
.t3-banner .pill-solid { background: var(--yellow); color: var(--ink); }
.t3-banner .pill-line { color: #fff; }
.t3-banner-pics { position: relative; height: clamp(220px, 28vw, 320px); }
.t3-pic { position: absolute; width: 58%; top: 50%; left: calc(var(--k) * 21%); transform: translateY(-50%) rotate(calc((var(--k) - 1) * 7deg)); padding: 8px; background: var(--bg); border-radius: var(--r-md); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); transition: transform .6s var(--ease); }
.t3-pic .img { border-radius: 16px; }
.t3-banner:hover .t3-pic { transform: translateY(-54%) rotate(calc((var(--k) - 1) * 10deg)); }
.streak { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .9rem; }
.streak::before { content: '🔥'; }
.streak.big { font-size: 1.1rem; padding: 10px 18px; }
.streak[hidden], .streak:empty { display: none; }

/* Today's 3 page */
.today-head { padding-block: clamp(28px, 5vh, 56px) 24px; display: grid; gap: 6px; justify-items: start; }
.today-head .mega { font-size: clamp(3rem, 8vw, 6rem); }
.today-head .intro-sub { margin-top: 10px; }
.today-head .actions { margin-top: 18px; align-items: center; }
.t3 { scroll-margin-top: 140px; display: grid; gap: 18px; }
.t3-dots { list-style: none; padding: 0; margin: 0; display: flex; gap: 6px; }
.t3-dots li { flex: 1; height: 6px; border-radius: 6px; background: var(--line); transition: background .4s; }
.t3-dots li.on { background: var(--ink); }
.js .t3.ready .t3-step:not(.on) { display: none; }
.t3-step.on { animation: fade .6s var(--ease) both; }
.t3-story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; padding: 12px; background: var(--bg); color: var(--fg); border-radius: var(--r-xl); }
.t3-story .img { height: 100%; min-height: 320px; aspect-ratio: auto; border-radius: calc(var(--r-xl) - 10px); }
.t3-body { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: clamp(12px, 3vw, 30px); min-width: 0; }
.t3-body h2 { font: 800 clamp(1.9rem, 3.8vw, 3.2rem)/.98 var(--display); letter-spacing: -.045em; }
.t3 .pill-solid, .story .pill-solid { background: var(--fg, var(--ink)); color: var(--bg, #fff); }
.t3 .pill-solid .round { background: var(--bg, #fff); color: var(--fg, var(--ink)); }
.t3-quiz .pill-solid, .t3-done .pill-solid { background: var(--ink); color: #fff; }
.t3-quiz .pill-solid .round, .t3-done .pill-solid .round { background: #fff; color: var(--ink); }
.t3-more { font-weight: 600; align-self: center; }
.why { font-size: 1.05rem; padding: 14px 18px; border-radius: 18px; background: color-mix(in srgb, var(--fg, #161616) 10%, transparent); max-width: 60ch; }
.t3-quiz, .t3-done { background: var(--surface); border-radius: var(--r-xl); padding: clamp(20px, 4vw, 44px); display: grid; gap: 18px; }
.q { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.q legend { font: 700 1rem/1 var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.opt { text-align: left; font: 600 1.08rem/1.3 var(--body); padding: 14px 18px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--page); cursor: pointer; transition: transform .3s var(--ease), background .3s, border-color .3s; }
.opt:hover { transform: translateX(4px); border-color: var(--ink); }
.q.answered .opt { cursor: default; transform: none; }
.opt.right { background: #c9f2d6; border-color: #12904a; }
.opt.right::after { content: '  ✓'; color: #12904a; }
.opt.wrong { background: #ffe0d6; border-color: #ff6324; }
.t3-quiz .t3-next:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.t3-done { justify-items: center; text-align: center; }
.t3-done .char { animation: bob 4s ease-in-out infinite; }
.t3-score { font: 800 clamp(1.6rem, 4vw, 2.4rem)/1.1 var(--display); letter-spacing: .02em; }
.t3-done .actions { justify-content: center; }

/* Reactions */
.reacts { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 2; }
.react { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid currentColor; background: transparent; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 1rem; transition: transform .3s var(--ease), background .3s; }
.react b { font-weight: 700; font-size: .9rem; }
.react-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.react:hover { transform: translateY(-2px); }
.react.on { background: var(--fg, var(--ink)); color: var(--bg, #fff); border-color: var(--fg, var(--ink)); }
.react.pop { animation: pulse .5s var(--ease); }

/* Talk about it */
.talk, .slide-q { border-radius: 20px; padding: 16px 20px; background: var(--fg); color: var(--bg); max-width: 60ch; }
.talk span, .slide-q span { display: block; font: 600 .78rem/1 var(--body); text-transform: uppercase; letter-spacing: .12em; opacity: .75; margin-bottom: 8px; }
.talk p { font: 700 1.25rem/1.25 var(--display); letter-spacing: -.02em; }

/* Near you + Kid Reporter call-out */
.reporter-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 60px; padding: clamp(18px, 3vw, 30px); border-radius: var(--r-xl); background: var(--surface); }
.reporter-cta > div { flex: 1; min-width: 220px; }
.reporter-cta h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.reporter-cta p { color: var(--muted); }

/* Sponsor */
.sponsor { margin-top: 40px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--r-lg); border: 1.5px dashed rgba(22, 22, 22, .3); background: var(--surface); }
.sponsor p { flex: 1; min-width: 220px; }
.sponsor-label { font: 700 .72rem/1 var(--body); text-transform: uppercase; letter-spacing: .14em; background: var(--page); border-radius: 999px; padding: 6px 10px; }

/* Forms: email sign-up and Kid Reporter */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; padding: clamp(20px, 4vw, 40px); margin-bottom: 64px; border-radius: var(--r-xl); background: var(--yellow); color: var(--ink); }
.signup .eyebrow { color: var(--ink); opacity: .7; margin-bottom: 8px; }
.signup-text p:last-child { margin-top: 12px; font-size: 1.1rem; max-width: 36ch; }
.signup-form, .form { display: grid; gap: 14px; }
.signup-form label, .form label { display: grid; gap: 6px; font-weight: 600; }
.signup-form input[type=email], .form input:not([type=checkbox]):not([type=radio]), .form textarea, .form select, .notes-form input, .row-form select { font: inherit; padding: 12px 16px; border-radius: 16px; border: 1.5px solid rgba(22, 22, 22, .25); background: #fff; color: var(--ink); width: 100%; }
.form textarea { resize: vertical; }
.who { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.who legend { font-weight: 600; margin-bottom: 6px; }
.who label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
label.check input { margin-top: 5px; width: 18px; height: 18px; flex: 0 0 auto; }
.signup-form .pill-solid, .form .pill-solid { justify-self: start; }
.form h2 { font-size: 1.3rem; margin: 14px 0 0; }
.row3 { display: grid; grid-template-columns: 1fr 90px 1fr; gap: 12px; }
.report .char { margin-bottom: 10px; }

/* Admin extras */
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 600; }
.admin-card { border: 1px solid #ebe4df; border-radius: 20px; padding: 16px; display: grid; gap: 10px; }
.notes-form { display: grid; gap: 10px; margin-top: 8px; }
.notes-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.notes-form .pill-solid, .row-form .pill { justify-self: start; min-height: 38px; }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-form select { width: auto; padding: 8px 12px; }
.tbl.stats td, .tbl.stats th { text-align: right; white-space: nowrap; }
.tbl.stats td:first-child, .tbl.stats th:first-child { text-align: left; }

/* Morning slide (classroom screen) */
.classroom { min-height: 100vh; display: flex; flex-direction: column; }
.slide-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px clamp(16px, 3vw, 32px); }
.slide-date { font-weight: 600; color: var(--muted); }
.slide-tools { display: flex; align-items: center; gap: 8px; }
.slide-tools .pill-ghost { padding: 6px 14px; }
.slide-count { font-weight: 700; min-width: 3.5em; text-align: center; }
.slides { flex: 1; display: grid; padding: 0 clamp(16px, 3vw, 32px) clamp(16px, 3vw, 32px); }
.slide { display: none; grid-template-columns: 1.15fr 1fr; gap: 12px; padding: 12px; background: var(--bg); color: var(--fg); border-radius: var(--r-xl); }
.slide.on { display: grid; animation: fade .5s var(--ease) both; }
.slide-img .img { height: 100%; min-height: 50vh; aspect-ratio: auto; border-radius: calc(var(--r-xl) - 10px); }
.slide-text { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(12px, 3vw, 40px); min-width: 0; }
.slide-text h1 { font: 800 clamp(2.2rem, 4.6vw, 4.6rem)/.95 var(--display); letter-spacing: -.045em; }
.slide-why { font-size: clamp(1.1rem, 1.8vw, 1.5rem); }
.slide-q p { font: 700 clamp(1.3rem, 2.4vw, 2rem)/1.2 var(--display); letter-spacing: -.02em; }
.slide .pill-solid { background: var(--fg); color: var(--bg); }
.slide-src { font-size: .9rem; opacity: .75; }
.classroom .img-inner { top: 0; bottom: 0; transform: none !important; }

@media (max-width: 820px) {
  .t3-banner, .t3-story, .slide, .signup { grid-template-columns: 1fr; }
  .t3-banner-pics { height: 200px; }
  .t3-story .img, .slide-img .img { min-height: 0; aspect-ratio: 4 / 3; }
  .row3 { grid-template-columns: 1fr; }
}

/* Scroll reveal (only when JavaScript is running) */
.js .reveal { opacity: 0; transform: translateY(48px) scale(.97); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .9s var(--ease) var(--d, 0ms), transform 1.1s var(--ease) var(--d, 0ms); }
.js .card.reveal.in:hover { transform: translateY(-6px) rotate(-.7deg); transition-delay: 0ms; transition-duration: .6s; }

/* Smooth-scroll hooks */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-img .img { min-height: 0; aspect-ratio: 4 / 3; }
  .hero-sticker { width: 104px; top: -30px; right: -4px; }
  .foot-grid { grid-template-columns: 1fr; }
  .fl-2, .fl-4, .fl-6 { display: none; }
  .fl-1 { right: -12px; top: 3%; width: 100px; }
  .fl-3 { right: 4%; bottom: 4%; }
  .fl-3 .char { width: 72px; height: 72px; }
  .fl-5 { display: none; }
  .cat-head-char .char { width: 96px; height: 96px; }
  .sources { columns: 1; }
  .section-head { margin-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.wordmark .mark { width: .85em; height: .85em; flex: 0 0 auto; }

/* ===================== v5: search, explore, email, print, pages, admin ===================== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .88rem; }
.center { text-align: center; margin-top: 18px; }

/* Header search */
.search-box { flex: 1; max-width: 360px; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 16px; }
.search-box input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: .95rem; color: var(--ink); outline: none; }
.search-box:focus-within { border-color: var(--ink); }
.search-box button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; }
.search-link { display: none; width: 46px; height: 46px; border: 1px solid var(--line); text-decoration: none; }
@media (max-width: 820px) { .search-box { display: none; } .search-link { display: inline-grid; } }
.header-actions .pill-ghost.on { background: var(--ink); color: #fff; }

/* Page heads, chips, panels */
.page-head { padding-block: clamp(36px, 7vh, 72px) 24px; display: grid; gap: 14px; }
.page-head .mega { font-size: clamp(3rem, 9vw, 7rem); }
.page-head .intro-sub { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 6px 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .92rem; transition: transform .3s var(--ease), background .2s; }
.chip:hover { transform: translateY(-2px); background: var(--yellow); }
.chip-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips.big .chip { font-size: 1.05rem; padding: 12px 18px; }
.chips.on-card .chip { background: transparent; border-color: currentColor; color: inherit; }
.panel { max-width: 860px; margin: 10px auto 0; padding: clamp(22px, 4vw, 44px); background: var(--surface); border-radius: var(--r-xl); display: grid; gap: 16px; justify-items: start; }
.search-big { display: flex; gap: 10px; flex-wrap: wrap; max-width: 760px; }
.search-big input { flex: 1; min-width: 220px; font: 600 1.2rem/1 var(--body); padding: 16px 22px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); }
.search-big .pill { min-height: 56px; }

/* Explore tiles (magazine rack) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.tile { position: relative; min-height: 300px; border-radius: var(--r-lg); overflow: hidden; background: var(--bg); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .6s var(--ease); isolation: isolate; }
.tile:hover { transform: translateY(-6px) rotate(-.6deg); }
.tile > .img { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; z-index: -2; }
.tile-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.72)); }
.tile-body { padding: 18px; display: grid; gap: 6px; }
.tile h2 { font: 800 clamp(1.7rem, 3vw, 2.3rem)/.95 var(--display); letter-spacing: -.04em; }
.tile h2 a { text-decoration: none; }
.tile-count { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; opacity: .9; }
.tile-latest { font-size: .92rem; opacity: .88; }
.tile-follow { position: absolute; top: 12px; right: 12px; z-index: 3; }
.tile-big { grid-column: span 2; min-height: 380px; }
@media (max-width: 600px) { .tile-big { grid-column: auto; min-height: 320px; } }
.stretch::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.follow { position: relative; z-index: 3; min-height: 40px; background: rgba(255,255,255,.92); color: var(--ink); border-color: transparent; }
.follow .follow-on, .follow.on .follow-off { display: none; }
.follow.on .follow-on { display: inline; }
.follow.on { background: var(--ink); color: #fff; }
.follow.pop { animation: pop .5s var(--ease); }
.cat-head .follow { background: var(--fg); color: var(--bg); }
.cat-head .follow.on { background: var(--bg); color: var(--fg); border-color: var(--fg); }
.cat-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-head .eyebrow { color: inherit; opacity: .8; margin: 0; }
.cat-head .eyebrow a { text-decoration: none; }
@keyframes pop { 40% { transform: scale(1.12); } }
.explore-strip { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 56px; padding: clamp(18px, 3vw, 28px); border-radius: var(--r-xl); background: var(--surface); }
.explore-strip h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.explore-strip p { color: var(--muted); }
.explore-strip .chips { margin: 0; }

/* Topic magazine layout */
.mag { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.mag-lead { position: relative; display: grid; gap: 10px; padding: 10px; background: var(--bg); color: var(--fg); border-radius: var(--r-xl); }
.mag-lead .img { aspect-ratio: 16 / 10; border-radius: calc(var(--r-xl) - 10px); }
.mag-text { padding: 10px 14px 16px; display: grid; gap: 10px; }
.mag-text h2 { font: 800 clamp(1.9rem, 3.6vw, 3.2rem)/.96 var(--display); letter-spacing: -.045em; }
.mag-text h2 a { text-decoration: none; }
.mag-side { display: grid; gap: 16px; }
@media (max-width: 820px) { .mag { grid-template-columns: 1fr; } }

/* Email sign-up */
.sub-form { justify-items: stretch; }
.sub-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.sub-form legend { font: 700 1.3rem/1.2 var(--display); margin-bottom: 10px; }
.sub-form legend small { display: block; font: 400 .9rem/1.4 var(--body); color: var(--muted); margin-top: 4px; }
.sub-form label { display: grid; gap: 6px; font-weight: 600; }
.sub-form input[type=email] { font: inherit; padding: 12px 16px; border-radius: 16px; border: 1.5px solid rgba(22,22,22,.25); }
.sub-form .pill-solid { justify-self: start; }
.plans { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plan { position: relative; display: flex !important; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 20px; border: 1.5px solid var(--line); cursor: pointer; }
.plan:has(input:checked) { border-color: var(--ink); background: #fff8e0; }
.plan span { display: grid; gap: 4px; }
.plan small { font-weight: 400; color: var(--muted); }
.topic-picks { display: flex !important; flex-wrap: wrap; gap: 8px; }
.topic-picks legend { width: 100%; }
.pick { position: relative; display: inline-flex !important; cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick span { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: .95rem; transition: background .2s; }
.pick input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pick input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.signup-form .small a { font-weight: 600; }

/* Print edition landing page */
.print-hero { background: #9c6ad6; color: #fff; border-radius: 0 0 var(--r-xl) var(--r-xl); margin-bottom: 40px; overflow: hidden; }
.print-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; padding-block: clamp(40px, 8vh, 90px); }
.print-hero .eyebrow { color: #fff; opacity: .85; display: flex; gap: 8px; align-items: center; }
.print-hero .mega { font-size: clamp(2.8rem, 7vw, 5.6rem); }
.print-hero .intro-sub { color: #fff; opacity: .9; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; font-weight: 600; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ico { margin-top: 3px; color: var(--yellow); }
.print-mock { position: relative; height: 380px; }
.mock-page { position: absolute; width: 250px; height: 340px; border-radius: 14px; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.mock-page.p1 { left: 50%; top: 10px; transform: translateX(-50%) rotate(-4deg); background: #ffbd14; color: var(--ink); padding: 18px; display: grid; align-content: space-between; }
.mock-page.p2 { left: 50%; top: 20px; transform: translateX(-30%) rotate(6deg); background: #ff8cc6; }
.mock-page.p3 { left: 50%; top: 30px; transform: translateX(-70%) rotate(-12deg); background: #22a7ff; }
.mock-page b { font: 800 2.2rem/.95 var(--display); letter-spacing: -.04em; }
.mock-logo { display: flex; align-items: center; gap: 8px; font: 800 .95rem/1 var(--display); }
.print-buy { justify-items: start; }
.print-buy form { display: grid; gap: 14px; width: 100%; }
.print-buy label { display: grid; gap: 6px; font-weight: 600; }
.print-buy input[type=email] { font: inherit; padding: 12px 16px; border-radius: 16px; border: 1.5px solid rgba(22,22,22,.25); }
.print-buy .pill-solid { justify-self: start; }
@media (max-width: 820px) { .print-row { grid-template-columns: 1fr; } .print-mock { height: 300px; transform: scale(.8); } }

/* Tools + site map */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.tool { position: relative; display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: var(--r-lg); background: var(--bg); color: var(--fg); min-height: 220px; transition: transform .6s var(--ease); }
.tool:hover { transform: translateY(-6px) rotate(-.6deg); }
.tool h2 { font: 800 1.8rem/1 var(--display); letter-spacing: -.04em; }
.tool h2 a { text-decoration: none; }
.tool-ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--fg); color: var(--bg); margin-bottom: 10px; }
.tool-who { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .75; }
.sitemap { max-width: 1000px; }
.sitemap-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 26px; }
.sitemap-cols h2 { margin-top: 10px; }
.sitemap-cols ul { padding-left: 18px; }
.prose a { font-weight: 600; }
.prose h3 { font-size: 1.15rem; margin: 20px 0 6px; }

/* Admin */
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.admin-tabs a { flex: 0 0 auto; padding: 10px 14px; border-radius: 14px 14px 0 0; text-decoration: none; font-weight: 600; color: var(--muted); }
.admin-tabs a.on { background: var(--ink); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.kpi { display: grid; gap: 4px; padding: 14px 16px; border-radius: 18px; background: var(--page); }
.kpi span { font-size: .8rem; font-weight: 600; color: var(--muted); }
.kpi b { font: 800 1.9rem/1 var(--display); letter-spacing: -.03em; }
.kpi small { font-weight: 700; font-size: .8rem; color: var(--muted); }
.kpi small.up { color: #12804a; }
.kpi small.down { color: #c2410c; }
.tops { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.top-box { border: 1px solid #ebe4df; border-radius: 20px; padding: 16px; display: grid; gap: 10px; align-content: start; }
.top-box h3 { font-size: 1.05rem; }
.top-box ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.top-box li { position: relative; display: flex; gap: 10px; justify-content: space-between; padding: 6px 8px; font-size: .9rem; border-radius: 8px; overflow: hidden; }
.top-box li .bar { position: absolute; inset: 0 auto 0 0; background: #ffe7a3; z-index: 0; border-radius: 8px; }
.top-box li .lbl, .top-box li b { position: relative; }
.top-box li .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart { width: 100%; height: auto; }
.chart .grid { stroke: #ebe4df; }
.chart .ax { font-size: 11px; fill: var(--muted); }
.chart .b-views { fill: #ffd56b; }
.chart .b-visits { fill: #161616; }
.legend { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); }
.legend .k { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.k-views { background: #ffd56b; } .k-visits { background: #161616; margin-left: 10px; }
.admin-form { gap: 14px; }
.admin-form fieldset { border: 1px solid #ebe4df; border-radius: 20px; padding: 16px; display: grid; gap: 12px; margin: 0; }
.admin-form legend { font: 700 1.1rem/1 var(--display); padding: 0 6px; }
.admin-form h2 { margin-top: 18px; }
.admin-form small { font-weight: 400; color: var(--muted); }
.admin-form .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.admin-form .cols > div { display: grid; gap: 14px; }
.admin-form textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }
.admin-form .steps { padding-left: 20px; display: grid; gap: 6px; }
.admin-form code { background: var(--page); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
.edit-tbl td { padding: 6px 4px; }
.edit-tbl input:not([type=color]), .edit-tbl textarea, .edit-tbl select { font: inherit; font-size: .9rem; padding: 8px 10px; border-radius: 10px; border: 1.5px solid rgba(22,22,22,.2); background: #fff; width: 100%; min-width: 120px; }
.edit-tbl input[type=color] { width: 48px; height: 38px; border: 0; background: none; padding: 0; }
.edit-tbl input[readonly] { background: var(--page); color: var(--muted); }
.thumb { max-width: 220px; border-radius: 14px; }
.sticky-save { position: sticky; bottom: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.row-form input[type=email] { font: inherit; padding: 8px 12px; border-radius: 12px; border: 1.5px solid rgba(22,22,22,.25); }

/* Printable edition (owner only) */
.print-ed { background: #ddd; }
.pe-bar { position: sticky; top: 0; z-index: 5; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); font-size: .9rem; }
.pe-page { width: 210mm; min-height: 297mm; margin: 16px auto; padding: 14mm; background: #fff; color: var(--ink); box-sizing: border-box; display: grid; gap: 8mm; align-content: start; page-break-after: always; break-after: page; overflow: hidden; }
.pe-cover { background: var(--bg, #ffbd14); color: var(--fg, #161616); align-content: space-between; }
.pe-mast { display: flex; align-items: center; gap: 12px; font: 800 2.4rem/1 var(--display); letter-spacing: -.04em; }
.pe-issue { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .9rem; }
.pe-cover h1 { font: 800 3.4rem/.95 var(--display); letter-spacing: -.045em; }
.pe-cover-img { width: 100%; height: 120mm; object-fit: cover; border-radius: 10mm; display: grid; place-items: center; background: rgba(255,255,255,.5); }
.pe-inside { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; font-weight: 700; }
.pe-inside li { padding: 4mm; border-radius: 5mm; background: rgba(255,255,255,.7); color: var(--ink); }
.pe-head { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border-bottom: 2px solid var(--ink); padding-bottom: 3mm; }
.pe-story { display: grid; gap: 3mm; padding: 6mm; border-radius: 8mm; border: 3px solid var(--bg); }
.pe-story img { width: 100%; height: 62mm; object-fit: cover; border-radius: 5mm; }
.pe-story h2 { font: 800 1.9rem/1 var(--display); letter-spacing: -.035em; }
.pe-story p { font-size: 1rem; line-height: 1.45; }
.pe-tag { justify-self: start; padding: 1.5mm 4mm; border-radius: 99px; background: var(--bg); color: var(--fg); font-weight: 700; font-size: .8rem; }
.pe-why, .pe-q { padding: 3mm 4mm; border-radius: 4mm; background: #f6f1ee; }
.pe-src { font-size: .78rem; color: var(--muted); }
.pe-fun h2 { font: 800 1.8rem/1 var(--display); }
.pe-rep { padding: 4mm; border: 2px dashed var(--ink); border-radius: 5mm; }
.pe-quiz { display: grid; gap: 4mm; font-size: 1rem; }
.pe-draw { height: 70mm; border: 3px dashed var(--ink); border-radius: 8mm; padding: 6mm; font-weight: 700; }
@page { size: A4; margin: 0; }
@media print {
  .no-print { display: none !important; }
  .print-ed { background: #fff; }
  .pe-page { margin: 0; box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===================== v6: news-first home with endless scroll ===================== */
.feed-wrap { padding-top: 18px; }
.feed-title { font: 800 clamp(1.6rem, 3vw, 2.2rem)/1 var(--display); letter-spacing: -.035em; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.feed-date { font: 500 .95rem/1 var(--body); color: var(--muted); letter-spacing: 0; }
.top-stories { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; align-items: stretch; }
.lead-story { position: relative; display: grid; grid-template-rows: auto 1fr; gap: 6px; padding: 10px; background: var(--bg); color: var(--fg); border-radius: var(--r-xl); }
.lead-img .img { aspect-ratio: 16 / 9; border-radius: calc(var(--r-xl) - 10px); }
.lead-text { display: grid; gap: 14px; align-content: start; padding: 14px 14px 10px; }
.lead-text h2 { font: 800 clamp(1.8rem, 3.4vw, 3rem)/.98 var(--display); letter-spacing: -.04em; }
.lead-text h2 a { text-decoration: none; }
.lead-sum { font-size: 1.05rem; opacity: .9; max-width: 60ch; }
.lead-story .pill-solid { background: var(--fg); color: var(--bg); }
.lead-story .pill-solid .round { background: var(--bg); color: var(--fg); }
.side-list { display: grid; gap: 12px; align-content: start; }
.side-list.row3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.row-card { position: relative; display: grid; grid-template-columns: 38% 1fr; gap: 14px; align-items: center; padding: 8px; border-radius: var(--r-md); background: var(--surface); transition: transform .5s var(--ease); }
.row-card:hover { transform: translateX(4px); }
.row-card .img { aspect-ratio: 4 / 3; border-radius: 16px; }
.row-card > div { display: grid; gap: 6px; padding-right: 6px; }
.row-card h3 { font: 700 1.12rem/1.12 var(--display); letter-spacing: -.02em; }
.row-card h3 a { text-decoration: none; }
.row-cat { justify-self: start; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--fg); }
.row-card .src { font-size: .78rem; color: var(--muted); font-weight: 600; }
.small-head { margin: 44px 0 16px; align-items: center; flex-wrap: wrap; }
.small-head h2 { font: 800 clamp(1.5rem, 2.6vw, 2rem)/1 var(--display); letter-spacing: -.035em; }
.small-head .chips { margin: 0; }
.grid > .t3-strip, .grid > .near-strip, .grid > .sponsor { grid-column: 1 / -1; }
.t3-strip { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: clamp(18px, 3vw, 28px); border-radius: var(--r-xl); background: var(--ink); color: #fff; }
.t3-strip h2 { font: 800 clamp(1.6rem, 3vw, 2.2rem)/1 var(--display); letter-spacing: -.035em; }
.t3-strip p:not(.eyebrow) { opacity: .8; margin-top: 4px; }
.t3-strip .eyebrow { color: var(--yellow); margin-bottom: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.t3-strip .pill-solid { background: var(--yellow); color: var(--ink); }
.t3-strip .pill-line { color: #fff; }
.near-strip .small-head { margin-top: 10px; }
.feed-loader { display: flex; justify-content: center; gap: 8px; padding: 40px 0 10px; }
.feed-loader span { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); animation: blink 1s infinite ease-in-out; }
.feed-loader span:nth-child(2) { animation-delay: .15s; } .feed-loader span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; transform: scale(.7); } }
[hidden] { display: none !important; }
@media (max-width: 900px) { .top-stories { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .row-card { grid-template-columns: 34% 1fr; } .row-card h3 { font-size: 1rem; } }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.lib-sec { gap: 6px !important; align-content: start; }
.lib-sec .check { font-weight: 500; font-size: .95rem; }
.left-out { margin: 18px 0; padding: 14px 18px; border: 1px solid #ebe4df; border-radius: 20px; background: #fff; }
.left-out summary { font-weight: 700; cursor: pointer; }
.left-out p { font-size: .92rem; margin: 10px 0 0; }
@media (max-width: 640px) {
  .lead-img .img { aspect-ratio: 2 / 1; }
  .lead-sum { display: none; }
  .lead-text { gap: 10px; padding: 10px 8px 6px; }
}

/* ---------- v7: Pinterest-style wall of cards ---------- */
.masonry { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); align-items: start; }
.masonry .card.shape-0 .img { aspect-ratio: 3 / 4; }
.masonry .card.shape-1 .img { aspect-ratio: 1; }
.masonry .card.shape-2 .img { aspect-ratio: 4 / 3; }
.masonry .card.shape-3 .img { aspect-ratio: 4 / 5; }
.masonry .card h3 { font-size: 1.3rem; }
.masonry.masonry-on { grid-auto-rows: 4px; row-gap: 0; grid-auto-flow: row dense; }
.masonry-on > * { margin-bottom: 16px; }
@media (max-width: 560px) {
  .masonry { grid-template-columns: 1fr 1fr; gap: 10px; }
  .masonry-on > * { margin-bottom: 10px; }
  .masonry .card { padding: 6px; border-radius: var(--r-md); }
  .masonry .card-body { gap: 8px; padding: 8px 4px 4px; }
  .masonry .card h3 { font-size: 1rem; line-height: 1.08; }
  .masonry .card .tag { font-size: .72rem; }
  .masonry .card .tag .dot { display: none; }
  .masonry .card-foot .round { display: none; }
  .masonry .card-foot .src { font-size: .7rem; }
  .masonry .ph .char { width: 52%; }
}
