/*
Theme Name: Sorrel
Text Domain: sorrel
Description: A warm, paper-grained classic theme for long-form German editorial content: matte sandstone surfaces, deep aubergine ink, quiet brass accents, hand-ruled lines and sketched media frames.
*/

/* ============================================================
   1. Design tokens
   ============================================================ */

:root {
  --bg: #f2ebdd;
  --bg-soft: #e9dfcc;
  --bg-card: #f7f2e8;
  --fg: #2b2229;
  --fg-soft: #463a44;
  --muted: #6e6154;
  --border: #d7c9b2;
  --border-strong: #b8a888;
  --accent: #a9854e;
  --accent-deep: #8a6a3a;
  --aubergine: #3c2a3a;
  --aubergine-deep: #2e202d;
  --ink-line: rgba(43, 34, 41, 0.16);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(46, 32, 45, 0.06), 0 10px 28px -18px rgba(46, 32, 45, 0.35);
  --media-ratio: 16 / 9;
  --thumb-ratio: 16 / 9;
  --measure: 70ch;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: 1.95rem;
  --step-4: clamp(2.1rem, 1.4rem + 2.6vw, 2.9rem);
  --space-1: 0.375rem;
  --space-2: 0.75rem;
  --space-3: 1.125rem;
  --space-4: 1.75rem;
  --space-5: 2.75rem;
  --space-6: 4.25rem;
}

/* ============================================================
   2. Reset & base
   ============================================================ */

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.7;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(rgba(60, 42, 58, 0.028) 1px, transparent 1px),
    radial-gradient(rgba(169, 133, 78, 0.03) 1px, transparent 1px);
  background-size: 22px 22px, 34px 34px;
  background-position: 0 0, 11px 17px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.22;
  color: var(--aubergine);
  margin: 0 0 var(--space-3);
  letter-spacing: 0.005em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p {
  margin: 0 0 var(--space-3);
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--aubergine);
}

ul, ol {
  padding-left: 1.3em;
  margin: 0 0 var(--space-3);
}

li + li {
  margin-top: 0.35em;
}

blockquote {
  margin: var(--space-4) 0;
  padding: var(--space-2) var(--space-4);
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif);
  font-size: 1.12em;
  color: var(--fg-soft);
}

blockquote p:last-child {
  margin-bottom: 0;
}

code, pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

pre {
  background: var(--aubergine-deep);
  color: #efe6d4;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 0 0 var(--space-4);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-5) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--space-4);
  font-size: var(--step--1);
}

th, td {
  text-align: left;
  padding: 0.6em 0.9em;
  border: 1px solid var(--border);
}

th {
  background: var(--bg-soft);
  font-family: var(--font-serif);
  color: var(--aubergine);
}

figure {
  margin: 0 0 var(--space-4);
}

figcaption {
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: var(--space-2);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.qfxmr-skip-link {
  position: absolute;
  left: var(--space-3);
  top: -4rem;
  background: var(--aubergine);
  color: #f2ebdd;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
}

.qfxmr-skip-link:focus {
  top: var(--space-3);
  color: #f2ebdd;
}

/* ============================================================
   3. Layout skeleton
   ============================================================ */

.qfxmr-site-inner {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.qfxmr-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  padding-block: var(--space-5) var(--space-6);
}

.qfxmr-content-area {
  min-width: 0;
}

@media (max-width: 900px) {
  .qfxmr-content-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   4. Site header & navigation
   ============================================================ */

.qfxmr-site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--ink-line);
  box-shadow: 0 1px 0 rgba(169, 133, 78, 0.18);
  position: relative;
  z-index: 50;
}

.qfxmr-site-header .qfxmr-site-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-block: var(--space-3);
}

.qfxmr-site-title {
  margin: 0;
  font-size: var(--step-2);
  font-family: var(--font-serif);
}

.qfxmr-site-title a {
  color: var(--aubergine);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.qfxmr-site-title a:hover,
.qfxmr-site-title a:focus-visible {
  border-bottom-color: var(--accent);
  color: var(--aubergine-deep);
}

.qfxmr-nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.5em 0.9em;
  font: inherit;
  font-size: var(--step--1);
  color: var(--aubergine);
  cursor: pointer;
}

.qfxmr-nav-toggle .qfxmr-bars {
  display: inline-block;
  width: 18px;
  height: 12px;
  background:
    linear-gradient(var(--aubergine), var(--aubergine)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--aubergine), var(--aubergine)) 0 5px / 100% 2px no-repeat,
    linear-gradient(var(--aubergine), var(--aubergine)) 0 10px / 100% 2px no-repeat;
}

.qfxmr-main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  align-items: center;
}

.qfxmr-main-navigation li + li {
  margin-top: 0;
}

.qfxmr-main-navigation a {
  display: block;
  padding: 0.45em 0.1em;
  color: var(--fg-soft);
  text-decoration: none;
  font-size: 0.98rem;
  border-bottom: 2px solid transparent;
}

.qfxmr-main-navigation a:hover,
.qfxmr-main-navigation a:focus-visible,
.qfxmr-main-navigation .current-menu-item > a,
.qfxmr-main-navigation .current-menu-ancestor > a {
  color: var(--aubergine-deep);
  border-bottom-color: var(--accent);
}

.qfxmr-main-navigation .menu-item-has-children {
  position: relative;
}

.qfxmr-main-navigation .sub-menu {
  position: absolute;
  top: 100%;
  left: -0.5rem;
  min-width: 16rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: var(--space-2);
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  z-index: 60;
}

.qfxmr-main-navigation .menu-item-has-children:hover > .sub-menu,
.qfxmr-main-navigation .menu-item-has-children:focus-within > .sub-menu,
.qfxmr-main-navigation .menu-item-has-children.qfxmr-is-open > .sub-menu {
  display: flex;
}

.qfxmr-main-navigation .sub-menu a {
  padding: 0.5em 0.75em;
  border-radius: 4px;
  border-bottom: 0;
  font-size: 0.92rem;
}

.qfxmr-main-navigation .sub-menu a:hover,
.qfxmr-main-navigation .sub-menu a:focus-visible {
  background: var(--bg-soft);
  border-bottom-color: transparent;
}

.qfxmr-sub-toggle {
  display: none;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.6em 0.8em;
  margin-left: -0.6em;
  font: inherit;
  line-height: 1;
  color: var(--accent-deep);
  cursor: pointer;
}

.qfxmr-sub-toggle::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.qfxmr-sub-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg) translateY(-2px);
}

.qfxmr-sub-toggle:hover,
.qfxmr-sub-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--aubergine-deep);
  outline: none;
}

@media (max-width: 900px) {
  .qfxmr-nav-toggle {
    display: inline-flex;
  }

  .qfxmr-main-navigation {
    display: none;
    width: 100%;
    flex-basis: 100%;
    padding-bottom: var(--space-2);
  }

  .qfxmr-main-navigation.qfxmr-is-open {
    display: block;
  }

  .qfxmr-main-navigation ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .qfxmr-main-navigation a {
    padding: 0.65em 0.25em;
  }

  .qfxmr-main-navigation .menu-item-has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: var(--space-2);
  }

  .qfxmr-main-navigation .menu-item-has-children > a {
    flex: 1 1 auto;
  }

  .qfxmr-main-navigation .qfxmr-sub-toggle {
    display: inline-block;
  }

  .qfxmr-main-navigation .sub-menu {
    position: static;
    flex-basis: 100%;
    box-shadow: none;
    border-radius: 0;
    border-width: 0 0 0 2px;
    padding: 0 0 var(--space-2) var(--space-2);
    background: transparent;
  }

  .qfxmr-main-navigation .menu-item-has-children:hover > .sub-menu,
  .qfxmr-main-navigation .menu-item-has-children:focus-within > .sub-menu {
    display: none;
  }

  .qfxmr-main-navigation .menu-item-has-children.qfxmr-is-open > .sub-menu {
    display: flex;
  }
}

/* ============================================================
   5. Breadcrumb
   ============================================================ */

.breadcrumb {
  font-size: var(--step--1);
  color: var(--muted);
  padding-top: var(--space-4);
}

.breadcrumb .trail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb .crumb + .crumb::before {
  content: "›";
  margin-right: 0.6rem;
  color: var(--accent);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--aubergine);
  border-bottom-color: var(--accent);
}

.breadcrumb .crumb[aria-current="page"] {
  color: var(--fg-soft);
}

/* ============================================================
   6. Cards, grids, archives
   ============================================================ */

.qfxmr-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}

@media (max-width: 1020px) {
  .qfxmr-post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .qfxmr-post-grid {
    grid-template-columns: 1fr;
  }
}

.qfxmr-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.qfxmr-card .qfxmr-media-frame {
  margin: calc(-1 * var(--space-3)) calc(-1 * var(--space-3)) 0;
}

.qfxmr-media-frame {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 3px) calc(var(--radius) - 3px) 0 0;
  background: var(--bg-soft);
  aspect-ratio: var(--media-ratio);
}

.qfxmr-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qfxmr-card-title {
  font-size: var(--step-1);
  margin: 0;
}

/* Uniform truncation strategy for every list qfxmr-card: titles 2 lines,
   excerpts 3 lines — identical on home, archives, search, related. */
.qfxmr-card-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qfxmr-card-title a {
  color: var(--aubergine);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.qfxmr-card-title a:hover,
.qfxmr-card-title a:focus-visible {
  border-bottom-color: var(--accent);
}

.qfxmr-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.95rem;
  color: var(--fg-soft);
  margin: 0;
}

.qfxmr-card-excerpt p:last-child {
  margin-bottom: 0;
}

.qfxmr-card-meta {
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px dashed var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.qfxmr-card-cat {
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 600;
}

/* Hero (first post on the blog home) */

.qfxmr-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  margin-bottom: var(--space-5);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.25rem, 3.5vw, 2.5rem);
  align-items: center;
}

.qfxmr-hero .qfxmr-media-frame {
  border-radius: var(--radius-sm);
  margin: 0;
  align-self: stretch;
}

.qfxmr-hero-title {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem);
  margin-bottom: var(--space-2);
}

.qfxmr-hero-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qfxmr-hero-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qfxmr-hero-title a {
  color: var(--aubergine);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.qfxmr-hero-title a:hover,
.qfxmr-hero-title a:focus-visible {
  border-bottom-color: var(--accent);
}

.qfxmr-hero-excerpt {
  color: var(--fg-soft);
  margin-bottom: var(--space-3);
}

/* Content tables scroll inside their own box on narrow screens. */
.qfxmr-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 var(--space-4);
}

.qfxmr-table-scroll table {
  margin: 0;
}

@media (max-width: 760px) {
  .qfxmr-hero {
    grid-template-columns: 1fr;
  }
}

/* Archive headers */

.qfxmr-archive-header,
.qfxmr-page-header-block {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--ink-line);
}

.qfxmr-archive-title,
.qfxmr-page-title {
  margin-bottom: var(--space-2);
}

.qfxmr-archive-description {
  color: var(--muted);
  max-width: var(--measure);
}

.qfxmr-archive-description p:last-child {
  margin-bottom: 0;
}

.qfxmr-section-heading {
  font-size: var(--step-2);
  margin: var(--space-6) 0 var(--space-4);
  padding-top: var(--space-4);
  border-top: 2px solid var(--aubergine);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ============================================================
   7. Single article
   ============================================================ */

.qfxmr-entry-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 3rem);
}

.qfxmr-entry-header {
  margin-bottom: var(--space-4);
}

.qfxmr-entry-title {
  margin-bottom: var(--space-2);
}

.qfxmr-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: var(--step--1);
  color: var(--muted);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--ink-line);
}

.qfxmr-meta-row a {
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.qfxmr-meta-row a:hover,
.qfxmr-meta-row a:focus-visible {
  border-bottom-color: var(--accent);
}

.qfxmr-single-figure {
  margin: var(--space-4) 0;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 4px var(--bg-card), 0 0 0 5px var(--ink-line);
}

.qfxmr-single-figure .qfxmr-media-frame {
  border-radius: 4px;
  aspect-ratio: var(--media-ratio);
}

.qfxmr-single-figure figcaption {
  padding: var(--space-2) var(--space-1) 0;
}

.qfxmr-article-note {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
  font-size: 0.95rem;
  color: var(--fg-soft);
}

.qfxmr-article-note p:last-child {
  margin-bottom: 0;
}

.qfxmr-toc {
  background: var(--bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
}

.qfxmr-toc-title {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 var(--space-2);
}

.qfxmr-toc ol {
  margin: 0;
  padding-left: 1.3em;
  font-size: 0.95rem;
}

.qfxmr-toc a {
  text-decoration: none;
}

.qfxmr-toc a:hover,
.qfxmr-toc a:focus-visible {
  text-decoration: underline;
}

.qfxmr-entry-content > h2 {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--ink-line);
}

.qfxmr-entry-content > h3 {
  margin-top: var(--space-4);
}

.qfxmr-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 0;
}

.qfxmr-tag-list li {
  margin: 0;
}

.qfxmr-tag-list a {
  display: inline-block;
  padding: 0.3em 0.9em;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: var(--step--1);
  text-decoration: none;
  color: var(--fg-soft);
  background: var(--bg);
}

.qfxmr-tag-list a:hover,
.qfxmr-tag-list a:focus-visible {
  border-color: var(--accent);
  color: var(--aubergine-deep);
}

/* Author bio */

.qfxmr-author-bio {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.qfxmr-author-bio .avatar {
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--border-strong);
  flex-shrink: 0;
}

.qfxmr-author-bio-name {
  font-family: var(--font-serif);
  font-size: var(--step-1);
  margin: 0 0 var(--space-1);
}

.qfxmr-author-bio-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--fg-soft);
}

/* ============================================================
   8. Pagination & navigation
   ============================================================ */

.pagination,
.post-navigation,
.comment-navigation {
  margin-top: var(--space-5);
}

.pagination .nav-links,
.comment-navigation .nav-links {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.pagination a,
.pagination .current,
.comment-navigation a {
  display: inline-block;
  min-width: 2.4em;
  text-align: center;
  padding: 0.4em 0.8em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: var(--step--1);
  color: var(--fg-soft);
  background: var(--bg-card);
}

.pagination .current {
  background: var(--aubergine);
  border-color: var(--aubergine);
  color: #f2ebdd;
}

.pagination a:hover,
.pagination a:focus-visible,
.comment-navigation a:hover,
.comment-navigation a:focus-visible {
  border-color: var(--accent);
  color: var(--aubergine-deep);
}

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
}

.post-navigation .nav-next {
  text-align: right;
}

.post-navigation .nav-subtitle {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--space-1);
}

.post-navigation a {
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--aubergine);
}

@media (max-width: 640px) {
  .post-navigation .nav-links {
    grid-template-columns: 1fr;
  }

  .post-navigation .nav-next {
    text-align: left;
  }
}

/* ============================================================
   9. Sidebar
   ============================================================ */

.qfxmr-site-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.qfxmr-widget-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-4);
}

.qfxmr-widget-title {
  font-size: var(--step-1);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--ink-line);
}

.qfxmr-widget-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.qfxmr-widget-block li {
  padding: 0.4em 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}

.qfxmr-widget-block li:last-child {
  border-bottom: 0;
}

.qfxmr-widget-block a {
  text-decoration: none;
}

.qfxmr-widget-block a:hover,
.qfxmr-widget-block a:focus-visible {
  text-decoration: underline;
}

/* ============================================================
   10. Search form
   ============================================================ */

.search-form {
  display: flex;
  gap: var(--space-2);
}

.search-form .search-field {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.55em 0.9em;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.search-form .search-field:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.search-form .search-submit {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.55em 1.1em;
  background: var(--aubergine);
  color: #f2ebdd;
  border: 1px solid var(--aubergine);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.search-form .search-submit:hover,
.search-form .search-submit:focus-visible {
  background: var(--aubergine-deep);
}

.qfxmr-search-summary {
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.qfxmr-search-no-results .qfxmr-widget-block {
  max-width: 560px;
}

/* ============================================================
   11. Comments
   ============================================================ */

.comments-area {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 2px solid var(--aubergine);
}

.comments-title,
.comment-reply-title {
  font-size: var(--step-2);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
}

.comment-list .children {
  list-style: none;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  margin-top: var(--space-3);
}

.comment-list li + li,
.comment-list .children li {
  margin-top: var(--space-3);
}

.comment-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.comment-meta .avatar {
  border-radius: 50%;
}

.comment-author {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--aubergine);
  font-style: normal;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.reply {
  margin-top: var(--space-2);
}

.reply a,
.comment-edit-link {
  font-size: 0.82rem;
  color: var(--accent-deep);
}

.comment-respond {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  margin-top: var(--space-4);
}

.comment-form label {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.comment-form input:not([type="checkbox"]):not([type="submit"]),
.comment-form textarea {
  width: 100%;
  font: inherit;
  padding: 0.55em 0.9em;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--fg);
}

.comment-form .comment-form-cookies-consent {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
}

.comment-form .comment-form-cookies-consent label {
  display: inline;
  font-weight: 400;
  font-size: 0.85rem;
}

.comment-form .submit {
  font: inherit;
  padding: 0.6em 1.4em;
  background: var(--aubergine);
  color: #f2ebdd;
  border: 1px solid var(--aubergine);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.comment-form .submit:hover,
.comment-form .submit:focus-visible {
  background: var(--aubergine-deep);
}

.bypostauthor .comment-body {
  border-left: 3px solid var(--accent);
}

/* ============================================================
   12. Footer
   ============================================================ */

.qfxmr-site-footer {
  background: var(--aubergine-deep);
  color: #d9cfbe;
  margin-top: var(--space-6);
}

.qfxmr-site-footer a {
  color: #e6d9c2;
  text-decoration: none;
  border-bottom: 1px solid rgba(230, 217, 194, 0.35);
}

.qfxmr-site-footer a:hover,
.qfxmr-site-footer a:focus-visible {
  color: #fff;
  border-bottom-color: var(--accent);
}

.qfxmr-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3rem);
  list-style: none;
  margin: 0;
  padding-inline: 0;
  padding-block: var(--space-6) var(--space-5);
}

@media (max-width: 900px) {
  .qfxmr-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .qfxmr-footer-grid {
    grid-template-columns: 1fr;
  }
}

.qfxmr-footer-heading {
  font-family: var(--font-serif);
  font-size: var(--step-1);
  color: #f2ebdd;
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(242, 235, 221, 0.22);
}

.qfxmr-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.qfxmr-footer-links li {
  padding: 0.28em 0;
  font-size: 0.92rem;
}

.qfxmr-footer-bottom {
  border-top: 1px solid rgba(242, 235, 221, 0.16);
  padding-block: var(--space-3);
  font-size: 0.82rem;
  color: #b6a992;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
}

.qfxmr-footer-note {
  margin: 0;
}

.qfxmr-copyright {
  margin: 0;
}

/* ============================================================
   13. Miscellaneous blocks (404, empty states)
   ============================================================ */

.qfxmr-not-found-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  max-width: 720px;
}

.qfxmr-not-found-block .search-form {
  max-width: 460px;
  margin: var(--space-4) 0 var(--space-5);
}

/* WordPress alignment helpers, kept quiet and consistent */

.alignleft { float: left; margin: 0 var(--space-4) var(--space-3) 0; }
.alignright { float: right; margin: 0 0 var(--space-3) var(--space-4); }
.aligncenter { display: block; margin-inline: auto; }

.sticky .qfxmr-card {
  border-color: var(--accent);
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: var(--step--1);
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
