/* The blog engine. Colors and fonts from the dashboard's design system, like the link-in-bio pages. */
:root {
  --bg: #fafaf9; /* Stone 50 */
  --surface: #ffffff;
  --sunken: #e7e5e4; /* Stone 200 */
  --stroke: #e7e5e4;
  --text: #292524; /* Stone 800 */
  --subtle: #57534e; /* Stone 500 */
  --muted: #a8a29e; /* Stone 400 */
  --accent: #fbbf24; /* Amber 400 */
  --active-bg: #1c1917; /* Stone 900 */
  --active-text: #ffffff;
  --glow: rgba(251, 191, 36, 0.18);
  --radius: 16px;
  --page-width: 62rem; /* the width of the pages, the header and the footer (wider in the grid themes) */
  --text-width: 46rem; /* the text of a post; its pictures use the page's width */
  /* Text sizes (Settings → Blog → Look sets them on the page) */
  --title-size: 52px; /* a post's title */
  --h1-size: 48px; /* the blog's name, a tag, author or search page */
  --h2-size: 28px; /* headings in a post */
  --body-size: 20px; /* the text of a post */
  --font-heading: Outfit, Inter, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --bg: #1c1917;
    --surface: #292524;
    --sunken: #44403c;
    --stroke: #44403c;
    --text: #fafaf9;
    --subtle: #d6d3d1;
    --muted: #a8a29e;
    --active-bg: #fbbf24;
    --active-text: #1c1917;
    --glow: rgba(251, 191, 36, 0.08);
  }
}

:root[data-scheme="dark"] {
  --bg: #1c1917;
  --surface: #292524;
  --sunken: #44403c;
  --stroke: #44403c;
  --text: #fafaf9;
  --subtle: #d6d3d1;
  --muted: #a8a29e;
  --active-bg: #fbbf24;
  --active-text: #1c1917;
  --glow: rgba(251, 191, 36, 0.08);
  color-scheme: dark;
}

:root[data-scheme="light"] {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* The footer stays at the bottom, also on short pages */
body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(60% 40% at 15% 0%, var(--glow), transparent 70%), var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 40px 16px 56px;
}

h1 {
  margin: 20px 0 0;
  font: 800 26px/1.2 var(--font-heading);
  letter-spacing: -0.02em;
}

.desc {
  margin: 8px 0 0;
  color: var(--subtle);
  font-size: 14px;
  white-space: pre-line;
}

.empty {
  margin-top: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.message {
  margin-top: 64px;
  padding: 40px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--stroke);
  text-align: center;
}

.message-icon {
  font-size: 32px;
}

.message h1 {
  margin-top: 12px;
  font-size: 22px;
}

.message p {
  margin: 8px 0 0;
  color: var(--subtle);
}

.message .message-status {
  margin-top: 16px;
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
}

/* "Made with MarketingBuddy", under the footer */
.made-with {
  margin: 0;
  padding: 20px 16px 28px;
  text-align: center;
}

.made-with a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.made-with a:hover {
  color: var(--text);
}

.made-with img {
  border-radius: 4px;
}
.page-wide {
  max-width: var(--page-width);
}






.blog-intro .desc,
.blog-filter .desc {
  margin: 8px auto 0;
  max-width: 32rem;
}



.blog-filter {
  text-align: center;
  margin-bottom: 32px;
}

.blog-filter h1 {
  margin-top: 8px;
  font-size: var(--h1-size);
  line-height: 1.1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 32px;
}

.post .tags {
  justify-content: flex-start;
  margin: 32px 0 0;
}

.tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  font-size: 12px;
  font-weight: 500;
  color: var(--subtle);
  text-decoration: none;
}

.tag:hover,
.tag-active {
  background: var(--active-bg);
  border-color: var(--active-bg);
  color: var(--active-text);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--stroke);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
  border-color: var(--muted);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.35);
}

/* The title's link covers the whole card; the author link stays clickable on top of it */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.post-card .post-meta a,
.post-hero .post-meta a {
  position: relative;
  z-index: 2;
}

/* A post without a picture: a calm block with its first letter (only the grid themes show it) */
.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--glow), transparent), var(--sunken);
  color: var(--muted);
  font: 700 44px/1 var(--font-heading);
}

.theme-journal .post-card-image.is-empty,
.theme-minimal .is-empty {
  display: none;
}

.post-card-image {
  overflow: hidden;
}

.post-card-image img {
  display: block;
  transition: transform 0.4s ease;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--sunken);
}

.post-card-body {
  padding: 20px;
}

.post-card h2 {
  margin: 0;
  font: 700 20px/1.3 var(--font-heading);
  letter-spacing: -0.01em;
}

.post-card h2 a {
  text-decoration: none;
}

.post-card:hover h2 a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-excerpt {
  margin: 8px 0 0;
  color: var(--subtle);
}

.badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #1c1917;
  font-size: 11px;
  font-weight: 600;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.post-meta a {
  color: var(--subtle);
  font-weight: 500;
  text-decoration: none;
}

.post-meta a:hover {
  color: var(--text);
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  font-size: 14px;
  font-weight: 500;
}

.pagination a {
  text-decoration: none;
}

.pagination-count {
  color: var(--muted);
  font-size: 13px;
}



/* One post: the text keeps a calm reading width, the pictures use the page's width */
.post > *,
.prose > * {
  max-width: var(--text-width);
  margin-left: auto;
  margin-right: auto;
}

.post > .post-cover,
.post > .prose,
.prose > figure,
.prose > .gallery {
  max-width: none;
}

.post ~ .subscribe {
  max-width: var(--text-width);
  margin-left: auto;
  margin-right: auto;
}

.post-header h1 {
  margin: 0;
  font-size: var(--title-size);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* The post's first tag, above its title */
.post-tag {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--subtle);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.post-tag:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.post-lead {
  margin: 16px 0 0;
  font-size: calc(var(--body-size) + 1px);
  color: var(--subtle);
}

.post-cover {
  display: block;
  width: 100%;
  margin: 28px 0 0;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--sunken);
}

/* The cover's photo credit (free photo libraries), small and quiet */
.post-cover-figure {
  margin: 0;
}

.post-cover-credit {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.post-cover-credit a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--stroke);
}

.prose {
  margin-top: 28px;
  font-size: var(--body-size);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 1.8em 0 0.5em;
  font-family: var(--font-heading);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose h2 {
  font-size: var(--h2-size);
}

.prose h3 {
  font-size: calc(var(--h2-size) * 0.8);
}

.prose h4 {
  font-size: var(--body-size);
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table,
.prose figure {
  margin: 0 0 1.2em;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose li + li {
  margin-top: 0.3em;
}

.prose blockquote {
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: var(--subtle);
}

.prose code {
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--sunken);
  font-size: 0.9em;
}

.prose pre {
  padding: 16px;
  border-radius: 12px;
  background: var(--sunken);
  overflow-x: auto;
  font-size: 15px;
  line-height: 1.5;
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.prose figure {
  margin-left: auto;
  margin-right: auto;
}

.prose figure img {
  display: block;
  margin: 0 auto;
}

/* Galleries, like Ghost: rows of up to 3 pictures; in a row they share one height and each is as wide as its own
   shape (public/blog.js sets that once the pictures load; without it they are cropped to the same shape) */
.prose .gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 1.6em 0;
}

.prose .gallery-row {
  display: flex;
  gap: 8px;
}

.prose .gallery-image {
  flex: 1 1 0%;
  min-width: 0;
}

.prose .gallery img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.prose .gallery.is-sized img {
  aspect-ratio: auto;
}

.prose figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--stroke);
  margin: 2em 0;
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  min-width: 8.5em; /* a wide table scrolls sideways instead of squeezing its words */
  padding: 8px 10px;
  border-bottom: 1px solid var(--stroke);
  text-align: left;
  vertical-align: top;
}

.author-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--stroke);
  font-size: 14px;
}

.author-box a {
  font-weight: 600;
  text-decoration: none;
}

.author-label {
  color: var(--muted);
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.blog-filter .author-avatar {
  width: 56px;
  height: 56px;
}

.author-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #1c1917;
  font: 800 20px/1 var(--font-heading);
}

.related {
  margin-top: 48px;
}

.related h2 {
  margin: 0 0 16px;
  font: 700 18px/1.3 var(--font-heading);
}

@media (min-width: 640px) {
  .post-card {
    flex-direction: row;
  }

  .post-card-image {
    flex: 0 0 38%;
  }

  .post-card-image img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 180px;
  }

  .related .post-card {
    flex-direction: column;
  }
}

/* Phones: the chosen sizes, but never too big for a small screen */
@media (max-width: 480px) {
  .blog-intro h1,
  .blog-filter h1 {
    font-size: min(var(--h1-size), 32px);
  }

  .post-header h1 {
    font-size: min(var(--title-size), 34px);
  }

  .prose {
    font-size: min(var(--body-size), 18px);
  }

  .prose h2 {
    font-size: min(var(--h2-size), 24px);
  }

  .prose h3 {
    font-size: min(calc(var(--h2-size) * 0.8), 20px);
  }
}



/* The menu and the language menu on the right */

/* The language menu: a dropdown without JavaScript */
.lang-menu {
  position: relative;
  font-size: 13px;
  font-weight: 500;
}

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--subtle);
  cursor: pointer;
  list-style: none;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary:hover,
.lang-menu[open] summary {
  color: var(--text);
  background: var(--sunken);
}

.lang-menu ul {
  position: absolute;
  right: 0;
  z-index: 10;
  min-width: 150px;
  margin: 6px 0 0;
  padding: 6px;
  list-style: none;
  text-align: left;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}

.lang-menu a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--subtle);
  text-decoration: none;
}

.lang-menu a:hover,
.lang-menu a[aria-current] {
  color: var(--text);
  background: var(--sunken);
}

/* A dark-mode logo without a light one only shows in dark mode */
@media (prefers-color-scheme: light) {
  .logo-dark-only {
    display: none;
  }
}

.blog-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 13px;
  font-weight: 500;
}

.blog-nav a {
  color: var(--subtle);
  text-decoration: none;
}

.blog-nav a:hover {
  color: var(--text);
}

.blog-banner {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  margin: 0 0 28px;
  border-radius: var(--radius);
  background: var(--sunken);
}


/* ─── Preview bar (dashboard) ───────────────────────────────────────────── */

.preview-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 6px 12px;
  background: var(--active-bg);
  color: var(--active-text);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* ─── Theme: magazine (a big first post, then a grid) ───────────────────── */

.theme-magazine,
.theme-bold {
  --page-width: 76rem;
}

.post-hero {
  position: relative;
  display: grid;
  gap: 20px;
}

.post-hero-image {
  overflow: hidden;
  border-radius: var(--radius);
}

.post-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--sunken);
}

.post-hero h2 {
  margin: 8px 0 0;
  font: 800 30px/1.15 var(--font-heading);
  letter-spacing: -0.02em;
}

.post-hero h2 a {
  text-decoration: none;
}

.post-hero:hover h2 a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.post-card:hover .post-card-image img,
.post-hero:hover .post-hero-image img {
  transform: scale(1.03);
}

.post-hero .post-excerpt {
  font-size: 16px;
}

@media (min-width: 760px) {
  .theme-magazine .post-hero,
  .theme-bold .post-hero {
    grid-template-columns: 3fr 2fr;
    align-items: center;
  }

  .theme-magazine .post-list,
  .theme-bold .post-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .theme-magazine .post-list .post-card,
  .theme-bold .post-list .post-card {
    display: flex;
    flex-direction: column;
  }

  .theme-magazine .post-list .post-card-image img,
  .theme-bold .post-list .post-card-image img {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
  }
}

@media (min-width: 1000px) {
  .theme-magazine .post-list,
  .theme-bold .post-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── Theme: minimal (text only, compact) ───────────────────────────────── */

/* The lists stay text only; a post still shows its cover picture */
.theme-minimal .post-card-image {
  display: none;
}

.theme-minimal .post-card {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--stroke);
  border-radius: 0;
  box-shadow: none;
}

.theme-minimal .post-card-body {
  padding-left: 0;
  padding-right: 0;
}

/* Newsletter: the subscribe box and its pages */
.subscribe {
  margin-top: 48px;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--stroke);
  text-align: center;
}

.subscribe h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
}

.subscribe p {
  margin: 6px 0 0;
  color: var(--subtle);
  font-size: 14px;
}

.subscribe-open,
.message-action button {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--active-bg);
  color: var(--active-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.message-action button {
  margin-top: 0;
}

/* The subscribe modal: #subscribe opens it without JavaScript (:target); blog.js adds .is-open */
.sub-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sub-modal:target,
.sub-modal.is-open {
  display: flex;
}

html.sub-open {
  overflow: hidden;
}

.sub-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 9, 0.45);
}

.sub-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 32px 28px 28px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  animation: sub-in 0.18s ease-out;
}

@keyframes sub-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sub-panel {
    animation: none;
  }
}

.sub-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
}

.sub-close:hover {
  background: var(--sunken);
  color: var(--text);
}

.sub-view h2 {
  margin: 0;
  padding-right: 24px;
  font-size: 20px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.sub-text {
  margin: 6px 0 0;
  color: var(--subtle);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sub-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sub-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sub-field label {
  font-size: 13px;
  font-weight: 500;
}

.sub-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.sub-field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.sub-submit,
.sub-secondary {
  padding: 11px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--active-bg);
  color: var(--active-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.sub-secondary {
  background: var(--sunken);
  color: var(--text);
}

.sub-submit[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.sub-link,
.sub-switch button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.sub-link {
  color: var(--muted);
  font-size: 13px;
}

.sub-switch {
  margin: 16px 0 0;
  color: var(--subtle);
  font-size: 13px;
  text-align: center;
}

.sub-error {
  margin: 0;
  color: #dc2626;
  font-size: 13px;
}

.sub-done {
  text-align: center;
}

.sub-done h2 {
  padding-right: 0;
}

.sub-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.sub-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 20px;
}

.sub-actions [hidden] {
  display: none;
}

.turnstile-slot:empty {
  display: none;
}

@media (max-width: 480px) {
  .sub-row {
    grid-template-columns: 1fr;
  }

  .sub-panel {
    padding: 28px 20px 20px;
  }
}

.message-action {
  margin-top: 20px;
}

.message .message-back {
  margin-top: 20px;
  font-size: 13px;
}

.message-back a {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Only bots fill in this field */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── The site's header ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--stroke);
}

.site-header-inner,
.site-footer-inner,
.site-footer-bottom {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 16px;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font: 600 16px/1.2 var(--font-heading);
  text-decoration: none;
}

.site-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.site-header-end {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.search-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

.btn-subscribe {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--active-bg);
  color: var(--active-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .site-header .blog-nav,
  .search-btn-label {
    display: none;
  }

  .search-btn {
    padding: 7px;
    border: 0;
    background: none;
  }

  .site-header-end {
    gap: 8px;
  }
}

/* ─── The home page: title, featured posts, latest ──────────────────────── */

.blog-intro {
  text-align: center;
  margin-bottom: 28px;
}

.blog-intro h1 {
  margin: 0;
  font-size: var(--h1-size);
  line-height: 1.1;
}

.featured {
  display: grid;
  gap: 20px;
  margin: 0 0 40px;
}

.featured .post-hero {
  padding: 0;
}

.featured .post-hero h2 {
  font-size: 30px;
}

.featured-side {
  display: grid;
  gap: 16px;
}

.featured-side .post-card {
  flex-direction: column;
}

.featured-side .post-card-image img {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
}

.featured-side h2 {
  font-size: 17px;
}

.featured-side .post-excerpt {
  display: none;
}

@media (min-width: 760px) {
  .featured:has(.featured-side) {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }

  .theme-magazine .featured:has(.featured-side),
  .theme-bold .featured:has(.featured-side) {
    grid-template-columns: 5fr 3fr;
  }

  .featured:has(.featured-side) .post-hero {
    grid-template-columns: 1fr;
  }
}

.section-title {
  margin: 0 0 16px;
  font: 600 13px/1.3 var(--font-body);
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ─── Search ────────────────────────────────────────────────────────────── */

.search-page-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 20px auto 0;
}

.search-page-form input,
.search-field input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.search-page-form button {
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--active-bg);
  color: var(--active-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.search-open {
  overflow: hidden;
}

.search-dialog {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10vh 16px 16px;
  background: rgba(12, 10, 9, 0.45);
}

.search-dialog[hidden] {
  display: none;
}

.search-panel {
  width: 100%;
  max-width: 600px;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.search-field {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--stroke);
}

.search-field input {
  border: 0;
  background: none;
  font-size: 17px;
  outline: none;
}

.search-close {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
}

.search-results:empty {
  display: none;
}

.search-result {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
}

.search-result img {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.search-result span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-result strong {
  font-weight: 600;
}

.search-result small {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result.is-active,
.search-result:hover {
  background: var(--sunken);
}

.search-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
}

/* ─── Sharing ───────────────────────────────────────────────────────────── */

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--stroke);
}

.share-label {
  margin-right: 4px;
  color: var(--muted);
  font-size: 13px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--subtle);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.share-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

.share-btn[hidden] {
  display: none;
}

/* Sharing a selected quote: a small bar above the selection */
.quote-share {
  position: absolute;
  z-index: 30;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 10px;
  background: var(--active-bg);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.quote-share[hidden] {
  display: none;
}

.quote-share button {
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--active-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.quote-share button:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ─── The site's footer ─────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--stroke);
  background: var(--surface);
}

.site-footer-inner {
  display: grid;
  gap: 28px;
  padding-top: 40px;
  padding-bottom: 32px;
}

@media (min-width: 720px) {
  .site-footer-inner {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
}

.site-footer-about p {
  margin: 12px 0 0;
  max-width: 22rem;
  color: var(--subtle);
  font-size: 14px;
}

.site-footer-title {
  margin: 4px 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.site-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.site-footer-col a {
  color: var(--subtle);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-footer-col a:hover {
  color: var(--text);
}

.site-footer-bottom {
  padding-top: 16px;
  padding-bottom: 16px;
  border-top: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 13px;
}

.site-footer-bottom p {
  margin: 0;
  white-space: pre-line;
}

/* ─── Theme: bold (a colored band at the top, big type, a grid) ─────────── */

.theme-bold .site-header {
  background: var(--accent);
  border-bottom: 0;
  color: #1c1917;
}

.theme-bold .site-header .blog-nav a,
.theme-bold .search-btn {
  color: #1c1917;
}

.theme-bold .search-btn {
  background: rgba(255, 255, 255, 0.35);
  border-color: transparent;
}

.theme-bold .btn-subscribe {
  background: #1c1917;
  color: #fff;
}

/* The band spans the whole window */
.theme-bold .blog-intro {
  margin: -40px calc(50% - 50vw) 36px;
  padding: 40px calc(50vw - 50%) 48px;
  background: var(--accent);
  color: #1c1917;
}

.theme-bold .blog-intro .desc {
  color: #1c1917;
  opacity: 0.8;
}

.theme-bold .blog-intro h1 {
  letter-spacing: -0.03em;
}

.theme-bold .post-card {
  border: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px -16px rgba(0, 0, 0, 0.3);
}

.theme-bold .post-card h2 {
  font-size: 21px;
}



/* ─── The search's tags and authors ──────────────────────────────────────── */

.search-matches {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.search-matches .tags {
  margin: 0;
}

/* The brand's profiles and the feed as icons in the footer */
.site-social {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0 0 -8px;
  padding: 0;
  list-style: none;
}

.site-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--subtle);
}

.site-social a:hover {
  color: var(--text);
  background: var(--sunken);
}

/* The instant search's tags and authors */
.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 4px;
}
