/*
 * MJ Digital Blog — main stylesheet
 * Minimal, premium editorial design. Mobile-first. CSS variables only.
 */

/* ---------- Design tokens ---------- */
:root {
  --mj-paper: #fbf9f5;
  --mj-surface: #ffffff;
  --mj-surface-2: #f4f0e8;
  --mj-ink: #1a1712;
  --mj-body: #33302a;
  --mj-muted: #6b6459;
  --mj-faint: #8f887c;
  --mj-border: #e7e1d6;
  --mj-border-strong: #d8d0c2;
  --mj-accent: #b5462b;
  --mj-accent-ink: #953619;
  --mj-accent-soft: #f6e7e1;
  --mj-ring: rgba(181, 70, 43, 0.35);

  --mj-font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --mj-font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --mj-maxw: 1240px;
  --mj-readw: 730px;
  --mj-radius: 4px;
  --mj-radius-lg: 12px;
  --mj-gap: clamp(1.5rem, 3vw, 2.5rem);
  --mj-space: clamp(4rem, 8vw, 7.5rem);

  --mj-shadow: 0 1px 2px rgba(26, 23, 18, 0.05);
  --mj-shadow-lg: 0 8px 30px rgba(26, 23, 18, 0.08);

  --mj-fs-base: 1.0625rem;
  --mj-lh-base: 1.7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --mj-paper: #14110d;
    --mj-surface: #1c1812;
    --mj-surface-2: #221d16;
    --mj-ink: #f0ebe2;
    --mj-body: #d9d3c8;
    --mj-muted: #a49d8f;
    --mj-faint: #857e71;
    --mj-border: #2c2720;
    --mj-border-strong: #3a342b;
    --mj-accent: #e07a55;
    --mj-accent-ink: #ef9070;
    --mj-accent-soft: #2a2019;
    --mj-ring: rgba(224, 122, 85, 0.4);
    --mj-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --mj-shadow-lg: 0 10px 34px rgba(0, 0, 0, 0.5);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mj-paper);
  color: var(--mj-body);
  font-family: var(--mj-font-body);
  font-size: var(--mj-fs-base);
  line-height: var(--mj-lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--mj-accent); text-decoration: none; }
a:hover { color: var(--mj-accent-ink); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mj-font-head);
  color: var(--mj-ink);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1.15em; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--mj-ink);
  color: var(--mj-paper);
  padding: 0.6rem 1rem;
  border-radius: var(--mj-radius);
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; color: var(--mj-paper); text-decoration: none; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--mj-accent);
  outline-offset: 2px;
  border-radius: var(--mj-radius);
}
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; word-wrap: normal !important;
}

/* ---------- Layout ---------- */
.mj-container { width: 100%; max-width: var(--mj-maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.mj-site { display: flex; flex-direction: column; min-height: 100vh; }
.mj-main { flex: 1 0 auto; padding-block: var(--mj-space); }

.mj-layout { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 1000px) {
  .mj-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .mj-layout.has-sidebar.sidebar-left { grid-template-columns: 320px minmax(0, 1fr); }
  .mj-layout.has-sidebar.sidebar-left .mj-primary { order: 2; }
  .mj-layout.has-sidebar.sidebar-left .mj-sidebar { order: 1; }
  /* Align sidebar first title with article content (below breadcrumb). */
  .mj-layout.has-sidebar .mj-sidebar { margin-top: 3.25rem; }
}

/* ---------- Header ---------- */
.mj-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--mj-paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--mj-border);
}
.mj-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; padding-block: 0.75rem; }
.mj-brand { display: flex; align-items: center; gap: 0.7rem; margin-right: auto; }
.mj-brand__logo img { max-height: 40px; width: auto; }
.mj-brand__title {
  font-family: var(--mj-font-head); font-weight: 600; font-size: 1.4rem;
  color: var(--mj-ink); letter-spacing: -0.02em; line-height: 1;
}
.mj-brand__title a { color: inherit; }
.mj-brand__title a:hover { text-decoration: none; color: var(--mj-accent); }
.mj-brand__desc { display: block; font-size: 0.78rem; color: var(--mj-muted); margin-top: 0.15rem; }

.mj-nav { display: none; }
.mj-nav ul { list-style: none; display: flex; align-items: center; gap: 1.4rem; margin: 0; padding: 0; }
.mj-nav a {
  color: var(--mj-body); font-size: 0.95rem; font-weight: 500; padding: 0.35rem 0;
  position: relative; text-decoration: none;
}
.mj-nav a:hover { color: var(--mj-accent); }
.mj-nav .current-menu-item > a { color: var(--mj-accent); }
.mj-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--mj-accent); transition: width 0.2s ease;
}
.mj-nav a:hover::after, .mj-nav .current-menu-item > a::after { width: 100%; }

.mj-header__actions { display: flex; align-items: center; gap: 0.5rem; }
.mj-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: transparent; border: 1px solid var(--mj-border);
  color: var(--mj-ink); cursor: pointer; padding: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.mj-iconbtn:hover { background: var(--mj-surface-2); border-color: var(--mj-border-strong); color: var(--mj-accent); }
.mj-iconbtn svg { width: 20px; height: 20px; }

@media (min-width: 900px) {
  .mj-nav { display: block; }
  .mj-menu-toggle { display: none; }
}

/* Extra breathing room in the mobile header (top & bottom). */
@media (max-width: 899px) {
  .mj-header__inner { padding-block: 1.1rem; min-height: 0; }
  .mj-brand__title { font-size: 1.3rem; }
}

/* ---------- Mobile menu ---------- */
.mj-mobile-panel {
  display: none; border-top: 1px solid var(--mj-border);
  background: var(--mj-paper);
}
.mj-mobile-panel.is-open { display: block; }
.mj-mobile-panel ul { list-style: none; margin: 0; padding: 0.5rem 0; }
.mj-mobile-panel li { border-bottom: 1px solid var(--mj-border); }
.mj-mobile-panel li:last-child { border-bottom: 0; }
.mj-mobile-panel a { display: block; padding: 0.85rem 0; color: var(--mj-ink); font-weight: 500; }
@media (min-width: 900px) { .mj-mobile-panel { display: none !important; } }

/* ---------- Search overlay ---------- */
.mj-search-bar { display: none; border-top: 1px solid var(--mj-border); background: var(--mj-surface); }
.mj-search-bar.is-open { display: block; }
.mj-search-bar .mj-container { padding-block: 1rem; }

/* ---------- Search form ---------- */
.mj-searchform { display: flex; gap: 0.5rem; }
.mj-searchform input[type="search"] {
  flex: 1; padding: 0.75rem 1rem; font-size: 1rem; color: var(--mj-ink);
  background: var(--mj-surface); border: 1px solid var(--mj-border-strong);
  border-radius: var(--mj-radius); font-family: inherit;
}
.mj-searchform input[type="search"]::placeholder { color: var(--mj-faint); }
.mj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.3rem; font-size: 0.95rem; font-weight: 600; font-family: inherit;
  background: var(--mj-accent); color: #fff; border: 1px solid var(--mj-accent);
  border-radius: var(--mj-radius); cursor: pointer; text-decoration: none;
  transition: background-color 0.18s ease, transform 0.1s ease;
}
.mj-btn:hover { background: var(--mj-accent-ink); color: #fff; text-decoration: none; }
.mj-btn:active { transform: translateY(1px); }
.mj-btn--ghost { background: transparent; color: var(--mj-ink); border-color: var(--mj-border-strong); }
.mj-btn--ghost:hover { background: var(--mj-surface-2); color: var(--mj-accent); }

/* ---------- Page intro / archive header ---------- */
.mj-page-head { margin-bottom: var(--mj-gap); }
.mj-page-head__eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mj-accent); margin-bottom: 0.6rem;
}
.mj-page-head__title { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 0.4rem; }
.mj-page-head__desc { color: var(--mj-muted); max-width: 60ch; margin: 0; }

/* ---------- Breadcrumbs ---------- */
.mj-breadcrumbs { font-size: 0.85rem; color: var(--mj-muted); margin-bottom: 1.5rem; }
.mj-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; padding: 0; }
.mj-breadcrumbs li { display: flex; align-items: center; gap: 0.5rem; }
.mj-breadcrumbs li:not(:last-child)::after { content: "›"; color: var(--mj-faint); }
.mj-breadcrumbs a { color: var(--mj-muted); }
.mj-breadcrumbs a:hover { color: var(--mj-accent); }
.mj-breadcrumbs [aria-current="page"] { color: var(--mj-ink); font-weight: 500; }

/* ---------- Hero / featured ---------- */
.mj-hero { margin-bottom: var(--mj-space); }
.mj-hero__card {
  display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center;
  background: var(--mj-surface); border: 1px solid var(--mj-border);
  border-radius: var(--mj-radius-lg); overflow: hidden; box-shadow: var(--mj-shadow);
}
@media (min-width: 800px) { .mj-hero__card { grid-template-columns: 1.05fr 1fr; } }
.mj-hero__media { aspect-ratio: 16 / 10; background: var(--mj-surface-2); }
.mj-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.mj-hero__body { padding: clamp(1.5rem, 4vw, 2.75rem); }
.mj-hero__title { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin: 0.6rem 0 0.7rem; }
.mj-hero__title a { color: var(--mj-ink); }
.mj-hero__title a:hover { color: var(--mj-accent); text-decoration: none; }
.mj-hero__excerpt { color: var(--mj-muted); margin-bottom: 1.25rem; }

/* ---------- Post grid & cards ---------- */
.mj-grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 560px) { .mj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .mj-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mj-layout.has-sidebar .mj-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .mj-layout.has-sidebar .mj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.mj-card { display: flex; flex-direction: column; min-width: 0; }
.mj-card__media {
  display: block; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--mj-radius-lg); background: var(--mj-surface-2); border: 1px solid var(--mj-border);
}
.mj-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.mj-card:hover .mj-card__media img { transform: scale(1.03); }
.mj-card__body { padding-top: 1.3rem; }
.mj-card__title { font-size: 1.34rem; margin: 0.55rem 0; line-height: 1.25; }
.mj-card__title a { color: var(--mj-ink); }
.mj-card__title a:hover { color: var(--mj-accent); text-decoration: none; }
.mj-card__excerpt { color: var(--mj-muted); font-size: 0.96rem; margin-bottom: 1rem; }

/* Meta */
.mj-cat {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mj-accent);
}
.mj-cat a { color: inherit; }
.mj-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; font-size: 0.85rem; color: var(--mj-muted); }
.mj-meta__sep { color: var(--mj-faint); }
.mj-meta a { color: var(--mj-muted); }
.mj-meta a:hover { color: var(--mj-accent); }
.mj-meta__author { display: inline-flex; align-items: center; gap: 0.5rem; }
.mj-meta__avatar { width: 26px; height: 26px; border-radius: 50%; }

/* ---------- Single post ---------- */
.mj-article { max-width: var(--mj-readw); margin-inline: auto; }
.mj-layout.has-sidebar .mj-article { margin-inline: 0; }
.mj-article__header { margin-bottom: 1.75rem; }
.mj-article__title { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0.6rem 0 1rem; }
.mj-article__meta { border-block: 1px solid var(--mj-border); padding-block: 1rem; margin-top: 1.25rem; }
.mj-article__feature { margin: 1.75rem 0; }
.mj-article__feature img { width: 100%; border-radius: var(--mj-radius-lg); }
.mj-article__feature figcaption { font-size: 0.85rem; color: var(--mj-muted); text-align: center; margin-top: 0.6rem; }

/* Content typography */
.mj-content { font-size: 1.1rem; }
.mj-content > * { max-width: var(--mj-readw); }
.mj-content p, .mj-content ul, .mj-content ol, .mj-content h2, .mj-content h3, .mj-content h4,
.mj-content blockquote, .mj-content figure, .mj-content table, .mj-content pre { margin-inline: auto; }
.mj-content h2 { font-size: 1.7rem; margin-top: 2.2rem; }
.mj-content h3 { font-size: 1.35rem; margin-top: 1.8rem; }
.mj-content ul, .mj-content ol { padding-left: 1.4rem; margin-bottom: 1.2rem; }
.mj-content li { margin-bottom: 0.5rem; }
.mj-content li::marker { color: var(--mj-accent); }
.mj-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.mj-content img { border-radius: var(--mj-radius-lg); }
.mj-content figcaption { font-size: 0.85rem; color: var(--mj-muted); text-align: center; margin-top: 0.5rem; }
.mj-content blockquote {
  border-left: 3px solid var(--mj-accent); padding: 0.4rem 0 0.4rem 1.4rem; margin: 1.6rem auto;
  font-family: var(--mj-font-head); font-size: 1.3rem; font-style: italic; color: var(--mj-ink);
}
.mj-content blockquote p:last-child { margin-bottom: 0; }
.mj-content pre {
  background: var(--mj-ink); color: #f2ede3; padding: 1.1rem 1.25rem; border-radius: var(--mj-radius-lg);
  overflow-x: auto; font-size: 0.9rem; line-height: 1.6;
}
.mj-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
.mj-content :not(pre) > code {
  background: var(--mj-surface-2); padding: 0.15em 0.4em; border-radius: var(--mj-radius); border: 1px solid var(--mj-border);
}
.mj-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.4rem; font-size: 0.96rem; }
.mj-content th, .mj-content td { border: 1px solid var(--mj-border); padding: 0.65rem 0.85rem; text-align: left; }
.mj-content th { background: var(--mj-surface-2); font-weight: 600; color: var(--mj-ink); }
.mj-content hr { border: 0; border-top: 1px solid var(--mj-border); margin: 2rem auto; }

/* Tags */
.mj-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0; }
.mj-tags a {
  font-size: 0.82rem; padding: 0.35rem 0.8rem; border-radius: 999px;
  background: var(--mj-surface-2); color: var(--mj-body); border: 1px solid var(--mj-border);
}
.mj-tags a:hover { background: var(--mj-accent-soft); color: var(--mj-accent-ink); border-color: var(--mj-accent); text-decoration: none; }

/* Author box */
.mj-authorbox {
  display: flex; gap: 1.25rem; align-items: flex-start; margin: 2.5rem auto;
  padding: 1.5rem; background: var(--mj-surface); border: 1px solid var(--mj-border);
  border-radius: var(--mj-radius-lg); max-width: var(--mj-readw);
}
.mj-authorbox img { width: 72px; height: 72px; border-radius: 50%; flex: none; }
.mj-authorbox__name { font-family: var(--mj-font-head); font-size: 1.2rem; margin: 0 0 0.25rem; color: var(--mj-ink); }
.mj-authorbox__bio { color: var(--mj-muted); font-size: 0.95rem; margin: 0 0 0.6rem; }
.mj-authorbox__links { display: flex; gap: 1rem; font-size: 0.85rem; }

/* Post nav */
.mj-postnav { display: grid; gap: 1rem; margin: 2.5rem auto; max-width: var(--mj-readw); }
@media (min-width: 640px) { .mj-postnav { grid-template-columns: 1fr 1fr; } }
.mj-postnav a {
  display: block; padding: 1rem 1.25rem; border: 1px solid var(--mj-border);
  border-radius: var(--mj-radius-lg); background: var(--mj-surface); color: var(--mj-ink);
}
.mj-postnav a:hover { border-color: var(--mj-accent); text-decoration: none; }
.mj-postnav small { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mj-muted); margin-bottom: 0.3rem; }
.mj-postnav .next { text-align: right; }

/* Related posts */
.mj-related { margin: 3rem 0; }
.mj-related__title { font-size: 1.5rem; margin-bottom: 1.5rem; }

/* ---------- Sidebar / widgets ---------- */
.mj-sidebar { display: flex; flex-direction: column; gap: 2.75rem; min-width: 0; }
.mj-widget { }
.mj-widget__title { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mj-ink); margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--mj-accent); display: inline-block; }
.mj-widget ul { list-style: none; margin: 0; padding: 0; }
.mj-widget li { padding: 0.5rem 0; border-bottom: 1px solid var(--mj-border); font-size: 0.95rem; }
.mj-widget li:last-child { border-bottom: 0; }
.mj-widget a { color: var(--mj-body); }
.mj-widget a:hover { color: var(--mj-accent); }
.mj-sticky { position: sticky; top: 90px; }

/* ---------- Ads ---------- */
.mj-ad {
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  background: var(--mj-surface-2); border: 1px dashed var(--mj-border-strong);
  border-radius: var(--mj-radius-lg); color: var(--mj-faint);
  margin-inline: auto; overflow: hidden; text-align: center;
}
.mj-ad__label { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mj-faint); }
.mj-ad--leaderboard { min-height: 90px; max-width: 970px; margin-block: 1.5rem; }
.mj-ad--incontent { min-height: 250px; margin-block: 2rem; max-width: var(--mj-readw); }
.mj-ad--rect { min-height: 250px; }
.mj-ad--card { min-height: 250px; grid-column: 1 / -1; }
@media (min-width: 560px) { .mj-ad--card { min-height: 120px; } }
.mj-ad > * { max-width: 100%; }

/* ---------- Pagination ---------- */
.mj-pagination { margin-top: var(--mj-space); }
.mj-pagination .nav-links, .mj-pagination ul { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; list-style: none; padding: 0; margin: 0; }
.mj-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px;
  padding: 0 0.75rem; border: 1px solid var(--mj-border); border-radius: var(--mj-radius);
  color: var(--mj-body); font-weight: 500; text-decoration: none;
}
.mj-pagination .page-numbers:hover { border-color: var(--mj-accent); color: var(--mj-accent); }
.mj-pagination .page-numbers.current { background: var(--mj-accent); color: #fff; border-color: var(--mj-accent); }
.mj-pagination .page-numbers.dots { border: 0; }

/* ---------- Comments ---------- */
.mj-comments { max-width: var(--mj-readw); margin: 3rem auto 0; }
.mj-comments__title { font-size: 1.5rem; margin-bottom: 1.5rem; }
.mj-comments .comment-list { list-style: none; margin: 0; padding: 0; }
.mj-comments .comment-list ol { list-style: none; padding-left: 1.5rem; }
.mj-comment { padding: 1.25rem 0; border-bottom: 1px solid var(--mj-border); }
.mj-comment .avatar { border-radius: 50%; float: left; margin-right: 0.9rem; }
.mj-comment .comment-author { font-weight: 600; color: var(--mj-ink); }
.mj-comment .comment-metadata { font-size: 0.8rem; color: var(--mj-muted); }
.mj-comment-form { margin-top: 2rem; }
.mj-comment-form p { margin-bottom: 1rem; }
.mj-comment-form label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--mj-ink); }
.mj-comment-form input:not([type=submit]), .mj-comment-form textarea {
  width: 100%; padding: 0.7rem 0.9rem; font-family: inherit; font-size: 1rem;
  border: 1px solid var(--mj-border-strong); border-radius: var(--mj-radius);
  background: var(--mj-surface); color: var(--mj-ink);
}

/* ---------- 404 / none ---------- */
.mj-notice { text-align: center; padding: var(--mj-space) 0; max-width: 640px; margin-inline: auto; }
.mj-notice__code { font-family: var(--mj-font-head); font-size: clamp(4rem, 14vw, 8rem); color: var(--mj-accent); line-height: 1; margin: 0; }
.mj-notice__title { font-size: clamp(1.5rem, 4vw, 2.2rem); }
.mj-notice__text { color: var(--mj-muted); margin-bottom: 1.75rem; }
.mj-notice .mj-searchform { max-width: 460px; margin: 0 auto 1.5rem; }

/* ---------- Author archive header ---------- */
.mj-author-head { display: flex; gap: 1.5rem; align-items: center; margin-bottom: var(--mj-space); flex-wrap: wrap; }
.mj-author-head img { width: 92px; height: 92px; border-radius: 50%; flex: none; }
.mj-author-head__name { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 0.3rem; }
.mj-author-head__bio { color: var(--mj-muted); max-width: 60ch; margin: 0; }
.mj-author-head__links { display: flex; gap: 1rem; margin-top: 0.6rem; font-size: 0.9rem; }

/* ---------- Footer ---------- */
.mj-footer { flex: none; background: var(--mj-surface); border-top: 1px solid var(--mj-border); margin-top: var(--mj-space); }
.mj-footer__top { display: grid; gap: 2.5rem; padding-block: var(--mj-space); }
@media (min-width: 640px) { .mj-footer__cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .mj-footer__cols-3 { grid-template-columns: repeat(3, 1fr); } .mj-footer__cols-4 { grid-template-columns: repeat(4, 1fr); } }
.mj-footer__title { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mj-ink); margin-bottom: 1rem; }
.mj-footer__bottom { border-top: 1px solid var(--mj-border); padding-block: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; font-size: 0.88rem; color: var(--mj-muted); }
.mj-social { display: flex; gap: 0.75rem; }
.mj-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--mj-border); border-radius: 50%; color: var(--mj-body); }
.mj-social a:hover { border-color: var(--mj-accent); color: var(--mj-accent); }
.mj-social svg { width: 18px; height: 18px; }

/* ---------- Utilities ---------- */
.mj-stack > * + * { margin-top: var(--mj-space); }
.mj-reading-time::before { content: "· "; }

/* ---------- Forms (contact + plugin form output) ---------- */
.mj-form, .mj-content form { max-width: var(--mj-readw); }
.mj-field { margin-bottom: 1.1rem; }
.mj-field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--mj-ink); }
.mj-input,
.mj-content input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=button]),
.mj-content textarea, .mj-content select {
  width: 100%; padding: 0.75rem 0.9rem; font-family: inherit; font-size: 1rem; color: var(--mj-ink);
  background: var(--mj-surface); border: 1px solid var(--mj-border-strong); border-radius: var(--mj-radius);
}
.mj-input:focus, .mj-content textarea:focus { outline: 2px solid var(--mj-accent); outline-offset: 1px; }
textarea.mj-input { min-height: 160px; resize: vertical; }
.mj-form__note { font-size: 0.85rem; color: var(--mj-muted); margin-top: 0.5rem; }
.mj-form__error { display: block; font-size: 0.82rem; color: var(--mj-accent-ink); margin-top: 0.3rem; }
.mj-form__success { display: none; padding: 1rem 1.2rem; border: 1px solid var(--mj-accent); background: var(--mj-accent-soft); color: var(--mj-accent-ink); border-radius: var(--mj-radius-lg); margin-bottom: 1.25rem; }
.mj-form__success.is-visible { display: block; }

/* Contact layout */
.mj-contact { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 820px) { .mj-contact { grid-template-columns: 1.35fr 0.65fr; } }
.mj-contact__info h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.mj-contact__info p { color: var(--mj-muted); }
.mj-contact__info + .mj-contact__info { margin-top: 1.75rem; }

/* Full-width page template */
.mj-fullwidth .mj-article { max-width: none; }
.mj-fullwidth .mj-content > * { max-width: none; }
.mj-fullwidth .mj-content { font-size: 1.12rem; }

/* ---------- Cookie notice ---------- */
.mj-cookie {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 200;
  max-width: 680px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem 1.25rem;
  padding: 1rem 1.25rem; background: var(--mj-ink); color: var(--mj-paper);
  border-radius: var(--mj-radius-lg); box-shadow: var(--mj-shadow-lg);
}
.mj-cookie[hidden] { display: none; }
.mj-cookie p { margin: 0; font-size: 0.9rem; flex: 1 1 240px; }
.mj-cookie a { color: var(--mj-paper); text-decoration: underline; text-underline-offset: 2px; }
.mj-cookie__actions { display: flex; gap: 0.6rem; }
.mj-cookie .mj-btn--ghost { color: var(--mj-paper); border-color: rgba(255,255,255,0.35); background: transparent; }
.mj-cookie .mj-btn--ghost:hover { background: rgba(255,255,255,0.12); color: var(--mj-paper); }
@media (max-width: 520px) { .mj-cookie { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; } .mj-cookie__actions { flex: 1 1 100%; } .mj-cookie__actions .mj-btn { flex: 1; } }

/* ---------- Reading progress ---------- */
.mj-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: transparent; z-index: 100; pointer-events: none; }
.mj-progress span { display: block; height: 100%; width: 0; background: var(--mj-accent); }

/* ---------- Table of contents (no JS) ---------- */
.mj-content h2, .mj-content h3 { scroll-margin-top: 92px; }
.mj-toc {
  max-width: var(--mj-readw); margin: 0 auto 2.25rem;
  background: var(--mj-surface); border: 1px solid var(--mj-border);
  border-left: 3px solid var(--mj-accent); border-radius: var(--mj-radius-lg);
  padding: 1.15rem 1.5rem;
}
.mj-toc__title { font-family: var(--mj-font-body); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--mj-muted); margin: 0 0 0.7rem; }
.mj-toc ol { list-style: none; margin: 0; padding: 0; }
.mj-toc__item { margin: 0.35rem 0; line-height: 1.4; }
.mj-toc__item.lvl-3 { padding-left: 1.15rem; font-size: 0.94rem; }
.mj-toc a { color: var(--mj-body); text-decoration: none; }
.mj-toc a:hover { color: var(--mj-accent); text-decoration: underline; text-underline-offset: 3px; }

/* Sticky TOC rail alongside long articles on desktop (in the page gutter,
   so the reading column stays centered and everything below stays aligned) */
.mj-article__main { min-width: 0; }
@media (min-width: 1300px) {
  .mj-article.has-toc .mj-article__grid { position: relative; }
  .mj-article.has-toc .mj-toc-rail { position: absolute; top: 0; right: calc(-1 * (210px + 2rem)); width: 210px; height: 100%; }
  .mj-article.has-toc .mj-toc-rail .mj-toc { position: sticky; top: 100px; margin: 0; max-width: none; background: transparent; border: 0; border-left: 2px solid var(--mj-border); border-radius: 0; padding: 0.1rem 0 0.1rem 1rem; }
  .mj-article.has-toc .mj-toc-rail .mj-toc__item.lvl-3 { font-size: 0.88rem; }
}

/* ---------- Share links (tracker-free) ---------- */
.mj-share { max-width: var(--mj-readw); margin: 2.25rem auto; display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.mj-share__label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--mj-muted); font-weight: 700; }
.mj-share__links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mj-share a, .mj-share button {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border: 1px solid var(--mj-border); border-radius: 50%; color: var(--mj-body);
  background: transparent; cursor: pointer; padding: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.mj-share a:hover, .mj-share button:hover { border-color: var(--mj-accent); color: var(--mj-accent); background: var(--mj-accent-soft); }
.mj-share svg { width: 18px; height: 18px; }
.mj-share-copy.is-copied { border-color: var(--mj-accent); color: var(--mj-accent); background: var(--mj-accent-soft); }


@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
