/* ==========================================================================
   blogVersy public site
   Playful, clean and easy to read. Plain CSS, no framework.
   ========================================================================== */

:root {
  --bg: #fffbf4;
  --bg-soft: #fff3e0;
  --surface: #ffffff;
  --ink: #1b1736;
  --ink-2: #403b63;
  --muted: #6d6989;
  --line: rgba(27, 23, 54, 0.12);
  --coral: #ff6b57;
  --sun: #ffc83d;
  --mint: #14c2a3;
  --violet: #7c5cff;
  --sky: #3ec1f3;
  --pink: #ff86c8;
  --accent: #7c5cff;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 2px 0 rgba(27, 23, 54, 0.05), 0 22px 44px -22px rgba(27, 23, 54, 0.3);
  --display: "Bricolage Grotesque", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 1180px;
  --prose: 19px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #120f22;
  --bg-soft: #1a1630;
  --surface: #1e1a38;
  --ink: #f6f3ff;
  --ink-2: #d4cef2;
  --muted: #a29dc4;
  --line: rgba(246, 243, 255, 0.14);
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 22px 44px -22px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; line-height: 1.12; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; z-index: 200; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 8px 30px -22px rgba(27, 23, 54, .5); }
.bar { display: flex; align-items: center; gap: 18px; height: 70px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 24px/1 var(--display); letter-spacing: -0.04em; }
.logo-mark { width: 38px; height: 38px; flex: none; transition: transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover .logo-mark { transform: rotate(180deg) scale(1.08); }
.nav { display: flex; gap: 4px; margin-left: 10px; flex: 1; min-width: 0; overflow: hidden; }
.nav a { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s, transform .2s; }
.nav a:hover { background: color-mix(in srgb, var(--accent, var(--violet)) 14%, transparent); color: var(--ink); transform: translateY(-1px); }
.nav a.on { background: var(--ink); color: var(--bg); }
.actions { display: flex; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--line); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), background .2s;
}
.icon-btn:hover { transform: rotate(-8deg) scale(1.08); background: var(--sun); color: #1b1736; }
.icon-btn i { font-size: 17px; line-height: 1; }
.menu-btn { display: none; }
.theme-sun { display: none; }
html[data-theme="dark"] .theme-sun { display: inline-block; }
html[data-theme="dark"] .theme-moon { display: none; }

/* ------------------------------------------------------------ buttons / chips */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px;
  font-weight: 700; border: 2px solid var(--ink); background: var(--sun); color: #1b1736;
  box-shadow: 0 4px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.ghost { background: var(--surface); color: var(--ink); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font: 700 13px/1.2 var(--body); letter-spacing: .01em;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: color-mix(in srgb, var(--accent) 70%, var(--ink));
  transition: transform .2s, background .2s;
}
a.chip:hover { transform: translateY(-2px) rotate(-1.5deg); background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; font-size: 14px;
}
.pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 var(--mint); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ------------------------------------------------------------ hero */
.hero { position: relative; padding: 54px 0 46px; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45; pointer-events: none; z-index: 0; }
.blob.b1 { width: 420px; height: 420px; background: var(--violet); left: -120px; top: -140px; }
.blob.b2 { width: 360px; height: 360px; background: var(--sun); right: 8%; top: -120px; opacity: .55; }
.blob.b3 { width: 320px; height: 320px; background: var(--coral); right: -100px; bottom: -120px; opacity: .35; }
html[data-theme="dark"] .blob { opacity: .28; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6.4vw, 78px); font-weight: 800; line-height: .98; letter-spacing: -0.045em; margin: 20px 0 18px; }
.hero h1 em { font-style: normal; position: relative; white-space: nowrap; color: var(--violet); }
.hero h1 em svg { position: absolute; left: -2%; bottom: -14px; width: 104%; height: 16px; overflow: visible; }
.hero h1 em path { stroke: var(--coral); stroke-width: 7; fill: none; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.4s .5s forwards ease-out; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero p.sub { font-size: clamp(18px, 2.1vw, 21px); color: var(--ink-2); max-width: 34em; }
.searchbox {
  margin: 28px 0 18px; display: flex; align-items: center; gap: 12px; width: 100%; max-width: 520px; text-align: left;
  padding: 10px 10px 10px 20px; border-radius: 999px; background: var(--surface); border: 2px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink); transition: transform .15s, box-shadow .15s; color: var(--muted); font-size: 17px;
}
.searchbox:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.searchbox span { flex: 1; }
.searchbox kbd, .kbd { font: 700 13px var(--body); padding: 3px 9px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg-soft); color: var(--muted); }
.searchbox .go { width: 44px; height: 44px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; font-size: 17px; }
.topic-row { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-row a { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; transition: transform .2s, border-color .2s; }
.topic-row a:hover { transform: translateY(-3px) rotate(-2deg); border-color: var(--accent); }
.hero-stats { display: flex; gap: 28px; margin-top: 30px; color: var(--muted); font-size: 15px; }
.hero-stats b { display: block; color: var(--ink); font: 800 28px/1 var(--display); }

.sticker { position: absolute; z-index: 2; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 20px; font-size: 26px; background: var(--sticker, var(--sun)); color: #1b1736; border: 2px solid var(--ink); box-shadow: 0 5px 0 var(--ink); animation: bob 5s ease-in-out infinite; user-select: none; pointer-events: none; will-change: transform; }
.sticker.s1 { left: 47%; top: 4%; animation-delay: -1s; }
.sticker.s2 { right: 2%; top: 46%; width: 54px; height: 54px; font-size: 22px; --sticker: var(--pink); animation-delay: -2.2s; }
.sticker.s3 { left: 44%; bottom: 3%; --sticker: var(--coral); color: #fff; animation-delay: -3.1s; }
@keyframes bob { 50% { translate: 0 -14px; rotate: 6deg; } }

.hero-card { position: relative; display: block; background: var(--surface); border: 2px solid var(--ink); border-radius: 28px; padding: 14px; box-shadow: 10px 10px 0 var(--accent); transform: rotate(1.6deg); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), box-shadow .35s; }
.hero-card:hover { transform: rotate(0) translateY(-6px); box-shadow: 14px 14px 0 var(--accent); }
.hero-card .cover { aspect-ratio: 16 / 11; border-radius: 18px; }
.hero-card .body { padding: 18px 8px 8px; }
.hero-card h2 { font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; margin: 10px 0 8px; }
.hero-card p { color: var(--ink-2); font-size: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge-pick { position: absolute; top: -18px; left: -14px; z-index: 3; background: var(--coral); color: #fff; font: 800 14px var(--display); padding: 9px 16px; border-radius: 999px; transform: rotate(-7deg); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }

/* ------------------------------------------------------------ ticker */
.ticker { background: var(--ink); color: var(--bg); overflow: hidden; border-block: 2px solid var(--ink); transform: rotate(-.6deg); margin: 6px -10px 0; }
.ticker-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a { display: inline-flex; align-items: center; gap: 28px; padding: 13px 0 13px 28px; font: 700 16px var(--display); white-space: nowrap; }
.ticker a::after { content: "\f005"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 12px; color: var(--sun); }
.ticker a:hover { color: var(--sun); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------ sections */
.section { padding: 56px 0 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 24px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.035em; }
.section-head h2 small { display: block; font: 600 15px var(--body); color: var(--muted); letter-spacing: 0; margin-top: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters a, .filters button {
  padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: 14.5px; transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.filters a:hover, .filters button:hover { transform: translateY(-2px); border-color: var(--ink); }
.filters .on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 26px; }
.grid > .ad-wrap { grid-column: 1 / -1; }
.grid.loading { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* ------------------------------------------------------------ cards */
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .25s ease-out, box-shadow .3s, border-color .3s;
}
.card:hover { --lift: -7px; border-color: var(--ink); box-shadow: 8px 10px 0 var(--accent); }
.card .cover { transition: border-radius .3s; }
.card:hover .cover img { transform: scale(1.06); }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 10px 10px; flex: 1; }
.card h3 { font-size: 22px; font-weight: 700; line-height: 1.15; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card .chip { position: relative; z-index: 2; align-self: flex-start; }
.card p { color: var(--ink-2); font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: auto; padding-top: 6px; color: var(--muted); font-size: 14px; font-weight: 500; }
.meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin-right: 14px; vertical-align: middle; opacity: .6; }
.more { display: flex; justify-content: center; padding: 38px 0 0; }
.more button[hidden] { display: none; }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty b { display: block; font-size: 46px; line-height: 1; margin-bottom: 14px; color: var(--accent); opacity: .85; }

/* cover art: used when a story has no photo */
.cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 16px; background: var(--bg-soft); isolation: isolate; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.cover.art { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 90%, #fff), color-mix(in srgb, var(--accent) 58%, #1b1736)); }
.cover.art::before, .cover.art::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.cover.art::before { width: 62%; aspect-ratio: 1; left: -14%; top: -34%; background: rgba(255, 255, 255, .2); }
.cover.art::after { width: 46%; aspect-ratio: 1; right: -9%; bottom: -30%; background: rgba(255, 255, 255, .15); }
.cover .dots { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .28) 1.6px, transparent 1.8px); background-size: 22px 22px; mask-image: linear-gradient(120deg, transparent 30%, #000 80%); -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 80%); }
.cover .glyph { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(48px, 6.4vw, 78px); color: rgba(255, 255, 255, .96); filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .16)); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.card:hover .cover .glyph, .hero-card:hover .cover .glyph { transform: scale(1.14) rotate(-6deg); }
.cover .photo-icon { position: absolute; right: 10px; bottom: 10px; font-size: 16px; background: var(--surface); color: var(--accent); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 3px 0 rgba(27, 23, 54, .25); }

/* ------------------------------------------------------------ most read */
.most-read { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: rank; }
.most-read a { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 20px 18px 18px; display: flex; flex-direction: column; gap: 10px; transition: transform .25s, border-color .25s, box-shadow .25s; }
.most-read a::before { counter-increment: rank; content: counter(rank); font: 800 54px/1 var(--display); color: color-mix(in srgb, var(--accent) 60%, transparent); }
.most-read a:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--ink); box-shadow: 6px 8px 0 var(--accent); }
.most-read b { font: 700 17px/1.2 var(--display); }
.most-read small { color: var(--muted); font-weight: 600; margin-top: auto; }

/* ------------------------------------------------------------ home page extras */
.section.tight { padding-top: 40px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 20px 18px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1.5px solid var(--line);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.tile:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--ink); box-shadow: 6px 8px 0 var(--accent); }
.tile-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 20px; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); margin-bottom: 10px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.tile:hover .tile-icon { transform: rotate(-8deg) scale(1.08); }
.tile b { font: 800 22px/1.1 var(--display); letter-spacing: -0.02em; }
.tile small { color: var(--ink-2); font-weight: 700; }
.tile em { font-style: normal; color: var(--muted); font-size: 14.5px; line-height: 1.4; margin-top: 4px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.mini-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mini {
  display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1.5px solid var(--line); transition: transform .25s, border-color .25s, box-shadow .25s;
}
.mini:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: 5px 6px 0 var(--accent); }
.mini .cover { border-radius: 12px; }
.mini .cover .glyph { font-size: 30px; }
.mini .cover .photo-icon { display: none; }
.mini b { display: block; font: 700 17px/1.2 var(--display); margin-bottom: 6px; }
.mini small { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.split-side { display: grid; gap: 22px; position: sticky; top: 92px; }
.split-side .ad-wrap { margin: 0; }
.tag-box { padding: 20px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.tag-box h3 { font-size: 18px; margin-bottom: 12px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { padding: 6px 12px; border-radius: 999px; background: var(--bg-soft); border: 1.5px solid transparent; font-weight: 700; font-size: 13.5px; transition: transform .2s, border-color .2s; }
.tag-cloud a:hover { transform: translateY(-2px) rotate(-2deg); border-color: var(--ink); }

/* ------------------------------------------------------------ ads */
.ad { position: relative; display: grid; place-items: center; overflow: hidden; text-align: center; margin: 0 auto; max-width: 100%; }
.ad-wrap { margin: 28px auto; text-align: center; }
.ad-wrap > small { display: block; font: 700 11px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ad.placeholder {
  border: 2px dashed color-mix(in srgb, var(--ink) 28%, transparent); border-radius: var(--radius-sm); color: var(--muted);
  background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--ink) 4%, transparent) 14px 28px);
  font-weight: 700; font-size: 14px; padding: 14px;
}
.ad.placeholder b { display: block; font: 800 15px var(--display); color: var(--ink-2); }
.ad-header .ad.placeholder, .ad-footer .ad.placeholder { width: 728px; min-height: 90px; }
.ad-inline .ad.placeholder { width: 336px; min-height: 280px; }
.ad-sidebar .ad.placeholder { width: 300px; min-height: 250px; }
.ad-feed .ad.placeholder { width: 100%; min-height: 120px; }
.ad-home-wide .ad.placeholder { width: 970px; min-height: 250px; }
.ad-home-side .ad.placeholder { width: 300px; min-height: 250px; }
.ad-home-mid .ad.placeholder { width: 728px; min-height: 90px; }

/* ------------------------------------------------------------ article */
.progress { position: fixed; z-index: 70; left: 0; top: 0; height: 5px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--coral), var(--sun), var(--mint), var(--violet)); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--muted); padding-top: 26px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.post-head { max-width: 860px; padding: 18px 0 8px; }
.post-head h1 { font-size: clamp(34px, 5.6vw, 62px); font-weight: 800; line-height: 1.02; letter-spacing: -0.04em; margin: 16px 0; text-wrap: balance; }
.lede { font-size: clamp(19px, 2.3vw, 23px); color: var(--ink-2); line-height: 1.5; max-width: 38em; text-wrap: pretty; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; font-size: 15px; color: var(--muted); font-weight: 500; }
.byline .who { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.byline .avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: #1b1736; border: 2px solid var(--ink); font-size: 20px; }
.post-cover { margin: 30px 0 8px; }
.post-cover .cover { aspect-ratio: 21 / 10; border-radius: var(--radius); border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--accent); }
.post-cover figcaption { margin-top: 18px; font-size: 13.5px; color: var(--muted); text-align: right; }
.post-cover figcaption a { text-decoration: underline; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; padding-top: 22px; }
.preview-bar { background: var(--sun); color: #1b1736; text-align: center; font-weight: 700; padding: 10px; }

.takeaways { position: relative; margin: 6px 0 36px; padding: 24px 26px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--accent); }
.takeaways h2 { font-size: 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.takeaways h2 i { color: var(--accent); font-size: 18px; }
.takeaways ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.takeaways li { position: relative; padding-left: 34px; font-size: 17px; line-height: 1.5; }
.takeaways li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; }

.prose { font-size: var(--prose); line-height: 1.82; color: var(--ink); }
.prose > * { max-width: 700px; }
.prose p { margin: 0 0 1.25em; }
.prose > p:first-of-type::first-letter { float: left; font: 800 3.5em/0.82 var(--display); padding: 6px 12px 0 0; color: var(--accent); }
.prose h2 { font-size: clamp(27px, 3.4vw, 36px); font-weight: 800; margin: 2.1em 0 .55em; scroll-margin-top: 96px; letter-spacing: -0.03em; }
.prose h3 { font-size: clamp(21px, 2.4vw, 25px); font-weight: 700; margin: 1.7em 0 .5em; scroll-margin-top: 96px; }
.prose a { color: color-mix(in srgb, var(--accent) 72%, var(--ink)); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); transition: text-decoration-color .2s, background .2s; border-radius: 4px; }
.prose a:hover { text-decoration-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .5em; padding-left: .2em; }
.prose li::marker { color: var(--accent); font-weight: 800; }
.prose blockquote { margin: 1.8em 0; padding: 18px 24px; border-left: 6px solid var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 1.08em; font-style: italic; }
.prose blockquote p:last-child { margin: 0; }
.prose table { border-collapse: collapse; width: 100%; max-width: 700px; margin: 1.5em 0; font-size: .92em; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1.5px solid var(--line); padding: 10px 14px; text-align: left; }
.prose th { background: var(--bg-soft); }
.prose hr { border: 0; height: 12px; margin: 2.4em 0; background: radial-gradient(circle, var(--accent) 3px, transparent 3.5px) center / 28px 12px repeat-x; }
.prose strong { font-weight: 700; }

.keep { margin: 2em 0; max-width: 700px; display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 2px dashed var(--accent); transition: transform .25s, background .25s; }
.keep:hover { transform: translateY(-3px) rotate(-.4deg); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.keep .cover { aspect-ratio: 1; border-radius: 14px; }
.keep .cover .glyph { font-size: 34px; }
.keep small { display: block; font: 800 12px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.keep small i { margin-right: 4px; }
.keep b { font: 700 20px/1.2 var(--display); }

.faq { margin-top: 56px; max-width: 700px; }
.faq h2, .sources h2 { font-size: 30px; font-weight: 800; margin-bottom: 18px; }
.faq details { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: var(--ink); box-shadow: 5px 5px 0 var(--accent); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; font: 700 18px/1.3 var(--display); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; translate: 0 -50%; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 22px; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details p { padding: 0 22px 20px; color: var(--ink-2); line-height: 1.7; }
.sources { margin-top: 48px; max-width: 700px; }
.sources ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sources a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 600; transition: transform .2s, border-color .2s; }
.sources a:hover { transform: translateX(6px); border-color: var(--accent); }
.sources a small { margin-left: auto; color: var(--muted); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tags a { padding: 6px 14px; border-radius: 999px; background: var(--bg-soft); font-weight: 600; font-size: 14px; color: var(--ink-2); transition: transform .2s, background .2s; }
.tags a::before { content: "#"; opacity: .5; }
.tags a:hover { transform: translateY(-2px) rotate(-2deg); background: color-mix(in srgb, var(--accent) 22%, var(--bg-soft)); }

.aside { position: sticky; top: 94px; display: grid; gap: 22px; }
.toc { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px 20px 14px; }
.toc h2 { font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 8px 12px; margin-left: -12px; border-left: 3px solid transparent; font-size: 15px; font-weight: 600; color: var(--muted); border-radius: 0 10px 10px 0; transition: color .2s, border-color .2s, background .2s; }
.toc a.sub { padding-left: 26px; font-weight: 500; font-size: 14px; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.toc-mobile { display: none; }

.dock { position: fixed; z-index: 55; left: 50%; bottom: 20px; translate: -50% 140%; display: flex; align-items: center; gap: 4px; padding: 7px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .55); transition: translate .45s cubic-bezier(.3, 1.4, .5, 1); }
.dock.show { translate: -50% 0; }
.dock button, .dock a { height: 46px; min-width: 46px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; white-space: nowrap; transition: background .2s, transform .2s; }
.dock button:hover, .dock a:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }
.dock .like.on { color: var(--coral); }
.dock .like.pop i { animation: pop .5s; }
.dock i { font-size: 17px; }
.dock .sep { width: 1px; height: 24px; background: rgba(255, 255, 255, .22); margin: 0 4px; }
@keyframes pop { 40% { transform: scale(1.7) rotate(-12deg); } }

.related { padding-top: 70px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share a, .share button { height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; transition: transform .2s, border-color .2s; }
.share a:hover, .share button:hover { transform: translateY(-2px) rotate(-1.5deg); border-color: var(--ink); }

/* ------------------------------------------------------------ search overlay */
.search-overlay { position: fixed; inset: 0; z-index: 100; display: none; padding: 9vh 16px 16px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.search-overlay.open { display: block; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.search-panel { max-width: 680px; margin: 0 auto; background: var(--surface); border: 2px solid var(--ink); border-radius: 28px; box-shadow: 10px 10px 0 var(--violet); overflow: hidden; animation: rise .3s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes rise { from { transform: translateY(24px) scale(.97); opacity: 0; } }
.search-field { display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 22px; border-bottom: 1.5px solid var(--line); }
.search-field > i { font-size: 18px; color: var(--muted); flex: none; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 600 22px var(--display); padding: 14px 0; }
.search-field input::placeholder { color: var(--muted); font-weight: 500; }
.search-results { max-height: min(56vh, 460px); overflow: auto; padding: 8px; }
.search-results a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; transition: background .15s; }
.search-results a:hover, .search-results a.sel { background: color-mix(in srgb, var(--accent, var(--violet)) 14%, transparent); }
.search-results .thumb { width: 54px; height: 54px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 22px; color: #fff; background: var(--accent); overflow: hidden; }
.search-results .thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-results b { display: block; font: 700 17px/1.25 var(--display); }
.search-results small { color: var(--muted); font-weight: 500; }
.search-hint { padding: 28px 22px; color: var(--muted); text-align: center; }
.search-foot { display: flex; gap: 16px; padding: 12px 22px; border-top: 1.5px solid var(--line); color: var(--muted); font-size: 13.5px; }

/* ------------------------------------------------------------ email sign up */
.lead { position: relative; display: grid; gap: 18px; margin: 44px 0; padding: 26px 28px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--accent); }
.lead-copy { display: flex; gap: 16px; align-items: flex-start; }
.lead-icon { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 21px; border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.lead h2 { font-size: clamp(21px, 2.6vw, 26px); font-weight: 800; letter-spacing: -0.03em; }
.lead p { color: var(--ink-2); margin-top: 4px; line-height: 1.5; }
.lead-row { display: flex; gap: 10px; flex-wrap: wrap; }
.lead-row input[type=email] { flex: 1 1 220px; min-width: 0; padding: 13px 20px; border-radius: 999px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font: 600 16px var(--body); }
.lead-row input[type=email]:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.lead-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.lead-consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.lead-msg { margin: 10px 0 0; font-weight: 700; min-height: 1.4em; font-size: 15px; }
.lead-msg.ok { color: color-mix(in srgb, var(--mint) 70%, var(--ink)); }
.lead-msg.err { color: var(--coral); }
.lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead.done form { display: none; }
.lead.done .lead-copy { align-items: center; }
.lead-sidebar { margin: 0; padding: 20px; box-shadow: 6px 6px 0 var(--accent); }
.lead-sidebar .lead-copy { flex-direction: column; gap: 10px; }
.lead-sidebar .lead-row { flex-direction: column; }
/* In a column the flex basis of the field would become its height, which made it a giant oval. */
.lead-sidebar .lead-row input[type=email] { flex: 0 0 auto; width: 100%; padding: 12px 18px; }
.lead-sidebar .lead-row .btn { justify-content: center; }
.lead-footer { margin: 48px 0 0; }
.lead-post { max-width: 700px; }

/* ------------------------------------------------------------ footer */
.site-footer { margin-top: 90px; background: var(--ink); color: #f6f3ff; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -39px; height: 40px; background: var(--ink); mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'><path d='M0 40V22C100 -6 200 -6 300 22s200 28 300 0 200-28 300 0 200 28 300 0V40z'/></svg>") center / 100% 100% no-repeat; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'><path d='M0 40V22C100 -6 200 -6 300 22s200 28 300 0 200-28 300 0 200 28 300 0V40z'/></svg>") center / 100% 100% no-repeat; }
html[data-theme="dark"] .site-footer, html[data-theme="dark"] .site-footer::before { background: #0b0916; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.foot-grid h3 { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--sun); margin-bottom: 14px; font-family: var(--body); font-weight: 800; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.foot-grid a { color: #d9d3f5; transition: color .2s, padding .2s; }
.foot-grid a:hover { color: #fff; padding-left: 6px; }
.foot-grid p { color: #bdb6e0; max-width: 26em; margin-top: 14px; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 22px 0 30px; border-top: 1px solid rgba(255, 255, 255, .14); color: #9d97c4; font-size: 14px; }

.toast { position: fixed; z-index: 120; left: 50%; bottom: 90px; translate: -50% 30px; opacity: 0; background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 999px; font-weight: 700; pointer-events: none; transition: .35s cubic-bezier(.3, 1.4, .5, 1); }
.toast.show { translate: -50% 0; opacity: 1; }
.top-rocket { position: fixed; right: 18px; bottom: 18px; z-index: 54; width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--ink); background: var(--sun); color: #1b1736; font-size: 19px; box-shadow: 0 4px 0 var(--ink); opacity: 0; translate: 0 20px; pointer-events: none; transition: .3s; }
.top-rocket.show { opacity: 1; translate: 0 0; pointer-events: auto; }
.top-rocket:hover { transform: translateY(-4px) rotate(-12deg); }
.burst { position: fixed; z-index: 130; pointer-events: none; font-size: 18px; line-height: 1; }
.share i, .tags i, .sources a > i { font-size: .92em; }
.sources a > i { color: var(--accent); }
.byline .avatar i { font-size: 17px; }
.chip i, .topic-row i, .filters i, .nav i { font-size: .9em; }
.kbd i { font-size: 11px; }
.btn i { font-size: .9em; }

/* static pages */
.page { max-width: 760px; padding: 60px 0 0; }
.page h1 { font-size: clamp(38px, 6vw, 62px); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 26px; }
.page h2 { font-size: 26px; margin: 1.8em 0 .5em; }
.page p, .page li { color: var(--ink-2); font-size: 18px; line-height: 1.75; margin-bottom: 1em; }
.page a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.page .lead-in { font-size: 21px; line-height: 1.6; color: var(--ink); }
.page .updated { color: var(--muted); font-size: 15px; font-weight: 600; }
.page ul.plain { padding-left: 1.2em; }
.page ul.plain li { margin-bottom: .7em; padding-left: .3em; }
.page ul.plain li::marker { color: var(--accent); }
.page h2 { scroll-margin-top: 90px; }

.contact-form { display: grid; gap: 16px; margin: 26px 0 8px; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--accent); }
.contact-form label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form textarea {
  width: 100%; padding: 13px 18px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); font: 500 17px var(--body);
}
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-color: var(--ink); }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .btn { justify-self: start; }
.contact-note { font-size: 14px !important; color: var(--muted) !important; margin: 0 !important; line-height: 1.5 !important; }
@media (max-width: 600px) { .contact-row { grid-template-columns: 1fr; } .contact-form { padding: 20px; } }

/* ------------------------------------------------------------ reveal */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1060px) {
  .post-layout { grid-template-columns: 1fr; gap: 10px; }
  .aside { position: static; }
  .aside .toc { display: none; }
  .toc-mobile { display: block; margin-bottom: 28px; }
  .toc-mobile .toc { display: block; }
  .most-read { grid-template-columns: repeat(2, 1fr); }
  .most-read a:last-child { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; }
  .split-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .split-side .lead { grid-column: 1 / -1; }
  .ad-home-wide .ad.placeholder { width: 100%; min-height: 160px; }
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 34px; }
  .hero-card { transform: rotate(0); margin-right: 10px; }
  .sticker.s1 { left: auto; right: 6%; top: 1%; }
  .sticker.s3 { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .nav { position: absolute; left: 0; right: 0; top: 70px; flex-direction: column; margin: 0; padding: 12px 20px 20px; background: var(--bg); border-bottom: 2px solid var(--ink); display: none; overflow: visible; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 17px; }
  .actions { margin-left: auto; }
  .ad-header .ad.placeholder, .ad-footer .ad.placeholder, .ad-home-mid .ad.placeholder { width: 100%; min-height: 80px; }
  .mini-list { grid-template-columns: 1fr; }
  .split-side { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --prose: 18px; }
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .hero-stats { gap: 20px; }
  .keep { grid-template-columns: 84px 1fr; }
  .keep b { font-size: 17px; }
  .takeaways { padding: 20px 18px; }
  .prose > p:first-of-type::first-letter { font-size: 3em; }
  .most-read { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .dock button span, .dock a span { display: none; }
  .dock button, .dock a { padding: 0; min-width: 48px; }
  .searchbox kbd { display: none; }
  .ad-inline .ad.placeholder { width: 100%; }
  .ad-sidebar .ad.placeholder, .ad-home-side .ad.placeholder { width: 100%; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .mini { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .ad-wrap, .dock, .aside, .top-rocket, .progress, .related { display: none !important; }
  .post-layout { display: block; }
}
