/* Synaptic Signals — Default Theme
   Clean, readable, generic but not without style. */

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

:root {
  --color-page-background:           #ffffff;
  --color-panel-background:      #f8f9fa;
  --color-text:         #1c1c1e;
  --color-text-muted:        #6b7280;
  --color-primary:       #2563eb;
  --color-primary-hover:  #1d4ed8;
  --color-header-background: #ffffff;
  --color-border:       #e5e7eb;
  --font-sans:          system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:          "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max-width:          740px;
  --space:              1.5rem;
  --radius:             6px;
}

body {
  background: var(--color-page-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0;
  padding: 0;
}

/* ── Links ── */
a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--color-primary-hover); text-decoration: none; }

/* ── Layout ── */
.site-header {
  background: var(--color-header-background);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header > * {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space);
  max-width: 100%;
  gap: 1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--max-width);
  padding: 0.875rem 0;
  flex: 1;
  min-width: 0;
}

.site-title {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-title:hover { color: var(--color-primary); text-decoration: none; }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.07);
  text-decoration: none;
}

/* ── Mobile hamburger toggle ── */
/* Hidden until the mobile breakpoint gates the nav behind it. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Header submenu (nav items with children) ── */

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-caret-only {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  font-size: 0.7rem;
  line-height: 1;
}

.nav-dropdown-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
}

.nav-dropdown-label:hover {
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.07);
}

.nav-dropdown-caret {
  font-size: 0.65rem;
}

.nav-item-label-only {
  padding: 0.25rem 0.6rem;
  color: var(--color-text-muted);
  cursor: default;
}

.nav-dropdown-label-only {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-text-muted);
  cursor: default;
  white-space: nowrap;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  padding: 0.4rem 0.2rem 0.2rem;
  background: var(--color-page-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  list-style: none;
  z-index: 10;
}

.nav-dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius);
}

.nav-dropdown a:hover {
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.07);
}

/* Hover mode (default): whole item reveals its dropdown on hover — only on
   devices that actually support hover. Touch devices always get the
   click/tap accordion below regardless of width. */
@media (hover: hover) and (pointer: fine) {
  .site-nav:not(.nav-trigger-click) .nav-item.has-children:hover > .nav-dropdown {
    display: block;
  }
}

/* Click mode: caret/label toggles an .open class via the inline script
   below the header markup. */
.site-nav.nav-trigger-click .nav-dropdown-caret-only {
  display: inline-flex;
}

.site-nav.nav-trigger-click .nav-item.open > .nav-dropdown {
  display: block;
}

/* Devices without real hover (touch — phones, tablets, hybrids) always get
   the tap-to-expand caret and .open-driven toggle, regardless of which
   trigger mode the site owner picked for hover-capable devices above. */
@media (hover: none), (pointer: coarse) {
  .nav-dropdown-caret-only {
    display: inline-flex !important;
  }

  .nav-dropdown-label {
    cursor: pointer;
  }

  .nav-item.open > .nav-dropdown {
    display: block !important;
  }
}

/* ── Header search ── */
/* Search input is limited to 25 characters (maxlength on the input element). */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

.user-bar-name {
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
}

.user-bar-name:hover { color: var(--color-primary); }

.user-bar-logout,
.user-bar-login {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.8rem;
}

.user-bar-logout:hover,
.user-bar-login:hover { color: var(--color-primary); }

.header-search input[type="search"] {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  width: 160px;
  background: var(--color-panel-background);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s;
}

.header-search input[type="search"]:focus {
  border-color: var(--color-primary);
}

.header-search button {
  padding: 0.3rem 0.65rem;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.header-search button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ── Main & Footer ── */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--space) 4rem;
  min-height: calc(100vh - 140px);
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space) var(--space);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.site-footer p { margin: 0; }
.site-footer a { color: var(--color-text-muted); }
.site-footer a:hover { color: var(--color-primary); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
  line-height: 1.25;
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }

/* ── Taxonomy clouds ── */
.taxonomy-clouds {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cloud-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.cloud-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Archive header ── */
.archive-header { margin-bottom: 2rem; }
.archive-header h1 { font-size: 1.75rem; }
.site-description { color: var(--color-text-muted); margin: 0.25rem 0 0; }
.author-bio { color: var(--color-text-muted); }

/* ── Post list ── */
.post-list { list-style: none; margin: 0; padding: 0; }

.post-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.post-item:last-child { border-bottom: none; }

.post-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

.post-title a { color: var(--color-text); text-decoration: none; }
.post-title a:hover { color: var(--color-primary); }

.post-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-bottom: 0.75rem;
}

.post-meta a { color: var(--color-text-muted); text-decoration: none; }
.post-meta a:hover { color: var(--color-primary); }

.post-excerpt { margin: 0; color: var(--color-text-muted); }

.no-posts {
  color: var(--color-text-muted);
  font-style: italic;
  padding: 1.5rem 0;
}

.read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-primary);
}

.read-more:hover { text-decoration: underline; }

/* ── Featured image ── */

/* Base — applies everywhere */
.featured-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

/* Hero treatment on single post and static pages — fixed aspect ratio, cover crop */
.single-post .featured-image,
.single-page .featured-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  max-height: 520px;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
  background: var(--color-panel-background);
}

/* Thumbnail treatment in post lists (home + archive) */
.post-item .featured-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  max-height: 280px;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--bg-subtle, #f3f4f6);
  transition: opacity 0.15s;
}

.post-item .featured-image:hover {
  opacity: 0.9;
}

/* Square-edge variant — add this class to any featured image to remove rounded corners.
   Usage in template: <img ... class="featured-image featured-image--sharp"> */
.featured-image--sharp,
.single-post .featured-image--sharp,
.single-page .featured-image--sharp,
.post-item .featured-image--sharp {
  border-radius: 0;
}

/* ── Single post ── */
.single-post .post-header { margin-bottom: 2rem; }
.single-post .post-title { font-size: 2rem; line-height: 1.2; margin-bottom: 0.75rem; }
.post-subtitle { font-size: 1.15rem; line-height: 1.5; color: var(--color-text-muted); margin-bottom: 1rem; }

.post-content { line-height: 1.8; }
.post-content p { margin-bottom: 1.25rem; }
.post-content h2, .post-content h3 { margin-top: 2rem; }

.post-content a { color: var(--color-primary); }

.post-content blockquote {
  border-left: 3px solid var(--color-primary);
  background: var(--color-panel-background);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  color: var(--color-text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content blockquote p { margin: 0; }

.post-content pre {
  background: var(--color-panel-background);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-panel-background);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  border: 1px solid var(--color-border);
}

.post-content pre code {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
}

.post-content img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ── Post tags ── */
.post-tags {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.post-tags > span { color: var(--color-text-muted); font-size: 0.875rem; }

.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.8125rem;
  text-decoration: none;
  color: var(--color-text-muted);
  background: var(--color-panel-background);
  transition: border-color 0.15s, color 0.15s;
}

/* ── Post sources ── */
.post-sources {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.post-sources h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.post-sources ul { margin: 0; padding-left: 1.25rem; }
.post-sources li { font-size: 0.875rem; margin-bottom: 0.3rem; word-break: break-all; }
.post-sources a { color: var(--color-primary, inherit); }

.tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

/* ── Post navigation ── */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.post-nav-prev, .post-nav-next {
  max-width: 48%;
}

.post-nav-next {
  margin-left: auto;
}

/* ── Save post ── */
.save-post-form { display: inline; }

.btn-save-post {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  transition: border-color 0.15s, color 0.15s;
}

.btn-save-post:hover,
.btn-save-post.saved {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ── Saved posts list (account page) ── */
.saved-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.saved-post-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.saved-post-title {
  flex: 1;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
}

.saved-post-title:hover { color: var(--color-primary); }

.saved-post-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.btn-unsave {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  text-decoration: underline;
}

.btn-unsave:hover { color: var(--color-text); }

.post-nav span {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.post-nav a { text-decoration: none; font-weight: 500; color: var(--color-text); }
.post-nav a:hover { color: var(--color-primary); }

/* ── Related posts ── */
.related-posts { margin-top: 2.5rem; }
.related-posts h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.related-posts ul { padding-left: 1.25rem; margin: 0; }
.related-posts li { margin-bottom: 0.4rem; }
.related-posts a { text-decoration: none; color: var(--color-primary); }
.related-posts a:hover { text-decoration: underline; }

/* ── Single page ── */
.single-page .page-header { margin-bottom: 1.75rem; }
.page-title { font-size: 2rem; margin: 0; }
.page-content { line-height: 1.8; }
.page-content p { margin-bottom: 1.25rem; }
.page-content h2, .page-content h3 { margin-top: 2rem; }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.pagination-prev,
.pagination-next {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}

.pagination-prev:hover,
.pagination-next:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

.pagination-info { color: var(--color-text-muted); }

/* ── Search ── */
/* Search input is limited to 25 characters (maxlength on the input element). */
.search-header { margin-bottom: 1.5rem; }
.search-header h1 { font-size: 1.5rem; margin-bottom: 0.75rem; }

.search-form { display: flex; gap: 0.5rem; margin: 0; }

.search-form input[type="search"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  outline: none;
  background: var(--color-panel-background);
  transition: border-color 0.15s;
}

.search-form input[type="search"]:focus { border-color: var(--color-primary); }

.search-form button {
  padding: 0.5rem 1.1rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: background 0.15s;
}

.search-form button:hover { background: var(--color-primary-hover); }

.search-result-count, .no-results, .search-prompt {
  color: var(--color-text-muted);
  margin: 1rem 0;
}

/* ── Error pages ── */
.error-page {
  text-align: center;
  padding: 4rem 0;
}

.error-page h1 { font-size: 2.25rem; margin-bottom: 1rem; }
.error-page p { color: var(--color-text-muted); }
.error-page code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-panel-background);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--color-border);
}

/* ── Comments ── */
.comments {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9375rem;
}

.comments-heading {
  font-size: 1.1rem;
  margin: 0 0 1.25rem;
}

.comment-list,
.comment-replies {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.comment:last-child { border-bottom: none; }

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

.comment-author {
  color: var(--color-text);
  font-weight: 600;
}

.comment-body {
  line-height: 1.6;
  color: var(--color-text);
  word-break: break-word;
}

.comment-replies {
  margin-top: 0.75rem;
  margin-left: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--color-border);
}

.comment-reply-link {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-top: 0.35rem;
  display: inline-block;
}

.comment-reply-link:hover { color: var(--color-primary); }

.reply-form { display: none; margin-top: 0.75rem; }

.comment-delete-form { display: inline; margin: 0; padding: 0; }

.comment-delete-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.comment-delete-btn:hover { color: #dc2626; }

.comment-form-wrap {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.comment-form-wrap h3 {
  font-size: 1rem;
  margin: 0 0 0.65rem;
}

.comment-textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  line-height: 1.6;
  resize: vertical;
  min-height: 90px;
  background: var(--color-panel-background);
  color: var(--color-text);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.comment-textarea:focus { border-color: var(--color-primary); }

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.comment-submit {
  padding: 0.4rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: background 0.15s;
}

.comment-submit:hover { background: var(--color-primary-hover); }
.comment-submit:disabled { background: var(--color-text-muted); cursor: not-allowed; }

.comment-error {
  color: #dc2626;
  font-size: 0.9375rem;
  margin: 0 0 1rem;
}

.human-check-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0.5rem 0 0;
  cursor: pointer;
  user-select: none;
}

.comment-login-prompt {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

@media (max-width: 640px) {
  .comment-replies {
    margin-left: 0.75rem;
    padding-left: 0.75rem;
  }
}

/* ── Cookie consent banner ── */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1a1a1a;
  color: #fff;
  padding: 1rem 1.5rem;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-accept-btn {
  background: #e8530a;
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

.cookie-dismiss-btn {
  background: transparent;
  color: #ccc;
  border: 1px solid #555;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

/* ── Honeypot (spam prevention — must stay visually hidden) ── */
.honeypot { display: none; }

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

/* ── Responsive ── */
@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }

  .site-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem var(--space) 0;
    gap: 0.5rem 1rem;
  }

  .site-nav {
    display: contents;
  }

  .header-right {
    display: contents;
  }

  .site-title {
    order: 1;
  }

  .nav-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  .header-search {
    order: 3;
    width: 100%;
    padding-bottom: 0.75rem;
  }

  .header-search input[type="search"] { flex: 1; width: auto; }

  /* Hidden behind the hamburger toggle by default — .mobile-nav-open (set
     by the inline script) reveals the custom menu and sign-in/out links
     together as one full-width stacked panel. */
  .nav-links,
  .user-bar {
    display: none;
    order: 4;
    width: 100%;
  }

  .site-header.mobile-nav-open .nav-links,
  .site-header.mobile-nav-open .user-bar {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .user-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--color-border);
  }

  .user-bar a {
    padding: 0.6rem;
  }

  /* Caret visibility and the .open toggle are handled by the (hover: none)
     query above, for any touch device at any width. This just switches the
     dropdown from an absolute floating panel to an inline block that
     stacks within the full-width mobile nav-links list. */
  .nav-item {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links a,
  .nav-dropdown-label,
  .nav-item-label-only {
    padding: 0.6rem;
  }

  .nav-dropdown {
    position: static;
    margin: 0 0 0 1rem;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
  }

  .post-nav { flex-direction: column; }
  .post-nav-prev, .post-nav-next { max-width: 100%; }
  .post-nav-next { margin-left: 0; }

  .search-form { flex-direction: column; }

  .pagination { flex-direction: column; gap: 0.75rem; text-align: center; }
}

.featured-image-wrap { margin: 0 0 1.5rem; }
.featured-image-caption { font-size: 0.85rem; color: var(--muted, #6b7280); text-align: center; margin-top: 0.5rem; font-style: italic; }

.featured-image-wrap { margin: 0 0 1.5rem; }
.featured-image-caption { font-size: 0.85rem; color: var(--muted, #6b7280); text-align: center; margin-top: 0.5rem; font-style: italic; }


.featured-image-wrap { margin: 0 0 1.5rem; }
.featured-image-caption { font-size: 0.85rem; color: var(--muted, #6b7280); text-align: center; margin-top: 0.5rem; font-style: italic; }
