/* attaky-blog theme. Colour and type tokens as on attaky.com.
   The body always carries .calm. */

:root {
  --canvas: #FFFFFF;
  --ink: #000000;
  --muted: #5C5C5C;
  --paper: #FAFAFA;
  --pill: #F5F5F5;
  --divider: #E5E5E5;
  --brand: #C72B2F;
  --green: #61C680;
  --brown: #D3B7A7;
  --yellow: #FFD400;
  --orange: #F99963;
  --purple: #AE96D4;

  --font-display: "Caprasimo", "Cooper Black", Georgia, serif;
  --font-body: "Switzer", "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --ak-font-display: "Caprasimo", "Cooper Black", Georgia, serif;
  --ak-font-text: "Inter", system-ui, sans-serif;
  --ak-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --ak-hdr-z: 60;

  --border: 3px solid var(--ink);
  --pop: 6px 6px 0 var(--ink);
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { margin: 0; font-size: 17px; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
summary::-webkit-details-marker { display: none; }
summary { list-style: none; cursor: pointer; }
.icon { width: 1em; height: 1em; flex: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.mono-label {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.25em; color: rgba(0, 0, 0, 0.6);
}
.chip {
  display: inline-block; background: var(--brand); color: var(--canvas);
  border: var(--border); border-radius: 16px; padding: 0 12px;
  transform: rotate(-2deg); font-style: normal;
}
.halftone {
  background-image: radial-gradient(circle at 50% 50%, var(--ink) 1.2px, transparent 1.6px);
  background-size: 12px 12px;
}

/* ── Decorative shapes (attaky.com Shape.astro) ───────────────────── */
.shape { position: absolute; border: var(--border); pointer-events: none; }
.shape.circle { border-radius: 50%; }
.shape.square { border-radius: 6px; }
@media (max-width: 767px) { .shape.hide-sm { display: none; } }

/* ── Tag colours: one palette colour per primary tag ─────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 6px; background: var(--tag, var(--canvas));
  border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ── Blog index: hero ────────────────────────────────────────────── */
.blog-hero { position: relative; overflow: hidden; background: var(--yellow); border-bottom: var(--border); }
.blog-hero .wrap { position: relative; padding-top: 72px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 18px; }
.blog-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(48px, 8vw, 96px); line-height: 0.98; margin: 0; }
.blog-hero p { margin: 0; max-width: 640px; font-size: 20px; line-height: 1.5; color: rgba(0, 0, 0, 0.78); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-size: 16px; padding: 10px 20px;
  border-radius: 999px; border: var(--border); transition: transform 200ms, box-shadow 200ms;
}
.btn .icon { width: 16px; height: 16px; }
.btn-dark { background: var(--ink); color: var(--canvas); }
.btn-light { background: var(--canvas); color: var(--ink); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--brand); }

/* ── Tag filter ──────────────────────────────────────────────────── */
.tagbar { border-bottom: var(--border); background: var(--canvas); }
.tagbar .wrap { display: flex; gap: 10px; padding-top: 18px; padding-bottom: 18px; overflow-x: auto; }
.tagbar a {
  flex: none; font-family: var(--font-display); font-size: 15px; padding: 6px 16px;
  border: var(--border); border-radius: 999px; background: var(--canvas); transition: background 150ms;
}
.tagbar a:hover { background: var(--pill); }
.tagbar a[aria-current="page"] { background: var(--ink); color: var(--canvas); }

/* ── Post cards ──────────────────────────────────────────────────── */
.listing { position: relative; background: var(--paper); border-bottom: var(--border); }
.listing .dots { position: absolute; inset: 0; opacity: 0.08; pointer-events: none; }
.listing .wrap { position: relative; padding-top: 56px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 40px; }
.card {
  background: var(--canvas); border: var(--border); border-radius: 24px; overflow: hidden;
  box-shadow: var(--pop); display: flex; flex-direction: column;
  transition: transform 200ms, box-shadow 200ms;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.card .cover { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; border-bottom: var(--border); background: var(--tag-soft, var(--pill)); }
.card .body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card h3 { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.12; margin: 0; }
.card .tag { align-self: flex-start; }
.card p { margin: 0; color: rgba(0, 0, 0, 0.72); font-size: 16px; line-height: 1.55; }
.card .meta { margin-top: auto; padding-top: 4px; }
.card:hover h3 { text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 3px; text-underline-offset: 4px; }

.featured { flex-direction: row; }
.featured .cover { width: 56%; aspect-ratio: auto; min-height: 380px; border-bottom: 0; border-right: var(--border); }
.featured .body { padding: 36px 36px 32px; gap: 16px; justify-content: center; }
.featured h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; margin: 0; }
.featured p { font-size: 18px; }
.featured .meta { margin-top: 8px; }
.featured-label { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; background: var(--canvas); border: var(--border); border-radius: 999px; padding: 4px 12px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; }
.featured-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
@media (max-width: 899px) {
  .featured { flex-direction: column; }
  .featured .cover { width: 100%; min-height: 0; aspect-ratio: 16 / 10; border-right: 0; border-bottom: var(--border); }
  .featured .body { padding: 24px; }
}

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 1023px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .grid { grid-template-columns: 1fr; gap: 24px; } }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.18em; }

/* ── Discord strip / card ────────────────────────────────────────── */
.discord-strip { position: relative; overflow: hidden; background: var(--green); border-bottom: var(--border); }
.discord-strip .wrap { position: relative; padding-top: 56px; padding-bottom: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.discord-strip h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4.5vw, 56px); line-height: 1.0; margin: 0 0 10px; }
.discord-strip p { margin: 0; max-width: 560px; font-size: 18px; color: rgba(0, 0, 0, 0.78); }

/* ── Post page ───────────────────────────────────────────────────── */
.post-head { position: relative; overflow: hidden; background: var(--tag); border-bottom: var(--border); }
.post-head .inner { position: relative; max-width: 880px; margin: 0 auto; padding: 40px 24px 150px; display: flex; flex-direction: column; gap: 18px; }
.back { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.18em; }
.back:hover { color: var(--brand); }
.back .icon { width: 16px; height: 16px; }
.post-head .tag { background: var(--canvas); align-self: flex-start; }
.post-head h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 6.2vw, 72px); line-height: 1.0; margin: 0; }
.post-head .excerpt { margin: 0; font-size: 21px; line-height: 1.5; color: rgba(0, 0, 0, 0.78); }
.byline { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; border: var(--border); background: var(--canvas); display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 30px; height: auto; }
.byline strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 17px; line-height: 1.2; }
.feature { max-width: 1120px; margin: -120px auto 0; padding: 0 24px; position: relative; }
.feature figure { margin: 0; }
.feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: var(--border); border-radius: 24px; box-shadow: var(--pop); background: var(--canvas); }
.feature figcaption { margin-top: 14px; text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.content { max-width: 720px; margin: 0 auto; padding: 48px 24px 24px; font-size: 18px; line-height: 1.75; color: rgba(0, 0, 0, 0.86); }
.content > * + * { margin-top: 1.25em; }
.content p { margin-bottom: 0; }
.content h2 { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.1; color: var(--ink); margin: 1.8em 0 0; }
.content h3 { font-size: 22px; line-height: 1.3; font-weight: 700; color: var(--ink); margin: 1.6em 0 0; }
.content a { text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 500; color: var(--ink); }
.content a:hover { color: var(--brand); }
.content ul { padding-left: 0; list-style: none; }
.content ul li { position: relative; padding-left: 28px; }
.content ul li + li { margin-top: 8px; }
.content ul li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 10px; height: 10px; background: var(--brand); border: 2px solid var(--ink); border-radius: 3px; transform: rotate(12deg); }
.content ol { padding-left: 1.4em; }
.content ol li::marker { font-family: var(--font-mono); font-weight: 700; color: var(--brand); }
.content code { font-family: var(--font-mono); font-size: 0.86em; background: var(--pill); border: 1.5px solid var(--divider); border-radius: 6px; padding: 1px 6px; }
.content pre { background: var(--ink); color: #F5F5F5; border: var(--border); border-radius: 16px; padding: 20px 22px; overflow-x: auto; font-size: 14px; line-height: 1.6; box-shadow: 6px 6px 0 var(--yellow); }
.content pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.content blockquote { margin-left: 0; margin-right: 0; position: relative; background: var(--canvas); border: var(--border); border-radius: 20px; padding: 26px 28px 24px 72px; font-family: var(--font-display); font-size: 24px; line-height: 1.3; color: var(--ink); box-shadow: 6px 6px 0 var(--brand); }
.content blockquote::before { content: "\201C"; position: absolute; left: 20px; top: 6px; font-size: 72px; line-height: 1; color: var(--brand); }
.content figure { margin-left: 0; margin-right: 0; }
.content figure img { border: var(--border); border-radius: 20px; }
.content figcaption { margin-top: 12px; text-align: center; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; color: var(--muted); }
.content .wide { margin-left: -120px; margin-right: -120px; }
@media (max-width: 1000px) { .content .wide { margin-left: 0; margin-right: 0; } }
.callout { display: flex; gap: 16px; align-items: flex-start; background: rgba(97, 198, 128, 0.15); border: var(--border); border-radius: 16px; padding: 18px 20px; font-size: 17px; line-height: 1.6; }
.callout .badge { flex: none; width: 40px; height: 40px; display: grid; place-items: center; background: var(--green); border: var(--border); border-radius: 12px; }
.callout .badge .icon { width: 20px; height: 20px; }
.content hr { border: 0; height: 3px; background: var(--ink); margin: 2.4em 0; }

.post-tags { max-width: 720px; margin: 0 auto; padding: 16px 24px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.post-tags .tag { background: var(--canvas); }
.post-tags .tag:hover { background: var(--pill); }

.talk { max-width: 720px; margin: 48px auto 72px; padding: 0 24px; }
.talk .box { position: relative; overflow: hidden; background: var(--green); border: var(--border); border-radius: 24px; box-shadow: var(--pop); padding: 28px 28px 30px; display: flex; flex-direction: column; gap: 14px; }
.talk h2 { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.05; margin: 0; }
.talk p { margin: 0; font-size: 17px; color: rgba(0, 0, 0, 0.8); max-width: 520px; }
.talk .btn { align-self: flex-start; }

.more .wrap { padding-top: 56px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 28px; }
.more h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4vw, 48px); line-height: 1.0; margin: 0; }

/* ── Footer (attaky.com Footer.astro) ────────────────────────────── */
.site-footer { position: relative; overflow: hidden; background: var(--brown); border-top: var(--border); }
.site-footer .wrap { position: relative; padding-top: 80px; padding-bottom: 80px; }
.site-footer .big { font-family: var(--font-display); font-weight: 400; font-size: clamp(48px, 8.5vw, 96px); line-height: 0.95; margin: 0 0 48px; }
.site-footer .cols { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; }
.site-footer .brand-col { display: flex; flex-direction: column; gap: 12px; }
.site-footer .brand-col img { height: 32px; width: auto; align-self: flex-start; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: var(--canvas); border: var(--border); border-radius: 999px; padding: 6px 12px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.link-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.link-cols h3 { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin: 0 0 12px; }
.link-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.link-cols a { display: inline-flex; align-items: center; gap: 8px; }
.link-cols a:hover, .legal a:hover, .legal button:hover { text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 3px; text-underline-offset: 2px; }
.link-cols .icon { width: 16px; height: 16px; }
.legal { margin-top: 64px; padding-top: 24px; border-top: var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; }
.legal div { display: flex; gap: 16px; align-items: center; }
.legal button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
@media (max-width: 767px) {
  .site-footer .wrap { padding-top: 104px; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .link-cols { grid-template-columns: 1fr; }
  .legal { justify-content: center; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; }
}

/* ── Calm reading: inside an article the page steps back so the text
   leads; the brand stays in the nav and footer. ── */
.calm .post-head { background: var(--tag-soft); }
.calm .post-head .inner { padding-bottom: 140px; }
.calm .post-head h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.06; }
.calm .post-head .excerpt { font-size: 20px; color: rgba(0, 0, 0, 0.7); }
.calm .post-head .tag { background: var(--tag); }
.calm .feature img { border-width: 2px; border-radius: 16px; box-shadow: none; }

.calm .content { color: rgba(0, 0, 0, 0.8); }
.calm .content h2 { font-family: var(--font-body); font-weight: 700; font-size: 28px; line-height: 1.25; letter-spacing: -0.01em; }
.calm .content h3 { font-size: 20px; }
.calm .content a { text-decoration-thickness: 1.5px; font-weight: inherit; }
.calm .content ul li::before { top: 0.72em; width: 6px; height: 6px; background: var(--ink); border: 0; border-radius: 50%; transform: none; left: 8px; }
.calm .content ol li::marker { font-weight: 500; color: var(--muted); }
.calm .content blockquote { background: none; border: 0; border-left: 3px solid var(--ink); border-radius: 0; box-shadow: none; padding: 2px 0 2px 22px; font-family: var(--font-body); font-size: 20px; line-height: 1.55; font-weight: 500; color: rgba(0, 0, 0, 0.8); }
.calm .content blockquote::before { content: none; }
.calm .content pre { border: 0; border-radius: 12px; box-shadow: none; background: #1A1A1A; }
.calm .content figure img { border-width: 2px; border-radius: 12px; }
.calm .callout { background: var(--paper); border: 1.5px solid var(--divider); border-radius: 12px; }
.calm .callout .badge { width: 32px; height: 32px; background: none; border: 0; }
.calm .content hr { height: 1.5px; background: var(--divider); }
.calm .post-tags .tag { border-width: 1.5px; }

.calm .talk .box { background: var(--paper); border-width: 2px; border-radius: 16px; box-shadow: none; }
.calm .talk .shape { display: none; }
.calm .talk h2 { font-size: 26px; }
.calm .more { background: var(--canvas); border-top: 1.5px solid var(--divider); }
.calm .more .dots { display: none; }
.calm .more .wrap { padding-top: 48px; padding-bottom: 64px; gap: 24px; }
.calm .more h2 { font-family: var(--font-body); font-weight: 700; font-size: 24px; line-height: 1.3; }
.calm .more .grid { gap: 24px; }
.calm .more .card { border-width: 1.5px; border-color: var(--divider); border-radius: 16px; box-shadow: none; }
.calm .more .card:hover { transform: none; box-shadow: none; border-color: var(--ink); }
.calm .more .card .cover { border-bottom: 1.5px solid var(--divider); }
.calm .more .card h3 { font-family: var(--font-body); font-weight: 700; font-size: 19px; line-height: 1.3; }
.calm .more .card p { font-size: 15px; }
.calm .more .card:hover h3 { text-decoration-thickness: 2px; }
.calm .more .tag { background: var(--tag-soft); border-width: 1.5px; }

/* ── Calm index: the listing uses the same quiet cards as "Keep reading". ── */
.calm .tagbar { border-bottom: 1.5px solid var(--divider); }
.calm .tagbar a { font-family: var(--font-body); font-weight: 600; font-size: 14px; border-width: 1.5px; border-color: var(--divider); }
.calm .tagbar a:hover { border-color: var(--ink); background: var(--canvas); }
.calm .tagbar a[aria-current="page"] { border-color: var(--ink); }
.calm .listing { background: var(--canvas); border-bottom: 1.5px solid var(--divider); }
.calm .listing .dots { display: none; }
.calm .listing .wrap { gap: 32px; }
.calm .card { border-width: 1.5px; border-color: var(--divider); border-radius: 16px; box-shadow: none; }
.calm .card:hover { transform: none; box-shadow: none; border-color: var(--ink); }
.calm .card .cover { border-bottom: 1.5px solid var(--divider); }
.calm .card h3 { font-family: var(--font-body); font-weight: 700; font-size: 19px; line-height: 1.3; }
.calm .card p { font-size: 15px; }
.calm .card:hover h3, .calm .featured:hover h2 { text-decoration-thickness: 2px; }
.calm .card .tag { background: var(--tag-soft); border-width: 1.5px; }
.calm .featured .cover { border-bottom: 0; border-right: 1.5px solid var(--divider); }
.calm .featured h2 { font-family: var(--font-body); font-weight: 700; font-size: clamp(26px, 2.8vw, 34px); line-height: 1.2; letter-spacing: -0.01em; }
.calm .featured p { font-size: 17px; }
.calm .featured-label { border-width: 1.5px; border-color: var(--divider); }
.calm .grid { gap: 24px; }
@media (max-width: 899px) {
  .calm .featured .cover { border-right: 0; border-bottom: 1.5px solid var(--divider); }
}
.calm .pager .btn-dark { font-family: var(--font-body); font-weight: 600; font-size: 14px; border-width: 1.5px; }
.calm .pager .btn:hover { transform: none; box-shadow: none; background: #222; }

/* ── Mockup blocks (hero, Discord strip): no template uses these classes ── */
.calm .blog-hero { background: rgba(255, 212, 0, 0.16); border-bottom: 1.5px solid var(--divider); }
.calm .blog-hero .shape { display: none; }
.calm .blog-hero .wrap { padding-top: 56px; padding-bottom: 48px; gap: 14px; }
.calm .blog-hero h1 { font-size: clamp(40px, 5.5vw, 64px); line-height: 1.02; }
.calm .blog-hero .chip { border-width: 2px; border-radius: 12px; transform: rotate(-1deg); padding: 0 10px; }
.calm .blog-hero p { font-size: 18px; color: rgba(0, 0, 0, 0.7); }
.calm .hero-actions .btn { font-family: var(--font-body); font-weight: 600; font-size: 14px; border-width: 1.5px; padding: 8px 16px; }
.calm .hero-actions .btn:hover { transform: none; box-shadow: none; }
.calm .hero-actions .btn-light { border-color: var(--divider); }
.calm .hero-actions .btn-light:hover { border-color: var(--ink); }

.calm .discord-strip { background: var(--paper); border-bottom: 0; border-top: 1.5px solid var(--divider); }
.calm .discord-strip .shape { display: none; }
.calm .discord-strip .wrap { padding-top: 40px; padding-bottom: 40px; }
.calm .discord-strip h2 { font-family: var(--font-body); font-weight: 700; font-size: 26px; line-height: 1.25; }
.calm .discord-strip .chip { all: unset; }
.calm .discord-strip p { font-size: 16px; }
.calm .discord-strip .btn { font-family: var(--font-body); font-weight: 600; font-size: 14px; border-width: 1.5px; }
.calm .discord-strip .btn:hover { transform: none; box-shadow: none; }

/* ── Topics: the three content types ── */

/* ── Index: a compact masthead, text topics, and the latest post as the
   lead. ── */
.masthead .wrap { padding-top: 40px; }
.mast-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.masthead h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 5vw, 60px); line-height: 1; margin: 0 0 10px; }
.masthead p { margin: 0; max-width: 560px; font-size: 17px; color: var(--muted); }
.mast-links { display: flex; gap: 20px; padding-bottom: 4px; }
.mast-links a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.mast-links a:hover { color: var(--brand); }
.mast-links .icon { width: 16px; height: 16px; }
.topics { display: flex; gap: 28px; margin-top: 28px; box-shadow: inset 0 -1.5px 0 var(--divider); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.topics::-webkit-scrollbar { display: none; }
.topics a { flex: none; padding: 10px 0 12px; font-weight: 600; font-size: 15px; color: var(--muted); border-bottom: 3px solid transparent; }
.topics a:hover { color: var(--ink); }
.topics a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }

.calm .listing { border-bottom: 0; }
.calm .listing .wrap { padding-top: 40px; }
.lead { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; align-items: center; padding-bottom: 40px; border-bottom: 1.5px solid var(--divider); }
.lead .cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; border: 1.5px solid var(--divider); background: var(--tag-soft); }
.lead .body { display: flex; flex-direction: column; gap: 16px; }
.lead .tag { align-self: flex-start; background: var(--tag-soft); border-width: 1.5px; }
.lead h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1.02; margin: 0; }
.lead:hover h2 { text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.lead p { margin: 0; font-size: 18px; line-height: 1.6; color: rgba(0, 0, 0, 0.72); }
@media (max-width: 899px) { .lead { grid-template-columns: 1fr; gap: 20px; } }
.masthead h1.solo { margin-bottom: 0; }
.mast-row:has(h1.solo) { align-items: center; }
.calm .talk .box { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-width: 1.5px; border-color: var(--divider); }
.calm .talk h2 { font-family: var(--font-body); font-weight: 700; font-size: 20px; line-height: 1.3; }
.calm .talk .btn { align-self: center; font-family: var(--font-body); font-weight: 600; font-size: 14px; border-width: 1.5px; }
.calm .talk .btn:hover { transform: none; box-shadow: none; }

/* ── Follow card: one place for every channel ── */
.follow { max-width: 720px; margin: 48px auto 72px; padding: 0 24px; }
.listing .follow { max-width: none; width: 100%; margin: 8px 0 0; padding: 0; }
.follow .box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; background: var(--paper); border: 1.5px solid var(--divider); border-radius: 16px; }
.follow h2 { font-family: var(--font-body); font-weight: 700; font-size: 20px; line-height: 1.3; margin: 0; }
.channels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.channels .btn { font-family: var(--font-body); font-weight: 600; font-size: 14px; border-width: 1.5px; padding: 8px 16px; }
.channels .btn:hover { transform: none; box-shadow: none; background: #222; }
.ch { width: 38px; height: 38px; display: grid; place-items: center; border: 1.5px solid var(--divider); border-radius: 50%; background: var(--canvas); transition: border-color 150ms, color 150ms; }
.ch .icon { width: 16px; height: 16px; }
.ch:hover { border-color: var(--ink); color: var(--brand); }
.ch.placeholder { border-style: dashed; color: rgba(0, 0, 0, 0.4); }
@media (max-width: 479px) {
  .follow .box { padding: 16px; }
  .channels { gap: 6px; flex-wrap: nowrap; }
  .channels .btn { padding: 7px 12px; }
  .ch { width: 34px; height: 34px; }
}


/* ── Theme (Ghost) ───────────────────────────────────────────────── */
.card, .lead, .post { --tag: #E5E5E5; --tag-soft: color-mix(in srgb, var(--tag) 20%, white); }
.post .post-head .tag { background: var(--tag); }
.icon-20 { width: 20px; height: 20px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--canvas); padding: 8px 14px; border-radius: 999px; }
.skip-link:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.link-cols h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin: 0 0 12px; }
.lead { color: inherit; }
.post-follow .follow { margin-bottom: 72px; }
.listing .pager { margin-top: 8px; }
.error-page .wrap { padding-top: 72px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 14px; }
.error-page h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: 1; margin: 0; }
.error-page .error-text { margin: 0; color: var(--muted); font-size: 18px; }
.error-page .btn { align-self: flex-start; }

/* Ghost content cards. card_assets ships Ghost's own card CSS; these rules
   give the images, quotes, code and callouts the calm look. */
.gh-content .kg-card { margin-top: 1.6em; }
.gh-content .kg-image-card img, .gh-content .kg-gallery-image img { border: 2px solid var(--ink); border-radius: 12px; }
.gh-content .kg-width-wide { margin-left: -120px; margin-right: -120px; }
.gh-content .kg-width-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.gh-content .kg-width-full img { border-radius: 0; border-left: 0; border-right: 0; }
@media (max-width: 1000px) { .gh-content .kg-width-wide { margin-left: 0; margin-right: 0; } }
.gh-content .kg-image { margin: 0 auto; }
.gh-content blockquote.kg-blockquote-alt { border-left: 0; padding-left: 0; text-align: center; font-size: 24px; }
.gh-content .kg-callout-card { display: flex; gap: 14px; align-items: flex-start; background: var(--paper) !important; border: 1.5px solid var(--divider); border-radius: 12px; padding: 18px 20px; font-size: 17px; line-height: 1.6; color: var(--ink); }
.gh-content .kg-callout-emoji { font-size: 0 !important; line-height: 0; flex: none; width: 20px; height: 20px; margin-top: 3px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4m0-4h.01'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4m0-4h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.gh-content .kg-bookmark-card a.kg-bookmark-container { border: 1.5px solid var(--divider); border-radius: 12px; text-decoration: none; }
.gh-content .kg-bookmark-card a.kg-bookmark-container:hover { border-color: var(--ink); }
.gh-content .kg-button-card a.kg-btn { font-family: var(--font-body); font-weight: 600; border-radius: 999px; }
