/*
Theme Name: Sorrel
Description: A calm editorial theme on warm paper tones with moss green and terracotta accents, hand-drawn ink-line edges, and a continuous line motif for long-form guide reading.
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ---------------------------------------------------------
   0. Design tokens
--------------------------------------------------------- */
:root {
  --bg: #f5efe2;
  --bg-soft: #efe7d6;
  --surface: #faf6ec;
  --fg: #34312a;
  --muted: #7c7466;
  --border: #d8cbb2;
  --accent: #b0563a;
  --accent-soft: #e7c9b9;
  --moss: #5f7050;
  --moss-deep: #46553a;
  --radius: 14px;
  --radius-hand: 225px 18px 205px 14px / 16px 195px 14px 215px;
  --shadow: 0 2px 3px rgba(52, 49, 42, 0.05), 0 14px 30px -18px rgba(52, 49, 42, 0.28);
  --media-ratio: 8 / 5;
  --thumb-ratio: 8 / 5;
  --wrap: 1120px;
  --measure: 68ch;
  --step--1: 0.833rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --space-xs: 0.5rem;
  --space-s: 0.875rem;
  --space-m: 1.5rem;
  --space-l: 2.5rem;
  --space-xl: 4rem;
  --font-body: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-ui: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* ---------------------------------------------------------
   1. Reset & base
--------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Backstop against stray horizontal overflow (sub-menus, wide embeds).
   overflow-x: clip does not create a scroll container, so the sticky
   header keeps working. */
html, body { overflow-x: clip; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(52, 49, 42, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(95, 112, 80, 0.035), transparent 40%);
  background-size: 26px 26px, 100% 100%;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.22;
  margin: 0 0 var(--space-s);
  color: var(--fg);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-2); margin-top: var(--space-l); }
h3 { font-size: var(--step-1); margin-top: var(--space-m); }
h4 { font-size: var(--step-0); margin-top: var(--space-m); }

h1, h2, h3, p, li, td, blockquote { overflow-wrap: break-word; }

@media (max-width: 620px) {
  :root {
    --step-4: 1.85rem;
    --step-3: 1.55rem;
    --step-2: 1.35rem;
    --step-1: 1.15rem;
  }
  .wrap { padding-inline: 1.25rem; }
  .foot-inner { padding-inline: var(--space-s); }
}

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

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

blockquote {
  margin: var(--space-m) 0;
  padding: var(--space-s) var(--space-m);
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: #4b473c;
}

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

table { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-m); font-size: var(--step--1); }
th, td { padding: 0.6em 0.8em; border-bottom: 1px solid var(--border); text-align: left; }
th { font-family: var(--font-ui); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* Wide tables scroll inside their own box instead of widening the page */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 var(--space-m);
  border-radius: var(--radius);
}
.table-scroll table { margin-bottom: 0; min-width: 34rem; }

code, pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  background: var(--bg-soft);
  border-radius: 6px;
}
code { padding: 0.1em 0.35em; }
pre { padding: var(--space-s) var(--space-m); overflow-x: auto; border: 1px solid var(--border); }

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

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--space-m); }

/* Continuous line mark — a single hand-drawn stroke reused across the theme */
.ink-line {
  display: block;
  width: 132px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 12'%3E%3Cpath d='M2 7 C 22 2, 44 11, 66 6 S 110 2, 130 7' fill='none' stroke='%23b0563a' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------------------------------------------------------
   2. Header & navigation
--------------------------------------------------------- */
.site-head {
  border-bottom: 2px solid transparent;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 4' preserveAspectRatio='none'%3E%3Cpath d='M0 2 C 15 0.5, 35 3.5, 50 2 S 85 0.5, 100 2' fill='none' stroke='%23d8cbb2' stroke-width='1.6'/%3E%3C/svg%3E") 0 0 100% stretch;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.head-row {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding-block: var(--space-s);
}

.brand {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  flex-shrink: 0;
}
.brand::before {
  content: "";
  width: 34px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 20'%3E%3Cpath d='M2 15 C 8 4, 14 3, 17 10 C 20 3, 26 4, 32 15' fill='none' stroke='%235f7050' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.brand:hover { color: var(--accent); }

.main-nav { margin-left: auto; }

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.1rem 0.25rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
}
.menu li { position: relative; }
.menu a {
  display: block;
  padding: 0.5em 0.6em;
  color: var(--fg);
  text-decoration: none;
  border-radius: 9px;
  white-space: nowrap;
}
.menu a:hover { background: var(--bg-soft); color: var(--accent); }
.menu .current-menu-item > a, .menu .current-menu-ancestor > a { color: var(--accent); font-weight: 600; }

.menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-hand);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}
.menu li:hover > .sub-menu,
.menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.menu .sub-menu a { padding: 0.45em 0.8em; border-radius: 8px; white-space: normal; }

/* Items near the right edge open their panels inward so nothing
   extends past the viewport. */
.menu > li:nth-last-child(-n+2) > .sub-menu { left: auto; right: 0; }

.menu .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0.45em; height: 0.45em;
  margin-left: 0.5em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-0.15em);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  padding: 0.5em 1em;
  background: var(--surface);
  color: var(--fg);
  border: 1.5px solid var(--moss);
  border-radius: var(--radius-hand);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Just above the hamburger breakpoint, slim the brand and row gap so the
   full menu always fits on one line. */
@media (max-width: 1250px) {
  .brand { font-size: var(--step-1); }
  .head-row { gap: var(--space-s); }
}

@media (max-width: 1100px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    display: none;
    width: 100%;
    margin-left: 0;
  }
  .main-nav.is-open { display: block; }
  .head-row { flex-wrap: wrap; }
  .menu { flex-direction: column; gap: 0; flex-wrap: nowrap; }
  .menu a { padding: 0.65em 0.5em; white-space: normal; }
  .menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    margin-left: 0.8rem;
    padding: 0 0 0 0.6rem;
    display: none;
  }
  .menu li.sub-open > .sub-menu { display: block; }
}

/* ---------------------------------------------------------
   3. Breadcrumb
--------------------------------------------------------- */
.breadcrumb {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: var(--space-m) 0 0;
}
.breadcrumb .trail { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45em; list-style: none; margin: 0; padding: 0; }
.breadcrumb .crumb a { color: var(--muted); text-decoration: none; }
.breadcrumb .crumb a:hover { color: var(--accent); }
.breadcrumb .crumb + .crumb::before { content: "/"; margin-right: 0.45em; color: var(--border); }
.breadcrumb .crumb.is-here { color: var(--fg); }

/* ---------------------------------------------------------
   4. Layout skeleton
--------------------------------------------------------- */
.site-body { padding-bottom: var(--space-xl); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-l);
  align-items: start;
  margin-top: var(--space-m);
}
.layout.no-side { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------
   5. Hero (homepage first story)
--------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--space-l);
  align-items: center;
  margin: var(--space-l) 0 var(--space-xl);
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

.hero-media {
  border: 1.5px solid var(--fg);
  border-radius: var(--radius-hand);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-soft);
}
.hero-media img { width: 100%; aspect-ratio: var(--media-ratio); object-fit: cover; }

.hero-text .kicker {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--moss);
  margin-bottom: var(--space-xs);
}
.hero-text h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, var(--step-4)); margin-bottom: var(--space-s); }
.hero-text h1 a { color: inherit; text-decoration: none; }
.hero-text h1 a:hover { color: var(--accent); }
.hero-excerpt { color: #4b473c; max-width: var(--measure); }
.hero-more {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: var(--space-xs);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 0.1em;
}

/* ---------------------------------------------------------
   6. Post grid & cards
--------------------------------------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
  margin-bottom: var(--space-m);
}
.section-head h2, .section-head h1 { margin: 0; font-size: var(--step-3); }
.section-head .ink-line { margin-left: auto; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-l) var(--space-m);
  margin-bottom: var(--space-l);
}
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) var(--radius-hand) var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); }

.card-media { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.card-media img { width: 100%; aspect-ratio: var(--thumb-ratio); object-fit: cover; }

.card-body { padding: var(--space-s) var(--space-m) var(--space-m); display: flex; flex-direction: column; gap: var(--space-xs); }
.card-cats { font-family: var(--font-ui); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--moss); }
.card-cats a { color: inherit; text-decoration: none; }
.card-cats a:hover { color: var(--accent); }
.card-title {
  font-size: var(--step-1);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt {
  font-size: 0.92rem;
  color: #55503f;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-date { font-family: var(--font-ui); font-size: 0.75rem; color: var(--muted); margin-top: auto; padding-top: var(--space-xs); }

/* ---------------------------------------------------------
   7. Single article
--------------------------------------------------------- */
.article { max-width: 100%; }

.article-head { margin-bottom: var(--space-m); }
.article-head h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, var(--step-4)); margin-bottom: var(--space-s); }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.2em;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
}
.meta-row a { color: var(--moss-deep); }
.meta-row .meta-item { display: inline-flex; align-items: center; gap: 0.4em; }

.article-figure {
  margin: 0 0 var(--space-l);
  border: 1.5px solid var(--fg);
  border-radius: var(--radius-hand);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-soft);
}
.article-figure img { width: 100%; aspect-ratio: var(--media-ratio); object-fit: cover; }
.article-figure figcaption {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.6em 1.1em;
  border-top: 1px dashed var(--border);
  background: var(--surface);
}

.article-note {
  display: flex;
  gap: var(--space-s);
  align-items: flex-start;
  background: var(--bg-soft);
  border: 1.5px dashed var(--moss);
  border-radius: var(--radius-hand);
  padding: var(--space-s) var(--space-m);
  margin: 0 0 var(--space-l);
  font-size: 0.94rem;
  color: #4b473c;
}
.article-note::before {
  content: "";
  flex-shrink: 0;
  width: 26px; height: 26px;
  margin-top: 0.15em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Ccircle cx='13' cy='13' r='10.5' fill='none' stroke='%23b0563a' stroke-width='2'/%3E%3Cpath d='M13 8v6' stroke='%23b0563a' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='13' cy='17.6' r='1.3' fill='%23b0563a'/%3E%3C/svg%3E") no-repeat center / contain;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius-hand) var(--radius) var(--radius);
  padding: var(--space-s) var(--space-m);
  margin: 0 0 var(--space-l);
}
.toc-title {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--moss);
  margin: 0 0 var(--space-xs);
}
.toc ol { margin: 0; padding-left: 1.3em; font-size: 0.92rem; }
.toc li { margin: 0.2em 0; }
.toc a { color: var(--fg); text-decoration: none; border-bottom: 1px dashed var(--border); }
.toc a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.entry-content { font-size: 1.02rem; }
.entry-content img { border-radius: var(--radius); margin: var(--space-m) 0; }
.entry-content h2 { scroll-margin-top: 5.5rem; }

.page-links { font-family: var(--font-ui); font-size: 0.85rem; margin: var(--space-m) 0; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: var(--space-l) 0 var(--space-m); }
.tag-row a {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  text-decoration: none;
  color: var(--moss-deep);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 0.3em 0.9em;
  border-radius: 999px 700px 999px 800px;
}
.tag-row a:hover { color: var(--accent); border-color: var(--accent); }

.author-box {
  display: flex;
  gap: var(--space-m);
  align-items: flex-start;
  background: var(--surface);
  border: 1.5px solid var(--moss);
  border-radius: var(--radius-hand);
  padding: var(--space-m);
  margin: var(--space-l) 0;
}
.author-box .avatar { flex-shrink: 0; width: 64px; height: 64px; }
.author-box .avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50% 46% 52% 48%; border: 2px solid var(--accent-soft); }
.author-name { font-family: var(--font-ui); font-weight: 700; font-size: 0.92rem; margin: 0 0 0.3em; }
.author-name a { color: var(--accent); text-decoration: none; }
.author-desc { font-size: 0.92rem; color: #4b473c; margin: 0; }

.related-block { margin-top: var(--space-xl); }
.related-block .section-head h2 { font-size: var(--step-2); }

/* ---------------------------------------------------------
   8. Comments
--------------------------------------------------------- */
.comments-area { margin-top: var(--space-xl); }
.comments-title { font-size: var(--step-2); }

.comment-list { list-style: none; margin: 0 0 var(--space-l); padding: 0; }
.comment-list .children { list-style: none; padding-left: var(--space-m); border-left: 2px solid var(--border); margin-left: 0.6rem; }

.comment-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) var(--radius) var(--radius);
  padding: var(--space-s) var(--space-m);
  margin-bottom: var(--space-s);
}
.comment-author { font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700; }
.comment-author .avatar { border-radius: 50%; vertical-align: -0.4em; margin-right: 0.5em; }
.comment-metadata { font-family: var(--font-ui); font-size: 0.75rem; color: var(--muted); margin-bottom: 0.4em; }
.comment-metadata a { color: inherit; text-decoration: none; }
.comment-content p { margin-bottom: 0.6em; }
.reply { font-family: var(--font-ui); font-size: 0.8rem; }

.comment-respond { margin-top: var(--space-l); }
.comment-reply-title { font-size: var(--step-1); }
.comment-form { font-family: var(--font-ui); font-size: 0.9rem; display: grid; gap: var(--space-s); }
.comment-form label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3em; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6em 0.8em;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
}
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid var(--moss); outline-offset: 1px; border-color: var(--moss); }
.comment-form .submit {
  justify-self: start;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6em 1.6em;
  background: var(--accent);
  color: #fdf9f0;
  border: 0;
  border-radius: 999px 750px 999px 820px;
  cursor: pointer;
}
.comment-form .submit:hover { background: var(--moss-deep); }
.comment-notes, .logged-in-as { font-size: 0.8rem; color: var(--muted); }

/* ---------------------------------------------------------
   9. Sidebar (template-rendered, no widgets)
--------------------------------------------------------- */
.side-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) var(--radius-hand) var(--radius);
  padding: var(--space-s) var(--space-m) var(--space-m);
  margin-bottom: var(--space-m);
}
.side-title {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--moss);
  margin: 0 0 var(--space-s);
  padding-bottom: var(--space-xs);
  border-bottom: 1.5px solid var(--border);
}
.side-list { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.side-list li { padding: 0.35em 0; border-bottom: 1px dashed var(--border); }
.side-list li:last-child { border-bottom: 0; }
.side-list a { color: var(--fg); text-decoration: none; }
.side-list a:hover { color: var(--accent); }
.side-list .count { font-family: var(--font-ui); font-size: 0.72rem; color: var(--muted); }

/* ---------------------------------------------------------
   10. Search form
--------------------------------------------------------- */
.search-form {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.search-form label { flex: 1; }
.search-field {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.55em 0.9em;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 700px 999px 800px 999px;
  color: var(--fg);
}
.search-field:focus { outline: 2px solid var(--moss); outline-offset: 1px; border-color: var(--moss); }
.search-submit {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55em 1.3em;
  background: var(--moss);
  color: #f4f1e6;
  border: 0;
  border-radius: 999px 720px 999px 780px;
  cursor: pointer;
}
.search-submit:hover { background: var(--accent); }

/* ---------------------------------------------------------
   11. Archive & page headers, pagination, 404
--------------------------------------------------------- */
.archive-head {
  margin: var(--space-m) 0 var(--space-l);
  padding-bottom: var(--space-m);
  border-bottom: 1.5px solid var(--border);
}
.archive-head h1 { font-size: var(--step-3); margin-bottom: var(--space-xs); }
.archive-head .archive-desc { color: #55503f; max-width: var(--measure); margin: 0; font-size: 0.95rem; }

.pagination, .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  margin: var(--space-l) 0;
}
.pagination .page-numbers {
  display: inline-block;
  min-width: 2.4em;
  text-align: center;
  padding: 0.4em 0.7em;
  text-decoration: none;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pagination .page-numbers.current { background: var(--moss); color: #f4f1e6; border-color: var(--moss); }
.pagination .page-numbers:hover:not(.current) { color: var(--accent); border-color: var(--accent); }

.notfound {
  text-align: center;
  padding: var(--space-xl) 0;
  max-width: 40rem;
  margin-inline: auto;
}
.notfound h1 { font-size: var(--step-3); }
.notfound p { color: #55503f; }
.notfound .search-form { max-width: 26rem; margin: var(--space-m) auto 0; }
.notfound .ink-line { margin: var(--space-m) auto 0; }

/* ---------------------------------------------------------
   12. Footer
--------------------------------------------------------- */
.site-foot {
  margin-top: var(--space-xl);
  background: var(--moss-deep);
  color: #e4ddc9;
}
.foot-inner { padding: var(--space-l) 0 var(--space-m); }

/* Brand block and link columns share one row on desktop */
.foot-top {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-m);
  align-items: start;
}
@media (max-width: 900px) { .foot-top { grid-template-columns: minmax(0, 1fr); gap: var(--space-m); } }

.foot-brand .foot-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  color: #f0ead8;
  text-decoration: none;
}
.foot-brand .foot-name:hover { color: var(--accent-soft); }
.foot-brand .ink-line { margin-top: var(--space-xs); }

.foot-nav {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-l) var(--space-m);
}
@media (max-width: 900px) { .foot-nav { grid-column: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .foot-nav { grid-template-columns: minmax(0, 1fr); } }

.fnav-text { color: #e4ddc9; }

.fnav-group { margin: 0; }
.fnav-head {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-soft);
  margin-bottom: var(--space-xs);
  padding-bottom: 0.4em;
  border-bottom: 1.5px solid rgba(228, 221, 201, 0.22);
}
.fnav-list { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.fnav-list li { margin: 0.28em 0; }
.fnav-list a { color: #e4ddc9; text-decoration: none; }
.fnav-list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }

.foot-line {
  margin-top: var(--space-l);
  padding-top: var(--space-s);
  border-top: 1.5px solid rgba(228, 221, 201, 0.22);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: rgba(228, 221, 201, 0.72);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.6em;
}
.foot-line p { margin: 0; }

/* ---------------------------------------------------------
   13. WordPress core classes
--------------------------------------------------------- */
.alignleft { float: left; margin: 0.4em var(--space-m) var(--space-s) 0; }
.alignright { float: right; margin: 0.4em 0 var(--space-s) var(--space-m); }
.aligncenter { display: block; margin-inline: auto; }
.alignnone { margin: var(--space-m) 0; }

.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 0.4em;
}

.sticky .card-title::before {
  content: "";
  display: inline-block;
  width: 0.55em; height: 0.55em;
  margin-right: 0.45em;
  background: var(--accent);
  border-radius: 50% 42% 55% 45%;
}

.bypostauthor > .comment-body { border-color: var(--moss); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-s); margin: var(--space-m) 0; }
.gallery-item { margin: 0; }
.gallery-item img { border-radius: var(--radius); width: 100%; }
